diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-28 02:11:14 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-28 02:11:14 -0400 |
| commit | 16eb2bfc65ef86d3ac6420d50ddc2c48f0023cee (patch) | |
| tree | 50f0163f007a90b0c8fcb2e5651cfbb5d6ed0596 | |
| parent | 7b9d1f0b7a18b86db0ac1de628fa91c0994fefbe (diff) | |
| parent | d3b503140e15d302bc55cf5a90226f0f85860bc2 (diff) | |
Merge tag 'extcon-next-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
Chanwoo writes:
Update extcon for v3.17
This patchset add new extcon provider driver and fix minor issue of extcon driver.
Detailed description for patchset:
1. Add new Silicon-Mitus SM5502 MUIC (Micro-USB Interface Controller) device
- extcon-sm5502 driver is capable of identifying the type of the external power
source and attached accessory. And external power sources, such as Dedicated
charger or a standard USB port, are able to charge the battery in the smart
phone via the connector.
2. Fix minor issue of extcon driver
- extcon-arizona driver
- extcon-palmas driver
- Remove unnecessary OOM messages for all extcon device drivers
3. Fix minor issue of extcon core
- Re-order the sequence of extcon device driver in Kconfig/Makefile alphabitically
- Set parent device of extcon device automatically using devm_extcon_dev_allocate()
4. Fix MAX77693 driver
- This patchset has dependency on MFD/Regulator/Extcon. So, Lee Jones
(MFD Maintainer) created Immutable branch between MFD and Extcon due
for v3.17 merge-window and then I merged this patchset from MFD git repo[1]
to Extcon git repo.
[1] git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
(branch: ib-mfd-extcon-regulator)
| -rw-r--r-- | Documentation/devicetree/bindings/extcon/extcon-sm5502.txt | 23 | ||||
| -rw-r--r-- | drivers/extcon/Kconfig | 38 | ||||
| -rw-r--r-- | drivers/extcon/Makefile | 7 | ||||
| -rw-r--r-- | drivers/extcon/extcon-adc-jack.c | 1 | ||||
| -rw-r--r-- | drivers/extcon/extcon-arizona.c | 74 | ||||
| -rw-r--r-- | drivers/extcon/extcon-class.c | 2 | ||||
| -rw-r--r-- | drivers/extcon/extcon-gpio.c | 1 | ||||
| -rw-r--r-- | drivers/extcon/extcon-max14577.c | 5 | ||||
| -rw-r--r-- | drivers/extcon/extcon-max77693.c | 41 | ||||
| -rw-r--r-- | drivers/extcon/extcon-max8997.c | 5 | ||||
| -rw-r--r-- | drivers/extcon/extcon-palmas.c | 3 | ||||
| -rw-r--r-- | drivers/extcon/extcon-sm5502.c | 724 | ||||
| -rw-r--r-- | drivers/mfd/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/mfd/Makefile | 2 | ||||
| -rw-r--r-- | drivers/mfd/max77693-irq.c | 336 | ||||
| -rw-r--r-- | drivers/mfd/max77693.c | 210 | ||||
| -rw-r--r-- | drivers/regulator/max77693.c | 12 | ||||
| -rw-r--r-- | include/linux/extcon/sm5502.h | 287 | ||||
| -rw-r--r-- | include/linux/mfd/arizona/pdata.h | 3 | ||||
| -rw-r--r-- | include/linux/mfd/max77693-private.h | 54 |
20 files changed, 1335 insertions, 494 deletions
diff --git a/Documentation/devicetree/bindings/extcon/extcon-sm5502.txt b/Documentation/devicetree/bindings/extcon/extcon-sm5502.txt new file mode 100644 index 000000000000..4ecda224955f --- /dev/null +++ b/Documentation/devicetree/bindings/extcon/extcon-sm5502.txt | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | |||
| 2 | * SM5502 MUIC (Micro-USB Interface Controller) device | ||
| 3 | |||
| 4 | The Silicon Mitus SM5502 is a MUIC (Micro-USB Interface Controller) device | ||
| 5 | which can detect the state of external accessory when external accessory is | ||
| 6 | attached or detached and button is pressed or released. It is interfaced to | ||
| 7 | the host controller using an I2C interface. | ||
| 8 | |||
| 9 | Required properties: | ||
| 10 | - compatible: Should be "siliconmitus,sm5502-muic" | ||
| 11 | - reg: Specifies the I2C slave address of the MUIC block. It should be 0x25 | ||
| 12 | - interrupt-parent: Specifies the phandle of the interrupt controller to which | ||
| 13 | the interrupts from sm5502 are delivered to. | ||
| 14 | - interrupts: Interrupt specifiers for detection interrupt sources. | ||
| 15 | |||
| 16 | Example: | ||
| 17 | |||
| 18 | sm5502@25 { | ||
| 19 | compatible = "siliconmitus,sm5502-muic"; | ||
| 20 | interrupt-parent = <&gpx1>; | ||
| 21 | interrupts = <5 0>; | ||
| 22 | reg = <0x25>; | ||
| 23 | }; | ||
diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig index aebde489c291..6f2f4727de2c 100644 --- a/drivers/extcon/Kconfig +++ b/drivers/extcon/Kconfig | |||
| @@ -14,6 +14,20 @@ if EXTCON | |||
| 14 | 14 | ||
| 15 | comment "Extcon Device Drivers" | 15 | comment "Extcon Device Drivers" |
| 16 | 16 | ||
| 17 | config EXTCON_ADC_JACK | ||
| 18 | tristate "ADC Jack extcon support" | ||
| 19 | depends on IIO | ||
| 20 | help | ||
| 21 | Say Y here to enable extcon device driver based on ADC values. | ||
| 22 | |||
| 23 | config EXTCON_ARIZONA | ||
| 24 | tristate "Wolfson Arizona EXTCON support" | ||
| 25 | depends on MFD_ARIZONA && INPUT && SND_SOC | ||
| 26 | help | ||
| 27 | Say Y here to enable support for external accessory detection | ||
| 28 | with Wolfson Arizona devices. These are audio CODECs with | ||
| 29 | advanced audio accessory detection support. | ||
| 30 | |||
| 17 | config EXTCON_GPIO | 31 | config EXTCON_GPIO |
| 18 | tristate "GPIO extcon support" | 32 | tristate "GPIO extcon support" |
| 19 | depends on GPIOLIB | 33 | depends on GPIOLIB |
| @@ -21,12 +35,6 @@ config EXTCON_GPIO | |||
| 21 | Say Y here to enable GPIO based extcon support. Note that GPIO | 35 | Say Y here to enable GPIO based extcon support. Note that GPIO |
| 22 | extcon supports single state per extcon instance. | 36 | extcon supports single state per extcon instance. |
| 23 | 37 | ||
| 24 | config EXTCON_ADC_JACK | ||
| 25 | tristate "ADC Jack extcon support" | ||
| 26 | depends on IIO | ||
| 27 | help | ||
| 28 | Say Y here to enable extcon device driver based on ADC values. | ||
| 29 | |||
| 30 | config EXTCON_MAX14577 | 38 | config EXTCON_MAX14577 |
| 31 | tristate "MAX14577/77836 EXTCON Support" | 39 | tristate "MAX14577/77836 EXTCON Support" |
| 32 | depends on MFD_MAX14577 | 40 | depends on MFD_MAX14577 |
| @@ -55,14 +63,6 @@ config EXTCON_MAX8997 | |||
| 55 | Maxim MAX8997 PMIC. The MAX8997 MUIC is a USB port accessory | 63 | Maxim MAX8997 PMIC. The MAX8997 MUIC is a USB port accessory |
| 56 | detector and switch. | 64 | detector and switch. |
| 57 | 65 | ||
| 58 | config EXTCON_ARIZONA | ||
| 59 | tristate "Wolfson Arizona EXTCON support" | ||
| 60 | depends on MFD_ARIZONA && INPUT && SND_SOC | ||
| 61 | help | ||
| 62 | Say Y here to enable support for external accessory detection | ||
| 63 | with Wolfson Arizona devices. These are audio CODECs with | ||
| 64 | advanced audio accessory detection support. | ||
| 65 | |||
| 66 | config EXTCON_PALMAS | 66 | config EXTCON_PALMAS |
| 67 | tristate "Palmas USB EXTCON support" | 67 | tristate "Palmas USB EXTCON support" |
| 68 | depends on MFD_PALMAS | 68 | depends on MFD_PALMAS |
| @@ -70,4 +70,14 @@ config EXTCON_PALMAS | |||
| 70 | Say Y here to enable support for USB peripheral and USB host | 70 | Say Y here to enable support for USB peripheral and USB host |
| 71 | detection by palmas usb. | 71 | detection by palmas usb. |
| 72 | 72 | ||
| 73 | config EXTCON_SM5502 | ||
| 74 | tristate "SM5502 EXTCON support" | ||
| 75 | select IRQ_DOMAIN | ||
| 76 | select REGMAP_I2C | ||
| 77 | select REGMAP_IRQ | ||
| 78 | help | ||
| 79 | If you say yes here you get support for the MUIC device of | ||
| 80 | Silicon Mitus SM5502. The SM5502 is a USB port accessory | ||
| 81 | detector and switch. | ||
| 82 | |||
| 73 | endif # MULTISTATE_SWITCH | 83 | endif # MULTISTATE_SWITCH |
diff --git a/drivers/extcon/Makefile b/drivers/extcon/Makefile index bf7861ec0906..b38546eb522a 100644 --- a/drivers/extcon/Makefile +++ b/drivers/extcon/Makefile | |||
| @@ -1,12 +1,13 @@ | |||
| 1 | # | 1 | |
| 2 | # Makefile for external connector class (extcon) devices | 2 | # Makefile for external connector class (extcon) devices |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-$(CONFIG_EXTCON) += extcon-class.o | 5 | obj-$(CONFIG_EXTCON) += extcon-class.o |
| 6 | obj-$(CONFIG_EXTCON_GPIO) += extcon-gpio.o | ||
| 7 | obj-$(CONFIG_EXTCON_ADC_JACK) += extcon-adc-jack.o | 6 | obj-$(CONFIG_EXTCON_ADC_JACK) += extcon-adc-jack.o |
| 7 | obj-$(CONFIG_EXTCON_ARIZONA) += extcon-arizona.o | ||
| 8 | obj-$(CONFIG_EXTCON_GPIO) += extcon-gpio.o | ||
| 8 | obj-$(CONFIG_EXTCON_MAX14577) += extcon-max14577.o | 9 | obj-$(CONFIG_EXTCON_MAX14577) += extcon-max14577.o |
| 9 | obj-$(CONFIG_EXTCON_MAX77693) += extcon-max77693.o | 10 | obj-$(CONFIG_EXTCON_MAX77693) += extcon-max77693.o |
| 10 | obj-$(CONFIG_EXTCON_MAX8997) += extcon-max8997.o | 11 | obj-$(CONFIG_EXTCON_MAX8997) += extcon-max8997.o |
| 11 | obj-$(CONFIG_EXTCON_ARIZONA) += extcon-arizona.o | ||
| 12 | obj-$(CONFIG_EXTCON_PALMAS) += extcon-palmas.o | 12 | obj-$(CONFIG_EXTCON_PALMAS) += extcon-palmas.o |
| 13 | obj-$(CONFIG_EXTCON_SM5502) += extcon-sm5502.o | ||
diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c index e18f95be3733..d860229e4de1 100644 --- a/drivers/extcon/extcon-adc-jack.c +++ b/drivers/extcon/extcon-adc-jack.c | |||
| @@ -112,7 +112,6 @@ static int adc_jack_probe(struct platform_device *pdev) | |||
| 112 | dev_err(&pdev->dev, "failed to allocate extcon device\n"); | 112 | dev_err(&pdev->dev, "failed to allocate extcon device\n"); |
| 113 | return -ENOMEM; | 113 | return -ENOMEM; |
| 114 | } | 114 | } |
| 115 | data->edev->dev.parent = &pdev->dev; | ||
| 116 | data->edev->name = pdata->name; | 115 | data->edev->name = pdata->name; |
| 117 | 116 | ||
| 118 | /* Check the length of array and set num_cables */ | 117 | /* Check the length of array and set num_cables */ |
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 6c84e3d12043..ba51588cc000 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c | |||
| @@ -39,6 +39,11 @@ | |||
| 39 | #define ARIZONA_ACCDET_MODE_HPL 1 | 39 | #define ARIZONA_ACCDET_MODE_HPL 1 |
| 40 | #define ARIZONA_ACCDET_MODE_HPR 2 | 40 | #define ARIZONA_ACCDET_MODE_HPR 2 |
| 41 | 41 | ||
| 42 | #define ARIZONA_MICD_CLAMP_MODE_JDL 0x4 | ||
| 43 | #define ARIZONA_MICD_CLAMP_MODE_JDH 0x5 | ||
| 44 | #define ARIZONA_MICD_CLAMP_MODE_JDL_GP5H 0x9 | ||
| 45 | #define ARIZONA_MICD_CLAMP_MODE_JDH_GP5H 0xb | ||
| 46 | |||
| 42 | #define ARIZONA_HPDET_MAX 10000 | 47 | #define ARIZONA_HPDET_MAX 10000 |
| 43 | 48 | ||
| 44 | #define HPDET_DEBOUNCE 500 | 49 | #define HPDET_DEBOUNCE 500 |
| @@ -324,14 +329,17 @@ static void arizona_stop_mic(struct arizona_extcon_info *info) | |||
| 324 | } | 329 | } |
| 325 | 330 | ||
| 326 | static struct { | 331 | static struct { |
| 332 | unsigned int threshold; | ||
| 327 | unsigned int factor_a; | ||
