From: Sebastian Reichel <sre@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-i2c <linux-i2c@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND] i2c: add sc18is600 driver
Date: Sun, 18 Jun 2017 16:02:28 +0200 [thread overview]
Message-ID: <20170618140228.lmrvlgmp5vwnbblv@earth> (raw)
In-Reply-To: <CAHp75VexRjTZ+kbrPvD=RWy+_OBSnKAYj1-TX8aO5QgyOsn7nA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1522 bytes --]
Hi Andy,
Thanks for your feedback.
On Sat, Jun 17, 2017 at 09:13:32PM +0300, Andy Shevchenko wrote:
> On Tue, Jun 13, 2017 at 6:47 PM, Sebastian Reichel <sre@kernel.org> wrote:
> > This adds an I²C master driver for SPI -> I²C bus bridge chips.
> > It currently supports NXP's SC18IS600 and SC18IS601, as well as
> > Silicon Labs' CP2120. The driver was only tested on SC18IS600.
>
> > +static void sc18is600_setup_clock_frequency(struct sc18is600dev *dev)
> > +{
> > + int reg = DIV_ROUND_UP(dev->clock_base, dev->i2c_clock_frequency);
> > +
>
> > + if (reg < 5)
> > + reg = 5;
> > + if (reg > 255)
> > + reg = 255;
>
> clamp_t()
I will use clamp_val()
> [...]
> lot's of suggestions for improvements.
> [...]
Ack.
> ...and better to use s600dev or alike to avoid confusion.
>
> > + return -ENOMEM;
>
> > + snprintf(dev->adapter.name, sizeof(dev->adapter.name),
>
> > + "SC18IS600 at SPI %02d device %02d",
>
> Isn't too much for adapter name?
> I don't remember if it's part of ABI, in that case it's even worse.
Well, it's displayed by "i2cdetect -l". Here are the names from some
other drivers, which I used as reference:
i2c-tiny-usb at bus %03d device %03d
i2c-diolan-u2c at bus %03d device %03d
OSIF at bus %03d device %03d
SMBus Via Pro adapter at %04x
SMBus SIS5595 adapter at %04x
> [...]
> lot's of suggestions for improvements.
> [...]
Ack.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-06-18 14:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 15:47 [PATCH RESEND] i2c: add sc18is600 driver Sebastian Reichel
[not found] ` <20170613154748.7018-1-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-17 18:13 ` Andy Shevchenko
2017-06-18 14:02 ` Sebastian Reichel [this message]
2017-06-18 14:17 ` Andy Shevchenko
2017-06-18 15:18 ` Wolfram Sang
2017-06-19 16:20 ` Wolfram Sang
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=20170618140228.lmrvlgmp5vwnbblv@earth \
--to=sre@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--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