Re: [PATCH 1/2] pwm: Add stubs for pwm operations

2011-05-18 Thread Dmitry Torokhov
On Wed, May 18, 2011 at 10:48:45AM +0530, Mohan Pallaka wrote:
 Chip drivers that support both pwm and non-pwm modes
 would encounter compilation errors if the platform doesn't
 have support for pwm, even though the chip is programmed
 to work in non-pwm mode. Add stubs for pwm functions to
 avoid compilation errors in these scenarios.
 
 Signed-off-by: Mohan Pallaka mpall...@codeaurora.org
 ---
  include/linux/pwm.h |   24 
  1 files changed, 24 insertions(+), 0 deletions(-)
 
 diff --git a/include/linux/pwm.h b/include/linux/pwm.h
 index 7c77575..f0bc51f 100644
 --- a/include/linux/pwm.h
 +++ b/include/linux/pwm.h
 @@ -3,6 +3,7 @@
  
  struct pwm_device;
  
 +#if defined(CONFIG_PWM)

Shouldn't it be CONFIG_HAVE_PWM?

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RESEND v10 2/7] usb: Configure endpoint according to gadget speed.

2011-05-18 Thread Felipe Balbi
Hi,

On Tue, May 17, 2011 at 04:03:16PM +0300, Tatyana Brokhman wrote:
 Add config_ep_by_speed() to configure the endpoint according to the gadget
 diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
 index 5c4c30c..7d1188a 100644
 --- a/include/linux/usb/gadget.h
 +++ b/include/linux/usb/gadget.h
 @@ -132,6 +132,8 @@ struct usb_ep_ops {
   *   value can sometimes be reduced (hardware allowing), according to
   *  the endpoint descriptor used to configure the endpoint.
   * @driver_data:for use by the gadget driver.
 + * @bEndpointAddress: used to identify the endpoint when finding

we only use CaMelCaSe when strictly necessary (like on the structures
defined by the specification) here you could call this field 'address'.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH v10 4/7] usb:gadget: Add SuperSpeed support to the Gadget Framework

2011-05-18 Thread Felipe Balbi
Hi,

On Tue, May 17, 2011 at 04:03:18PM +0300, Tatyana Brokhman wrote:
 diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
 index 5780f35..5be5f6d 100644
 --- a/drivers/usb/gadget/composite.c
 +++ b/drivers/usb/gadget/composite.c
 @@ -352,7 +392,9 @@ static int config_buf(struct usb_configuration *config,
   list_for_each_entry(f, config-functions, list) {
   struct usb_descriptor_header **descriptors;
  
 - if (speed == USB_SPEED_HIGH)
 + if (speed == USB_SPEED_SUPER)
 + descriptors = f-ss_descriptors;
 + else if (speed == USB_SPEED_HIGH)
   descriptors = f-hs_descriptors;

on the previous version of this patch I remember asking to convert these
to switch() instead :-)

same to all others below

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH/RESEND v10 6/7] usb:gadget: Introduce usb_generate_ss_descriptors()

2011-05-18 Thread Felipe Balbi
On Tue, May 17, 2011 at 04:03:20PM +0300, Tatyana Brokhman wrote:
 This patch implements the usb_generate_ss_descriptors() function that is
 used to automatically generate SuperSpeed descriptors for gadget drivers
 that didn't provide any of their own. If a gadget driver wishes to have
 the SuperSpeed descriptors generated for it, it should set the
 function-generate_ss_desc flag to 1.
 
 This patch is not to be mainlined since in the long run we want all gadget
 drivers that wish to operate in SuperSpeed connection to provide their own
 SupeSpeed descriptors. The purpose of this patch is to assist developers
 in the early stages of their work.

if this is not to be applied, then you shouldn't put it in the middle of
the series as it's a bit misleading for people like Greg to filter the
patches :-)

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH v10 7/7] usb: Adding SuperSpeed support to dummy_hcd

2011-05-18 Thread Felipe Balbi
Hi,

On Tue, May 17, 2011 at 04:03:21PM +0300, Tatyana Brokhman wrote:
 This patch adds SS support to the dummy hcd module. It may be used to test
 SS device when no (SS) HW is available.
 USB 3.0 hub includes 2 hubs - HS and SS ones.
 This patch adds support for a SS hub in the dummy_hcd module. Thus, when
 dummy_hcd enabled it will register 2 root hubs (SS and HS).

I think you should split this patch. One which adds this dummy_hcd
structure and moves the fields from struct dummy to dummy_hcd and
another which in fact adds SuperSpeed support.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH v10 0/7] usb gadget: Add SuperSpeed support to the Gadget Framework

2011-05-18 Thread Felipe Balbi
Hi,

On Tue, May 17, 2011 at 11:09:05AM -0700, Greg KH wrote:
 Also, I need Felipe to agree that this framework is acceptable for his
 needs before I can apply this.

I'm work with Tatiana's approach Greg, provided the fixes the comments I
had to this latest version and remove patch 6/7 from her series. If you
want I can put those in a branch for you to pull too. Let me know.

-- 
balbi


signature.asc
Description: Digital signature


[PATCH 1/2] pwm: Add stubs for pwm operations

2011-05-18 Thread Mohan Pallaka
Chip drivers that support both pwm and non-pwm modes
would encounter compilation errors if the platform doesn't
have support for pwm, even though the chip is programmed
to work in non-pwm mode. Add stubs for pwm functions to
avoid compilation errors in these scenarios.

