Skip to contentSkip to conversation

gpio: Correct dependencies for MCP230xx

PATCH Superseded Charles Perry 2 participants 4 messages May 5 – May 7 GPIO

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: Correct dependencies for MCP230xx

This driver depends on DM_I2C and DM_SPI, add it.

---
 drivers/gpio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/Kconfig +1 -1
index 37cb672697c0..3ced3fb32f24 100644
@@ -309,7 +309,7 @@ config MAX77663_GPIO
 
 config MCP230XX_GPIO
 	bool "MCP230XX GPIO driver"
-	depends on DM
+	depends on DM && DM_I2C && DM_SPI
 	help
 	  Support for Microchip's MCP230XX I2C connected GPIO devices.
 	  The following chips are supported:
Signature · 1 line
2.47.3
Reviewed-by on v1 1/1
#1 lore raw

Hi Charles,

Quoted 4 lines · Charles Perry

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

This driver depends on DM_I2C and DM_SPI, add it.

Wondering if we shouldn't split that driver in two symbols, one for I2C and one for SPI such that you don't need both if you only have a device over I2C/SPI.

Quoted 10 lines
---
  drivers/gpio/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/Kconfig +0 -0
index 37cb672697c0..3ced3fb32f24 100644

drivers/gpio/Kconfig config MAX77663_GPIO · line 314

Quoted 7 lines
drivers/gpio/Kconfig +1 -1
@@ -309,7 +309,7 @@ config MAX77663_GPIO
 
  config MCP230XX_GPIO
         bool "MCP230XX GPIO driver"
-       depends on DM
+       depends on DM && DM_I2C && DM_SPI
         help
           Support for Microchip's MCP230XX I2C connected GPIO devices.

Can you update the help text to say this supports SPI-connected GPIO devices as well (the SPI-connected devices are listed below, outside the git context but if someone doesn't know better, it'll be difficult to figure this out)?

With that,

Thanks!
Quentin

#2 lore raw
Quoted 10 lines · Quentin Schulz

Hi Charles,

Quoted 4 lines · Charles Perry

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

This driver depends on DM_I2C and DM_SPI, add it.

Wondering if we shouldn't split that driver in two symbols, one for I2C and one for SPI such that you don't need both if you only have a device over I2C/SPI.

Just want to clarify that this is "it would be nice if we could do X", this is not a requirement though. The immediate issue is you cannot build this driver without DM_I2C or DM_SPI not set, so this patch is fine with the small change requested below.

Quoted 26 lines
Quoted 11 lines

---
  drivers/gpio/Kconfig | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/Kconfig +0 -0
index 37cb672697c0..3ced3fb32f24 100644
@@ -309,7 +309,7 @@ config MAX77663_GPIO
 
Quoted 6 lines

  config MCP230XX_GPIO
         bool "MCP230XX GPIO driver"
-       depends on DM
+       depends on DM && DM_I2C && DM_SPI
         help
           Support for Microchip's MCP230XX I2C connected GPIO devices.

Can you update the help text to say this supports SPI-connected GPIO devices as well (the SPI-connected devices are listed below, outside the git context but if someone doesn't know better, it'll be difficult to figure this out)?

With that,

Thanks!
Quentin

#3 lore raw
Quoted 16 lines · Quentin Schulz
Quoted 7 lines · Quentin Schulz

Hi Charles,

Quoted 4 lines · Charles Perry

[You don't often get email from [email protected]. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification ]

Quoted 7 lines
Quoted 2 lines

This driver depends on DM_I2C and DM_SPI, add it.

Wondering if we shouldn't split that driver in two symbols, one for I2C and one for SPI such that you don't need both if you only have a device over I2C/SPI.

Quoted 5 lines

Just want to clarify that this is "it would be nice if we could do X", this is not a requirement though. The immediate issue is you cannot build this driver without DM_I2C or DM_SPI not set, so this patch is fine with the small change requested below.

Ok, I won't take on this refactoring task but if anyone looks into this, it might be relevant to use a "regmap".

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

---
  drivers/gpio/Kconfig | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/Kconfig +0 -0
index 37cb672697c0..3ced3fb32f24 100644
@@ -309,7 +309,7 @@ config MAX77663_GPIO
 
Quoted 12 lines
Quoted 7 lines
Quoted 6 lines

  config MCP230XX_GPIO
         bool "MCP230XX GPIO driver"
-       depends on DM
+       depends on DM && DM_I2C && DM_SPI
         help
           Support for Microchip's MCP230XX I2C connected GPIO devices.

Quoted 5 lines

Can you update the help text to say this supports SPI-connected GPIO devices as well (the SPI-connected devices are listed below, outside the git context but if someone doesn't know better, it'll be difficult to figure this out)?

Ok, will send a v2.

Thanks,
Charles