Thread (17 messages) 17 messages, 6 authors, 2020-03-31

Re: [v2 2/3] media: ov8856: Add devicetree support

From: Robert Foss <hidden>
Date: 2020-03-31 13:37:36
Also in: linux-arm-kernel, linux-media, lkml

On Thu, 26 Mar 2020 at 13:18, Robert Foss [off-list ref] wrote:
Hey Fabio,

On Fri, 13 Mar 2020 at 14:15, Fabio Estevam [off-list ref] wrote:
quoted
Hi Robert,

On Fri, Mar 13, 2020 at 8:04 AM Robert Foss [off-list ref] wrote:
quoted
+static int __ov8856_power_on(struct ov8856 *ov8856)
+{
+       struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
+       int ret;
+
+       ret = clk_prepare_enable(ov8856->xvclk);
+       if (ret < 0) {
+               dev_err(&client->dev, "failed to enable xvclk\n");
+               return ret;
+       }
+
+       gpiod_set_value_cansleep(ov8856->reset_gpio, GPIOD_OUT_HIGH);
The parameter of gpiod_set_value_cansleep() is typically 0 (inactive
state) or 1 (active state), so:

 gpiod_set_value_cansleep(ov8856->reset_gpio, 1);
Ack
After testing this change, it breaks the driver during probing.
I had a quick look into GPIOD_OUT_HIGH & LOW definitions, and they
seem to never be 0 or 1.

https://elixir.bootlin.com/linux/latest/source/include/linux/gpio/consumer.h#L38

GPIOD_ASIS = 0,
GPIOD_IN = 1,
GPIOD_OUT_LOW = 3
GPIOD_OUT_HIGH = 7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help