Change-Id: Iec4c55fce253bda809947672be82a7bd14bcd663
Signed-off-by: Mohan Pallaka mpall...@codeaurora.org
---
 include/linux/pwm.h |   24 
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 7c77575..a3cb33f 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -3,6 +3,7 @@
 
 struct pwm_device;
 
+#if defined(CONFIG_HAVE_PWM)
 /*
  * pwm_request - request a PWM device
  */
@@ -28,4 +29,27 @@ int pwm_enable(struct pwm_device *pwm);
  */
 void pwm_disable(struct pwm_device *pwm);
 
+#else
+
+struct pwm_device *pwm_request(int pwm_id, const char *label)
+{
+   return NULL;
+}
+
+void pwm_free(struct pwm_device *pwm) { }
+
+int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
+{
+   return -EINVAL;
+}
+
+int pwm_enable(struct pwm_device *pwm)
+{
+   return -EINVAL;
+}
+
+void pwm_disable(struct pwm_device *pwm) { }
+
+
+#endif /* CONFIG_PWM */
 #endif /* __LINUX_PWM_H */
-- 
1.7.1.1

--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v10 0/7] usb gadget: Add SuperSpeed support to the Gadget Framework

2011-05-18 Thread Felipe Balbi
Hi,

On Wed, May 18, 2011 at 06:53:22AM -0700, Greg KH wrote:
 On Wed, May 18, 2011 at 01:18:36PM +0300, Felipe Balbi wrote:
  Hi,
  
  On Tue, May 17, 2011 at 11:09:05AM -0700, Greg KH wrote:
   Also, I need Felipe to agree that this framework is acceptable for his
   needs before I can apply this.
  
  I'm work with Tatiana's approach Greg, provided the fixes the comments I
  had to this latest version and remove patch 6/7 from her series. If you
  want I can put those in a branch for you to pull too. Let me know.
 
 That would be great.

ok, will do.

Tatyana, we have a few days before the merge window opens, and it will
remain open for two weeks. It would be great if you could send newer
version of the patchset by friday or monday tops so that I can pick them
up for Greg.

-- 
balbi


signature.asc
Description: Digital signature


[PATCH 1/7] msm: gpio: Remove unsupported devices

2011-05-18 Thread David Brown
The MSM7x25 and MSM7x27 devices are not yet supported in the kernel.
Remove #ifdef-based tables supporting these chips for now.

Signed-off-by: David Brown dav...@codeaurora.org
---
 arch/arm/mach-msm/gpio.c |7 ---
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-msm/gpio.c b/arch/arm/mach-msm/gpio.c
index 5ea273b..c358ced 100644
--- a/arch/arm/mach-msm/gpio.c
+++ b/arch/arm/mach-msm/gpio.c
@@ -197,13 +197,6 @@ struct msm_gpio_chip msm_gpio_chips[] = {
MSM_GPIO_BANK(3,  68,  94),
MSM_GPIO_BANK(4,  95, 106),
MSM_GPIO_BANK(5, 107, 121),
-#elif defined(CONFIG_ARCH_MSM7X25) || defined(CONFIG_ARCH_MSM7X27)
-   MSM_GPIO_BANK(0,   0,  15),
-   MSM_GPIO_BANK(1,  16,  42),
-   MSM_GPIO_BANK(2,  43,  67),
-   MSM_GPIO_BANK(3,  68,  94),
-   MSM_GPIO_BANK(4,  95, 106),
-   MSM_GPIO_BANK(5, 107, 132),
 #elif defined(CONFIG_ARCH_MSM7X30)
MSM_GPIO_BANK(0,   0,  15),
MSM_GPIO_BANK(1,  16,  43),
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 7/7] gpio_msm: Move Qualcomm MSM v2 gpio driver into drivers

2011-05-18 Thread David Brown
Migrate the driver for the v7-based MSM chips into drivers/gpio.  The
driver is unchanged, only moved.

Signed-off-by: David Brown dav...@codeaurora.org
---
 arch/arm/mach-msm/Kconfig  |1 +
 arch/arm/mach-msm/Makefile |6 --
 drivers/gpio/Kconfig   |8 
 drivers/gpio/Makefile  |1 +
 .../mach-msm/gpio-v2.c = drivers/gpio/msm_v2.c|2 +-
 5 files changed, 11 insertions(+), 7 deletions(-)
 rename arch/arm/mach-msm/gpio-v2.c = drivers/gpio/msm_v2.c (99%)

diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index cc7c0b2..f5cce3f 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -47,6 +47,7 @@ config ARCH_MSM8X60
select ARM_GIC
select CPU_V7
select MSM_V2_TLMM
+   select GPIO_MSM_V2
select MSM_GPIOMUX
select MSM_SCM if SMP
 
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index edb6659..7e58b45 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -32,9 +32,3 @@ obj-$(CONFIG_ARCH_MSM8960) += board-msm8960.o 
devices-msm8960.o
 obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o
 obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o
 obj-$(CONFIG_ARCH_MSM8X60) += gpiomux-8x60.o gpiomux-v2.o gpiomux.o
-ifdef CONFIG_MSM_V2_TLMM
-ifndef CONFIG_ARCH_MSM8960
-# TODO: TLMM Mapping issues need to be resolved
-obj-y  += gpio-v2.o
-endif
-endif
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index aa5a3f9..235b6c9 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -139,6 +139,14 @@ config GPIO_MSM_V1
  Qualcomm MSM chips.  Most of the pins on the MSM can be
  selected for GPIO, and are controlled by this driver.
 
