All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
@ 2015-11-09 13:50 ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-09 13:50 UTC (permalink / raw)
  To: Sebastian Reichel, linux-pm
  Cc: Pali Rohar, Andrew F. Davis, Xiong Zhou, linux-i2c,
	Dmitry Eremin-Solenikov, David Woodhouse, linux-kernel,
	linux-arm-kernel

The dependency was clearly needed, without it it is possible to
build the core i2c driver as a loadable module and the bq27xxx
driver built-in, which results in link errors:

drivers/built-in.o: In function `bq27xxx_battery_i2c_read':
binder.c:(.text+0x360bf0): undefined reference to `i2c_transfer'
binder.c:(.text+0x360c10): undefined reference to `i2c_transfer'
drivers/built-in.o: In function `bq27xxx_battery_init':
binder.c:(.init.text+0xe668): undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `bq27xxx_battery_exit':
binder.c:(.exit.text+0x1a0c): undefined reference to `i2c_del_driver'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 6bd03ce3c12a ("power: bq27xxx_battery: Remove unneeded dependency in Kconfig")
---
The bug was originally found and fixed by Xiong Zhou, but Andrew Davis
broke it again by reverting the fix.

I found it today on my ARM randconfig builds.

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 237d7aa73e8c..9f53fb74ae6f 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -159,6 +159,7 @@ config BATTERY_SBS
 
 config BATTERY_BQ27XXX
 	tristate "BQ27xxx battery driver"
+	depends on I2C || I2C=n
 	help
 	  Say Y here to enable support for batteries with BQ27xxx (I2C/HDQ) chips.
 


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

