All of lore.kernel.org
 help / color / mirror / Atom feed
* collie and SA1100 patches
@ 2009-10-05 21:35 Thomas Kunze
  2009-10-05 21:35 ` [PATCH 1/9] collie: fix scoop convesion to new api Thomas Kunze
                   ` (4 more replies)
  0 siblings, 5 replies; 33+ messages in thread
From: Thomas Kunze @ 2009-10-05 21:35 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all!
   
This patchset implements prober power management for collie. To archieve this
some bugs were fixed and gpiolib-support was added to the ucb1x00 driver.
Please tell me if I should CC some other people or lists.

Regards,
Thomas

Statistics:
 arch/arm/mach-sa1100/collie.c              |   79 +++++-
 arch/arm/mach-sa1100/include/mach/collie.h |   77 +++---
 arch/arm/mach-sa1100/include/mach/gpio.h   |   19 +-
 arch/arm/mach-sa1100/include/mach/mcp.h    |    1 +
 drivers/leds/leds-locomo.c                 |    2 +-
 drivers/mfd/mcp-core.c                     |    2 +-
 drivers/mfd/mcp-sa11x0.c                   |    3 +-
 drivers/mfd/ucb1x00-assabet.c              |    2 +-
 drivers/mfd/ucb1x00-core.c                 |   89 ++++++-
 drivers/mfd/ucb1x00-ts.c                   |    2 +-
 drivers/power/Kconfig                      |    7 +
 drivers/power/Makefile                     |    1 +
 drivers/power/collie_battery.c             |  418 ++++++++++++++++++++++++++++
 {drivers => include/linux}/mfd/mcp.h       |    3 +
 {drivers => include/linux}/mfd/ucb1x00.h   |    7 +-
 15 files changed, 649 insertions(+), 63 deletions(-)
 create mode 100644 drivers/power/collie_battery.c
 rename {drivers => include/linux}/mfd/mcp.h (97%)
 rename {drivers => include/linux}/mfd/ucb1x00.h (98%)

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 1/9] collie: fix scoop convesion to new api
  2009-10-05 21:35 collie and SA1100 patches Thomas Kunze
@ 2009-10-05 21:35 ` Thomas Kunze
  2009-10-05 21:35   ` [PATCH 2/9] collie: prepare for gpiolib use Thomas Kunze
  2009-10-06 10:33 ` collie and SA1100 patches Mark Brown
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 33+ messages in thread
From: Thomas Kunze @ 2009-10-05 21:35 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
---
 arch/arm/mach-sa1100/collie.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index bbf2ebc..b629cba 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -56,6 +56,7 @@ static struct resource collie_scoop_resources[] = {
 static struct scoop_config collie_scoop_setup = {
 	.io_dir 	= COLLIE_SCOOP_IO_DIR,
 	.io_out		= COLLIE_SCOOP_IO_OUT,
+	.gpio_base	= COLLIE_SCOOP_GPIO_BASE,
 };
 
 struct platform_device colliescoop_device = {
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 2/9] collie: prepare for gpiolib use
  2009-10-05 21:35 ` [PATCH 1/9] collie: fix scoop convesion to new api Thomas Kunze
@ 2009-10-05 21:35   ` Thomas Kunze
  2009-10-05 21:35     ` [PATCH 3/9] move drivers/mfd/*.h to include/linux/mfd Thomas Kunze
  2009-10-07 11:08     ` [PATCH 2/9] collie: prepare for gpiolib use Dmitry Artamonow
  0 siblings, 2 replies; 33+ messages in thread
From: Thomas Kunze @ 2009-10-05 21:35 UTC (permalink / raw)
  To: linux-arm-kernel

prefix gpio definitions for direct register access with '_' so we
can use the other names for gpio_request & co

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
---
 arch/arm/mach-sa1100/collie.c              |   12 ++++---
 arch/arm/mach-sa1100/include/mach/collie.h |   42 +++++++++++++++++----------
 2 files changed, 33 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index b629cba..9f5029c 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -249,22 +249,24 @@ static void __init collie_init(void)
 	GPDR = GPIO_LDD8 | GPIO_LDD9 | GPIO_LDD10 | GPIO_LDD11 | GPIO_LDD12 |
 		GPIO_LDD13 | GPIO_LDD14 | GPIO_LDD15 | GPIO_SSP_TXD |
 		GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SDLC_SCLK |
-		COLLIE_GPIO_UCB1x00_RESET | COLLIE_GPIO_nMIC_ON |
-		COLLIE_GPIO_nREMOCON_ON | GPIO_32_768kHz;
+		_COLLIE_GPIO_UCB1x00_RESET | _COLLIE_GPIO_nMIC_ON |
+		_COLLIE_GPIO_nREMOCON_ON | GPIO_32_768kHz;
 
 	PPDR = PPC_LDD0 | PPC_LDD1 | PPC_LDD2 | PPC_LDD3 | PPC_LDD4 | PPC_LDD5 |
 		PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS |
 		PPC_TXD1 | PPC_TXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM;
 
-	PWER = COLLIE_GPIO_AC_IN | COLLIE_GPIO_CO | COLLIE_GPIO_ON_KEY |
-		COLLIE_GPIO_WAKEUP | COLLIE_GPIO_nREMOCON_INT | PWER_RTC;
+	PWER = _COLLIE_GPIO_AC_IN | _COLLIE_GPIO_CO | _COLLIE_GPIO_ON_KEY |
+		_COLLIE_GPIO_WAKEUP | _COLLIE_GPIO_nREMOCON_INT | PWER_RTC;
 
-	PGSR = COLLIE_GPIO_nREMOCON_ON;
+	PGSR = _COLLIE_GPIO_nREMOCON_ON;
 
 	PSDR = PPC_RXD1 | PPC_RXD2 | PPC_RXD3 | PPC_RXD4;
 
 	PCFR = PCFR_OPDE;
 
+	GPSR |= _COLLIE_GPIO_UCB1x00_RESET;
+
 
 	platform_scoop_config = &collie_pcmcia_config;
 
diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h
index 9efb569..8c8fe46 100644
--- a/arch/arm/mach-sa1100/include/mach/collie.h
+++ b/arch/arm/mach-sa1100/include/mach/collie.h
@@ -30,24 +30,34 @@
 				COLLIE_SCP_LB_VOL_CHG )
 #define COLLIE_SCOOP_IO_OUT	( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R )
 
-/* GPIOs for which the generic definition doesn't say much */
+/* GPIOs for gpiolib  */
 
-#define COLLIE_GPIO_ON_KEY		GPIO_GPIO (0)
-#define COLLIE_GPIO_AC_IN		GPIO_GPIO (1)
-#define COLLIE_GPIO_SDIO_INT		GPIO_GPIO (11)
-#define COLLIE_GPIO_CF_IRQ		GPIO_GPIO (14)
-#define COLLIE_GPIO_nREMOCON_INT	GPIO_GPIO (15)
-#define COLLIE_GPIO_UCB1x00_RESET	GPIO_GPIO (16)
-#define COLLIE_GPIO_nMIC_ON		GPIO_GPIO (17)
-#define COLLIE_GPIO_nREMOCON_ON		GPIO_GPIO (18)
-#define COLLIE_GPIO_CO			GPIO_GPIO (20)
-#define COLLIE_GPIO_MCP_CLK		GPIO_GPIO (21)
-#define COLLIE_GPIO_CF_CD		GPIO_GPIO (22)
-#define COLLIE_GPIO_UCB1x00_IRQ		GPIO_GPIO (23)
-#define COLLIE_GPIO_WAKEUP		GPIO_GPIO (24)
-#define COLLIE_GPIO_GA_INT		GPIO_GPIO (25)
-#define COLLIE_GPIO_MAIN_BAT_LOW	GPIO_GPIO (26)
+#define COLLIE_GPIO_ON_KEY		(0)
+#define COLLIE_GPIO_AC_IN		(1)
+#define COLLIE_GPIO_SDIO_INT		(11)
+#define COLLIE_GPIO_CF_IRQ		(14)
+#define COLLIE_GPIO_nREMOCON_INT	(15)
+#define COLLIE_GPIO_UCB1x00_RESET	(16)
+#define COLLIE_GPIO_nMIC_ON		(17)
+#define COLLIE_GPIO_nREMOCON_ON		(18)
+#define COLLIE_GPIO_CO			(20)
+#define COLLIE_GPIO_MCP_CLK		(21)
+#define COLLIE_GPIO_CF_CD		(22)
+#define COLLIE_GPIO_UCB1x00_IRQ		(23)
+#define COLLIE_GPIO_WAKEUP		(24)
+#define COLLIE_GPIO_GA_INT		(25)
+#define COLLIE_GPIO_MAIN_BAT_LOW	(26)
 
