[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8f501644-9793-214f-8a19-45ee8af3c907@gmail.com>
Date: Tue, 30 Aug 2022 13:34:28 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: ChiaEn Wu <peterwu.pub@...il.com>, lee@...nel.org,
daniel.thompson@...aro.org, jingoohan1@...il.com, pavel@....cz,
robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
matthias.bgg@...il.com, sre@...nel.org, jic23@...nel.org,
lars@...afoo.de, deller@....de, broonie@...nel.org,
andriy.shevchenko@...ux.intel.com
Cc: chiaen_wu@...htek.com, alice_chen@...htek.com,
cy_huang@...htek.com, dri-devel@...ts.freedesktop.org,
linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, linux-iio@...r.kernel.org,
linux-fbdev@...r.kernel.org, szunichen@...il.com,
andy.shevchenko@...il.com
Subject: Re: [PATCH v9 07/10] power: supply: mt6370: Add MediaTek MT6370
charger driver
On 8/30/22 06:40, ChiaEn Wu wrote:
> From: ChiaEn Wu <chiaen_wu@...htek.com>
>
> MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger
> with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight
> driver, display bias voltage supply, one general purpose LDO, and the
> USB Type-C & PD controller complies with the latest USB Type-C and PD
> standards.
>
> Add support for the MediaTek MT6370 Charger driver. The charger module
> of MT6370 supports High-Accuracy Voltage/Current Regulation,
> Average Input Current Regulation, Battery Temperature Sensing,
> Over-Temperature Protection, DPDM Detection for BC1.2.
>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Signed-off-by: ChiaEn Wu <chiaen_wu@...htek.com>
> ---
>
> +
> +static const struct linear_range mt6370_chg_ranges[MT6370_RANGE_F_MAX] = {
> + LINEAR_RANGE_IDX(MT6370_RANGE_F_IAICR, 100000, 0x0, 0x3F, 50000),
> + LINEAR_RANGE_IDX(MT6370_RANGE_F_VOREG, 3900000, 0x0, 0x51, 10000),
> + LINEAR_RANGE_IDX(MT6370_RANGE_F_VMIVR, 3900000, 0x0, 0x5F, 100000),
> + LINEAR_RANGE_IDX(MT6370_RANGE_F_ICHG, 900000, 0x08, 0x31, 100000),
> + LINEAR_RANGE_IDX(MT6370_RANGE_F_IPREC, 100000, 0x0, 0x0F, 50000),
> + LINEAR_RANGE_IDX(MT6370_RANGE_F_IEOC, 100000, 0x0, 0x0F, 50000),
> +};
This looks good to me now :) Thanks for the linear-range improvement!
> + INIT_DELAYED_WORK(&priv->mivr_dwork, mt6370_chg_mivr_dwork_func);
> + ret = devm_add_action_or_reset(dev, mt6370_chg_cancel_mivr_dwork,
> + &priv->mivr_dwork);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to init mivr dwork\n");
I just noticed this. Maybe this could be done using
devm_delayed_work_autocancel() ?
Yours
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
Powered by blists - more mailing lists