* [PATCH v2 2/2] power: supply: cpcap-battery: kconfig: depend on ( NVMEM || !NVMEM )
@ 2021-04-23 12:57 Carl Philipp Klemm
2021-06-04 12:55 ` Sebastian Reichel
0 siblings, 1 reply; 4+ messages in thread
From: Carl Philipp Klemm @ 2021-04-23 12:57 UTC (permalink / raw)
To: Sebastian Reichel
Cc: linux-omap, Arthur Demchenkov, Tony Lindgren, Merlijn Wajer,
Pavel Machek
Signed-off-by: Carl Philipp Klemm <philipp@uvos.xyz>
---
drivers/power/supply/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index 006b95eca673..0775a8cda265 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -110,7 +110,7 @@ config BATTERY_ACT8945A
config BATTERY_CPCAP
tristate "Motorola CPCAP PMIC battery driver"
- depends on MFD_CPCAP && IIO
+ depends on ( MFD_CPCAP && IIO ) && ( NVMEM || !NVMEM )
default MFD_CPCAP
help
Say Y here to enable support for battery on Motorola
--
2.31.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] power: supply: cpcap-battery: kconfig: depend on ( NVMEM || !NVMEM )
2021-04-23 12:57 [PATCH v2 2/2] power: supply: cpcap-battery: kconfig: depend on ( NVMEM || !NVMEM ) Carl Philipp Klemm
@ 2021-06-04 12:55 ` Sebastian Reichel
2021-06-07 11:01 ` Carl Philipp Klemm
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Reichel @ 2021-06-04 12:55 UTC (permalink / raw)
To: Carl Philipp Klemm
Cc: linux-omap, Arthur Demchenkov, Tony Lindgren, Merlijn Wajer,
Pavel Machek
[-- Attachment #1: Type: text/plain, Size: 891 bytes --]
Hi,
On Fri, Apr 23, 2021 at 02:57:02PM +0200, Carl Philipp Klemm wrote:
> Signed-off-by: Carl Philipp Klemm <philipp@uvos.xyz>
> ---
This is missing a long patch description, but needs to be squashed
into PATCH 1/2 anyways.
Thanks,
-- Sebastian
> drivers/power/supply/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
> index 006b95eca673..0775a8cda265 100644
> --- a/drivers/power/supply/Kconfig
> +++ b/drivers/power/supply/Kconfig
> @@ -110,7 +110,7 @@ config BATTERY_ACT8945A
>
> config BATTERY_CPCAP
> tristate "Motorola CPCAP PMIC battery driver"
> - depends on MFD_CPCAP && IIO
> + depends on ( MFD_CPCAP && IIO ) && ( NVMEM || !NVMEM )
> default MFD_CPCAP
> help
> Say Y here to enable support for battery on Motorola
> --
> 2.31.0
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] power: supply: cpcap-battery: kconfig: depend on ( NVMEM || !NVMEM )
2021-06-04 12:55 ` Sebastian Reichel
@ 2021-06-07 11:01 ` Carl Philipp Klemm
2021-06-07 11:27 ` Sebastian Reichel
0 siblings, 1 reply; 4+ messages in thread
From: Carl Philipp Klemm @ 2021-06-07 11:01 UTC (permalink / raw)
To: Sebastian Reichel
Cc: linux-omap, Arthur Demchenkov, Tony Lindgren, Merlijn Wajer,
Pavel Machek
> This is missing a long patch description, but needs to be squashed
> into PATCH 1/2 anyways.
>
> Thanks,
>
> -- Sebastian
Im thinking I would rather just drop this entirely, since at least I
and one other user use cpcap-battery with a 3rd party battery with no
nvmem, and Tony and Merlijn use it with a lab power supply.
In these cases requireing NVMEM makes no sense and the code in
"power: supply: cpcap-battery: Add battery type auto detection
for mapphone devices" works fine without.
--
Carl Philipp Klemm <philipp@uvos.xyz> <carl@uvos.xyz>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] power: supply: cpcap-battery: kconfig: depend on ( NVMEM || !NVMEM )
2021-06-07 11:01 ` Carl Philipp Klemm
@ 2021-06-07 11:27 ` Sebastian Reichel
0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Reichel @ 2021-06-07 11:27 UTC (permalink / raw)
To: Carl Philipp Klemm
Cc: linux-omap, Arthur Demchenkov, Tony Lindgren, Merlijn Wajer,
Pavel Machek
[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]
Hi,
On Mon, Jun 07, 2021 at 01:01:37PM +0200, Carl Philipp Klemm wrote:
> > This is missing a long patch description, but needs to be squashed
> > into PATCH 1/2 anyways.
> >
> > Thanks,
> >
> > -- Sebastian
>
> Im thinking I would rather just drop this entirely, since at least I
> and one other user use cpcap-battery with a 3rd party battery with no
> nvmem, and Tony and Merlijn use it with a lab power supply.
>
> In these cases requireing NVMEM makes no sense and the code in
> "power: supply: cpcap-battery: Add battery type auto detection
> for mapphone devices" works fine without.
"depends (NVMEM || !NVMEM)" does not add a NVMEM dependency. It just
disallows the configuration of built-in cpcap-battery and modular NVMEM,
which does not work:
NVMEM=y CPCAP_BATTERY=y => valid
NVMEM=y CPCAP_BATTERY=m => valid
NVMEM=y CPCAP_BATTERY=n => valid
NVMEM=n CPCAP_BATTERY=y => valid
NVMEM=n CPCAP_BATTERY=m => valid
NVMEM=n CPCAP_BATTERY=n => valid
NVMEM=m CPCAP_BATTERY=y => invalid
NVMEM=m CPCAP_BATTERY=m => valid
NVMEM=m CPCAP_BATTERY=n => valid
But checking the NVMEM config option it's bool instead of tristate
and cannot be modular anyways. Thus its fine to drop this, since
it's useless.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-07 11:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 12:57 [PATCH v2 2/2] power: supply: cpcap-battery: kconfig: depend on ( NVMEM || !NVMEM ) Carl Philipp Klemm
2021-06-04 12:55 ` Sebastian Reichel
2021-06-07 11:01 ` Carl Philipp Klemm
2021-06-07 11:27 ` Sebastian Reichel
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.