Commit 6048a3dd authored by Cory Maccarrone's avatar Cory Maccarrone Committed by Samuel Ortiz

mfd: Add HTCPLD driver

This change introduces a driver for the HTC PLD chip found
on some smartphones, such as the HTC Wizard and HTC Herald.
It works through the I2C bus and acts as a GPIO extender.
Specifically:

 * it can have several sub-devices, each with its own I2C
   address
 * Each sub-device provides 8 output and 8 input pins
 * The chip attaches to one GPIO to signal when any of the
   input GPIOs change -- at which point all chips must be
   scanned for changes

This driver implements the GPIOs throught the kernel's
GPIO and IRQ framework.  This allows any GPIO-servicing
drivers to operate on htcpld pins, such as the gpio-keys
and gpio-leds drivers.
Signed-off-by: default avatarCory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 08ff6f2a
...@@ -78,6 +78,15 @@ config HTC_PASIC3 ...@@ -78,6 +78,15 @@ config HTC_PASIC3
HTC Magician devices, respectively. Actual functionality is HTC Magician devices, respectively. Actual functionality is
handled by the leds-pasic3 and ds1wm drivers. handled by the leds-pasic3 and ds1wm drivers.
config HTC_I2CPLD
bool "HTC I2C PLD chip support"
depends on I2C=y
help
If you say yes here you get support for the supposed CPLD
found on omap850 HTC devices like the HTC Wizard and HTC Herald.
This device provides input and output GPIOs through an I2C
interface to one or more sub-chips.
config UCB1400_CORE config UCB1400_CORE
tristate "Philips UCB1400 Core driver" tristate "Philips UCB1400 Core driver"
depends on AC97_BUS depends on AC97_BUS
......
...@@ -10,6 +10,7 @@ obj-$(CONFIG_MFD_SH_MOBILE_SDHI) += sh_mobile_sdhi.o ...@@ -10,6 +10,7 @@ obj-$(CONFIG_MFD_SH_MOBILE_SDHI) += sh_mobile_sdhi.o
obj-$(CONFIG_HTC_EGPIO) += htc-egpio.o obj-$(CONFIG_HTC_EGPIO) += htc-egpio.o
obj-$(CONFIG_HTC_PASIC3) += htc-pasic3.o obj-$(CONFIG_HTC_PASIC3) += htc-pasic3.o
obj-$(CONFIG_HTC_I2CPLD) += htc-i2cpld.o
obj-$(CONFIG_MFD_DM355EVM_MSP) += dm355evm_msp.o obj-$(CONFIG_MFD_DM355EVM_MSP) += dm355evm_msp.o
......
This diff is collapsed.
#ifndef __LINUX_HTCPLD_H
#define __LINUX_HTCPLD_H
struct htcpld_chip_platform_data {
unsigned int addr;
unsigned int reset;
unsigned int num_gpios;
unsigned int gpio_out_base;
unsigned int gpio_in_base;
unsigned int irq_base;
unsigned int num_irqs;
};
struct htcpld_core_platform_data {
unsigned int int_reset_gpio_hi;
unsigned int int_reset_gpio_lo;
unsigned int i2c_adapter_id;
struct htcpld_chip_platform_data *chip;
unsigned int num_chip;
};
#endif /* __LINUX_HTCPLD_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment