diff options
author | Sebastian Reichel <sebastian.reichel@collabora.com> | 2020-06-06 00:43:59 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2020-06-19 18:15:38 +0200 |
commit | 1d85f6d1b0c11f15ec2b1a9719da8118f3f94e64 (patch) | |
tree | 156c4d81ed39da58e712aaaad210014c45519852 /Documentation/devicetree/bindings/power | |
parent | dt-bindings: power: supply: gpio-charger: convert to yaml (diff) | |
download | linux-1d85f6d1b0c11f15ec2b1a9719da8118f3f94e64.tar.xz linux-1d85f6d1b0c11f15ec2b1a9719da8118f3f94e64.zip |
power: supply: gpio-charger: Make gpios optional
While strongly recommended, not all devices have a gpio to
detect if the charger is connected. This moves the 'gpios'
from required to optional section.
This also modifies error handling for the GPIO a bit: We
no longer fallback to pdata, if a GPIO is specified using
GPIO descriptor tables. This is a bit cleaner and does
not have any real impact: There are only two mainline pdata
users (arm/mach-sa1100/collie.c, arm/mach-pxa/tosa.c) and
none of them specify the GPIO via gpiod descriptor tables.
Once both have been converted the driver's support for
specifying GPIOs numbers in pdata will be dropped.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'Documentation/devicetree/bindings/power')
-rw-r--r-- | Documentation/devicetree/bindings/power/supply/gpio-charger.yaml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml index 78b167c62ab1..30eabbb14ef3 100644 --- a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml +++ b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml @@ -41,7 +41,12 @@ properties: required: - compatible - - gpios + +anyOf: + - required: + - gpios + - required: + - charge-status-gpios additionalProperties: false |