public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Felipe Balbi <balbi@ti.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	David Brownell <david-b@pacbell.net>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC/PATCH 3/3] mfd: twl4030-irq: implement bus_*lock
Date: Wed, 29 Dec 2010 02:38:28 +0200	[thread overview]
Message-ID: <1293583108.1822.3.camel@eowin> (raw)
In-Reply-To: <20101228235836.GA2609@opensource.wolfsonmicro.com>

Hi,

On Tue, 2010-12-28 at 23:58 +0000, Mark Brown wrote:
> On Tue, Dec 28, 2010 at 07:14:19PM +0200, Felipe Balbi wrote:
> 
> > +static void twl4030_sih_bus_sync_unlock(unsigned int irq)
> > +{
> > +       struct sih_agent        *agent = get_irq_chip_data(irq);
> > +
> > +       mutex_unlock(&agent->irq_lock);
> > +}
> 
> I suspect you need to do some sort of sync with the hardware here - the
> _sync bit of the name comes from the fact that the mask and unmask stuff
> is still called with IRQs disabled and so can't touch and I2C chip, this
> is called after reenabling them give a chance for the updates done to
> be reflected in the hardware.  The implementation everyone else has done
> is to update a register cache in the other functions then write that
> out here before dropping the mutex.

now that I look at some gpio chips I see what you're saying, will update
that tomorrow. Thanks

> >  static struct irq_chip twl4030_sih_irq_chip = {
> >  	.name		= "twl4030",
> >  	.mask		= twl4030_sih_mask,
> >  	.unmask		= twl4030_sih_unmask,
> >  	.set_type	= twl4030_sih_set_type,
> > +	.bus_lock	= twl4030_sih_bus_lock,
> > +	.bus_sync_unlock = twl4030_sih_bus_sync_unlock,
> >  };
> 
> I just realised that this collides with the conversion to the irq_
> versions that has been done on the driver in -next by either myself or
> Lennart (we both submitted essentially the same patches and a couple of
> his went in) - that was a purely mechanical conversion that didn't
> address any of the issues this patch addresses but they're touching the
> same code.

no problem. This will actually only be able on 2.6.39 merge window
anyway, so I'll have plenty of time to rebase on 2.6.38 and get these
patches queued.

ps: sorry the mail change, out of the office.

-- 
balbi


  reply	other threads:[~2010-12-29  0:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-28 13:59 [RFC/PATCH 0/2] Move twl*-irq.c to threaded_irq infrastructure Felipe Balbi
2010-12-28 13:59 ` [RFC/PATCH 1/2] mfd: twl6030-irq: move to threaded_irq Felipe Balbi
2010-12-28 15:46   ` Mark Brown
2010-12-28 16:16     ` Felipe Balbi
2010-12-28 17:14       ` [RFC/PATCH 0/3] TWL4030 IRQ Changes Felipe Balbi
2010-12-28 17:14         ` [RFC/PATCH 1/3] mfd: twl4030-irq: move to threaded_irq Felipe Balbi
2010-12-28 17:14         ` [RFC/PATCH 2/3] mfd: twl4030-irq: drop the workqueue hackery Felipe Balbi
2010-12-28 17:14         ` [RFC/PATCH 3/3] mfd: twl4030-irq: implement bus_*lock Felipe Balbi
2010-12-28 23:58           ` Mark Brown
2010-12-29  0:38             ` Felipe Balbi [this message]
2010-12-29 12:28               ` Felipe Balbi
2010-12-30 12:18                 ` Mark Brown
2010-12-30 12:26                   ` Felipe Balbi
2010-12-28 17:36         ` [RFC/PATCH 0/3] TWL4030 IRQ Changes Felipe Balbi
2010-12-28 17:41           ` Mark Brown
2010-12-29  0:39             ` Felipe Balbi
2010-12-28 17:40     ` [RFC/PATCH 1/2] mfd: twl6030-irq: move to threaded_irq David Brownell
2010-12-28 17:45       ` Mark Brown
2010-12-28 13:59 ` [RFC/PATCH 2/2] mfd: twl4030-irq: " Felipe Balbi

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=1293583108.1822.3.camel@eowin \
    --to=me@felipebalbi.com \
    --cc=balbi@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    /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