Hi Svyatoslav, On Wed, 19 Apr 2023 at 12:53, Svyatoslav Ryhel <clamo...@gmail.com> wrote: > > 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. > > Tested-by: Andreas Westman Dorcsak <hed...@yahoo.com> # LG P880 T30 > Tested-by: Svyatoslav Ryhel <clamo...@gmail.com> # LG P895 T30 > Signed-off-by: Svyatoslav Ryhel <clamo...@gmail.com> > --- > drivers/misc/Kconfig | 2 + > drivers/misc/Makefile | 1 + > drivers/misc/extcon/Kconfig | 8 ++ > drivers/misc/extcon/Makefile | 2 + > drivers/misc/extcon/extcon-max14526.c | 153 ++++++++++++++++++++++++++ > 5 files changed, 166 insertions(+) > create mode 100644 drivers/misc/extcon/Kconfig > create mode 100644 drivers/misc/extcon/Makefile > create mode 100644 drivers/misc/extcon/extcon-max14526.c > > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig > index 4e1ae03e9f..1b49f3cf72 100644 > --- a/drivers/misc/Kconfig > +++ b/drivers/misc/Kconfig > @@ -659,4 +659,6 @@ config SL28CPLD > the base driver which provides common access methods for the > sub-drivers. > > +source "drivers/misc/extcon/Kconfig" > + > endmenu > diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile > index 3b792f2a14..6d4fc8ddf9 100644 > --- a/drivers/misc/Makefile > +++ b/drivers/misc/Makefile > @@ -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/ > diff --git a/drivers/misc/extcon/Kconfig b/drivers/misc/extcon/Kconfig > new file mode 100644 > index 0000000000..99c38224f3 > --- /dev/null > +++ b/drivers/misc/extcon/Kconfig > @@ -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. > diff --git a/drivers/misc/extcon/Makefile b/drivers/misc/extcon/Makefile > new file mode 100644 > index 0000000000..f012b688ce > --- /dev/null > +++ b/drivers/misc/extcon/Makefile > @@ -0,0 +1,2 @@ > +# SPDX-License-Identifier: GPL-2.0+ > +obj-$(CONFIG_EXTCON_MAX14526) += extcon-max14526.o > diff --git a/drivers/misc/extcon/extcon-max14526.c > b/drivers/misc/extcon/extcon-max14526.c > new file mode 100644 > index 0000000000..c8505dae49 > --- /dev/null > +++ b/drivers/misc/extcon/extcon-max14526.c > @@ -0,0 +1,153 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright (c) 2022 Svyatoslav Ryhel <clamo...@gmail.com> > + * > + * U-boot lacks extcon DM.
In that case I think it is best to add a new uclass for it. Regards, Simon