public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
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 12:00:42 +0100	[thread overview]
Message-ID: <20200326110042.GB1538@ninjato> (raw)
In-Reply-To: <20200326104701.GM1922688@smile.fi.intel.com>

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]


> 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;
}

Or?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-03-26 11:00 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 [this message]
2020-03-26 11:16     ` Andy Shevchenko

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=20200326110042.GB1538@ninjato \
    --to=wsa@the-dreams.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /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