lkml.org 
[lkml]   [2020]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 10/31] i2c: tegra: Use clk-bulk helpers
On Sat, Sep 05, 2020 at 11:41:30PM +0300, Dmitry Osipenko wrote:
> Use clk-bulk helpers and factor out clocks initialization into separate
> function in order to make code cleaner.
[...]
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
[...]
> static const struct tegra_i2c_hw_feature tegra194_i2c_hw = {
> .has_continue_xfer_support = true,
> .has_per_pkt_xfer_complete_irq = true,
> - .has_single_clk_source = true,
> .clk_divisor_hs_mode = 1,
> .clk_divisor_std_mode = 0x4f,
> .clk_divisor_fast_mode = 0x3c,
[...]
> +static int tegra_i2c_init_clocks(struct tegra_i2c_dev *i2c_dev)
> +{
> + unsigned int i;
> + int err;
> +
> + err = devm_clk_bulk_get_all(i2c_dev->dev, &i2c_dev->clocks);
> + if (err < 0)
> + return err;
> +
> + i2c_dev->nclocks = err
[...]

You loose checking whether number of clocks matches the device version.
Is this intended?

Best Regards,
Michał Mirosław

\
 
 \ /
  Last update: 2020-09-05 23:57    [W:0.297 / U:26.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site