+/* GPIO definitions for direct register access */
+
+#define _COLLIE_GPIO_ON_KEY		GPIO_GPIO(0)
+#define _COLLIE_GPIO_AC_IN		GPIO_GPIO(1)
+#define _COLLIE_GPIO_nREMOCON_INT	GPIO_GPIO(15)
+#define _COLLIE_GPIO_UCB1x00_RESET	GPIO_GPIO(16)
+#define _COLLIE_GPIO_nMIC_ON		GPIO_GPIO(17)
+#define _COLLIE_GPIO_nREMOCON_ON	GPIO_GPIO(18)
+#define _COLLIE_GPIO_CO			GPIO_GPIO(20)
+#define _COLLIE_GPIO_WAKEUP		GPIO_GPIO(24)
 /* Interrupts */
 
 #define COLLIE_IRQ_GPIO_ON_KEY		IRQ_GPIO0
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 3/9] move drivers/mfd/*.h to include/linux/mfd
  2009-10-05 21:35   ` [PATCH 2/9] collie: prepare for gpiolib use Thomas Kunze
@ 2009-10-05 21:35     ` Thomas Kunze
  2009-10-05 21:35       ` [PATCH 4/9] collie: locomo-led change default trigger Thomas Kunze
  2009-10-07 11:08     ` [PATCH 2/9] collie: prepare for gpiolib use Dmitry Artamonow
  1 sibling, 1 reply; 33+ messages in thread
From: Thomas Kunze @ 2009-10-05 21:35 UTC (permalink / raw)
  To: linux-arm-kernel

So drivers like collie_battery driver can use
those files easier.

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
---
 drivers/mfd/mcp-core.c                   |    2 +-
 drivers/mfd/mcp-sa11x0.c                 |    2 +-
 drivers/mfd/ucb1x00-assabet.c            |    2 +-
 drivers/mfd/ucb1x00-core.c               |    2 +-
 drivers/mfd/ucb1x00-ts.c                 |    2 +-
 {drivers => include/linux}/mfd/mcp.h     |    2 ++
 {drivers => include/linux}/mfd/ucb1x00.h |    4 ++--
 7 files changed, 9 insertions(+), 7 deletions(-)
 rename {drivers => include/linux}/mfd/mcp.h (98%)
 rename {drivers => include/linux}/mfd/ucb1x00.h (99%)

diff --git a/drivers/mfd/mcp-core.c b/drivers/mfd/mcp-core.c
index 57271cb..84815f9 100644
--- a/drivers/mfd/mcp-core.c
+++ b/drivers/mfd/mcp-core.c
@@ -17,11 +17,11 @@
 #include <linux/device.h>
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/mfd/mcp.h>
 
 #include <mach/dma.h>
 #include <asm/system.h>
 
-#include "mcp.h"
 
 #define to_mcp(d)		container_of(d, struct mcp, attached_device)
 #define to_mcp_driver(d)	container_of(d, struct mcp_driver, drv)
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
index 62b32da..2121898 100644
--- a/drivers/mfd/mcp-sa11x0.c
+++ b/drivers/mfd/mcp-sa11x0.c
@@ -19,6 +19,7 @@
 #include <linux/spinlock.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
+#include <linux/mfd/mcp.h>
 
 #include <mach/dma.h>
 #include <mach/hardware.h>
@@ -28,7 +29,6 @@
 
 #include <mach/assabet.h>
 
-#include "mcp.h"
 
 struct mcp_sa11x0 {
 	u32	mccr0;
diff --git a/drivers/mfd/ucb1x00-assabet.c b/drivers/mfd/ucb1x00-assabet.c
index 86fed48..cea9da6 100644
--- a/drivers/mfd/ucb1x00-assabet.c
+++ b/drivers/mfd/ucb1x00-assabet.c
@@ -14,10 +14,10 @@
 #include <linux/fs.h>
 #include <linux/proc_fs.h>
 #include <linux/device.h>
+#include <linux/mfd/ucb1x00.h>
 
 #include <mach/dma.h>
 
-#include "ucb1x00.h"
 
 #define UCB1X00_ATTR(name,input)\
 static ssize_t name##_show(struct device *dev, struct device_attribute *attr, \
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index fea9085..61f3933 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -24,11 +24,11 @@
 #include <linux/interrupt.h>
 #include <linux/device.h>
 #include <linux/mutex.h>
+#include <linux/mfd/ucb1x00.h>
 
 #include <mach/dma.h>
 #include <mach/hardware.h>
 
-#include "ucb1x00.h"
 
 static DEFINE_MUTEX(ucb1x00_mutex);
 static LIST_HEAD(ucb1x00_drivers);
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
index 61b7d3e..000cb41 100644
--- a/drivers/mfd/ucb1x00-ts.c
+++ b/drivers/mfd/ucb1x00-ts.c
@@ -30,12 +30,12 @@
 #include <linux/freezer.h>
 #include <linux/slab.h>
 #include <linux/kthread.h>
+#include <linux/mfd/ucb1x00.h>
 
 #include <mach/dma.h>
 #include <mach/collie.h>
 #include <asm/mach-types.h>
 
-#include "ucb1x00.h"
 
 
 struct ucb1x00_ts {
diff --git a/drivers/mfd/mcp.h b/include/linux/mfd/mcp.h
similarity index 98%
rename from drivers/mfd/mcp.h
rename to include/linux/mfd/mcp.h
index c093a93..be95e09 100644
--- a/drivers/mfd/mcp.h
+++ b/include/linux/mfd/mcp.h
@@ -10,6 +10,8 @@
 #ifndef MCP_H
 #define MCP_H
 
+#include <mach/dma.h>
+
 struct mcp_ops;
 
 struct mcp {
diff --git a/drivers/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h
similarity index 99%
rename from drivers/mfd/ucb1x00.h
rename to include/linux/mfd/ucb1x00.h
index a8ad8a0..eac3463 100644
--- a/drivers/mfd/ucb1x00.h
+++ b/include/linux/mfd/ucb1x00.h
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mfd/ucb1x00.h
+ *  linux/include/mfd/ucb1x00.h
  *
  *  Copyright (C) 2001 Russell King, All Rights Reserved.
  *
@@ -10,6 +10,7 @@
 #ifndef UCB1200_H
 #define UCB1200_H
 
+#include <linux/mfd/mcp.h>
 #define UCB_IO_DATA	0x00
 #define UCB_IO_DIR	0x01
 
@@ -100,7 +101,6 @@
 #define UCB_MODE_DYN_VFLAG_ENA	(1 << 12)
 #define UCB_MODE_AUD_OFF_CAN	(1 << 13)
 
-#include "mcp.h"
 
 struct ucb1x00_irq {
 	void *devid;
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 4/9] collie: locomo-led change default trigger
  2009-10-05 21:35     ` [PATCH 3/9] move drivers/mfd/*.h to include/linux/mfd Thomas Kunze
@ 2009-10-05 21:35       ` Thomas Kunze
  2009-10-05 21:35         ` [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro Thomas Kunze
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Kunze @ 2009-10-05 21:35 UTC (permalink / raw)
  To: linux-arm-kernel

Collie uses now the powersupply framework. Change the
default led-trigger of locomo-led to reflect that.

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
---
 drivers/leds/leds-locomo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-locomo.c b/drivers/leds/leds-locomo.c
index 5d91362..1f7c10f 100644
--- a/drivers/leds/leds-locomo.c
+++ b/drivers/leds/leds-locomo.c
@@ -44,7 +44,7 @@ static void locomoled_brightness_set1(struct led_classdev *led_cdev,
 
 static struct led_classdev locomo_led0 = {
 	.name			= "locomo:amber:charge",
-	.default_trigger	= "sharpsl-charge",
+	.default_trigger	= "main-battery-charging",
 	.brightness_set		= locomoled_brightness_set0,
 };
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro
  2009-10-05 21:35       ` [PATCH 4/9] collie: locomo-led change default trigger Thomas Kunze
@ 2009-10-05 21:35         ` Thomas Kunze
  2009-10-05 21:35           ` [PATCH 6/9] add gpiolib support to ucb1x00 Thomas Kunze
  2009-10-11 12:15           ` [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro Pavel Machek
  0 siblings, 2 replies; 33+ messages in thread
From: Thomas Kunze @ 2009-10-05 21:35 UTC (permalink / raw)
  To: linux-arm-kernel

The function can't be used for static initialisations so
convert them to macros.

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
---
 arch/arm/mach-sa1100/include/mach/gpio.h |   19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-sa1100/include/mach/gpio.h b/arch/arm/mach-sa1100/include/mach/gpio.h
index 582a0c9..7befc10 100644
--- a/arch/arm/mach-sa1100/include/mach/gpio.h
+++ b/arch/arm/mach-sa1100/include/mach/gpio.h
@@ -49,20 +49,9 @@ static inline void gpio_set_value(unsigned gpio, int value)
 
 #define gpio_cansleep	__gpio_cansleep
 
-static inline unsigned gpio_to_irq(unsigned gpio)
-{
-	if (gpio < 11)
-		return IRQ_GPIO0 + gpio;
-	else
-		return IRQ_GPIO11 - 11 + gpio;
-}
-
-static inline unsigned irq_to_gpio(unsigned irq)
-{
-	if (irq < IRQ_GPIO11_27)
-		return irq - IRQ_GPIO0;
-	else
-		return irq - IRQ_GPIO11 + 11;
-}
+#define gpio_to_irq(gpio)	((gpio < 11) ? (IRQ_GPIO0 + gpio) : \
+					(IRQ_GPIO11 - 11 + gpio))
+#define irq_to_gpio(irq)	((irq < IRQ_GPIO11_27) ? (irq - IRQ_GPIO0) : \
+					(irq - IRQ_GPIO11 + 11))
 
 #endif
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 6/9] add gpiolib support to ucb1x00
  2009-10-05 21:35         ` [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro Thomas Kunze
@ 2009-10-05 21:35           ` Thomas Kunze
  2009-10-05 21:35             ` [PATCH 7/9] collie: convert to gpiolib for ucb1x00 Thomas Kunze
  2009-11-28 12:47             ` [PATCH 6/9] add gpiolib support to ucb1x00 Russell King - ARM Linux
  2009-10-11 12:15           ` [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro Pavel Machek
  1 sibling, 2 replies; 33+ messages in thread
From: Thomas Kunze @ 2009-10-05 21:35 UTC (permalink / raw)
  To: linux-arm-kernel

The old access methods to the gpios will be removed when
all users has been converted. (mainly ucb1x00-ts)

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
---
 arch/arm/mach-sa1100/include/mach/mcp.h |    1 +
 drivers/mfd/mcp-sa11x0.c                |    1 +
 drivers/mfd/ucb1x00-core.c              |   87 ++++++++++++++++++++++++++++++-
 include/linux/mfd/mcp.h                 |    1 +
 include/linux/mfd/ucb1x00.h             |    3 +
 5 files changed, 91 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-sa1100/include/mach/mcp.h b/arch/arm/mach-sa1100/include/mach/mcp.h
index fb8b09a..ed1a331 100644
--- a/arch/arm/mach-sa1100/include/mach/mcp.h
+++ b/arch/arm/mach-sa1100/include/mach/mcp.h
@@ -16,6 +16,7 @@ struct mcp_plat_data {
 	u32 mccr0;
 	u32 mccr1;
 	unsigned int sclk_rate;
+	int gpio_base;
 };
 
 #endif
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
index 2121898..2584272 100644
--- a/drivers/mfd/mcp-sa11x0.c
+++ b/drivers/mfd/mcp-sa11x0.c
@@ -163,6 +163,7 @@ static int mcp_sa11x0_probe(struct platform_device *pdev)
 	mcp->dma_audio_wr	= DMA_Ser4MCP0Wr;
 	mcp->dma_telco_rd	= DMA_Ser4MCP1Rd;
 	mcp->dma_telco_wr	= DMA_Ser4MCP1Wr;
+	mcp->gpio_base		= data->gpio_base;
 
 	platform_set_drvdata(pdev, mcp);
 
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index 61f3933..e0d7700 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -25,11 +25,11 @@
 #include <linux/device.h>
 #include <linux/mutex.h>
 #include <linux/mfd/ucb1x00.h>
+#include <linux/gpio.h>
 
 #include <mach/dma.h>
 #include <mach/hardware.h>
 
-
 static DEFINE_MUTEX(ucb1x00_mutex);
 static LIST_HEAD(ucb1x00_drivers);
 static LIST_HEAD(ucb1x00_devices);
@@ -107,6 +107,60 @@ unsigned int ucb1x00_io_read(struct ucb1x00 *ucb)
 	return ucb1x00_reg_read(ucb, UCB_IO_DATA);
 }
 
+static void ucb1x00_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+{
+	struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio);
+	unsigned long flags;
+
+	spin_lock_irqsave(&ucb->io_lock, flags);
+	if (value)
+		ucb->io_out |= 1 << offset;
+	else
+		ucb->io_out &= ~(1 << offset);
+
+	ucb1x00_reg_write(ucb, UCB_IO_DATA, ucb->io_out);
+	spin_unlock_irqrestore(&ucb->io_lock, flags);
+}
+
+static int ucb1x00_gpio_get(struct gpio_chip *chip, unsigned offset)
+{
+	struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio);
+	return ucb1x00_reg_read(ucb, UCB_IO_DATA) & (1 << offset);
+}
+
+static int ucb1x00_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
+{
+	struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio);
+	unsigned long flags;
+
+	spin_lock_irqsave(&ucb->io_lock, flags);
+	ucb->io_dir &= ~(1 << offset);
+	ucb1x00_reg_write(ucb, UCB_IO_DIR, ucb->io_dir);
+	spin_unlock_irqrestore(&ucb->io_lock, flags);
+
+	return 0;
+}
+
+static int ucb1x00_gpio_direction_output(struct gpio_chip *chip, unsigned offset
+		, int value)
+{
+	struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio);
+	unsigned long flags;
+
+	spin_lock_irqsave(&ucb->io_lock, flags);
+	ucb->io_dir |= (1 << offset);
+	ucb1x00_reg_write(ucb, UCB_IO_DIR, ucb->io_dir);
+
+	if (value)
+		ucb->io_out |= 1 << offset;
+	else
+		ucb->io_out &= ~(1 << offset);
+	ucb1x00_reg_write(ucb, UCB_IO_DATA, ucb->io_out);
+	spin_unlock_irqrestore(&ucb->io_lock, flags);
+
+	return 0;
+}
+
 /*
  * UCB1300 data sheet says we must:
  *  1. enable ADC	=> 5us (including reference startup time)
@@ -475,6 +529,7 @@ static int ucb1x00_probe(struct mcp *mcp)
 	struct ucb1x00_driver *drv;
 	unsigned int id;
 	int ret = -ENODEV;
+	int temp;
 
 	mcp_enable(mcp);
 	id = mcp_reg_read(mcp, UCB_ID);
@@ -507,12 +562,27 @@ static int ucb1x00_probe(struct mcp *mcp)
 		goto err_free;
 	}
 
+	ucb->gpio.base = -1;
+	if (mcp->gpio_base != 0) {
+		ucb->gpio.label = dev_name(&ucb->dev);
+		ucb->gpio.base = mcp->gpio_base;
+		ucb->gpio.ngpio = 10;
+		ucb->gpio.set = ucb1x00_gpio_set;
+		ucb->gpio.get = ucb1x00_gpio_get;
+		ucb->gpio.direction_input = ucb1x00_gpio_direction_input;
+		ucb->gpio.direction_output = ucb1x00_gpio_direction_output;
+		ret = gpiochip_add(&ucb->gpio);
+		if (ret)
+			goto err_free;
+	} else
+		dev_info(&ucb->dev, "gpio_base not set so no gpiolib support");
+
 	ret = request_irq(ucb->irq, ucb1x00_irq, IRQF_TRIGGER_RISING,
 			  "UCB1x00", ucb);
 	if (ret) {
 		printk(KERN_ERR "ucb1x00: unable to grab irq%d: %d\n",
 			ucb->irq, ret);
-		goto err_free;
+		goto err_gpio;
 	}
 
 	mcp_set_drvdata(mcp, ucb);
@@ -521,6 +591,7 @@ static int ucb1x00_probe(struct mcp *mcp)
 	if (ret)
 		goto err_irq;
 
+
 	INIT_LIST_HEAD(&ucb->devs);
 	mutex_lock(&ucb1x00_mutex);
 	list_add(&ucb->node, &ucb1x00_devices);
@@ -528,10 +599,14 @@ static int ucb1x00_probe(struct mcp *mcp)
 		ucb1x00_add_dev(ucb, drv);
 	}
 	mutex_unlock(&ucb1x00_mutex);
+
 	goto out;
 
  err_irq:
 	free_irq(ucb->irq, ucb);
+ err_gpio:
+	if (ucb->gpio.base != -1)
+		temp = gpiochip_remove(&ucb->gpio);
  err_free:
 	kfree(ucb);
  err_disable:
@@ -544,6 +619,7 @@ static void ucb1x00_remove(struct mcp *mcp)
 {
 	struct ucb1x00 *ucb = mcp_get_drvdata(mcp);
 	struct list_head *l, *n;
+	int ret;
 
 	mutex_lock(&ucb1x00_mutex);
 	list_del(&ucb->node);
@@ -553,6 +629,12 @@ static void ucb1x00_remove(struct mcp *mcp)
 	}
 	mutex_unlock(&ucb1x00_mutex);
 
+	if (ucb->gpio.base != -1) {
+		ret = gpiochip_remove(&ucb->gpio);
+		if (ret)
+			dev_err(&ucb->dev, "Can't remove gpio chip: %d\n", ret);
+	}
+
 	free_irq(ucb->irq, ucb);
 	device_unregister(&ucb->dev);
 }
@@ -603,6 +685,7 @@ static int ucb1x00_resume(struct mcp *mcp)
 	struct ucb1x00 *ucb = mcp_get_drvdata(mcp);
 	struct ucb1x00_dev *dev;
 
+	ucb1x00_reg_write(ucb, UCB_IO_DIR, ucb->io_dir);
 	mutex_lock(&ucb1x00_mutex);
 	list_for_each_entry(dev, &ucb->devs, dev_node) {
 		if (dev->drv->resume)
diff --git a/include/linux/mfd/mcp.h b/include/linux/mfd/mcp.h
index be95e09..ee49670 100644
--- a/include/linux/mfd/mcp.h
+++ b/include/linux/mfd/mcp.h
@@ -26,6 +26,7 @@ struct mcp {
 	dma_device_t	dma_telco_rd;
 	dma_device_t	dma_telco_wr;
 	struct device	attached_device;
+	int		gpio_base;
 };
 
 struct mcp_ops {
diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h
index eac3463..aa9c378 100644
--- a/include/linux/mfd/ucb1x00.h
+++ b/include/linux/mfd/ucb1x00.h
@@ -11,6 +11,8 @@
 #define UCB1200_H
 
 #include <linux/mfd/mcp.h>
+#include <linux/gpio.h>
+
 #define UCB_IO_DATA	0x00
 #define UCB_IO_DIR	0x01
 
@@ -123,6 +125,7 @@ struct ucb1x00 {
 	struct device		dev;
 	struct list_head	node;
 	struct list_head	devs;
+	struct gpio_chip 	gpio;
 };
 
 struct ucb1x00_driver;
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 7/9] collie: convert to gpiolib for ucb1x00
  2009-10-05 21:35           ` [PATCH 6/9] add gpiolib support to ucb1x00 Thomas Kunze
@ 2009-10-05 21:35             ` Thomas Kunze
  2009-10-05 21:35               ` [PATCH 8/9] collie: add battery driver Thomas Kunze
  2009-11-28 12:47             ` [PATCH 6/9] add gpiolib support to ucb1x00 Russell King - ARM Linux
  1 sibling, 1 reply; 33+ messages in thread
From: Thomas Kunze @ 2009-10-05 21:35 UTC (permalink / raw)
  To: linux-arm-kernel

Only the parts used for collie_battery are converted.
The rest will be cleaned up later.

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
---
 arch/arm/mach-sa1100/collie.c              |    1 +
 arch/arm/mach-sa1100/include/mach/collie.h |   35 ++++++++++++++-------------
 2 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 9f5029c..395cf09 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -86,6 +86,7 @@ static struct scoop_pcmcia_config collie_pcmcia_config = {
 static struct mcp_plat_data collie_mcp_data = {
 	.mccr0		= MCCR0_ADM | MCCR0_ExtClk,
 	.sclk_rate	= 9216000,
+	.gpio_base	= COLLIE_TC35143_GPIO_BASE,
 };
 
 #ifdef CONFIG_SHARP_LOCOMO
diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h
index 8c8fe46..71a0b3f 100644
--- a/arch/arm/mach-sa1100/include/mach/collie.h
+++ b/arch/arm/mach-sa1100/include/mach/collie.h
@@ -25,10 +25,10 @@
 #define COLLIE_GPIO_VPEN	(COLLIE_SCOOP_GPIO_BASE + 7)
 #define COLLIE_SCP_LB_VOL_CHG	SCOOP_GPCR_PA19
 
-#define COLLIE_SCOOP_IO_DIR	( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \
+#define COLLIE_SCOOP_IO_DIR	(COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \
 				COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \
-				COLLIE_SCP_LB_VOL_CHG )
-#define COLLIE_SCOOP_IO_OUT	( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R )
+				COLLIE_SCP_LB_VOL_CHG)
+#define COLLIE_SCOOP_IO_OUT	(COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R)
 
 /* GPIOs for gpiolib  */
 
