lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <9f9176a5-fe8b-8eb3-a83c-b31f43aafb55@samsung.com>
Date:   Fri, 18 Dec 2020 12:48:09 +0900
From:   Chanwoo Choi <cw00.choi@...sung.com>
To:     mengw@...eaurora.org, myungjoo.ham@...sung.com
Cc:     linux-kernel@...r.kernel.org, plai@...eaurora.org
Subject: Re: extcon: add EXTCON_JACK_UNSUPPORTED for external headset jack

On 12/18/20 11:51 AM, mengw@...eaurora.org wrote:
>  
> 
>  
> 
> From dac7b15dbdd4c327083fff97f22cf0c6ddfcf31a Mon Sep 17 00:00:00 2001
> 
> From: Meng Wang <mengw@...eaurora.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@...eaurora.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