diff options
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; } |