aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonggeun Kim <dg77.kim@samsung.com>2011-11-24 04:12:17 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-08 18:37:32 -0500
commit2439d9714e8f4f106c8965e093f9892cfb347d76 (patch)
treed594f7aea4bc07844969a37b8ea44698e23d49f5
parent55ee29d5fff18b6485543bea10620daf9e29555c (diff)
mfd: Add platform data for MAX8997 MUIC driver
Currently, MAX8997 device does not support MUIC function of it. To add MAX8997 MUIC driver, header file should be updated. Signed-off-by: Donggeun Kim <dg77.kim@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--include/linux/mfd/max8997.h58
1 files changed, 57 insertions, 1 deletions
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h
index 0bbd13dbe336..49d2a0bfd7fe 100644
--- a/include/linux/mfd/max8997.h
+++ b/include/linux/mfd/max8997.h
@@ -77,6 +77,60 @@ struct max8997_regulator_data {
77 struct regulator_init_data *initdata; 77 struct regulator_init_data *initdata;
78}; 78};
79 79
80enum max8997_muic_usb_type {
81 MAX8997_USB_HOST,
82 MAX8997_USB_DEVICE,
83};
84
85enum max8997_muic_charger_type {
86 MAX8997_CHARGER_TYPE_NONE = 0,
87 MAX8997_CHARGER_TYPE_USB,
88 MAX8997_CHARGER_TYPE_DOWNSTREAM_PORT,
89 MAX8997_CHARGER_TYPE_DEDICATED_CHG,
90 MAX8997_CHARGER_TYPE_500MA,
91 MAX8997_CHARGER_TYPE_1A,
92 MAX8997_CHARGER_TYPE_DEAD_BATTERY = 7,
93};
94
95struct max8997_muic_reg_data {
96 u8 addr;
97 u8 data;
98};
99
100/**
101 * struct max8997_muic_platform_data
102 * @usb_callback: callback function for USB
103 * inform callee of USB type (HOST or DEVICE)
104 * and attached state(true or false)
105 * @charger_callback: callback function for charger
106 * inform callee of charger_type
107 * and attached state(true or false)
108 * @deskdock_callback: callback function for desk dock
109 * inform callee of attached state(true or false)
110 * @cardock_callback: callback function for car dock
111 * inform callee of attached state(true or false)
112 * @mhl_callback: callback function for MHL (Mobile High-definition Link)
113 * inform callee of attached state(true or false)
114 * @uart_callback: callback function for JIG UART
115 * inform callee of attached state(true or false)
116 * @init_data: array of max8997_muic_reg_data
117 * used for initializing registers of MAX8997 MUIC device
118 * @num_init_data: array size of init_data
119 */
120struct max8997_muic_platform_data {
121 void (*usb_callback)(enum max8997_muic_usb_type usb_type,
122 bool attached);
123 void (*charger_callback)(bool attached,
124 enum max8997_muic_charger_type charger_type);
125 void (*deskdock_callback) (bool attached);
126 void (*cardock_callback) (bool attached);
127 void (*mhl_callback) (bool attached);
128 void (*uart_callback) (bool attached);
129
130 struct max8997_muic_reg_data *init_data;
131 int num_init_data;
132};
133
80struct max8997_platform_data { 134struct max8997_platform_data {
81 /* IRQ */ 135 /* IRQ */
82 int irq_base; 136 int irq_base;
@@ -113,7 +167,9 @@ struct max8997_platform_data {
113 /* charge Full Timeout */ 167 /* charge Full Timeout */
114 int timeout; /* 0 (no timeout), 5, 6, 7 hours */ 168 int timeout; /* 0 (no timeout), 5, 6, 7 hours */
115 169
116 /* MUIC: Not implemented */ 170 /* ---- MUIC ---- */
171 struct max8997_muic_platform_data *muic_pdata;
172
117 /* HAPTIC: Not implemented */ 173 /* HAPTIC: Not implemented */
118 /* RTC: Not implemented */ 174 /* RTC: Not implemented */
119 /* Flash: Not implemented */ 175 /* Flash: Not implemented */