Skip to content

Commit 8ca5bf8

Browse files
elkablolag-linaro
authored andcommitted
leds: turris-omnia: Document driver private structures
Add documentation for driver private structures, `struct omnia_leds` and `struct omnia_led`. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-7-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 2b73a24 commit 8ca5bf8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

drivers/leds/leds-turris-omnia.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
/* MCU controller I2C address 0x2a, needed for detecting MCU features */
1919
#define OMNIA_MCU_I2C_ADDR 0x2a
2020

21+
/**
22+
* struct omnia_led - per-LED part of driver private data structure
23+
* @mc_cdev: multi-color LED class device
24+
* @subled_info: per-channel information
25+
* @cached_channels: cached values of per-channel brightness that was sent to the MCU
26+
* @on: whether the LED was set on
27+
* @hwtrig: whether the LED blinking was offloaded to the MCU
28+
* @reg: LED identifier to the MCU
29+
*/
2130
struct omnia_led {
2231
struct led_classdev_mc mc_cdev;
2332
struct mc_subled subled_info[OMNIA_LED_NUM_CHANNELS];
@@ -28,6 +37,13 @@ struct omnia_led {
2837

2938
#define to_omnia_led(l) container_of(l, struct omnia_led, mc_cdev)
3039

40+
/**
41+
* struct omnia_leds - driver private data structure
42+
* @client: I2C client device
43+
* @lock: mutex to protect cached state
44+
* @has_gamma_correction: whether the MCU firmware supports gamma correction
45+
* @leds: flexible array of per-LED data
46+
*/
3147
struct omnia_leds {
3248
struct i2c_client *client;
3349
struct mutex lock;

0 commit comments

Comments
 (0)