Thread (107 messages) 107 messages, 11 authors, 2021-06-05

Re: [PATCH v3 6/6] leds: Add support for RTL8231 LED scan matrix

From: Andy Shevchenko <hidden>
Date: 2021-05-24 10:24:54
Also in: linux-devicetree, linux-gpio, lkml

On Mon, May 24, 2021 at 1:34 AM Sander Vanheule [off-list ref] wrote:
Both single and bi-color scanning modes are supported. The driver will
verify that the addresses are valid for the current mode, before
registering the LEDs. LEDs can be turned on, off, or toggled at one of
six predefined rates from 40ms to 1280ms.

Implements a platform device for use as a child device with RTL8231 MFD,
and uses the parent regmap to access the required registers.
...
+         This options enables support for using the LED scanning matrix output
option
+         of the RTL8231 GPIO and LED expander chip.
+         When built as a module, this module will be named leds-rtl8231.
...
+               interval_ms = 500;
Does this deserve a #define?

...
+       ret = fwnode_property_count_u32(fwnode, "reg");
+       if (ret < 0)
+               return ret;
+       if (ret != 2)
+               return -ENODEV;
I would say -EINVAL, but -ENODEV is similarly okay.

...
+       int err;
ret or err? Be consistent across a single driver.

...
+       int err;
Ditto.


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