+config GPIO_MSM_V2
+   tristate Qualcomm MSM GPIO v2
+   depends on GPIOLIB  ARCH_MSM
+   help
+ Say yes here to support the GPIO interface on ARM many v7
+ based Qualcomm MSM chips.  Most of the pins on the MSM can
+ be selected for GPIO, and are controlled by this driver.
+
 comment I2C GPIO expanders:
 
 config GPIO_MAX7300
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index b6386e4..c2f2d3f 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -42,5 +42,6 @@ obj-$(CONFIG_GPIO_JANZ_TTL)   += janz-ttl.o
 obj-$(CONFIG_GPIO_SX150X)  += sx150x.o
 obj-$(CONFIG_GPIO_VX855)   += vx855_gpio.o
 obj-$(CONFIG_GPIO_MSM_V1)  += msm_v1.o
+obj-$(CONFIG_GPIO_MSM_V2)  += msm_v2.o
 obj-$(CONFIG_GPIO_ML_IOH)  += ml_ioh_gpio.o
 obj-$(CONFIG_AB8500_GPIO)   += ab8500-gpio.o
diff --git a/arch/arm/mach-msm/gpio-v2.c b/drivers/gpio/msm_v2.c
similarity index 99%
rename from arch/arm/mach-msm/gpio-v2.c
rename to drivers/gpio/msm_v2.c
index 56a964e..62193bf 100644
--- a/arch/arm/mach-msm/gpio-v2.c
+++ b/drivers/gpio/msm_v2.c
@@ -27,8 +27,8 @@
 #include linux/module.h
 #include linux/platform_device.h
 #include linux/spinlock.h
+#include linux/msm_gpiomux.h
 #include mach/msm_iomap.h
-#include gpiomux.h
 
 /* Bits of interest in the GPIO_IN_OUT register.
  */
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/7] msm: Remove chip-ifdefs for GPIO io mappings

2011-05-18 Thread David Brown
The two GPIO controllers are always mapped to the same virtual address
across all MSM devices.  Instead of selecting this at compile time,
determine the physical address at runtime, eliminating yet something
else preventing multiple MSM targets from being compiled into the same
kernel.

Signed-off-by: David Brown dav...@codeaurora.org
---
 arch/arm/mach-msm/include/mach/msm_iomap-7x00.h |   10 --
 arch/arm/mach-msm/include/mach/msm_iomap-7x30.h |   10 --
 arch/arm/mach-msm/include/mach/msm_iomap-8x50.h |   10 --
 arch/arm/mach-msm/include/mach/msm_iomap.h  |2 ++
 arch/arm/mach-msm/io.c  |   12 ++--
 5 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h 
b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
index d6540e1..04bca83 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
@@ -54,13 +54,11 @@
 #define MSM7X00_DMOV_PHYS 0xA970
 #define MSM7X00_DMOV_SIZE SZ_4K
 
-#define MSM_GPIO1_BASEIOMEM(0xE0003000)
-#define MSM_GPIO1_PHYS0xA920
-#define MSM_GPIO1_SIZESZ_4K
+#define MSM7X00_GPIO1_PHYS0xA920
+#define MSM7X00_GPIO1_SIZESZ_4K
 
-#define MSM_GPIO2_BASEIOMEM(0xE0004000)
-#define MSM_GPIO2_PHYS0xA930
-#define MSM_GPIO2_SIZESZ_4K
+#define MSM7X00_GPIO2_PHYS0xA930
+#define MSM7X00_GPIO2_SIZESZ_4K
 
 #define MSM_CLK_CTL_BASE  IOMEM(0xE0005000)
 #define MSM_CLK_CTL_PHYS  0xA860
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h 
b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
index 23912e5..7357ed6 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
@@ -45,13 +45,11 @@
 #define MSM7X30_DMOV_PHYS 0xAC40
 #define MSM7X30_DMOV_SIZE SZ_4K
 
-#define MSM_GPIO1_BASEIOMEM(0xE0003000)
-#define MSM_GPIO1_PHYS0xAC001000
-#define MSM_GPIO1_SIZESZ_4K
+#define MSM7X30_GPIO1_PHYS0xAC001000
+#define MSM7X30_GPIO1_SIZESZ_4K
 
-#define MSM_GPIO2_BASEIOMEM(0xE0004000)
-#define MSM_GPIO2_PHYS0xAC101000
-#define MSM_GPIO2_SIZESZ_4K
+#define MSM7X30_GPIO2_PHYS0xAC101000
+#define MSM7X30_GPIO2_SIZESZ_4K
 
 #define MSM_CLK_CTL_BASE  IOMEM(0xE0005000)
 #define MSM_CLK_CTL_PHYS  0xAB80
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h 
b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
index fc36b82..38f37ed 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
@@ -45,13 +45,11 @@
 #define QSD8X50_DMOV_PHYS 0xA970
 #define QSD8X50_DMOV_SIZE SZ_4K
 
-#define MSM_GPIO1_BASEIOMEM(0xE0003000)
-#define MSM_GPIO1_PHYS0xA900
-#define MSM_GPIO1_SIZESZ_4K
+#define QSD8X50_GPIO1_PHYS0xA900
+#define QSD8X50_GPIO1_SIZESZ_4K
 
-#define MSM_GPIO2_BASEIOMEM(0xE0004000)
-#define MSM_GPIO2_PHYS0xA910
-#define MSM_GPIO2_SIZESZ_4K
+#define QSD8X50_GPIO2_PHYS0xA910
+#define QSD8X50_GPIO2_SIZESZ_4K
 
 #define MSM_CLK_CTL_BASE  IOMEM(0xE0005000)
 #define MSM_CLK_CTL_PHYS  0xA860
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h 
b/arch/arm/mach-msm/include/mach/msm_iomap.h
index c98c759..3c4ef35 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap.h
@@ -61,5 +61,7 @@
 #define MSM_QGIC_CPU_BASE  IOMEM(0xF0001000)
 #define MSM_TMR_BASE   IOMEM(0xF020)
 #define MSM_TMR0_BASE  IOMEM(0xF0201000)
