diff mbox series

[1/2] dt-bindings: power: supply: gpio-charger: Add status-gpios property

Message ID 20190205190316.19296-1-contact@artur-rojek.eu
State Changes Requested, archived
Headers show
Series [1/2] dt-bindings: power: supply: gpio-charger: Add status-gpios property | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

Artur Rojek Feb. 5, 2019, 7:03 p.m. UTC
Add documentation for the "status-gpios" property.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
---
 .../devicetree/bindings/power/supply/gpio-charger.txt         | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Rob Herring Feb. 25, 2019, 9:53 p.m. UTC | #1
On Tue, Feb 05, 2019 at 08:03:15PM +0100, Artur Rojek wrote:
> Add documentation for the "status-gpios" property.
> 
> Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
> ---
>  .../devicetree/bindings/power/supply/gpio-charger.txt         | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.txt b/Documentation/devicetree/bindings/power/supply/gpio-charger.txt
> index adbb5dc5b6e9..b98a05a4973c 100644
> --- a/Documentation/devicetree/bindings/power/supply/gpio-charger.txt
> +++ b/Documentation/devicetree/bindings/power/supply/gpio-charger.txt
> @@ -14,12 +14,16 @@ Required properties :
>       usb-cdp (USB charging downstream port)
>       usb-aca (USB accessory charger adapter)
>  
> +Optional properties:
> + - status-gpios: GPIO indicating the charger status

So when it is asserted it has 'status'? What does status mean?

> +
>  Example:
>  
>  	usb_charger: charger {
>  		compatible = "gpio-charger";
>  		charger-type = "usb-sdp";
>  		gpios = <&gpf0 2 0 0 0>;
> +		status-gpios = <&gpf0 3 0 0 0>;

Humm, not sure what the thinking for 'gpios' was, but it's wrong and you 
just copied it. If we follow the normal cell encoding with 2 cells, this 
means the property takes 3 gpios (though the last 2 are marked not 
present with 0).

Rob
Artur Rojek Feb. 26, 2019, 2:40 p.m. UTC | #2
Hi Rob.

Thanks for the review.

On 2019-02-25 22:53, Rob Herring wrote:
> On Tue, Feb 05, 2019 at 08:03:15PM +0100, Artur Rojek wrote:
>> Add documentation for the "status-gpios" property.
>> 
>> Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
>> ---
>>  .../devicetree/bindings/power/supply/gpio-charger.txt         | 4 
>> ++++
>>  1 file changed, 4 insertions(+)
>> 
>> diff --git 
>> a/Documentation/devicetree/bindings/power/supply/gpio-charger.txt 
>> b/Documentation/devicetree/bindings/power/supply/gpio-charger.txt
>> index adbb5dc5b6e9..b98a05a4973c 100644
>> --- a/Documentation/devicetree/bindings/power/supply/gpio-charger.txt
>> +++ b/Documentation/devicetree/bindings/power/supply/gpio-charger.txt
>> @@ -14,12 +14,16 @@ Required properties :
>>       usb-cdp (USB charging downstream port)
>>       usb-aca (USB accessory charger adapter)
>> 
>> +Optional properties:
>> + - status-gpios: GPIO indicating the charger status
> 
> So when it is asserted it has 'status'? What does status mean?
It is a GPIO indicating whether a battery is charging.
I shall make the description more clear.
> 
>> +
>>  Example:
>> 
>>  	usb_charger: charger {
>>  		compatible = "gpio-charger";
>>  		charger-type = "usb-sdp";
>>  		gpios = <&gpf0 2 0 0 0>;
>> +		status-gpios = <&gpf0 3 0 0 0>;
> 
> Humm, not sure what the thinking for 'gpios' was, but it's wrong and 
> you
> just copied it. If we follow the normal cell encoding with 2 cells, 
> this
> means the property takes 3 gpios (though the last 2 are marked not
> present with 0).
I will replace both of those properties with a valid example.

Artur
> 
> Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.txt b/Documentation/devicetree/bindings/power/supply/gpio-charger.txt
index adbb5dc5b6e9..b98a05a4973c 100644
--- a/Documentation/devicetree/bindings/power/supply/gpio-charger.txt
+++ b/Documentation/devicetree/bindings/power/supply/gpio-charger.txt
@@ -14,12 +14,16 @@  Required properties :
      usb-cdp (USB charging downstream port)
      usb-aca (USB accessory charger adapter)
 
+Optional properties:
+ - status-gpios: GPIO indicating the charger status
+
 Example:
 
 	usb_charger: charger {
 		compatible = "gpio-charger";
 		charger-type = "usb-sdp";
 		gpios = <&gpf0 2 0 0 0>;
+		status-gpios = <&gpf0 3 0 0 0>;
 	}
 
 	battery {