]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
leds: turris-omnia: Document driver private structures
authorMarek BehĂșn <kabel@kernel.org>
Mon, 11 Nov 2024 10:03:50 +0000 (11:03 +0100)
committerLee Jones <lee@kernel.org>
Thu, 12 Dec 2024 18:37:36 +0000 (18:37 +0000)
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>
drivers/leds/leds-turris-omnia.c

index 1212df8315ab5fbc56d289620ed9af7abf8b1581..83a011e5259c1eb85f56c9cebd93df5f848dcd32 100644 (file)
 /* MCU controller I2C address 0x2a, needed for detecting MCU features */
 #define OMNIA_MCU_I2C_ADDR     0x2a
 
+/**
+ * struct omnia_led - per-LED part of driver private data structure
+ * @mc_cdev:           multi-color LED class device
+ * @subled_info:       per-channel information
+ * @cached_channels:   cached values of per-channel brightness that was sent to the MCU
+ * @on:                        whether the LED was set on
+ * @hwtrig:            whether the LED blinking was offloaded to the MCU
+ * @reg:               LED identifier to the MCU
+ */
 struct omnia_led {
        struct led_classdev_mc mc_cdev;
        struct mc_subled subled_info[OMNIA_LED_NUM_CHANNELS];
@@ -28,6 +37,13 @@ struct omnia_led {
 
 #define to_omnia_led(l)                container_of(l, struct omnia_led, mc_cdev)
 
+/**
+ * struct omnia_leds - driver private data structure
+ * @client:                    I2C client device
+ * @lock:                      mutex to protect cached state
+ * @has_gamma_correction:      whether the MCU firmware supports gamma correction
+ * @leds:                      flexible array of per-LED data
+ */
 struct omnia_leds {
        struct i2c_client *client;
        struct mutex lock;