extcon: Add EXTCON_MECHANICAL cable type for physical presence
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 2 May 2012 09:38:51 +0000 (10:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 May 2012 23:25:29 +0000 (16:25 -0700)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/extcon/extcon_class.c
include/linux/extcon.h

index 4657ad38164bd27427043f2cb3d544f9ac5f6cee..f598a700ec15e06d808bd2e00b3bbe86c91be5a2 100644 (file)
@@ -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,
 };
index 6495f7731400770421352a8deab4281d1e67ab8e..cdd4014776566bbe395bd635ef8360b2c073cedc 100644 (file)
@@ -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[];