All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Andrew F. Davis" <afd@ti.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	linux-pm@vger.kernel.org, Pali Rohar <pali.rohar@gmail.com>,
	Xiong Zhou <jencce.kernel@gmail.com>,
	linux-i2c@vger.kernel.org,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
Date: Mon, 09 Nov 2015 21:51:12 +0100	[thread overview]
Message-ID: <10870776.N30IekZOBt@wuerfel> (raw)
In-Reply-To: <5640D02D.6040601@ti.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: "Andrew F. Davis" <afd@ti.com>
Cc: Xiong Zhou <jencce.kernel@gmail.com>,
	linux-pm@vger.kernel.org,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	Sebastian Reichel <sre@kernel.org>,
	linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	Pali Rohar <pali.rohar@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
Date: Mon, 09 Nov 2015 21:51:12 +0100	[thread overview]
Message-ID: <10870776.N30IekZOBt@wuerfel> (raw)
In-Reply-To: <5640D02D.6040601@ti.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
Date: Mon, 09 Nov 2015 21:51:12 +0100	[thread overview]
Message-ID: <10870776.N30IekZOBt@wuerfel> (raw)
In-Reply-To: <5640D02D.6040601@ti.com>

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

  reply	other threads:[~2015-11-09 20:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10870776.N30IekZOBt@wuerfel \
    --to=arnd@arndb.de \
    --cc=afd@ti.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=jencce.kernel@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.