diff --git a/drivers/media/platform/mxc/capture/ov5647_mipi.c b/drivers/media/platform/mxc/capture/ov5647_mipi.c index d5d6c6362fca..6732db56fbc6 100644 --- a/drivers/media/platform/mxc/capture/ov5647_mipi.c +++ b/drivers/media/platform/mxc/capture/ov5647_mipi.c @@ -1611,17 +1611,18 @@ static int ov5647_probe(struct i2c_client *client, enum of_gpio_flags flags; /* request power down pin */ + /* power down pin is ACTIVE HIGH not ACTIVE LOW! (see ov5640_mipi.c) */ pwn_gpio = of_get_named_gpio_flags(dev->of_node, "pwn-gpios", 0, &flags); if (gpio_is_valid(pwn_gpio)) { - pwn_active = !(flags & OF_GPIO_ACTIVE_LOW); - init = (flags & OF_GPIO_ACTIVE_LOW) ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW; + pwn_active = !(flags & OF_GPIO_ACTIVE_HIGH); + init = (flags & OF_GPIO_ACTIVE_HIGH) ? GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH; //swapped low and high in each instance. unsure of 2nd and 3rd retval = devm_gpio_request_one(dev, pwn_gpio, init, "ov5647_mipi_pwdn"); if (retval < 0) { dev_warn(dev, "request of pwn_gpio failed"); pwn_gpio = -EINVAL; } - } + } /* request reset pin */ rst_gpio = of_get_named_gpio_flags(dev->of_node, "rst-gpios", 0, &flags);