From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Yicong Yang <yangyicong@hisilicon.com>
Cc: wsa@kernel.org, linux-i2c@vger.kernel.org, digetx@gmail.com,
treding@nvidia.com, jarkko.nikula@linux.intel.com,
rmk+kernel@armlinux.org.uk, song.bao.hua@hisilicon.com,
john.garry@huawei.com, prime.zeng@huawei.com,
linuxarm@huawei.com
Subject: Re: [PATCH v3 2/3] i2c: add support for HiSilicon I2C controller
Date: Wed, 24 Mar 2021 13:16:38 +0200 [thread overview]
Message-ID: <YFsfljiMwvlz8aNn@smile.fi.intel.com> (raw)
In-Reply-To: <439bfa6f-139a-ee5b-d8c7-324e5084ecb3@hisilicon.com>
On Wed, Mar 24, 2021 at 06:21:36PM +0800, Yicong Yang wrote:
> On 2021/3/23 1:04, Andy Shevchenko wrote:
> > On Mon, Mar 22, 2021 at 07:10:12PM +0800, Yicong Yang wrote:
...
> >> +static const char *hisi_i2c_speed_string(u32 bus_freq_hz)
> >> +{
> >> + switch (bus_freq_hz) {
> >> + case I2C_MAX_STANDARD_MODE_FREQ:
> >> + return "100K";
> >> + case I2C_MAX_FAST_MODE_FREQ:
> >> + return "400K";
> >> + case I2C_MAX_HIGH_SPEED_MODE_FREQ:
> >> + return "3.4M";
> >> + default:
> >> + return "unknown";
> >> + }
> >> +}
> >
> > Just realized that if you print the name of the mode (and maybe frequency
> > value) then it can be moved to generic I²C code and other will benefit out of
> > this (DesignWare is the first in my mind).
>
> sure, that's good. but the i2c core doesn't make use of the speed mode
> information so maybe print of this information is rather driver depended.
Yes, but it's useful. And since we will have at least two users of this it is a
good justification to use I²C core to keep and provide this API.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-03-24 11:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 11:10 [PATCH v3 0/3] Add support for HiSilicon I2C controller Yicong Yang
2021-03-22 11:10 ` [PATCH v3 1/3] i2c: core: add managed function for adding i2c adapters Yicong Yang
2021-03-22 16:35 ` Andy Shevchenko
2021-03-24 8:26 ` Yicong Yang
2021-03-24 11:05 ` Andy Shevchenko
2021-03-22 16:45 ` Dmitry Osipenko
2021-03-24 8:29 ` Yicong Yang
2021-03-24 11:06 ` Andy Shevchenko
2021-03-22 11:10 ` [PATCH v3 2/3] i2c: add support for HiSilicon I2C controller Yicong Yang
2021-03-22 15:21 ` Dmitry Osipenko
2021-03-24 9:30 ` Yicong Yang
2021-03-24 12:26 ` Dmitry Osipenko
2021-03-22 16:59 ` Andy Shevchenko
2021-03-24 10:07 ` Yicong Yang
2021-03-24 11:15 ` Andy Shevchenko
2021-03-22 17:04 ` Andy Shevchenko
2021-03-24 10:21 ` Yicong Yang
2021-03-24 11:16 ` Andy Shevchenko [this message]
2021-03-22 11:10 ` [PATCH v3 3/3] MAINTAINERS: Add maintainer for HiSilicon I2C driver Yicong Yang
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=YFsfljiMwvlz8aNn@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=digetx@gmail.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=john.garry@huawei.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=prime.zeng@huawei.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=song.bao.hua@hisilicon.com \
--cc=treding@nvidia.com \
--cc=wsa@kernel.org \
--cc=yangyicong@hisilicon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.