@@ -80,19 +80,20 @@
 #define COLLIE_LCM_IRQ_GPIO_nSD_WP	IRQ_LOCOMO_GPIO14
 
 /* GPIO's on the TC35143AF (Toshiba Analog Frontend) */
-#define COLLIE_TC35143_GPIO_VERSION0    UCB_IO_0	/* GPIO0=Version                 */
-#define COLLIE_TC35143_GPIO_TBL_CHK     UCB_IO_1	/* GPIO1=TBL_CHK                 */
-#define COLLIE_TC35143_GPIO_VPEN_ON     UCB_IO_2	/* GPIO2=VPNE_ON                 */
-#define COLLIE_TC35143_GPIO_IR_ON       UCB_IO_3	/* GPIO3=IR_ON                   */
-#define COLLIE_TC35143_GPIO_AMP_ON      UCB_IO_4	/* GPIO4=AMP_ON                  */
-#define COLLIE_TC35143_GPIO_VERSION1    UCB_IO_5	/* GPIO5=Version                 */
-#define COLLIE_TC35143_GPIO_FS8KLPF     UCB_IO_5	/* GPIO5=fs 8k LPF               */
-#define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6	/* GPIO6=BUZZER BIAS             */
-#define COLLIE_TC35143_GPIO_MBAT_ON     UCB_IO_7	/* GPIO7=MBAT_ON                 */
-#define COLLIE_TC35143_GPIO_BBAT_ON     UCB_IO_8	/* GPIO8=BBAT_ON                 */
-#define COLLIE_TC35143_GPIO_TMP_ON      UCB_IO_9	/* GPIO9=TMP_ON                  */
-#define COLLIE_TC35143_GPIO_IN		( UCB_IO_0 | UCB_IO_2 | UCB_IO_5 )
-#define COLLIE_TC35143_GPIO_OUT		( UCB_IO_1 | UCB_IO_3 | UCB_IO_4 | UCB_IO_6 | \
-					UCB_IO_7 | UCB_IO_8 | UCB_IO_9 )
+#define COLLIE_TC35143_GPIO_BASE	(GPIO_MAX + 13)
+#define COLLIE_TC35143_GPIO_VERSION0    UCB_IO_0
+#define COLLIE_TC35143_GPIO_TBL_CHK     UCB_IO_1
+#define COLLIE_TC35143_GPIO_VPEN_ON     UCB_IO_2
+#define COLLIE_TC35143_GPIO_IR_ON       UCB_IO_3
+#define COLLIE_TC35143_GPIO_AMP_ON      UCB_IO_4
+#define COLLIE_TC35143_GPIO_VERSION1    UCB_IO_5
+#define COLLIE_TC35143_GPIO_FS8KLPF     UCB_IO_5
+#define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6
+#define COLLIE_GPIO_MBAT_ON     	(COLLIE_TC35143_GPIO_BASE + 7)
+#define COLLIE_GPIO_BBAT_ON     	(COLLIE_TC35143_GPIO_BASE + 8)
+#define COLLIE_GPIO_TMP_ON      	(COLLIE_TC35143_GPIO_BASE + 9)
+#define COLLIE_TC35143_GPIO_IN		(UCB_IO_0 | UCB_IO_2 | UCB_IO_5)
+#define COLLIE_TC35143_GPIO_OUT		(UCB_IO_1 | UCB_IO_3 | UCB_IO_4 \
+						| UCB_IO_6)
 
 #endif
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 8/9] collie: add battery driver
  2009-10-05 21:35             ` [PATCH 7/9] collie: convert to gpiolib for ucb1x00 Thomas Kunze
@ 2009-10-05 21:35               ` Thomas Kunze
  2009-10-05 21:35                 ` [PATCH 9/9] collie: support pda_power driver Thomas Kunze
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Kunze @ 2009-10-05 21:35 UTC (permalink / raw)
  To: linux-arm-kernel

This driver is based on tosa_battery.c.

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
---
 drivers/power/Kconfig          |    7 +
 drivers/power/Makefile         |    1 +
 drivers/power/collie_battery.c |  418 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 426 insertions(+), 0 deletions(-)
 create mode 100644 drivers/power/collie_battery.c

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index cea6cef..1186749 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -77,6 +77,13 @@ config BATTERY_TOSA
 	  Say Y to enable support for the battery on the Sharp Zaurus
 	  SL-6000 (tosa) models.
 
+config BATTERY_COLLIE
+	tristate "Sharp SL-5500 (collie) battery"
+	depends on SA1100_COLLIE && MCP_UCB1200
+	help
+	  Say Y to enable support for the battery on the Sharp Zaurus
+	  SL-5500 (collie) models.
+
 config BATTERY_WM97XX
 	bool "WM97xx generic battery driver"
 	depends on TOUCHSCREEN_WM97XX=y
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index b96f29d..356cdfd 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -24,6 +24,7 @@ obj-$(CONFIG_BATTERY_DS2782)	+= ds2782_battery.o
 obj-$(CONFIG_BATTERY_PMU)	+= pmu_battery.o
 obj-$(CONFIG_BATTERY_OLPC)	+= olpc_battery.o
 obj-$(CONFIG_BATTERY_TOSA)	+= tosa_battery.o
+obj-$(CONFIG_BATTERY_COLLIE)	+= collie_battery.o
 obj-$(CONFIG_BATTERY_WM97XX)	+= wm97xx_battery.o
 obj-$(CONFIG_BATTERY_BQ27x00)	+= bq27x00_battery.o
 obj-$(CONFIG_BATTERY_DA9030)	+= da9030_battery.o
diff --git a/drivers/power/collie_battery.c b/drivers/power/collie_battery.c
new file mode 100644
index 0000000..039f41a
--- /dev/null
+++ b/drivers/power/collie_battery.c
@@ -0,0 +1,418 @@
+/*
+ * Battery and Power Management code for the Sharp SL-5x00
+ *
+ * Copyright (C) 2009 Thomas Kunze
+ *
+ * based on tosa_battery.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/power_supply.h>
+#include <linux/delay.h>
+#include <linux/spinlock.h>
+#include <linux/interrupt.h>
+#include <linux/gpio.h>
+#include <linux/mfd/ucb1x00.h>
+
+#include <asm/mach/sharpsl_param.h>
+#include <asm/mach-types.h>
+#include <mach/collie.h>
+
+static DEFINE_MUTEX(bat_lock); /* protects gpio pins */
+static struct work_struct bat_work;
+static struct ucb1x00 *ucb;
+
+struct collie_bat {
+	int status;
+	struct power_supply psy;
+	int full_chrg;
+
+	struct mutex work_lock; /* protects data */
+
+	bool (*is_present)(struct collie_bat *bat);
+	int gpio_full;
+	int gpio_charge_on;
+
+	int technology;
+
+	int gpio_bat;
+	int adc_bat;
+	int adc_bat_divider;
+	int bat_max;
+	int bat_min;
+
+	int gpio_temp;
+	int adc_temp;
+	int adc_temp_divider;
+};
+
+static struct collie_bat collie_bat_main;
+
+static unsigned long collie_read_bat(struct collie_bat *bat)
+{
+	unsigned long value = 0;
+
+	if (bat->gpio_bat < 0 || bat->adc_bat < 0)
+		return 0;
+	mutex_lock(&bat_lock);
+	gpio_set_value(bat->gpio_bat, 1);
+	msleep(5);
+	ucb1x00_adc_enable(ucb);
+	value = ucb1x00_adc_read(ucb, bat->adc_bat, UCB_SYNC);
+	ucb1x00_adc_disable(ucb);
+	gpio_set_value(bat->gpio_bat, 0);
+	mutex_unlock(&bat_lock);
+	value = value * 1000000 / bat->adc_bat_divider;
+
+	return value;
+}
+
+static unsigned long collie_read_temp(struct collie_bat *bat)
+{
+	unsigned long value = 0;
+	if (bat->gpio_temp < 0 || bat->adc_temp < 0)
+		return 0;
+
+	mutex_lock(&bat_lock);
+	gpio_set_value(bat->gpio_temp, 1);
+	msleep(5);
+	ucb1x00_adc_enable(ucb);
+	value = ucb1x00_adc_read(ucb, bat->adc_temp, UCB_SYNC);
+	ucb1x00_adc_disable(ucb);
+	gpio_set_value(bat->gpio_temp, 0);
+	mutex_unlock(&bat_lock);
+
+	value = value * 10000 / bat->adc_temp_divider;
+
+	return value;
+}
+
+static int collie_bat_get_property(struct power_supply *psy,
+			    enum power_supply_property psp,
+			    union power_supply_propval *val)
+{
+	int ret = 0;
+	struct collie_bat *bat = container_of(psy, struct collie_bat, psy);
+
+	if (bat->is_present && !bat->is_present(bat)
+			&& psp != POWER_SUPPLY_PROP_PRESENT) {
+		return -ENODEV;
+	}
+
+	switch (psp) {
+	case POWER_SUPPLY_PROP_STATUS:
+		val->intval = bat->status;
+		break;
+	case POWER_SUPPLY_PROP_TECHNOLOGY:
+		val->intval = bat->technology;
+		break;
+	case POWER_SUPPLY_PROP_VOLTAGE_NOW:
+		val->intval = collie_read_bat(bat);
+		break;
+	case POWER_SUPPLY_PROP_VOLTAGE_MAX:
+		if (bat->full_chrg == -1)
+			val->intval = bat->bat_max;
+		else
+			val->intval = bat->full_chrg;
+		break;
+	case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
+		val->intval = bat->bat_max;
+		break;
+	case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
+		val->intval = bat->bat_min;
+		break;
+	case POWER_SUPPLY_PROP_TEMP:
+		val->intval = collie_read_temp(bat);
+		break;
+	case POWER_SUPPLY_PROP_PRESENT:
+		val->intval = bat->is_present ? bat->is_present(bat) : 1;
+		break;
+	default:
+		ret = -EINVAL;
+		break;
+	}
+	return ret;
+}
+
+static void collie_bat_external_power_changed(struct power_supply *psy)
+{
+	schedule_work(&bat_work);
+}
+
+static irqreturn_t collie_bat_gpio_isr(int irq, void *data)
+{
+	pr_info("collie_bat_gpio irq: %d\n", gpio_get_value(irq_to_gpio(irq)));
+	schedule_work(&bat_work);
+	return IRQ_HANDLED;
+}
+
+static void collie_bat_update(struct collie_bat *bat)
+{
+	int old;
+	struct power_supply *psy = &bat->psy;
+
+	mutex_lock(&bat->work_lock);
+
+	old = bat->status;
+
+	if (bat->is_present && !bat->is_present(bat)) {
+		printk(KERN_NOTICE "%s not present\n", psy->name);
+		bat->status = POWER_SUPPLY_STATUS_UNKNOWN;
+		bat->full_chrg = -1;
+	} else if (power_supply_am_i_supplied(psy)) {
+		if (bat->status == POWER_SUPPLY_STATUS_DISCHARGING) {
+			gpio_set_value(bat->gpio_charge_on, 1);
+			mdelay(15);
+		}
+
+		if (gpio_get_value(bat->gpio_full)) {
+			if (old == POWER_SUPPLY_STATUS_CHARGING ||
+					bat->full_chrg == -1)
+				bat->full_chrg = collie_read_bat(bat);
+
+			gpio_set_value(bat->gpio_charge_on, 0);
+			bat->status = POWER_SUPPLY_STATUS_FULL;
+		} else {
+			gpio_set_value(bat->gpio_charge_on, 1);
+			bat->status = POWER_SUPPLY_STATUS_CHARGING;
+		}
+	} else {
+		gpio_set_value(bat->gpio_charge_on, 0);
+		bat->status = POWER_SUPPLY_STATUS_DISCHARGING;
+	}
+
+	if (old != bat->status)
+		power_supply_changed(psy);
+
+	mutex_unlock(&bat->work_lock);
+}
+
+static void collie_bat_work(struct work_struct *work)
+{
+	collie_bat_update(&collie_bat_main);
+}
+
+
+static enum power_supply_property collie_bat_main_props[] = {
+	POWER_SUPPLY_PROP_STATUS,
+	POWER_SUPPLY_PROP_TECHNOLOGY,
+	POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
+	POWER_SUPPLY_PROP_VOLTAGE_NOW,
+	POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
+	POWER_SUPPLY_PROP_VOLTAGE_MAX,
+	POWER_SUPPLY_PROP_PRESENT,
+	POWER_SUPPLY_PROP_TEMP,
+};
+
+static enum power_supply_property collie_bat_bu_props[] = {
+	POWER_SUPPLY_PROP_STATUS,
+	POWER_SUPPLY_PROP_TECHNOLOGY,
+	POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
+	POWER_SUPPLY_PROP_VOLTAGE_NOW,
+	POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
+	POWER_SUPPLY_PROP_VOLTAGE_MAX,
+	POWER_SUPPLY_PROP_PRESENT,
+};
+
+static struct collie_bat collie_bat_main = {
+	.status = POWER_SUPPLY_STATUS_DISCHARGING,
+	.full_chrg = -1,
+	.psy = {
+		.name		= "main-battery",
+		.type		= POWER_SUPPLY_TYPE_BATTERY,
+		.properties	= collie_bat_main_props,
+		.num_properties	= ARRAY_SIZE(collie_bat_main_props),
+		.get_property	= collie_bat_get_property,
+		.external_power_changed = collie_bat_external_power_changed,
+		.use_for_apm	= 1,
+	},
+
+	.gpio_full = COLLIE_GPIO_CO,
+	.gpio_charge_on = COLLIE_GPIO_CHARGE_ON,
+
+	.technology = POWER_SUPPLY_TECHNOLOGY_LIPO,
+
+	.gpio_bat = COLLIE_GPIO_MBAT_ON,
+	.adc_bat = UCB_ADC_INP_AD1,
+	.adc_bat_divider = 155,
+	.bat_max = 4310000,
+	.bat_min = 1551 * 1000000 / 414,
+
+	.gpio_temp = COLLIE_GPIO_TMP_ON,
+	.adc_temp = UCB_ADC_INP_AD0,
+	.adc_temp_divider = 10000,
+};
+
+static struct collie_bat collie_bat_bu = {
+	.status = POWER_SUPPLY_STATUS_UNKNOWN,
+	.full_chrg = -1,
+
+	.psy = {
+		.name		= "backup-battery",
+		.type		= POWER_SUPPLY_TYPE_BATTERY,
+		.properties	= collie_bat_bu_props,
+		.num_properties	= ARRAY_SIZE(collie_bat_bu_props),
+		.get_property	= collie_bat_get_property,
+		.external_power_changed = collie_bat_external_power_changed,
+	},
+
+	.gpio_full = -1,
+	.gpio_charge_on = -1,
+
+	.technology = POWER_SUPPLY_TECHNOLOGY_LiMn,
+
+	.gpio_bat = COLLIE_GPIO_BBAT_ON,
+	.adc_bat = UCB_ADC_INP_AD1,
+	.adc_bat_divider = 155,
+	.bat_max = 3000000,
+	.bat_min = 1900000,
+
+	.gpio_temp = -1,
+	.adc_temp = -1,
+	.adc_temp_divider = -1,
+};
+
+static struct {
+	int gpio;
+	char *name;
+	bool output;
+	int value;
+} gpios[] = {
+	{ COLLIE_GPIO_CO,		"main battery full",	0, 0 },
+	{ COLLIE_GPIO_MAIN_BAT_LOW,	"main battery low",	0, 0 },
+	{ COLLIE_GPIO_CHARGE_ON,	"main charge on",	1, 0 },
+	{ COLLIE_GPIO_MBAT_ON,		"main battery",		1, 0 },
+	{ COLLIE_GPIO_TMP_ON,		"main battery temp",	1, 0 },
+	{ COLLIE_GPIO_BBAT_ON,		"backup battery",	1, 0 },
+};
+
+#ifdef CONFIG_PM
+static int collie_bat_suspend(struct ucb1x00_dev *dev, pm_message_t state)
+{
+	/* flush all pending status updates */
+	flush_scheduled_work();
+	return 0;
+}
+
+static int collie_bat_resume(struct ucb1x00_dev *dev)
+{
+	/* things may have changed while we were away */
+	schedule_work(&bat_work);
+	return 0;
+}
+#else
+#define collie_bat_suspend NULL
+#define collie_bat_resume NULL
+#endif
+
+static int __devinit collie_bat_probe(struct ucb1x00_dev *dev)
+{
+	int ret;
+	int i;
+
+	if (!machine_is_collie())
+		return -ENODEV;
+
+	ucb = dev->ucb;
+
+	for (i = 0; i < ARRAY_SIZE(gpios); i++) {
+		ret = gpio_request(gpios[i].gpio, gpios[i].name);
+		if (ret) {
+			i--;
+			goto err_gpio;
+		}
+
+		if (gpios[i].output)
+			ret = gpio_direction_output(gpios[i].gpio,
+					gpios[i].value);
+		else
+			ret = gpio_direction_input(gpios[i].gpio);
+
+		if (ret)
+			goto err_gpio;
+	}
+
+	mutex_init(&collie_bat_main.work_lock);
+
+	INIT_WORK(&bat_work, collie_bat_work);
+
+	ret = power_supply_register(&dev->ucb->dev, &collie_bat_main.psy);
+	if (ret)
+		goto err_psy_reg_main;
+	ret = power_supply_register(&dev->ucb->dev, &collie_bat_bu.psy);
+	if (ret)
+		goto err_psy_reg_bu;
+
+	ret = request_irq(gpio_to_irq(COLLIE_GPIO_CO),
+				collie_bat_gpio_isr,
+				IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+				"main full", &collie_bat_main);
+	if (!ret) {
+		schedule_work(&bat_work);
+		return 0;
+	}
+	power_supply_unregister(&collie_bat_bu.psy);
+err_psy_reg_bu:
+	power_supply_unregister(&collie_bat_main.psy);
+err_psy_reg_main:
+
+	/* see comment in collie_bat_remove */
+	flush_scheduled_work();
+
+	i--;
+err_gpio:
+	for (; i >= 0; i--)
+		gpio_free(gpios[i].gpio);
+
+	return ret;
+}
+
+static void __devexit collie_bat_remove(struct ucb1x00_dev *dev)
+{
+	int i;
+
+	free_irq(gpio_to_irq(COLLIE_GPIO_CO), &collie_bat_main);
+
+	power_supply_unregister(&collie_bat_bu.psy);
+	power_supply_unregister(&collie_bat_main.psy);
+
+	/*
+	 * now flush all pending work.
+	 * we won't get any more schedules, since all
+	 * sources (isr and external_power_changed)
+	 * are unregistered now.
+	 */
+	flush_scheduled_work();
+
+	for (i = ARRAY_SIZE(gpios) - 1; i >= 0; i--)
+		gpio_free(gpios[i].gpio);
+}
+
+static struct ucb1x00_driver collie_bat_driver = {
+	.add		= collie_bat_probe,
+	.remove		= __devexit_p(collie_bat_remove),
+	.suspend	= collie_bat_suspend,
+	.resume		= collie_bat_resume,
+};
+
+static int __init collie_bat_init(void)
+{
+	return ucb1x00_register_driver(&collie_bat_driver);
+}
+
+static void __exit collie_bat_exit(void)
+{
+	ucb1x00_unregister_driver(&collie_bat_driver);
+}
+
+module_init(collie_bat_init);
+module_exit(collie_bat_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Thomas Kunze");
+MODULE_DESCRIPTION("Collie battery driver");
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 9/9] collie: support pda_power driver
  2009-10-05 21:35               ` [PATCH 8/9] collie: add battery driver Thomas Kunze
