From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V5] ARM: OMAP: I2C: New read, write and probe functions
Date: Sun, 2 Jun 2013 09:08:56 -0400 [thread overview]
Message-ID: <20130602130856.GD9556@bill-the-cat> (raw)
In-Reply-To: <51AAD632.9090903@denx.de>
On Sun, Jun 02, 2013 at 07:20:50AM +0200, Heiko Schocher wrote:
> Hello Lubomir,
>
> Am 01.06.2013 18:44, schrieb Lubomir Popov:
> > New i2c_read, i2c_write and i2c_probe functions, tested on OMAP4
> > (4430/60/70), OMAP5 (5430) and AM335X (3359); should work on older
> > OMAPs and derivatives as well. The only anticipated exception would
> > be the OMAP2420, which shall require driver modification.
> > - Rewritten i2c_read to operate correctly with all types of chips
> > (old function could not read consistent data from some I2C slaves).
> > - Optimised i2c_write.
> > - New i2c_probe, performs write access vs read. The old probe could
> > hang the system under certain conditions (e.g. unconfigured pads).
> > - The read/write/probe functions try to identify unconfigured bus.
> > - Status functions now read irqstatus_raw as per TRM guidelines
> > (except for OMAP243X and OMAP34XX).
> > - Driver now supports up to I2C5 (OMAP5).
> >
> > Signed-off-by: Lubomir Popov <lpopov@mm-sol.com>
> > ---
> > V5 changes:
> > - Replaced some printf() with puts().
> > - Minor formatting touches, checkpatch-clean.
> > V4 changes:
> > - New i2c_probe is built unconditionally, old code is removed.
> > CONFIG_I2C_PROBE_WRITE is no longer needed.
> > - Added a small delay to work around breakage in AM335X SPL.
> > - Some whitespace and general formatting cleanup.
> > V3 changes:
> > - Removed old functions and conditional compilation. New functions
> > are now built unconditionally for all SoCs using this driver. The
> > only chip that should break is the OMAP2420 dinosaur.
> > - Interrupts are enabled for OMAP243X and OMAP34XX only (where we
> > don't have an irqstatus_raw register).
> > V2 changes:
> > - Probe tries to identify misconfigured pads as well.
> > - Status is retrieved from irqstatus_raw rather than from stat.
> > - Some minor style & format changes.
> >
> > drivers/i2c/omap24xx_i2c.c | 490 +++++++++++++++++++++++++++------------------
> > 1 file changed, 299 insertions(+), 191 deletions(-)
>
> Tested on 3 arm335x based boards, which one uses i2c in SPL
> code for getting ram parameters, so:
>
> Tested-by: Heiko Schocher <hs@denx.de>
>
> Just one comment:
> Your patch has 9 checkpatch warnings which are all lines
> (printf strings) over 80 chars ... some with lines > 110
> characters ... I know, tom gave you a OK for this ... I am
> also unhappy with splitting a printf-string over 2 or more lines ...
> but we have this 80 characters rule ... Wolfgang, what do you
> think? Should we loosen this rule for printf-strings?
We have loosened the rule for printf strings already, in order to make
it easier for tracking down error messages. However, checkpatch needs
tweaking at times for our print functions vs kernel print functions.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130602/85a78bdc/attachment.pgp>
next prev parent reply other threads:[~2013-06-02 13:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-01 16:44 [U-Boot] [PATCH V5] ARM: OMAP: I2C: New read, write and probe functions Lubomir Popov
2013-06-02 5:20 ` Heiko Schocher
2013-06-02 11:42 ` Lubomir Popov
2013-06-03 5:13 ` Heiko Schocher
2013-06-04 4:26 ` Heiko Schocher
2013-06-04 6:49 ` Lubomir Popov
2013-06-04 7:03 ` Heiko Schocher
2013-06-04 21:38 ` Tom Rini
2013-06-02 13:08 ` Tom Rini [this message]
2013-06-03 5:15 ` Heiko Schocher
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=20130602130856.GD9556@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.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