diff options
author | Simon Wilson <simonwilson@google.com> | 2010-11-23 14:17:11 -0800 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2011-11-17 17:52:35 -0800 |
commit | ae7d2dca7a495928b51acf93e094060743741437 (patch) | |
tree | e2a97ceb89a25fcaab2eac79a2db59fbb4f37752 /drivers/media | |
parent | 217d0603773cf08fe9217f130a3595a632bfd272 (diff) | |
download | kernel_samsung_aries-ae7d2dca7a495928b51acf93e094060743741437.zip kernel_samsung_aries-ae7d2dca7a495928b51acf93e094060743741437.tar.gz kernel_samsung_aries-ae7d2dca7a495928b51acf93e094060743741437.tar.bz2 |
media: s5k4ecgx: preserve torch mode after focus/capture
During focus, the flash LED may be used for AF assist. In
addition, during capture, the LED may be used as a flash. If
the torch is enabled before focus/capture, it will be kept
off afterwards because it shares the same flash_on status
variable with the flash and AF assit beam. Splitting out the
torch_on status to a separate variable fixes this.
Signed-off-by: Simon Wilson <simonwilson@google.com>
Diffstat (limited to 'drivers/media')
-rwxr-xr-x | drivers/media/video/s5k4ecgx.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/video/s5k4ecgx.c b/drivers/media/video/s5k4ecgx.c index 3ff2ced..a185834 100755 --- a/drivers/media/video/s5k4ecgx.c +++ b/drivers/media/video/s5k4ecgx.c @@ -634,6 +634,7 @@ struct s5k4ecgx_state { int check_dataline; int check_previewdata; bool flash_on; + bool torch_on; bool sensor_af_in_low_light_mode; bool flash_state_on_previous_capture; bool initialized; @@ -1679,9 +1680,9 @@ static void s5k4ecgx_enable_torch(struct v4l2_subdev *sd) container_of(sd, struct s5k4ecgx_state, sd); struct s5k4ecgx_platform_data *pdata = client->dev.platform_data; - s5k4ecgx_set_from_table(sd, "flash start", + s5k4ecgx_set_from_table(sd, "torch start", &state->regs->flash_start, 1, 0); - state->flash_on = true; + state->torch_on = true; pdata->torch_onoff(1); } @@ -1692,10 +1693,10 @@ static void s5k4ecgx_disable_torch(struct v4l2_subdev *sd) container_of(sd, struct s5k4ecgx_state, sd); struct s5k4ecgx_platform_data *pdata = client->dev.platform_data; - if (state->flash_on) { - state->flash_on = false; + if (state->torch_on) { + state->torch_on = false; pdata->torch_onoff(0); - s5k4ecgx_set_from_table(sd, "flash end", + s5k4ecgx_set_from_table(sd, "torch end", &state->regs->flash_end, 1, 0); } } |