Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp857908ybz; Wed, 22 Apr 2020 09:10:53 -0700 (PDT) X-Google-Smtp-Source: APiQypLGQycC++1NKMNll0QFhEU9qSBS9i7K5bYB3UMyBG3lUzjuExZ4kqK8dhzle+8VdI6xOU9y X-Received: by 2002:aa7:c40c:: with SMTP id j12mr23018193edq.169.1587571853132; Wed, 22 Apr 2020 09:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587571853; cv=none; d=google.com; s=arc-20160816; b=OI5f1O+LUTRcbEROmsR3YCZlJnQiRDgSqIGt+GuG4fz4mksT8hf9Jpz6skS0EvDJaA T1+cBM2L8R3FsOsaalFC/SMZ2lzAtadz2+1Sd1DLzSgLvI7bH/XNdDqHAX5OXz07tR38 2qx3s5by605VWby/f/J3Yn1ukaTsuh3kdbvEm/QiefjJdbxIpWrEZe2sYrbL23rj9Nu9 tYP4btKoT8EVIE32Im1oVFd3/QqMuZJ+xakzbAYcQPmUpfEBFfjs06UEdXm58Y2C7/iv D+oPd7ED9Sgp1s6jLS86dpwmeq7GmP7izhuWdamolmeOImq870/KQPjCVuzEejt9Qkt4 3EmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:mime-version :subject:dkim-signature; bh=qf5WeCKhWRVkBqrtB4YnhK5c0ibFNbTbM6Y2qPPZD5I=; b=0OQminxUIVpDnQA0tdgnH20WBW9rTzR3ykXZhFsW5/HKwRMJCw1p5gx6oxalTu3A6A KMeCB28bQVVhFEQIdaMjC8gMU5j6zYoxiOFB9o3WO1zhN1jcPVYXfabnspD0KpsfgmIh dEcBo8fKdiz32LIFP0klnP884C/lmzdr2QUAGNJAYezUsyRv0oqdcvONL/E2JJAnYhnQ Ph6hQf4qNvqnIQU4o1sDgrymhAW1dEIgllv4GGmg6Cf2INVx6o4mlY7zj7WZrPYsvAUA 03pXdgIZhNsumIoIxOFn32zWeOgcFTgCFo73cS0BdZuWKXxcp/6uAhN2QGi1q1h7mDKF my8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b=YUPfdBOU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si4271139edq.261.2020.04.22.09.10.27; Wed, 22 Apr 2020 09:10:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b=YUPfdBOU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726303AbgDVQGd (ORCPT + 99 others); Wed, 22 Apr 2020 12:06:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbgDVQGd (ORCPT ); Wed, 22 Apr 2020 12:06:33 -0400 Received: from mo6-p01-ob.smtp.rzone.de (mo6-p01-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5301::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9499CC03C1A9; Wed, 22 Apr 2020 09:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1587571589; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=qf5WeCKhWRVkBqrtB4YnhK5c0ibFNbTbM6Y2qPPZD5I=; b=YUPfdBOUCdPOhx2TuIUEJyeRiH33sl2G9EAZgfJB/XLat9rWE+DtR+mvecQQdL5JUZ RPni/GKxVhYM3Mf0X3P28Mxe9OE91LE9+5jwduoAf+eYQEO1sW1uT5rkp2JxXha5N4cr xULnnRljkBqKCcEWMCDwFEtKy0eBXfU835+pczSd6eqYGDmEvZHZZv56Gs75FWNPwS2Y nJF0pri6/i7GGKEi8Ugg1V20tjHwlSIhIyoqA6eJMBnkge3KsDWQJxiuEwUmfe+OqXvG PY/4asNzMa59GTW4SniHaZU3IQOIOQvXx/LULQFGXGXRRm+WNBH0lpJAYCp6F/QOGvJ6 y2SA== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw9iZeHmMiw43tskc=" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 46.6.2 DYNA|AUTH) with ESMTPSA id R0acebw3MG6G3Mi (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Wed, 22 Apr 2020 18:06:16 +0200 (CEST) Subject: Re: [PATCHv3] w1: omap-hdq: Simplify driver with PM runtime autosuspend Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=us-ascii From: "H. Nikolaus Schaller" In-Reply-To: <20200422120418.49a40c75@aktux> Date: Wed, 22 Apr 2020 18:06:15 +0200 Cc: Tony Lindgren , Evgeniy Polyakov , Greg Kroah-Hartman , Linux Kernel Mailing List , linux-omap , Adam Ford , "Andrew F . Davis" , Vignesh R Content-Transfer-Encoding: quoted-printable Message-Id: <6E3A50D9-0F15-4A56-8C5E-7CDC63E8AF9F@goldelico.com> References: <3197C3F0-DEB9-4221-AFBD-4F2A08C84C4C@goldelico.com> <20200417164340.3d9043d1@aktux> <6430AF54-849E-456B-8DB0-B4478BBDB78D@goldelico.com> <20200417150721.GL37466@atomide.com> <8E062482-5D5D-4837-9980-D6C708DD24D4@goldelico.com> <20200420150802.GR37466@atomide.com> <20200421085336.32cf8ffe@aktux> <20200421180220.GB37466@atomide.com> <70F19A6E-7B36-4873-9364-F284A14EE3A0@goldelico.com> <20200421182017.GC37466@atomide.com> <20200422120418.49a40c75@aktux> To: Andreas Kemnade X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > Am 22.04.2020 um 12:04 schrieb Andreas Kemnade : >=20 > On Tue, 21 Apr 2020 22:40:39 +0200 > "H. Nikolaus Schaller" wrote: >=20 >> Hi Tony, >>=20 >>> Am 21.04.2020 um 20:20 schrieb Tony Lindgren : >>>=20 >>>> Well, what helps is reverting the patch and using the old driver >>>> (which did work for several years). So I would not assume that >>>> there is a hardware influence. It seems to be something the new >>>> driver is doing differently. =20 >>>=20 >>> Well earlier hdq1w.c did not idle, now it does. =20 >>=20 >> Ah, I see! >>=20 >>> If you just want to keep it enabled like earlier, you can just add = something like: =20 >>=20 >> Well, I don't want it enabled, it just should work as before. >> Ideally including all improvements :) >>=20 >>>=20 >>> &hdqw1w { >>> ti,no-idle; >>> }; =20 >>=20 >> I have added that and there might be a slightly different pattern >> (unless that is just by luck): the first two or three attempts to >> read the bq27xx/uevent did still time out. But then the next ones >> worked fine (with a response time of ca. 65 .. 230 ms). >>=20 >> So as if something needs to be shaken into the right position after >> boot until it works. >>=20 >=20 > What about reading battery with just omap_hdq loaded and then continue > booting as usual, e.g. something like: >=20 > have script init-bat.sh > #!/bin/sh > modprobe omap_hdq > cat /sys/class/power_supply/bq27000_battery/uevent > exec /sbin/init "$@" >=20 > and then append to kernel parameters init=3D/init-bat.sh Interesting idea. But how would it help to identify the issue? I can confirm that after a while of attempting to read the uevent it suddenly starts to work. Then I can even swap the battery (and verify by looking at the cycle count which changes). I have some unconfirmed impression that it helps to run two cat /sys/class/power_supply/bq27000_battery/uevent in quick enough succession to get it out of the hickup mode. This needs more test. It would indicate that if a new omap_hdq_runtime_resume() is called by the second open+read+close sequence before the autosuspend (300ms) of the previous omap_hdq_runtime_suspend() happens, something gets back in place for the second omap_hdq_runtime_suspend(). BR and thanks, Nikolaus