All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] extcon: Add EXTCON_MECHANICAL cable type for physical presence
@ 2012-05-02  9:38 Mark Brown
  2012-05-02 20:13 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2012-05-02  9:38 UTC (permalink / raw)
  To: MyungJoo Ham, Greg Kroah-Hartman, Kyungmin Park, Donggeun Kim
  Cc: linux-kernel, Mark Brown

Some accessory detection mechanisms are able to detect that something is
physically present in the socket separately to identifying what is present
in the socket. This information can be useful to applications, for example
allowing them to indicate that a potentially broken accessory is present,
so provide a standard way to report it to userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/extcon/extcon_class.c |    1 +
 include/linux/extcon.h        |    1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c
index 53c64a9..a7116e8 100644
--- a/drivers/extcon/extcon_class.c
+++ b/drivers/extcon/extcon_class.c
@@ -60,6 +60,7 @@ const char *extcon_cable_name[] = {
 	[EXTCON_SPDIF_OUT]	= "SPDIF-out",
 	[EXTCON_VIDEO_IN]	= "Video-in",
 	[EXTCON_VIDEO_OUT]	= "Video-out",
+	[EXTCON_MECHANICAL]	= "Mechanical",
 
 	NULL,
 };
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index 6495f77..cdd4014 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -66,6 +66,7 @@ enum extcon_cable_name {
 	EXTCON_SPDIF_OUT,
 	EXTCON_VIDEO_IN,
 	EXTCON_VIDEO_OUT,
+	EXTCON_MECHANICAL,
 };
 extern const char *extcon_cable_name[];
 
-- 
1.7.10


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

* Re: [PATCH] extcon: Add EXTCON_MECHANICAL cable type for physical presence
  2012-05-02  9:38 [PATCH] extcon: Add EXTCON_MECHANICAL cable type for physical presence Mark Brown
@ 2012-05-02 20:13 ` Greg Kroah-Hartman
  2012-05-02 23:03   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2012-05-02 20:13 UTC (permalink / raw)
  To: Mark Brown; +Cc: MyungJoo Ham, Kyungmin Park, Donggeun Kim, linux-kernel

On Wed, May 02, 2012 at 10:38:51AM +0100, Mark Brown wrote:
> Some accessory detection mechanisms are able to detect that something is
> physically present in the socket separately to identifying what is present
> in the socket. This information can be useful to applications, for example
> allowing them to indicate that a potentially broken accessory is present,
> so provide a standard way to report it to userspace.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  drivers/extcon/extcon_class.c |    1 +
>  include/linux/extcon.h        |    1 +
>  2 files changed, 2 insertions(+)

Ok, but where is the in-kernel user of this new interface?  Why are we
adding it now before someone actually needs it?

And shouldn't this also update some documentation somewhere as well?

thanks,

greg k-h

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

* Re: [PATCH] extcon: Add EXTCON_MECHANICAL cable type for physical presence
  2012-05-02 20:13 ` Greg Kroah-Hartman
@ 2012-05-02 23:03   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-05-02 23:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: MyungJoo Ham, Kyungmin Park, Donggeun Kim, linux-kernel

On Wed, May 02, 2012 at 01:13:21PM -0700, Greg Kroah-Hartman wrote:

> Ok, but where is the in-kernel user of this new interface?  Why are we
> adding it now before someone actually needs it?

Well, one could say the same thing about the entire interface right now
but if you look at the existing accessory detection abstraction for
sound cards in include/sound/jack.h and the input API that's currently
the only userspace API for it you can see that they have this feature
already.

There's a reasonable prospect of the ALSA abstraction getting support
for extcon at some point in the not too distant future at which point it
will acquire all the users that has but I'd not anticipate that until
after the merge window as the ALSA stuff wants some prodding and poking 
prior to doing that which I really hope will collide with some other
updates too.

> And shouldn't this also update some documentation somewhere as well?

There doesn't appear to be any existing relevant documentation to
update, and to be honest given that what we're doing is mapping a plain
text name into a constant I'm not sure it'd be adding much.

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

end of thread, other threads:[~2012-05-02 23:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-02  9:38 [PATCH] extcon: Add EXTCON_MECHANICAL cable type for physical presence Mark Brown
2012-05-02 20:13 ` Greg Kroah-Hartman
2012-05-02 23:03   ` 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.