public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] extcon: max8997: select IRQ_DOMAIN instead of depending on it
@ 2024-02-13  6:00 ` Randy Dunlap
  2024-02-13  8:26   ` Arnd Bergmann
  2024-02-22  5:56   ` Chanwoo Choi
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2024-02-13  6:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Arnd Bergmann, MyungJoo Ham, Chanwoo Choi,
	Marc Zyngier, Philipp Zabel, Peter Rosin, Greg Kroah-Hartman

IRQ_DOMAIN 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.
Relying on it being set for a dependency is risky.

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

Therefore, change EXTCON_MAX8997's use of "depends on" for
IRQ_DOMAIN to "select".

Fixes: dca1a71e4108 ("extcon: Add support irq domain for MAX8997 muic")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Peter Rosin <peda@axentia.se>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
v2: drop Cc: Donggeun Kim <dg77.kim@samsung.com> (bounced)

 drivers/extcon/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -- a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig
--- a/drivers/extcon/Kconfig
+++ b/drivers/extcon/Kconfig
@@ -116,7 +116,8 @@ config EXTCON_MAX77843
 
 config EXTCON_MAX8997
 	tristate "Maxim MAX8997 EXTCON Support"
-	depends on MFD_MAX8997 && IRQ_DOMAIN
+	depends on MFD_MAX8997
+	select IRQ_DOMAIN
 	help
 	  If you say yes here you get support for the MUIC device of
 	  Maxim MAX8997 PMIC. The MAX8997 MUIC is a USB port accessory

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] extcon: max8997: select IRQ_DOMAIN instead of depending on it
  2024-02-13  6:00 ` [PATCH v2] extcon: max8997: select IRQ_DOMAIN instead of depending on it Randy Dunlap
@ 2024-02-13  8:26   ` Arnd Bergmann
  2024-02-22  5:56   ` Chanwoo Choi
  1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2024-02-13  8:26 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: MyungJoo Ham, Chanwoo Choi, Marc Zyngier, Philipp Zabel,
	Peter Rosin, Greg Kroah-Hartman

On Tue, Feb 13, 2024, at 07:00, Randy Dunlap wrote:
> IRQ_DOMAIN 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.
> Relying on it being set for a dependency is risky.
>
> Consistently using "select" or "depends on" can also help reduce
> Kconfig circular dependency issues.
>
> Therefore, change EXTCON_MAX8997's use of "depends on" for
> IRQ_DOMAIN to "select".
>
> Fixes: dca1a71e4108 ("extcon: Add support irq domain for MAX8997 muic")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Arnd Bergmann <arnd@arndb.de>

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH v2] extcon: max8997: select IRQ_DOMAIN instead of depending on it
  2024-02-13  6:00 ` [PATCH v2] extcon: max8997: select IRQ_DOMAIN instead of depending on it Randy Dunlap
  2024-02-13  8:26   ` Arnd Bergmann
@ 2024-02-22  5:56   ` Chanwoo Choi
  1 sibling, 0 replies; 3+ messages in thread
From: Chanwoo Choi @ 2024-02-22  5:56 UTC (permalink / raw)
  To: 'Randy Dunlap', linux-kernel
  Cc: 'Arnd Bergmann', 'MyungJoo Ham',
	'Marc Zyngier', 'Philipp Zabel',
	'Peter Rosin', 'Greg Kroah-Hartman'



> -----Original Message-----
> From: Randy Dunlap <rdunlap@infradead.org>
> Sent: Tuesday, February 13, 2024 3:00 PM
> To: linux-kernel@vger.kernel.org
> Cc: Randy Dunlap <rdunlap@infradead.org>; Arnd Bergmann <arnd@arndb.de>;
> MyungJoo Ham <myungjoo.ham@samsung.com>; Chanwoo Choi
<cw00.choi@samsung.com>;
> Marc Zyngier <maz@kernel.org>; Philipp Zabel <p.zabel@pengutronix.de>;
Peter
> Rosin <peda@axentia.se>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Subject: [PATCH v2] extcon: max8997: select IRQ_DOMAIN instead of
depending
> on it
> 
> IRQ_DOMAIN 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.
> Relying on it being set for a dependency is risky.
> 
> Consistently using "select" or "depends on" can also help reduce Kconfig
> circular dependency issues.
> 
> Therefore, change EXTCON_MAX8997's use of "depends on" for IRQ_DOMAIN to
> "select".
> 
> Fixes: dca1a71e4108 ("extcon: Add support irq domain for MAX8997 muic")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Peter Rosin <peda@axentia.se>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> v2: drop Cc: Donggeun Kim <dg77.kim@samsung.com> (bounced)
> 
>  drivers/extcon/Kconfig |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff -- a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig
> --- a/drivers/extcon/Kconfig
> +++ b/drivers/extcon/Kconfig
> @@ -116,7 +116,8 @@ config EXTCON_MAX77843
> 
>  config EXTCON_MAX8997
>  	tristate "Maxim MAX8997 EXTCON Support"
> -	depends on MFD_MAX8997 && IRQ_DOMAIN
> +	depends on MFD_MAX8997
> +	select IRQ_DOMAIN
>  	help
>  	  If you say yes here you get support for the MUIC device of
>  	  Maxim MAX8997 PMIC. The MAX8997 MUIC is a USB port accessory

Applied it. Thanks.

Best Regards,
Chanwoo Choi


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-22  5:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20240213060611epcas1p47134bfa5d8781c5cc1a493757a118752@epcas1p4.samsung.com>
2024-02-13  6:00 ` [PATCH v2] extcon: max8997: select IRQ_DOMAIN instead of depending on it Randy Dunlap
2024-02-13  8:26   ` Arnd Bergmann
2024-02-22  5:56   ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox