Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: extcon: add EXTCON_JACK_UNSUPPORTED for external headset jack | From | Chanwoo Choi <> | Date | Fri, 18 Dec 2020 12:48:09 +0900 |
| |
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
| ![\](/images/icornerr.gif) |