Message ID | 20220531102809.11976-1-peterwu.pub@gmail.com |
---|---|
Headers | show |
Series | Add Mediatek MT6370 PMIC support | expand |
On Wed, Jun 1, 2022 at 11:48 AM Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > On Tue, May 31, 2022 at 1:16 PM ChiaEn Wu <peterwu.pub@gmail.com> wrote: > > > > From: Alice Chen <alice_chen@richtek.com> > > All below comments are applicable to the rest of the series as well > (one way or another), so please fix all your patches where it's > appropriate. Forgot to mention, please consider using return dev_err_probe(); pattern in the ->probe() and related funcitons. It will save a lot of LOCs. > > Add Mediatek MT6370 Indicator support > > What indicator? > Please also keep attention on English punctuation (missed period). > > ... > > > + help > > + Support 4 channels and reg/pwm/breath mode. > > + Isink4 can also use as a CHG_VIN power good Indicator. > > be used > > > + Say Y here to enable support for > > + MT6370_RGB_LED device. > > ... > > > +#include <linux/module.h> > > +#include <linux/mutex.h> > > +#include <linux/platform_device.h> > > > +#include <linux/of.h> > > Are you sure this is the correct header? Seems you need > mod_devicetable.h instead. > > > +#include <linux/property.h> > > +#include <linux/regmap.h> > > ... > > > +struct mt6370_priv { > > + struct mutex lock; > > Do you use regmap locking? > > > + struct device *dev; > > > + struct regmap *regmap; > > > + struct regmap_field *fields[F_MAX_FIELDS]; > > + const struct reg_field *reg_fields; > > + const struct linear_range *ranges; > > + struct reg_cfg *reg_cfgs; > > + unsigned int leds_count; > > + unsigned int leds_active; > > + bool is_mt6372; > > + struct mt6370_led leds[]; > > +}; > > ... > > > +static const unsigned int common_tfreqs[] = { > > + 10000, 5000, 2000, 1000, 500, 200, 5, 1 > > Leave a comma at the end. > > > +}; > > + > > +static const unsigned int mt6372_tfreqs[] = { > > + 8000, 4000, 2000, 1000, 500, 250, 8, 4 > > Ditto. > > > +}; > > > -- > With Best Regards, > Andy Shevchenko
From: ChiaEn Wu <chiaen_wu@richtek.com> This patch series add Mediatek MT6370 PMIC support. The MT6370 is a highly-integrated smart power management IC, which includes a single cell Li-Ion/Li-Polymer switching battery charger, a USB Type-C & Power Delivery (PD) controller, dual Flash LED current sources, a RGB LED driver, a backlight WLED driver, a display bias driver and a general LDO for portable devices. Alice Chen (3): leds: mt6370: Add Mediatek MT6370 Indicator support leds: flashlight: mt6370: Add Mediatek MT6370 flashlight support dt-bindings: leds: Add Mediatek MT6370 flashlight binding documentation ChiYuan Huang (7): mfd: mt6370: Add Mediatek MT6370 support usb: typec: tcpci_mt6370: Add Mediatek MT6370 tcpci driver regulator: mt6370: Add mt6370 DisplayBias and VibLDO support dt-bindings: usb: Add Mediatek MT6370 TCPC binding documentation dt-bindings: leds: mt6370: Add Mediatek mt6370 indicator documentation dt-bindings: backlight: Add Mediatek MT6370 backlight binding documentation dt-bindings: mfd: Add Mediatek MT6370 binding documentation ChiaEn Wu (4): iio: adc: mt6370: Add Mediatek MT6370 support power: supply: mt6370: Add Mediatek MT6370 charger driver video: backlight: mt6370: Add Mediatek MT6370 support dt-bindings: power: supply: Add Mediatek MT6370 Charger binding documentation .../backlight/mediatek,mt6370-backlight.yaml | 110 ++ .../leds/mediatek,mt6370-flashlight.yaml | 48 + .../leds/mediatek,mt6370-indicator.yaml | 57 + .../bindings/mfd/mediatek,mt6370.yaml | 282 ++++ .../power/supply/mediatek,mt6370-charger.yaml | 60 + .../bindings/usb/mediatek,mt6370-tcpc.yaml | 35 + drivers/iio/adc/Kconfig | 9 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/mt6370-adc.c | 257 ++++ drivers/leds/Kconfig | 11 + drivers/leds/Makefile | 1 + drivers/leds/flash/Kconfig | 9 + drivers/leds/flash/Makefile | 1 + drivers/leds/flash/leds-mt6370-flash.c | 665 ++++++++++ drivers/leds/leds-mt6370.c | 994 +++++++++++++++ drivers/mfd/Kconfig | 13 + drivers/mfd/Makefile | 1 + drivers/mfd/mt6370.c | 273 ++++ drivers/power/supply/Kconfig | 11 + drivers/power/supply/Makefile | 1 + drivers/power/supply/mt6370-charger.c | 1132 +++++++++++++++++ drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/mt6370-regulator.c | 389 ++++++ drivers/usb/typec/tcpm/Kconfig | 8 + drivers/usb/typec/tcpm/Makefile | 1 + drivers/usb/typec/tcpm/tcpci_mt6370.c | 212 +++ drivers/video/backlight/Kconfig | 8 + drivers/video/backlight/Makefile | 1 + drivers/video/backlight/mt6370-backlight.c | 338 +++++ .../dt-bindings/iio/adc/mediatek,mt6370_adc.h | 18 + include/dt-bindings/mfd/mediatek,mt6370.h | 83 ++ 32 files changed, 5038 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backlight.yaml create mode 100644 Documentation/devicetree/bindings/leds/mediatek,mt6370-flashlight.yaml create mode 100644 Documentation/devicetree/bindings/leds/mediatek,mt6370-indicator.yaml create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml create mode 100644 Documentation/devicetree/bindings/power/supply/mediatek,mt6370-charger.yaml create mode 100644 Documentation/devicetree/bindings/usb/mediatek,mt6370-tcpc.yaml create mode 100644 drivers/iio/adc/mt6370-adc.c create mode 100644 drivers/leds/flash/leds-mt6370-flash.c create mode 100644 drivers/leds/leds-mt6370.c create mode 100644 drivers/mfd/mt6370.c create mode 100644 drivers/power/supply/mt6370-charger.c create mode 100644 drivers/regulator/mt6370-regulator.c create mode 100644 drivers/usb/typec/tcpm/tcpci_mt6370.c create mode 100644 drivers/video/backlight/mt6370-backlight.c create mode 100644 include/dt-bindings/iio/adc/mediatek,mt6370_adc.h create mode 100644 include/dt-bindings/mfd/mediatek,mt6370.h