Skip to contentSkip to conversation

extcon: Add LC824206XA microUSB switch driver

PATCH Superseded Hans de Goede 1 participant 1 message May 12, 2024 External connector subsystem (extcon)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 extcon: Add LC824206XA microUSB switch driver

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.

---
Changes in v2:
- Fix whitespace issues reported by checkpatch

---
 drivers/extcon/Kconfig             |  11 +
 drivers/extcon/Makefile            |   1 +
 drivers/extcon/extcon-lc824206xa.c | 500 +++++++++++++++++++++++++++++
 3 files changed, 512 insertions(+)
 create mode 100644 drivers/extcon/extcon-lc824206xa.c
drivers/extcon/Kconfig +11 -0
index 5f869eacd19a..10212a585142 100644
@@ -75,6 +75,17 @@ config EXTCON_INTEL_MRFLD
 	  Say Y here to enable extcon support for charger detection / control
 	  on the Intel Merrifield Basin Cove PMIC.
 
+config EXTCON_LC824206XA
+	tristate "LC824206XA extcon Support"
+	depends on I2C
+	depends on POWER_SUPPLY
+	help
+	  Say Y here to enable support for the ON Semiconductor LC824206XA
+	  microUSB switch and accessory detector chip. The LC824206XA is a USB
+	  port accessory detector and switch. The LC824206XA is fully controlled
+	  using I2C and enables USB data, stereo and mono audio, video,
+	  microphone and UART data to use a common connector port.
+
 config EXTCON_MAX14577
 	tristate "Maxim MAX14577/77836 EXTCON Support"
 	depends on MFD_MAX14577
drivers/extcon/Makefile +1 -0
index f779adb5e4c7..0d6d23faf748 100644
@@ -12,6 +12,7 @@ obj-$(CONFIG_EXTCON_GPIO)	+= extcon-gpio.o
 obj-$(CONFIG_EXTCON_INTEL_INT3496) += extcon-intel-int3496.o
 obj-$(CONFIG_EXTCON_INTEL_CHT_WC) += extcon-intel-cht-wc.o
 obj-$(CONFIG_EXTCON_INTEL_MRFLD) += extcon-intel-mrfld.o
+obj-$(CONFIG_EXTCON_LC824206XA)	+= extcon-lc824206xa.o
 obj-$(CONFIG_EXTCON_MAX14577)	+= extcon-max14577.o
 obj-$(CONFIG_EXTCON_MAX3355)	+= extcon-max3355.o
 obj-$(CONFIG_EXTCON_MAX77693)	+= extcon-max77693.o
drivers/extcon/extcon-lc824206xa.c new file +500 -0

500 lines not on this page · raw message

Signature · 1 line
2.44.0