2010-12-13 12:31:25

by Lennert Buytenhek

[permalink] [raw]
Subject: [PATCH 18/20] mfd: wm831x: irq_data conversion.

Signed-off-by: Lennert Buytenhek <[email protected]>
---
drivers/mfd/wm831x-irq.c | 37 +++++++++++++++++++------------------
1 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index 294183b..8f9f5a9 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -345,16 +345,16 @@ static inline struct wm831x_irq_data *irq_to_wm831x_irq(struct wm831x *wm831x,
return &wm831x_irqs[irq - wm831x->irq_base];
}

-static void wm831x_irq_lock(unsigned int irq)
+static void wm831x_irq_lock(struct irq_data *d)
{
- struct wm831x *wm831x = get_irq_chip_data(irq);
+ struct wm831x *wm831x = irq_data_get_irq_chip_data(d);

mutex_lock(&wm831x->irq_lock);
}

-static void wm831x_irq_sync_unlock(unsigned int irq)
+static void wm831x_irq_sync_unlock(struct irq_data *d)
{
- struct wm831x *wm831x = get_irq_chip_data(irq);
+ struct wm831x *wm831x = irq_data_get_irq_chip_data(d);
int i;

for (i = 0; i < ARRAY_SIZE(wm831x->irq_masks_cur); i++) {
@@ -371,28 +371,29 @@ static void wm831x_irq_sync_unlock(unsigned int irq)
mutex_unlock(&wm831x->irq_lock);
}

-static void wm831x_irq_unmask(unsigned int irq)
+static void wm831x_irq_unmask(struct irq_data *d)
{
- struct wm831x *wm831x = get_irq_chip_data(irq);
- struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x, irq);
+ struct wm831x *wm831x = irq_data_get_irq_chip_data(d);
+ struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x, d->irq);

wm831x->irq_masks_cur[irq_data->reg - 1] &= ~irq_data->mask;
}

-static void wm831x_irq_mask(unsigned int irq)
+static void wm831x_irq_mask(struct irq_data *d)
{
- struct wm831x *wm831x = get_irq_chip_data(irq);
- struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x, irq);
+ struct wm831x *wm831x = irq_data_get_irq_chip_data(d);
+ struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x, d->irq);

wm831x->irq_masks_cur[irq_data->reg - 1] |= irq_data->mask;
}