+#define MSM_GPIO1_BASE IOMEM(0xE0003000)
+#define MSM_GPIO2_BASE IOMEM(0xE0004000)
 
 #endif
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 1c86cda..067653a 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -42,8 +42,8 @@
 static struct map_desc msm_io_desc[] __initdata = {
MSM_DEVICE(VIC),
MSM_CHIP_DEVICE(CSR, MSM7X00),
-   MSM_DEVICE(GPIO1),
-   MSM_DEVICE(GPIO2),
+   MSM_CHIP_DEVICE(GPIO1, MSM7X00),
+   MSM_CHIP_DEVICE(GPIO2, MSM7X00),
MSM_DEVICE(CLK_CTL),
 #ifdef CONFIG_MSM_DEBUG_UART
MSM_DEVICE(DEBUG_UART),
@@ -74,8 +74,8 @@ void __init msm_map_common_io(void)
 static struct map_desc qsd8x50_io_desc[] __initdata = {
MSM_DEVICE(VIC),
MSM_CHIP_DEVICE(CSR, QSD8X50),
-   MSM_DEVICE(GPIO1),
-   MSM_DEVICE(GPIO2),
+   MSM_CHIP_DEVICE(GPIO1, QSD8X50),
+   MSM_CHIP_DEVICE(GPIO2, QSD8X50),
MSM_DEVICE(CLK_CTL),
MSM_DEVICE(SIRC),
MSM_DEVICE(SCPLL),
@@ -132,8 +132,8 @@ void __init msm_map_msm8960_io(void)
 static struct map_desc msm7x30_io_desc[] __initdata = {
MSM_DEVICE(VIC),
MSM_CHIP_DEVICE(CSR, MSM7X30),
-   MSM_DEVICE(GPIO1),
-   MSM_DEVICE(GPIO2),
+   

[PATCH 6/7] gpio_msm: Move Qualcomm v6 MSM driver into drivers

2011-05-18 Thread David Brown
Migrate the driver for the v6-based MSM chips into drivers/gpio.  The
driver is unchanged, only moved.

Signed-off-by: David Brown dav...@codeaurora.org
---
 arch/arm/mach-msm/Kconfig  |3 +++
 arch/arm/mach-msm/Makefile |2 --
 drivers/gpio/Kconfig   |8 
 drivers/gpio/Makefile  |1 +
 arch/arm/mach-msm/gpio.c = drivers/gpio/msm_v1.c  |7 +++
 .../mach-msm/gpio_hw.h = drivers/gpio/msm_v1.h|9 -
 6 files changed, 19 insertions(+), 11 deletions(-)
 rename arch/arm/mach-msm/gpio.c = drivers/gpio/msm_v1.c (98%)
 rename arch/arm/mach-msm/gpio_hw.h = drivers/gpio/msm_v1.h (98%)

diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index 1516896..cc7c0b2 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -11,6 +11,7 @@ config ARCH_MSM7X00A
select MSM_SMD
select MSM_SMD_PKG3
select CPU_V6
+   select GPIO_MSM_V1
select MSM_PROC_COMM
select HAS_MSM_DEBUG_UART_PHYS
 
@@ -22,6 +23,7 @@ config ARCH_MSM7X30
select MSM_VIC
select CPU_V7
select MSM_GPIOMUX
+   select GPIO_MSM_V1
select MSM_PROC_COMM
select HAS_MSM_DEBUG_UART_PHYS
 
@@ -33,6 +35,7 @@ config ARCH_QSD8X50
select MSM_VIC
select CPU_V7
select MSM_GPIOMUX
+   select GPIO_MSM_V1
select MSM_PROC_COMM
select HAS_MSM_DEBUG_UART_PHYS
 
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index c72cb8e..edb6659 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -37,6 +37,4 @@ ifndef CONFIG_ARCH_MSM8960
 # TODO: TLMM Mapping issues need to be resolved
 obj-y  += gpio-v2.o
 endif
-else
-obj-y  += gpio.o
 endif
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index d3b2953..aa5a3f9 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -131,6 +131,14 @@ config GPIO_VX855
  additional drivers must be enabled in order to use the
  functionality of the device.
 
+config GPIO_MSM_V1
+   tristate Qualcomm MSM GPIO v1
+   depends on GPIOLIB  ARCH_MSM
+   help
+ Say yes here to support the GPIO interface on ARM v6 based
+ Qualcomm MSM chips.  Most of the pins on the MSM can be
+ selected for GPIO, and are controlled by this driver.
+
 comment I2C GPIO expanders:
 
 config GPIO_MAX7300
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index becef59..b6386e4 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -41,5 +41,6 @@ obj-$(CONFIG_GPIO_RDC321X)+= rdc321x-gpio.o
 obj-$(CONFIG_GPIO_JANZ_TTL)+= janz-ttl.o
 obj-$(CONFIG_GPIO_SX150X)  += sx150x.o
 obj-$(CONFIG_GPIO_VX855)   += vx855_gpio.o
+obj-$(CONFIG_GPIO_MSM_V1)  += msm_v1.o
 obj-$(CONFIG_GPIO_ML_IOH)  += ml_ioh_gpio.o
 obj-$(CONFIG_AB8500_GPIO)   += ab8500-gpio.o
diff --git a/arch/arm/mach-msm/gpio.c b/drivers/gpio/msm_v1.c
similarity index 98%
rename from arch/arm/mach-msm/gpio.c
rename to drivers/gpio/msm_v1.c
index 2ac3a0f..4ba2067 100644
--- a/arch/arm/mach-msm/gpio.c
+++ b/drivers/gpio/msm_v1.c
@@ -1,7 +1,6 @@
-/* linux/arch/arm/mach-msm/gpio.c
- *
+/*
  * Copyright (C) 2007 Google, Inc.
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -22,7 +21,7 @@
 #include linux/module.h
 #include mach/cpu.h
 #include linux/msm_gpiomux.h
-#include gpio_hw.h
+#include msm_v1.h
 
 #define FIRST_GPIO_IRQ MSM_GPIO_TO_INT(0)
 
diff --git a/arch/arm/mach-msm/gpio_hw.h b/drivers/gpio/msm_v1.h
similarity index 98%
rename from arch/arm/mach-msm/gpio_hw.h
rename to drivers/gpio/msm_v1.h
index ba7972a..a3e3cb2 100644
--- a/arch/arm/mach-msm/gpio_hw.h
+++ b/drivers/gpio/msm_v1.h
@@ -1,8 +1,7 @@
-/* arch/arm/mach-msm/gpio_hw.h
- *
+/*
  * Copyright (C) 2007 Google, Inc.
  * Author: Brian Swetland swetl...@google.com
- * Copyright (c) 2008-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -15,8 +14,8 @@
  *
  */
 
-#ifndef __ARCH_ARM_MACH_MSM_GPIO_HW_H
-#define __ARCH_ARM_MACH_MSM_GPIO_HW_H
+#ifndef _MSM_GPIO_V1_H
+#define _MSM_GPIO_V1_H
 
 #include mach/msm_iomap.h
 
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/7] msm: gpiomux: Move public API to public header

2011-05-18 Thread David Brown
The gpiomux.h header contains some SOC ifdefs.  However, the API that
is actually used by the GPIO driver only uses two functions that are
general.  Move these general definitions into a public header file.

Signed-off-by: David Brown dav...@codeaurora.org
---
 arch/arm/mach-msm/gpio.c|2 +-
 arch/arm/mach-msm/gpiomux.h |   17 +
 include/linux/msm_gpiomux.h |   38 ++
 3 files changed, 40 insertions(+), 17 deletions(-)
 create mode 100644 include/linux/msm_gpiomux.h

diff --git a/arch/arm/mach-msm/gpio.c b/arch/arm/mach-msm/gpio.c
index e96199d..2ac3a0f 100644
--- a/arch/arm/mach-msm/gpio.c
+++ b/arch/arm/mach-msm/gpio.c
@@ -21,8 +21,8 @@
 #include linux/irq.h
 #include linux/module.h
 #include mach/cpu.h
+#include linux/msm_gpiomux.h
 #include gpio_hw.h
-#include gpiomux.h
 
 #define FIRST_GPIO_IRQ MSM_GPIO_TO_INT(0)
 
diff --git a/arch/arm/mach-msm/gpiomux.h b/arch/arm/mach-msm/gpiomux.h
index b178d9c..a5290ed 100644
--- a/arch/arm/mach-msm/gpiomux.h
+++ b/arch/arm/mach-msm/gpiomux.h
@@ -19,6 +19,7 @@
 
 #include linux/bitops.h
 #include linux/errno.h
+#include linux/msm_gpiomux.h
 
 #if defined(CONFIG_MSM_V2_TLMM)
 #include gpiomux-v2.h
@@ -71,12 +72,6 @@ enum {
  */
 extern struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS];
 
-/* Increment a gpio's reference count, possibly activating the line. */
-int __must_check msm_gpiomux_get(unsigned gpio);
-
-/* Decrement a gpio's reference count, possibly suspending the line. */
-int msm_gpiomux_put(unsigned gpio);
-
 /* Install a new configuration to the gpio line.  To avoid overwriting
  * a configuration, leave the VALID bit out.
  */
@@ -94,16 +89,6 @@ int msm_gpiomux_write(unsigned gpio,
  */
 void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val);
 #else
-static inline int __must_check msm_gpiomux_get(unsigned gpio)
-{
-   return -ENOSYS;
-}
-
-static inline int msm_gpiomux_put(unsigned gpio)
-{
-   return -ENOSYS;
-}
-
 static inline int msm_gpiomux_write(unsigned gpio,
gpiomux_config_t active,
gpiomux_config_t suspended)
diff --git a/include/linux/msm_gpiomux.h b/include/linux/msm_gpiomux.h
new file mode 100644
index 000..0c7d393
--- /dev/null
+++ b/include/linux/msm_gpiomux.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _LINUX_MSM_GPIOMUX_H
+#define _LINUX_MSM_GPIOMUX_H
+
+#ifdef CONFIG_MSM_GPIOMUX
+
+/* Increment a gpio's reference count, possibly activating the line. */
+int __must_check msm_gpiomux_get(unsigned gpio);
+
+/* Decrement a gpio's reference count, possibly suspending the line. */
+int msm_gpiomux_put(unsigned gpio);
+
+#else
+
+static inline int __must_check msm_gpiomux_get(unsigned gpio)
+{
+   return -ENOSYS;
+}
+
+static inline int msm_gpiomux_put(unsigned gpio)
+{
+   return -ENOSYS;
+}
+
+#endif
+
+#endif /* _LINUX_MSM_GPIOMUX_H */
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/7] msm: gpio: Remove chip-specific register definitions

2011-05-18 Thread David Brown
Put an SOC prefix on each GPIO register definition, eliminating the
need to have SOC ifdefs around the definitions.

Signed-off-by: David Brown dav...@codeaurora.org
---
 arch/arm/mach-msm/gpio.c|   62 
 arch/arm/mach-msm/gpio_hw.h |  384 +--
 2 files changed, 220 insertions(+), 226 deletions(-)

diff --git a/arch/arm/mach-msm/gpio.c b/arch/arm/mach-msm/gpio.c
index c358ced..335afbd 100644
--- a/arch/arm/mach-msm/gpio.c
+++ b/arch/arm/mach-msm/gpio.c
@@ -25,17 +25,17 @@
 
 #define FIRST_GPIO_IRQ MSM_GPIO_TO_INT(0)
 
-#define MSM_GPIO_BANK(bank, first, last)   \
+#define MSM_GPIO_BANK(soc, bank, first, last)  \
{   \
.regs = {   \
-   .out = MSM_GPIO_OUT_##bank, \
-   .in =  MSM_GPIO_IN_##bank,  \
-   .int_status =  MSM_GPIO_INT_STATUS_##bank,  \
-   .int_clear =   MSM_GPIO_INT_CLEAR_##bank,   \
-   .int_en =  MSM_GPIO_INT_EN_##bank,  \
-   .int_edge =MSM_GPIO_INT_EDGE_##bank,\
-   .int_pos = MSM_GPIO_INT_POS_##bank, \
-   .oe =  MSM_GPIO_OE_##bank,  \
+   .out = soc##_GPIO_OUT_##bank,   \
+   .in =  soc##_GPIO_IN_##bank,\
+   .int_status =  soc##_GPIO_INT_STATUS_##bank,\
+   .int_clear =   soc##_GPIO_INT_CLEAR_##bank, \
+   .int_en =  soc##_GPIO_INT_EN_##bank,\
+   .int_edge =soc##_GPIO_INT_EDGE_##bank,  \
+   .int_pos = soc##_GPIO_INT_POS_##bank,   \
+   .oe =  soc##_GPIO_OE_##bank,\
},  \
.chip = {   \
.base = (first),\
@@ -191,30 +191,30 @@ static void msm_gpio_free(struct gpio_chip *chip, 
unsigned offset)
 
 struct msm_gpio_chip msm_gpio_chips[] = {
 #if defined(CONFIG_ARCH_MSM7X00A)
-   MSM_GPIO_BANK(0,   0,  15),
-   MSM_GPIO_BANK(1,  16,  42),
-   MSM_GPIO_BANK(2,  43,  67),
-   MSM_GPIO_BANK(3,  68,  94),
-   MSM_GPIO_BANK(4,  95, 106),
-   MSM_GPIO_BANK(5, 107, 121),
+   MSM_GPIO_BANK(MSM7X00, 0,   0,  15),
+   MSM_GPIO_BANK(MSM7X00, 1,  16,  42),
+   MSM_GPIO_BANK(MSM7X00, 2,  43,  67),
+   MSM_GPIO_BANK(MSM7X00, 3,  68,  94),
+   MSM_GPIO_BANK(MSM7X00, 4,  95, 106),
+   MSM_GPIO_BANK(MSM7X00, 5, 107, 121),
 #elif defined(CONFIG_ARCH_MSM7X30)
-   MSM_GPIO_BANK(0,   0,  15),
-   MSM_GPIO_BANK(1,  16,  43),
-   MSM_GPIO_BANK(2,  44,  67),
-   MSM_GPIO_BANK(3,  68,  94),
-   MSM_GPIO_BANK(4,  95, 106),
-   MSM_GPIO_BANK(5, 107, 133),
-   MSM_GPIO_BANK(6, 134, 150),
-   MSM_GPIO_BANK(7, 151, 181),
+   MSM_GPIO_BANK(MSM7X30, 0,   0,  15),
+   MSM_GPIO_BANK(MSM7X30, 1,  16,  43),
+   MSM_GPIO_BANK(MSM7X30, 2,  44,  67),
+   MSM_GPIO_BANK(MSM7X30, 3,  68,  94),
+   MSM_GPIO_BANK(MSM7X30, 4,  95, 106),
+   MSM_GPIO_BANK(MSM7X30, 5, 107, 133),
+   MSM_GPIO_BANK(MSM7X30, 6, 134, 150),
+   MSM_GPIO_BANK(MSM7X30, 7, 151, 181),
 #elif defined(CONFIG_ARCH_QSD8X50)
-   MSM_GPIO_BANK(0,   0,  15),
-   MSM_GPIO_BANK(1,  16,  42),
-   MSM_GPIO_BANK(2,  43,  67),
-   MSM_GPIO_BANK(3,  68,  94),
-   MSM_GPIO_BANK(4,  95, 103),
-   MSM_GPIO_BANK(5, 104, 121),
-   MSM_GPIO_BANK(6, 122, 152),
-   MSM_GPIO_BANK(7, 153, 164),
+   MSM_GPIO_BANK(QSD8X50, 0,   0,  15),
+   MSM_GPIO_BANK(QSD8X50, 1,  16,  42),
+   MSM_GPIO_BANK(QSD8X50, 2,  43,  67),
+   MSM_GPIO_BANK(QSD8X50, 3,  68,  94),
+   MSM_GPIO_BANK(QSD8X50, 4,  95, 103),
+   MSM_GPIO_BANK(QSD8X50, 5, 104, 121),
+   MSM_GPIO_BANK(QSD8X50, 6, 122, 152),
+   MSM_GPIO_BANK(QSD8X50, 7, 153, 164),
 #endif
 };
 
diff --git a/arch/arm/mach-msm/gpio_hw.h b/arch/arm/mach-msm/gpio_hw.h
index 6b50660..ba7972a 100644
--- a/arch/arm/mach-msm/gpio_hw.h
+++ b/arch/arm/mach-msm/gpio_hw.h
@@ -31,248 +31,242 @@
 ** macros.
 */
 
-#if defined(CONFIG_ARCH_MSM7X30)
 #define MSM_GPIO1_REG(off) (MSM_GPIO1_BASE + (off))
 #define MSM_GPIO2_REG(off) (MSM_GPIO2_BASE + 0x400 + (off))
-#else
-#define MSM_GPIO1_REG(off) (MSM_GPIO1_BASE + 0x800 + (off))
-#define MSM_GPIO2_REG(off) (MSM_GPIO2_BASE + 0xC00 + (off))
-#endif
-
-#if defined(CONFIG_ARCH_MSM7X00A) || defined(CONFIG_ARCH_MSM7X25) ||\
-defined(CONFIG_ARCH_MSM7X27)
+#define MSM_GPIO1_SHADOW_REG(off) (MSM_GPIO1_BASE + 0x800 + (off))
+#define 

Re: [PATCH 0/7] Move Qualcomm gpio drivers into drivers dir

2011-05-18 Thread Linus Walleij
2011/5/18 David Brown dav...@codeaurora.org:

 This patch series moves the Qualcomm MSM gpio device drivers into the
 drivers/gpio directory.

Looks like a very clean cut and simple drivers that judt do plain GPIO.
FWIW Acked-by: Linus Walleij linus.wall...@linaro.org

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 5/7] msm: gpiomux: Move public API to public header

2011-05-18 Thread H Hartley Sweeten
On Wednesday, May 18, 2011 2:51 PM, David Brown wrote:

 The gpiomux.h header contains some SOC ifdefs.  However, the API that
 is actually used by the GPIO driver only uses two functions that are
 general.  Move these general definitions into a public header file.

 Signed-off-by: David Brown dav...@codeaurora.org
 ---
  arch/arm/mach-msm/gpio.c|2 +-
  arch/arm/mach-msm/gpiomux.h |   17 +
  include/linux/msm_gpiomux.h |   38 ++
  3 files changed, 40 insertions(+), 17 deletions(-)
  create mode 100644 include/linux/msm_gpiomux.h

The msm_gpiomux.h header appears to be very msm specific, especially
with the #ifdef CONFIG_MSM_GPIOMUX in it.  Wouldn't it be cleaner to
just move it to arch/arm/mach-msm/include/mach/msm_gpiomux.h?

I don't see a reason why this header needs/should be available for
the general public in /include/linux.

Regards,
Hartley--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/7] msm: gpiomux: Move public API to public header

2011-05-18 Thread David Brown
On Wed, May 18 2011, H Hartley Sweeten wrote:

 On Wednesday, May 18, 2011 2:51 PM, David Brown wrote:

 The gpiomux.h header contains some SOC ifdefs.  However, the API that
 is actually used by the GPIO driver only uses two functions that are
 general.  Move these general definitions into a public header file.

 Signed-off-by: David Brown dav...@codeaurora.org
 ---
  arch/arm/mach-msm/gpio.c|2 +-
  arch/arm/mach-msm/gpiomux.h |   17 +
  include/linux/msm_gpiomux.h |   38 ++
  3 files changed, 40 insertions(+), 17 deletions(-)
  create mode 100644 include/linux/msm_gpiomux.h

 The msm_gpiomux.h header appears to be very msm specific, especially
 with the #ifdef CONFIG_MSM_GPIOMUX in it.  Wouldn't it be cleaner to
 just move it to arch/arm/mach-msm/include/mach/msm_gpiomux.h?

 I don't see a reason why this header needs/should be available for
 the general public in /include/linux.

Agreed.

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] msm: 8660: Add FLUID support

