diff options
| author | Siddharth Zaveri <szaveri@codeaurora.org> | 2015-11-19 18:08:27 -0500 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:11:57 -0700 |
| commit | 4fc3b982ec6271c489ca119139bd2fc32437b09f (patch) | |
| tree | 28ae7441aac91d78c3b642f2f2b8a7a5f56469ee /drivers/video/fbdev/msm | |
| parent | fa52907f1375d0522e8cc501b2215f3b8487550c (diff) | |
msm: adv7533: Set Switch GPIO based on flags
Set the GPIO based on the flag parsed from DTSI. To enable the
switch gpio set the flag and to disable set inverse of the flag.
Change-Id: Iddbe654f2cc6c7e2c5815798099f88d2154d76d5
Signed-off-by: Siddharth Zaveri <szaveri@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev/msm')
| -rw-r--r-- | drivers/video/fbdev/msm/msm_dba/adv7533.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/fbdev/msm/msm_dba/adv7533.c b/drivers/video/fbdev/msm/msm_dba/adv7533.c index 760772cfd1dd..ef2cbd399fb3 100644 --- a/drivers/video/fbdev/msm/msm_dba/adv7533.c +++ b/drivers/video/fbdev/msm/msm_dba/adv7533.c @@ -549,7 +549,8 @@ static int adv7533_gpio_configure(struct adv7533_platform_data *pdata, goto err_switch_gpio; } - gpio_set_value(pdata->switch_gpio, 1); + gpio_set_value(pdata->switch_gpio, + !pdata->switch_flags); msleep(ADV7533_RESET_DELAY); } @@ -1003,9 +1004,10 @@ static int adv7533_probe(struct i2c_client *client_, } if (pdata->adv_output) { - gpio_set_value(pdata->switch_gpio, 0); + gpio_set_value(pdata->switch_gpio, pdata->switch_flags); } else { - gpio_set_value(pdata->switch_gpio, 1); + gpio_set_value(pdata->switch_gpio, + !pdata->switch_flags); goto err_gpio_cfg; } } |
