All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
To: "Jayachandran C."
	<jayachandranc-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Ben Dooks (embedded platforms)"
	<ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
	"Jean Delvare (PC drivers,
	core)" <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	ganesanr-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org
Subject: Re: [RESEND] [PATCH] i2c: Support for Netlogic XLR/XLS on-chip I2C controller.
Date: Mon, 11 Jul 2011 16:14:15 +0900	[thread overview]
Message-ID: <20110711071412.GB5092@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20110711070202.GB31303-l4W0uAg2RDvWG0bvociYJ/An/qbn1+6FOui0OUZsNXA@public.gmane.org>

On Mon, Jul 11, 2011 at 12:32:03PM +0530, Jayachandran C. wrote:
> On Sat, Jul 09, 2011 at 10:37:42AM +0100, Mark Brown wrote:
> > On Fri, Jul 08, 2011 at 03:42:04PM +0530, Jayachandran C. wrote:

> > > +	if (bus == 0)
> > > +		mmio = netlogic_io_mmio(NETLOGIC_IO_I2C_0_OFFSET);
> > > +	else
> > > +		mmio = netlogic_io_mmio(NETLOGIC_IO_I2C_1_OFFSET);

> > > +	return (u32 *)mmio;

> > Functions like this should be static, though in this case the memory
> > region should be passed in as a resource rather than being embedded in
> > the driver.

> Since it is a SoC device, the address will not change at all. But yes, the
> right way is to use the platform_device resource pointer for this.

That doesn't follow at all - while the address won't change for a
particular SoC the same IP may be used in multiple SoCs.

> > This is going to loop infinitely if the bus locks up for some reason.
> > There should be some limit on how long we try for.  It also looks like
> > we're busy waiting here which isn't terribly good.

> Can add a udelay here, and a loop count.

udelay() still busy waits, and I2C transactions take a *long* time.

  parent reply	other threads:[~2011-07-11  7:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23 13:51 [PATCH] i2c: Support for Netlogic XLR/XLS on-chip I2C controller Jayachandran C.
     [not found] ` <20110623135057.GA26772-l4W0uAg2RDvWG0bvociYJ/An/qbn1+6FOui0OUZsNXA@public.gmane.org>
2011-07-09  9:37   ` [RESEND] " Mark Brown
     [not found]     ` <20110709093742.GA9247-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2011-07-11  7:02       ` Jayachandran C.
     [not found]         ` <20110711070202.GB31303-l4W0uAg2RDvWG0bvociYJ/An/qbn1+6FOui0OUZsNXA@public.gmane.org>
2011-07-11  7:14           ` Mark Brown [this message]
2011-07-13 21:56   ` Ben Dooks
2011-07-13 21:56     ` Ben Dooks

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=20110711071412.GB5092@opensource.wolfsonmicro.com \
    --to=broonie-yzvpicuk2aatku/dhu1wvuem+bqzidxxqq4iyu8u01e@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=ganesanr-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org \
    --cc=jayachandranc-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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.