Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3516753ybl; Sun, 15 Dec 2019 11:35:32 -0800 (PST) X-Google-Smtp-Source: APXvYqyQkhZefab3/5VmmOgb1TEpR4Hx6DFX3oL6f144RLzFbTZCPdw8BUXbs1vDX6Cti2PRYNuo X-Received: by 2002:a9d:6c8:: with SMTP id 66mr27734509otx.271.1576438532861; Sun, 15 Dec 2019 11:35:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576438532; cv=none; d=google.com; s=arc-20160816; b=WGJrZPkGPEMyyVKBfCbyK8Tx34tb2ZUJYMxuOz5JUHgv9tae38/LoXvym+sMksnntA I+KBe5FrdxqatfaMCnJvT31FNRei/wuD8De5EtvoC7gQ24V4jn5xW2pkxLa4rURCq3R3 uDgFJSCgBdKxeobUvcXmkqMqjq9k697GpWq35+wt8MJB3QK7QvYtf3eOI8IRXlTHmaNH u55knDP6vCa3pakXAEzm+PRAFqqGSAw5PaQ/pEPaCgLzmE8Eu7yNxyonUz6p7T1haCj+ LTa5WFT+ufrCIkjQoKD3jg2CCRdAwGLWkrJyjRt/BMnCQunQS+UxeS3oNCM+Y+IscHQR l9kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=66GL6uEMhL/IBdQ3j8dGFVszWMz92MKvrMh/IitWSgw=; b=GZp1X6f7t9t6QJMY0fC4dYyzxu+GvZ6g68TVI9GlU8L/MrnKiDhQ20Bo58YRb4UabO vyALZ62Pm//46rZj1jGTBTmSAlIU7pD7m8J8SeolTBWElxko/yNMS0GfdgvHmLsUfDye wrNwONHrFxPFEL3Rh0Q/rSWL+s+3VogS4v7B8xaxwGiT0jAHLzEcOPwfHcAB0N+Meswz setE0Rb3Y7Jb5pbfVHvUq/fbk4jpU4wAHcA2rqEf14UBr09skPLVh6ipIlYCb7EVijBv 40BvzQ5urnXwjwm2McLMXAYtW9BR9xWgzY5anbVDEt6rssGuH1S1cuNV1VzrzTM+9Bnk txuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=fV42WMmw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23si10009096otp.234.2019.12.15.11.35.21; Sun, 15 Dec 2019 11:35:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=fV42WMmw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726445AbfLOTd3 (ORCPT + 99 others); Sun, 15 Dec 2019 14:33:29 -0500 Received: from mail.andi.de1.cc ([85.214.55.253]:45884 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbfLOTd2 (ORCPT ); Sun, 15 Dec 2019 14:33:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=66GL6uEMhL/IBdQ3j8dGFVszWMz92MKvrMh/IitWSgw=; b=fV42WMmwbpzdggy7SHL6TptND+ u/3IjtbOdXfdoFhjGGeq5gihZoRGVv6xSZ2uposkH3gyBB324LvG+MArY+4ePRDymXqevik2o0PLp F+UUKL4+o/+jsCLNz/U8WYXvZw4YHtX1jr2t+hBx3ptQsqQHBr+8ITCZ63f+AZDFXCXs=; Received: from p200300ccff4bb7001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff4b:b700:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1igZdr-00014T-ND; Sun, 15 Dec 2019 20:33:24 +0100 Date: Sun, 15 Dec 2019 20:33:19 +0100 From: Andreas Kemnade To: Tony Lindgren Cc: Evgeniy Polyakov , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Adam Ford , "Andrew F . Davis" , "H . Nikolaus Schaller" , Vignesh R Subject: Re: [PATCH] w1: omap-hdq: Simplify driver with PM runtime autosuspend Message-ID: <20191215203319.2874ac04@aktux> In-Reply-To: <20191215173817.47918-1-tony@atomide.com> References: <20191215173817.47918-1-tony@atomide.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 15 Dec 2019 09:38:17 -0800 Tony Lindgren wrote: > We've had generic code handling module sysconfig and OCP reset registers > for omap variants for many years now and all the drivers really needs to > do is just call runtime PM functions. > > Looks like the omap-hdq driver got only partially updated over the years > to use runtime PM, and still has lots of custom PM code left. > > We can replace all the custom code for sysconfig, OCP reset, and PM with > just a few lines of runtime PM autosuspend code. > > Note that the earlier driver specific usage count limit of four seems > completely artificial and should not be an issue in normal use. > > Cc: Adam Ford > Cc: Andrew F. Davis > Cc: Andreas Kemnade > Cc: H. Nikolaus Schaller > Cc: Vignesh R > Signed-off-by: Tony Lindgren > --- > > > Can you guys please review and and test on gta04 and torpedo? > I tried this after booting with init=/bin/bash and mounting kernel filesystems (no off mode enabled): root@(none):/# echo on >/sys/bus/platform/devices/480b2000.1w/power/control root@(none):/# modprobe omap_hdq [ 49.590820] Driver for 1-wire Dallas network protocol. [ 49.598327] omap_hdq 480b2000.1w: OMAP HDQ Hardware Rev 0.5. Driver in Interrupt mode root@(none):/# [ 49.624572] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d [ 49.660980] power_supply bq27000-battery: power_supply_get_battery_info currently only supports devicetree root@(none):/# time cat /sys/class/power_supply/bq27000-battery/voltage_now 0 real 0m2.561s user 0m0.008s sys 0m0.002s root@(none):/# time cat /sys/class/power_supply/bq27000-battery/voltage_now 0 real 0m12.601s user 0m0.010s sys 0m0.002s root@(none):/# time cat /sys/class/power_supply/bq27000-battery/voltage_now 0 real 0m12.601s user 0m0.010s sys 0m0.002s root@(none):/# No data could be read but some detection work seem to be done. Of course, I also tried without that forced power on. I hope I can find more time to analyze. Looks like a nice cleanup but needs some work. Regards, Andreas