@ 2009-10-05 21:35                 ` Thomas Kunze
  0 siblings, 0 replies; 33+ messages in thread
From: Thomas Kunze @ 2009-10-05 21:35 UTC (permalink / raw)
  To: linux-arm-kernel

This add the pda-power platform device to collie.

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
---
 arch/arm/mach-sa1100/collie.c |   65 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 395cf09..fdab9d9 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -26,6 +26,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/timer.h>
 #include <linux/gpio.h>
+#include <linux/pda_power.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -89,6 +90,69 @@ static struct mcp_plat_data collie_mcp_data = {
 	.gpio_base	= COLLIE_TC35143_GPIO_BASE,
 };
 
+/*
+ * Collie AC IN
+ */
+static int collie_power_init(struct device *dev)
+{
+	int ret = gpio_request(COLLIE_GPIO_AC_IN, "ac in");
+	if (ret)
+		goto err_gpio_req;
+
+	ret = gpio_direction_input(COLLIE_GPIO_AC_IN);
+	if (ret)
+		goto err_gpio_in;
+
+	return 0;
+
+err_gpio_in:
+	gpio_free(COLLIE_GPIO_AC_IN);
+err_gpio_req:
+	return ret;
+}
+
+static void collie_power_exit(struct device *dev)
+{
+	gpio_free(COLLIE_GPIO_AC_IN);
+}
+
+static int collie_power_ac_online(void)
+{
+	return gpio_get_value(COLLIE_GPIO_AC_IN) == 2;
+}
+
+static char *collie_ac_supplied_to[] = {
+	"main-battery",
+	"backup-battery",
+};
+
+static struct pda_power_pdata collie_power_data = {
+	.init			= collie_power_init,
+	.is_ac_online		= collie_power_ac_online,
+	.exit			= collie_power_exit,
+	.supplied_to		= collie_ac_supplied_to,
+	.num_supplicants	= ARRAY_SIZE(collie_ac_supplied_to),
+};
+
+static struct resource collie_power_resource[] = {
+	{
+		.name		= "ac",
+		.start		= gpio_to_irq(COLLIE_GPIO_AC_IN),
+		.end		= gpio_to_irq(COLLIE_GPIO_AC_IN),
+		.flags		= IORESOURCE_IRQ |
+				  IORESOURCE_IRQ_HIGHEDGE |
+				  IORESOURCE_IRQ_LOWEDGE,
+	},
+};
+
+static struct platform_device collie_power_device = {
+	.name			= "pda-power",
+	.id			= -1,
+	.dev.platform_data	= &collie_power_data,
+	.resource		= collie_power_resource,
+	.num_resources		= ARRAY_SIZE(collie_power_resource),
+};
+
 #ifdef CONFIG_SHARP_LOCOMO
 /*
  * low-level UART features.
@@ -180,6 +244,7 @@ struct platform_device collie_locomo_device = {
 static struct platform_device *devices[] __initdata = {
 	&collie_locomo_device,
 	&colliescoop_device,
+	&collie_power_device,
 };
 
 static struct mtd_partition collie_partitions[] = {
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* collie and SA1100 patches
  2009-10-05 21:35 collie and SA1100 patches Thomas Kunze
  2009-10-05 21:35 ` [PATCH 1/9] collie: fix scoop convesion to new api Thomas Kunze
