All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: extcon: add EXTCON_JACK_UNSUPPORTED for external headset jack
       [not found] ` <001b01d6d4e8$b3cd3680$1b67a380$@codeaurora.org>
@ 2020-12-18  3:48   ` Chanwoo Choi
  0 siblings, 0 replies; only message in thread
From: Chanwoo Choi @ 2020-12-18  3:48 UTC (permalink / raw)
  To: mengw, myungjoo.ham; +Cc: linux-kernel, plai

On 12/18/20 11:51 AM, mengw@codeaurora.org wrote:
>  
> 
>  
> 
> From dac7b15dbdd4c327083fff97f22cf0c6ddfcf31a Mon Sep 17 00:00:00 2001
> 
> From: Meng Wang <mengw@codeaurora.org>
> 
> Date: Wed, 9 Dec 2020 12:35:54 +0800
> 
> Subject: [PATCH] extcon: add EXTCON_JACK_UNSUPPORTED for external headset jack
> 
>  
> 
> This patch adds the new extcon type EXTCON_JACK_UNSUPPORTED. This
> 
> type would be used when Euro headset is inserted into US jack and
> 
> vice versa. When EU headset is inserted into US jack and there's
> 
> no switch to switch the MIC_GND, EXTCON_JACK_UNSUPPORTED
> 
> would be reported to usespace.

Actually, I don't understand why this definition is needed.
Until now, I had not been heard like this name for external connector.
We have to use the correct connector name.

Instead of defining new type, you can use EXTCON_MECHANICAL
type in order to notify something to user-space
when unsupported external connector is inserted or vice-versa.
[1] http://lkml.iu.edu/hypermail/linux/kernel/1205.0/00538.html

> 
>  
> 
> Signed-off-by: Meng Wang <mengw@codeaurora.org>
> 
> ---
> 
> drivers/extcon/extcon.c | 5 +++++
> 
> include/linux/extcon.h  | 1 +
> 
> 2 files changed, 6 insertions(+)
> 
>  
> 
> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> 
> index 0a6438c..cfe2404 100644
> 
> --- a/drivers/extcon/extcon.c
> 
> +++ b/drivers/extcon/extcon.c
> 
> @@ -135,6 +135,11 @@ static const struct __extcon_info {
> 
>                                .id = EXTCON_JACK_SPDIF_OUT,
> 
>                                .name = "SPDIF-OUT",
> 
>                },
> 
> +             [EXTCON_JACK_UNSUPPORTED] = {
> 
> +                             .type = EXTCON_TYPE_JACK,
> 
> +                             .id = EXTCON_JACK_UNSUPPORTED,
> 
> +                             .name = "UNSUPPORTED",
> 
> +             },

> 
>                 /* Display external connector */
> 
>                [EXTCON_DISP_HDMI] = {
> 
> diff --git a/include/linux/extcon.h b/include/linux/extcon.h
> 
> index fd183fb..5b47dae 100644
> 
> --- a/include/linux/extcon.h
> 
> +++ b/include/linux/extcon.h
> 
> @@ -68,6 +68,7 @@
> 
> #define EXTCON_JACK_VIDEO_OUT       25
> 
> #define EXTCON_JACK_SPDIF_IN             26           /* Sony Philips Digital InterFace */
> 
> #define EXTCON_JACK_SPDIF_OUT         27
> 
> +#define EXTCON_JACK_UNSUPPORTED 28
> 
>  /* Display external connector */
> 
> #define EXTCON_DISP_HDMI    40           /* High-Definition Multimedia Interface */
> 
> -- 
> 
> 2.7.4
> 
>  
> 
>  
> 


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-18  3:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20201218025143epcas1p390da75dfe1938decce72ba2728595d9e@epcas1p3.samsung.com>
     [not found] ` <001b01d6d4e8$b3cd3680$1b67a380$@codeaurora.org>
2020-12-18  3:48   ` extcon: add EXTCON_JACK_UNSUPPORTED for external headset jack Chanwoo Choi

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.