Re: [PATCHv2] w1: omap-hdq: Simplify driver with PM runtime autosuspend
From: Tony Lindgren
Date: Mon Dec 16 2019 - 19:34:58 EST
* Adam Ford <aford173@xxxxxxxxx> [191216 19:04]:
> On Mon, Dec 16, 2019 at 10:43 AM Tony Lindgren <tony@xxxxxxxxxxx> wrote:
> >
> > * Tony Lindgren <tony@xxxxxxxxxxx> [191216 14:54]:
> > > Vignesh, any comments on the ti,mode = "1w" and removal of the call to
> > > hdq_disable_interrupt()? Is there some specific section where we need
> > > to have interrupts disabled and then re-enabled?
> >
> > OK I got "1w" mode working too now. We need to clear the irqstatus before
> > calling wait_event_timeout() on it, and we're now missing it in the
> > hdq_read_byte().
> >
> > Looks like we should not tinker with the actual irstatus register though,
> > that's up to the hdq_isr() to manage.
> >
> > So the following helper is probably what we want to do additionally.
> > I'll be posting v3 of the $subject patch.
>
> I manually attempted to apply the patches. I 'think' I did it right.
>
> For testing, I ran:
> watch cat /sys/devices/w1_bus_master1/01-000000000000/power_supply/bq27000-battery/voltage_now
>
> I inserted and removed the power cable several times and observed the
> voltage readings with the battery connected.
> The numbers looked reasonable.
>
> I then put the board to suspend, waited a few seconds and woke the
> board from sleep. I resumed my 'watch' function from above and it
> worked just fine.
> If there is nothing else you want me to test, go ahead and add:
>
> Tested-by: Adam Ford <aford173@xxxxxxxxx> #logicpd-torpedo-37xx-devkit
Thanks for testing, will post v3 shortly with the acks.
Regards,
Tony