diff options
author | Cory Maccarrone <darkstar6262@gmail.com> | 2010-01-19 05:22:45 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-03-07 16:17:09 -0500 |
commit | 6048a3dd2371c58611ea0ab8b306f8f1469399ae (patch) | |
tree | 961cff65dda1ea4ab5049d01d858c95ee2ac5044 /include/linux/htcpld.h | |
parent | 08ff6f2a9908c87b0adffe6453291be22db3a62f (diff) |
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: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/htcpld.h')
-rw-r--r-- | include/linux/htcpld.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/htcpld.h b/include/linux/htcpld.h new file mode 100644 index 000000000000..ab3f6cb4dddc --- /dev/null +++ b/include/linux/htcpld.h | |||
@@ -0,0 +1,24 @@ | |||
1 | #ifndef __LINUX_HTCPLD_H | ||
2 | #define __LINUX_HTCPLD_H | ||
3 | |||
4 | struct htcpld_chip_platform_data { | ||
5 | unsigned int addr; | ||
6 | unsigned int reset; | ||
7 | unsigned int num_gpios; | ||
8 | unsigned int gpio_out_base; | ||
9 | unsigned int gpio_in_base; | ||
10 | unsigned int irq_base; | ||
11 | unsigned int num_irqs; | ||
12 | }; | ||
13 | |||
14 | struct htcpld_core_platform_data { | ||
15 | unsigned int int_reset_gpio_hi; | ||
16 | unsigned int int_reset_gpio_lo; | ||
17 | unsigned int i2c_adapter_id; | ||
18 | |||
19 | struct htcpld_chip_platform_data *chip; | ||
20 | unsigned int num_chip; | ||
21 | }; | ||
22 | |||
23 | #endif /* __LINUX_HTCPLD_H */ | ||
24 | |||