lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 5 May 2023 13:51:34 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Jakob Hauser <jahau@...ketmail.com>
Cc:     Sebastian Reichel <sre@...nel.org>, Lee Jones <lee@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Beomho Seo <beomho.seo@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Stephan Gerhold <stephan@...hold.net>,
        Raymond Hackley <raymondhackley@...tonmail.com>,
        Pavel Machek <pavel@....cz>, Axel Lin <axel.lin@...ics.com>,
        ChiYuan Huang <cy_huang@...htek.com>, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        phone-devel@...r.kernel.org, ~postmarketos/upstreaming@...ts.sr.ht
Subject: Re: [PATCH v3 5/8] power: supply: rt5033_charger: Add RT5033 charger
 device driver

On Fri, Apr 28, 2023 at 1:30 AM Jakob Hauser <jahau@...ketmail.com> wrote:

> This patch adds device driver of Richtek RT5033 PMIC. The driver supports
> switching charger. rt5033 charger provides three charging modes. The charging
> modes are pre-charge mode, fast charge mode and constant voltage mode. They
> vary in charge rate, the charge parameters can be controlled by i2c interface.
>
> Cc: Beomho Seo <beomho.seo@...sung.com>
> Cc: Chanwoo Choi <cw00.choi@...sung.com>
> Tested-by: Raymond Hackley <raymondhackley@...tonmail.com>
> Signed-off-by: Jakob Hauser <jahau@...ketmail.com>

Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

> +       ret = power_supply_get_battery_info(charger->psy, &info);
> +       if (ret) {
> +               dev_err(charger->dev, "failed to get battery info\n");
> +               return ERR_PTR(-EINVAL);
> +       }
> +
> +       /* Assign data. Validity will be checked in the init functions. */
> +       chg->pre_uamp = info->precharge_current_ua;
> +       chg->fast_uamp = info->constant_charge_current_max_ua;
> +       chg->eoc_uamp = info->charge_term_current_ua;
> +       chg->pre_uvolt = info->precharge_voltage_max_uv;
> +       chg->const_uvolt = info->constant_charge_voltage_max_uv;

Code reuse, exactly how it should be! :)

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