power: supply: gpio-charger: Make gpios optional
authorSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 5 Jun 2020 22:43:59 +0000 (00:43 +0200)
committerSebastian Reichel <sre@kernel.org>
Fri, 19 Jun 2020 16:15:38 +0000 (18:15 +0200)
commit1d85f6d1b0c11f15ec2b1a9719da8118f3f94e64
tree156c4d81ed39da58e712aaaad210014c45519852
parentdad980f13243281b8231a1a3365ce380f312f825
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>
Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
drivers/power/supply/gpio-charger.c