Message ID | 20220615152254.794909-4-tommaso.merciai@amarulasolutions.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
On Wed, Jun 15, 2022 at 5:23 PM Tommaso Merciai <tommaso.merciai@amarulasolutions.com> wrote: > > Rename clk pdata pointer into xvclk (system clock input), more explicit > > Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com> > --- > drivers/media/i2c/ov5693.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c > index 9e84468d920e..e1f9486d7f62 100644 > --- a/drivers/media/i2c/ov5693.c > +++ b/drivers/media/i2c/ov5693.c > @@ -157,7 +157,7 @@ struct ov5693_device { > struct gpio_desc *reset; > struct gpio_desc *powerdown; > struct regulator_bulk_data supplies[OV5693_NUM_SUPPLIES]; > - struct clk *clk; > + struct clk *xvclk; > > struct ov5693_mode { > struct v4l2_rect crop; > @@ -794,7 +794,7 @@ static void ov5693_sensor_powerdown(struct ov5693_device *ov5693) > > regulator_bulk_disable(OV5693_NUM_SUPPLIES, ov5693->supplies); > > - clk_disable_unprepare(ov5693->clk); > + clk_disable_unprepare(ov5693->xvclk); > } > > static int ov5693_sensor_powerup(struct ov5693_device *ov5693) > @@ -804,7 +804,7 @@ static int ov5693_sensor_powerup(struct ov5693_device *ov5693) > gpiod_set_value_cansleep(ov5693->reset, 1); > gpiod_set_value_cansleep(ov5693->powerdown, 1); > > - ret = clk_prepare_enable(ov5693->clk); > + ret = clk_prepare_enable(ov5693->xvclk); > if (ret) { > dev_err(ov5693->dev, "Failed to enable clk\n"); > goto fail_power; > @@ -1408,13 +1408,13 @@ static int ov5693_probe(struct i2c_client *client) > > v4l2_i2c_subdev_init(&ov5693->sd, client, &ov5693_ops); > > - ov5693->clk = devm_clk_get(&client->dev, "xvclk"); > - if (IS_ERR(ov5693->clk)) { > + ov5693->xvclk = devm_clk_get(&client->dev, "xvclk"); > + if (IS_ERR(ov5693->xvclk)) { > dev_err(&client->dev, "Error getting clock\n"); > - return PTR_ERR(ov5693->clk); > + return PTR_ERR(ov5693->xvclk); > } > > - clk_rate = clk_get_rate(ov5693->clk); > + clk_rate = clk_get_rate(ov5693->xvclk); > if (clk_rate != OV5693_XVCLK_FREQ) > dev_warn(&client->dev, "Found clk freq %u, expected %u\n", > clk_rate, OV5693_XVCLK_FREQ); > -- > 2.25.1 > Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 9e84468d920e..e1f9486d7f62 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -157,7 +157,7 @@ struct ov5693_device { struct gpio_desc *reset; struct gpio_desc *powerdown; struct regulator_bulk_data supplies[OV5693_NUM_SUPPLIES]; - struct clk *clk; + struct clk *xvclk; struct ov5693_mode { struct v4l2_rect crop; @@ -794,7 +794,7 @@ static void ov5693_sensor_powerdown(struct ov5693_device *ov5693) regulator_bulk_disable(OV5693_NUM_SUPPLIES, ov5693->supplies); - clk_disable_unprepare(ov5693->clk); + clk_disable_unprepare(ov5693->xvclk); } static int ov5693_sensor_powerup(struct ov5693_device *ov5693) @@ -804,7 +804,7 @@ static int ov5693_sensor_powerup(struct ov5693_device *ov5693) gpiod_set_value_cansleep(ov5693->reset, 1); gpiod_set_value_cansleep(ov5693->powerdown, 1); - ret = clk_prepare_enable(ov5693->clk); + ret = clk_prepare_enable(ov5693->xvclk); if (ret) { dev_err(ov5693->dev, "Failed to enable clk\n"); goto fail_power; @@ -1408,13 +1408,13 @@ static int ov5693_probe(struct i2c_client *client) v4l2_i2c_subdev_init(&ov5693->sd, client, &ov5693_ops); - ov5693->clk = devm_clk_get(&client->dev, "xvclk"); - if (IS_ERR(ov5693->clk)) { + ov5693->xvclk = devm_clk_get(&client->dev, "xvclk"); + if (IS_ERR(ov5693->xvclk)) { dev_err(&client->dev, "Error getting clock\n"); - return PTR_ERR(ov5693->clk); + return PTR_ERR(ov5693->xvclk); } - clk_rate = clk_get_rate(ov5693->clk); + clk_rate = clk_get_rate(ov5693->xvclk); if (clk_rate != OV5693_XVCLK_FREQ) dev_warn(&client->dev, "Found clk freq %u, expected %u\n", clk_rate, OV5693_XVCLK_FREQ);
Rename clk pdata pointer into xvclk (system clock input), more explicit Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com> --- drivers/media/i2c/ov5693.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)