diff options
author | Kim, Milo <Milo.Kim@ti.com> | 2013-03-14 04:29:26 -0700 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2013-04-01 11:04:50 -0700 |
commit | 313bf0b1a0eaeaac17ea8c4b748f16e28fce8b7a (patch) | |
tree | 755f533e1c82fb69edda6e88abe96673dcef8a85 /drivers/leds/leds-lm355x.c | |
parent | 48a1d032c954b9b06c3adbf35ef4735dd70ab757 (diff) |
leds: lm355x, lm3642: support camera LED triggers for flash and torch
LM355x and LM3642 support flash and torch functionality.
(Camera driver) (LED trigger for camera) (LED driver)
Turn on the flash ...> ledtrig_flash_ctrl(true) ...> LM355x or LM3642
brightness ctrl
<actual driving here>
Flash/torch LEDs are controlled by other driver using LED camera trigger
APIs, ledtrig_flash_ctrl()/ledtrig_torch_ctrl().
Then, actual device control is activated by each LED driver such like
LM355x or LM3642.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-lm355x.c')
-rw-r--r-- | drivers/leds/leds-lm355x.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/leds/leds-lm355x.c b/drivers/leds/leds-lm355x.c index 4117235ba61..d81a8e7afd6 100644 --- a/drivers/leds/leds-lm355x.c +++ b/drivers/leds/leds-lm355x.c @@ -477,6 +477,7 @@ static int lm355x_probe(struct i2c_client *client, chip->cdev_flash.name = "flash"; chip->cdev_flash.max_brightness = 16; chip->cdev_flash.brightness_set = lm355x_strobe_brightness_set; + chip->cdev_flash.default_trigger = "flash"; err = led_classdev_register((struct device *) &client->dev, &chip->cdev_flash); if (err < 0) @@ -486,6 +487,7 @@ static int lm355x_probe(struct i2c_client *client, chip->cdev_torch.name = "torch"; chip->cdev_torch.max_brightness = 8; chip->cdev_torch.brightness_set = lm355x_torch_brightness_set; + chip->cdev_torch.default_trigger = "torch"; err = led_classdev_register((struct device *) &client->dev, &chip->cdev_torch); if (err < 0) |