* [PATCH] gpio: palmas: add in GPIO support for palmas charger
@ 2013-02-26 13:21 Ian Lartey
2013-02-26 13:58 ` Laxman Dewangan
0 siblings, 1 reply; 6+ messages in thread
From: Ian Lartey @ 2013-02-26 13:21 UTC (permalink / raw)
To: linux-kernel
Cc: grant.likely, linus.walleij, ldewangan, sameo, Ian Lartey,
Graeme Gregory
this patch depenfs on [PATCH] mfd: palmas: is_palmas_charger needed by multiple drivers
Palmas charger has 16 GPIOs
add palmas_gpio_[read|write|update] api to take account
second bank of GPIOs
Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
---
drivers/gpio/gpio-palmas.c | 73 ++++++++++++++++++++++++++++++++++++-------
include/linux/mfd/palmas.h | 12 ++++++-
2 files changed, 72 insertions(+), 13 deletions(-)
diff --git a/drivers/gpio/gpio-palmas.c b/drivers/gpio/gpio-palmas.c
index e3a4e56..c019c99 100644
--- a/drivers/gpio/gpio-palmas.c
+++ b/drivers/gpio/gpio-palmas.c
@@ -1,5 +1,5 @@
/*
- * TI Palma series PMIC's GPIO driver.
+ * TI Palmas series PMIC's GPIO driver.
*
* Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
*
@@ -31,6 +31,36 @@ struct palmas_gpio {
struct palmas *palmas;
};
+static int palmas_gpio_read(struct palmas *palmas, unsigned int reg,
+ int gpio, unsigned int *dest)
+{
+ /* registers for second bank are identical and offset by 0x9 */
+ if (gpio > 7)
+ reg += PALMAS_GPIO_DATA_IN2;
+
+ return palmas_read(palmas, PALMAS_GPIO_BASE, reg, dest);
+}
+
+static int palmas_gpio_write(struct palmas *palmas, unsigned int reg,
+ int gpio, unsigned int data)
+{
+ /* registers for second bank are identical and offset by 0x9 */
+ if (gpio > 7)
+ reg += PALMAS_GPIO_DATA_IN2;
+
+ return palmas_write(palmas, PALMAS_GPIO_BASE, reg, data);
+}
+
+static int palmas_gpio_update_bits(struct palmas *palmas, unsigned int reg,
+ int gpio, unsigned int mask, unsigned int data)
+{
+ /* registers for second bank are identical and offset by 0x9 */
+ if (gpio > 7)
+ reg += PALMAS_GPIO_DATA_IN2;
+
+ return palmas_update_bits(palmas, PALMAS_GPIO_BASE, reg, mask, data);
+}
+
static inline struct palmas_gpio *to_palmas_gpio(struct gpio_chip *chip)
{
return container_of(chip, struct palmas_gpio, gpio_chip);
@@ -43,12 +73,12 @@ static int palmas_gpio_get(struct gpio_chip *gc, unsigned offset)
unsigned int val;
int ret;
- ret = palmas_read(palmas, PALMAS_GPIO_BASE, PALMAS_GPIO_DATA_IN, &val);
+ ret = palmas_gpio_read(palmas, PALMAS_GPIO_DATA_IN, offset, &val);
if (ret < 0) {
dev_err(gc->dev, "GPIO_DATA_IN read failed, err = %d\n", ret);
return ret;
}
- return !!(val & BIT(offset));
+ return !!(val & BIT(offset % 8));
}
static void palmas_gpio_set(struct gpio_chip *gc, unsigned offset,
@@ -59,11 +89,11 @@ static void palmas_gpio_set(struct gpio_chip *gc, unsigned offset,
int ret;
if (value)
- ret = palmas_write(palmas, PALMAS_GPIO_BASE,
- PALMAS_GPIO_SET_DATA_OUT, BIT(offset));
+ ret = palmas_gpio_write(palmas, PALMAS_GPIO_SET_DATA_OUT,
+ offset, BIT(offset % 8));
else
- ret = palmas_write(palmas, PALMAS_GPIO_BASE,
- PALMAS_GPIO_CLEAR_DATA_OUT, BIT(offset));
+ ret = palmas_gpio_write(palmas, PALMAS_GPIO_CLEAR_DATA_OUT,
+ offset, BIT(offset % 8));
if (ret < 0)
dev_err(gc->dev, "%s write failed, err = %d\n",
(value) ? "GPIO_SET_DATA_OUT" : "GPIO_CLEAR_DATA_OUT",
@@ -80,8 +110,8 @@ static int palmas_gpio_output(struct gpio_chip *gc, unsigned offset,
/* Set the initial value */
palmas_gpio_set(gc, offset, value);
- ret = palmas_update_bits(palmas, PALMAS_GPIO_BASE,
- PALMAS_GPIO_DATA_DIR, BIT(offset), BIT(offset));
+ ret = palmas_gpio_update_bits(palmas, PALMAS_GPIO_DATA_DIR,
+ offset, 1 << (offset % 8), 1 << (offset % 8));
if (ret < 0)
dev_err(gc->dev, "GPIO_DATA_DIR write failed, err = %d\n", ret);
return ret;
@@ -93,8 +123,8 @@ static int palmas_gpio_input(struct gpio_chip *gc, unsigned offset)
struct palmas *palmas = pg->palmas;
int ret;
- ret = palmas_update_bits(palmas, PALMAS_GPIO_BASE,
- PALMAS_GPIO_DATA_DIR, BIT(offset), 0);
+ ret = palmas_gpio_update_bits(palmas, PALMAS_GPIO_DATA_DIR,
+ offset, 1 << (offset % 8), 0);
if (ret < 0)
dev_err(gc->dev, "GPIO_DATA_DIR write failed, err = %d\n", ret);
return ret;
@@ -108,7 +138,21 @@ static int palmas_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
return palmas_irq_get_virq(palmas, PALMAS_GPIO_0_IRQ + offset);
}
-static int palmas_gpio_probe(struct platform_device *pdev)
+static int palmas_gpio_set_debounce(struct gpio_chip *gc, unsigned offset,
+ unsigned debounce)
+{
+ struct palmas_gpio *palmas_gpio = to_palmas_gpio(gc);
+ struct palmas *palmas = palmas_gpio->palmas;
+ unsigned int data = 0;
+
+ if (debounce)
+ data = 0xff;
+
+ return palmas_gpio_update_bits(palmas, PALMAS_GPIO_DEBOUNCE_EN,
+ offset, 1 << (offset % 8), data);
+}
+
+static int palmas_gpio_probe(struct platform_device *pdev)
{
struct palmas *palmas = dev_get_drvdata(pdev->dev.parent);
struct palmas_platform_data *palmas_pdata;
@@ -122,6 +166,10 @@ static int palmas_gpio_probe(struct platform_device *pdev)
return -ENOMEM;
}
+ /* palmas charger has 16 gpios */
+ if (is_palmas_charger(palmas->product_id))
+ palmas_gpio->gpio_chip.ngpio = 16;
+
palmas_gpio->palmas = palmas;
palmas_gpio->gpio_chip.owner = THIS_MODULE;
palmas_gpio->gpio_chip.label = dev_name(&pdev->dev);
@@ -129,6 +177,7 @@ static int palmas_gpio_probe(struct platform_device *pdev)
palmas_gpio->gpio_chip.can_sleep = 1;
palmas_gpio->gpio_chip.direction_input = palmas_gpio_input;
palmas_gpio->gpio_chip.direction_output = palmas_gpio_output;
+ palmas_gpio->gpio_chip.set_debounce = palmas_gpio_set_debounce,
palmas_gpio->gpio_chip.to_irq = palmas_gpio_to_irq;
palmas_gpio->gpio_chip.set = palmas_gpio_set;
palmas_gpio->gpio_chip.get = palmas_gpio_get;
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 98c0567..0b86845 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -243,7 +243,7 @@ struct palmas_platform_data {
* then the two value to load into the registers if true
*/
int mux_from_pdata;
- u8 pad1, pad2;
+ u8 pad1, pad2, pad3, pad4;
struct palmas_pmic_platform_data *pmic_pdata;
struct palmas_gpadc_platform_data *gpadc_pdata;
@@ -2512,6 +2512,16 @@ enum usb_irq_events {
#define PALMAS_PU_PD_GPIO_CTRL1 0x6
#define PALMAS_PU_PD_GPIO_CTRL2 0x7
#define PALMAS_OD_OUTPUT_GPIO_CTRL 0x8
+#define PALMAS_GPIO_DATA_IN2 0x9
+#define PALMAS_GPIO_DATA_DIR2 0xA
+#define PALMAS_GPIO_DATA_OUT2 0xB
+#define PALMAS_GPIO_DEBOUNCE_EN2 0xC
+#define PALMAS_GPIO_CLEAR_DATA_OUT2 0xD
+#define PALMAS_GPIO_SET_DATA_OUT2 0xE
+#define PALMAS_PU_PD_GPIO_CTRL3 0xF
+#define PALMAS_PU_PD_GPIO_CTRL4 0x10
+#define PALMAS_OD_OUTPUT_GPIO_CTRL2 0x11
+#define PALMAS_GPO_CTRL 0x12
/* Bit definitions for GPIO_DATA_IN */
#define PALMAS_GPIO_DATA_IN_GPIO_7_IN 0x80
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: palmas: add in GPIO support for palmas charger
2013-02-26 13:21 [PATCH] gpio: palmas: add in GPIO support for palmas charger Ian Lartey
@ 2013-02-26 13:58 ` Laxman Dewangan
2013-02-26 14:13 ` Ian Lartey
0 siblings, 1 reply; 6+ messages in thread
From: Laxman Dewangan @ 2013-02-26 13:58 UTC (permalink / raw)
To: Ian Lartey
Cc: linux-kernel, grant.likely, linus.walleij, sameo, Graeme Gregory
On Tuesday 26 February 2013 06:51 PM, Ian Lartey wrote:
> this patch depenfs on [PATCH] mfd: palmas: is_palmas_charger needed by multiple drivers
>
> Palmas charger has 16 GPIOs
> add palmas_gpio_[read|write|update] api to take account
> second bank of GPIOs
>
> Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
> Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
> ---
>
> + /* palmas charger has 16 gpios */
> + if (is_palmas_charger(palmas->product_id))
> + palmas_gpio->gpio_chip.ngpio = 16;
> +
what happen if it is not palma charger?
palmas_gpio->gpio_chip.ngpio = 8; is missing or it will overwrite somewhere.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: palmas: add in GPIO support for palmas charger
2013-02-26 13:58 ` Laxman Dewangan
@ 2013-02-26 14:13 ` Ian Lartey
[not found] ` <512CC357.9040600@nvidia.com>
0 siblings, 1 reply; 6+ messages in thread
From: Ian Lartey @ 2013-02-26 14:13 UTC (permalink / raw)
To: Laxman Dewangan
Cc: linux-kernel, grant.likely, linus.walleij, sameo, Graeme Gregory
On 26/02/13 13:58, Laxman Dewangan wrote:
> On Tuesday 26 February 2013 06:51 PM, Ian Lartey wrote:
>> this patch depenfs on [PATCH] mfd: palmas: is_palmas_charger needed by
>> multiple drivers
>>
>> Palmas charger has 16 GPIOs
>> add palmas_gpio_[read|write|update] api to take account
>> second bank of GPIOs
>>
>> Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
>> Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
>> ---
>
>> + /* palmas charger has 16 gpios */
>> + if (is_palmas_charger(palmas->product_id))
>> + palmas_gpio->gpio_chip.ngpio = 16;
>> +
> what happen if it is not palma charger?
> palmas_gpio->gpio_chip.ngpio = 8; is missing or it will overwrite
> somewhere.
>
the non palmas charger value of ngpio remains where it was -
but you have shown up an error in the ordering - Thanks
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: palmas: add in GPIO support for palmas charger
[not found] ` <512CC357.9040600@nvidia.com>
@ 2013-03-22 7:55 ` Linus Walleij
2013-03-22 8:37 ` Ian Lartey
0 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2013-03-22 7:55 UTC (permalink / raw)
To: Laxman Dewangan
Cc: Ian Lartey, linux-kernel, grant.likely, sameo, Graeme Gregory
On Tue, Feb 26, 2013 at 3:14 PM, Laxman Dewangan <ldewangan@nvidia.com> wrote:
> On Tuesday 26 February 2013 07:43 PM, Ian Lartey wrote:
> On 26/02/13 13:58, Laxman Dewangan wrote:
>
> On Tuesday 26 February 2013 06:51 PM, Ian Lartey wrote:
>
> this patch depenfs on [PATCH] mfd: palmas: is_palmas_charger needed by
> multiple drivers
>
> Palmas charger has 16 GPIOs
> add palmas_gpio_[read|write|update] api to take account
> second bank of GPIOs
>
> Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
> Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Is something happening in this series?
I'm ignoring it for now since the last activity in the thread was
some concerns from Laxman.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: palmas: add in GPIO support for palmas charger
2013-03-22 7:55 ` Linus Walleij
@ 2013-03-22 8:37 ` Ian Lartey
0 siblings, 0 replies; 6+ messages in thread
From: Ian Lartey @ 2013-03-22 8:37 UTC (permalink / raw)
To: Linus Walleij
Cc: Laxman Dewangan, linux-kernel, grant.likely, sameo, Graeme Gregory
On 22/03/13 07:55, Linus Walleij wrote:
> On Tue, Feb 26, 2013 at 3:14 PM, Laxman Dewangan <ldewangan@nvidia.com> wrote:
>
>> On Tuesday 26 February 2013 07:43 PM, Ian Lartey wrote:
>> On 26/02/13 13:58, Laxman Dewangan wrote:
>>
>> On Tuesday 26 February 2013 06:51 PM, Ian Lartey wrote:
>>
>> this patch depenfs on [PATCH] mfd: palmas: is_palmas_charger needed by
>> multiple drivers
>>
>> Palmas charger has 16 GPIOs
>> add palmas_gpio_[read|write|update] api to take account
>> second bank of GPIOs
>>
>> Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
>> Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
>
> Is something happening in this series?
>
> I'm ignoring it for now since the last activity in the thread was
> some concerns from Laxman.
>
> Yours,
> Linus Walleij
>
Yes there's going to be an patch series update [v9] posted today.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] gpio: palmas: add in GPIO support for palmas charger
@ 2013-02-26 14:49 Ian Lartey
0 siblings, 0 replies; 6+ messages in thread
From: Ian Lartey @ 2013-02-26 14:49 UTC (permalink / raw)
To: linux-kernel
Cc: grant.likely, linus.walleij, ldewangan, sameo, Ian Lartey,
Graeme Gregory
this patch depends on [PATCH] mfd: palmas: is_palmas_charger needed by multiple drivers
Palmas charger has 16 GPIOs
add palmas_gpio_[read|write|update] api to take account
second bank of GPIOs
Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
---
drivers/gpio/gpio-palmas.c | 75 ++++++++++++++++++++++++++++++++++++-------
include/linux/mfd/palmas.h | 12 ++++++-
2 files changed, 73 insertions(+), 14 deletions(-)
diff --git a/drivers/gpio/gpio-palmas.c b/drivers/gpio/gpio-palmas.c
index e3a4e56..443802a 100644
--- a/drivers/gpio/gpio-palmas.c
+++ b/drivers/gpio/gpio-palmas.c
@@ -1,5 +1,5 @@
/*
- * TI Palma series PMIC's GPIO driver.
+ * TI Palmas series PMIC's GPIO driver.
*
* Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
*
@@ -31,6 +31,36 @@ struct palmas_gpio {
struct palmas *palmas;
};
+static int palmas_gpio_read(struct palmas *palmas, unsigned int reg,
+ int gpio, unsigned int *dest)
+{
+ /* registers for second bank are identical and offset by 0x9 */
+ if (gpio > 7)
+ reg += PALMAS_GPIO_DATA_IN2;
+
+ return palmas_read(palmas, PALMAS_GPIO_BASE, reg, dest);
+}
+
+static int palmas_gpio_write(struct palmas *palmas, unsigned int reg,
+ int gpio, unsigned int data)
+{
+ /* registers for second bank are identical and offset by 0x9 */
+ if (gpio > 7)
+ reg += PALMAS_GPIO_DATA_IN2;
+
+ return palmas_write(palmas, PALMAS_GPIO_BASE, reg, data);
+}
+
+static int palmas_gpio_update_bits(struct palmas *palmas, unsigned int reg,
+ int gpio, unsigned int mask, unsigned int data)
+{
+ /* registers for second bank are identical and offset by 0x9 */
+ if (gpio > 7)
+ reg += PALMAS_GPIO_DATA_IN2;
+
+ return palmas_update_bits(palmas, PALMAS_GPIO_BASE, reg, mask, data);
+}
+
static inline struct palmas_gpio *to_palmas_gpio(struct gpio_chip *chip)
{
return container_of(chip, struct palmas_gpio, gpio_chip);
@@ -43,12 +73,12 @@ static int palmas_gpio_get(struct gpio_chip *gc, unsigned offset)
unsigned int val;
int ret;
- ret = palmas_read(palmas, PALMAS_GPIO_BASE, PALMAS_GPIO_DATA_IN, &val);
+ ret = palmas_gpio_read(palmas, PALMAS_GPIO_DATA_IN, offset, &val);
if (ret < 0) {
dev_err(gc->dev, "GPIO_DATA_IN read failed, err = %d\n", ret);
return ret;
}
- return !!(val & BIT(offset));
+ return !!(val & BIT(offset % 8));
}
static void palmas_gpio_set(struct gpio_chip *gc, unsigned offset,
@@ -59,11 +89,11 @@ static void palmas_gpio_set(struct gpio_chip *gc, unsigned offset,
int ret;
if (value)
- ret = palmas_write(palmas, PALMAS_GPIO_BASE,
- PALMAS_GPIO_SET_DATA_OUT, BIT(offset));
+ ret = palmas_gpio_write(palmas, PALMAS_GPIO_SET_DATA_OUT,
+ offset, BIT(offset % 8));
else
- ret = palmas_write(palmas, PALMAS_GPIO_BASE,
- PALMAS_GPIO_CLEAR_DATA_OUT, BIT(offset));
+ ret = palmas_gpio_write(palmas, PALMAS_GPIO_CLEAR_DATA_OUT,
+ offset, BIT(offset % 8));
if (ret < 0)
dev_err(gc->dev, "%s write failed, err = %d\n",
(value) ? "GPIO_SET_DATA_OUT" : "GPIO_CLEAR_DATA_OUT",
@@ -80,8 +110,8 @@ static int palmas_gpio_output(struct gpio_chip *gc, unsigned offset,
/* Set the initial value */
palmas_gpio_set(gc, offset, value);
- ret = palmas_update_bits(palmas, PALMAS_GPIO_BASE,
- PALMAS_GPIO_DATA_DIR, BIT(offset), BIT(offset));
+ ret = palmas_gpio_update_bits(palmas, PALMAS_GPIO_DATA_DIR,
+ offset, 1 << (offset % 8), 1 << (offset % 8));
if (ret < 0)
dev_err(gc->dev, "GPIO_DATA_DIR write failed, err = %d\n", ret);
return ret;
@@ -93,8 +123,8 @@ static int palmas_gpio_input(struct gpio_chip *gc, unsigned offset)
struct palmas *palmas = pg->palmas;
int ret;
- ret = palmas_update_bits(palmas, PALMAS_GPIO_BASE,
- PALMAS_GPIO_DATA_DIR, BIT(offset), 0);
+ ret = palmas_gpio_update_bits(palmas, PALMAS_GPIO_DATA_DIR,
+ offset, 1 << (offset % 8), 0);
if (ret < 0)
dev_err(gc->dev, "GPIO_DATA_DIR write failed, err = %d\n", ret);
return ret;
@@ -108,7 +138,21 @@ static int palmas_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
return palmas_irq_get_virq(palmas, PALMAS_GPIO_0_IRQ + offset);
}
-static int palmas_gpio_probe(struct platform_device *pdev)
+static int palmas_gpio_set_debounce(struct gpio_chip *gc, unsigned offset,
+ unsigned debounce)
+{
+ struct palmas_gpio *palmas_gpio = to_palmas_gpio(gc);
+ struct palmas *palmas = palmas_gpio->palmas;
+ unsigned int data = 0;
+
+ if (debounce)
+ data = 0xff;
+
+ return palmas_gpio_update_bits(palmas, PALMAS_GPIO_DEBOUNCE_EN,
+ offset, 1 << (offset % 8), data);
+}
+
+static int palmas_gpio_probe(struct platform_device *pdev)
{
struct palmas *palmas = dev_get_drvdata(pdev->dev.parent);
struct palmas_platform_data *palmas_pdata;
@@ -125,10 +169,15 @@ static int palmas_gpio_probe(struct platform_device *pdev)
palmas_gpio->palmas = palmas;
palmas_gpio->gpio_chip.owner = THIS_MODULE;
palmas_gpio->gpio_chip.label = dev_name(&pdev->dev);
- palmas_gpio->gpio_chip.ngpio = 8;
+ /* palmas charger has 16 gpios */
+ if (is_palmas_charger(palmas->product_id))
+ palmas_gpio->gpio_chip.ngpio = 16;
+ else
+ palmas_gpio->gpio_chip.ngpio = 8;
palmas_gpio->gpio_chip.can_sleep = 1;
palmas_gpio->gpio_chip.direction_input = palmas_gpio_input;
palmas_gpio->gpio_chip.direction_output = palmas_gpio_output;
+ palmas_gpio->gpio_chip.set_debounce = palmas_gpio_set_debounce,
palmas_gpio->gpio_chip.to_irq = palmas_gpio_to_irq;
palmas_gpio->gpio_chip.set = palmas_gpio_set;
palmas_gpio->gpio_chip.get = palmas_gpio_get;
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 98c0567..0b86845 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -243,7 +243,7 @@ struct palmas_platform_data {
* then the two value to load into the registers if true
*/
int mux_from_pdata;
- u8 pad1, pad2;
+ u8 pad1, pad2, pad3, pad4;
struct palmas_pmic_platform_data *pmic_pdata;
struct palmas_gpadc_platform_data *gpadc_pdata;
@@ -2512,6 +2512,16 @@ enum usb_irq_events {
#define PALMAS_PU_PD_GPIO_CTRL1 0x6
#define PALMAS_PU_PD_GPIO_CTRL2 0x7
#define PALMAS_OD_OUTPUT_GPIO_CTRL 0x8
+#define PALMAS_GPIO_DATA_IN2 0x9
+#define PALMAS_GPIO_DATA_DIR2 0xA
+#define PALMAS_GPIO_DATA_OUT2 0xB
+#define PALMAS_GPIO_DEBOUNCE_EN2 0xC
+#define PALMAS_GPIO_CLEAR_DATA_OUT2 0xD
+#define PALMAS_GPIO_SET_DATA_OUT2 0xE
+#define PALMAS_PU_PD_GPIO_CTRL3 0xF
+#define PALMAS_PU_PD_GPIO_CTRL4 0x10
+#define PALMAS_OD_OUTPUT_GPIO_CTRL2 0x11
+#define PALMAS_GPO_CTRL 0x12
/* Bit definitions for GPIO_DATA_IN */
#define PALMAS_GPIO_DATA_IN_GPIO_7_IN 0x80
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-22 8:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26 13:21 [PATCH] gpio: palmas: add in GPIO support for palmas charger Ian Lartey
2013-02-26 13:58 ` Laxman Dewangan
2013-02-26 14:13 ` Ian Lartey
[not found] ` <512CC357.9040600@nvidia.com>
2013-03-22 7:55 ` Linus Walleij
2013-03-22 8:37 ` Ian Lartey
2013-02-26 14:49 Ian Lartey
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.