@ 2009-10-06 10:33 ` Mark Brown
  2009-10-06 10:57 ` Kristoffer Ericson
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 33+ messages in thread
From: Mark Brown @ 2009-10-06 10:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 05, 2009 at 11:35:24PM +0200, Thomas Kunze wrote:

> This patchset implements prober power management for collie. To archieve this
> some bugs were fixed and gpiolib-support was added to the ucb1x00 driver.
> Please tell me if I should CC some other people or lists.

>  drivers/mfd/ucb1x00-assabet.c              |    2 +-
>  drivers/mfd/ucb1x00-core.c                 |   89 ++++++-
>  drivers/mfd/ucb1x00-ts.c                   |    2 +-

This stuff probably ought to be CCed to Samuel Ortiz at least.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* collie and SA1100 patches
  2009-10-05 21:35 collie and SA1100 patches Thomas Kunze
  2009-10-05 21:35 ` [PATCH 1/9] collie: fix scoop convesion to new api Thomas Kunze
  2009-10-06 10:33 ` collie and SA1100 patches Mark Brown
@ 2009-10-06 10:57 ` Kristoffer Ericson
  2009-10-06 16:36   ` Thomas Kunze
  2009-10-11 12:16 ` Pavel Machek
  2009-10-20 18:00 ` Thomas Kunze
  4 siblings, 1 reply; 33+ messages in thread
From: Kristoffer Ericson @ 2009-10-06 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon,  5 Oct 2009 23:35:24 +0200
Thomas Kunze <thommycheck@gmx.de> wrote:

> Hi all!
>    
> This patchset implements prober power management for collie. To archieve this
> some bugs were fixed and gpiolib-support was added to the ucb1x00 driver.
> Please tell me if I should CC some other people or lists.

