[Letux-kernel] twl gpios / headset detect on gta04a5

Andreas Kemnade andreas at kemnade.info
Mon Sep 24 19:22:59 CEST 2018


On Mon, 24 Sep 2018 12:56:21 +0200
Andreas Kemnade <andreas at kemnade.info> wrote:

> On Sun, 23 Sep 2018 21:23:50 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
> 
> > > 
> > > we are failing here:
> > > sound/soc/soc-jack.c:
> > >                ret = request_any_context_irq(gpiod_to_irq(gpios[i].desc),
> > >                                              gpio_handler,
> > >                                              IRQF_TRIGGER_RISING |
> > >                                              IRQF_TRIGGER_FALLING,
> > >                                              gpios[i].name,
> > >                                              &gpios[i]);
> > > 
> > > Maybe irq does not work for twl gpio.    
> > 
> > It should...
> > AFAIR, there are card-detect gpios (which we do not use in GTA04) but other OMAP3 devices use them.
> > But I don't know if they are edge triggered?
> >   
> well, we need to compile twl4030-gpio statically
>         /* maybe setup IRQs */
>         if (is_module()) {
>                 dev_err(&pdev->dev, "can't dispatch IRQs from modules\n");
>                 goto no_irqs;
>         }
> 

# evtest /dev/input/event7 
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "gta04 Headset Jack"
Supported events:
  Event type 0 (EV_SYN)
  Event type 5 (EV_SW)
    Event code 2 (SW_HEADPHONE_INSERT)
    Event code 4 (SW_MICROPHONE_INSERT)
Properties:
Testing ... (interrupt to exit)
Event: time 1537809620.799621, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 0
Event: time 1537809620.799621, type 5 (EV_SW), code 4 (SW_MICROPHONE_INSERT), value 0
Event: time 1537809620.799621, -------------- EV_SYN ------------
Event: time 1537809624.390625, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 1
Event: time 1537809624.390625, type 5 (EV_SW), code 4 (SW_MICROPHONE_INSERT), value 1
Event: time 1537809624.390625, -------------- EV_SYN ------------
Event: time 1537809625.699829, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 0
Event: time 1537809625.699829, type 5 (EV_SW), code 4 (SW_MICROPHONE_INSERT), value 0
Event: time 1537809625.699829, -------------- EV_SYN ------------
Event: time 1537809626.770538, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 1
Event: time 1537809626.770538, type 5 (EV_SW), code 4 (SW_MICROPHONE_INSERT), value 1
Event: time 1537809626.770538, -------------- EV_SYN ------------
Event: time 1537809627.611450, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 0
Event: time 1537809627.611450, type 5 (EV_SW), code 4 (SW_MICROPHONE_INSERT), value 0
Event: time 1537809627.611450, -------------- EV_SYN ------------

Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20180924/ceca7831/attachment.asc>


More information about the Letux-kernel mailing list