diff options
author | Frank Schaefer <fschaefer.oss@googlemail.com> | 2013-12-02 01:06:55 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-12-10 22:18:40 +0400 |
commit | 6b8a3170c9984be58e50e23c78e2eb7833f33c4c (patch) | |
tree | 9473b6db87b54c412b1a987965cacfe4f709a6e0 /drivers/media/usb/em28xx/em28xx.h | |
parent | 7763481a97488f201e7b6a42ddce1d163cd6297a (diff) | |
download | linux-6b8a3170c9984be58e50e23c78e2eb7833f33c4c.tar.xz |
[media] em28xx: prepare for supporting multiple LEDs
Introduce a LED role and store all LEDs in an array.
Also provide a helper function to retrieve a specific LED.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx.h')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h index df828c68ef44..f60f236a245f 100644 --- a/drivers/media/usb/em28xx/em28xx.h +++ b/drivers/media/usb/em28xx/em28xx.h @@ -377,7 +377,13 @@ enum em28xx_adecoder { EM28XX_TVAUDIO, }; +enum em28xx_led_role { + EM28XX_LED_ANALOG_CAPTURING = 0, + EM28XX_NUM_LED_ROLES, /* must be the last */ +}; + struct em28xx_led { + enum em28xx_led_role role; u8 gpio_reg; u8 gpio_mask; bool inverted; @@ -433,7 +439,7 @@ struct em28xx_board { char *ir_codes; /* LEDs that need to be controlled explicitly */ - struct em28xx_led *analog_capturing_led; + struct em28xx_led *leds; /* Buttons */ struct em28xx_button *buttons; @@ -711,6 +717,8 @@ int em28xx_audio_analog_set(struct em28xx *dev); int em28xx_audio_setup(struct em28xx *dev); int em28xx_colorlevels_set_default(struct em28xx *dev); +const struct em28xx_led *em28xx_find_led(struct em28xx *dev, + enum em28xx_led_role role); int em28xx_capture_start(struct em28xx *dev, int start); int em28xx_vbi_supported(struct em28xx *dev); int em28xx_set_outfmt(struct em28xx *dev); |