Without looking at the patches, how does this affect other sa11xx based
platforms?

> 
> Regards,
> Thomas
> 
> Statistics:
>  arch/arm/mach-sa1100/collie.c              |   79 +++++-
>  arch/arm/mach-sa1100/include/mach/collie.h |   77 +++---
>  arch/arm/mach-sa1100/include/mach/gpio.h   |   19 +-
>  arch/arm/mach-sa1100/include/mach/mcp.h    |    1 +
>  drivers/leds/leds-locomo.c                 |    2 +-
>  drivers/mfd/mcp-core.c                     |    2 +-
>  drivers/mfd/mcp-sa11x0.c                   |    3 +-
>  drivers/mfd/ucb1x00-assabet.c              |    2 +-
>  drivers/mfd/ucb1x00-core.c                 |   89 ++++++-
>  drivers/mfd/ucb1x00-ts.c                   |    2 +-
>  drivers/power/Kconfig                      |    7 +
>  drivers/power/Makefile                     |    1 +
>  drivers/power/collie_battery.c             |  418 ++++++++++++++++++++++++++++
>  {drivers => include/linux}/mfd/mcp.h       |    3 +
>  {drivers => include/linux}/mfd/ucb1x00.h   |    7 +-
>  15 files changed, 649 insertions(+), 63 deletions(-)
>  create mode 100644 drivers/power/collie_battery.c
>  rename {drivers => include/linux}/mfd/mcp.h (97%)
>  rename {drivers => include/linux}/mfd/ucb1x00.h (98%)
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


-- 
Kristoffer Ericson <kristoffer.ericson@gmail.com>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* collie and SA1100 patches
  2009-10-06 10:57 ` Kristoffer Ericson
@ 2009-10-06 16:36   ` Thomas Kunze
  0 siblings, 0 replies; 33+ messages in thread
From: Thomas Kunze @ 2009-10-06 16:36 UTC (permalink / raw)
  To: linux-arm-kernel

