Message ID | 1685600676-25124-1-git-send-email-cy_huang@richtek.com (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show |
Series | power: supply: rt9467: Make charger-enable control as logic level | expand |
On 01/06/2023 08:24, cy_huang@richtek.com wrote: > From: ChiYuan Huang <cy_huang@richtek.com> > > The current coding make 'charger-enable-gpio' control as real hardware > level. This conflicts with the default binding example. For driver > behavior, no need to use real hardware level, just logic level is > enough. This change can make this flexibility keep in dts gpio active > level about this pin. > > Fixes: 6f7f70e3a8dd ("power: supply: rt9467: Add Richtek RT9467 charger driver") > Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> > --- > Hi, Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
Hi, On Thu, Jun 01, 2023 at 08:31:28AM +0200, Krzysztof Kozlowski wrote: > On 01/06/2023 08:24, cy_huang@richtek.com wrote: > > From: ChiYuan Huang <cy_huang@richtek.com> > > > > The current coding make 'charger-enable-gpio' control as real hardware > > level. This conflicts with the default binding example. For driver > > behavior, no need to use real hardware level, just logic level is > > enough. This change can make this flexibility keep in dts gpio active > > level about this pin. > > > > Fixes: 6f7f70e3a8dd ("power: supply: rt9467: Add Richtek RT9467 charger driver") > > Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> > > --- > > Hi, > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Thanks, queued. -- Sebastian
diff --git a/drivers/power/supply/rt9467-charger.c b/drivers/power/supply/rt9467-charger.c index ea33693..b0b9ff8 100644 --- a/drivers/power/supply/rt9467-charger.c +++ b/drivers/power/supply/rt9467-charger.c @@ -1192,7 +1192,7 @@ static int rt9467_charger_probe(struct i2c_client *i2c) i2c_set_clientdata(i2c, data); /* Default pull charge enable gpio to make 'CHG_EN' by SW control only */ - ceb_gpio = devm_gpiod_get_optional(dev, "charge-enable", GPIOD_OUT_LOW); + ceb_gpio = devm_gpiod_get_optional(dev, "charge-enable", GPIOD_OUT_HIGH); if (IS_ERR(ceb_gpio)) return dev_err_probe(dev, PTR_ERR(ceb_gpio), "Failed to config charge enable gpio\n");