linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: Make MFD_AS3722 depend on I2C=y
@ 2013-11-18 17:25 Michal Marek
  2013-11-18 17:52 ` Lee Jones
  2013-11-18 23:19 ` Stephen Warren
  0 siblings, 2 replies; 5+ messages in thread
From: Michal Marek @ 2013-11-18 17:25 UTC (permalink / raw)
  To: sameo, lee.jones; +Cc: ldewangan, linux-kernel

MFD_AS3722 can only be builtin, so it needs I2C builtin as well.
With I2C=m, we get:

drivers/mfd/as3722.c:372: undefined reference to `devm_regmap_init_i2c'
drivers/built-in.o: In function `as3722_i2c_driver_init':
drivers/mfd/as3722.c:444: undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `as3722_i2c_driver_exit':
drivers/mfd/as3722.c:444: undefined reference to `i2c_del_driver'

Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 drivers/mfd/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 62a60ca..dd67158 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -32,7 +32,7 @@ config MFD_AS3722
 	select MFD_CORE
 	select REGMAP_I2C
 	select REGMAP_IRQ
-	depends on I2C && OF
+	depends on I2C=y && OF
 	help
 	  The ams AS3722 is a compact system PMU suitable for mobile phones,
 	  tablets etc. It has 4 DC/DC step-down regulators, 3 DC/DC step-down
-- 
1.7.3.1


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

* Re: [PATCH] mfd: Make MFD_AS3722 depend on I2C=y
  2013-11-18 17:25 [PATCH] mfd: Make MFD_AS3722 depend on I2C=y Michal Marek
@ 2013-11-18 17:52 ` Lee Jones
  2013-11-18 23:19 ` Stephen Warren
  1 sibling, 0 replies; 5+ messages in thread
From: Lee Jones @ 2013-11-18 17:52 UTC (permalink / raw)
  To: Michal Marek; +Cc: sameo, ldewangan, linux-kernel

On Mon, 18 Nov 2013, Michal Marek wrote:

> MFD_AS3722 can only be builtin, so it needs I2C builtin as well.
> With I2C=m, we get:
> 
> drivers/mfd/as3722.c:372: undefined reference to `devm_regmap_init_i2c'
> drivers/built-in.o: In function `as3722_i2c_driver_init':
> drivers/mfd/as3722.c:444: undefined reference to `i2c_register_driver'
> drivers/built-in.o: In function `as3722_i2c_driver_exit':
> drivers/mfd/as3722.c:444: undefined reference to `i2c_del_driver'
> 
> Signed-off-by: Michal Marek <mmarek@suse.cz>
> ---
>  drivers/mfd/Kconfig |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Looks fine. Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: Make MFD_AS3722 depend on I2C=y
  2013-11-18 17:25 [PATCH] mfd: Make MFD_AS3722 depend on I2C=y Michal Marek
  2013-11-18 17:52 ` Lee Jones
@ 2013-11-18 23:19 ` Stephen Warren
  2013-11-19  7:48   ` Michal Marek
  2013-11-19  8:20   ` Geert Uytterhoeven
  1 sibling, 2 replies; 5+ messages in thread
From: Stephen Warren @ 2013-11-18 23:19 UTC (permalink / raw)
  To: Michal Marek, sameo, lee.jones; +Cc: ldewangan, linux-kernel

On 11/18/2013 10:25 AM, Michal Marek wrote:
> MFD_AS3722 can only be builtin, so it needs I2C builtin as well.
> With I2C=m, we get:
> 
> drivers/mfd/as3722.c:372: undefined reference to `devm_regmap_init_i2c'
> drivers/built-in.o: In function `as3722_i2c_driver_init':
> drivers/mfd/as3722.c:444: undefined reference to `i2c_register_driver'
> drivers/built-in.o: In function `as3722_i2c_driver_exit':
> drivers/mfd/as3722.c:444: undefined reference to `i2c_del_driver'