2011-05-18 Thread Stephen Boyd
The machine descriptor for FLUID was missing. Adding it allows us
to boot FLUID devices since the basic support for 8660 is the
same.

Signed-off-by: Stephen Boyd sb...@codeaurora.org
---
 arch/arm/mach-msm/board-msm8x60.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-msm/board-msm8x60.c 
b/arch/arm/mach-msm/board-msm8x60.c
index 98c47ce..35ed594 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -98,3 +98,10 @@ MACHINE_START(MSM8X60_FFA, QCT MSM8X60 FFA)
.init_machine = msm8x60_init,
.timer = msm_timer,
 MACHINE_END
+
+MACHINE_START(MSM8X60_FLUID, QCT MSM8X60 FLUID)
+   .map_io = msm8x60_map_io,
+   .init_irq = msm8x60_init_irq,
+   .init_machine = msm8x60_init,
+   .timer = msm_timer,
+MACHINE_END
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v10 0/7] usb gadget: Add SuperSpeed support to the Gadget Framework

2011-05-18 Thread Tanya Brokhman
 
 Tatyana, we have a few days before the merge window opens, and it will
 remain open for two weeks. It would be great if you could send newer
 version of the patchset by friday or monday tops so that I can pick
 them up for Greg.
 
 --
 balbi

