Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8128416c authored by Siddharth Zaveri's avatar Siddharth Zaveri
Browse files

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: default avatarSiddharth Zaveri <szaveri@codeaurora.org>
parent 68e142c6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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;
		}
	}