Kristoffer Ericson wrote:
> On Mon,  5 Oct 2009 23:35:24 +0200
> Thomas Kunze <thommycheck@gmx.de> wrote:
>
>   
>> Hi all!
>>    
>> This patchset implements prober power management for collie. To archieve this
>> some bugs were fixed and gpiolib-support was added to the ucb1x00 driver.
>> Please tell me if I should CC some other people or lists.
>>     
>
> Without looking at the patches, how does this affect other sa11xx based
> platforms?
>   
They can use gpiolib for ucb1x00 now (patch 3 and 6) and can use 
"gpio_to_irq" and "irq_to_gpio"
in static initialisation. Otherwise they aren't affected.
>   
>> Regards,
>> Thomas
>>
>> Statistics:
>>  arch/arm/mach-sa1100/collie.c              |   79 +++++-
>>  arch/arm/mach-sa1100/include/mach/collie.h |   77 +++---
>>  arch/arm/mach-sa1100/include/mach/gpio.h   |   19 +-
>>  arch/arm/mach-sa1100/include/mach/mcp.h    |    1 +
>>  drivers/leds/leds-locomo.c                 |    2 +-
>>  drivers/mfd/mcp-core.c                     |    2 +-
>>  drivers/mfd/mcp-sa11x0.c                   |    3 +-
>>  drivers/mfd/ucb1x00-assabet.c              |    2 +-
>>  drivers/mfd/ucb1x00-core.c                 |   89 ++++++-
>>  drivers/mfd/ucb1x00-ts.c                   |    2 +-
>>  drivers/power/Kconfig                      |    7 +
>>  drivers/power/Makefile                     |    1 +
>>  drivers/power/collie_battery.c             |  418 ++++++++++++++++++++++++++++
>>  {drivers => include/linux}/mfd/mcp.h       |    3 +
>>  {drivers => include/linux}/mfd/ucb1x00.h   |    7 +-
>>  15 files changed, 649 insertions(+), 63 deletions(-)
>>  create mode 100644 drivers/power/collie_battery.c
>>  rename {drivers => include/linux}/mfd/mcp.h (97%)
>>  rename {drivers => include/linux}/mfd/ucb1x00.h (98%)
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>     
>
>
>   

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 2/9] collie: prepare for gpiolib use
  2009-10-05 21:35   ` [PATCH 2/9] collie: prepare for gpiolib use Thomas Kunze
  2009-10-05 21:35     ` [PATCH 3/9] move drivers/mfd/*.h to include/linux/mfd Thomas Kunze
@ 2009-10-07 11:08     ` Dmitry Artamonow
  2009-10-07 11:25       ` Russell King - ARM Linux
  2009-10-07 20:23       ` [PATCH 2/9] collie: prepare for gpiolib use Thomas Kunze
  1 sibling, 2 replies; 33+ messages in thread
From: Dmitry Artamonow @ 2009-10-07 11:08 UTC (permalink / raw)
  To: linux-arm-kernel

On 23:35 Mon 05 Oct     , Thomas Kunze wrote:
> prefix gpio definitions for direct register access with '_' so we
> can use the other names for gpio_request & co

Familiar problem - numeric vs bit-shifted gpio defines.
I'm facing it here too while converting h3[16]00 to gpiolib,
and I'm thinking about dropping bit-shifted defines completely
and using GPIO_GPIO(SOME_NUMERIC_GPIO) instead.

Perhaps you may find this idea useful for collie.

-- 
Best regards,
Dmitry "MAD" Artamonow

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 2/9] collie: prepare for gpiolib use
  2009-10-07 11:08     ` [PATCH 2/9] collie: prepare for gpiolib use Dmitry Artamonow
@ 2009-10-07 11:25       ` Russell King - ARM Linux
  2009-10-07 11:48         ` Lothar Waßmann
  2009-10-07 12:42         ` Dmitry Artamonow
  2009-10-07 20:23       ` [PATCH 2/9] collie: prepare for gpiolib use Thomas Kunze
  1 sibling, 2 replies; 33+ messages in thread
From: Russell King - ARM Linux @ 2009-10-07 11:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 07, 2009 at 03:08:05PM +0400, Dmitry Artamonow wrote:
> On 23:35 Mon 05 Oct     , Thomas Kunze wrote:
> > prefix gpio definitions for direct register access with '_' so we
> > can use the other names for gpio_request & co
> 
> Familiar problem - numeric vs bit-shifted gpio defines.
> I'm facing it here too while converting h3[16]00 to gpiolib,
> and I'm thinking about dropping bit-shifted defines completely
> and using GPIO_GPIO(SOME_NUMERIC_GPIO) instead.

What we did with PXA was to decide not to use definitions for the built-in
GPIOs - what's the point of:

#define GPIO0	0
#define GPIO1	1
#define GPIO2	2
...

It's a bit like:

#define NUMBER0	0
#define NUMBER1	1
etc.

Yes, there's a reason to if the number spaces are different, but for
the built-in GPIOs, they aren't.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 2/9] collie: prepare for gpiolib use
  2009-10-07 11:25       ` Russell King - ARM Linux
@ 2009-10-07 11:48         ` Lothar Waßmann
  2009-10-07 12:10           ` Sergei Shtylyov
  2009-10-07 12:42         ` Dmitry Artamonow
  1 sibling, 1 reply; 33+ messages in thread
From: Lothar Waßmann @ 2009-10-07 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux writes:
> On Wed, Oct 07, 2009 at 03:08:05PM +0400, Dmitry Artamonow wrote:
> > On 23:35 Mon 05 Oct     , Thomas Kunze wrote:
> > > prefix gpio definitions for direct register access with '_' so we
> > > can use the other names for gpio_request & co
> > 
> > Familiar problem - numeric vs bit-shifted gpio defines.
> > I'm facing it here too while converting h3[16]00 to gpiolib,
> > and I'm thinking about dropping bit-shifted defines completely
> > and using GPIO_GPIO(SOME_NUMERIC_GPIO) instead.
> 
> What we did with PXA was to decide not to use definitions for the built-in
> GPIOs - what's the point of:
> 
> #define GPIO0	0
> #define GPIO1	1
> #define GPIO2	2
> ...
> 
A point could be that 'grep GPIO0 ...' would find any usage of that
GPIO in the kernel source while 'grep 0 ...' would be quite
pointless.


Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 2/9] collie: prepare for gpiolib use
  2009-10-07 11:48         ` Lothar Waßmann
@ 2009-10-07 12:10           ` Sergei Shtylyov
  0 siblings, 0 replies; 33+ messages in thread
From: Sergei Shtylyov @ 2009-10-07 12:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

Lothar Wa?mann wrote:

>>>>prefix gpio definitions for direct register access with '_' so we
>>>>can use the other names for gpio_request & co

>>>Familiar problem - numeric vs bit-shifted gpio defines.
>>>I'm facing it here too while converting h3[16]00 to gpiolib,
>>>and I'm thinking about dropping bit-shifted defines completely
>>>and using GPIO_GPIO(SOME_NUMERIC_GPIO) instead.

>>What we did with PXA was to decide not to use definitions for the built-in
>>GPIOs - what's the point of:

>>#define GPIO0	0
>>#define GPIO1	1
>>#define GPIO2	2
>>...

> A point could be that 'grep GPIO0 ...' would find any usage of that
> GPIO in the kernel source while 'grep 0 ...' would be quite
> pointless.

    That's why some people have GPIO(n) macro. :-)

#define GPIO(n)	(n)

> Lothar Wa?mann

WBR, Sergei

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 2/9] collie: prepare for gpiolib use
  2009-10-07 11:25       ` Russell King - ARM Linux
  2009-10-07 11:48         ` Lothar Waßmann
@ 2009-10-07 12:42         ` Dmitry Artamonow
  2009-10-07 13:10           ` Russell King - ARM Linux
  1 sibling, 1 reply; 33+ messages in thread
From: Dmitry Artamonow @ 2009-10-07 12:42 UTC (permalink / raw)
  To: linux-arm-kernel

On 12:25 Wed 07 Oct     , Russell King - ARM Linux wrote:
> On Wed, Oct 07, 2009 at 03:08:05PM +0400, Dmitry Artamonow wrote:
> > On 23:35 Mon 05 Oct     , Thomas Kunze wrote:
> > > prefix gpio definitions for direct register access with '_' so we
> > > can use the other names for gpio_request & co
> > 
> > Familiar problem - numeric vs bit-shifted gpio defines.
> > I'm facing it here too while converting h3[16]00 to gpiolib,
> > and I'm thinking about dropping bit-shifted defines completely
> > and using GPIO_GPIO(SOME_NUMERIC_GPIO) instead.
> 
> What we did with PXA was to decide not to use definitions for the built-in
> GPIOs - what's the point of:
> 
> #define GPIO0	0
> #define GPIO1	1
> #define GPIO2	2
> ...
> 
> It's a bit like:
> 
> #define NUMBER0	0
> #define NUMBER1	1
> etc.
> 
> Yes, there's a reason to if the number spaces are different, but for
> the built-in GPIOs, they aren't.

Perhaps I wasn't exactly clear in explaining my thoughts. Sorry.
I meant following - currently in mach/h3600_gpio.h we have gpios declared
like that:
#define GPIO_H3100_IR_ON                GPIO_GPIO (8)
which effectively means:
#define GPIO_H3100_IR_ON                (1 << 8)
i.e. bit-shifted value. 

But gpiolibs needs numeric gpio definitions, something like that:
#define NGPIO_H3100_IR_ON		8

That's all well, but not all direct operations with GPIO registers on
SA1100 can be converted to gpiolib. Operations with GAFR (GPIO alternate
function register), for example (PXA have MFD API for that, but
StrongArm doesn't)

So for constructions like these:
	GAFR &= ~GPIO_H3100_IR_ON;
we either need to keep both variants of GPIO definitions in header, or
keep only "numeric" and change code to:
	GAFR &= ~GPIO_GPIO(NGPIO_H3100_IR_ON);


-- 
Best regards,
Dmitry "MAD" Artamonow

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 2/9] collie: prepare for gpiolib use
  2009-10-07 12:42         ` Dmitry Artamonow
@ 2009-10-07 13:10           ` Russell King - ARM Linux
  2009-10-07 14:33             ` RMK's sa1100 branch (was Re: [PATCH 2/9] collie: prepare for gpiolib use) Dmitry Artamonow
  0 siblings, 1 reply; 33+ messages in thread
From: Russell King - ARM Linux @ 2009-10-07 13:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 07, 2009 at 04:42:52PM +0400, Dmitry Artamonow wrote:
> Perhaps I wasn't exactly clear in explaining my thoughts. Sorry.
> I meant following - currently in mach/h3600_gpio.h we have gpios declared
> like that:
> #define GPIO_H3100_IR_ON                GPIO_GPIO (8)
> which effectively means:
> #define GPIO_H3100_IR_ON                (1 << 8)
> i.e. bit-shifted value. 
> 
> But gpiolibs needs numeric gpio definitions, something like that:
> #define NGPIO_H3100_IR_ON		8
> 
> That's all well, but not all direct operations with GPIO registers on
> SA1100 can be converted to gpiolib.

I tinkered around with this yesterday before your message came through,
and I defined a new set of definitions, eg:

#define H3100_GPIO_IR_ON	8

so avoiding the problem.  See my 'sa1100' branch published in the usual
places.

> Operations with GAFR (GPIO alternate function register), for example
> (PXA have MFD API for that, but StrongArm doesn't)

Maybe long-term replicating something like the MFP API would be a good
idea, rather than sticking with direct manipulation of the GAFR (which
is racy if done from two different contexts).

Currently, it's hard to audit that all GAFR manipulations are done in
a safe way.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RMK's sa1100 branch (was Re: [PATCH 2/9] collie: prepare for gpiolib use)
  2009-10-07 13:10           ` Russell King - ARM Linux
@ 2009-10-07 14:33             ` Dmitry Artamonow
  2009-10-07 16:41               ` Russell King - ARM Linux
  0 siblings, 1 reply; 33+ messages in thread
From: Dmitry Artamonow @ 2009-10-07 14:33 UTC (permalink / raw)
  To: linux-arm-kernel

On 14:10 Wed 07 Oct     , Russell King - ARM Linux wrote:
> On Wed, Oct 07, 2009 at 04:42:52PM +0400, Dmitry Artamonow wrote:
> I tinkered around with this yesterday before your message came through,
> and I defined a new set of definitions, eg:
> 
> #define H3100_GPIO_IR_ON	8
> 
> so avoiding the problem.  See my 'sa1100' branch published in the usual
> places.

Whoa! Seems that you did a lot of work. What do you plan to do with it?
Should I rebase my work on top of IPAQ patches in this branch? Basically
they do the same as my patches, but there's some things here and there
that I missed or not done yet, and will gladly reuse.

-- 
Best regards,
Dmitry "MAD" Artamonow

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RMK's sa1100 branch (was Re: [PATCH 2/9] collie: prepare for gpiolib use)
  2009-10-07 14:33             ` RMK's sa1100 branch (was Re: [PATCH 2/9] collie: prepare for gpiolib use) Dmitry Artamonow
@ 2009-10-07 16:41               ` Russell King - ARM Linux
  0 siblings, 0 replies; 33+ messages in thread
From: Russell King - ARM Linux @ 2009-10-07 16:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 07, 2009 at 06:33:51PM +0400, Dmitry Artamonow wrote:
> On 14:10 Wed 07 Oct     , Russell King - ARM Linux wrote:
> > On Wed, Oct 07, 2009 at 04:42:52PM +0400, Dmitry Artamonow wrote:
> > I tinkered around with this yesterday before your message came through,
> > and I defined a new set of definitions, eg:
> > 
> > #define H3100_GPIO_IR_ON	8
> > 
> > so avoiding the problem.  See my 'sa1100' branch published in the usual
> > places.
> 
> Whoa! Seems that you did a lot of work. What do you plan to do with it?
> Should I rebase my work on top of IPAQ patches in this branch?

That's up to you really - while I do have a H3600 which had Linux on,
I don't know what state it's in with regard to being usable, so I
don't count myself as being able to properly test changes in this
area.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 2/9] collie: prepare for gpiolib use
  2009-10-07 11:08     ` [PATCH 2/9] collie: prepare for gpiolib use Dmitry Artamonow
  2009-10-07 11:25       ` Russell King - ARM Linux
@ 2009-10-07 20:23       ` Thomas Kunze
  1 sibling, 0 replies; 33+ messages in thread
From: Thomas Kunze @ 2009-10-07 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

Dmitry Artamonow wrote:
> On 23:35 Mon 05 Oct     , Thomas Kunze wrote:
>   
>> prefix gpio definitions for direct register access with '_' so we
>> can use the other names for gpio_request & co
>>     
>
> Familiar problem - numeric vs bit-shifted gpio defines.
> I'm facing it here too while converting h3[16]00 to gpiolib,
> and I'm thinking about dropping bit-shifted defines completely
> and using GPIO_GPIO(SOME_NUMERIC_GPIO) instead.
>
> Perhaps you may find this idea useful for collie.
>
>   
While a good idea I don't want to make the line in cpu initialisation 
any longer.
This is only a short term solution. In the long term we should do the 
same as pxa.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro
  2009-10-05 21:35         ` [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro Thomas Kunze
  2009-10-05 21:35           ` [PATCH 6/9] add gpiolib support to ucb1x00 Thomas Kunze
@ 2009-10-11 12:15           ` Pavel Machek
  2009-10-12 17:31             ` Thomas Kunze
  1 sibling, 1 reply; 33+ messages in thread
From: Pavel Machek @ 2009-10-11 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi!

> The function can't be used for static initialisations so
> convert them to macros.
> 
> Signed-off-by: Thomas Kunze <thommycheck@gmx.de>

Do you actually use them in initializers?

If not, I guess the function version is nicer...

> @@ -49,20 +49,9 @@ static inline void gpio_set_value(unsigned gpio, int value)
>  
>  #define gpio_cansleep	__gpio_cansleep
>  
> -static inline unsigned gpio_to_irq(unsigned gpio)
> -{
> -	if (gpio < 11)
> -		return IRQ_GPIO0 + gpio;
> -	else
> -		return IRQ_GPIO11 - 11 + gpio;
> -}
> -
> -static inline unsigned irq_to_gpio(unsigned irq)
> -{
> -	if (irq < IRQ_GPIO11_27)
> -		return irq - IRQ_GPIO0;
> -	else
> -		return irq - IRQ_GPIO11 + 11;
> -}
> +#define gpio_to_irq(gpio)	((gpio < 11) ? (IRQ_GPIO0 + gpio) : \
> +					(IRQ_GPIO11 - 11 + gpio))
> +#define irq_to_gpio(irq)	((irq < IRQ_GPIO11_27) ? (irq - IRQ_GPIO0) : \
> +					(irq - IRQ_GPIO11 + 11))
>  
>  #endif

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* collie and SA1100 patches
  2009-10-05 21:35 collie and SA1100 patches Thomas Kunze
                   ` (2 preceding siblings ...)
  2009-10-06 10:57 ` Kristoffer Ericson
@ 2009-10-11 12:16 ` Pavel Machek
  2009-10-20 18:00 ` Thomas Kunze
  4 siblings, 0 replies; 33+ messages in thread
From: Pavel Machek @ 2009-10-11 12:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi!

> This patchset implements prober power management for collie. To archieve this
> some bugs were fixed and gpiolib-support was added to the ucb1x00 driver.
> Please tell me if I should CC some other people or lists.

Thanks for working on collie! :-).

Yep, the series looks okay; I guess I should get the dust off the
collie.

								Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro
  2009-10-11 12:15           ` [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro Pavel Machek
@ 2009-10-12 17:31             ` Thomas Kunze
  0 siblings, 0 replies; 33+ messages in thread
From: Thomas Kunze @ 2009-10-12 17:31 UTC (permalink / raw)
  To: linux-arm-kernel

Pavel Machek wrote:
> Hi!
>
>   
>> The function can't be used for static initialisations so
>> convert them to macros.
>>
>> Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
>>     
>
> Do you actually use them in initializers?
>   
Yes the last patch of the series does.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* collie and SA1100 patches
  2009-10-05 21:35 collie and SA1100 patches Thomas Kunze
                   ` (3 preceding siblings ...)
  2009-10-11 12:16 ` Pavel Machek
@ 2009-10-20 18:00 ` Thomas Kunze
  2009-10-20 19:43   ` Eric Miao
  4 siblings, 1 reply; 33+ messages in thread
From: Thomas Kunze @ 2009-10-20 18:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

what is the status of this patchset?
The patchset is available via git at:
http://git.linuxtogo.org/?p=thesing/collie.git;a=shortlog;h=refs/heads/for-lak

The branch is based on 2.6.32-rc5. Please tell me if I should rebase on 
sth. else.

Regards,
Thomas
> Hi all!
>    
> This patchset implements prober power management for collie. To archieve this
> some bugs were fixed and gpiolib-support was added to the ucb1x00 driver.
> Please tell me if I should CC some other people or lists.
>
> Regards,
> Thomas
>
> Statistics:
>  arch/arm/mach-sa1100/collie.c              |   79 +++++-
>  arch/arm/mach-sa1100/include/mach/collie.h |   77 +++---
>  arch/arm/mach-sa1100/include/mach/gpio.h   |   19 +-
>  arch/arm/mach-sa1100/include/mach/mcp.h    |    1 +
>  drivers/leds/leds-locomo.c                 |    2 +-
>  drivers/mfd/mcp-core.c                     |    2 +-
>  drivers/mfd/mcp-sa11x0.c                   |    3 +-
>  drivers/mfd/ucb1x00-assabet.c              |    2 +-
>  drivers/mfd/ucb1x00-core.c                 |   89 ++++++-
>  drivers/mfd/ucb1x00-ts.c                   |    2 +-
>  drivers/power/Kconfig                      |    7 +
>  drivers/power/Makefile                     |    1 +
>  drivers/power/collie_battery.c             |  418 ++++++++++++++++++++++++++++
>  {drivers => include/linux}/mfd/mcp.h       |    3 +
>  {drivers => include/linux}/mfd/ucb1x00.h   |    7 +-
>  15 files changed, 649 insertions(+), 63 deletions(-)
>  create mode 100644 drivers/power/collie_battery.c
>  rename {drivers => include/linux}/mfd/mcp.h (97%)
>  rename {drivers => include/linux}/mfd/ucb1x00.h (98%)
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>   

^ permalink raw reply	[flat|nested] 33+ messages in thread

* collie and SA1100 patches
  2009-10-20 18:00 ` Thomas Kunze
@ 2009-10-20 19:43   ` Eric Miao
  2009-11-03 19:41     ` Thomas Kunze
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Miao @ 2009-10-20 19:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 21, 2009 at 2:00 AM, Thomas Kunze <thommycheck@gmx.de> wrote:
> Hi,
>
> what is the status of this patchset?
> The patchset is available via git at:
> http://git.linuxtogo.org/?p=thesing/collie.git;a=shortlog;h=refs/heads/for-lak
>
> The branch is based on 2.6.32-rc5. Please tell me if I should rebase on sth.
> else.

This patchset looks OK to me. I'm willing to see such changes being
made to pxa2xx-based zaurus as well.

Russell,

Are you interested to merge this?

>
> Regards,
> Thomas
>>
>> Hi all!
>> ? This patchset implements prober power management for collie. To archieve
>> this
>> some bugs were fixed and gpiolib-support was added to the ucb1x00 driver.
>> Please tell me if I should CC some other people or lists.
>>
>> Regards,
>> Thomas
>>
>> Statistics:
>> ?arch/arm/mach-sa1100/collie.c ? ? ? ? ? ? ?| ? 79 +++++-
>> ?arch/arm/mach-sa1100/include/mach/collie.h | ? 77 +++---
>> ?arch/arm/mach-sa1100/include/mach/gpio.h ? | ? 19 +-
>> ?arch/arm/mach-sa1100/include/mach/mcp.h ? ?| ? ?1 +
>> ?drivers/leds/leds-locomo.c ? ? ? ? ? ? ? ? | ? ?2 +-
>> ?drivers/mfd/mcp-core.c ? ? ? ? ? ? ? ? ? ? | ? ?2 +-
>> ?drivers/mfd/mcp-sa11x0.c ? ? ? ? ? ? ? ? ? | ? ?3 +-
>> ?drivers/mfd/ucb1x00-assabet.c ? ? ? ? ? ? ?| ? ?2 +-
>> ?drivers/mfd/ucb1x00-core.c ? ? ? ? ? ? ? ? | ? 89 ++++++-
>> ?drivers/mfd/ucb1x00-ts.c ? ? ? ? ? ? ? ? ? | ? ?2 +-
>> ?drivers/power/Kconfig ? ? ? ? ? ? ? ? ? ? ?| ? ?7 +
>> ?drivers/power/Makefile ? ? ? ? ? ? ? ? ? ? | ? ?1 +
>> ?drivers/power/collie_battery.c ? ? ? ? ? ? | ?418
>> ++++++++++++++++++++++++++++
>> ?{drivers => include/linux}/mfd/mcp.h ? ? ? | ? ?3 +
>> ?{drivers => include/linux}/mfd/ucb1x00.h ? | ? ?7 +-
>> ?15 files changed, 649 insertions(+), 63 deletions(-)
>> ?create mode 100644 drivers/power/collie_battery.c
>> ?rename {drivers => include/linux}/mfd/mcp.h (97%)
>> ?rename {drivers => include/linux}/mfd/ucb1x00.h (98%)
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* collie and SA1100 patches
  2009-10-20 19:43   ` Eric Miao
@ 2009-11-03 19:41     ` Thomas Kunze
  2009-11-07  8:28       ` Pavel Machek
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Kunze @ 2009-11-03 19:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

could somebody tell me how to proceed from here, please?
Should I send some ping messages every two weeks or so?

Regards,
Thomas

^ permalink raw reply	[flat|nested] 33+ messages in thread

* collie and SA1100 patches
  2009-11-03 19:41     ` Thomas Kunze
@ 2009-11-07  8:28       ` Pavel Machek
  2009-11-07  8:53         ` Russell King - ARM Linux
  2009-11-07 16:54         ` Kristoffer Ericson
  0 siblings, 2 replies; 33+ messages in thread
From: Pavel Machek @ 2009-11-07  8:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hi!

> could somebody tell me how to proceed from here, please?
> Should I send some ping messages every two weeks or so?

Respin the series, yes. ARM maintainers are often slow :-(. Cc: akpm
I'd say. You are fixing old regressions.

									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* collie and SA1100 patches
  2009-11-07  8:28       ` Pavel Machek
@ 2009-11-07  8:53         ` Russell King - ARM Linux
  2009-11-07 16:54         ` Kristoffer Ericson
  1 sibling, 0 replies; 33+ messages in thread
From: Russell King - ARM Linux @ 2009-11-07  8:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Nov 07, 2009 at 09:28:47AM +0100, Pavel Machek wrote:
> Hi!
> 
> > could somebody tell me how to proceed from here, please?
> > Should I send some ping messages every two weeks or so?
> 
> Respin the series, yes. ARM maintainers are often slow :-(. Cc: akpm
> I'd say. You are fixing old regressions.

Well, I'm still waiting to hear what the outcome of my sa1100 branch
is, and I can't reply to Thomas until that's settled.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* collie and SA1100 patches
  2009-11-07  8:28       ` Pavel Machek
  2009-11-07  8:53         ` Russell King - ARM Linux
@ 2009-11-07 16:54         ` Kristoffer Ericson
  1 sibling, 0 replies; 33+ messages in thread
From: Kristoffer Ericson @ 2009-11-07 16:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 7 Nov 2009 09:28:47 +0100
Pavel Machek <pavel@ucw.cz> wrote:

> Hi!
> 
> > could somebody tell me how to proceed from here, please?
> > Should I send some ping messages every two weeks or so?
> 
> Respin the series, yes. ARM maintainers are often slow :-(. Cc: akpm
> I'd say. You are fixing old regressions.
> 

Please add me to CC when you resend patch, missed your first send and like
to keep updated on SA1100 changes.

> 									Pavel
> 
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


-- 
Kristoffer Ericson <kristoffer.ericson@gmail.com>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 6/9] add gpiolib support to ucb1x00
  2009-10-05 21:35           ` [PATCH 6/9] add gpiolib support to ucb1x00 Thomas Kunze
  2009-10-05 21:35             ` [PATCH 7/9] collie: convert to gpiolib for ucb1x00 Thomas Kunze
@ 2009-11-28 12:47             ` Russell King - ARM Linux
  2009-11-29 11:44               ` Thomas Kunze
  1 sibling, 1 reply; 33+ messages in thread
From: Russell King - ARM Linux @ 2009-11-28 12:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 05, 2009 at 11:35:30PM +0200, Thomas Kunze wrote:
> The old access methods to the gpios will be removed when
> all users has been converted. (mainly ucb1x00-ts)

btw, what was the point in moving private includes out of drivers/mfd
into include/linux/mfd?  If they're private, they should stay private
and local to the relevant files IMHO.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 6/9] add gpiolib support to ucb1x00
  2009-11-28 12:47             ` [PATCH 6/9] add gpiolib support to ucb1x00 Russell King - ARM Linux
@ 2009-11-29 11:44               ` Thomas Kunze
  0 siblings, 0 replies; 33+ messages in thread
From: Thomas Kunze @ 2009-11-29 11:44 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux schrieb:
> On Mon, Oct 05, 2009 at 11:35:30PM +0200, Thomas Kunze wrote:
>   
>> The old access methods to the gpios will be removed when
>> all users has been converted. (mainly ucb1x00-ts)
>>     
>
> btw, what was the point in moving private includes out of drivers/mfd
> into include/linux/mfd?  If they're private, they should stay private
> and local to the relevant files IMHO.
>   
I moved the touchscreen driver to drivers/input/touchscreen and the 
battery driver (in drivers/power) needs those too.
There is an out of tree sound driver for ucb1x00 thats in the sound 
directory. So moving those includes to a more accessable
location makes sense to me.

Regards,
Thomas

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2009-11-29 11:44 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-05 21:35 collie and SA1100 patches Thomas Kunze
2009-10-05 21:35 ` [PATCH 1/9] collie: fix scoop convesion to new api Thomas Kunze
2009-10-05 21:35   ` [PATCH 2/9] collie: prepare for gpiolib use Thomas Kunze
2009-10-05 21:35     ` [PATCH 3/9] move drivers/mfd/*.h to include/linux/mfd Thomas Kunze
2009-10-05 21:35       ` [PATCH 4/9] collie: locomo-led change default trigger Thomas Kunze
2009-10-05 21:35         ` [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro Thomas Kunze
2009-10-05 21:35           ` [PATCH 6/9] add gpiolib support to ucb1x00 Thomas Kunze
2009-10-05 21:35             ` [PATCH 7/9] collie: convert to gpiolib for ucb1x00 Thomas Kunze
2009-10-05 21:35               ` [PATCH 8/9] collie: add battery driver Thomas Kunze
2009-10-05 21:35                 ` [PATCH 9/9] collie: support pda_power driver Thomas Kunze
2009-11-28 12:47             ` [PATCH 6/9] add gpiolib support to ucb1x00 Russell King - ARM Linux
2009-11-29 11:44               ` Thomas Kunze
2009-10-11 12:15           ` [PATCH 5/9] SA1100: make gpio_to_irq and reverse a macro Pavel Machek
2009-10-12 17:31             ` Thomas Kunze
2009-10-07 11:08     ` [PATCH 2/9] collie: prepare for gpiolib use Dmitry Artamonow
2009-10-07 11:25       ` Russell King - ARM Linux
2009-10-07 11:48         ` Lothar Waßmann
2009-10-07 12:10           ` Sergei Shtylyov
2009-10-07 12:42         ` Dmitry Artamonow
2009-10-07 13:10           ` Russell King - ARM Linux
2009-10-07 14:33             ` RMK's sa1100 branch (was Re: [PATCH 2/9] collie: prepare for gpiolib use) Dmitry Artamonow
2009-10-07 16:41               ` Russell King - ARM Linux
2009-10-07 20:23       ` [PATCH 2/9] collie: prepare for gpiolib use Thomas Kunze
2009-10-06 10:33 ` collie and SA1100 patches Mark Brown
2009-10-06 10:57 ` Kristoffer Ericson
2009-10-06 16:36   ` Thomas Kunze
2009-10-11 12:16 ` Pavel Machek
2009-10-20 18:00 ` Thomas Kunze
2009-10-20 19:43   ` Eric Miao
2009-11-03 19:41     ` Thomas Kunze
2009-11-07  8:28       ` Pavel Machek
2009-11-07  8:53         ` Russell King - ARM Linux
2009-11-07 16:54         ` Kristoffer Ericson

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.