Np. You'll have them by the end of the day.
Thanks for all your help on this series!


Best regards,
Tanya Brokhman
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum




--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V4] input: pm8xxx_keypad: Qualcomm pm8xxx keypad controller driver

2011-05-18 Thread Anirudh Ghayal

Hi Dmitry,

I have merged all the changes from the below patches into this single 
driver.


http://patchwork.ozlabs.org/patch/90097/
https://patchwork.kernel.org/patch/78/

As you have already Acked these patches individually can you please Ack 
this, so that I can request Samuel add them to the MFD tree.


Thank you,
~Anirudh


On 5/19/2011 10:54 AM, Anirudh Ghayal wrote:

From: Trilok Sonits...@codeaurora.org

Add Qualcomm PMIC8XXX based keypad controller driver
supporting upto 18x8 matrix configuration.

Signed-off-by: Trilok Sonits...@codeaurora.org
Signed-off-by: Anirudh Ghayalagha...@codeaurora.org
---
  drivers/input/keyboard/Kconfig   |   11 +
  drivers/input/keyboard/Makefile  |1 +
  drivers/input/keyboard/pmic8xxx-keypad.c |  799 ++
  include/linux/input/pmic8xxx-keypad.h|   52 ++
  4 files changed, 863 insertions(+), 0 deletions(-)
  create mode 100644 drivers/input/keyboard/pmic8xxx-keypad.c
  create mode 100644 include/linux/input/pmic8xxx-keypad.h

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index b16bed0..42fe6f1 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -390,6 +390,17 @@ config KEYBOARD_PXA930_ROTARY
  To compile this driver as a module, choose M here: the
  module will be called pxa930_rotary.

