From: Mark Brown Date: Wed, 2 May 2012 09:38:51 +0000 (+0100) Subject: extcon: Add EXTCON_MECHANICAL cable type for physical presence X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0e1507c8453081c9a6a515b92f89dd00b68f5c09;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git extcon: Add EXTCON_MECHANICAL cable type for physical presence 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c index 4657ad38164b..f598a700ec15 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 6495f7731400..cdd401477656 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[];