linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] introduce External Connector Class (extcon)
@ 2012-01-11  9:46 MyungJoo Ham
  2012-01-11  9:46 ` [PATCH v3 1/4] Extcon (external connector): import Android's switch class and modify MyungJoo Ham
                   ` (4 more replies)
  0 siblings, 5 replies; 50+ messages in thread
From: MyungJoo Ham @ 2012-01-11  9:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: NeilBrown, Randy Dunlap, Mike Lockwood, Arve Hjønnevåg,
	Kyungmin Park, Donggeun Kim, Greg KH, Arnd Bergmann,
	Linus Walleij, Dmitry Torokhov, Morten CHRISTIANSEN, Mark Brown,
	myungjoo.ham

For external connectors, which may have different types of cables attached
(USB, TA, HDMI, Analog A/V, and others), we often have seperated device
drivers that detect the state changes at the port and device drivers that
do something according to the state changes.

For example, when MAX8997-MUIC detects a Charger cable insertion, another
device driver (such as MAX8903 charger, MAX8997 charger, Charger Manager,
or board file) needs to set charger current limit accordingly and when
MAX8997-MUIC detects a HDMI cable insertion, multimedia device drivers
need to do some operations accordingly.

This patchset supports the usage of notifier for passing such information
between device drivers.

Another issue is that at a single switch port, there might be multiple
and heterogeneous cables attached at the same time. Besides the state
(Attached or Detached) of each cable may alter independently. Such extcon
devices that support simultaneous mult-cable attachment include, bot not
limited to, docks, cradles, and 30-pin-like ports (like that of NURI board
in linux/arch/arm/mach-exynos, which resembles Samsung Galaxy Tab series).
For example, the 30-pin port of NURI board may be used to connect analog
audio cables, analog video cable, and a USB or a charger. Because such
cables coonnect part of the 30 pins to external devices/cables, the
possible combinations of external devices/cables vary significantly and
users may fabricate their own design; e.g., an 30-pin adaptor connecting
USB, AC-DC adaptor, HDMI, analog audio, analog video, USB-host, SD-card,
and so on.

In order to address such issues, Android kernel's "Switch" class seems to
be a good basis and we have implemented "Multistate Switch Class" based on
it. The "Switch" class code of Android kernel is GPL as well.


Summary of changes from v2 patchset
- Support to express mutually exclusive set of cables
- Revised device/class/sysfs-entries add/removal methods
- Added sysfs entries
- Revised documentation and comments
- Some bugfixes
- Compatible with Android (for extcon devices with "use_class_name_switch" set)

Summary of changes from RFC
- ABI documentation added
- Notifees may get notified for a state change of a specific cable, not
every cable of the corresponding extcon.
- Added kerneldoc comments
- Moved to /drivers/extcon/
- Added helper functions
- Some bugfixes


Donggeun Kim (1):
  Extcon: support notification based on the state changes.

MyungJoo Ham (3):
  Extcon (external connector): import Android's switch class and
    modify.
  Extcon: support multiple states at a device.
  Extcon: support mutually exclusive relation between cables.

 Documentation/ABI/testing/sysfs-class-extcon |   75 +++
 drivers/Kconfig                              |    2 +
 drivers/Makefile                             |    1 +
 drivers/extcon/Kconfig                       |   22 +
 drivers/extcon/Makefile                      |    6 +
 drivers/extcon/extcon_class.c                |  641 ++++++++++++++++++++++++++
 drivers/extcon/extcon_gpio.c                 |  173 +++++++
 include/linux/extcon.h                       |  305 ++++++++++++
 8 files changed, 1225 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-extcon
 create mode 100644 drivers/extcon/Kconfig
 create mode 100644 drivers/extcon/Makefile
 create mode 100644 drivers/extcon/extcon_class.c
 create mode 100644 drivers/extcon/extcon_gpio.c
 create mode 100644 include/linux/extcon.h

