From patchwork Tue Oct 3 11:40:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 147843 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2021749vqb; Tue, 3 Oct 2023 04:41:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElkYQ7XCBJZBE+H96wizxnbLO0tm5pz7EG73abZgXd2m92UMDSN3Fd7occtIAysXJbVAdr X-Received: by 2002:a05:6a00:1a15:b0:68e:351b:15b9 with SMTP id g21-20020a056a001a1500b0068e351b15b9mr3609598pfv.4.1696333278161; Tue, 03 Oct 2023 04:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696333278; cv=none; d=google.com; s=arc-20160816; b=KgGoGrVTtfBbfsMWy1n/mYagRDhl8juuUjKH7Rn8+mEKFlA89mDTE9CDMflTgFEjjB Sewk3SQTWA9winMU2Bza53fGzklUCJxttz3VZiEzFZti6nR87UzqwkyG4eEyTqH5/nSP +/s8w0cKog3AvwNX8PgauvaJMTjAGgwadgoEXezg+0AHqb6/kZTu+npCZAGxHWqSFVyG Ph6bhP6I/26ZA8b+f+CIffTDyGrIu6luMJnyzs6U/Lb6HZsdKfoQ2nDCo1FChbOcJ8Pu dlErgi1XU2e2cSv2mk1F0i3vMI7wcCCtqXsDHbm63CgtX1nAomor497SY3vg59/pa1NJ HwtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=n7ODQDXfFfT3sZWI4crYJMeT5e5axH2w41Qw6vXYgnc=; fh=TCIe+ouf8uohijk8u9x7Etapavm2wN3Yd42AQXAH15U=; b=EoTwefwtSlb+c69KRDanCS7jiyv9Ibtn8zYhwbZTek19zKe5JCY101ToeHeKjNITBz UDk6icbRCkkyX91yiJpuInDIC6w1ek9Te10gv4s4GKiA76ZfJxvOtRiaX5jbIopvEvhi XvFfTh21xENehrI8jhfbboTvAmlfGDxihdXyRUlhtgcEokYfJlAHIP7+yJ4gYQy8IrI6 vcrh3F8hFhRwcULpRu6J71nz2zPHC6VIiKpqC1PnAQ96I37bmt1gMRS7o9+HHQf7Yc9p /f5Tum6oYHiMHy5J9w8OiuoXhjiDMNKlTMdKGJrEaDKjN6WqqTksKsHeA145EwdYU2gl uAZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NuAwp0gw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id s5-20020a056a00178500b0068e2f6feab4si1327405pfg.374.2023.10.03.04.41.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 04:41:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NuAwp0gw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 76F0B825A9A7; Tue, 3 Oct 2023 04:41:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240622AbjJCLlP (ORCPT + 18 others); Tue, 3 Oct 2023 07:41:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240604AbjJCLlL (ORCPT ); Tue, 3 Oct 2023 07:41:11 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EE439B; Tue, 3 Oct 2023 04:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696333268; x=1727869268; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=0oH2WuMFS3hMNwVP0Fyc9/MWBSTPyzuobdreAreUTUI=; b=NuAwp0gwZNL4JipB8T1y9FfU9vmS42Z1mKerbLcSRBnuyrC/JE8at/bk R1qT/nv0DC1eO8K7YfIYuytB6vSxkyuIaglDbWoOq+zMxgoRlNWWDdd20 p3VVAHnpAjhOvmtFvU4/cV/7LsVKdRDiLjJdECZyDkuPfg1dyUqstcHoS zsGeIWKtacVnrCWIeyPjnS0HeVuEF/OZOMljUetj80mPduBo8RNTHJTzO +am2M9X0kGbYrFVDc+wIWKChzVJ5xHgdtpty9lSGxqWxBJ+j/yu7MZDYu DRd1G4sg6FuLqAxSv87ciX+VmjAZIZgOYx/G3B2uPudOknvg1HUyvobqc Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="1444124" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="1444124" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 04:40:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="786070230" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="786070230" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga001.jf.intel.com with ESMTP; 03 Oct 2023 04:40:56 -0700 From: Raag Jadav To: linus.walleij@linaro.org, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v2 1/2] pinctrl: baytrail: drop runtime PM support Date: Tue, 3 Oct 2023 17:10:35 +0530 Message-Id: <20231003114036.27674-2-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231003114036.27674-1-raag.jadav@intel.com> References: <20231003114036.27674-1-raag.jadav@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 04:41:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778734363032374141 X-GMAIL-MSGID: 1778734363032374141 Since Baytrail pinctrl device is not attached to acpi_lpss_pm_domain, runtime PM serves no purpose here. Drop it and switch to pm_sleep_ptr() as now we only have suspend and resume handles in place. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg --- drivers/pinctrl/intel/pinctrl-baytrail.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c index ec76e43527c5..c9a9bc594c63 100644 --- a/drivers/pinctrl/intel/pinctrl-baytrail.c +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -722,8 +722,6 @@ static int byt_gpio_request_enable(struct pinctrl_dev *pctl_dev, raw_spin_unlock_irqrestore(&byt_lock, flags); - pm_runtime_get(vg->dev); - return 0; } @@ -734,7 +732,6 @@ static void byt_gpio_disable_free(struct pinctrl_dev *pctl_dev, struct intel_pinctrl *vg = pinctrl_dev_get_drvdata(pctl_dev); byt_gpio_clear_triggering(vg, offset); - pm_runtime_put(vg->dev); } static void byt_gpio_direct_irq_check(struct intel_pinctrl *vg, @@ -1661,7 +1658,6 @@ static int byt_pinctrl_probe(struct platform_device *pdev) return ret; platform_set_drvdata(pdev, vg); - pm_runtime_enable(dev); return 0; } @@ -1750,26 +1746,15 @@ static int byt_gpio_resume(struct device *dev) return 0; } -static int byt_gpio_runtime_suspend(struct device *dev) -{ - return 0; -} - -static int byt_gpio_runtime_resume(struct device *dev) -{ - return 0; -} - static const struct dev_pm_ops byt_gpio_pm_ops = { LATE_SYSTEM_SLEEP_PM_OPS(byt_gpio_suspend, byt_gpio_resume) - RUNTIME_PM_OPS(byt_gpio_runtime_suspend, byt_gpio_runtime_resume, NULL) }; static struct platform_driver byt_gpio_driver = { .probe = byt_pinctrl_probe, .driver = { .name = "byt_gpio", - .pm = pm_ptr(&byt_gpio_pm_ops), + .pm = pm_sleep_ptr(&byt_gpio_pm_ops), .acpi_match_table = byt_gpio_acpi_match, .suppress_bind_attrs = true, }, From patchwork Tue Oct 3 11:40:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 147844 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2021964vqb; Tue, 3 Oct 2023 04:41:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGCLrgGFQKkT/Yjv83OghBP/x/L3wpTK9e3b/nHNaT4gk5PcsU5xgCIcaHKxJsh2RTIWjNg X-Received: by 2002:a05:6358:2925:b0:143:5826:def3 with SMTP id y37-20020a056358292500b001435826def3mr14983327rwb.14.1696333306287; Tue, 03 Oct 2023 04:41:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696333306; cv=none; d=google.com; s=arc-20160816; b=KUfLCLZJf4/O1MGQiaW4U3eGwui1+PFav1AV+1JNwwo4XGq+6ZCc+yrZa3xcuzQ0NW 0D0dSRe34uJP1creb5BNj7rxzqqWE62Y8++cu5Hp560yL6frARbtu3JX+UeiuOnkS9pO F/+Dx65PffuDroEgmeIoYyNTiY7VOrdt0B8b3Cm5KVSxsD0j8VwKbHIPSMh/pAWNR2nG E9pIDj0yuTo1TBVFJdeBzcCy03EZkyaTViX52zGaPdnt7HyByColp5olj4ovj8lF91rV 0lBAeFQjFQyO3jJ9vKUbC6fGQA1AMs/3NmAgZizrUdQ865K1gZoj6iJ2dIJcB91VI/pe I5Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=dHeWC0CLy7NGCVT+9yZDPldmCOFljUpa0MEymu0kwpQ=; fh=TCIe+ouf8uohijk8u9x7Etapavm2wN3Yd42AQXAH15U=; b=MSR/094DGRcCB+kvJOSDKZwqeBGfomUq6uSdyVYbzGDNQ6SBoB5sNfNBi9HnmIAjan TAORIQxAscDYYvcKVmF/1pKr9YK19ZsLq0MA162Jzh3wje8coRw/fRtqHjYJcd5DgihM af7PHH4XBeOguVef0ETK2aKSV8Q6BQCYf/g1UMmh2Nekb/04yyBVOnvhz4Veh918Puim 4hpKy6wbiRRMJeVu41vtbCAgJsTe/HCic82SVS9JX5EYbL84G8+DFgZnSjPbREO/VYhY knxLbCfxI/Ku2J+EyZVQrGJGJtlt84+SIBnXd/0RKZaZLzOHJVKYF5KpYHMvcQLSVyLD KxZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZLZslXWR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id b13-20020a63d80d000000b00563fe2c1163si1237179pgh.168.2023.10.03.04.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 04:41:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZLZslXWR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 3756A80206E2; Tue, 3 Oct 2023 04:41:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240617AbjJCLlM (ORCPT + 18 others); Tue, 3 Oct 2023 07:41:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231723AbjJCLlL (ORCPT ); Tue, 3 Oct 2023 07:41:11 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8374E8E; Tue, 3 Oct 2023 04:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696333269; x=1727869269; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=6ECANrpp4u5z6HDFw4QXczpMZs1noUZtFRrG2VlLV6g=; b=ZLZslXWROapxFILa+DWPs/6zrmLEGjvF3lDbGpYPs5NodvbmIn60kWFz Jf+DPKLq/M0u1qj+O3pNM3Naals4ztYhuJuKdEqC7qj0H8cZ0Kb7B6pcA fbqtojgVLJbzPxwl9UqbSjaH8SuhcW8szGtKPng59G6n8arfmG8Kp7VMS 80YU/zkNPN5QpPAsZjiopU/Cec0nkm3ItT24Hc7e9vbOY4L/AnlzrIeIM +ZAMGJqsDaAK46lqXEWPxPeOKtwCV2G8rnzzHQD+mLcG1Cz8GIn5H/Np+ 53n3nca/hZ2f4AIbWpm2qzIH3KB4i/EJlcnJOgXYHKG5EsNYucLQ9px99 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="1444137" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="1444137" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 04:41:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="786070236" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="786070236" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga001.jf.intel.com with ESMTP; 03 Oct 2023 04:41:00 -0700 From: Raag Jadav To: linus.walleij@linaro.org, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v2 2/2] pinctrl: lynxpoint: drop runtime PM support Date: Tue, 3 Oct 2023 17:10:36 +0530 Message-Id: <20231003114036.27674-3-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231003114036.27674-1-raag.jadav@intel.com> References: <20231003114036.27674-1-raag.jadav@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 04:41:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778734392935329956 X-GMAIL-MSGID: 1778734392935329956 Since Lynxpoint pinctrl device is not attached to acpi_lpss_pm_domain, runtime PM serves no purpose here. Drop it and switch to pm_sleep_ptr() as now we only have resume handle in place. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg --- drivers/pinctrl/intel/pinctrl-lynxpoint.c | 32 +++-------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/pinctrl-lynxpoint.c index c3732a9f0658..068cfd27f97f 100644 --- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c +++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -337,8 +337,6 @@ static int lp_gpio_request_enable(struct pinctrl_dev *pctldev, unsigned long flags; u32 value; - pm_runtime_get(lg->dev); - raw_spin_lock_irqsave(&lg->lock, flags); /* @@ -373,8 +371,6 @@ static void lp_gpio_disable_free(struct pinctrl_dev *pctldev, lp_gpio_disable_input(conf2); raw_spin_unlock_irqrestore(&lg->lock, flags); - - pm_runtime_put(lg->dev); } static int lp_gpio_set_direction(struct pinctrl_dev *pctldev, @@ -841,24 +837,6 @@ static int lp_gpio_probe(struct platform_device *pdev) return ret; } - pm_runtime_enable(dev); - - return 0; -} - -static int lp_gpio_remove(struct platform_device *pdev) -{ - pm_runtime_disable(&pdev->dev); - return 0; -} - -static int lp_gpio_runtime_suspend(struct device *dev) -{ - return 0; -} - -static int lp_gpio_runtime_resume(struct device *dev) -{ return 0; } @@ -876,10 +854,7 @@ static int lp_gpio_resume(struct device *dev) return 0; } -static const struct dev_pm_ops lp_gpio_pm_ops = { - SYSTEM_SLEEP_PM_OPS(NULL, lp_gpio_resume) - RUNTIME_PM_OPS(lp_gpio_runtime_suspend, lp_gpio_runtime_resume, NULL) -}; +static DEFINE_SIMPLE_DEV_PM_OPS(lp_gpio_pm_ops, NULL, lp_gpio_resume); static const struct acpi_device_id lynxpoint_gpio_acpi_match[] = { { "INT33C7", (kernel_ulong_t)&lptlp_soc_data }, @@ -890,10 +865,9 @@ MODULE_DEVICE_TABLE(acpi, lynxpoint_gpio_acpi_match); static struct platform_driver lp_gpio_driver = { .probe = lp_gpio_probe, - .remove = lp_gpio_remove, .driver = { .name = "lp_gpio", - .pm = pm_ptr(&lp_gpio_pm_ops), + .pm = pm_sleep_ptr(&lp_gpio_pm_ops), .acpi_match_table = lynxpoint_gpio_acpi_match, }, };