lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAfSe-uC+G8iEk_37vBr3+dQsv4a4tTTsz11hUguVRnU=r+4qQ@mail.gmail.com>
Date: Fri, 1 Nov 2024 09:53:18 +0800
From: Chunyan Zhang <zhang.lyra@...il.com>
To: Stanislav Jakubek <stano.jakubek@...il.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, 
	Conor Dooley <conor+dt@...nel.org>, Orson Zhai <orsonzhai@...il.com>, 
	Baolin Wang <baolin.wang@...ux.alibaba.com>, devicetree@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] arm64: dts: sprd: sc2731: fix bat-detect-gpios property

On Thu, 31 Oct 2024 at 15:30, Stanislav Jakubek <stano.jakubek@...il.com> wrote:
>
> On Thu, Aug 15, 2024 at 12:13:18PM +0200, Stanislav Jakubek wrote:
> > According to DT bindings, the property is called bat-detect-gpios, not
> > bat-detect-gpio. Update the property as such.
> >
> > Signed-off-by: Stanislav Jakubek <stano.jakubek@...il.com>
> > ---
> >  arch/arm64/boot/dts/sprd/sc2731.dtsi | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi
> > index 12136e68dada..c8b30c0479fd 100644
> > --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi
> > +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi
> > @@ -97,7 +97,7 @@ pmic_adc: adc@480 {
> >               fuel-gauge@a00 {
> >                       compatible = "sprd,sc2731-fgu";
> >                       reg = <0xa00>;
> > -                     bat-detect-gpio = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
> > +                     bat-detect-gpios = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
> >                       io-channels = <&pmic_adc 3>, <&pmic_adc 6>;
> >                       io-channel-names = "bat-temp", "charge-vol";
> >                       monitored-battery = <&bat>;
> > --
> > 2.34.1
> >
>
> Hi all,
>
> looking at this patch again, it seems there's some confusion going on.
> The bindings specify the property as "battery-detect-gpios", but the driver
> checks for "bat-detect" [1]. I assume the DTS was added with "bat-detect"
> to make it work, even though it's not conformant to bindings.
> It has been this way since the bindings/driver/DTS were introduced
> back in 2018/2019.
>
> What would be the correct way to fix this? Change the bindings to
> "bat-detect-gpios" or change the driver/DTS to "battery-detect-gpios"?

I would prefer the second, i.e. change to "battery-detect-gpios" in
the driver and DTS.

Thanks,
Chunyan

>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/power/supply/sc27xx_fuel_gauge.c?h=v6.11#n1186
>
> Regards,
> Stanislav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