[3/8] gpio: GPIO_REGMAP: select REGMAP instead of depending on it

Message ID 20230226053953.4681-4-rdunlap@infradead.org
State New
Headers
Series drivers: select REGMAP instead of depending on it |

Commit Message

Randy Dunlap Feb. 26, 2023, 5:39 a.m. UTC
  REGMAP is a hidden (not user visible) symbol. Users cannot set it
directly thru "make *config", so drivers should select it instead of
depending on it if they need it.

Consistently using "select" or "depends on" can also help reduce
Kconfig circular dependency issues.

Therefore, change the use of "depends on REGMAP" to "select REGMAP".

Fixes: ebe363197e52 ("gpio: add a reusable generic gpio_chip using regmap")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Michael Walle <michael@walle.cc>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-gpio@vger.kernel.org
---
 drivers/gpio/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Walle Feb. 26, 2023, 6:06 p.m. UTC | #1
Am 2023-02-26 06:39, schrieb Randy Dunlap:
> REGMAP is a hidden (not user visible) symbol. Users cannot set it
> directly thru "make *config", so drivers should select it instead of
> depending on it if they need it.
> 
> Consistently using "select" or "depends on" can also help reduce
> Kconfig circular dependency issues.
> 
> Therefore, change the use of "depends on REGMAP" to "select REGMAP".
> 
> Fixes: ebe363197e52 ("gpio: add a reusable generic gpio_chip using 
> regmap")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Michael Walle <michael@walle.cc>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Bartosz Golaszewski <brgl@bgdev.pl>
> Cc: linux-gpio@vger.kernel.org

Acked-by: Michael Walle <michael@walle.cc>

Thanks,
-michael
  
Bartosz Golaszewski March 6, 2023, 10:17 a.m. UTC | #2
On Sun, Feb 26, 2023 at 6:40 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> REGMAP is a hidden (not user visible) symbol. Users cannot set it
> directly thru "make *config", so drivers should select it instead of
> depending on it if they need it.
>
> Consistently using "select" or "depends on" can also help reduce
> Kconfig circular dependency issues.
>
> Therefore, change the use of "depends on REGMAP" to "select REGMAP".
>
> Fixes: ebe363197e52 ("gpio: add a reusable generic gpio_chip using regmap")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Michael Walle <michael@walle.cc>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Bartosz Golaszewski <brgl@bgdev.pl>
> Cc: linux-gpio@vger.kernel.org
> ---
>  drivers/gpio/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -- a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -100,7 +100,7 @@ config GPIO_GENERIC
>         tristate
>
>  config GPIO_REGMAP
> -       depends on REGMAP
> +       select REGMAP
>         tristate
>
>  # put drivers in the right section, in alphabetical order

Queued for fixes, thanks!

Bart
  

Patch

diff -- a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -100,7 +100,7 @@  config GPIO_GENERIC
 	tristate
 
 config GPIO_REGMAP
-	depends on REGMAP
+	select REGMAP
 	tristate
 
 # put drivers in the right section, in alphabetical order