diff mbox series

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

Message ID 20190226150437.3704-1-contact@artur-rojek.eu
State Not Applicable, archived
Headers show
Series [v2,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. 26, 2019, 3:04 p.m. UTC
Add documentation for the "status-gpios" property.
Update the "gpios" property with a valid example.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
---

Changes:

v2: - add a better description for the "status-gpios" property,
    - add valid examples for the "gpios" and "status-gpios" properties

 .../devicetree/bindings/power/supply/gpio-charger.txt       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Rob Herring March 12, 2019, 3:50 p.m. UTC | #1
On Tue, 26 Feb 2019 16:04:36 +0100, Artur Rojek wrote:
> Add documentation for the "status-gpios" property.
> Update the "gpios" property with a valid example.
> 
> Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
> ---
> 
> Changes:
> 
> v2: - add a better description for the "status-gpios" property,
>     - add valid examples for the "gpios" and "status-gpios" properties
> 
>  .../devicetree/bindings/power/supply/gpio-charger.txt       | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Sebastian Reichel April 5, 2019, 3:43 p.m. UTC | #2
Hi,

On Tue, Feb 26, 2019 at 04:04:36PM +0100, Artur Rojek wrote:
> Add documentation for the "status-gpios" property.
> Update the "gpios" property with a valid example.
> 
> Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
> ---
> 
> Changes:
> 
> v2: - add a better description for the "status-gpios" property,
>     - add valid examples for the "gpios" and "status-gpios" properties
> 
>  .../devicetree/bindings/power/supply/gpio-charger.txt       | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.txt b/Documentation/devicetree/bindings/power/supply/gpio-charger.txt
> index adbb5dc5b6e9..999cc245543c 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 whether a battery is charging.

I think it's better to name this charge-status-gpios, since charger
may provide all kind of status GPIOs. For example the existing
gpios property (also bad name, but cannot be changed easily now),
which provides AC online status.

Otherwise the binding and the driver patch looks good to me.

-- Sebastian
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..999cc245543c 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 whether a battery is charging.
+
 Example:
 
 	usb_charger: charger {
 		compatible = "gpio-charger";
 		charger-type = "usb-sdp";
-		gpios = <&gpf0 2 0 0 0>;
+		gpios = <&gpd 28 GPIO_ACTIVE_LOW>;
+		status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>;
 	}
 
 	battery {