diff mbox series

[v2,1/3] dt-bindings: power: supply: sc27xx-fg: document deprecated bat-detect-gpio

Message ID f334c973dd4e6390a0cd51dbde358277a07604d7.1730720720.git.stano.jakubek@gmail.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series sc27xx-fuel-gauge: fix battery detect | expand

Commit Message

Stanislav Jakubek Nov. 4, 2024, 1:03 p.m. UTC
While the bindings have always used the correct 'battery-detect-gpios'
property, the DTS and the Linux driver have been using the incorrect
'bat-detect-gpio' property. Document this property and mark it
as deprecated.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
---
Changes in V2:
- new patch

 .../devicetree/bindings/power/supply/sc27xx-fg.yaml          | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Krzysztof Kozlowski Nov. 5, 2024, 9:03 a.m. UTC | #1
On Mon, Nov 04, 2024 at 02:03:58PM +0100, Stanislav Jakubek wrote:
> While the bindings have always used the correct 'battery-detect-gpios'
> property, the DTS and the Linux driver have been using the incorrect
> 'bat-detect-gpio' property. Document this property and mark it
> as deprecated.

Well, I would just correct bindings instead - much less changes needed.
Document 'bat-detect-gpios' (note the 's') and drop
'battery-detect-gpios'.

Best regards,
Krzysztof
Stanislav Jakubek Nov. 6, 2024, 7:19 a.m. UTC | #2
On Tue, Nov 05, 2024 at 10:03:16AM +0100, Krzysztof Kozlowski wrote:
> On Mon, Nov 04, 2024 at 02:03:58PM +0100, Stanislav Jakubek wrote:
> > While the bindings have always used the correct 'battery-detect-gpios'
> > property, the DTS and the Linux driver have been using the incorrect
> > 'bat-detect-gpio' property. Document this property and mark it
> > as deprecated.
> 
> Well, I would just correct bindings instead - much less changes needed.
> Document 'bat-detect-gpios' (note the 's') and drop
> 'battery-detect-gpios'.

Hi Krzysztof,

this approach was preferred by one of the Spreadtrum maintainers [1],
so I did it this way.

[1] https://lore.kernel.org/lkml/CAAfSe-uC+G8iEk_37vBr3+dQsv4a4tTTsz11hUguVRnU=r+4qQ@mail.gmail.com/

Regards,
Stanislav

> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski Nov. 6, 2024, 11:10 a.m. UTC | #3
On 06/11/2024 08:19, Stanislav Jakubek wrote:
> On Tue, Nov 05, 2024 at 10:03:16AM +0100, Krzysztof Kozlowski wrote:
>> On Mon, Nov 04, 2024 at 02:03:58PM +0100, Stanislav Jakubek wrote:
>>> While the bindings have always used the correct 'battery-detect-gpios'
>>> property, the DTS and the Linux driver have been using the incorrect
>>> 'bat-detect-gpio' property. Document this property and mark it
>>> as deprecated.
>>
>> Well, I would just correct bindings instead - much less changes needed.
>> Document 'bat-detect-gpios' (note the 's') and drop
>> 'battery-detect-gpios'.
> 
> Hi Krzysztof,
> 
> this approach was preferred by one of the Spreadtrum maintainers [1],
> so I did it this way.
> 
> [1] https://lore.kernel.org/lkml/CAAfSe-uC+G8iEk_37vBr3+dQsv4a4tTTsz11hUguVRnU=r+4qQ@mail.gmail.com/

Wow, really? But that advice affects users of DTS... OK, I don't want to
stop your fix for that, so let's get this done:

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

(But I am not happy so I don;t want above ack to be used against me in
the future :) )

Best regards,
Krzysztof
Chunyan Zhang Nov. 7, 2024, 2:50 a.m. UTC | #4
On Mon, 4 Nov 2024 at 21:04, Stanislav Jakubek <stano.jakubek@gmail.com> wrote:
>
> While the bindings have always used the correct 'battery-detect-gpios'
> property, the DTS and the Linux driver have been using the incorrect
> 'bat-detect-gpio' property. Document this property and mark it
> as deprecated.
>
> Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>

Reviewed-by: Chunyan Zhang <zhang.lyra@gmail.com>

Thanks,
Chunyan

> ---
> Changes in V2:
> - new patch
>
>  .../devicetree/bindings/power/supply/sc27xx-fg.yaml          | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml b/Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml
> index 9108a2841caf..b10f155afe68 100644
> --- a/Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml
> +++ b/Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml
> @@ -27,6 +27,11 @@ properties:
>    battery-detect-gpios:
>      maxItems: 1
>
> +  bat-detect-gpio:
> +    maxItems: 1
> +    deprecated: true
> +    description: use battery-detect-gpios instead
> +
>    interrupts:
>      maxItems: 1
>
> --
> 2.43.0
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml b/Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml
index 9108a2841caf..b10f155afe68 100644
--- a/Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml
+++ b/Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml
@@ -27,6 +27,11 @@  properties:
   battery-detect-gpios:
     maxItems: 1
 
+  bat-detect-gpio:
+    maxItems: 1
+    deprecated: true
+    description: use battery-detect-gpios instead
+
   interrupts:
     maxItems: 1