* [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
@ 2015-11-09 13:50 ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-09 13:50 UTC (permalink / raw)
  To: Sebastian Reichel, linux-pm
  Cc: Xiong Zhou, Dmitry Eremin-Solenikov, linux-kernel,
	Andrew F. Davis, linux-i2c, Pali Rohar, David Woodhouse,
	linux-arm-kernel

The dependency was clearly needed, without it it is possible to
build the core i2c driver as a loadable module and the bq27xxx
driver built-in, which results in link errors:

drivers/built-in.o: In function `bq27xxx_battery_i2c_read':
binder.c:(.text+0x360bf0): undefined reference to `i2c_transfer'
binder.c:(.text+0x360c10): undefined reference to `i2c_transfer'
drivers/built-in.o: In function `bq27xxx_battery_init':
binder.c:(.init.text+0xe668): undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `bq27xxx_battery_exit':
binder.c:(.exit.text+0x1a0c): undefined reference to `i2c_del_driver'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 6bd03ce3c12a ("power: bq27xxx_battery: Remove unneeded dependency in Kconfig")
---
The bug was originally found and fixed by Xiong Zhou, but Andrew Davis
broke it again by reverting the fix.

I found it today on my ARM randconfig builds.

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 237d7aa73e8c..9f53fb74ae6f 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -159,6 +159,7 @@ config BATTERY_SBS
 
 config BATTERY_BQ27XXX
 	tristate "BQ27xxx battery driver"
+	depends on I2C || I2C=n
 	help
 	  Say Y here to enable support for batteries with BQ27xxx (I2C/HDQ) chips.

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

* [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
@ 2015-11-09 13:50 ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-09 13:50 UTC (permalink / raw)
  To: linux-arm-kernel

The dependency was clearly needed, without it it is possible to
build the core i2c driver as a loadable module and the bq27xxx
driver built-in, which results in link errors:

drivers/built-in.o: In function `bq27xxx_battery_i2c_read':
binder.c:(.text+0x360bf0): undefined reference to `i2c_transfer'
binder.c:(.text+0x360c10): undefined reference to `i2c_transfer'
drivers/built-in.o: In function `bq27xxx_battery_init':
binder.c:(.init.text+0xe668): undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `bq27xxx_battery_exit':
binder.c:(.exit.text+0x1a0c): undefined reference to `i2c_del_driver'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 6bd03ce3c12a ("power: bq27xxx_battery: Remove unneeded dependency in Kconfig")
---
The bug was originally found and fixed by Xiong Zhou, but Andrew Davis
broke it again by reverting the fix.

I found it today on my ARM randconfig builds.

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 237d7aa73e8c..9f53fb74ae6f 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -159,6 +159,7 @@ config BATTERY_SBS
 
 config BATTERY_BQ27XXX
 	tristate "BQ27xxx battery driver"
+	depends on I2C || I2C=n
 	help
 	  Say Y here to enable support for batteries with BQ27xxx (I2C/HDQ) chips.
 

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

* Re: [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
  2015-11-09 13:50 ` Arnd Bergmann
  (?)
@ 2015-11-09 16:56   ` Andrew F. Davis
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2015-11-09 16:56 UTC (permalink / raw)
  To: Arnd Bergmann, Sebastian Reichel, linux-pm
  Cc: Pali Rohar, Xiong Zhou, linux-i2c, Dmitry Eremin-Solenikov,
	David Woodhouse, linux-kernel, linux-arm-kernel

On 11/09/2015 07:50 AM, Arnd Bergmann wrote:
> The dependency was clearly needed, without it it is possible to
> build the core i2c driver as a loadable module and the bq27xxx
> driver built-in, which results in link errors:
>
> drivers/built-in.o: In function `bq27xxx_battery_i2c_read':
> binder.c:(.text+0x360bf0): undefined reference to `i2c_transfer'
> binder.c:(.text+0x360c10): undefined reference to `i2c_transfer'
> drivers/built-in.o: In function `bq27xxx_battery_init':
> binder.c:(.init.text+0xe668): undefined reference to `i2c_register_driver'
> drivers/built-in.o: In function `bq27xxx_battery_exit':
> binder.c:(.exit.text+0x1a0c): undefined reference to `i2c_del_driver'
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 6bd03ce3c12a ("power: bq27xxx_battery: Remove unneeded dependency in Kconfig")
> ---
> The bug was originally found and fixed by Xiong Zhou, but Andrew Davis
> broke it again by reverting the fix.
>
> I found it today on my ARM randconfig builds.
>
> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
> index 237d7aa73e8c..9f53fb74ae6f 100644
> --- a/drivers/power/Kconfig
> +++ b/drivers/power/Kconfig
> @@ -159,6 +159,7 @@ config BATTERY_SBS
>
>   config BATTERY_BQ27XXX
>   	tristate "BQ27xxx battery driver"
> +	depends on I2C || I2C=n
>   	help
>   	  Say Y here to enable support for batteries with BQ27xxx (I2C/HDQ) chips.
>
>

Nothing enabled by BATTERY_BQ27XXX depends on I2C, this workaround is not
correct as it prevents BATTERY_BQ27XXX from being built-in when I2C is a
module, there is no reason for this limitation.

The undefined references are caused by BATTERY_BQ27XXX being built-in AND
its I2C functionality being enabled (BATTERY_BQ27XXX_I2C) while I2C is a
module. Reorganizing this driver is being discussed anyway, but in the
meantime a more correct fix would be along the lines of:

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 6de6ec2..d1d32f9 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -167,6 +167,7 @@ config BATTERY_BQ27XXX_I2C
         bool "BQ27xxx I2C support"
         depends on BATTERY_BQ27XXX
         depends on I2C
+       depends on !(I2C=m && BATTERY_BQ27XXX=y)
         default y
         help
           Say Y here to enable support for batteries with BQ27xxx (I2C) chips.

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

* Re: [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
@ 2015-11-09 16:56   ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2015-11-09 16:56 UTC (permalink / raw)
  To: Arnd Bergmann, Sebastian Reichel, linux-pm
  Cc: Pali Rohar, Xiong Zhou, linux-i2c, Dmitry Eremin-Solenikov,
	David Woodhouse, linux-kernel, linux-arm-kernel

On 11/09/2015 07:50 AM, Arnd Bergmann wrote:
> The dependency was clearly needed, without it it is possible to
> build the core i2c driver as a loadable module and the bq27xxx
> driver built-in, which results in link errors:
>
> drivers/built-in.o: In function `bq27xxx_battery_i2c_read':
> binder.c:(.text+0x360bf0): undefined reference to `i2c_transfer'
> binder.c:(.text+0x360c10): undefined reference to `i2c_transfer'
> drivers/built-in.o: In function `bq27xxx_battery_init':
> binder.c:(.init.text+0xe668): undefined reference to `i2c_register_driver'
> drivers/built-in.o: In function `bq27xxx_battery_exit':
> binder.c:(.exit.text+0x1a0c): undefined reference to `i2c_del_driver'
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 6bd03ce3c12a ("power: bq27xxx_battery: Remove unneeded dependency in Kconfig")
> ---
> The bug was originally found and fixed by Xiong Zhou, but Andrew Davis
> broke it again by reverting the fix.
>
> I found it today on my ARM randconfig builds.
>
> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
> index 237d7aa73e8c..9f53fb74ae6f 100644
> --- a/drivers/power/Kconfig
> +++ b/drivers/power/Kconfig
> @@ -159,6 +159,7 @@ config BATTERY_SBS
>
>   config BATTERY_BQ27XXX
>   	tristate "BQ27xxx battery driver"
> +	depends on I2C || I2C=n
>   	help
>   	  Say Y here to enable support for batteries with BQ27xxx (I2C/HDQ) chips.
>
>

Nothing enabled by BATTERY_BQ27XXX depends on I2C, this workaround is not
correct as it prevents BATTERY_BQ27XXX from being built-in when I2C is a
module, there is no reason for this limitation.

The undefined references are caused by BATTERY_BQ27XXX being built-in AND
its I2C functionality being enabled (BATTERY_BQ27XXX_I2C) while I2C is a
module. Reorganizing this driver is being discussed anyway, but in the
meantime a more correct fix would be along the lines of:

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 6de6ec2..d1d32f9 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -167,6 +167,7 @@ config BATTERY_BQ27XXX_I2C
         bool "BQ27xxx I2C support"
         depends on BATTERY_BQ27XXX
         depends on I2C
+       depends on !(I2C=m && BATTERY_BQ27XXX=y)
         default y
         help
           Say Y here to enable support for batteries with BQ27xxx (I2C) chips.

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

* [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
@ 2015-11-09 16:56   ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2015-11-09 16:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/09/2015 07:50 AM, Arnd Bergmann wrote:
> The dependency was clearly needed, without it it is possible to
> build the core i2c driver as a loadable module and the bq27xxx
> driver built-in, which results in link errors:
>
> drivers/built-in.o: In function `bq27xxx_battery_i2c_read':
> binder.c:(.text+0x360bf0): undefined reference to `i2c_transfer'
> binder.c:(.text+0x360c10): undefined reference to `i2c_transfer'
> drivers/built-in.o: In function `bq27xxx_battery_init':
> binder.c:(.init.text+0xe668): undefined reference to `i2c_register_driver'
> drivers/built-in.o: In function `bq27xxx_battery_exit':
> binder.c:(.exit.text+0x1a0c): undefined reference to `i2c_del_driver'
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 6bd03ce3c12a ("power: bq27xxx_battery: Remove unneeded dependency in Kconfig")
> ---
> The bug was originally found and fixed by Xiong Zhou, but Andrew Davis
> broke it again by reverting the fix.
>
> I found it today on my ARM randconfig builds.
>
> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
> index 237d7aa73e8c..9f53fb74ae6f 100644
> --- a/drivers/power/Kconfig
> +++ b/drivers/power/Kconfig
> @@ -159,6 +159,7 @@ config BATTERY_SBS
>
>   config BATTERY_BQ27XXX
>   	tristate "BQ27xxx battery driver"
> +	depends on I2C || I2C=n
>   	help
>   	  Say Y here to enable support for batteries with BQ27xxx (I2C/HDQ) chips.
>
>

Nothing enabled by BATTERY_BQ27XXX depends on I2C, this workaround is not
correct as it prevents BATTERY_BQ27XXX from being built-in when I2C is a
module, there is no reason for this limitation.

The undefined references are caused by BATTERY_BQ27XXX being built-in AND
its I2C functionality being enabled (BATTERY_BQ27XXX_I2C) while I2C is a
module. Reorganizing this driver is being discussed anyway, but in the
meantime a more correct fix would be along the lines of:

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 6de6ec2..d1d32f9 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -167,6 +167,7 @@ config BATTERY_BQ27XXX_I2C
         bool "BQ27xxx I2C support"
         depends on BATTERY_BQ27XXX
         depends on I2C
+       depends on !(I2C=m && BATTERY_BQ27XXX=y)
         default y
         help
           Say Y here to enable support for batteries with BQ27xxx (I2C) chips.

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

* Re: [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
  2015-11-09 16:56   ` Andrew F. Davis
  (?)
@ 2015-11-09 20:51     ` Arnd Bergmann
  -1 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-09 20:51 UTC (permalink / raw)
  To: Andrew F. Davis
  Cc: Sebastian Reichel, linux-pm, Pali Rohar, Xiong Zhou, linux-i2c,
	Dmitry Eremin-Solenikov, David Woodhouse, linux-kernel,
	linux-arm-kernel

On Monday 09 November 2015 10:56:13 Andrew F. Davis wrote:
> On 11/09/2015 07:50 AM, Arnd Bergmann wrote:
> Nothing enabled by BATTERY_BQ27XXX depends on I2C, this workaround is not
> correct as it prevents BATTERY_BQ27XXX from being built-in when I2C is a
> module, there is no reason for this limitation.
> 
> The undefined references are caused by BATTERY_BQ27XXX being built-in AND
> its I2C functionality being enabled (BATTERY_BQ27XXX_I2C) while I2C is a
> module. Reorganizing this driver is being discussed anyway, but in the
> meantime a more correct fix would be along the lines of:
> 
> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
> index 6de6ec2..d1d32f9 100644
> --- a/drivers/power/Kconfig
> +++ b/drivers/power/Kconfig
> @@ -167,6 +167,7 @@ config BATTERY_BQ27XXX_I2C
>          bool "BQ27xxx I2C support"
>          depends on BATTERY_BQ27XXX
>          depends on I2C
> +       depends on !(I2C=m && BATTERY_BQ27XXX=y)
>          default y
>          help
>            Say Y here to enable support for batteries with BQ27xxx (I2C) chips.

That works too, there is just very little difference in the end here,
and it's easier to revert an patch that only introduces a regression
than to do a different hack, especially if it's going to be reworked
soon anyway.

Do you want to submit the above as a fixup to your other patch or
should we just do the revert? It would be good to get one of the two
into -rc1.

	Arnd

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

* Re: [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
@ 2015-11-09 20:51     ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-09 20:51 UTC (permalink / raw)
  To: Andrew F. Davis
  Cc: Xiong Zhou, linux-pm, Dmitry Eremin-Solenikov, Sebastian Reichel,
	linux-kernel, linux-i2c, Pali Rohar, David Woodhouse,
	linux-arm-kernel

On Monday 09 November 2015 10:56:13 Andrew F. Davis wrote:
> On 11/09/2015 07:50 AM, Arnd Bergmann wrote:
> Nothing enabled by BATTERY_BQ27XXX depends on I2C, this workaround is not
> correct as it prevents BATTERY_BQ27XXX from being built-in when I2C is a
> module, there is no reason for this limitation.
> 
> The undefined references are caused by BATTERY_BQ27XXX being built-in AND
> its I2C functionality being enabled (BATTERY_BQ27XXX_I2C) while I2C is a
> module. Reorganizing this driver is being discussed anyway, but in the
> meantime a more correct fix would be along the lines of:
> 
> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
> index 6de6ec2..d1d32f9 100644
> --- a/drivers/power/Kconfig
> +++ b/drivers/power/Kconfig
> @@ -167,6 +167,7 @@ config BATTERY_BQ27XXX_I2C
>          bool "BQ27xxx I2C support"
>          depends on BATTERY_BQ27XXX
>          depends on I2C
> +       depends on !(I2C=m && BATTERY_BQ27XXX=y)
>          default y
>          help
>            Say Y here to enable support for batteries with BQ27xxx (I2C) chips.

That works too, there is just very little difference in the end here,
and it's easier to revert an patch that only introduces a regression
than to do a different hack, especially if it's going to be reworked
soon anyway.

Do you want to submit the above as a fixup to your other patch or
should we just do the revert? It would be good to get one of the two
into -rc1.

	Arnd

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

* [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
@ 2015-11-09 20:51     ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-09 20:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 09 November 2015 10:56:13 Andrew F. Davis wrote:
> On 11/09/2015 07:50 AM, Arnd Bergmann wrote:
> Nothing enabled by BATTERY_BQ27XXX depends on I2C, this workaround is not
> correct as it prevents BATTERY_BQ27XXX from being built-in when I2C is a
> module, there is no reason for this limitation.
> 
> The undefined references are caused by BATTERY_BQ27XXX being built-in AND
> its I2C functionality being enabled (BATTERY_BQ27XXX_I2C) while I2C is a
> module. Reorganizing this driver is being discussed anyway, but in the
> meantime a more correct fix would be along the lines of:
> 
> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
> index 6de6ec2..d1d32f9 100644
> --- a/drivers/power/Kconfig
> +++ b/drivers/power/Kconfig
> @@ -167,6 +167,7 @@ config BATTERY_BQ27XXX_I2C
>          bool "BQ27xxx I2C support"
>          depends on BATTERY_BQ27XXX
>          depends on I2C
> +       depends on !(I2C=m && BATTERY_BQ27XXX=y)
>          default y
>          help
>            Say Y here to enable support for batteries with BQ27xxx (I2C) chips.

That works too, there is just very little difference in the end here,
and it's easier to revert an patch that only introduces a regression
than to do a different hack, especially if it's going to be reworked
soon anyway.

Do you want to submit the above as a fixup to your other patch or
should we just do the revert? It would be good to get one of the two
into -rc1.

	Arnd

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

* Re: [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
  2015-11-09 20:51     ` Arnd Bergmann
  (?)
@ 2015-11-09 21:23       ` Andrew F. Davis
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2015-11-09 21:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Sebastian Reichel, linux-pm, Pali Rohar, Xiong Zhou, linux-i2c,
	Dmitry Eremin-Solenikov, David Woodhouse, linux-kernel,
	linux-arm-kernel

On 11/09/2015 02:51 PM, Arnd Bergmann wrote:
> On Monday 09 November 2015 10:56:13 Andrew F. Davis wrote:
>> On 11/09/2015 07:50 AM, Arnd Bergmann wrote:
>> Nothing enabled by BATTERY_BQ27XXX depends on I2C, this workaround is not
>> correct as it prevents BATTERY_BQ27XXX from being built-in when I2C is a
>> module, there is no reason for this limitation.
>>
>> The undefined references are caused by BATTERY_BQ27XXX being built-in AND
>> its I2C functionality being enabled (BATTERY_BQ27XXX_I2C) while I2C is a
>> module. Reorganizing this driver is being discussed anyway, but in the
>> meantime a more correct fix would be along the lines of:
>>
>> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
>> index 6de6ec2..d1d32f9 100644
>> --- a/drivers/power/Kconfig
>> +++ b/drivers/power/Kconfig
>> @@ -167,6 +167,7 @@ config BATTERY_BQ27XXX_I2C
>>           bool "BQ27xxx I2C support"
>>           depends on BATTERY_BQ27XXX
>>           depends on I2C
>> +       depends on !(I2C=m && BATTERY_BQ27XXX=y)
>>           default y
>>           help
>>             Say Y here to enable support for batteries with BQ27xxx (I2C) chips.
>
> That works too, there is just very little difference in the end here,
> and it's easier to revert an patch that only introduces a regression
> than to do a different hack, especially if it's going to be reworked
> soon anyway.
>
> Do you want to submit the above as a fixup to your other patch or
> should we just do the revert? It would be good to get one of the two
> into -rc1.
>

I can just submit this fix, it would probably be better for the short term
until the rework is done.

Andrew

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

* Re: [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
@ 2015-11-09 21:23       ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2015-11-09 21:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Sebastian Reichel, linux-pm, Pali Rohar, Xiong Zhou, linux-i2c,
	Dmitry Eremin-Solenikov, David Woodhouse, linux-kernel,
	linux-arm-kernel

On 11/09/2015 02:51 PM, Arnd Bergmann wrote:
> On Monday 09 November 2015 10:56:13 Andrew F. Davis wrote:
>> On 11/09/2015 07:50 AM, Arnd Bergmann wrote:
>> Nothing enabled by BATTERY_BQ27XXX depends on I2C, this workaround is not
>> correct as it prevents BATTERY_BQ27XXX from being built-in when I2C is a
>> module, there is no reason for this limitation.
>>
>> The undefined references are caused by BATTERY_BQ27XXX being built-in AND
>> its I2C functionality being enabled (BATTERY_BQ27XXX_I2C) while I2C is a
>> module. Reorganizing this driver is being discussed anyway, but in the
>> meantime a more correct fix would be along the lines of:
>>
>> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
>> index 6de6ec2..d1d32f9 100644
>> --- a/drivers/power/Kconfig
>> +++ b/drivers/power/Kconfig
>> @@ -167,6 +167,7 @@ config BATTERY_BQ27XXX_I2C
>>           bool "BQ27xxx I2C support"
>>           depends on BATTERY_BQ27XXX
>>           depends on I2C
>> +       depends on !(I2C=m && BATTERY_BQ27XXX=y)
>>           default y
>>           help
>>             Say Y here to enable support for batteries with BQ27xxx (I2C) chips.
>
> That works too, there is just very little difference in the end here,
> and it's easier to revert an patch that only introduces a regression
> than to do a different hack, especially if it's going to be reworked
> soon anyway.
>
> Do you want to submit the above as a fixup to your other patch or
> should we just do the revert? It would be good to get one of the two
> into -rc1.
>

I can just submit this fix, it would probably be better for the short term
until the rework is done.

Andrew

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

* [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
@ 2015-11-09 21:23       ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2015-11-09 21:23 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/09/2015 02:51 PM, Arnd Bergmann wrote:
> On Monday 09 November 2015 10:56:13 Andrew F. Davis wrote:
>> On 11/09/2015 07:50 AM, Arnd Bergmann wrote:
>> Nothing enabled by BATTERY_BQ27XXX depends on I2C, this workaround is not
>> correct as it prevents BATTERY_BQ27XXX from being built-in when I2C is a
>> module, there is no reason for this limitation.
>>
>> The undefined references are caused by BATTERY_BQ27XXX being built-in AND
>> its I2C functionality being enabled (BATTERY_BQ27XXX_I2C) while I2C is a
>> module. Reorganizing this driver is being discussed anyway, but in the
>> meantime a more correct fix would be along the lines of:
>>
>> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
>> index 6de6ec2..d1d32f9 100644
>> --- a/drivers/power/Kconfig
>> +++ b/drivers/power/Kconfig
>> @@ -167,6 +167,7 @@ config BATTERY_BQ27XXX_I2C
>>           bool "BQ27xxx I2C support"
>>           depends on BATTERY_BQ27XXX
>>           depends on I2C
>> +       depends on !(I2C=m && BATTERY_BQ27XXX=y)
>>           default y
>>           help
>>             Say Y here to enable support for batteries with BQ27xxx (I2C) chips.
>
> That works too, there is just very little difference in the end here,
> and it's easier to revert an patch that only introduces a regression
> than to do a different hack, especially if it's going to be reworked
> soon anyway.
>
> Do you want to submit the above as a fixup to your other patch or
> should we just do the revert? It would be good to get one of the two
> into -rc1.
>

I can just submit this fix, it would probably be better for the short term
until the rework is done.

Andrew

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

end of thread, other threads:[~2015-11-09 21:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 13:50 [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig" Arnd Bergmann
2015-11-09 13:50 ` Arnd Bergmann
2015-11-09 13:50 ` Arnd Bergmann
2015-11-09 16:56 ` Andrew F. Davis
2015-11-09 16:56   ` Andrew F. Davis
2015-11-09 16:56   ` Andrew F. Davis
2015-11-09 20:51   ` Arnd Bergmann
2015-11-09 20:51     ` Arnd Bergmann
2015-11-09 20:51     ` Arnd Bergmann
2015-11-09 21:23     ` Andrew F. Davis
2015-11-09 21:23       ` Andrew F. Davis
2015-11-09 21:23       ` Andrew F. Davis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.