[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5D9bmXt9_qGTXw+qUG6JDHfuNtx++fJPJtn+mj1Dzsbag@mail.gmail.com>
Date:   Fri, 13 Mar 2020 10:15:31 -0300
From:   Fabio Estevam <festevam@...il.com>
To:     Robert Foss <robert.foss@...aro.org>
Cc:     Dongchun Zhu <dongchun.zhu@...iatek.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Sakari Ailus <sakari.ailus@....fi>,
        Tomasz Figa <tfiga@...omium.org>,
        linux-media <linux-media@...r.kernel.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [v2 2/3] media: ov8856: Add devicetree support
Hi Robert,
On Fri, Mar 13, 2020 at 8:04 AM Robert Foss <robert.foss@...aro.org> wrote:
> +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);
> +
> +       ret = regulator_bulk_enable(ARRAY_SIZE(ov8856_supply_names),
> +                                   ov8856->supplies);
> +       if (ret < 0) {
> +               dev_err(&client->dev, "failed to enable regulators\n");
> +               goto disable_clk;
> +       }
> +
> +       gpiod_set_value_cansleep(ov8856->reset_gpio, GPIOD_OUT_LOW);
and here it should be:
gpiod_set_value_cansleep(ov8856->reset_gpio, 0);
Also, don't you need a reset period between the two?
Powered by blists - more mailing lists
 
