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>
This commit is contained in:
parent
fa52907f13
commit
4fc3b982ec
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue