Re: [PATCH 2/2] power: supply: bq24190_charger: Export current regulator

From: Krzysztof Kozlowski
Date: Thu Aug 24 2023 - 08:42:30 EST


On 24/08/2023 13:27, Emmanuel Gil Peyrot wrote:
> From: Alexandre Courbot <acourbot@xxxxxxxxxx>

Empty commit msg. Sorry, we cannot take such commits.

>
> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>

Missing SoB.


> ---
> drivers/power/supply/bq24190_charger.c | 84 ++++++++++++++++++++++++++
> 1 file changed, 84 insertions(+)
>
> diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
> index a56122b39687..8c026e86aeb3 100644
> --- a/drivers/power/supply/bq24190_charger.c
> +++ b/drivers/power/supply/bq24190_charger.c
> @@ -530,6 +530,81 @@ static int bq24190_set_otg_vbus(struct bq24190_dev_info *bdi, bool enable)
> }
>
> #ifdef CONFIG_REGULATOR
> +static int bq24190_set_charging_current(struct regulator_dev *dev,
> + int min_uA, int max_uA)
> +{
> + struct bq24190_dev_info *bdi = rdev_get_drvdata(dev);
> + u8 ss_reg;
> + int in_current_limit;
> + int ret = 0;
> +
> + dev_info(bdi->dev, "Setting charging current %d mA\n", max_uA/1000);

This is not info. It would pollute log and it is not really necessary,
because regulator framework gives such information. You can make it
debug if you need for debug purposes.



Best regards,
Krzysztof