summaryrefslogtreecommitdiffstats
path: root/drivers/extcon/Kconfig
Commit message (Collapse)AuthorAgeFilesLines
* extcon: Add LC824206XA microUSB switch driverHans de Goede2024-09-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new driver for the ON Semiconductor LC824206XA microUSB switch and accessory detector chip. ON Semiconductor has an "Advance Information" datasheet available (ENA2222-D.PDF), but no full datasheet. So there is no documentation available for the registers. This driver is based on the register info from the extcon-fsa9285.c driver, from the Lollipop Android sources for the Lenovo Yoga Tablet 2 (Pro) 830 / 1050 / 1380 models. Note despite the name this is actually a driver for the LC824206XA not the FSA9285. This has only been tested on a Lenovo Yoga Tablet 2 Pro 1380 and using the driver on other setups may require additional work. So far this driver is only used on x86/ACPI (non devicetree) devs. Therefor there is no devicetree bindings documentation for this driver's "onnn,enable-miclr-for-dcp" property since this is not used in actual devicetree files and the dt bindings maintainers have requested properties with no actual dt users to _not_ be added to the dt bindings. Link: https://lore.kernel.org/lkml/20240512204019.58121-1-hdegoede@redhat.com/ Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: max8997: select IRQ_DOMAIN instead of depending on itRandy Dunlap2024-05-091-1/+2
| | | | | | | | | | | | | | | | | | | IRQ_DOMAIN is a hidden (not user visible) symbol. Users cannot set it directly thru "make *config", so drivers should select it instead of depending on it if they need it. Relying on it being set for a dependency is risky. Consistently using "select" or "depends on" can also help reduce Kconfig circular dependency issues. Therefore, change EXTCON_MAX8997's use of "depends on" for IRQ_DOMAIN to "select". Link: https://lore.kernel.org/lkml/20240213060028.9744-1-rdunlap@infradead.org/ Fixes: dca1a71e4108 ("extcon: Add support irq domain for MAX8997 muic") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: add Realtek DHC RTD SoC Type-C driverStanley Chang2023-10-061-0/+11
| | | | | | | | | | | This patch adds the extcon driver for Realtek DHC (digital home center) RTD SoCs type-c module. This can be used to detect whether the port is configured as a downstream or upstream facing port. And notify the status of extcon to listeners. Link: https://lore.kernel.org/lkml/20230904051253.23208-2-stanley_chang@realtek.com/ Signed-off-by: Stanley Chang <stanley_chang@realtek.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: cht_wc: add POWER_SUPPLY dependencyArnd Bergmann2023-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | The driver fails to link when CONFIG_POWER_SUPPLY is disabled: x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_psy_get_prop': extcon-intel-cht-wc.c:(.text+0x15ccda7): undefined reference to `power_supply_get_drvdata' x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_pwrsrc_event': extcon-intel-cht-wc.c:(.text+0x15cd3e9): undefined reference to `power_supply_changed' x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_probe': extcon-intel-cht-wc.c:(.text+0x15cd596): undefined reference to `devm_power_supply_register' It should be possible to change the driver to not require this at compile time and still provide other functions, but adding a hard Kconfig dependency does not seem to have any practical downsides and is simpler since the option is normally enabled anyway. Fixes: 66e31186cd2aa ("extcon: intel-cht-wc: Add support for registering a power_supply class-device") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: usbc-tusb320: add USB_ROLE_SWITCH dependencyArnd Bergmann2023-05-291-0/+1
| | | | | | | | | | | | | | | | | | | | When CONFIG_USB_ROLE_SWITCH=m, tusb320 cannot be built-in: ld.lld: error: undefined symbol: fwnode_usb_role_switch_get >>> referenced by extcon-usbc-tusb320.c >>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_probe) in archive vmlinux.a ld.lld: error: undefined symbol: usb_role_switch_set_role >>> referenced by extcon-usbc-tusb320.c >>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_state_update_handler) in archive vmlinux.a Add the appropriate Kconfig dependency to prevent this configuration but still allow the driver to be built-in when USB_ROLE_SWITCH is disabled. Fixes: df101446a402 ("extcon: usbc-tusb320: add usb_role_switch support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: usbc-tusb320: Add USB TYPE-C supportMarek Vasut2022-09-261-1/+1
| | | | | | | | | | | | | | | | The TI TUSB320 seems like a better fit for USB TYPE-C subsystem, which can expose details collected by the TUSB320 in a far more precise way than extcon. Since there are existing users in the kernel and in DT which depend on the extcon interface, keep it for now. Add TYPE-C interface and expose the supported supply current, direction and connector polarity via the TYPE-C interface. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: ptn5150: Add usb role class supportLi Jun2022-05-131-0/+1
| | | | | | | | | | | Some usb controller drivers may not support extcon but use usb role class as it's the preferred approach, so to support usb dual role switch with usb role class, add usb role class consumer support. Signed-off-by: Li Jun <jun.li@nxp.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: sm5502: Add support for SM5703Markuss Broks2022-05-131-1/+1
| | | | | | | | | | | | SM5703 is another MFD from Silicon Mitus which has a very similar MUIC unit to the one in SM5502. The only difference I've noticed is slightly different configuration only enables the interrupts which are exactly the same as on SM5502. If we make use of different interrupts in the future, this can be improved by having a separate struct for SM5703, but the main functionality (detecting cable or OTG adapter) is working properly. Signed-off-by: Markuss Broks <markuss.broks@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: intel-cht-wc: Support devs with Micro-B / USB-2 only Type-C connectorsHans de Goede2022-02-011-0/+2
| | | | | | | | | | | | | | | | | | So far the extcon-intel-cht-wc code has only been tested on devices with a Type-C connector with USB-PD, USB3 (superspeed) and DP-altmode support through a FUSB302 Type-C controller. Some devices with the intel-cht-wc PMIC however come with an USB-micro-B connector, or an USB-2 only Type-C connector without USB-PD. Which device-model we are running on can be identified with the new cht_wc_model intel_soc_pmic field. On models without a Type-C controller the extcon code must control the Vbus 5V boost converter and the USB role switch depending on the detected cable-type. Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* extcon: extcon-axp288: Use P-Unit semaphore lock for register accessesFabio Aiuto2021-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | use low level P-Unit semaphore lock for axp288 register accesses directly and for more than one access a time, to reduce the number of times this semaphore is locked and released which is an expensive operation. i2c-bus to the XPower is shared between the kernel and the SoCs P-Unit. The P-Unit has a semaphore wich the kernel must lock for axp288 register accesses. When the P-Unit semaphore is locked CPU and GPU power states cannot change or the system will freeze. The P-Unit semaphore lock is already managed inside the regmap access logic, but for each access the semaphore is locked and released. So use directly iosf_mbi_(un)block_punit_i2c_access(), we are safe in doing so because nested calls to the same semaphore are turned to nops. Suggested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: sm5502: Add support for SM5504Stephan Gerhold2021-06-211-1/+1
| | | | | | | | | | | | | | | SM5504 is another MUIC from Silicon Mitus that is fairly similar to SM5502. They seem to use the same register set, but: - SM5504 has some additional bits in SM5502_REG_CONTROL - SM5504 has a quite different set of interrupts - SM5504 reports USB OTG as dev_type1 = BIT(0) instead of BIT(7) Overall it's minor and we can support this by defining a separate struct sm5502_type for SM5504. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* ASoC/extcon: arizona: Move arizona jack code to sound/soc/codecs/arizona-jack.cHans de Goede2021-03-181-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The jack handling for arizona codecs is being refactored so that it is done directly by the codec drivers, instead of having an extcon-driver bind to a separate "arizona-extcon" child-device for this. drivers/mfd/arizona-core.c has already been updated to no longer instantiate an "arizona-extcon" child-device for the arizona codecs. This means that the "arizona-extcon" driver is no longer useful (there are no longer any devices for it to bind to). This commit drops the extcon Kconfig / Makefile bits and moves drivers/extcon/extcon-arizona.c to sound/soc/codecs/arizona-jack.c . This is a preparation patch for converting the arizona extcon-driver into a helper library for letting the arizona codec-drivers directly report jack state through the standard sound/soc/soc-jack.c functions. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* extcon: Add driver for TI TUSB320Michael Auchter2020-12-111-0/+8
| | | | | | | | | This patch adds an extcon driver for the TI TUSB320 USB Type-C device. This can be used to detect whether the port is configured as a downstream or upstream facing port. Signed-off-by: Michael Auchter <michael.auchter@ni.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* mfd / platform: cros_ec: Move cros-ec core driver out from MFDEnric Balletbo i Serra2019-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | Now, the ChromeOS EC core driver has nothing related to an MFD device, so move that driver from the MFD subsystem to the platform/chrome subsystem. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Tested-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* extcon: fsa9480: Fix Kconfig warning and build errorsRandy Dunlap2019-06-261-1/+1
| | | | | | | | | | | | | | | Fix Kconfig dependency warning and subsequent build errors caused by the Kconfig entry for EXTCON-FSA9480. It should not select REGMAP_I2C unless I2C is already set/enabled. WARNING: unmet direct dependencies detected for REGMAP_I2C Depends on [n]: I2C [=n] Selected by [y]: - EXTCON_FSA9480 [=y] && EXTCON [=y] && INPUT [=y] Signed-off-by: Randy Dunlap <rdunlap@infradead.org> [cw00.choi: adjust the patch title and remove the long warning messages] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: Add fsa9480 extcon driverTomasz Figa2019-06-221-0/+12
| | | | | | | | | | This patch adds extcon driver for Fairchild Semiconductor FSA9480 microUSB switch. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-211-0/+1
| | | | | | | | | | | | | | Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* extcon: axp288: Add a depends on ACPI to the Kconfig entryYueHaibing2019-04-121-1/+1
| | | | | | | | | | | | | | | | | | As Hans de Goede pointed, using this driver without ACPI makes little sense, so add ACPI dependency to Kconfig entry to fix a build error while CONFIG_ACPI is not set. drivers/extcon/extcon-axp288.c: In function 'axp288_extcon_probe': drivers/extcon/extcon-axp288.c:363:20: error: dereferencing pointer to incomplete type put_device(&adev->dev); Fixes: 0cf064db948a ("extcon: axp288: Convert to use acpi_dev_get_first_match_dev()") Reported-by: Hulk Robot <hulkci@huawei.com> Suggested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: mrfld: Introduce extcon driver for Basin Cove PMICAndy Shevchenko2019-04-051-0/+7
| | | | | | | | | On Intel Merrifield the Basin Cove PMIC provides a feature to detect the USB connection type. This driver utilizes the feature in order to support the USB dual role detection. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: ptn5150: fix COMPILE_TEST dependenciesArnd Bergmann2019-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The PTN5150 dependencies look like they were meant to do the right thing, but they actually should not allow building without I2C for compile testing, as that results in a Kconfig warning and subsequent build failure: WARNING: unmet direct dependencies detected for REGMAP_I2C Depends on [m]: I2C [=m] Selected by [y]: - EXTCON_PTN5150 [=y] && EXTCON [=y] && (I2C [=m] && GPIOLIB [=y] || COMPILE_TEST [=y]) Selected by [m]: - EEPROM_AT24 [=m] && I2C [=m] && SYSFS [=y] - KEYBOARD_CAP11XX [=m] && !UML && INPUT [=y] && INPUT_KEYBOARD [=y] && OF [=y] && I2C [=m] - INPUT_DRV260X_HAPTICS [=m] && !UML && INPUT_MISC [=y] && INPUT [=y] && I2C [=m] && (GPIOLIB [=y] || COMPILE_TEST [=y]) - ... [many others] Add parentheses around the expression so we can compile-test without GPIOLIB but not without I2C. Fixes: 4ed754de2d66 ("extcon: Add support for ptn5150 extcon driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: Add support for ptn5150 extcon driverVijai Kumar K2019-02-111-0/+8
| | | | | | | | | | PTN5150 is a small thin low power CC (Configurationn Channel) Logic chip supporting the USB Type-C connector application with CC control logic detection and indication functions. Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com> [cw00.choi: Fix bulid dependency and clean-up code] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: axp288: Set USB role where necessaryHans de Goede2018-03-221-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>
* extcon: cros-ec: Add extcon-cros-ec driver to support display outBenson Leung2017-07-171-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>
* extcon: qcom-spmi-misc: add dependency on ARCH_QCOMPeter Robinson2017-05-231-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>
* extcon: intel-cht-wc: Add Intel Cherry Trail Whiskey Cove PMIC extcon driverHans de Goede2017-04-061-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>
* extcon: int3496: Add dependency on X86 as it's Intel specificPeter Robinson2017-03-221-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>
* extcon: int3496: Add Intel INT3496 ACPI device extcon driverDavid Cohen2017-01-091-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>
* extcon: Add support for qcom SPMI PMIC USB id detection hardwareStephen Boyd2016-09-131-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>
* extcon: add Maxim MAX3355 driverSergei Shtylyov2015-12-211-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>
* extcon: Allow compile test of GPIO consumers if !GPIOLIBGeert Uytterhoeven2015-05-191-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>
* extcon: axp288: Add axp288 extcon driver supportRamakrishna Pallala2015-05-191-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>
* extcon: Add manufactor name of each extcon deviceChanwoo Choi2015-05-191-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>
* extcon: max77843: Add max77843 MUIC driverJaewon Kim2015-02-241-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>
* extcon: usb-gpio: Introduce gpio usb extcon driverRoger Quadros2015-02-241-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>
* extcon: rt8973a: Add Richtek RT8973A extcon driverChanwoo Choi2014-09-221-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>
* extcon: sm5502: Add I2C dependency to fix build breakChanwoo Choi2014-09-221-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>
* extcon: sm5502: Add support new SM5502 extcon device driverChanwoo Choi2014-07-231-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>
* extcon: Reorder the sequence of extcon device driver alphabeticallyChanwoo Choi2014-06-161-14/+14
| | | | | | | This patch reorder the sequence of extcon device diver alphabetically to imporbe readability. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: max14577: Add support for MAX77836Krzysztof Kozlowski2014-04-231-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>
* extcon: Move OF helper function to extcon core and change function nameChanwoo Choi2014-03-191-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>
* extcon: max14577: Add extcon-max14577 driver to support MUIC deviceChanwoo Choi2014-01-071-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>
* extcon: Add an API to get extcon device from dt nodeKishon Vijay Abraham I2013-08-051-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>
* extcon: Palmas Extcon DriverGraeme Gregory2013-06-171-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>
* Convert selectors of GENERIC_GPIO to GPIOLIBAlexandre Courbot2013-04-161-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>
* Merge tag 'extcon-arizona-3.9' of ↵Greg Kroah-Hartman2013-02-111-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.
| * extcon: arizona: Use regulated mode for microphone supply when detectingMark Brown2013-02-071-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>
* | extcon: max77693: Fix bug of build error related to INPUT subsystemChanwoo Choi2013-01-251-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>
* extcon: extcon-arizona depends on INPUTRandy Dunlap2012-09-051-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>
* extcon: adc_jack: adc-jack driver to support 3.5 pi or simliar devicesanish kumar2012-09-051-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>
* Revert "Extcon: adc_jack: adc-jack driver to support 3.5 pi or simliar devices"Greg Kroah-Hartman2012-08-161-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>