Extcon: add MAX8997 extcon driver
Chanwoo Choi
maintainerPATCH v3 1/2 Extcon: add MAX8997 extcon driver
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.
--- drivers/extcon/Kconfig | 8 + drivers/extcon/Makefile | 1 + drivers/extcon/extcon-max8997.c | 537 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 546 insertions(+), 0 deletions(-) create mode 100644 drivers/extcon/extcon-max8997.c
drivers/extcon/Kconfig +8 -0
@@ -32,4 +32,12 @@ config EXTCON_GPIO Say Y here to enable GPIO based extcon support. Note that GPIO extcon supports single state per extcon instance. +config EXTCON_MAX8997 + tristate "MAX8997 EXTCON Support" + depends on MFD_MAX8997 + help + If you say yes here you get support for the MUIC device of + Maxim MAX8997 PMIC. The MAX8997 MUIC is a USB port accessory + detector and switch. + endif # MULTISTATE_SWITCH
drivers/extcon/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-$(CONFIG_EXTCON) += extcon_class.o obj-$(CONFIG_EXTCON_GPIO) += extcon_gpio.o +obj-$(CONFIG_EXTCON_MAX8997) += extcon-max8997.o
(quoted diff) +0 -0
b/drivers/extcon/extcon-max8997.c
new file mode 100644
index 0000000..2b1aa04
drivers/extcon/extcon-max8997.c new file +537 -0
537 lines not on this page · raw message
Signature · 1 line
1.7.0.4