Commit c2275d2f authored by Chanwoo Choi's avatar Chanwoo Choi Committed by Greg Kroah-Hartman

extcon: Fix up 80 column coding style issues

This patch fix 80 column coding sytle issues by using checkpatch script.

Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: default avatarMyungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 30399bbf
...@@ -769,7 +769,8 @@ static void arizona_micd_detect(struct work_struct *work) ...@@ -769,7 +769,8 @@ static void arizona_micd_detect(struct work_struct *work)
for (i = 0; i < 10 && !(val & 0x7fc); i++) { for (i = 0; i < 10 && !(val & 0x7fc); i++) {
ret = regmap_read(arizona->regmap, ARIZONA_MIC_DETECT_3, &val); ret = regmap_read(arizona->regmap, ARIZONA_MIC_DETECT_3, &val);
if (ret != 0) { if (ret != 0) {
dev_err(arizona->dev, "Failed to read MICDET: %d\n", ret); dev_err(arizona->dev,
"Failed to read MICDET: %d\n", ret);
mutex_unlock(&info->lock); mutex_unlock(&info->lock);
return; return;
} }
...@@ -777,7 +778,8 @@ static void arizona_micd_detect(struct work_struct *work) ...@@ -777,7 +778,8 @@ static void arizona_micd_detect(struct work_struct *work)
dev_dbg(arizona->dev, "MICDET: %x\n", val); dev_dbg(arizona->dev, "MICDET: %x\n", val);
if (!(val & ARIZONA_MICD_VALID)) { if (!(val & ARIZONA_MICD_VALID)) {
dev_warn(arizona->dev, "Microphone detection state invalid\n"); dev_warn(arizona->dev,
"Microphone detection state invalid\n");
mutex_unlock(&info->lock); mutex_unlock(&info->lock);
return; return;
} }
...@@ -973,10 +975,13 @@ static irqreturn_t arizona_jackdet(int irq, void *data) ...@@ -973,10 +975,13 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
&info->hpdet_work, &info->hpdet_work,
msecs_to_jiffies(HPDET_DEBOUNCE)); msecs_to_jiffies(HPDET_DEBOUNCE));
if (cancelled_mic) if (cancelled_mic) {
int micd_timeout = info->micd_timeout;
queue_delayed_work(system_power_efficient_wq, queue_delayed_work(system_power_efficient_wq,
&info->micd_timeout_work, &info->micd_timeout_work,
msecs_to_jiffies(info->micd_timeout)); msecs_to_jiffies(micd_timeout));
}
goto out; goto out;
} }
......
...@@ -452,7 +452,8 @@ int extcon_register_interest(struct extcon_specific_cable_nb *obj, ...@@ -452,7 +452,8 @@ int extcon_register_interest(struct extcon_specific_cable_nb *obj,
if (!obj->edev) if (!obj->edev)
return -ENODEV; return -ENODEV;
obj->cable_index = extcon_find_cable_index(obj->edev, cable_name); obj->cable_index = extcon_find_cable_index(obj->edev,
cable_name);
if (obj->cable_index < 0) if (obj->cable_index < 0)
return obj->cable_index; return obj->cable_index;
...@@ -460,7 +461,8 @@ int extcon_register_interest(struct extcon_specific_cable_nb *obj, ...@@ -460,7 +461,8 @@ int extcon_register_interest(struct extcon_specific_cable_nb *obj,
obj->internal_nb.notifier_call = _call_per_cable; obj->internal_nb.notifier_call = _call_per_cable;
return raw_notifier_chain_register(&obj->edev->nh, &obj->internal_nb); return raw_notifier_chain_register(&obj->edev->nh,
&obj->internal_nb);
} else { } else {
struct class_dev_iter iter; struct class_dev_iter iter;
struct extcon_dev *extd; struct extcon_dev *extd;
......
...@@ -189,14 +189,17 @@ enum max77693_muic_acc_type { ...@@ -189,14 +189,17 @@ enum max77693_muic_acc_type {
/* The below accessories have same ADC value so ADCLow and /* The below accessories have same ADC value so ADCLow and
ADC1K bit is used to separate specific accessory */ ADC1K bit is used to separate specific accessory */
MAX77693_MUIC_GND_USB_OTG = 0x100, /* ADC:0x0, VBVolot:0, ADCLow:0, ADC1K:0 */ /* ADC|VBVolot|ADCLow|ADC1K| */
MAX77693_MUIC_GND_USB_OTG_VB = 0x104, /* ADC:0x0, VBVolot:1, ADCLow:0, ADC1K:0 */ MAX77693_MUIC_GND_USB_OTG = 0x100, /* 0x0| 0| 0| 0| */
MAX77693_MUIC_GND_AV_CABLE_LOAD = 0x102,/* ADC:0x0, VBVolot:0, ADCLow:1, ADC1K:0 */ MAX77693_MUIC_GND_USB_OTG_VB = 0x104, /* 0x0| 1| 0| 0| */
MAX77693_MUIC_GND_MHL = 0x103, /* ADC:0x0, VBVolot:0, ADCLow:1, ADC1K:1 */ MAX77693_MUIC_GND_AV_CABLE_LOAD = 0x102,/* 0x0| 0| 1| 0| */
MAX77693_MUIC_GND_MHL_VB = 0x107, /* ADC:0x0, VBVolot:1, ADCLow:1, ADC1K:1 */ MAX77693_MUIC_GND_MHL = 0x103, /* 0x0| 0| 1| 1| */
MAX77693_MUIC_GND_MHL_VB = 0x107, /* 0x0| 1| 1| 1| */
}; };
/* MAX77693 MUIC device support below list of accessories(external connector) */ /*
* MAX77693 MUIC device support below list of accessories(external connector)
*/
enum { enum {
EXTCON_CABLE_USB = 0, EXTCON_CABLE_USB = 0,
EXTCON_CABLE_USB_HOST, EXTCON_CABLE_USB_HOST,
...@@ -395,12 +398,12 @@ static int max77693_muic_get_cable_type(struct max77693_muic_info *info, ...@@ -395,12 +398,12 @@ static int max77693_muic_get_cable_type(struct max77693_muic_info *info,
vbvolt >>= STATUS2_VBVOLT_SHIFT; vbvolt >>= STATUS2_VBVOLT_SHIFT;
/** /**
* [0x1][VBVolt][ADCLow][ADC1K] * [0x1|VBVolt|ADCLow|ADC1K]
* [0x1 0 0 0 ] : USB_OTG * [0x1| 0| 0| 0] USB_OTG
* [0x1 1 0 0 ] : USB_OTG_VB * [0x1| 1| 0| 0] USB_OTG_VB
* [0x1 0 1 0 ] : Audio Video Cable with load * [0x1| 0| 1| 0] Audio Video cable with load
* [0x1 0 1 1 ] : MHL without charging connector * [0x1| 0| 1| 1] MHL without charging cable
* [0x1 1 1 1 ] : MHL with charging connector * [0x1| 1| 1| 1] MHL with charging cable
*/ */
cable_type = ((0x1 << 8) cable_type = ((0x1 << 8)
| (vbvolt << 2) | (vbvolt << 2)
...@@ -815,19 +818,21 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) ...@@ -815,19 +818,21 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info)
case MAX77693_MUIC_GND_MHL_VB: case MAX77693_MUIC_GND_MHL_VB:
/* /*
* MHL cable with MHL_TA(USB/TA) cable * MHL cable with MHL_TA(USB/TA) cable
* - MHL cable include two port(HDMI line and separate micro- * - MHL cable include two port(HDMI line and separate
* usb port. When the target connect MHL cable, extcon driver * micro-usb port. When the target connect MHL cable,
* check whether MHL_TA(USB/TA) cable is connected. If MHL_TA * extcon driver check whether MHL_TA(USB/TA) cable is
* cable is connected, extcon driver notify state to notifiee * connected. If MHL_TA cable is connected, extcon
* for charging battery. * driver notify state to notifiee for charging battery.
* *
* Features of 'MHL_TA(USB/TA) with MHL cable' * Features of 'MHL_TA(USB/TA) with MHL cable'
* - Support MHL * - Support MHL
* - Support charging through micro-usb port without data connection * - Support charging through micro-usb port without
* data connection
*/ */
extcon_set_cable_state(info->edev, "MHL_TA", attached); extcon_set_cable_state(info->edev, "MHL_TA", attached);
if (!cable_attached) if (!cable_attached)
extcon_set_cable_state(info->edev, "MHL", cable_attached); extcon_set_cable_state(info->edev,
"MHL", cable_attached);
break; break;
} }
...@@ -839,47 +844,51 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) ...@@ -839,47 +844,51 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info)
case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */
/* /*
* Dock-Audio device with USB/TA cable * Dock-Audio device with USB/TA cable
* - Dock device include two port(Dock-Audio and micro-usb * - Dock device include two port(Dock-Audio and micro-
* port). When the target connect Dock-Audio device, extcon * usb port). When the target connect Dock-Audio device,
* driver check whether USB/TA cable is connected. If USB/TA * extcon driver check whether USB/TA cable is connected
* cable is connected, extcon driver notify state to notifiee * or not. If USB/TA cable is connected, extcon driver
* for charging battery. * notify state to notifiee for charging battery.
* *
* Features of 'USB/TA cable with Dock-Audio device' * Features of 'USB/TA cable with Dock-Audio device'
* - Support external output feature of audio. * - Support external output feature of audio.
* - Support charging through micro-usb port without data * - Support charging through micro-usb port without
* connection. * data connection.
*/ */
extcon_set_cable_state(info->edev, "USB", attached); extcon_set_cable_state(info->edev, "USB", attached);
if (!cable_attached) if (!cable_attached)
extcon_set_cable_state(info->edev, "Dock-Audio", cable_attached); extcon_set_cable_state(info->edev, "Dock-Audio",
cable_attached);
break; break;
case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */
/* /*
* Dock-Smart device with USB/TA cable * Dock-Smart device with USB/TA cable
* - Dock-Desk device include three type of cable which * - Dock-Desk device include three type of cable which
* are HDMI, USB for mouse/keyboard and micro-usb port * are HDMI, USB for mouse/keyboard and micro-usb port
* for USB/TA cable. Dock-Smart device need always exteranl * for USB/TA cable. Dock-Smart device need always
* power supply(USB/TA cable through micro-usb cable). Dock- * exteranl power supply(USB/TA cable through micro-usb
* Smart device support screen output of target to separate * cable). Dock-Smart device support screen output of
* monitor and mouse/keyboard for desktop mode. * target to separate monitor and mouse/keyboard for
* desktop mode.
* *
* Features of 'USB/TA cable with Dock-Smart device' * Features of 'USB/TA cable with Dock-Smart device'
* - Support MHL * - Support MHL
* - Support external output feature of audio * - Support external output feature of audio
* - Support charging through micro-usb port without data * - Support charging through micro-usb port without
* connection if TA cable is connected to target. * data connection if TA cable is connected to target.
* - Support charging and data connection through micro-usb port * - Support charging and data connection through micro-
* if USB cable is connected between target and host * usb port if USB cable is connected between target
* device. * and host device
* - Support OTG device (Mouse/Keyboard) * - Support OTG device (Mouse/Keyboard)
*/ */
ret = max77693_muic_set_path(info, info->path_usb, attached); ret = max77693_muic_set_path(info, info->path_usb,
attached);
if (ret < 0) if (ret < 0)
return ret; return ret;
extcon_set_cable_state(info->edev, "Dock-Smart", attached); extcon_set_cable_state(info->edev, "Dock-Smart",
attached);
extcon_set_cable_state(info->edev, "MHL", attached); extcon_set_cable_state(info->edev, "MHL", attached);
break; break;
...@@ -889,25 +898,28 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) ...@@ -889,25 +898,28 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info)
switch (chg_type) { switch (chg_type) {
case MAX77693_CHARGER_TYPE_NONE: case MAX77693_CHARGER_TYPE_NONE:
/* /*
* When MHL(with USB/TA cable) or Dock-Audio with USB/TA cable * When MHL(with USB/TA cable) or Dock-Audio with USB/TA
* is attached, muic device happen below two interrupt. * cable is attached, muic device happen below two irq.
* - 'MAX77693_MUIC_IRQ_INT1_ADC' for detecting MHL/Dock-Audio. * - 'MAX77693_MUIC_IRQ_INT1_ADC' for detecting
* - 'MAX77693_MUIC_IRQ_INT2_CHGTYP' for detecting USB/TA cable * MHL/Dock-Audio.
* connected to MHL or Dock-Audio. * - 'MAX77693_MUIC_IRQ_INT2_CHGTYP' for detecting
* Always, happen eariler MAX77693_MUIC_IRQ_INT1_ADC interrupt * USB/TA cable connected to MHL or Dock-Audio.
* than MAX77693_MUIC_IRQ_INT2_CHGTYP interrupt. * Always, happen eariler MAX77693_MUIC_IRQ_INT1_ADC
* irq than MAX77693_MUIC_IRQ_INT2_CHGTYP irq.
* *
* If user attach MHL (with USB/TA cable and immediately detach * If user attach MHL (with USB/TA cable and immediately
* MHL with USB/TA cable before MAX77693_MUIC_IRQ_INT2_CHGTYP * detach MHL with USB/TA cable before MAX77693_MUIC_IRQ
* interrupt is happened, USB/TA cable remain connected state to * _INT2_CHGTYP irq is happened, USB/TA cable remain
* target. But USB/TA cable isn't connected to target. The user * connected state to target. But USB/TA cable isn't
* be face with unusual action. So, driver should check this * connected to target. The user be face with unusual
* situation in spite of, that previous charger type is N/A. * action. So, driver should check this situation in
* spite of, that previous charger type is N/A.
*/ */
break; break;
case MAX77693_CHARGER_TYPE_USB: case MAX77693_CHARGER_TYPE_USB:
/* Only USB cable, PATH:AP_USB */ /* Only USB cable, PATH:AP_USB */
ret = max77693_muic_set_path(info, info->path_usb, attached); ret = max77693_muic_set_path(info, info->path_usb,
attached);
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -1214,7 +1226,8 @@ static int max77693_muic_probe(struct platform_device *pdev) ...@@ -1214,7 +1226,8 @@ static int max77693_muic_probe(struct platform_device *pdev)
} }
if (pdata->muic_data) { if (pdata->muic_data) {
struct max77693_muic_platform_data *muic_pdata = pdata->muic_data; struct max77693_muic_platform_data *muic_pdata
= pdata->muic_data;
/* /*
* Default usb/uart path whether UART/USB or AUX_UART/AUX_USB * Default usb/uart path whether UART/USB or AUX_UART/AUX_USB
......
...@@ -426,7 +426,8 @@ static int max8997_muic_adc_handler(struct max8997_muic_info *info) ...@@ -426,7 +426,8 @@ static int max8997_muic_adc_handler(struct max8997_muic_info *info)
break; break;
case MAX8997_MUIC_ADC_FACTORY_MODE_USB_OFF: case MAX8997_MUIC_ADC_FACTORY_MODE_USB_OFF:
case MAX8997_MUIC_ADC_FACTORY_MODE_USB_ON: case MAX8997_MUIC_ADC_FACTORY_MODE_USB_ON:
ret = max8997_muic_handle_usb(info, MAX8997_USB_DEVICE, attached); ret = max8997_muic_handle_usb(info,
MAX8997_USB_DEVICE, attached);
if (ret < 0) if (ret < 0)
return ret; return ret;
break; break;
...@@ -504,7 +505,8 @@ static int max8997_muic_chg_handler(struct max8997_muic_info *info) ...@@ -504,7 +505,8 @@ static int max8997_muic_chg_handler(struct max8997_muic_info *info)
} }
break; break;
case MAX8997_CHARGER_TYPE_DOWNSTREAM_PORT: case MAX8997_CHARGER_TYPE_DOWNSTREAM_PORT:
extcon_set_cable_state(info->edev, "Charge-downstream", attached); extcon_set_cable_state(info->edev,
"Charge-downstream", attached);
break; break;
case MAX8997_CHARGER_TYPE_DEDICATED_CHG: case MAX8997_CHARGER_TYPE_DEDICATED_CHG:
extcon_set_cable_state(info->edev, "TA", attached); extcon_set_cable_state(info->edev, "TA", attached);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment