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

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

From: ChiYuan Huang <hidden>
Date: 2022-06-02 09:35:38
Also in: dri-devel, linux-arm-kernel, linux-devicetree, linux-iio, linux-leds, linux-mediatek, linux-pm, linux-usb, lkml

Andy Shevchenko [off-list ref] 於 2022年6月2日 週四 下午5:18寫道:
On Thu, Jun 2, 2022 at 8:27 AM ChiYuan Huang [off-list ref] wrote:
quoted
On Wed, Jun 01, 2022 at 11:48:58AM +0200, Andy Shevchenko wrote:
quoted
On Tue, May 31, 2022 at 1:16 PM ChiaEn Wu [off-list ref] wrote:
...
quoted
quoted
What indicator?
It's RGB curent sink type LED driver (maximum supported current is only 24mA).
Make your commit messages a slightly more verbose.
OK, will refine the commit message in next.
...
quoted
quoted
quoted
+#include <linux/of.h>
Are you sure this is the correct header? Seems you need
mod_devicetable.h instead.
It's the correct header and be used for the struct 'of_device_id'.
Nope. Run the following command
$ git grep -n 'struct of_device_id {' -- include/linux/
Got it, thanks.
...
quoted
quoted
quoted
+struct mt6370_priv {
+       struct mutex lock;
Do you use regmap locking?
MFD regmap register already the access lock.

This lock is just to guarantee only one user can access the RGB register
part.

Sorry, from the comment, do you want us to rename or remove this lock?
My point is, since you have two locks, explain why you need each of them.
OK, will leave a comment line to explain the usage of this lock.
quoted
quoted
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[];
+};

--
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help