media: i2c: s5kjn1: fix power off reset & pwdn state

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I14b40260cf0ea9e2beeeafc2a0ef0a1ffcc362df
This commit is contained in:
Wang Panzhenzhuan
2022-06-20 08:25:52 +00:00
parent 9659d6d260
commit 624d3eb4f8

View File

@@ -1647,12 +1647,12 @@ static void __s5kjn1_power_off(struct s5kjn1 *s5kjn1)
}
if (!IS_ERR(s5kjn1->pwdn_gpio))
gpiod_direction_output(s5kjn1->pwdn_gpio, 1);
gpiod_direction_output(s5kjn1->pwdn_gpio, 0);
clk_disable_unprepare(s5kjn1->xvclk);
if (!IS_ERR(s5kjn1->reset_gpio))
gpiod_direction_output(s5kjn1->reset_gpio, 1);
gpiod_direction_output(s5kjn1->reset_gpio, 0);
if (!IS_ERR_OR_NULL(s5kjn1->pins_sleep)) {
ret = pinctrl_select_state(s5kjn1->pinctrl,
s5kjn1->pins_sleep);