Shouldn't Kconfig handle this; if a Boolean config option depends on a
tri-state config option, shouldn't it automatically validate that the
tri-state is "y" not "m"?

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

* Re: [PATCH] mfd: Make MFD_AS3722 depend on I2C=y
  2013-11-18 23:19 ` Stephen Warren
@ 2013-11-19  7:48   ` Michal Marek
  2013-11-19  8:20   ` Geert Uytterhoeven
  1 sibling, 0 replies; 5+ messages in thread
From: Michal Marek @ 2013-11-19  7:48 UTC (permalink / raw)
  To: Stephen Warren; +Cc: sameo, lee.jones, ldewangan, linux-kernel

On 19.11.2013 00:19, Stephen Warren wrote:
> On 11/18/2013 10:25 AM, Michal Marek wrote:
>> MFD_AS3722 can only be builtin, so it needs I2C builtin as well.
>> With I2C=m, we get:
>>
>> drivers/mfd/as3722.c:372: undefined reference to `devm_regmap_init_i2c'
>> drivers/built-in.o: In function `as3722_i2c_driver_init':
>> drivers/mfd/as3722.c:444: undefined reference to `i2c_register_driver'
>> drivers/built-in.o: In function `as3722_i2c_driver_exit':
>> drivers/mfd/as3722.c:444: undefined reference to `i2c_del_driver'
> 
> Shouldn't Kconfig handle this; if a Boolean config option depends on a
> tri-state config option, shouldn't it automatically validate that the
> tri-state is "y" not "m"?

That's what I initially though as well. But then you have cases where
intuitively you prefer the current m -> y promotion:

config EXT3_FS
	tristate "Ext3 journalling file system support"

config EXT3_DEFAULTS_TO_ORDERED
	bool "Default to 'data=ordered' in ext3"
	depends on EXT3_FS
	default y

Ternary logic is fun only as long as it is not mixed with boolean :-(.

Michal

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

* Re: [PATCH] mfd: Make MFD_AS3722 depend on I2C=y
  2013-11-18 23:19 ` Stephen Warren
  2013-11-19  7:48   ` Michal Marek
@ 2013-11-19  8:20   ` Geert Uytterhoeven
  1 sibling, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2013-11-19  8:20 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Michal Marek, Samuel Ortiz, Lee Jones, ldewangan, linux-kernel,
	linux-kbuild

On Tue, Nov 19, 2013 at 12:19 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 11/18/2013 10:25 AM, Michal Marek wrote:
>> MFD_AS3722 can only be builtin, so it needs I2C builtin as well.
>> With I2C=m, we get:
>>
>> drivers/mfd/as3722.c:372: undefined reference to `devm_regmap_init_i2c'
>> drivers/built-in.o: In function `as3722_i2c_driver_init':
>> drivers/mfd/as3722.c:444: undefined reference to `i2c_register_driver'
>> drivers/built-in.o: In function `as3722_i2c_driver_exit':
>> drivers/mfd/as3722.c:444: undefined reference to `i2c_del_driver'
>
> Shouldn't Kconfig handle this; if a Boolean config option depends on a
> tri-state config option, shouldn't it automatically validate that the
> tri-state is "y" not "m"?

Unfortunately not. While tristate is always used to declare code modules,
bool can be used to declare two different things: code modules or optional
features.

For optional features, "depends on x" means "depends on x=y or x=m".
For code modules, "depends on x" should really by "depends on x=y".

To handle this automatically, we need to introduce a new Kconfig symbol,
and convert all the thousands existing ones...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2013-11-19  8:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-18 17:25 [PATCH] mfd: Make MFD_AS3722 depend on I2C=y Michal Marek
2013-11-18 17:52 ` Lee Jones
2013-11-18 23:19 ` Stephen Warren
2013-11-19  7:48   ` Michal Marek
2013-11-19  8:20   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).