Re: [PATCH v2 2/2] power: supply: cpcap-battery: kconfig: depend on ( NVMEM || !NVMEM )
From: Sebastian Reichel <hidden>
Date: 2021-06-07 11:27:54
Attachments
- signature.asc [application/pgp-signature] 833 bytes
From: Sebastian Reichel <hidden>
Date: 2021-06-07 11:27:54
Hi, On Mon, Jun 07, 2021 at 01:01:37PM +0200, Carl Philipp Klemm wrote:
quoted
This is missing a long patch description, but needs to be squashed into PATCH 1/2 anyways. Thanks, -- SebastianIm 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