mmc: core add the property for hs200
PATCH 1/7 mmc: core add the property for hs200
caps2-mmc-hs200-1.8v and caps2-mmc-hs200-1.2v can be used to the general capability.
--- drivers/mmc/core/host.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/core/host.c +4 -0
@@ -429,6 +429,10 @@ int mmc_of_parse(struct mmc_host *host) host->pm_caps |=MMC_PM_KEEP_POWER ;if (of_find_property (np,"enable-sdio-wakeup" , &len)) host->pm_caps |=MMC_PM_WAKE_SDIO_IRQ ; +if (of_find_property (np,"caps2-mmc-hs200-1_8v" ,NULL )) + host->caps2 |=MMC_CAP2_HS200_1_8V_SDR ; +if (of_find_property (np,"caps2-mmc-hs200-1_2v" ,NULL )) + host->caps2 |=MMC_CAP2_HS200_1_2V_SDR ;return 0 ;
Signature · 1 line
1.7.9.5
Quoted 12 lines · On Tuesday 21 January 2014 19:16:54 Jaehoon Chung wrote:
caps2-mmc-hs200-1.8v and caps2-mmc-hs200-1.2v can be used to the general capability.
Signed-off-by Jaehoon Chung <[email protected]>--- drivers/mmc/core/host.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/core/host.c +0
-0
drivers/mmc/core/host.c int mmc_of_parse(struct mmc_host *host) · line 437
Quoted 9 lines
drivers/mmc/core/host.c +4
-0@@ -429,6 +429,10 @@ int mmc_of_parse(struct mmc_host *host) host->pm_caps |=MMC_PM_KEEP_POWER ;if (of_find_property (np,"enable-sdio-wakeup" , &len)) host->pm_caps |=MMC_PM_WAKE_SDIO_IRQ ; +if (of_find_property (np,"caps2-mmc-hs200-1_8v" ,NULL )) + host->caps2 |=MMC_CAP2_HS200_1_8V_SDR ; +if (of_find_property (np,"caps2-mmc-hs200-1_2v" ,NULL )) + host->caps2 |=MMC_CAP2_HS200_1_2V_SDR ;return 0 ;
If we do this, the strings also need to be documented in bindings/mmc/mmc.txt.
Unfortunately, the names are not particularly intuitive (the caps2 part in particular), but it's probably better to stick with that now.
Arnd
Quoted 21 lines · Arnd Bergmann
Quoted 20 lines · On Tuesday 21 January 2014 19:16:54 Jaehoon Chung wrote:
caps2-mmc-hs200-1.8v and caps2-mmc-hs200-1.2v can be used to the general capability.
Signed-off-by Jaehoon Chung <[email protected]>--- drivers/mmc/core/host.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/core/host.c +4
-0@@ -429,6 +429,10 @@ int mmc_of_parse(struct mmc_host *host) host->pm_caps |=MMC_PM_KEEP_POWER ;if (of_find_property (np,"enable-sdio-wakeup" , &len)) host->pm_caps |=MMC_PM_WAKE_SDIO_IRQ ; +if (of_find_property (np,"caps2-mmc-hs200-1_8v" ,NULL )) + host->caps2 |=MMC_CAP2_HS200_1_8V_SDR ; +if (of_find_property (np,"caps2-mmc-hs200-1_2v" ,NULL )) + host->caps2 |=MMC_CAP2_HS200_1_2V_SDR ;
Quoted 8 lines
drivers/mmc/core/host.c int mmc_of_parse(struct mmc_host *host) · line 437
Quoted 1 line
drivers/mmc/core/host.c +0
-0return 0 ;If we do this, the strings also need to be documented in
bindings/mmc/mmc.txt.Unfortunately, the names are not particularly intuitive (the caps2 part in particular), but it's probably better to stick with that now.
I would prefer to remove "caps2" from the property name.
Going forward and cleaning up all the non needed caps flags, could mean we may want to move caps2 flags into caps flags, I guess. This would not be suitable if we decide to name the property as above.
Kind regards
Uffe
Quoted 2 lines
Arnd
Quoted 31 lines · Ulf Hansson
Quoted 21 lines · Arnd Bergmann
Quoted 20 lines · On Tuesday 21 January 2014 19:16:54 Jaehoon Chung wrote:
caps2-mmc-hs200-1.8v and caps2-mmc-hs200-1.2v can be used to the general capability.
Signed-off-by Jaehoon Chung <[email protected]>--- drivers/mmc/core/host.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/core/host.c +4
-0@@ -429,6 +429,10 @@ int mmc_of_parse(struct mmc_host *host) host->pm_caps |=MMC_PM_KEEP_POWER ;if (of_find_property (np,"enable-sdio-wakeup" , &len)) host->pm_caps |=MMC_PM_WAKE_SDIO_IRQ ; +if (of_find_property (np,"caps2-mmc-hs200-1_8v" ,NULL )) + host->caps2 |=MMC_CAP2_HS200_1_8V_SDR ; +if (of_find_property (np,"caps2-mmc-hs200-1_2v" ,NULL )) + host->caps2 |=MMC_CAP2_HS200_1_2V_SDR ;Quoted 8 lines
drivers/mmc/core/host.c int mmc_of_parse(struct mmc_host *host) · line 437
Quoted 1 line
drivers/mmc/core/host.c +0
-0return 0 ;If we do this, the strings also need to be documented in
bindings/mmc/mmc.txt.Unfortunately, the names are not particularly intuitive (the caps2 part in particular), but it's probably better to stick with that now.
Quoted 5 lines
I would prefer to remove "caps2" from the property name.
Going forward and cleaning up all the non needed caps flags, could mean we may want to move caps2 flags into caps flags, I guess. This would not be suitable if we decide to name the property as above.
Agreed,caps2 flags can be changed in future.
I will remove the "caps2" from name.
And i will add the document in binding/mmc/mmc.txt at next patch.
Best Regards,
Jaehoon Chung
Quoted 11 lines
Kind regards
UffeQuoted 2 lines
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Jaehoon Chung
Quoted 9 lines · Ulf Hansson
Quoted 5 lines · Arnd Bergmann
On Tuesday 21 January 2014 19:16:54 Jaehoon Chung wrote:
Unfortunately, the names are not particularly intuitive (the caps2 part in particular), but it's probably better to stick with that now.
I would prefer to remove "caps2" from the property name.
Quoted 8 lines
Quoted 3 lines
Going forward and cleaning up all the non needed caps flags, could mean we may want to move caps2 flags into caps flags, I guess. This would not be suitable if we decide to name the property as above.
Agreed,caps2 flags can be changed in future.
I will remove the "caps2" from name.
And i will add the document inbinding/mmc/mmc.txtat next patch.
In general, we have to be very careful changing these things, so we don't break existing dts files booting with newer kernels.
In this particular case, I think we're fine, since the hs200 properties are fairly new and haven't made it into any dts files so far.
Arnd