diff options
Diffstat (limited to 'include/linux/i2c')
-rw-r--r-- | include/linux/i2c/at24.h | 35 | ||||
-rw-r--r-- | include/linux/i2c/tc35876x.h | 11 | ||||
-rw-r--r-- | include/linux/i2c/twl.h | 14 |
3 files changed, 52 insertions, 8 deletions
diff --git a/include/linux/i2c/at24.h b/include/linux/i2c/at24.h index 8ace93024d6..285025a9cdc 100644 --- a/include/linux/i2c/at24.h +++ b/include/linux/i2c/at24.h | |||
@@ -1,19 +1,42 @@ | |||
1 | /* | ||
2 | * at24.h - platform_data for the at24 (generic eeprom) driver | ||
3 | * (C) Copyright 2008 by Pengutronix | ||
4 | * (C) Copyright 2012 by Wolfram Sang | ||
5 | * same license as the driver | ||
6 | */ | ||
7 | |||
1 | #ifndef _LINUX_AT24_H | 8 | #ifndef _LINUX_AT24_H |
2 | #define _LINUX_AT24_H | 9 | #define _LINUX_AT24_H |
3 | 10 | ||
4 | #include <linux/types.h> | 11 | #include <linux/types.h> |
5 | #include <linux/memory.h> | 12 | #include <linux/memory.h> |
6 | 13 | ||
7 | /* | 14 | /** |
8 | * As seen through Linux I2C, differences between the most common types of I2C | 15 | * struct at24_platform_data - data to set up at24 (generic eeprom) driver |
9 | * memory include: | 16 | * @byte_len: size of eeprom in byte |
10 | * - How much memory is available (usually specified in bit)? | 17 | * @page_size: number of byte which can be written in one go |
11 | * - What write page size does it support? | 18 | * @flags: tunable options, check AT24_FLAG_* defines |
12 | * - Special flags (16 bit addresses, read_only, world readable...)? | 19 | * @setup: an optional callback invoked after eeprom is probed; enables kernel |
20 | code to access eeprom via memory_accessor, see example | ||
21 | * @context: optional parameter passed to setup() | ||
13 | * | 22 | * |
14 | * If you set up a custom eeprom type, please double-check the parameters. | 23 | * If you set up a custom eeprom type, please double-check the parameters. |
15 | * Especially page_size needs extra care, as you risk data loss if your value | 24 | * Especially page_size needs extra care, as you risk data loss if your value |
16 | * is bigger than what the chip actually supports! | 25 | * is bigger than what the chip actually supports! |
26 | * | ||
27 | * An example in pseudo code for a setup() callback: | ||
28 | * | ||
29 | * void get_mac_addr(struct memory_accessor *mem_acc, void *context) | ||
30 | * { | ||
31 | * u8 *mac_addr = ethernet_pdata->mac_addr; | ||
32 | * off_t offset = context; | ||
33 | * | ||
34 | * // Read MAC addr from EEPROM | ||
35 | * if (mem_acc->read(mem_acc, mac_addr, offset, ETH_ALEN) == ETH_ALEN) | ||
36 | * pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr); | ||
37 | * } | ||
38 | * | ||
39 | * This function pointer and context can now be set up in at24_platform_data. | ||
17 | */ | 40 | */ |
18 | 41 | ||
19 | struct at24_platform_data { | 42 | struct at24_platform_data { |
diff --git a/include/linux/i2c/tc35876x.h b/include/linux/i2c/tc35876x.h new file mode 100644 index 00000000000..cd6a51c71e7 --- /dev/null +++ b/include/linux/i2c/tc35876x.h | |||
@@ -0,0 +1,11 @@ | |||
1 | |||
2 | #ifndef _TC35876X_H | ||
3 | #define _TC35876X_H | ||
4 | |||
5 | struct tc35876x_platform_data { | ||
6 | int gpio_bridge_reset; | ||
7 | int gpio_panel_bl_en; | ||
8 | int gpio_panel_vadd; | ||
9 | }; | ||
10 | |||
11 | #endif /* _TC35876X_H */ | ||
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 8b9904abd9c..2463b610033 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -712,6 +712,9 @@ struct twl4030_platform_data { | |||
712 | struct regulator_init_data *vaux1; | 712 | struct regulator_init_data *vaux1; |
713 | struct regulator_init_data *vaux2; | 713 | struct regulator_init_data *vaux2; |
714 | struct regulator_init_data *vaux3; | 714 | struct regulator_init_data *vaux3; |
715 | struct regulator_init_data *vdd1; | ||
716 | struct regulator_init_data *vdd2; | ||
717 | struct regulator_init_data *vdd3; | ||
715 | /* TWL4030 LDO regulators */ | 718 | /* TWL4030 LDO regulators */ |
716 | struct regulator_init_data *vpll1; | 719 | struct regulator_init_data *vpll1; |
717 | struct regulator_init_data *vpll2; | 720 | struct regulator_init_data *vpll2; |
@@ -720,8 +723,6 @@ struct twl4030_platform_data { | |||
720 | struct regulator_init_data *vsim; | 723 | struct regulator_init_data *vsim; |
721 | struct regulator_init_data *vaux4; | 724 | struct regulator_init_data *vaux4; |
722 | struct regulator_init_data *vio; | 725 | struct regulator_init_data *vio; |
723 | struct regulator_init_data *vdd1; | ||
724 | struct regulator_init_data *vdd2; | ||
725 | struct regulator_init_data *vintana1; | 726 | struct regulator_init_data *vintana1; |
726 | struct regulator_init_data *vintana2; | 727 | struct regulator_init_data *vintana2; |
727 | struct regulator_init_data *vintdig; | 728 | struct regulator_init_data *vintdig; |
@@ -733,6 +734,8 @@ struct twl4030_platform_data { | |||
733 | struct regulator_init_data *vcxio; | 734 | struct regulator_init_data *vcxio; |
734 | struct regulator_init_data *vusb; | 735 | struct regulator_init_data *vusb; |
735 | struct regulator_init_data *clk32kg; | 736 | struct regulator_init_data *clk32kg; |
737 | struct regulator_init_data *v1v8; | ||
738 | struct regulator_init_data *v2v1; | ||
736 | /* TWL6025 LDO regulators */ | 739 | /* TWL6025 LDO regulators */ |
737 | struct regulator_init_data *ldo1; | 740 | struct regulator_init_data *ldo1; |
738 | struct regulator_init_data *ldo2; | 741 | struct regulator_init_data *ldo2; |
@@ -749,6 +752,13 @@ struct twl4030_platform_data { | |||
749 | struct regulator_init_data *vio6025; | 752 | struct regulator_init_data *vio6025; |
750 | }; | 753 | }; |
751 | 754 | ||
755 | struct twl_regulator_driver_data { | ||
756 | int (*set_voltage)(void *data, int target_uV); | ||
757 | int (*get_voltage)(void *data); | ||
758 | void *data; | ||
759 | unsigned long features; | ||
760 | }; | ||
761 | |||
752 | /*----------------------------------------------------------------------*/ | 762 | /*----------------------------------------------------------------------*/ |
753 | 763 | ||
754 | int twl4030_sih_setup(struct device *dev, int module, int irq_base); | 764 | int twl4030_sih_setup(struct device *dev, int module, int irq_base); |