diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-14 19:43:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-14 19:43:47 -0500 |
commit | 6ae840e7cc4be0be3aa40d9f67c35c75cfc67d83 (patch) | |
tree | 9c83c87a8670ef678d95f8d6f76a07f24a09a49f /drivers/extcon | |
parent | e6b5be2be4e30037eb551e0ed09dd97bd00d85d3 (diff) | |
parent | 91905b6f4afe51e23a3f58df93e4cdc5e49cf40c (diff) |
Merge tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here's the big char/misc driver update for 3.19-rc1
Lots of little things all over the place in different drivers, and a
new subsystem, "coresight" has been added. Full details are in the
shortlog"
* tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (73 commits)
parport: parport_pc, do not remove parent devices early
spmi: Remove shutdown/suspend/resume kernel-doc
carma-fpga-program: drop videobuf dependency
carma-fpga: drop videobuf dependency
carma-fpga-program.c: fix compile errors
i8k: Fix temperature bug handling in i8k_get_temp()
cxl: Name interrupts in /proc/interrupt
CXL: Return error to PSL if IRQ demultiplexing fails & print clearer warning
coresight-replicator: remove .owner field for driver
coresight: fixed comments in coresight.h
coresight: fix typo in comment in coresight-priv.h
coresight: bindings for coresight drivers
coresight: Adding ABI documentation
w1: support auto-load of w1_bq27000 module.
w1: avoid potential u16 overflow
cn: verify msg->len before making callback
mei: export fw status registers through sysfs
mei: read and print all six FW status registers
mei: txe: add cherrytrail device id
mei: kill cached host and me csr values
...
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-class.c | 14 | ||||
-rw-r--r-- | drivers/extcon/extcon-max14577.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-max77693.c | 12 |
3 files changed, 17 insertions, 11 deletions
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 @@ | |||
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/err.h> | 30 | #include <linux/err.h> |
31 | #include <linux/extcon.h> | 31 | #include <linux/extcon.h> |
32 | #include <linux/of.h> | ||
32 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
33 | #include <linux/sysfs.h> | 34 | #include <linux/sysfs.h> |
34 | #include <linux/of.h> | 35 | #include <linux/of.h> |
@@ -997,13 +998,16 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) | |||
997 | return ERR_PTR(-ENODEV); | 998 | return ERR_PTR(-ENODEV); |
998 | } | 999 | } |
999 | 1000 | ||
1000 | edev = extcon_get_extcon_dev(node->name); | 1001 | mutex_lock(&extcon_dev_list_lock); |
1001 | if (!edev) { | 1002 | list_for_each_entry(edev, &extcon_dev_list, entry) { |
1002 | dev_err(dev, "unable to get extcon device : %s\n", node->name); | 1003 | if (edev->dev.parent && edev->dev.parent->of_node == node) { |
1003 | return ERR_PTR(-ENODEV); | 1004 | mutex_unlock(&extcon_dev_list_lock); |
1005 | return edev; | ||
1006 | } | ||
1004 | } | 1007 | } |
1008 | mutex_unlock(&extcon_dev_list_lock); | ||
1005 | 1009 | ||
1006 | return edev; | 1010 | return ERR_PTR(-EPROBE_DEFER); |
1007 | } | 1011 | } |
1008 | #else | 1012 | #else |
1009 | struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) | 1013 | struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) |
diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index dfc2fd370eb3..c1bf0cf747b0 100644 --- a/drivers/extcon/extcon-max14577.c +++ b/drivers/extcon/extcon-max14577.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * extcon-max14577.c - MAX14577/77836 extcon driver to support MUIC | 2 | * extcon-max14577.c - MAX14577/77836 extcon driver to support MUIC |
3 | * | 3 | * |
4 | * Copyright (C) 2013,2014 Samsung Electrnoics | 4 | * Copyright (C) 2013,2014 Samsung Electronics |
5 | * Chanwoo Choi <cw00.choi@samsung.com> | 5 | * Chanwoo Choi <cw00.choi@samsung.com> |
6 | * Krzysztof Kozlowski <k.kozlowski@samsung.com> | 6 | * Krzysztof Kozlowski <k.kozlowski@samsung.com> |
7 | * | 7 | * |
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 5bf5c5e66f16..740a14d35072 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c | |||
@@ -232,7 +232,7 @@ static const char *max77693_extcon_cable[] = { | |||
232 | [EXTCON_CABLE_JIG_USB_ON] = "JIG-USB-ON", | 232 | [EXTCON_CABLE_JIG_USB_ON] = "JIG-USB-ON", |
233 | [EXTCON_CABLE_JIG_USB_OFF] = "JIG-USB-OFF", | 233 | [EXTCON_CABLE_JIG_USB_OFF] = "JIG-USB-OFF", |
234 | [EXTCON_CABLE_JIG_UART_OFF] = "JIG-UART-OFF", | 234 | [EXTCON_CABLE_JIG_UART_OFF] = "JIG-UART-OFF", |
235 | [EXTCON_CABLE_JIG_UART_ON] = "Dock-Car", | 235 | [EXTCON_CABLE_JIG_UART_ON] = "JIG-UART-ON", |
236 | [EXTCON_CABLE_DOCK_SMART] = "Dock-Smart", | 236 | [EXTCON_CABLE_DOCK_SMART] = "Dock-Smart", |
237 | [EXTCON_CABLE_DOCK_DESK] = "Dock-Desk", | 237 | [EXTCON_CABLE_DOCK_DESK] = "Dock-Desk", |
238 | [EXTCON_CABLE_DOCK_AUDIO] = "Dock-Audio", | 238 | [EXTCON_CABLE_DOCK_AUDIO] = "Dock-Audio", |
@@ -532,9 +532,6 @@ static int max77693_muic_dock_handler(struct max77693_muic_info *info, | |||
532 | extcon_set_cable_state(info->edev, "Dock-Smart", attached); | 532 | extcon_set_cable_state(info->edev, "Dock-Smart", attached); |
533 | extcon_set_cable_state(info->edev, "MHL", attached); | 533 | extcon_set_cable_state(info->edev, "MHL", attached); |
534 | goto out; | 534 | goto out; |
535 | case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* Dock-Car */ | ||
536 | strcpy(dock_name, "Dock-Car"); | ||
537 | break; | ||
538 | case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ | 535 | case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ |
539 | strcpy(dock_name, "Dock-Desk"); | 536 | strcpy(dock_name, "Dock-Desk"); |
540 | break; | 537 | break; |
@@ -669,6 +666,11 @@ static int max77693_muic_jig_handler(struct max77693_muic_info *info, | |||
669 | strcpy(cable_name, "JIG-UART-OFF"); | 666 | strcpy(cable_name, "JIG-UART-OFF"); |
670 | path = CONTROL1_SW_UART; | 667 | path = CONTROL1_SW_UART; |
671 | break; | 668 | break; |
669 | case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* ADC_JIG_UART_ON */ | ||
670 | /* PATH:AP_UART */ | ||
671 | strcpy(cable_name, "JIG-UART-ON"); | ||
672 | path = CONTROL1_SW_UART; | ||
673 | break; | ||
672 | default: | 674 | default: |
673 | dev_err(info->dev, "failed to detect %s jig cable\n", | 675 | dev_err(info->dev, "failed to detect %s jig cable\n", |
674 | attached ? "attached" : "detached"); | 676 | attached ? "attached" : "detached"); |
@@ -708,13 +710,13 @@ static int max77693_muic_adc_handler(struct max77693_muic_info *info) | |||
708 | case MAX77693_MUIC_ADC_FACTORY_MODE_USB_OFF: | 710 | case MAX77693_MUIC_ADC_FACTORY_MODE_USB_OFF: |
709 | case MAX77693_MUIC_ADC_FACTORY_MODE_USB_ON: | 711 | case MAX77693_MUIC_ADC_FACTORY_MODE_USB_ON: |
710 | case MAX77693_MUIC_ADC_FACTORY_MODE_UART_OFF: | 712 | case MAX77693_MUIC_ADC_FACTORY_MODE_UART_OFF: |
713 | case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: | ||
711 | /* JIG */ | 714 | /* JIG */ |
712 | ret = max77693_muic_jig_handler(info, cable_type, attached); | 715 | ret = max77693_muic_jig_handler(info, cable_type, attached); |
713 | if (ret < 0) | 716 | if (ret < 0) |
714 | return ret; | 717 | return ret; |
715 | break; | 718 | break; |
716 | case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ | 719 | case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ |
717 | case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* Dock-Car */ | ||
718 | case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ | 720 | case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ |
719 | case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ | 721 | case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ |
720 | /* | 722 | /* |