[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe15f155-becf-5e8e-ce92-962e193c9b14@gmail.com>
Date: Sun, 6 Sep 2020 01:08:38 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Laxman Dewangan <ldewangan@...dia.com>,
Wolfram Sang <wsa@...-dreams.de>,
Andy Shevchenko <andy.shevchenko@...il.com>,
linux-i2c@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 10/31] i2c: tegra: Use clk-bulk helpers
06.09.2020 00:56, Michał Mirosław пишет:
> 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?
Yes, it's not needed. The check wasn't really needed in the first place.
Powered by blists - more mailing lists