summaryrefslogtreecommitdiffstats
path: root/drivers/extcon
AgeCommit message (Collapse)Author
2013-02-21Merge tag 'char-misc-3.9-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver patches from Greg Kroah-Hartman: "Here's the big char/misc driver patches for 3.9-rc1. Nothing major here, just lots of different driver updates (mei, hyperv, ipack, extcon, vmci, etc.). All of these have been in the linux-next tree for a while." * tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (209 commits) w1: w1_therm: Add force-pullup option for "broken" sensors w1: ds2482: Added 1-Wire pull-up support to the driver vme: add missing put_device() after device_register() fails extcon: max8997: Use workqueue to check cable state after completing boot of platform extcon: max8997: Set default UART/USB path on probe extcon: max8997: Consolidate duplicate code for checking ADC/CHG cable type extcon: max8997: Set default of ADC debounce time during initialization extcon: max8997: Remove duplicate code related to set H/W line path extcon: max8997: Move defined constant to header file extcon: max77693: Make max77693_extcon_cable static extcon: max8997: Remove unreachable code extcon: max8997: Make max8997_extcon_cable static extcon: max77693: Remove unnecessary goto statement to improve readability extcon: max77693: Convert to devm_input_allocate_device() extcon: gpio: Rename filename of extcon-gpio.c according to kernel naming style CREDITS: update email and address of Harald Hoyer extcon: arizona: Use MICDET for final microphone identification extcon: arizona: Always take the first HPDET reading as the final one extcon: arizona: Clear _trig_sts bits after jack detection extcon: arizona: Don't HPDET magic when headphones are enabled ...
2013-02-14extcon: max8997: Use workqueue to check cable state after completing boot of ↵Chanwoo Choi
platform This patch use delayed workqueue to check cable state after a certain time. If extcon-max8997 driver check cable state during booting of platform, this couldn't send the correct notification of cable state to extcon consumer. Alwasys, this driver should check cable state after the completion of platform initialization Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-02-14extcon: max8997: Set default UART/USB path on probeChanwoo Choi
This patch set default H/W line path according to platfomr data. The MAX8997 MUIC device can possibly set UART/USB or UART_AUX /USB_AUX to internal H/W line path of MUIC device. Namely, only one H/W line is used for two operation. For example, if H/W line path of MAX8997 device set UART/USB, micro usb cable is connected to AP(Application Processor) and if H/W line path set UART_AUX/USB_AUX, micro usb cable is connected to CP(Coprocessor). Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-02-14extcon: max8997: Consolidate duplicate code for checking ADC/CHG cable typeChanwoo Choi
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>
2013-02-14extcon: max8997: Set default of ADC debounce time during initializationChanwoo Choi
This patch set default of ADC Debounce Time(25ms) during probe step. Also, can possible change ADC Debounce Time according to H/W situation by using max8997_set_adc_debounce_time() Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-02-14extcon: max8997: Remove duplicate code related to set H/W line pathChanwoo Choi
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-02-14extcon: max8997: Move defined constant to header fileChanwoo Choi
This patch move defined constants to header file(max77693-private.h) because of mask/unmask selectively interrupt of MUIC device according to attribute of H/W board. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-02-14extcon: max77693: Make max77693_extcon_cable staticSachin Kamat
'max77693_extcon_cable' is used only in this file. Hence make it static. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-02-14extcon: max8997: Remove unreachable codeSachin Kamat
'break' after 'return' is never executed and hence can be deleted. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-02-14extcon: max8997: Make max8997_extcon_cable staticSachin Kamat
'max8997_extcon_cable' is used only in this file. Hence make it static. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-02-13extcon: max77693: Remove unnecessary goto statement to improve readabilityChanwoo Choi
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-13extcon: max77693: Convert to devm_input_allocate_device()Chanwoo Choi
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-13extcon: gpio: Rename filename of extcon-gpio.c according to kernel naming styleChanwoo Choi
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-11Merge tag 'extcon-arizona-3.9' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into char-misc-next Mark writes: extcon: arizona: Updates for v3.9 More updates for v3.9, a mix of fixes for the code that's already there and a few new features.
2013-02-11extcon: arizona: Use MICDET for final microphone identificationMark Brown
When using HPDET to identify the accessory still run MICDET before we report a microphone in order to ensure that the accessory identified is compatible with the MICDET detection ranges after having confirmed that the device is not using a headphone. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-11extcon: arizona: Always take the first HPDET reading as the final oneMark Brown
This should always be the most accurate reading for supported accessory configurations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-11extcon: arizona: Clear _trig_sts bits after jack detectionCharles Keepax
It is important to clear the wake trigger status bits otherwise DCVDD will be held high independent of the state of the LDOENA line. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-11extcon: arizona: Don't HPDET magic when headphones are enabledMark Brown
The magic is already done as part of enabling the headphone output so does not need to be done when the headphone outputs are enabled. We hold the DAPM lock so the headphone status can't be changed underneath us. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-11extcon: arizona: Add some debounce time before starting HPDET identificationMark Brown
The HPDET identification method does not have the same natural debounce built into it that the standard MICDET method does so add some extra on top of what the jack detection does in hardware to make sure we get a robust result. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-11extcon: arizona: Remove extra jack flip incrementCharles Keepax
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-07extcon: arizona: Use regulated mode for microphone supply when detectingMark Brown
When starting microphone detection some headsets should be exposed to the fully regulated microphone bias in order to ensure that they behave in an optimal fashion. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-07extcon: arizona: Support additional configuration of microphone detectionMark Brown
Allow systems to tune detection rate and debounce suitably for their mechanical parameters. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-06iio: Update iio_channel_get API to use consumer device pointer as argumentGuenter Roeck
For iio_channel_get to work with OF based configurations, it needs the consumer device pointer instead of the consumer device name as argument. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Anton Vorontsov <anton@enomsg.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-25extcon: max77693: Fix bug of build error related to INPUT subsystemChanwoo Choi
This patch fix build error of following log: drivers/built-in.o: In function `max77693_muic_remove': extcon-max77693.c:(.text+0x664853): undefined reference to `input_unregister_device' drivers/built-in.o: In function `max77693_muic_probe': extcon-max77693.c:(.text+0x664971): undefined reference to `input_allocate_device' extcon-max77693.c:(.text+0x6649c1): undefined reference to `input_set_capability' extcon-max77693.c:(.text+0x6649d6): undefined reference to `input_set_capability' extcon-max77693.c:(.text+0x6649eb): undefined reference to `input_set_capability' extcon-max77693.c:(.text+0x664a00): undefined reference to `input_set_capability' extcon-max77693.c:(.text+0x664a15): undefined reference to `input_set_capability' extcon-max77693.c:(.text+0x664a20): undefined reference to `input_register_device' drivers/built-in.o: In function `max77693_muic_adc_handler': extcon-max77693.c:(.text+0x665318): undefined reference to `input_event' extcon-max77693.c:(.text+0x66532a): undefined reference to `input_event' make[1]: *** [vmlinux] Error 1 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-23extcon: arizona: Remove duplicate rate configurationMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-23extcon: arizona: Retry failed HP measurementsMark Brown
We now have mechanisms in place to allow retries so let's use them rather than guessing. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-23extcon: arizona: Disable debouce for accessory removal detectionMark Brown
Ensure we clamp as quickly as possible after removal by disabling the debounce while there is an accessory present. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-15extcon: arizona: Support direct microphone measurement via HPDETMark Brown
With some GPIO control it is possible to detect microphones in a wider range of configurations by directly measuring the microphone impedance when the HPDET method cannot distinguish between the behaviour of the two grounds. Allow a GPIO to be provided in platform data and use it to implement this behaviour. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: arizona: Support HPDET based accessory identificationMark Brown
The accessory detection functionality in Arizona devices is flexible and supports several system designs in addition to the default one implemented by the existing driver. One such design uses the HPDET feature to determine what kind of accessory is present by comparing measurements taken with the two headphone grounds available on the device, implement that if selected by platform data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: Simple code motion supporting future work.Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: arizona: Enable basic headphone identificationMark Brown
Use the headphone detection to identify if the accessory is a headphone or line load. There are two different revisions of the IP with different register layouts, support both. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: arizona: Support use of GPIO5 as an input to jack detectionMark Brown
Some system designs provide an input on GPIO5 which in conjunction with the jack detection feature indicates the presence of an accessory. Support such systems, using the microphone clamp feature to minimise wakeups of the processor. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: arizona: Use microphone clamp function if availableMark Brown
Newer Arizona devices include a microphone clamp function which is tied to jack detect. Activate this feature when present in order to ensure best performance of the subsystem. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: arizona: Allow configuration of MICBIAS rise timeMark Brown
Allow configuration of the rise time for MICBIAS via platform data, the delay required depends on things like the external component selection. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: arizona: Only set GPIO if it has been requestedMark Brown
The micd_pol GPIO is only requested if we've specified one greater than 0 so apply the same test before we set it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: arizona: Remove duplicate mic ramp configurationMark Brown
Now this is configured by platform data remove the defualt configuration the driver had. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: arizona: Convert to devm_input_allocate_device()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: max77693: Add support Dock-Smart device for desktop modeChanwoo Choi
This patch support the detection of Dock-Smart device which include three type of port(HDMI, USB for mouse/keyboard and Micro-USB for USB/TA cable).The Dock-Smart device need always exteranl power supply (USB/TA cable through micro-usb cable). Dock-Smart device support screen output of target to separate monitor and mouse/keyboard for desktop mode. Features of 'Dock-Smart device' - Support HDMI - Support external output feature of audio - Support charging through micro-usb port without data connection if TA cable is connected to target. - Support charging and data connection through micro-usb port if USB cable is connected between target and host device. - Support OTG device (Mouse/Keyboard) Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: max77693: Fix bug when detecting MHL/Dock-Audio with USB/TA cableChanwoo Choi
This patch fix bug that muic couldn't detect MHL/Dock-Audio with USB/TA cable on exception situation. I explain detail case on following: When MHL(with USB/TA cable) or Dock-Audio with USB/TA cable is attached, the MUIC device happen following two interrupt. - 'MAX77693_MUIC_IRQ_INT1_ADC' for detecting MHL/Dock-Audio. - 'MAX77693_MUIC_IRQ_INT2_CHGTYP' for detecting USB/TA cable connected to MHL/Dock-Audio. Always, happen eariler MAX77693_MUIC_IRQ_INT1_ADC interrupt than MAX77693_MUIC_IRQ_INT2_CHGTYP interrupt. If user attach MHL with USB/TA cable and immediately detach MHL with USB/TA cable before MAX77693_MUIC_IRQ_INT2_CHGTYP interrupt is happened, USB/TA connected to MHL cable remain connected state to target. But USB/TA connected to MHL cable isn't connected to target. user be faced with unusual action. So, driver should check this situation in spite of that, previous charger type is N/A. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: max77693: Set default uart/usb path by using platform dataChanwoo Choi
This patch determine default uart/usb path by using platform data. The MAX77693 MUIC device can possibliy set USB/UART/AUDIO/USB_AUX /UART_AUX to internal h/w path of MUIC device. So, drvier should determine default uart/usb path. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: max8997/max77693: Support IRQF_NO_SUSPEND flag for interruptChanwoo Choi
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: max77693: Check the state/type of cable after boot completedChanwoo Choi
This patch check the state/type of cable after completing the initialization of platform and notify platform of cable state/type through extcon. If extcon provider driver notify the state/type of cable before completing platform boot, this uevent is unused and ignored. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: max77693: Add support dock device and buttonsChanwoo Choi
This patch support detection of dock device with extcon and buttons of dock device for playing music with input subsystem. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: max77693: Add support jig cableChanwoo Choi
This patch detect several kinds of JIG cable according to ADC value and set the hardware line path according to type of JIG cable(JIG-USB-ON /JIG-USB-OFF/JIG-UART-OFF). Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: max77693: Add support MHL_TA cable for charging batteryChanwoo Choi
This patch support MHL_TA cable for charging battery. The MHL_TA cable include MHL with TA cable or MHL with micro USB cable. When MHL with TA/USB cable is attached, extcon-max77693 driver detect two interrupt for handling precise operation according to each cable (MHL and TA/USB cable). Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-01-15extcon: max77693: Remove duplicate code by making functionChanwoo Choi
This patch make max77693-muic_get_cable_type() function to remove duplicate code because almost internal function need to read adc/adc1k/adclow/chg_type value of MUIC register. Also, this patch add description of internal function move field constant of muic device from extcon-max77693 driver to max77693 header file because of it is needed for masking some interrupt through platform data. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2012-11-27Merge tag 'pull_req_20121122' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/mzx/extcon into char-misc-next MyungJoo writes: "extcon pull request targetting Linux 3.8 for Greg KH on 2012.11.22 This is based on Linux 3.7 rc6"
2012-11-26extcon: remove use of __devexit_pBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26extcon: remove use of __devinitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26extcon: remove use of __devexitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>