linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: michael.williamson@criticallink.com (Mike Williamson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6] da8xx: enable the use of the ICPFUNC in i2c-davinci
Date: Wed, 13 Apr 2011 19:04:34 -0400	[thread overview]
Message-ID: <BANLkTikskhqNk3NihqJ5kZhFqn1YpJEN9A@mail.gmail.com> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB593024C8B3C9F@dbde02.ent.ti.com>

On Wed, Apr 13, 2011 at 11:10 AM, Nori, Sekhar <nsekhar@ti.com> wrote:
>
> Hi Ben,
>
> On Wed, Apr 06, 2011 at 03:08:09, Ben Gardiner wrote:
> > Both the da850 and da830 have an I2C controller which has the ICPFUNC
> > registers. Indicate this for all da830 and da850 boards by setting the
> > has_pfunc flag true in the da8xx utility setup routine for registering the
> > I2C controller
> >
> > Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
> > Cc: Sekhar Nori <nsekhar@ti.com>
> > Cc: Ben Dooks <ben-linux@fluff.org>
> >
> > ---
> > ?arch/arm/mach-davinci/devices-da8xx.c | ? ?6 ++++++
> > ?1 files changed, 6 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
> > index beda8a4..da01558 100644
> > --- a/arch/arm/mach-davinci/devices-da8xx.c
> > +++ b/arch/arm/mach-davinci/devices-da8xx.c
> > @@ -324,6 +324,12 @@ int __init da8xx_register_i2c(int instance,
> > ? ? ? else
> > ? ? ? ? ? ? ? return -EINVAL;
> >
> > + ? ? /*
> > + ? ? ?* Both the DA850 and DA830 have an I2C controller which has the
> > + ? ? ?* ICPFUNC et. al. registers
> > + ? ? ?*/
> > + ? ? pdata->has_pfunc = 1;
>
> The I2C driver implements a default platform data
> so it should actually be legal for a DA8x board to
> pass NULL platform data. In that case this line
> will crash. You should either check for pdata to
> be NULL or just let each board choose whether it
> needs recovery (I think the better option).
>

I actually had a problem with using NULL for pdata with davinci I2C
and had submitted a patch here that sort of fell on the floor.  The
problem was that the i2c_davinci_calc_clk_dividers is using
platform_data without a check as described above.  So at the moment
using NULL doesn't really work, best as I can tell...

https://lkml.org/lkml/2010/9/4/119

FWIW.

-Mike

  parent reply	other threads:[~2011-04-13 23:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 21:38 [PATCH 0/6] i2c-davinci gpio pulsed SCL recovery with ICPFUNC Ben Gardiner
2011-04-05 21:38 ` [PATCH 1/6] i2c-davinci: register dump before attempted bus recovery Ben Gardiner
2011-04-05 21:38 ` [PATCH 2/6] i2c-davinci: convert davinci_i2c_platform_data to kerneldoc Ben Gardiner
2011-04-05 21:38 ` [PATCH 3/6] i2c-davinci: introduce a dev-> function pointer for scl pulsing Ben Gardiner
2011-04-05 21:38 ` [PATCH 4/6] i2c-davinci: use the DA8xx's ICPFUNC to toggle I2C as gpio Ben Gardiner
2011-04-05 21:38 ` [PATCH 5/6] i2c-davinci: if device has pfunc register, dump that group also Ben Gardiner
2011-04-05 21:38 ` [PATCH 6/6] da8xx: enable the use of the ICPFUNC in i2c-davinci Ben Gardiner
2011-04-13 15:10   ` Nori, Sekhar
2011-04-13 15:22     ` Ben Gardiner
2011-04-13 15:42       ` Nori, Sekhar
2011-04-13 16:03         ` Ben Gardiner
2011-04-13 23:04     ` Mike Williamson [this message]
2011-04-14  9:26       ` Nori, Sekhar
2011-04-13 16:25 ` [PATCH 0/6] i2c-davinci gpio pulsed SCL recovery with ICPFUNC Nori, Sekhar
2011-04-18 21:36   ` Ben Gardiner
2011-04-19  1:47     ` Jon Povey
2011-04-19 12:20       ` Ben Gardiner
2011-04-20  1:34         ` Jon Povey

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=BANLkTikskhqNk3NihqJ5kZhFqn1YpJEN9A@mail.gmail.com \
    --to=michael.williamson@criticallink.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).