From: Lee Jones <lee.jones@linaro.org>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
STEricsson_nomadik_linux@list.st.com,
linus.walleij@stericsson.com, arnd@arndb.de,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver
Date: Fri, 31 Aug 2012 13:04:15 +0100 [thread overview]
Message-ID: <20120831120411.GB5962@gmail.com> (raw)
In-Reply-To: <20120831112258.GA2624@pengutronix.de>
> Is there some dependency other than updating the dts files? If not, I'd
> like to pick up the patch via I2C.
There's no other dependency. Feel free to take them into your tree.
> > +static void nmk_i2c_of_probe(struct device_node *np,
> > + struct nmk_i2c_controller *pdata)
> > +{
> > + /* Provide the default configuration as a base. */
> > + pdata = &u8500_i2c;
>
> ?????? I wonder how that could work... have you tested the patch?
Wow, that's a great spot!
I have tested the patch, but I don't have any i2c devices, so can't
test full functionality. I, wrongly it seems, assumed there would be
a complaint from the I2C subsystem if any of the values seemed wrong.
What I will do before next submission is print out the entire pdata
structure to ensure it's populated in the correct way.
> > +
> > + of_property_read_u32(np, "clock-frequency", (u32*)&pdata->clk_freq);
>
> Might be worth changing clk_freq to u32?
Yes, makes sense.
> > +
> > + /* This driver only supports 'standard' and 'fast' modes of operation. */
> > + if (pdata->clk_freq <= 100000)
> > + pdata->sm = I2C_FREQ_MODE_STANDARD;
>
> Is standard == 100000 Hz?
Well it depends on how you interpret the comments in:
include/linux/platform_data/i2c-nomadik.h
enum i2c_freq_mode {
I2C_FREQ_MODE_STANDARD, /* up to 100 Kb/s */
I2C_FREQ_MODE_FAST, /* up to 400 Kb/s */
I2C_FREQ_MODE_HIGH_SPEED, /* up to 3.4 Mb/s */
I2C_FREQ_MODE_FAST_PLUS, /* up to 1 Mb/s */
};
I guess your guess would be better than mine.
> > + else
> > + pdata->sm = I2C_FREQ_MODE_FAST;
>
> If those two are fixed frequencies, you should omit a warning if the
> devicetree has a different frequency set and report which one is going
> to be used actually.
Well, again by the comments above I would say that in between values
were valid, but I'm willing to bow down to your knowledge if you think
they are fixed values?
Thanks for reviewing.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2012-08-31 12:04 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 15:01 [PATCH 1/3] ARM: ux500: Add i2c configurations to the Device Tree for DB8500 based devices Lee Jones
2012-08-23 15:01 ` [PATCH 2/3] Documentation: Device Tree binding information for i2c-nomadik driver Lee Jones
2012-08-23 15:01 ` [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver Lee Jones
2012-08-27 23:42 ` Linus Walleij
2012-08-31 10:36 ` Lee Jones
2012-08-31 11:22 ` Wolfram Sang
2012-08-31 12:04 ` Lee Jones [this message]
2012-08-31 12:23 ` Lee Jones
2012-09-03 9:22 ` Linus Walleij
2012-09-03 9:44 ` Wolfram Sang
2012-09-03 9:50 ` Lee Jones
2012-09-03 10:07 ` Lee Jones
2012-09-03 11:07 ` Linus Walleij
[not found] ` <CAF2Aj3j25w1Nn9O6hV+=i-j1ts_p_Ucswk_M7r04S7i5BzPkHg@mail.gmail.com>
2012-09-03 11:58 ` Linus Walleij
2012-09-03 12:34 ` Lee Jones
2012-09-03 13:19 ` Linus Walleij
2012-09-03 13:28 ` Lee Jones
2012-09-03 14:33 ` Stephen Warren
2012-09-03 14:35 ` Linus Walleij
2012-09-03 15:09 ` Rob Herring
2012-09-03 15:20 ` Lee Jones
2012-09-04 14:28 ` Arnd Bergmann
2012-09-04 17:27 ` Linus Walleij
2012-09-05 6:41 ` Lee Jones
2012-09-05 6:53 ` Linus Walleij
2012-09-04 17:35 ` Alessandro Rubini
2012-09-05 7:33 ` Lee Jones
2012-09-05 8:22 ` Linus Walleij
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=20120831120411.GB5962@gmail.com \
--to=lee.jones@linaro.org \
--cc=STEricsson_nomadik_linux@list.st.com \
--cc=arnd@arndb.de \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=w.sang@pengutronix.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;
as well as URLs for NNTP newsgroup(s).