-static int wm831x_irq_set_type(unsigned int irq, unsigned int type)
+static int wm831x_irq_set_type(struct irq_data *d, unsigned int type)
{
- struct wm831x *wm831x = get_irq_chip_data(irq);
+ struct wm831x *wm831x = irq_data_get_irq_chip_data(irq);
+ unsigned int irq;
int val;

- irq = irq - wm831x->irq_base;
+ irq = d->irq - wm831x->irq_base;

if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11) {
/* Ignore internal-only IRQs */
@@ -422,11 +423,11 @@ static int wm831x_irq_set_type(unsigned int irq, unsigned int type)

static struct irq_chip wm831x_irq_chip = {
.name = "wm831x",
- .bus_lock = wm831x_irq_lock,
- .bus_sync_unlock = wm831x_irq_sync_unlock,
- .mask = wm831x_irq_mask,
- .unmask = wm831x_irq_unmask,
- .set_type = wm831x_irq_set_type,
+ .irq_bus_lock = wm831x_irq_lock,
+ .irq_bus_sync_unlock = wm831x_irq_sync_unlock,
+ .irq_mask = wm831x_irq_mask,
+ .irq_unmask = wm831x_irq_unmask,
+ .irq_set_type = wm831x_irq_set_type,
};

/* The processing of the primary interrupt occurs in a thread so that
--
1.7.1


2010-12-13 12:39:40

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 18/20] mfd: wm831x: irq_data conversion.

On Mon, Dec 13, 2010 at 01:31:21PM +0100, Lennert Buytenhek wrote:
> Signed-off-by: Lennert Buytenhek <[email protected]>

If you're doing this sort of work you really need to work against -next
or the individual development tree rather than Linus' tree. The Wolfson
drivers have been converted in -next for a while now.

I also posted patches for everything in MFD except ezx-pcap over the
weekend - I pushed a branch up to a git tree earlier today with these
changes in, I'll try to keep it up to date with the acks I'm getting.
I'll add Lennart's ezx-pcap patch to that.

The following changes since commit 3ec93fcb34a97a9806a7280b136a7af20edf61f1:

mfd: Fix twl_probe section mismatch warning in mfd/twl-core.c (2010-12-10 20:59:59 +0100)

are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc-2.6.git mfd-irq

Mark Brown (20):
mfd: Staticise unexported symbols in ASIC3
mfd: Correct ASIC3 IRQ_OWM resource setup
mfd: Remove ARCH_U8500 dependency from AB8500
mfd: Staticise internal functions in HTC I2CCPLD driver
mfd: Convert 88PM860x driver to new irq_ APIs
mfd: Convert ASIC3 to new irq_ APIs
mfd: Convert AB3500 to new irq_ APIs
mfd: Convert AB8500 to new irq_ methods
mfd: Convert HTC EGPIO driver to irq_ API
mfd: Convert HTC I2C CPLD driver to irq_ API
mfd: Convert jz4740-adc to new irq_ methods
mfd: Convert max8925 to new irq_ API
mfd: Convert MAX8998 driver to irq_ API
mfd: Convert SMTPE driver to new irq_ APIs
mfd: Convert t7166xb driver to new irq_ API
mfd: Convert tc35892 to new irq_ APIs
mfd: Convert tc6393xb driver to new irq_ APIs
mfd: Convert tps6586x driver to new irq_ API
mfd: Convert TWL4030 to new irq_ APIs
mfd: Convert Wolfson MFD drivers to use irq_data accessor function

drivers/mfd/88pm860x-core.c | 36 ++++++++++--------------
drivers/mfd/Kconfig | 2 +-
drivers/mfd/ab3550-core.c | 28 +++++++++----------
drivers/mfd/ab8500-core.c | 28 +++++++++---------
drivers/mfd/asic3.c | 62 +++++++++++++++++++++---------------------
drivers/mfd/htc-egpio.c | 27 +++++++++---------
drivers/mfd/htc-i2cpld.c | 40 ++++++++++++++--------------
drivers/mfd/jz4740-adc.c | 25 ++++++++---------
drivers/mfd/max8925-core.c | 30 ++++++++++----------
drivers/mfd/max8998-irq.c | 30 +++++++++++---------
drivers/mfd/stmpe.c | 28 +++++++++---------
drivers/mfd/t7l66xb.c | 20 +++++++-------
drivers/mfd/tc35892.c | 8 +++---
drivers/mfd/tc6393xb.c | 22 +++++++-------
drivers/mfd/tps6586x.c | 28 +++++++++---------
drivers/mfd/twl4030-irq.c | 28 +++++++++---------
drivers/mfd/wm831x-irq.c | 10 +++---
drivers/mfd/wm8350-irq.c | 8 +++---
drivers/mfd/wm8994-irq.c | 8 +++---
19 files changed, 231 insertions(+), 237 deletions(-)

2010-12-14 09:15:22

by Lennert Buytenhek

[permalink] [raw]
Subject: Re: [PATCH 18/20] mfd: wm831x: irq_data conversion.

On Mon, Dec 13, 2010 at 12:39:35PM +0000, Mark Brown wrote:

> I also posted patches for everything in MFD except ezx-pcap over the
> weekend - I pushed a branch up to a git tree earlier today with these
> changes in, I'll try to keep it up to date with the acks I'm getting.
> I'll add Lennart's ezx-pcap patch to that.

Alright, I'll drop my series.

2010-12-20 00:33:42

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH 18/20] mfd: wm831x: irq_data conversion.

Hi Mark,

On Mon, Dec 13, 2010 at 12:39:35PM +0000, Mark Brown wrote:
> On Mon, Dec 13, 2010 at 01:31:21PM +0100, Lennert Buytenhek wrote:
> > Signed-off-by: Lennert Buytenhek <[email protected]>
>
> If you're doing this sort of work you really need to work against -next
> or the individual development tree rather than Linus' tree. The Wolfson
> drivers have been converted in -next for a while now.
>
> I also posted patches for everything in MFD except ezx-pcap over the
> weekend - I pushed a branch up to a git tree earlier today with these
> changes in, I'll try to keep it up to date with the acks I'm getting.
> I'll add Lennart's ezx-pcap patch to that.
>
> The following changes since commit 3ec93fcb34a97a9806a7280b136a7af20edf61f1:
>
> mfd: Fix twl_probe section mismatch warning in mfd/twl-core.c (2010-12-10 20:59:59 +0100)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc-2.6.git mfd-irq
I've pulled this one into my for-next branch.
Big thanks for taking care of this, I appreciate.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/