diff options
author | Dmitry Lavnikevich <d.lavnikevich@sam-solutions.net> | 2013-05-13 17:21:10 +0300 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2013-11-07 12:19:31 -0500 |
commit | b6b0a0682e4503a3c4dded8bd835024ece15ff28 (patch) | |
tree | 527f7cd4c6927ebd25d6f2160fa7d0dd215a4ca0 /drivers/media | |
parent | 24500e2e4bff773d1ca822ca3af2730e5d7f62cb (diff) |
Implemented video capture board led control.
For led control pca9538 is used. Currently both green and red leds are
on for selected video input.
Signed-off-by: Uladzimir Bely <u.bely@sam-solutions.net>
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/tw9910.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index 9108de02881b..4b5528dd7ea9 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c @@ -925,10 +925,14 @@ static int tw9910_g_input(struct soc_camera_device *icd, unsigned int *i) static int tw9910_s_input(struct soc_camera_device *icd, unsigned int i) { struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + struct tw9910_priv *priv = to_tw9910(client); if (tw9910_mask_set(client, INFORM, 0X0C, i << 2)) return -EINVAL; + if (priv->info->switch_input) + priv->info->switch_input(i); + return 0; } @@ -989,6 +993,7 @@ static int tw9910_probe(struct i2c_client *client, struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); struct soc_camera_link *icl; + int input; int ret; if (!icd) { @@ -1026,6 +1031,11 @@ static int tw9910_probe(struct i2c_client *client, kfree(priv); } + input = (i2c_smbus_read_byte_data(client, INFORM) & 0x0C) >> 2; + + if (priv->info->switch_input) + priv->info->switch_input(input); + return ret; } |