summaryrefslogtreecommitdiff
path: root/drivers/extcon/Kconfig
AgeCommit message (Collapse)AuthorFilesLines
2018-03-22extcon: axp288: Set USB role where necessaryHans de Goede1-1/+2
The AXP288 BC1.2 charger detection / extcon code may seem like a strange place to add code to control the USB role-switch on devices with an AXP288, but there are 2 reasons to do this inside the axp288 extcon code: 1) On many devices the USB role is controlled by ACPI AML code, but the AML code only switches between the host and none roles, because of Windows not really using device mode. To make device mode work we need to toggle between the none/device roles based on Vbus presence, and the axp288 extcon gets interrupts on Vbus insertion / removal. 2) In order for our BC1.2 charger detection to work properly the role mux must be properly set to device mode before we do the detection. Also note the Kconfig help-text / obsolete depends on USB_PHY which are remnants from older never upstreamed code also controlling the mux from the axp288 extcon code. This commit also adds code to get notifications from the INT3496 extcon device, which is used on some devices to notify the kernel about id-pin changes instead of them being handled through AML code. This fixes: -Device mode not working on most CHT devices with an AXP288 -Host mode not working on devices with an INT3496 ACPI device -Charger-type misdetection (always SDP) on devices with an INT3496 when the USB role (always) gets initialized as host Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-17extcon: cros-ec: Add extcon-cros-ec driver to support display outBenson Leung1-0/+7
This is the driver for the USB Type C cable detection mechanism built into the ChromeOS Embedded Controller on systems that have USB Type-C ports. At present, this allows for the presence of display out, but in future, it may also be used to notify host and device type cables and the presence of power. Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Chanwoo Choi <cw00.chio@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2017-05-23extcon: qcom-spmi-misc: add dependency on ARCH_QCOMPeter Robinson1-0/+1
Depend on the architecture the device actuall is in, also add dep on the compile test to ensure continued coverage. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2017-04-06extcon: intel-cht-wc: Add Intel Cherry Trail Whiskey Cove PMIC extcon driverHans de Goede1-0/+7
Add a driver for charger detection / control on the Intel Cherrytrail Whiskey Cove PMIC. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2017-03-22extcon: int3496: Add dependency on X86 as it's Intel specificPeter Robinson1-1/+1
Add dependency on X86 so it doesn't show up on other arches and add a option for compile test so it still gets build coverage. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2017-01-09extcon: int3496: Add Intel INT3496 ACPI device extcon driverDavid Cohen1-0/+10
Add an extcon driver for USB OTG ports controlled by an Intel INT3496 ACPI device (e.g. Baytrail, Cherrytrail devices). Signed-off-by: David Cohen <david.a.cohen@intel.com> [hdgoede@redhat.com: Port to current kernel, cleanup, submit upstream] [hdgoede@redhat.com: Add Documentation/extcon/intel-int3496.txt] Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2016-09-13extcon: Add support for qcom SPMI PMIC USB id detection hardwareStephen Boyd1-0/+6
Some Qualcomm PMICs have a misc device that performs USB id pin detection via an interrupt. When the interrupt triggers, we should read the interrupt line to see if it has gone high or low. If the interrupt is low then the ID pin is grounded, and if the interrupt is high then the ID pin is being held high. Cc: Roger Quadros <rogerq@ti.com> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> [cw00.choi: Edited the driver description and added the author information] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2015-12-21extcon: add Maxim MAX3355 driverSergei Shtylyov1-0/+9
Maxim Integrated MAX3355E chip integrates a charge pump and comparators to enable a system with an integrated USB OTG dual-role transceiver to function as an USB OTG dual-role device. In addition to sensing/controlling Vbus, the chip also passes thru the ID signal from the USB OTG connector. On some Renesas boards, this signal is just fed into the SoC thru a GPIO pin -- there's no real OTG controller, only host and gadget USB controllers sharing the same USB bus; however, we'd like to allow host or gadget drivers to be loaded depending on the cable type, hence the need for the MAX3355 extcon driver. The Vbus status signals are also wired to GPIOs (however, we aren't currently interested in them), the OFFVBUS# signal is controlled by the host controllers, there's also the SHDN# signal wired to a GPIO, it should be driven high for the normal operation. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Rob Herring <robh@kernel.org> [cw00.choi: Add the GPIOLIB dependency] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2015-05-19extcon: Allow compile test of GPIO consumers if !GPIOLIBGeert Uytterhoeven1-2/+2
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. If GPIOLIB=n and asm-generic/gpio.h is not used: drivers/extcon/extcon-usb-gpio.c: In function ‘usb_extcon_detect_cable’: drivers/extcon/extcon-usb-gpio.c:63: error: implicit declaration of function ‘gpiod_get_value_cansleep’ drivers/extcon/extcon-usb-gpio.c: In function ‘usb_extcon_probe’: drivers/extcon/extcon-usb-gpio.c:116: error: implicit declaration of function ‘devm_gpiod_get’ drivers/extcon/extcon-usb-gpio.c:116: warning: assignment makes pointer from integer without a cast drivers/extcon/extcon-usb-gpio.c:122: error: implicit declaration of function ‘gpiod_set_debounce’ drivers/extcon/extcon-usb-gpio.c:129: error: implicit declaration of function ‘gpiod_to_irq’ Add the missing #include <linux/gpio/consumer.h> to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2015-05-19extcon: axp288: Add axp288 extcon driver supportRamakrishna Pallala1-0/+7
This patch adds the extcon support for AXP288 PMIC which has the BC1.2 charger detection capability. Additionally it also adds the USB mux switching support b/w SOC and PMIC based on GPIO control. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Acked-by: Lee Jones <lee.jones@linaro.org> [cw00.choi: Modify the log message to keep the consistent log message pattern] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2015-05-19extcon: Add manufactor name of each extcon deviceChanwoo Choi1-7/+7
This patch adds the manufactor name of each extcon device and removes un-necessary comment in Kconfig. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2015-02-24extcon: max77843: Add max77843 MUIC driverJaewon Kim1-0/+10
This patch adds MAX77843 extcon driver to support for MUIC(Micro USB Interface Controller) device by using EXTCON subsystem to handle various external connectors. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2015-02-24extcon: usb-gpio: Introduce gpio usb extcon driverRoger Quadros1-0/+7
This driver observes the USB ID pin connected over a GPIO and updates the USB cable extcon states accordingly. The existing GPIO extcon driver is not suitable for this purpose as it needs to be taught to understand USB cable states and it can't handle more than one cable per instance. For the USB case we need to handle 2 cable states. 1) USB (attach/detach) 2) USB-HOST (attach/detach) This driver can be easily updated in the future to handle VBUS events in case it happens to be available on GPIO for any platform. Signed-off-by: Roger Quadros <rogerq@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-09-22extcon: rt8973a: Add Richtek RT8973A extcon driverChanwoo Choi1-0/+12
This patch add support for Richtek RT8973A which is Micro USB Switch OVP and i2c interface. The RT8973A is a USB port accessory detector and switch that is optimized to protect low voltage system from abnormal high input voltage (up to 28V) and supports high speed USB operation. Also, RT8973A support 'auto-configuration' mode. If auto-configuration mode is enabled, RT8973A would control internal h/w patch for USB D-/D+ switching. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-09-22extcon: sm5502: Add I2C dependency to fix build breakChanwoo Choi1-0/+1
This patch add I2C configuration dependency to fix following build break. If specific kernel build I2C as module, extcon-sm5502 have to depend on I2C configuration. drivers/built-in.o: In function `regmap_smbus_byte_reg_read': regmap-i2c.c:(.text+0x5030a): undefined reference to `i2c_smbus_read_byte_data' drivers/built-in.o: In function `regmap_smbus_byte_reg_write': regmap-i2c.c:(.text+0x50338): undefined reference to `i2c_smbus_write_byte_data' drivers/built-in.o: In function `regmap_smbus_word_reg_read': regmap-i2c.c:(.text+0x50356): undefined reference to `i2c_smbus_read_word_data' drivers/built-in.o: In function `regmap_smbus_word_reg_write': regmap-i2c.c:(.text+0x50384): undefined reference to `i2c_smbus_write_word_data' drivers/built-in.o: In function `regmap_i2c_read': regmap-i2c.c:(.text+0x503cf): undefined reference to `i2c_transfer' drivers/built-in.o: In function `regmap_i2c_gather_write': regmap-i2c.c:(.text+0x50442): undefined reference to `i2c_transfer' drivers/built-in.o: In function `regmap_i2c_write': regmap-i2c.c:(.text+0x50474): undefined reference to `i2c_master_send' drivers/built-in.o: In function `sm5502_muic_i2c_init': extcon-sm5502.c:(.init.text+0x6630): undefined reference to `i2c_register_driver' Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-07-23extcon: sm5502: Add support new SM5502 extcon device driverChanwoo Choi1-0/+10
This patch add new SM5502 MUIC(Micro-USB Interface Controller) device by using EXTCON subsystem. The extcon-sm5502 driver is capable of identifying the type of the external power source and attached accessory. An external power sources, such as Deticated Charger or a standard USB port, are able to charge the battery in the smart phone via the connector. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-06-16extcon: Reorder the sequence of extcon device driver alphabeticallyChanwoo Choi1-14/+14
This patch reorder the sequence of extcon device diver alphabetically to imporbe readability. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-04-23extcon: max14577: Add support for MAX77836Krzysztof Kozlowski1-2/+2
Add support for MAX77836 chipset to the max14577 extcon driver. The MAX77836 MUIC has additional interrupts (VIDRM, ADC1K) so IRQ handling is split up into two functions: max14577_parse_irq() and max77836_parse_irq(). Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Tested-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19extcon: Move OF helper function to extcon core and change function nameChanwoo Choi1-4/+0
This patch move simply OF helper function to extcon core and change function name as following: - of_extcon_get_extcon_dev() -> extcon_get_edev_by_phandle() Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Felipe Balbi <balbi@ti.com>
2014-01-07extcon: max14577: Add extcon-max14577 driver to support MUIC deviceChanwoo Choi1-0/+10
This patch supports Maxim MAX14577 MUIC(Micro USB Interface Controller) device by using EXTCON subsystem to handle various external connectors. The max14577 device uses regmap method for i2c communication and supports irq domain. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2013-08-05extcon: Add an API to get extcon device from dt nodeKishon Vijay Abraham I1-0/+4
Added an API of_extcon_get_extcon_dev() to be used by drivers to get extcon device in the case of dt boot (this can be used instead of extcon_get_extcon_dev()). Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-06-18extcon: Palmas Extcon DriverGraeme Gregory1-0/+7
This is the driver for the USB comparator built into the palmas chip. It handles the various USB OTG events that can be generated by cable insertion/removal. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Moiz Sonasath <m-sonasath@ti.com> Signed-off-by: Ruchika Kharwar <ruchika@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: George Cherian <george.cherian@ti.com> [kishon@ti.com: adapted palmas usb driver to use the extcon framework] Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com> 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-04-16Convert selectors of GENERIC_GPIO to GPIOLIBAlexandre Courbot1-1/+1
GENERIC_GPIO is now equivalent to GPIOLIB and features that depended on GENERIC_GPIO can now depend on GPIOLIB to allow removal of this option. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca>
2013-02-12Merge tag 'extcon-arizona-3.9' of ↵Greg Kroah-Hartman1-1/+1
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-07extcon: arizona: Use regulated mode for microphone supply when detectingMark Brown1-1/+1
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-01-25extcon: max77693: Fix bug of build error related to INPUT subsystemChanwoo Choi1-1/+1
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>
2012-09-06extcon: extcon-arizona depends on INPUTRandy Dunlap1-1/+1
extcon-arizona uses input_*() functions so it should depend on INPUT. ERROR: "input_event" [drivers/extcon/extcon-arizona.ko] undefined! ERROR: "input_free_device" [drivers/extcon/extcon-arizona.ko] undefined! ERROR: "input_register_device" [drivers/extcon/extcon-arizona.ko] undefined! ERROR: "input_set_capability" [drivers/extcon/extcon-arizona.ko] undefined! ERROR: "input_allocate_device" [drivers/extcon/extcon-arizona.ko] undefined! ERROR: "input_unregister_device" [drivers/extcon/extcon-arizona.ko] undefined! Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Chanwoo Choi <cw00.choi@samsung.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05extcon: adc_jack: adc-jack driver to support 3.5 pi or simliar devicesanish kumar1-0/+6
External connector devices that decides connection information based on ADC values may use adc-jack device driver. The user simply needs to provide a table of adc range and connection states. Then, extcon framework will automatically notify others. Changes in V1: added Lars-Peter Clausen suggested changes: Using macros to get rid of boiler plate code such as devm_kzalloc and module_platform_driver.Other changes suggested are related to coding guidelines. Changes in V2: Removed some unnecessary checks and changed the way we are un-regitering extcon and freeing the irq while removing. Changes in V3: Renamed the files to comply with extcon naming. Changes in V4: Added the cancel_work_sync during removing of driver. Changes in V5: Added the dependency of IIO in Kconfig. Changes in V6: Some nitpicks related to naming. Changes in this version: V6 patch version patch broke the build: ERROR: "extcon_cable_name" [drivers/extcon/extcon-adc-jack.ko] undefined! Fixed it in this version. Acked-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: anish kumar <anish.singh@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-16Revert "Extcon: adc_jack: adc-jack driver to support 3.5 pi or simliar devices"Greg Kroah-Hartman1-6/+0
This reverts commit 980d7929816236476967218645c30acc022042eb as it breaks the build with the error: ERROR: "extcon_cable_name" [drivers/extcon/extcon-adc-jack.ko] undefined! Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: anish kumar <anish.singh@samsung.com> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-16Extcon: adc_jack: adc-jack driver to support 3.5 pi or simliar devicesanish kumar1-0/+6
External connector devices that decides connection information based on ADC values may use adc-jack device driver. The user simply needs to provide a table of adc range and connection states. Then, extcon framework will automatically notify others. Changes in V1: added Lars-Peter Clausen suggested changes: Using macros to get rid of boiler plate code such as devm_kzalloc and module_platform_driver.Other changes suggested are related to coding guidelines. Changes in V2: Removed some unnecessary checks and changed the way we are un-regitering extcon and freeing the irq while removing. Changes in V3: Renamed the files to comply with extcon naming. Changes in V4: Added the cancel_work_sync during removing of driver. Changes in V5: Added the dependency of IIO in Kconfig. Changes in V6: Some nitpicks related to naming. Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: anish kumar <anish.singh@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-30Merge tag 'mfd-3.6-1' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 Pull MFD bits from Samuel Ortiz: "We have support for a few new drivers: - Samsung s2mps11 - Wolfson Microelectronics wm5102 and wm5110 - Marvell 88PM800 and 88PM805 - TI twl6041 We also have our regular driver improvements: - Device tree and IRQ domain support for STE AB8500 - Regmap and devm_* API conversion for TI tps6586x - Device tree support for Samsung max77686 - devm_* API conversion for STE AB3100 Besides that, quite a lot of fixing and cleanup for mc13xxx, tps65910, tps65090, da9052 and twl-core." Fix up mostly trivial conflicts, with the exception of drivers/usb/host/ehci-omap.c in particular, which had some re-organization of the reset sequence (commit 1a49e2ac9651: "EHCI: centralize controller initialization") that clashed with commit 2761a6394516 ("mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix issues"). In particular, commit 2761a6394516 moved the usb_add_hcd() to the *middle* of the reset sequence, which clashes fairly badly with the reset sequence re-organization (although it could have been done inside the new omap_ehci_init() function). I left that part of commit 2761a6394516 just undone. * tag 'mfd-3.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (110 commits) mfd: Ensure AB8500 platform data is passed through db8500-prcmu to MFD Core mfd: Arizone core should select MFD_CORE mfd: Fix arizona-irq.c build by selecting REGMAP_IRQ mfd: Add debug trace on entering and leaving arizone runtime suspend mfd: Correct tps65090 cell names mfd: Remove gpio support from tps6586x core driver ARM: tegra: defconfig: Enable tps6586x gpio gpio: tps6586x: Add gpio support through platform driver mfd: Cache tps6586x register through regmap mfd: Use regmap for tps6586x register access. mfd: Use devm managed resources for tps6586x input: Add onkey support for 88PM80X PMIC mfd: Add support for twl6041 mfd: Fix twl6040 revision information mfd: Matches should be NULL when populate anatop child devices input: ab8500-ponkey: Create AB8500 domain IRQ mapping mfd: Add missing out of memory check for pcf50633 Documentation: Describe the AB8500 Device Tree bindings mfd: Add tps65910 32-kHz-crystal-input init mfd: Drop modifying mc13xxx driver's id_table in probe ...
2012-07-17extcon: MAX77693: Add extcon-max77693 driver to support Maxim MAX77693 MUIC ↵Chanwoo Choi1-0/+10
device This patch support Maxim MAX77693 MUIC device by using EXTCON Subsystem to handle various external connector. The extcon-max77693 use regmap method for i2c communication and support irq domain instead of previous method of irq base. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09extcon: Add support irq domain for MAX8997 muicChanwoo Choi1-1/+1
This patch add support irq domain for Maxim MAX8997 muic instead of irq_base in platform data and max8997 driver private data are instead. It is tested on TRATS board. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-06-27Extcon: Arizona: Add driver for Wolfson Arizona class devicesMark Brown1-0/+8
Most Wolfson Arizona class audio hub CODECs include a flexible ultra low power accessory detection subsystem. This driver exposes initial support for this subsystem via the Extcon framework, implementing support for ultra low power detection of headphone and headset with the ability to detect the polarity of a headset. The functionality of the devices is much richer and more flexible than the current driver, future patches will extend the features of the driver to more fully exploit this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10Extcon: add MAX8997 extcon driverChanwoo Choi1-0/+8
This patch add extcon-max8997 driver to support the muic feature of Maxim max8997 by using Extcon framework. The extcon-max8997 driver is implemented based on 'drivers/misc/ max8997-muic.c' and then use Extcon interface instead of callback function in struct max8997_muic_platform_data to notify cable state of notifee which want to know always newly cable state when external connector(e.g., USB, TA, JIG) is attached or detached. v1 - Use Extcon interface to notify cable state of notifee instead of callback function when external connector is attached or detached. - Bug fix of getting platform_data for irq_base value. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-20Extcon: support generic GPIO extcon driverMyungJoo Ham1-0/+7
The generic GPIO extcon driver (an external connector device based on GPIO control) and imported from Android kernel. switch: switch class and GPIO drivers. (splitted) Author: Mike Lockwood <lockwood@android.com> switch: gpio: Don't call request_irq with interrupts disabled Author: Arve Hjønnevåg <arve@android.com> switch_gpio: Add missing #include <linux/interrupt.h> Author: Mike Lockwood <lockwood@android.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> -- Changed from v7: - Style updates mentioned by Stephen Boyd and Mark Brown Changed from v5: - Splitted at v5 from the main extcon patch. - Added debounce time for irq handlers. - Use request_any_context_irq instead of request_irq - User needs to specify irq flags for GPIO interrupts (was fixed to IRQF_TRIGGER_LOW before) - Use module_platform_driver(). Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-20Extcon (external connector): import Android's switch class and modify.MyungJoo Ham1-0/+17
External connector class (extcon) is based on and an extension of Android kernel's switch class located at linux/drivers/switch/. This patch provides the before-extension switch class moved to the location where the extcon will be located (linux/drivers/extcon/) and updates to handle class properly. The before-extension class, switch class of Android kernel, commits imported are: switch: switch class and GPIO drivers. (splitted) Author: Mike Lockwood <lockwood@android.com> switch: Use device_create instead of device_create_drvdata. Author: Arve Hjønnevåg <arve@android.com> In this patch, upon the commits of Android kernel, we have added: - Relocated and renamed for extcon. - Comments, module name, and author information are updated - Code clean for successing patches - Bugfix: enabling write access without write functions - Class/device/sysfs create/remove handling - Added comments about uevents - Format changes for extcon_dev_register() to have a parent dev. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> -- Changes from v7 - Compiler error fixed when it is compiled as a module. - Removed out-of-date Kconfig entry Changes from v6 - Updated comment/strings - Revised "Android-compatible" mode. * Automatically activated if CONFIG_ANDROID && !CONFIG_ANDROID_SWITCH * Creates /sys/class/switch/*, which is a copy of /sys/class/extcon/* Changes from v5 - Split the patch - Style fixes - "Android-compatible" mode is enabled by Kconfig option. Changes from v2 - Updated name_show - Sysfs entries are handled by class itself. - Updated the method to add/remove devices for the class - Comments on uevent send - Able to become a module - Compatible with Android platform Changes from RFC - Renamed to extcon (external connector) from multistate switch - Added a seperated directory (drivers/extcon) - Added kerneldoc comments - Removed unused variables from extcon_gpio.c - Added ABI Documentation. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>