+config KEYBOARD_PMIC8XXX
+   tristate Qualcomm PMIC8XXX keypad support
+   depends on MFD_PM8XXX
+   help
+ Say Y here if you want to enable the driver for the PMIC8XXX
+ keypad provided as a reference design from Qualcomm. This is intended
+ to support upto 18x8 matrix based keypad design.
+
+ To compile this driver as a module, choose M here: the module will
+ be called pmic8xxx-keypad.
+
  config KEYBOARD_SAMSUNG
tristate Samsung keypad support
depends on SAMSUNG_DEV_KEYPAD
diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile
index 878e6c2..ff996c8 100644
--- a/drivers/input/keyboard/Makefile
+++ b/drivers/input/keyboard/Makefile
@@ -32,6 +32,7 @@ obj-$(CONFIG_KEYBOARD_NOMADIK)+= 
nomadik-ske-keypad.o
  obj-$(CONFIG_KEYBOARD_OMAP)   += omap-keypad.o
  obj-$(CONFIG_KEYBOARD_OMAP4)  += omap4-keypad.o
  obj-$(CONFIG_KEYBOARD_OPENCORES)  += opencores-kbd.o
+obj-$(CONFIG_KEYBOARD_PMIC8XXX)+= pmic8xxx-keypad.o
  obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o
  obj-$(CONFIG_KEYBOARD_PXA930_ROTARY)  += pxa930_rotary.o
  obj-$(CONFIG_KEYBOARD_QT1070)   += qt1070.o
