From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCHv2] w1: omap-hdq: Simplify driver with PM runtime autosuspend Date: Mon, 16 Dec 2019 16:34:53 -0800 Message-ID: <20191217003453.GU35479@atomide.com> References: <20191216145359.28219-1-tony@atomide.com> <20191216164335.GP35479@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Adam Ford Cc: Evgeniy Polyakov , Greg Kroah-Hartman , Linux Kernel Mailing List , Linux-OMAP , "Andrew F . Davis" , Andreas Kemnade , "H . Nikolaus Schaller" , Vignesh R List-Id: linux-omap@vger.kernel.org * Adam Ford [191216 19:04]: > On Mon, Dec 16, 2019 at 10:43 AM Tony Lindgren wrote: > > > > * Tony Lindgren [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 #logicpd-torpedo-37xx-devkit Thanks for testing, will post v3 shortly with the acks. Regards, Tony