Add MAX14526 MUIC driver
v2 cover Add MAX14526 MUIC driver
MAX14526 MUIC is used by LG P880/P895 which are currently in the process of merging.
Unfortunately U-Boot has no extcon driver model so I used a MISC model for now.
MAX14526 is a powerful extcon device which has the ability to accurately determine plugged devices. In this implementation muic can be configured to represent 3 modes: CP-USB/UART and AP-USB. Unfortunately AP-UART was disabled on P880/P895. Additionally the driver configures some stuff required by the charger.
---
Changes from v1:
- used log_* instead of printf
- log messages made simpler
---
Svyatoslav Ryhel (1):
misc: extcon: add MAX14526 MUIC support
drivers/misc/Kconfig | 2 + drivers/misc/Makefile | 1 + drivers/misc/extcon/Kconfig | 8 ++ drivers/misc/extcon/Makefile | 2 + drivers/misc/extcon/extcon-max14526.c | 151 ++++++++++++++++++++++++++ 5 files changed, 164 insertions(+) create mode 100644 drivers/misc/extcon/Kconfig create mode 100644 drivers/misc/extcon/Makefile create mode 100644 drivers/misc/extcon/extcon-max14526.c
Signature · 1 line
2.37.2
PATCH v2 1/1 misc: extcon: add MAX14526 MUIC support
MAX14526 is a powerful extcon chip which allows detection of various plugs like usb, mhl, uart, headset etc. This version of driver implements support of AP-usb and CP-usb/uart paths.
--- drivers/misc/Kconfig | 2 + drivers/misc/Makefile | 1 + drivers/misc/extcon/Kconfig | 8 ++ drivers/misc/extcon/Makefile | 2 + drivers/misc/extcon/extcon-max14526.c | 151 ++++++++++++++++++++++++++ 5 files changed, 164 insertions(+) create mode 100644 drivers/misc/extcon/Kconfig create mode 100644 drivers/misc/extcon/Makefile create mode 100644 drivers/misc/extcon/extcon-max14526.c
drivers/misc/Kconfig +2 -0
@@ -659,4 +659,6 @@ config SL28CPLD the base driver which provides common access methods for the sub-drivers. +source "drivers/misc/extcon/Kconfig" + endmenu
drivers/misc/Makefile +1 -0
@@ -87,3 +87,4 @@ obj-$(CONFIG_K3_AVS0) += k3_avs.o obj-$(CONFIG_ESM_K3) += k3_esm.o obj-$(CONFIG_ESM_PMIC) += esm_pmic.o obj-$(CONFIG_SL28CPLD) += sl28cpld.o +obj-y += extcon/
drivers/misc/extcon/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +config EXTCON_MAX14526 + bool "Maxim MAX14526 EXTCON Support" + select DM_I2C + select DM_MISC + help + If you say yes here you get support for the MUIC device of + Maxim MAX14526. The MAX14526 MUIC is a USB port accessory + detector and switch.
drivers/misc/extcon/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0+ +obj-$(CONFIG_EXTCON_MAX14526) += extcon-max14526.o
drivers/misc/extcon/extcon-max14526.c new file +151 -0
151 lines not on this page · raw message
Signature · 1 line
2.37.2