All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] introduce: Multistate Switch Class
@ 2011-11-24  2:03 MyungJoo Ham
  2011-11-25 14:02 ` Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From: MyungJoo Ham @ 2011-11-24  2:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mike Lockwood, Arve Hjønnevåg, Kyungmin Park,
	Donggeun Kim, Greg KH, Arnd Bergmann, MyungJoo Ham

For switch ports, which may have different types of cables
(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.

Donggeun Kim (1):
  Multistate Switch Class: add notifier block

MyungJoo Ham (2):
  Multistate Switch Class: import Android's switch class and modify.
  Multistate Switch Class: support multiple states at a device.

 drivers/Makefile            |    1 +
 drivers/misc/Kconfig        |   21 +++
 drivers/misc/Makefile       |    2 +
 drivers/misc/switch_class.c |  332 +++++++++++++++++++++++++++++++++++++++++++
 drivers/misc/switch_gpio.c  |  174 ++++++++++++++++++++++
 include/linux/switch.h      |  164 +++++++++++++++++++++
 6 files changed, 694 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/switch_class.c
 create mode 100644 drivers/misc/switch_gpio.c
 create mode 100644 include/linux/switch.h

-- 
1.7.4.1

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

end of thread, other threads:[~2011-12-08  4:42 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24  2:03 [RFC PATCH 0/3] introduce: Multistate Switch Class MyungJoo Ham
2011-11-25 14:02 ` Arnd Bergmann
2011-11-26  5:46   ` MyungJoo Ham
2011-11-26 13:23   ` Kyungmin Park
2011-11-27 22:43   ` Linus Walleij
2011-11-27 23:08     ` Greg KH
2011-11-28  0:09       ` Dmitry Torokhov
2011-11-28  0:19         ` Greg KH
2011-11-28  9:03           ` Dmitry Torokhov
2011-11-28  1:31       ` NeilBrown
2011-11-28  7:27         ` Greg KH
2011-11-28  9:04           ` Dmitry Torokhov
2011-11-30  6:35             ` Greg KH
2011-11-30  6:58               ` MyungJoo Ham
2011-11-30  9:46                 ` Mark Brown
2011-11-30 13:28               ` Linus Walleij
2011-11-30 23:04                 ` NeilBrown
2011-12-01 13:38                   ` Linus Walleij
2011-11-28 13:04           ` Linus Walleij
2011-11-28 15:09             ` Morten CHRISTIANSEN
2011-11-30  6:34               ` Greg KH
2011-11-28 17:53     ` Arnd Bergmann
2011-11-29  9:11       ` MyungJoo Ham
2011-11-29  9:45         ` Linus Walleij
2011-11-29 13:59         ` Arnd Bergmann
2011-11-29 17:05           ` Dmitry Torokhov
2011-11-30  2:58         ` NeilBrown
2011-11-30  6:40           ` MyungJoo Ham
2011-11-30 22:56             ` NeilBrown
2011-11-30 23:17               ` Mark Brown
2011-11-30 23:25                 ` Dmitry Torokhov
2011-12-01  4:51                   ` MyungJoo Ham
2011-12-01  5:21                   ` NeilBrown
2011-12-01 11:34                     ` Mark Brown
2011-12-05  3:04                       ` NeilBrown
2011-12-05 12:06                         ` Mark Brown
2011-12-05 19:38                           ` NeilBrown
2011-12-05 19:45                             ` Mark Brown
2011-12-01  4:46               ` MyungJoo Ham
2011-12-07  9:31       ` Linus Walleij
2011-12-08  4:42         ` Kyungmin Park
2011-11-26 15:32 ` Greg KH
2011-11-29  8:18   ` MyungJoo Ham
2011-11-28 18:23 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.