Messages in this thread | | | From | Andy Shevchenko <> | Date | Fri, 5 Aug 2022 15:06:19 +0200 | Subject | Re: [PATCH v7 13/13] video: backlight: mt6370: Add MediaTek MT6370 support |
| |
On Fri, Aug 5, 2022 at 9:08 AM ChiaEn Wu <peterwu.pub@gmail.com> wrote: > > From: ChiaEn Wu <chiaen_wu@richtek.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 a support for the MediaTek MT6370 backlight driver. > It controls 4 channels of 8 series WLEDs in > 2048 (only for MT6370/MT6371) / 16384 (only for MT6372) > current steps (30 mA) in exponential or linear mapping curves.
...
> +#include <linux/backlight.h> > +#include <linux/bitfield.h> > +#include <linux/bits.h> > +#include <linux/gpio/consumer.h> > +#include <linux/kernel.h> > +#include <linux/minmax.h> > +#include <linux/mod_devicetable.h> > +#include <linux/module.h>
> +#include <linux/of_device.h>
Why? Since below drop this and use fully fwnode / device property APIs.
> +#include <linux/platform_device.h>
Missed property.h which is heavily used in.the driver
> +#include <linux/regmap.h>
...
> + /* > + * MT6372 uses 14 bits to control the brightness but MT6370 and MT6371 > + * use 11 bits. They are different so we have to use this function to > + * check the vendor ID and use different mask, shift and default > + * maxiimum brightness value.
Use spell-checker for all your patches.
> + */
-- With Best Regards, Andy Shevchenko
| |