[Letux-kernel] [PATCH 1/3] arm: boot: dts: pyra: remove generic adc battery node

H. Nikolaus Schaller hns at goldelico.com
Thu Aug 6 18:32:25 CEST 2020


Hi,
yes, the ADC driver is inaccurate. It should be fixed and not disabled in DTS.
To disable a broken driver, there is a better method which is IMHO already added to the latest Pyra kernels. It is

echo blacklist generic-adc-battery >>/etc/modprobe.d/gab.conf

or similar.

Having different DTS is IMHO not the right strategy.

BR and thanks,
Nikolaus

> Am 06.08.2020 um 18:09 schrieb Nick Elsmore <nicholaselsmore at gmail.com>:
> 
> ADC battery driver provides extra inaccurate battery information which confuses userspace tools.  We should just get this information from the bq27xx/bq24xx combo.
> 
> Signed-off-by: Nick Elsmore <nicholaselsmore at gmail.com <mailto:nicholaselsmore at gmail.com>>
> ---
>  arch/arm/boot/dts/pyra-mainboard-common.dtsi | 24 --------------------
>  1 file changed, 24 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/pyra-mainboard-common.dtsi b/arch/arm/boot/dts/pyra-mainboard-common.dtsi
> index 67aca9b084de..b06fb6c12143 100644
> --- a/arch/arm/boot/dts/pyra-mainboard-common.dtsi
> +++ b/arch/arm/boot/dts/pyra-mainboard-common.dtsi
> @@ -815,27 +815,3 @@ &wlcore {
>  	compatible = "ti,wl1837";
>  };
>  
> -
> -/* was #include <dt-bindings/power/power.h> */
> -
> -#define POWER_SUPPLY_TECHNOLOGY_NiMH 1
> -#define POWER_SUPPLY_TECHNOLOGY_LION 2
> -#define POWER_SUPPLY_TECHNOLOGY_LIPO 3
> -#define POWER_SUPPLY_TECHNOLOGY_LiFe 4
> -#define POWER_SUPPLY_TECHNOLOGY_NiCd 5
> -#define POWER_SUPPLY_TECHNOLOGY_LiMn 6
> -
> -/ {
> -	battery: battery-monitor {
> -	compatible = "linux,generic-adc-battery";
> -	io-channels = <&gpadc 6>, <&gpadc 11>, <&gpadc 1>;
> -	io-channel-names = "voltage", "current", "temperature";
> -	monitored-battery = <&bat>;
> -	technology = <POWER_SUPPLY_TECHNOLOGY_LION>;
> -	battery-name = "pyra-battery";
> -	charge_full_design = <6000000>;
> -	charge_empty_design = <00>;
> -	voltage_min_design = <3200000>;
> -	voltage_max_design = <4200000>;
> -	};
> -};
> -- 
> 2.25.1
> _______________________________________________
> https://projects.goldelico.com/p/gta04-kernel/
> Letux-kernel mailing list
> Letux-kernel at openphoenux.org
> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20200806/8ed9752c/attachment.htm>


More information about the Letux-kernel mailing list