Skip to contentSkip to conversation

mmc: s3cmci: include GPIO descriptor consumer header

PATCH In review Krzysztof Kozlowski 3 participants 7 messages Oct 26, 2020 – Oct 27, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 mmc: s3cmci: include GPIO descriptor consumer header

The driver uses GPIO Descriptor Consumer Interface so include proper header to fix compile test errors like:

drivers/mmc/host/s3cmci.c: In function ‘s3cmci_check_sdio_irq’:
drivers/mmc/host/s3cmci.c:304:7: error:
implicit declaration of function ‘gpiod_get_value’; did you mean ‘gpio_get_value’? [-Werror=implicit-function-declaration]

drivers/mmc/host/s3cmci.c: In function ‘s3cmci_probe_pdata’:
drivers/mmc/host/s3cmci.c:1451:19: error:
implicit declaration of function ‘devm_gpiod_get_index’ [-Werror=implicit-function-declaration]

---
 drivers/mmc/host/s3cmci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/s3cmci.c +1 -1
index 643d54eceef6..a33a7823c265 100644
@@ -17,7 +17,7 @@
 #include <linux/cpufreq.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/io.h>
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 mmc: s3cmci: enable compile testing

The driver can be compile tested to increase build coverage.

---
 drivers/mmc/host/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/Kconfig +2 -2
index 31481c9fcc2e..310e546e5898 100644
@@ -631,8 +631,8 @@ config MMC_SPI
 
 config MMC_S3C
 	tristate "Samsung S3C SD/MMC Card Interface support"
-	depends on ARCH_S3C24XX
-	depends on S3C24XX_DMAC
+	depends on ARCH_S3C24XX || COMPILE_TEST
+	depends on S3C24XX_DMAC || COMPILE_TEST
 	help
 	  This selects a driver for the MCI interface found in
 	  Samsung's S3C2410, S3C2412, S3C2440, S3C2442 CPUs.
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH 2/3] mmc: s3cmci: enable compile testing

Quoted 4 lines · Krzysztof Kozlowski

The driver can be compile tested to increase build coverage.

Applied for next, thanks!

Kind regards
Uffe

Quoted 22 lines
---
 drivers/mmc/host/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/Kconfig +2 -3
index 31481c9fcc2e..310e546e5898 100644
@@ -631,8 +631,8 @@ config MMC_SPI
 
 config MMC_S3C
        tristate "Samsung S3C SD/MMC Card Interface support"
-       depends on ARCH_S3C24XX
-       depends on S3C24XX_DMAC
+       depends on ARCH_S3C24XX || COMPILE_TEST
+       depends on S3C24XX_DMAC || COMPILE_TEST
        help
          This selects a driver for the MCI interface found in
          Samsung's S3C2410, S3C2412, S3C2440, S3C2442 CPUs.
--

2.25.1

#3 lore raw

PATCH 3/3 mmc: sunxi: drop of_match_ptr from of_device_id table

In reply to Krzysztof Kozlowski

The driver can match only via DT table so it should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant for sunxi). This fixes compile warning:

drivers/mmc/host/sunxi-mmc.c:1181:34: warning: ‘sunxi_mmc_of_match’ defined but not used [-Wunused-const-variable=]

---
 drivers/mmc/host/sunxi-mmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/sunxi-mmc.c +2 -1
index fc62773602ec..6310693f2ac0 100644
@@ -26,6 +26,7 @@
 #include <linux/mmc/sdio.h>
 #include <linux/mmc/slot-gpio.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
@@ -1515,7 +1516,7 @@ static struct platform_driver sunxi_mmc_driver = {
 	.driver = {
 		.name	= "sunxi-mmc",
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-		.of_match_table = of_match_ptr(sunxi_mmc_of_match),
+		.of_match_table = sunxi_mmc_of_match,
 		.pm = &sunxi_mmc_pm_ops,
 	},
 	.probe		= sunxi_mmc_probe,
Signature · 1 line
2.25.1
Acked-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] mmc: sunxi: drop of_match_ptr from of_device_id table

Quoted 9 lines · Krzysztof Kozlowski

The driver can match only via DT table so it should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant for sunxi). This fixes compile warning:

drivers/mmc/host/sunxi-mmc.c:1181:34: warning: ‘sunxi_mmc_of_match’ defined but not used [-Wunused-const-variable=]

Maxime

#5 lore raw

Re: [PATCH 3/3] mmc: sunxi: drop of_match_ptr from of_device_id table

In reply to Krzysztof Kozlowski
Quoted 10 lines · Krzysztof Kozlowski

The driver can match only via DT table so it should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant for sunxi). This fixes compile warning:

drivers/mmc/host/sunxi-mmc.c:1181:34: warning: ‘sunxi_mmc_of_match’ defined but not used [-Wunused-const-variable=]

Applied for next, thanks!

Kind regards
Uffe

Quoted 28 lines
---
 drivers/mmc/host/sunxi-mmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/sunxi-mmc.c +2 -2
index fc62773602ec..6310693f2ac0 100644
@@ -26,6 +26,7 @@
 #include <linux/mmc/sdio.h>
 #include <linux/mmc/slot-gpio.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
@@ -1515,7 +1516,7 @@ static struct platform_driver sunxi_mmc_driver = {
        .driver = {
                .name   = "sunxi-mmc",
                .probe_type = PROBE_PREFER_ASYNCHRONOUS,
-               .of_match_table = of_match_ptr(sunxi_mmc_of_match),
+               .of_match_table = sunxi_mmc_of_match,
                .pm = &sunxi_mmc_pm_ops,
        },
        .probe          = sunxi_mmc_probe,
--

2.25.1

#6 lore raw
In reply to Krzysztof Kozlowski
Quoted 8 lines · Krzysztof Kozlowski

The driver uses GPIO Descriptor Consumer Interface so include proper header to fix compile test errors like:

drivers/mmc/host/s3cmci.c: In function ‘s3cmci_check_sdio_irq’:
drivers/mmc/host/s3cmci.c:304:7: error:
implicit declaration of function ‘gpiod_get_value’; did you mean ‘gpio_get_value’? [-Werror=implicit-function-declaration]

Quoted 5 lines

drivers/mmc/host/s3cmci.c: In function ‘s3cmci_probe_pdata’:
drivers/mmc/host/s3cmci.c:1451:19: error:
implicit declaration of function ‘devm_gpiod_get_index’ [-Werror=implicit-function-declaration]

Applied for next, thanks!

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/host/s3cmci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/s3cmci.c +1 -2
index 643d54eceef6..a33a7823c265 100644
@@ -17,7 +17,7 @@
 #include <linux/cpufreq.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/io.h>
--

2.25.1