From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [RFC PATCH] i2c: refactor parsing of timings
Date: Thu, 26 Mar 2020 13:16:35 +0200 [thread overview]
Message-ID: <20200326111635.GO1922688@smile.fi.intel.com> (raw)
In-Reply-To: <20200326110042.GB1538@ninjato>
On Thu, Mar 26, 2020 at 12:00:42PM +0100, Wolfram Sang wrote:
>
> > However, looking into the code, I would go a bit further (perhaps as a separate
> > change) and export parsing of clock-frequency, because tons of drivers only
> > need one property, i.e. clock-frequency out of firmware.
>
> Cool idea. Could be easily something like this (typed from the top of my
> head):
>
> static inline u32 i2c_parse_fw_bus_speed(struct device *dev)
> {
> u32 speed;
>
> i2c_parse_timing(dev, "clock-frequency", &speed, I2C_MAX_STANDARD_MODE_FREQ, true);
>
> return speed;
> }
Yes, looks like this, thanks!
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2020-03-26 11:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 10:16 [RFC PATCH] i2c: refactor parsing of timings Wolfram Sang
2020-03-26 10:36 ` Geert Uytterhoeven
2020-03-26 10:50 ` Andy Shevchenko
2020-03-26 10:52 ` Wolfram Sang
2020-03-26 11:15 ` Geert Uytterhoeven
2020-03-26 12:05 ` Andy Shevchenko
2020-03-26 10:47 ` Andy Shevchenko
2020-03-26 11:00 ` Wolfram Sang
2020-03-26 11:16 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200326111635.GO1922688@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox