Thread (27 messages) 27 messages, 7 authors, 2022-08-16

Re: [PATCH v7 10/13] power: supply: mt6370: Add MediaTek MT6370 charger driver

From: Matti Vaittinen <mazziesaccount@gmail.com>
Date: 2022-08-15 05:37:01
Also in: dri-devel, linux-arm-kernel, linux-devicetree, linux-iio, linux-leds, linux-mediatek, linux-pm, linux-usb, lkml

Hi ChiaEn,

pe 5. elok. 2022 klo 10.09 ChiaEn Wu (peterwu.pub@gmail.com) kirjoitti:
From: ChiaEn Wu <redacted>

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 a 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.

Signed-off-by: ChiaEn Wu <redacted>
---

+
+#define MT6370_CHG_LINEAR_RANGE(_rfd, _min, _min_sel, _max_sel, _step) \
+[_rfd] = {                                                             \
+       .min = _min,                                                    \
+       .min_sel = _min_sel,                                            \
+       .max_sel = _max_sel,                                            \
+       .step = _step,                                                  \
+}
Just a minor thing but I think this macro could be useful also for
other drivers. Do you think you could rename it to LINEAR_RANGE_IDX()
(or some such) and move it to the linear_range.h? That would allow
also other drivers to use it instead of reinventing the wheel :)

Best Regards
  -- Matti Vaittinen



---

Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help