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

Note that previously, the patchset has been submitted as
"Multistate Switch Class".

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.

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 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 (2):
  Extcon (external connector): import Android's switch class and
    modify.
  Extcon: support multiple states at a device.

 drivers/Kconfig               |    2 +
 drivers/Makefile              |    1 +
 drivers/extcon/Kconfig        |   22 ++
 drivers/extcon/Makefile       |    6 +
 drivers/extcon/extcon_class.c |  510 +++++++++++++++++++++++++++++++++++++++++
 drivers/extcon/extcon_gpio.c  |  173 ++++++++++++++
 include/linux/extcon.h        |  289 +++++++++++++++++++++++
 7 files changed, 1003 insertions(+), 0 deletions(-)
 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] 16+ messages in thread

end of thread, other threads:[~2011-12-20  5:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 10:28 [PATCH v2 0/3] introduce External Connector Class (extcon) MyungJoo Ham
2011-12-14 10:28 ` [PATCH v2 1/3] Extcon (external connector): import Android's switch class and modify MyungJoo Ham
2011-12-15  1:01   ` Greg KH
2011-12-15  5:41     ` MyungJoo Ham
2011-12-15  7:18       ` Greg KH
2011-12-16  5:38         ` MyungJoo Ham
2011-12-16 18:18           ` Greg KH
2011-12-14 10:28 ` [PATCH v2 2/3] Extcon: support notification based on the state changes MyungJoo Ham
2011-12-14 10:28 ` [PATCH v2 3/3] Extcon: support multiple states at a device MyungJoo Ham
2011-12-15  2:32 ` [PATCH v2 0/3] introduce External Connector Class (extcon) NeilBrown
2011-12-15  6:36   ` MyungJoo Ham
2011-12-15 20:20     ` NeilBrown
2011-12-15  6:51   ` Mark Brown
2011-12-18  7:15     ` NeilBrown
2011-12-20  1:01       ` Mark Brown
2011-12-20  5:58         ` NeilBrown

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).