Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions drivers/media/platform/mxc/capture/ov5647_mipi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down