-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2012-04-02  5:09 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11  9:46 [PATCH v3 0/4] introduce External Connector Class (extcon) MyungJoo Ham
2012-01-11  9:46 ` [PATCH v3 1/4] Extcon (external connector): import Android's switch class and modify MyungJoo Ham
2012-01-11  9:46 ` [PATCH v3 2/4] Extcon: support notification based on the state changes MyungJoo Ham
2012-01-11  9:46 ` [PATCH v3 3/4] Extcon: support multiple states at a device MyungJoo Ham
2012-01-11  9:46 ` [PATCH v3 4/4] Extcon: support mutually exclusive relation between cables MyungJoo Ham
2012-01-20  1:01 ` [PATCH v4 0/4] introduce External Connector Class (extcon) MyungJoo Ham
2012-01-20  1:01   ` [PATCH v4 1/4] Extcon (external connector): import Android's switch class and modify MyungJoo Ham
2012-01-20  1:01   ` [PATCH v4 2/4] Extcon: support notification based on the state changes MyungJoo Ham
2012-01-20  1:01   ` [PATCH v4 3/4] Extcon: support multiple states at a device MyungJoo Ham
2012-01-20  1:01   ` [PATCH v4 4/4] Extcon: support mutually exclusive relation between cables MyungJoo Ham
2012-02-10  6:40   ` [PATCH v5 0/5] Introduce External Connector Class (extcon) MyungJoo Ham
2012-02-10  6:40     ` [PATCH v5 1/5] Extcon (external connector): import Android's switch class and modify MyungJoo Ham
2012-02-20  1:54       ` Mark Brown
2012-02-20  6:17         ` MyungJoo Ham
2012-02-20 15:45           ` Mark Brown
2012-02-10  6:40     ` [PATCH v5 2/5] Extcon: support notification based on the state changes MyungJoo Ham
2012-02-20  2:20       ` Mark Brown
2012-02-10  6:40     ` [PATCH v5 3/5] Extcon: support multiple states at a device MyungJoo Ham
2012-02-20  2:24       ` Mark Brown
2012-02-20  7:02         ` MyungJoo Ham
2012-02-22 10:07       ` Arnd Bergmann
2012-02-10  6:40     ` [PATCH v5 4/5] Extcon: support mutually exclusive relation between cables MyungJoo Ham
2012-02-20  2:27       ` Mark Brown
2012-02-22  8:23         ` MyungJoo Ham
2012-02-22 10:00           ` Arnd Bergmann
2012-02-24  4:56             ` MyungJoo Ham
2012-02-24 12:53               ` Arnd Bergmann
2012-02-27  6:47                 ` MyungJoo Ham
2012-02-10  6:40     ` [PATCH v5 5/5] Extcon: adc-jack driver to support 3.5 pi or simliar devices MyungJoo Ham
2012-02-10 16:25       ` Mark Brown
2012-02-14  2:22         ` MyungJoo Ham
2012-02-14  5:58           ` Mark Brown
2012-02-27 12:15     ` [PATCH v6 0/5] Introduce External Connector Class (extcon) MyungJoo Ham
2012-02-27 12:15       ` [PATCH v6 1/5] Extcon (external connector): import Android's switch class and modify MyungJoo Ham
2012-03-09 12:41         ` Mark Brown
2012-03-12  8:06           ` MyungJoo Ham
2012-03-29 22:27           ` Erik Gilling
2012-03-30  8:56             ` MyungJoo Ham
2012-03-30 10:14               ` Mark Brown
2012-03-30 10:07             ` Mark Brown
2012-03-30 17:29               ` Erik Gilling
2012-03-30 17:38                 ` Dima Zavin
2012-04-02  5:09                   ` MyungJoo Ham
2012-03-31 10:19                 ` Mark Brown
2012-02-27 12:15       ` [PATCH v6 2/5] Extcon: support generic GPIO extcon driver MyungJoo Ham
2012-03-29 22:37         ` Stephen Boyd
2012-03-30  8:33           ` MyungJoo Ham
2012-02-27 12:15       ` [PATCH v6 3/5] Extcon: support notification based on the state changes MyungJoo Ham
2012-02-27 12:15       ` [PATCH v6 4/5] Extcon: support multiple states at a device MyungJoo Ham
2012-02-27 12:15       ` [PATCH v6 5/5] Extcon: support mutually exclusive relation between cables MyungJoo Ham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).