Thread (28 messages) 28 messages, 6 authors, 2022-06-02

Re: [PATCH 06/14] leds: mt6370: Add Mediatek MT6370 Indicator support

From: Andy Shevchenko <hidden>
Date: 2022-06-01 09:52:12
Also in: dri-devel, linux-devicetree, linux-fbdev, linux-iio, linux-leds, linux-mediatek, linux-pm, linux-usb, lkml

On Wed, Jun 1, 2022 at 11:48 AM Andy Shevchenko
[off-list ref] wrote:
On Tue, May 31, 2022 at 1:16 PM ChiaEn Wu [off-list ref] wrote:
quoted
From: Alice Chen <redacted>
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.
quoted
Add Mediatek MT6370 Indicator support
What indicator?
Please also keep attention on English punctuation (missed period).

...
quoted
+       help
+         Support 4 channels and reg/pwm/breath mode.
+         Isink4 can also use as a CHG_VIN power good Indicator.
be used
quoted
+         Say Y here to enable support for
+         MT6370_RGB_LED device.
...
quoted
+#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/platform_device.h>
quoted
+#include <linux/of.h>
Are you sure this is the correct header? Seems you need
mod_devicetable.h instead.
quoted
+#include <linux/property.h>
+#include <linux/regmap.h>
...
quoted
+struct mt6370_priv {
+       struct mutex lock;
Do you use regmap locking?
quoted
+       struct device *dev;
quoted
+       struct regmap *regmap;
quoted
+       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[];
+};
...
quoted
+static const unsigned int common_tfreqs[] = {
+       10000, 5000, 2000, 1000, 500, 200, 5, 1
Leave a comma at the end.
quoted
+};
+
+static const unsigned int mt6372_tfreqs[] = {
+       8000, 4000, 2000, 1000, 500, 250, 8, 4
Ditto.
quoted
+};

--
With Best Regards,
Andy Shevchenko


-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help