From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F97FC433E0 for ; Mon, 11 Jan 2021 05:13:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F05C6224D2 for ; Mon, 11 Jan 2021 05:13:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725613AbhAKFNO (ORCPT ); Mon, 11 Jan 2021 00:13:14 -0500 Received: from muru.com ([72.249.23.125]:42590 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725355AbhAKFNO (ORCPT ); Mon, 11 Jan 2021 00:13:14 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 3B4C480E4; Mon, 11 Jan 2021 05:12:32 +0000 (UTC) Date: Mon, 11 Jan 2021 07:12:28 +0200 From: Tony Lindgren To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Arthur Demchenkov , Carl Philipp Klemm , Merlijn Wajer , Pavel Machek , ruleh , Sebastian Reichel Subject: Re: [PATCH 4/5] Input: omap4-keypad - use PM runtime autosuspend Message-ID: References: <20210110190529.46135-1-tony@atomide.com> <20210110190529.46135-5-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org * Dmitry Torokhov [210111 05:01]: > Hi Tony, > > On Sun, Jan 10, 2021 at 09:05:28PM +0200, Tony Lindgren wrote: > > @@ -350,15 +379,12 @@ static int omap4_keypad_probe(struct platform_device *pdev) > > > > error = omap4_keypad_check_revision(&pdev->dev, > > keypad_data); > > - if (!error) { > > - /* Ensure device does not raise interrupts */ > > - omap4_keypad_stop(keypad_data); > > - } > > - > > - pm_runtime_put_sync(&pdev->dev); > > Why are we moving this down? The idea was to make sure the power usage > counters are correct even if we exit probe early. Yes you are right, omap4_keypad_close() won't help with balancing the get if we exit early. > Can we call pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend() > here? Yes that should work as there's no more register access during the probe. Regards, Tony