diff options
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-adc-jack.c | 1 | ||||
-rw-r--r-- | drivers/extcon/extcon-arizona.c | 1 | ||||
-rw-r--r-- | drivers/extcon/extcon-class.c | 14 | ||||
-rw-r--r-- | drivers/extcon/extcon-gpio.c | 1 | ||||
-rw-r--r-- | drivers/extcon/extcon-max14577.c | 3 | ||||
-rw-r--r-- | drivers/extcon/extcon-max77693.c | 13 | ||||
-rw-r--r-- | drivers/extcon/extcon-max8997.c | 1 | ||||
-rw-r--r-- | drivers/extcon/extcon-palmas.c | 1 |
8 files changed, 17 insertions, 18 deletions
diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c index d860229e4de1..5d7ab577fba9 100644 --- a/drivers/extcon/extcon-adc-jack.c +++ b/drivers/extcon/extcon-adc-jack.c @@ -182,7 +182,6 @@ static struct platform_driver adc_jack_driver = { .remove = adc_jack_remove, .driver = { .name = "adc-jack", - .owner = THIS_MODULE, }, }; diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index ba51588cc000..63f01c42aed4 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -1469,7 +1469,6 @@ static int arizona_extcon_remove(struct platform_device *pdev) static struct platform_driver arizona_extcon_driver = { .driver = { .name = "arizona-extcon", - .owner = THIS_MODULE, }, .probe = arizona_extcon_probe, .remove = arizona_extcon_remove, diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 4c2f2c543bb7..043dcd9946c9 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c @@ -29,6 +29,7 @@ #include <linux/fs.h> #include <linux/err.h> #include <linux/extcon.h> +#include <linux/of.h> #include <linux/slab.h> #include <linux/sysfs.h> #include <linux/of.h> @@ -997,13 +998,16 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) return ERR_PTR(-ENODEV); } - edev = extcon_get_extcon_dev(node->name); - if (!edev) { - dev_err(dev, "unable to get extcon device : %s\n", node->name); - return ERR_PTR(-ENODEV); + mutex_lock(&extcon_dev_list_lock); + list_for_each_entry(edev, &extcon_dev_list, entry) { + if (edev->dev.parent && edev->dev.parent->of_node == node) { + mutex_unlock(&extcon_dev_list_lock); + return edev; + } } + mutex_unlock(&extcon_dev_list_lock); - return edev; + return ERR_PTR(-EPROBE_DEFER); } #else struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c index 72f19a37fd01..7af33fc433cd 100644 --- a/drivers/extcon/extcon-gpio.c +++ b/drivers/extcon/extcon-gpio.c @@ -181,7 +181,6 @@ static struct platform_driver gpio_extcon_driver = { .remove = gpio_extcon_remove, .driver = { .name = "extcon-gpio", - .owner = THIS_MODULE, .pm = &gpio_extcon_pm_ops, }, }; diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index 7309743d0da1..c1bf0cf747b0 100644 --- a/drivers/extcon/extcon-max14577.c +++ b/drivers/extcon/extcon-max14577.c @@ -1,7 +1,7 @@ /* * extcon-max14577.c - MAX14577/77836 extcon driver to support MUIC * - * Copyright (C) 2013,2014 Samsung Electrnoics + * Copyright (C) 2013,2014 Samsung Electronics * Chanwoo Choi <cw00.choi@samsung.com> * Krzysztof Kozlowski <k.kozlowski@samsung.com> * @@ -807,7 +807,6 @@ MODULE_DEVICE_TABLE(platform, max14577_muic_id); static struct platform_driver max14577_muic_driver = { .driver = { .name = "max14577-muic", - .owner = THIS_MODULE, }, .probe = max14577_muic_probe, .remove = max14577_muic_remove, diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 490e27475bac..740a14d35072 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c @@ -232,7 +232,7 @@ static const char *max77693_extcon_cable[] = { [EXTCON_CABLE_JIG_USB_ON] = "JIG-USB-ON", [EXTCON_CABLE_JIG_USB_OFF] = "JIG-USB-OFF", [EXTCON_CABLE_JIG_UART_OFF] = "JIG-UART-OFF", - [EXTCON_CABLE_JIG_UART_ON] = "Dock-Car", + [EXTCON_CABLE_JIG_UART_ON] = "JIG-UART-ON", [EXTCON_CABLE_DOCK_SMART] = "Dock-Smart", [EXTCON_CABLE_DOCK_DESK] = "Dock-Desk", [EXTCON_CABLE_DOCK_AUDIO] = "Dock-Audio", @@ -532,9 +532,6 @@ static int max77693_muic_dock_handler(struct max77693_muic_info *info, extcon_set_cable_state(info->edev, "Dock-Smart", attached); extcon_set_cable_state(info->edev, "MHL", attached); goto out; - case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* Dock-Car */ - strcpy(dock_name, "Dock-Car"); - break; case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ strcpy(dock_name, "Dock-Desk"); break; @@ -669,6 +666,11 @@ static int max77693_muic_jig_handler(struct max77693_muic_info *info, strcpy(cable_name, "JIG-UART-OFF"); path = CONTROL1_SW_UART; break; + case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* ADC_JIG_UART_ON */ + /* PATH:AP_UART */ + strcpy(cable_name, "JIG-UART-ON"); + path = CONTROL1_SW_UART; + break; default: dev_err(info->dev, "failed to detect %s jig cable\n", attached ? "attached" : "detached"); @@ -708,13 +710,13 @@ static int max77693_muic_adc_handler(struct max77693_muic_info *info) case MAX77693_MUIC_ADC_FACTORY_MODE_USB_OFF: case MAX77693_MUIC_ADC_FACTORY_MODE_USB_ON: case MAX77693_MUIC_ADC_FACTORY_MODE_UART_OFF: + case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* JIG */ ret = max77693_muic_jig_handler(info, cable_type, attached); if (ret < 0) return ret; break; case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ - case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* Dock-Car */ case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ /* @@ -1301,7 +1303,6 @@ static int max77693_muic_remove(struct platform_device *pdev) static struct platform_driver max77693_muic_driver = { .driver = { .name = DEV_NAME, - .owner = THIS_MODULE, }, .probe = max77693_muic_probe, .remove = max77693_muic_remove, diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index 75e501c98005..fc1678fa95c4 100644 --- a/drivers/extcon/extcon-max8997.c +++ b/drivers/extcon/extcon-max8997.c @@ -792,7 +792,6 @@ static int max8997_muic_remove(struct platform_device *pdev) static struct platform_driver max8997_muic_driver = { .driver = { .name = DEV_NAME, - .owner = THIS_MODULE, }, .probe = max8997_muic_probe, .remove = max8997_muic_remove, diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c index 230e1220ce48..11c6757b6c40 100644 --- a/drivers/extcon/extcon-palmas.c +++ b/drivers/extcon/extcon-palmas.c @@ -291,7 +291,6 @@ static struct platform_driver palmas_usb_driver = { .driver = { .name = "palmas-usb", .of_match_table = of_palmas_match_tbl, - .owner = THIS_MODULE, .pm = &palmas_pm_ops, }, }; |