2014-04-16 14:44:31

by Linus Walleij

[permalink] [raw]
Subject: [PATCH 0/6] mfd/gpio: cleanup of STMPE driver

This cleans up the STMPE driver a bit:

- Remove all static GPIO and IRQ number assignments as all platforms
with this hardware use device tree now.
- Add optional regulators.
- Add proper device tree probe path using compatible strings.
- Block mask fix for STMPE1601.
- Switch GPIO portions to use the gpiolib irqchip helpers.

This branch is available here if you want to test it:

git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git stmpe

It'd be great if someone with the i.MX 53 or 6q platforms using
this could test it, the same goes for the SPEAr people.

The last patch need to be merged in the GPIO tree, but patches
1 thru 4 can be merged directly to MFD (as I am GPIO maintainer
take the few hunks on the GPIO driver as ACKed). If that goes
well I can pull an immutable branch into the GPIO tree to apply
the last patch there, and the Ux500 DT patch should go through
the Ux500 tree.

Linus Walleij (6):
mfd: stmpe: root out static GPIO and IRQ assignments
mfd: stmpe: add optional regulators
mfd: stmpe: prope properly from the device tree
mfd: stmpe: mask off unused blocks properly
ARM: ux500: add VCC and VIO regulators to STMPE IC
gpio: stmpe: switch to use gpiolib irqchip helpers

arch/arm/boot/dts/ste-href-stuib.dtsi | 2 +
drivers/gpio/Kconfig | 1 +
drivers/gpio/gpio-stmpe.c | 127 +++++++++-------------------------
drivers/mfd/stmpe-i2c.c | 60 +++++++++++++++-
drivers/mfd/stmpe.c | 30 +++++++-
drivers/mfd/stmpe.h | 2 +-
include/linux/mfd/stmpe.h | 19 ++---
7 files changed, 127 insertions(+), 114 deletions(-)

--
1.9.0


2014-04-16 14:44:37

by Linus Walleij

[permalink] [raw]
Subject: [PATCH 1/6] mfd: stmpe: root out static GPIO and IRQ assignments

The only platform using the STMPE expander now boots from
device tree using all-dynamic GPIO and IRQ number assignments, so
remove the mechanism to pass this from the device tree entirely.

Signed-off-by: Linus Walleij <[email protected]>
---
drivers/gpio/gpio-stmpe.c | 18 +++++-------------
drivers/mfd/stmpe.c | 3 +--
include/linux/mfd/stmpe.h | 14 --------------
3 files changed, 6 insertions(+), 29 deletions(-)

diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 2776a09bee58..628b58494294 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -23,7 +23,8 @@
enum { REG_RE, REG_FE, REG_IE };

#define CACHE_NR_REGS 3
-#define CACHE_NR_BANKS (STMPE_NR_GPIOS / 8)
+/* No variant has more than 24 GPIOs */
+#define CACHE_NR_BANKS (24 / 8)

struct stmpe_gpio {
struct gpio_chip chip;
@@ -31,8 +32,6 @@ struct stmpe_gpio {
struct device *dev;
struct mutex irq_lock;
struct irq_domain *domain;
-
- int irq_base;
unsigned norequest_mask;

/* Caches of interrupt control registers for bus_lock */
@@ -311,13 +310,8 @@ static const struct irq_domain_ops stmpe_gpio_irq_simple_ops = {
static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio,
struct device_node *np)
{
- int base = 0;
-
- if (!np)
- base = stmpe_gpio->irq_base;
-
stmpe_gpio->domain = irq_domain_add_simple(np,
- stmpe_gpio->chip.ngpio, base,
+ stmpe_gpio->chip.ngpio, 0,
&stmpe_gpio_irq_simple_ops, stmpe_gpio);
if (!stmpe_gpio->domain) {
dev_err(stmpe_gpio->dev, "failed to create irqdomain\n");
@@ -354,7 +348,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
#ifdef CONFIG_OF
stmpe_gpio->chip.of_node = np;
#endif
- stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1;
+ stmpe_gpio->chip.base = -1;

if (pdata)
stmpe_gpio->norequest_mask = pdata->norequest_mask;
@@ -362,9 +356,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
of_property_read_u32(np, "st,norequest-mask",
&stmpe_gpio->norequest_mask);

- if (irq >= 0)
- stmpe_gpio->irq_base = stmpe->irq_base + STMPE_INT_GPIO(0);
- else
+ if (irq < 0)
dev_info(&pdev->dev,
"device configured in no-irq mode; "
"irqs are not available\n");
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 3c7eec6917d7..6155230ae29c 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -1063,7 +1063,7 @@ static int stmpe_chip_init(struct stmpe *stmpe)
static int stmpe_add_device(struct stmpe *stmpe, const struct mfd_cell *cell)
{
return mfd_add_devices(stmpe->dev, stmpe->pdata->id, cell, 1,
- NULL, stmpe->irq_base, stmpe->domain);
+ NULL, 0, stmpe->domain);
}

static int stmpe_devices_init(struct stmpe *stmpe)
@@ -1167,7 +1167,6 @@ int stmpe_probe(struct stmpe_client_info *ci, int partnum)
stmpe->dev = ci->dev;
stmpe->client = ci->client;
stmpe->pdata = pdata;
- stmpe->irq_base = pdata->irq_base;
stmpe->ci = ci;
stmpe->partnum = partnum;
stmpe->variant = stmpe_variant_info[partnum];
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h
index 48395a69a7e9..3f8798e4a87d 100644
--- a/include/linux/mfd/stmpe.h
+++ b/include/linux/mfd/stmpe.h
@@ -73,7 +73,6 @@ struct stmpe_client_info;
* @regs: list of addresses of registers which are at different addresses on
* different variants. Indexed by one of STMPE_IDX_*.
* @irq: irq number for stmpe
- * @irq_base: starting IRQ number for internal IRQs
* @num_gpios: number of gpios, differs for variants
* @ier: cache of IER registers for bus_lock
* @oldier: cache of IER registers for bus_lock
@@ -91,7 +90,6 @@ struct stmpe {
const u8 *regs;

int irq;
- int irq_base;
int num_gpios;
u8 ier[2];
u8 oldier[2];
@@ -132,8 +130,6 @@ struct stmpe_keypad_platform_data {

/**
* struct stmpe_gpio_platform_data - STMPE GPIO platform data
- * @gpio_base: first gpio number assigned. A maximum of
- * %STMPE_NR_GPIOS GPIOs will be allocated.
* @norequest_mask: bitmask specifying which GPIOs should _not_ be
* requestable due to different usage (e.g. touch, keypad)
* STMPE_GPIO_NOREQ_* macros can be used here.
@@ -141,7 +137,6 @@ struct stmpe_keypad_platform_data {
* @remove: board specific remove callback
*/
struct stmpe_gpio_platform_data {
- int gpio_base;
unsigned norequest_mask;
void (*setup)(struct stmpe *stmpe, unsigned gpio_base);
void (*remove)(struct stmpe *stmpe, unsigned gpio_base);
@@ -195,8 +190,6 @@ struct stmpe_ts_platform_data {
* @irq_trigger: IRQ trigger to use for the interrupt to the host
* @autosleep: bool to enable/disable stmpe autosleep
* @autosleep_timeout: inactivity timeout in milliseconds for autosleep
- * @irq_base: base IRQ number. %STMPE_NR_IRQS irqs will be used, or
- * %STMPE_NR_INTERNAL_IRQS if the GPIO driver is not used.
* @irq_over_gpio: true if gpio is used to get irq
* @irq_gpio: gpio number over which irq will be requested (significant only if
* irq_over_gpio is true)
@@ -207,7 +200,6 @@ struct stmpe_ts_platform_data {
struct stmpe_platform_data {
int id;
unsigned int blocks;
- int irq_base;
unsigned int irq_trigger;
bool autosleep;
bool irq_over_gpio;
@@ -219,10 +211,4 @@ struct stmpe_platform_data {
struct stmpe_ts_platform_data *ts;
};

-#define STMPE_NR_INTERNAL_IRQS 9
-#define STMPE_INT_GPIO(x) (STMPE_NR_INTERNAL_IRQS + (x))
-
-#define STMPE_NR_GPIOS 24
-#define STMPE_NR_IRQS STMPE_INT_GPIO(STMPE_NR_GPIOS)
-
#endif
--
1.9.0

2014-04-16 14:44:46

by Linus Walleij

[permalink] [raw]
Subject: [PATCH 3/6] mfd: stmpe: prope properly from the device tree

The current STMPE I2C probing code does not really match the
compatible strings - it matches node names happening to give
the right device name. Instead, let's introduce some real
compatible matching, more complex, more accurate.

Signed-off-by: Linus Walleij <[email protected]>
---
drivers/mfd/stmpe-i2c.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 59 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c
index 0da02e11d58e..8902a600d978 100644
--- a/drivers/mfd/stmpe-i2c.c
+++ b/drivers/mfd/stmpe-i2c.c
@@ -14,6 +14,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
+#include <linux/of_device.h>
#include "stmpe.h"

static int i2c_reg_read(struct stmpe *stmpe, u8 reg)
@@ -52,15 +53,71 @@ static struct stmpe_client_info i2c_ci = {
.write_block = i2c_block_write,
};

+#ifdef CONFIG_OF
+static const struct of_device_id stmpe_of_match[] = {
+ {
+ .compatible = "st,stmpe610",
+ .data = (void *)STMPE610,
+ },
+ {
+ .compatible = "st,stmpe801",
+ .data = (void *)STMPE801,
+ },
+ {
+ .compatible = "st,stmpe811",
+ .data = (void *)STMPE811,
+ },
+ {
+ .compatible = "st,stmpe1601",
+ .data = (void *)STMPE1601,
+ },
+ {
+ .compatible = "st,stmpe1801",
+ .data = (void *)STMPE1801,
+ },
+ {
+ .compatible = "st,stmpe2401",
+ .data = (void *)STMPE2401,
+ },
+ {
+ .compatible = "st,stmpe2403",
+ .data = (void *)STMPE2403,
+ },
+ {},
+};
+MODULE_DEVICE_TABLE(of, stmpe_of_match);
+
+int stmpe_i2c_of_probe(struct i2c_client *i2c)
+{
+ const struct of_device_id *of_id;
+
+ of_id = of_match_device(stmpe_of_match, &i2c->dev);
+ if (!of_id)
+ return -EINVAL;
+ return (int)of_id->data;
+}
+#else
+int stmpe_i2c_of_probe(struct i2c_client *i2c)
+{
+ return -EINVAL;
+}
+#endif
+
static int
stmpe_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
{
+ int partnum;
+
i2c_ci.data = (void *)id;
i2c_ci.irq = i2c->irq;
i2c_ci.client = i2c;
i2c_ci.dev = &i2c->dev;

- return stmpe_probe(&i2c_ci, id->driver_data);
+ partnum = stmpe_i2c_of_probe(i2c);
+ if (partnum < 0)
+ partnum = id->driver_data;
+
+ return stmpe_probe(&i2c_ci, partnum);
}

static int stmpe_i2c_remove(struct i2c_client *i2c)
@@ -89,6 +146,7 @@ static struct i2c_driver stmpe_i2c_driver = {
#ifdef CONFIG_PM
.pm = &stmpe_dev_pm_ops,
#endif
+ .of_match_table = of_match_ptr(stmpe_of_match),
},
.probe = stmpe_i2c_probe,
.remove = stmpe_i2c_remove,
--
1.9.0

2014-04-16 14:44:50

by Linus Walleij

[permalink] [raw]
Subject: [PATCH 4/6] mfd: stmpe: mask off unused blocks properly

The STMPE driver would just read/modify/write the system control
register on the STMPE1601, meaning it would not properly mask off
the PWM block, which remained active if it was on at boot time.
This makes sure the blocks are always masked off if they were
active on boot, saving some power. Also rename the inconsistenty
named STMPE1601 define for the PWM block activation.

Signed-off-by: Linus Walleij <[email protected]>
---
drivers/mfd/stmpe.c | 9 +++++++++
drivers/mfd/stmpe.h | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 692452442ead..065c923cb2a9 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -606,9 +606,18 @@ static int stmpe1601_enable(struct stmpe *stmpe, unsigned int blocks,

if (blocks & STMPE_BLOCK_GPIO)
mask |= STMPE1601_SYS_CTRL_ENABLE_GPIO;
+ else
+ mask &= ~STMPE1601_SYS_CTRL_ENABLE_GPIO;

if (blocks & STMPE_BLOCK_KEYPAD)
mask |= STMPE1601_SYS_CTRL_ENABLE_KPC;
+ else
+ mask &= ~STMPE1601_SYS_CTRL_ENABLE_KPC;
+
+ if (blocks & STMPE_BLOCK_PWM)
+ mask |= STMPE1601_SYS_CTRL_ENABLE_SPWM;
+ else
+ mask &= ~STMPE1601_SYS_CTRL_ENABLE_SPWM;

return __stmpe_set_bits(stmpe, STMPE1601_REG_SYS_CTRL, mask,
enable ? mask : 0);
diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h
index 6639f1b0fef5..9e4d21d37a11 100644
--- a/drivers/mfd/stmpe.h
+++ b/drivers/mfd/stmpe.h
@@ -192,7 +192,7 @@ int stmpe_remove(struct stmpe *stmpe);

#define STMPE1601_SYS_CTRL_ENABLE_GPIO (1 << 3)
#define STMPE1601_SYS_CTRL_ENABLE_KPC (1 << 1)
-#define STMPE1601_SYSCON_ENABLE_SPWM (1 << 0)
+#define STMPE1601_SYS_CTRL_ENABLE_SPWM (1 << 0)

/* The 1601/2403 share the same masks */
#define STMPE1601_AUTOSLEEP_TIMEOUT_MASK (0x7)
--
1.9.0

2014-04-16 14:45:02

by Linus Walleij

[permalink] [raw]
Subject: [PATCH 5/6] ARM: ux500: add VCC and VIO regulators to STMPE IC

Add a VCC and VIO regulator supplies to the the STMPE expander
found on the STUIB UIB variants.

Signed-off-by: Linus Walleij <[email protected]>
---
arch/arm/boot/dts/ste-href-stuib.dtsi | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/ste-href-stuib.dtsi b/arch/arm/boot/dts/ste-href-stuib.dtsi
index 1c3574435ea8..84d7c5d883f2 100644
--- a/arch/arm/boot/dts/ste-href-stuib.dtsi
+++ b/arch/arm/boot/dts/ste-href-stuib.dtsi
@@ -42,6 +42,8 @@
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&gpio6>;
interrupt-controller;
+ vcc-supply = <&db8500_vsmps2_reg>;
+ vio-supply = <&db8500_vsmps2_reg>;

wakeup-source;
st,autosleep-timeout = <1024>;
--
1.9.0

2014-04-16 14:45:14

by Linus Walleij

[permalink] [raw]
Subject: [PATCH 6/6] gpio: stmpe: switch to use gpiolib irqchip helpers

This switches the STMPE driver to use the gpiolib irqchip
helpers.

Signed-off-by: Linus Walleij <[email protected]>
---
drivers/gpio/Kconfig | 1 +
drivers/gpio/gpio-stmpe.c | 111 +++++++++++-----------------------------------
2 files changed, 28 insertions(+), 84 deletions(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index a86c49a605c6..cb91e2d9651f 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -562,6 +562,7 @@ config GPIO_SX150X
config GPIO_STMPE
bool "STMPE GPIOs"
depends on MFD_STMPE
+ select GPIOLIB_IRQCHIP
help
This enables support for the GPIOs found on the STMPE I/O
Expanders.
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 628b58494294..ed90adbdb128 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -10,8 +10,6 @@
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/gpio.h>
-#include <linux/irq.h>
-#include <linux/irqdomain.h>
#include <linux/interrupt.h>
#include <linux/of.h>
#include <linux/mfd/stmpe.h>
@@ -31,9 +29,7 @@ struct stmpe_gpio {
struct stmpe *stmpe;
struct device *dev;
struct mutex irq_lock;
- struct irq_domain *domain;
unsigned norequest_mask;
-
/* Caches of interrupt control registers for bus_lock */
u8 regs[CACHE_NR_REGS][CACHE_NR_BANKS];
u8 oldregs[CACHE_NR_REGS][CACHE_NR_BANKS];
@@ -101,13 +97,6 @@ static int stmpe_gpio_direction_input(struct gpio_chip *chip,
return stmpe_set_bits(stmpe, reg, mask, 0);
}

-static int stmpe_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
-{
- struct stmpe_gpio *stmpe_gpio = to_stmpe_gpio(chip);
-
- return irq_create_mapping(stmpe_gpio->domain, offset);
-}
-
static int stmpe_gpio_request(struct gpio_chip *chip, unsigned offset)
{
struct stmpe_gpio *stmpe_gpio = to_stmpe_gpio(chip);
@@ -126,14 +115,14 @@ static struct gpio_chip template_chip = {
.get = stmpe_gpio_get,
.direction_output = stmpe_gpio_direction_output,
.set = stmpe_gpio_set,
- .to_irq = stmpe_gpio_to_irq,
.request = stmpe_gpio_request,
.can_sleep = true,
};

static int stmpe_gpio_irq_set_type(struct irq_data *d, unsigned int type)
{
- struct stmpe_gpio *stmpe_gpio = irq_data_get_irq_chip_data(d);
+ struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
+ struct stmpe_gpio *stmpe_gpio = to_stmpe_gpio(gc);
int offset = d->hwirq;
int regoffset = offset / 8;
int mask = 1 << (offset % 8);
@@ -160,14 +149,16 @@ static int stmpe_gpio_irq_set_type(struct irq_data *d, unsigned int type)

static void stmpe_gpio_irq_lock(struct irq_data *d)
{
- struct stmpe_gpio *stmpe_gpio = irq_data_get_irq_chip_data(d);
+ struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
+ struct stmpe_gpio *stmpe_gpio = to_stmpe_gpio(gc);

mutex_lock(&stmpe_gpio->irq_lock);
}

static void stmpe_gpio_irq_sync_unlock(struct irq_data *d)
{
- struct stmpe_gpio *stmpe_gpio = irq_data_get_irq_chip_data(d);
+ struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
+ struct stmpe_gpio *stmpe_gpio = to_stmpe_gpio(gc);
struct stmpe *stmpe = stmpe_gpio->stmpe;
int num_banks = DIV_ROUND_UP(stmpe->num_gpios, 8);
static const u8 regmap[] = {
@@ -200,7 +191,8 @@ static void stmpe_gpio_irq_sync_unlock(struct irq_data *d)

static void stmpe_gpio_irq_mask(struct irq_data *d)
{
- struct stmpe_gpio *stmpe_gpio = irq_data_get_irq_chip_data(d);
+ struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
+ struct stmpe_gpio *stmpe_gpio = to_stmpe_gpio(gc);
int offset = d->hwirq;
int regoffset = offset / 8;
int mask = 1 << (offset % 8);
@@ -210,7 +202,8 @@ static void stmpe_gpio_irq_mask(struct irq_data *d)

static void stmpe_gpio_irq_unmask(struct irq_data *d)
{
- struct stmpe_gpio *stmpe_gpio = irq_data_get_irq_chip_data(d);
+ struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
+ struct stmpe_gpio *stmpe_gpio = to_stmpe_gpio(gc);
int offset = d->hwirq;
int regoffset = offset / 8;
int mask = 1 << (offset % 8);
@@ -253,7 +246,7 @@ static irqreturn_t stmpe_gpio_irq(int irq, void *dev)
while (stat) {
int bit = __ffs(stat);
int line = bank * 8 + bit;
- int child_irq = irq_find_mapping(stmpe_gpio->domain,
+ int child_irq = irq_find_mapping(stmpe_gpio->chip.irqdomain,
line);

handle_nested_irq(child_irq);
@@ -271,56 +264,6 @@ static irqreturn_t stmpe_gpio_irq(int irq, void *dev)
return IRQ_HANDLED;
}

-static int stmpe_gpio_irq_map(struct irq_domain *d, unsigned int irq,
- irq_hw_number_t hwirq)
-{
- struct stmpe_gpio *stmpe_gpio = d->host_data;
-
- if (!stmpe_gpio)
- return -EINVAL;
-
- irq_set_chip_data(irq, stmpe_gpio);
- irq_set_chip_and_handler(irq, &stmpe_gpio_irq_chip,
- handle_simple_irq);
- irq_set_nested_thread(irq, 1);
-#ifdef CONFIG_ARM
- set_irq_flags(irq, IRQF_VALID);
-#else
- irq_set_noprobe(irq);
-#endif
-
- return 0;
-}
-
-static void stmpe_gpio_irq_unmap(struct irq_domain *d, unsigned int irq)
-{
-#ifdef CONFIG_ARM
- set_irq_flags(irq, 0);
-#endif
- irq_set_chip_and_handler(irq, NULL, NULL);
- irq_set_chip_data(irq, NULL);
-}
-
-static const struct irq_domain_ops stmpe_gpio_irq_simple_ops = {
- .unmap = stmpe_gpio_irq_unmap,
- .map = stmpe_gpio_irq_map,
- .xlate = irq_domain_xlate_twocell,
-};
-
-static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio,
- struct device_node *np)
-{
- stmpe_gpio->domain = irq_domain_add_simple(np,
- stmpe_gpio->chip.ngpio, 0,
- &stmpe_gpio_irq_simple_ops, stmpe_gpio);
- if (!stmpe_gpio->domain) {
- dev_err(stmpe_gpio->dev, "failed to create irqdomain\n");
- return -ENOSYS;
- }
-
- return 0;
-}
-
static int stmpe_gpio_probe(struct platform_device *pdev)
{
struct stmpe *stmpe = dev_get_drvdata(pdev->dev.parent);
@@ -358,30 +301,37 @@ static int stmpe_gpio_probe(struct platform_device *pdev)

if (irq < 0)
dev_info(&pdev->dev,
- "device configured in no-irq mode; "
+ "device configured in no-irq mode: "
"irqs are not available\n");

ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO);
if (ret)
goto out_free;

- if (irq >= 0) {
- ret = stmpe_gpio_irq_init(stmpe_gpio, np);
- if (ret)
- goto out_disable;
-
- ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq,
- IRQF_ONESHOT, "stmpe-gpio", stmpe_gpio);
+ if (irq > 0) {
+ ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
+ stmpe_gpio_irq, IRQF_ONESHOT,
+ "stmpe-gpio", stmpe_gpio);
if (ret) {
dev_err(&pdev->dev, "unable to get irq: %d\n", ret);
goto out_disable;
}
+ ret = gpiochip_irqchip_add(&stmpe_gpio->chip,
+ &stmpe_gpio_irq_chip,
+ 0,
+ handle_simple_irq,
+ IRQ_TYPE_NONE);
+ if (ret) {
+ dev_err(&pdev->dev,
+ "could not connect irqchip to gpiochip\n");
+ return ret;
+ }
}

ret = gpiochip_add(&stmpe_gpio->chip);
if (ret) {
dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret);
- goto out_freeirq;
+ goto out_disable;
}

if (pdata && pdata->setup)
@@ -391,9 +341,6 @@ static int stmpe_gpio_probe(struct platform_device *pdev)

return 0;

-out_freeirq:
- if (irq >= 0)
- free_irq(irq, stmpe_gpio);
out_disable:
stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
out_free:
@@ -406,7 +353,6 @@ static int stmpe_gpio_remove(struct platform_device *pdev)
struct stmpe_gpio *stmpe_gpio = platform_get_drvdata(pdev);
struct stmpe *stmpe = stmpe_gpio->stmpe;
struct stmpe_gpio_platform_data *pdata = stmpe->pdata->gpio;
- int irq = platform_get_irq(pdev, 0);
int ret;

if (pdata && pdata->remove)
@@ -421,9 +367,6 @@ static int stmpe_gpio_remove(struct platform_device *pdev)

stmpe_disable(stmpe, STMPE_BLOCK_GPIO);

- if (irq >= 0)
- free_irq(irq, stmpe_gpio);
-
kfree(stmpe_gpio);

return 0;
--
1.9.0

2014-04-16 14:44:43

by Linus Walleij

[permalink] [raw]
Subject: [PATCH 2/6] mfd: stmpe: add optional regulators

The STMPE has VCC and VIO supply lines, and sometimes (as on
Ux500) this comes from a software-controlled regulator. Make
it possible to supply the STMPE with power from these
regulators.

Signed-off-by: Linus Walleij <[email protected]>
---
drivers/mfd/stmpe.c | 18 ++++++++++++++++++
include/linux/mfd/stmpe.h | 5 +++++
2 files changed, 23 insertions(+)

diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 6155230ae29c..692452442ead 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -20,6 +20,7 @@
#include <linux/slab.h>
#include <linux/mfd/core.h>
#include <linux/delay.h>
+#include <linux/regulator/consumer.h>
#include "stmpe.h"

static int __stmpe_enable(struct stmpe *stmpe, unsigned int blocks)
@@ -1172,6 +1173,18 @@ int stmpe_probe(struct stmpe_client_info *ci, int partnum)
stmpe->variant = stmpe_variant_info[partnum];
stmpe->regs = stmpe->variant->regs;
stmpe->num_gpios = stmpe->variant->num_gpios;
+ stmpe->vcc = devm_regulator_get_optional(ci->dev, "vcc");
+ if (!IS_ERR(stmpe->vcc)) {
+ ret = regulator_enable(stmpe->vcc);
+ if (ret)
+ dev_warn(ci->dev, "failed to enable VCC supply\n");
+ }
+ stmpe->vio = devm_regulator_get_optional(ci->dev, "vio");
+ if (!IS_ERR(stmpe->vio)) {
+ ret = regulator_enable(stmpe->vio);
+ if (ret)
+ dev_warn(ci->dev, "failed to enable VIO supply\n");
+ }
dev_set_drvdata(stmpe->dev, stmpe);

if (ci->init)
@@ -1238,6 +1251,11 @@ int stmpe_probe(struct stmpe_client_info *ci, int partnum)

int stmpe_remove(struct stmpe *stmpe)
{
+ if (!IS_ERR(stmpe->vio))
+ regulator_disable(stmpe->vio);
+ if (!IS_ERR(stmpe->vcc))
+ regulator_disable(stmpe->vcc);
+
mfd_remove_devices(stmpe->dev);

return 0;
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h
index 3f8798e4a87d..575a86c7fcbd 100644
--- a/include/linux/mfd/stmpe.h
+++ b/include/linux/mfd/stmpe.h
@@ -11,6 +11,7 @@
#include <linux/mutex.h>

struct device;
+struct regulator;

enum stmpe_block {
STMPE_BLOCK_GPIO = 1 << 0,
@@ -62,6 +63,8 @@ struct stmpe_client_info;

/**
* struct stmpe - STMPE MFD structure
+ * @vcc: optional VCC regulator
+ * @vio: optional VIO regulator
* @lock: lock protecting I/O operations
* @irq_lock: IRQ bus lock
* @dev: device, mostly for dev_dbg()
@@ -79,6 +82,8 @@ struct stmpe_client_info;
* @pdata: platform data
*/
struct stmpe {
+ struct regulator *vcc;
+ struct regulator *vio;
struct mutex lock;
struct mutex irq_lock;
struct device *dev;
--
1.9.0

2014-04-17 06:12:03

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 0/6] mfd/gpio: cleanup of STMPE driver

On Wed, Apr 16, 2014 at 04:44:09PM +0200, Linus Walleij wrote:
> This cleans up the STMPE driver a bit:
>
> - Remove all static GPIO and IRQ number assignments as all platforms
> with this hardware use device tree now.
> - Add optional regulators.
> - Add proper device tree probe path using compatible strings.
> - Block mask fix for STMPE1601.
> - Switch GPIO portions to use the gpiolib irqchip helpers.
>
> This branch is available here if you want to test it:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git stmpe
>
> It'd be great if someone with the i.MX 53 or 6q platforms using
> this could test it, the same goes for the SPEAr people.

None of my i.MX board on hands uses stmpe, so we may need the favor from
pengutronix folks to test it on imx6q-dmo-edmqmx6 board.

Shawn

2014-04-17 10:30:26

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 2/6] mfd: stmpe: add optional regulators

> The STMPE has VCC and VIO supply lines, and sometimes (as on
> Ux500) this comes from a software-controlled regulator. Make
> it possible to supply the STMPE with power from these
> regulators.
>
> Signed-off-by: Linus Walleij <[email protected]>
> ---
> drivers/mfd/stmpe.c | 18 ++++++++++++++++++
> include/linux/mfd/stmpe.h | 5 +++++
> 2 files changed, 23 insertions(+)

[...]

> + stmpe->vcc = devm_regulator_get_optional(ci->dev, "vcc");
> + if (!IS_ERR(stmpe->vcc)) {
> + ret = regulator_enable(stmpe->vcc);
> + if (ret)
> + dev_warn(ci->dev, "failed to enable VCC supply\n");
> + }
> + stmpe->vio = devm_regulator_get_optional(ci->dev, "vio");
> + if (!IS_ERR(stmpe->vio)) {
> + ret = regulator_enable(stmpe->vio);
> + if (ret)
> + dev_warn(ci->dev, "failed to enable VIO supply\n");
> + }

[...]

> int stmpe_remove(struct stmpe *stmpe)
> {
> + if (!IS_ERR(stmpe->vio))
> + regulator_disable(stmpe->vio);
> + if (!IS_ERR(stmpe->vcc))
> + regulator_disable(stmpe->vcc);
> +

Genuine question:
Doesn't the regulator core take care of this for you on removal?

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2014-04-17 10:44:16

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 3/6] mfd: stmpe: prope properly from the device tree

> The current STMPE I2C probing code does not really match the
> compatible strings - it matches node names happening to give
> the right device name. Instead, let's introduce some real
> compatible matching, more complex, more accurate.
>
> Signed-off-by: Linus Walleij <[email protected]>
> ---
> drivers/mfd/stmpe-i2c.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 59 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c
> index 0da02e11d58e..8902a600d978 100644
> --- a/drivers/mfd/stmpe-i2c.c
> +++ b/drivers/mfd/stmpe-i2c.c
> @@ -14,6 +14,7 @@
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/types.h>
> +#include <linux/of_device.h>
> #include "stmpe.h"
>
> static int i2c_reg_read(struct stmpe *stmpe, u8 reg)
> @@ -52,15 +53,71 @@ static struct stmpe_client_info i2c_ci = {
> .write_block = i2c_block_write,
> };
>
> +#ifdef CONFIG_OF

Didn't you say that the only platform using this device is DT only? So
why don't we make the driver depend on OF and get rid of this ugly
#ifdeffery?

> +static const struct of_device_id stmpe_of_match[] = {
> + {
> + .compatible = "st,stmpe610",
> + .data = (void *)STMPE610,
> + },
> + {
> + .compatible = "st,stmpe801",
> + .data = (void *)STMPE801,
> + },
> + {
> + .compatible = "st,stmpe811",
> + .data = (void *)STMPE811,
> + },
> + {
> + .compatible = "st,stmpe1601",
> + .data = (void *)STMPE1601,
> + },
> + {
> + .compatible = "st,stmpe1801",
> + .data = (void *)STMPE1801,
> + },
> + {
> + .compatible = "st,stmpe2401",
> + .data = (void *)STMPE2401,
> + },
> + {
> + .compatible = "st,stmpe2403",
> + .data = (void *)STMPE2403,
> + },
> + {},
> +};

If none of these stray over 80 chars, I think I'd like to see
of_device_id tables as single line entries (unlike mfd_cell structures
where there can be more than 2 entries, which I like spread out - I
know, double standards right?)

+static const struct of_device_id stmpe_of_match[] = {
+ { .compatible = "st,stmpe610", .data = (void *)STMPE610, },
+ { .compatible = "st,stmpe801", .data = (void *)STMPE801, },
+ { .compatible = "st,stmpe811", .data = (void *)STMPE811, },
+ { .compatible = "st,stmpe1601", .data = (void *)STMPE1601, },
+ { .compatible = "st,stmpe1801", .data = (void *)STMPE1801, },
+ { .compatible = "st,stmpe2401", .data = (void *)STMPE2401, },
+ { .compatible = "st,stmpe2403", .data = (void *)STMPE2403, },
+ {},
+};

> +MODULE_DEVICE_TABLE(of, stmpe_of_match);
> +
> +int stmpe_i2c_of_probe(struct i2c_client *i2c)

Erm, static?

> +{
> + const struct of_device_id *of_id;
> +
> + of_id = of_match_device(stmpe_of_match, &i2c->dev);
> + if (!of_id)
> + return -EINVAL;
> + return (int)of_id->data;
> +}
> +#else
> +int stmpe_i2c_of_probe(struct i2c_client *i2c)
> +{
> + return -EINVAL;
> +}
> +#endif
> +
> static int
> stmpe_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
> {
> + int partnum;
> +
> i2c_ci.data = (void *)id;
> i2c_ci.irq = i2c->irq;
> i2c_ci.client = i2c;
> i2c_ci.dev = &i2c->dev;
>
> - return stmpe_probe(&i2c_ci, id->driver_data);

if (IS_DEFINED(OF)) {

> + partnum = stmpe_i2c_of_probe(i2c);

Then you can remove the spare stmpe_i2c_of_probe(), or better still
make the whole driver depend on OF.

> + if (partnum < 0)
> + partnum = id->driver_data;

Should this be able to fail and for us to still carry on?

Or are we then running on an unsupported device?

> + return stmpe_probe(&i2c_ci, partnum);
> }
>
> static int stmpe_i2c_remove(struct i2c_client *i2c)
> @@ -89,6 +146,7 @@ static struct i2c_driver stmpe_i2c_driver = {
> #ifdef CONFIG_PM
> .pm = &stmpe_dev_pm_ops,
> #endif
> + .of_match_table = of_match_ptr(stmpe_of_match),
> },
> .probe = stmpe_i2c_probe,
> .remove = stmpe_i2c_remove,

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2014-04-17 10:49:32

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 1/6] mfd: stmpe: root out static GPIO and IRQ assignments

> The only platform using the STMPE expander now boots from
> device tree using all-dynamic GPIO and IRQ number assignments, so
> remove the mechanism to pass this from the device tree entirely.
>
> Signed-off-by: Linus Walleij <[email protected]>
> ---
> drivers/gpio/gpio-stmpe.c | 18 +++++-------------
> drivers/mfd/stmpe.c | 3 +--
> include/linux/mfd/stmpe.h | 14 --------------
> 3 files changed, 6 insertions(+), 29 deletions(-)

MFD changes look good to me.

Acked-by: Lee Jones <[email protected]>

Do you want me to set up and immutable branch between MFD and GPIO?

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2014-04-17 10:52:21

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 4/6] mfd: stmpe: mask off unused blocks properly

> The STMPE driver would just read/modify/write the system control
> register on the STMPE1601, meaning it would not properly mask off
> the PWM block, which remained active if it was on at boot time.
> This makes sure the blocks are always masked off if they were
> active on boot, saving some power. Also rename the inconsistenty
> named STMPE1601 define for the PWM block activation.
>
> Signed-off-by: Linus Walleij <[email protected]>
> ---
> drivers/mfd/stmpe.c | 9 +++++++++
> drivers/mfd/stmpe.h | 2 +-
> 2 files changed, 10 insertions(+), 1 deletion(-)

Patch looks good to me.

Acked-by: Lee Jones <[email protected]>

> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index 692452442ead..065c923cb2a9 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -606,9 +606,18 @@ static int stmpe1601_enable(struct stmpe *stmpe, unsigned int blocks,
>
> if (blocks & STMPE_BLOCK_GPIO)
> mask |= STMPE1601_SYS_CTRL_ENABLE_GPIO;
> + else
> + mask &= ~STMPE1601_SYS_CTRL_ENABLE_GPIO;
>
> if (blocks & STMPE_BLOCK_KEYPAD)
> mask |= STMPE1601_SYS_CTRL_ENABLE_KPC;
> + else
> + mask &= ~STMPE1601_SYS_CTRL_ENABLE_KPC;
> +
> + if (blocks & STMPE_BLOCK_PWM)
> + mask |= STMPE1601_SYS_CTRL_ENABLE_SPWM;
> + else
> + mask &= ~STMPE1601_SYS_CTRL_ENABLE_SPWM;
>
> return __stmpe_set_bits(stmpe, STMPE1601_REG_SYS_CTRL, mask,
> enable ? mask : 0);
> diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h
> index 6639f1b0fef5..9e4d21d37a11 100644
> --- a/drivers/mfd/stmpe.h
> +++ b/drivers/mfd/stmpe.h
> @@ -192,7 +192,7 @@ int stmpe_remove(struct stmpe *stmpe);
>
> #define STMPE1601_SYS_CTRL_ENABLE_GPIO (1 << 3)
> #define STMPE1601_SYS_CTRL_ENABLE_KPC (1 << 1)
> -#define STMPE1601_SYSCON_ENABLE_SPWM (1 << 0)
> +#define STMPE1601_SYS_CTRL_ENABLE_SPWM (1 << 0)
>
> /* The 1601/2403 share the same masks */
> #define STMPE1601_AUTOSLEEP_TIMEOUT_MASK (0x7)

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2014-04-17 13:39:01

by Silvio Fricke

[permalink] [raw]
Subject: Re: [PATCH 0/6] mfd/gpio: cleanup of STMPE driver

Hi,

I have tested this patches with my data-modul imx6q board.
So the patches get a:

Tested-by: Silvio Fricke <[email protected]>


Shawn, can you add this patch to your tree if you pull Linus patches?

Thx and Cheers,
Silvio

Silvio Fricke (1):
ARM: dts: imx6: edmqmx6: add vcc and vio power supplies to stmpe

arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 4 ++++
1 file changed, 4 insertions(+)

--
1.9.1

2014-04-17 13:40:03

by Silvio Fricke

[permalink] [raw]
Subject: [PATCH] ARM: dts: imx6: edmqmx6: add vcc and vio power supplies to stmpe

Signed-off-by: Silvio Fricke <[email protected]>
---
arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts b/arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts
index e4ae38f..8fa08aa 100644
--- a/arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts
+++ b/arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts
@@ -216,6 +216,8 @@
reg = <0x40>;
interrupts = <30 0>;
interrupt-parent = <&gpio3>;
+ vcc-supply = <&sw2_reg>;
+ vio-supply = <&sw2_reg>;

stmpe_gpio1: stmpe_gpio {
#gpio-cells = <2>;
@@ -228,6 +230,8 @@
reg = <0x44>;
interrupts = <2 0>;
interrupt-parent = <&gpio5>;
+ vcc-supply = <&sw2_reg>;
+ vio-supply = <&sw2_reg>;

stmpe_gpio2: stmpe_gpio {
#gpio-cells = <2>;
--
1.9.1

2014-04-19 05:07:47

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 0/6] mfd/gpio: cleanup of STMPE driver

On Thu, Apr 17, 2014 at 03:28:05PM +0200, Silvio Fricke wrote:
> Hi,
>
> I have tested this patches with my data-modul imx6q board.
> So the patches get a:
>
> Tested-by: Silvio Fricke <[email protected]>
>
>
> Shawn, can you add this patch to your tree if you pull Linus patches?

Yes, I can apply the edmqmx6 patch below, but will only do that after
Linus' series gets accepted. Ping me if I forget to.

Shawn

> Silvio Fricke (1):
> ARM: dts: imx6: edmqmx6: add vcc and vio power supplies to stmpe
>
> arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 4 ++++
> 1 file changed, 4 insertions(+)
>
> --
> 1.9.1
>

2014-04-23 08:38:37

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 2/6] mfd: stmpe: add optional regulators

On Thu, Apr 17, 2014 at 12:30 PM, Lee Jones <[email protected]> wrote:

>> The STMPE has VCC and VIO supply lines, and sometimes (as on
>> Ux500) this comes from a software-controlled regulator. Make
>> it possible to supply the STMPE with power from these
>> regulators.
>>
>> Signed-off-by: Linus Walleij <[email protected]>
(...)
>> int stmpe_remove(struct stmpe *stmpe)
>> {
>> + if (!IS_ERR(stmpe->vio))
>> + regulator_disable(stmpe->vio);
>> + if (!IS_ERR(stmpe->vcc))
>> + regulator_disable(stmpe->vcc);
>> +
>
> Genuine question:
> Doesn't the regulator core take care of this for you on removal?

No devm_regulator_release() that gets called when refcount goes to 0
just calls regulator_put().

regulator_put(), in turn, will just kfree the struct regulator *.

Thus we need to balance enable/disable.

Yours,
Linus Walleij

2014-04-23 08:52:50

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 3/6] mfd: stmpe: prope properly from the device tree

On Thu, Apr 17, 2014 at 12:44 PM, Lee Jones <[email protected]> wrote:

>> +#ifdef CONFIG_OF
>
> Didn't you say that the only platform using this device is DT only? So
> why don't we make the driver depend on OF and get rid of this ugly
> #ifdeffery?

OK fixing.

>> + {
>> + .compatible = "st,stmpe2403",
>> + .data = (void *)STMPE2403,
>> + },
>> + {},
>> +};
>
> If none of these stray over 80 chars, I think I'd like to see
> of_device_id tables as single line entries

OK.

>> + if (partnum < 0)
>> + partnum = id->driver_data;
>
> Should this be able to fail and for us to still carry on?

Actually yes, to stay compatible with elder device trees that use
the trick to just have the node name correspond to the I2C ID
instead of using compatible, this needs to be preserved. But I'll
add a small nag print about it.

Yours,
Linus Walleij

2014-04-23 11:39:12

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/6] mfd: stmpe: root out static GPIO and IRQ assignments

On Thu, Apr 17, 2014 at 12:49 PM, Lee Jones <[email protected]> wrote:
>> The only platform using the STMPE expander now boots from
>> device tree using all-dynamic GPIO and IRQ number assignments, so
>> remove the mechanism to pass this from the device tree entirely.
>>
>> Signed-off-by: Linus Walleij <[email protected]>
>> ---
>> drivers/gpio/gpio-stmpe.c | 18 +++++-------------
>> drivers/mfd/stmpe.c | 3 +--
>> include/linux/mfd/stmpe.h | 14 --------------
>> 3 files changed, 6 insertions(+), 29 deletions(-)
>
> MFD changes look good to me.
>
> Acked-by: Lee Jones <[email protected]>
>
> Do you want me to set up and immutable branch between MFD and GPIO?

That would be perfect. Can you stack up the MFD portions in patches
1 thru 4 (given you're happy with the v2 of 3/6) and provide a branch
to me, please?

Yours,
Linus Walleij

2014-04-23 11:43:43

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] ARM: dts: imx6: edmqmx6: add vcc and vio power supplies to stmpe

On Thu, Apr 17, 2014 at 3:28 PM, Silvio Fricke <[email protected]> wrote:

> Signed-off-by: Silvio Fricke <[email protected]>

Acked-by: Linus Walleij <[email protected]>

As long as Lee is happy with the optional regulators this should be fine
to apply orthogonally through ARM SoC.

Yours,
Linus Walleij

2014-04-23 13:22:52

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 1/6] mfd: stmpe: root out static GPIO and IRQ assignments

> >> The only platform using the STMPE expander now boots from
> >> device tree using all-dynamic GPIO and IRQ number assignments, so
> >> remove the mechanism to pass this from the device tree entirely.
> >>
> >> Signed-off-by: Linus Walleij <[email protected]>
> >> ---
> >> drivers/gpio/gpio-stmpe.c | 18 +++++-------------
> >> drivers/mfd/stmpe.c | 3 +--
> >> include/linux/mfd/stmpe.h | 14 --------------
> >> 3 files changed, 6 insertions(+), 29 deletions(-)
> >
> > MFD changes look good to me.
> >
> > Acked-by: Lee Jones <[email protected]>
> >
> > Do you want me to set up and immutable branch between MFD and GPIO?
>
> That would be perfect. Can you stack up the MFD portions in patches
> 1 thru 4 (given you're happy with the v2 of 3/6) and provide a branch
> to me, please?

How are you planning on sending 3/6?

Can you send it attached to v1 please?

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2014-04-23 21:23:05

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/6] mfd: stmpe: root out static GPIO and IRQ assignments

On Wed, Apr 23, 2014 at 3:22 PM, Lee Jones <[email protected]> wrote:

>> That would be perfect. Can you stack up the MFD portions in patches
>> 1 thru 4 (given you're happy with the v2 of 3/6) and provide a branch
>> to me, please?
>
> How are you planning on sending 3/6?

Hum, I just sent it ... by mail...
http://marc.info/?l=linux-kernel&m=139825313606633&w=2

> Can you send it attached to v1 please?

Do you mean you want me to repost the entire series?

Yours,
Linus Walleij

2014-04-28 09:26:46

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 1/6] mfd: stmpe: root out static GPIO and IRQ assignments

> >> That would be perfect. Can you stack up the MFD portions in patches
> >> 1 thru 4 (given you're happy with the v2 of 3/6) and provide a branch
> >> to me, please?
> >
> > How are you planning on sending 3/6?
>
> Hum, I just sent it ... by mail...
> http://marc.info/?l=linux-kernel&m=139825313606633&w=2
>
> > Can you send it attached to v1 please?
>
> Do you mean you want me to repost the entire series?

No, just a single patch posted as a reply to v1. However, it appears
that you already sent out the next version, which I'll take a look at
now.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog