diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2013-02-12 22:05:42 -0500 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2013-02-13 17:54:22 -0500 |
commit | f73f6232af9131f7b6fc6e377267e4a441727eb3 (patch) | |
tree | 67282c916730b43330c345f1e16ee29bb0b474b7 /include | |
parent | 027fcd50500fd87847891d5c2f341c1f002de3e8 (diff) |
extcon: max8997: Consolidate duplicate code for checking ADC/CHG cable type
This patch make max8997_muic_get_cable_type() function to remove
duplicate code for checking ADC/Charger cable type because almost
internal function need to read adc/chg_type value of MUIC register.
Also, remove *_detach() function, extcon-max8997 driver treat
attach/detach operation of cable in max8997_*_handler() function.
Lastly, this patch move defined constant in header file(include/
linux/mfd/max8997.h, max8997-private.h) because defined constant
is only used in the 'extcon-max8997.c'.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/max8997-private.h | 9 | ||||
-rw-r--r-- | include/linux/mfd/max8997.h | 15 |
2 files changed, 0 insertions, 24 deletions
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h index cd37a92ccba9..fb465dfbb59e 100644 --- a/include/linux/mfd/max8997-private.h +++ b/include/linux/mfd/max8997-private.h | |||
@@ -258,15 +258,6 @@ enum max8997_muic_reg { | |||
258 | #define CONTROL3_BTLDSET_MASK (0x3 << CONTROL3_BTLDSET_SHIFT) | 258 | #define CONTROL3_BTLDSET_MASK (0x3 << CONTROL3_BTLDSET_SHIFT) |
259 | #define CONTROL3_ADCDBSET_MASK (0x3 << CONTROL3_ADCDBSET_SHIFT) | 259 | #define CONTROL3_ADCDBSET_MASK (0x3 << CONTROL3_ADCDBSET_SHIFT) |
260 | 260 | ||
261 | #define MAX8997_ADC_GROUND 0x00 | ||
262 | #define MAX8997_ADC_MHL 0x01 | ||
263 | #define MAX8997_ADC_JIG_USB_1 0x18 | ||
264 | #define MAX8997_ADC_JIG_USB_2 0x19 | ||
265 | #define MAX8997_ADC_DESKDOCK 0x1a | ||
266 | #define MAX8997_ADC_JIG_UART 0x1c | ||
267 | #define MAX8997_ADC_CARDOCK 0x1d | ||
268 | #define MAX8997_ADC_OPEN 0x1f | ||
269 | |||
270 | enum max8997_haptic_reg { | 261 | enum max8997_haptic_reg { |
271 | MAX8997_HAPTIC_REG_GENERAL = 0x00, | 262 | MAX8997_HAPTIC_REG_GENERAL = 0x00, |
272 | MAX8997_HAPTIC_REG_CONF1 = 0x01, | 263 | MAX8997_HAPTIC_REG_CONF1 = 0x01, |
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h index 1d4a4fe6ac33..65f8d6a3a608 100644 --- a/include/linux/mfd/max8997.h +++ b/include/linux/mfd/max8997.h | |||
@@ -78,21 +78,6 @@ struct max8997_regulator_data { | |||
78 | struct device_node *reg_node; | 78 | struct device_node *reg_node; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | enum max8997_muic_usb_type { | ||
82 | MAX8997_USB_HOST, | ||
83 | MAX8997_USB_DEVICE, | ||
84 | }; | ||
85 | |||
86 | enum max8997_muic_charger_type { | ||
87 | MAX8997_CHARGER_TYPE_NONE = 0, | ||
88 | MAX8997_CHARGER_TYPE_USB, | ||
89 | MAX8997_CHARGER_TYPE_DOWNSTREAM_PORT, | ||
90 | MAX8997_CHARGER_TYPE_DEDICATED_CHG, | ||
91 | MAX8997_CHARGER_TYPE_500MA, | ||
92 | MAX8997_CHARGER_TYPE_1A, | ||
93 | MAX8997_CHARGER_TYPE_DEAD_BATTERY = 7, | ||
94 | }; | ||
95 | |||
96 | struct max8997_muic_reg_data { | 81 | struct max8997_muic_reg_data { |
97 | u8 addr; | 82 | u8 addr; |
98 | u8 data; | 83 | u8 data; |