summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2020-06-06 00:43:59 +0200
committerSebastian Reichel <sre@kernel.org>2020-06-19 18:15:38 +0200
commit1d85f6d1b0c11f15ec2b1a9719da8118f3f94e64 (patch)
tree156c4d81ed39da58e712aaaad210014c45519852 /Documentation/devicetree
parentdad980f13243281b8231a1a3365ce380f312f825 (diff)
downloadlinux-1d85f6d1b0c11f15ec2b1a9719da8118f3f94e64.tar.gz
linux-1d85f6d1b0c11f15ec2b1a9719da8118f3f94e64.tar.bz2
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')
-rw-r--r--Documentation/devicetree/bindings/power/supply/gpio-charger.yaml7
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