Done
Alphabetical.
Done+#define ST1202_BUF_SIZE 16
This appears to be unused.
Please make sure all of these defines are used or removed.Removed
I'm usually all for defines, but this one is a bit over the top.
Checkpatch was complaining
Why have you broken the line here and not 2 lines down?
Moved it inside for_each_available_child_of_node_scoped
Do this during declaration.
Lee Jones [李琼斯]Thank you for the review. I think corrected everything.
[PATCH v5 2/3] leds: Add LED1202 I2C driver
The output current can be adjusted separately for each channel by 8-bit
analog (current sink input) and 12-bit digital (PWM) dimming control. The
LED1202 implements 12 low-side current generators with independent dimming
control. Internal volatile memory allows the user to store up to 8 different
patterns, each pattern is a particular output configuration in terms of PWM
duty-cycle (on 4096 steps). Analog dimming (on 256 steps) is per channel but
common to all patterns. Each device tree LED node will have a corresponding
entry in /sys/class/leds with the label name. The brightness property
corresponds to the per channel analog dimming, while the patterns[1-8] to the
PWM dimming control.
Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@xxxxxxxxxxxxxxxxx>
---
Changes in v5:
- remove unused macros
- switch to using devm_led_classdev_register_ext (struct st1202_led update)
- add prescalar_to_milliseconds (convert [22..5660]ms to [0..255] reg value)
- remove register range check in dt_init (range protected by yaml)
- address all review comments in v4
Changes in v4:
- Remove attributes/extended attributes implementation
- Use /sys/class/leds/<led>/hw_pattern (Pavel suggestion)
- Implement review findings of Christophe JAILLET
Changes in v3:
- Rename all ll1202 to st1202, including driver file name
- Convert all magic numbers to defines
- Refactor the show/store callbacks as per Lee's and Thomas's review
- Remove ll1202_get_channel and use dev_ext_attributes instead
- Log all error values for all the functions
- Use sysfs_emit for show callbacks
Changes in v2:
- Fix build error for device_attribute modes