diff options
| author | Philipp Zabel <philipp.zabel@gmail.com> | 2008-04-12 08:25:41 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 06:29:08 -0400 |
| commit | 5dc3339aa5ba29593ea57814049ddca8c12831c8 (patch) | |
| tree | 0481d4344d0cf4052effce8605706414ce63ce8a /include/linux | |
| parent | 481ea5a16aaabe2570d56b5a4d29fa80adc8008b (diff) | |
[ARM] 4964/1: htc-pasic3: MFD driver for PASIC3 LED control + DS1WM chip
This driver will provide registers, clocks and GPIOs of
the HTC PASIC3 (AIC3) and PASIC2 (AIC2) chips to the
ds1wm and leds-pasic3 drivers.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/htc-pasic3.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/linux/mfd/htc-pasic3.h b/include/linux/mfd/htc-pasic3.h new file mode 100644 index 000000000000..b4294f12c4f8 --- /dev/null +++ b/include/linux/mfd/htc-pasic3.h | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | /* | ||
| 2 | * HTC PASIC3 driver - LEDs and DS1WM | ||
| 3 | * | ||
| 4 | * Copyright (c) 2007 Philipp Zabel <philipp.zabel@gmail.com> | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file COPYING in the main directory of this archive for | ||
| 8 | * more details. | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __PASIC3_H | ||
| 13 | #define __PASIC3_H | ||
| 14 | |||
| 15 | #include <linux/platform_device.h> | ||
| 16 | #include <linux/leds.h> | ||
| 17 | |||
| 18 | extern void pasic3_write_register(struct device *dev, u32 reg, u8 val); | ||
| 19 | extern u8 pasic3_read_register(struct device *dev, u32 reg); | ||
| 20 | |||
| 21 | /* | ||
| 22 | * mask for registers 0x20,0x21,0x22 | ||
| 23 | */ | ||
| 24 | #define PASIC3_MASK_LED0 0x04 | ||
| 25 | #define PASIC3_MASK_LED1 0x08 | ||
| 26 | #define PASIC3_MASK_LED2 0x40 | ||
| 27 | |||
| 28 | /* | ||
| 29 | * bits in register 0x06 | ||
| 30 | */ | ||
| 31 | #define PASIC3_BIT2_LED0 0x08 | ||
| 32 | #define PASIC3_BIT2_LED1 0x10 | ||
| 33 | #define PASIC3_BIT2_LED2 0x20 | ||
| 34 | |||
| 35 | struct pasic3_led { | ||
| 36 | struct led_classdev led; | ||
| 37 | unsigned int hw_num; | ||
| 38 | unsigned int bit2; | ||
| 39 | unsigned int mask; | ||
| 40 | struct pasic3_leds_machinfo *pdata; | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct pasic3_leds_machinfo { | ||
| 44 | unsigned int num_leds; | ||
| 45 | unsigned int power_gpio; | ||
| 46 | struct pasic3_led *leds; | ||
| 47 | }; | ||
| 48 | |||
| 49 | struct pasic3_platform_data { | ||
| 50 | struct pasic3_leds_machinfo *led_pdata; | ||
| 51 | unsigned int bus_shift; | ||
| 52 | unsigned int clock_rate; | ||
| 53 | }; | ||
| 54 | |||
| 55 | #endif | ||