diff --git a/drivers/input/keyboard/pmic8xxx-keypad.c 
b/drivers/input/keyboard/pmic8xxx-keypad.c
new file mode 100644
index 000..40b02ae
--- /dev/null
+++ b/drivers/input/keyboard/pmic8xxx-keypad.c
@@ -0,0 +1,799 @@
+/* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#includelinux/module.h
+#includelinux/platform_device.h
+#includelinux/kernel.h
+#includelinux/interrupt.h
+#includelinux/slab.h
+#includelinux/input.h
+#includelinux/bitops.h
+#includelinux/delay.h
+#includelinux/mutex.h
+
+#includelinux/mfd/pm8xxx/core.h
+#includelinux/mfd/pm8xxx/gpio.h
+#includelinux/input/pmic8xxx-keypad.h
+
+#define PM8XXX_MAX_ROWS18
+#define PM8XXX_MAX_COLS8
+#define PM8XXX_ROW_SHIFT   3
+#define PM8XXX_MATRIX_MAX_SIZE (PM8XXX_MAX_ROWS * PM8XXX_MAX_COLS)
+
+#define PM8XXX_MIN_ROWS5
+#define PM8XXX_MIN_COLS5
+
+#define MAX_SCAN_DELAY 128
+#define MIN_SCAN_DELAY 1
+
+/* in nanoseconds */
+#define MAX_ROW_HOLD_DELAY 122000
+#define MIN_ROW_HOLD_DELAY 30500
+
+#define MAX_DEBOUNCE_TIME  20
+#define MIN_DEBOUNCE_TIME  5
+
+#define KEYP_CTRL  0x148
+
+#define KEYP_CTRL_EVNTSBIT(0)
+#define KEYP_CTRL_EVNTS_MASK   0x3
+
+#define KEYP_CTRL_SCAN_COLS_SHIFT  5
+#define KEYP_CTRL_SCAN_COLS_MIN5
+#define KEYP_CTRL_SCAN_COLS_BITS   0x3
+
+#define KEYP_CTRL_SCAN_ROWS_SHIFT  2
+#define KEYP_CTRL_SCAN_ROWS_MIN5
+#define KEYP_CTRL_SCAN_ROWS_BITS   0x7
+
+#define KEYP_CTRL_KEYP_EN  BIT(7)
+
+#define KEYP_SCAN  0x149
+
+#define KEYP_SCAN_READ_STATE   BIT(0)
+#define KEYP_SCAN_DBOUNCE_SHIFT1
+#define KEYP_SCAN_PAUSE_SHIFT  3
+#define KEYP_SCAN_ROW_HOLD_SHIFT   6
+
+#define KEYP_TEST  0x14A
+
+#define