From patchwork Tue Oct 3 08:15:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 147746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1932601vqb; Tue, 3 Oct 2023 01:18:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDqT4OYGGblDdV1gsRvFVCw/nie/MFHPdSrc0n7DdkjuTa8UoiSjfR46Ka37Q3Hkco4aQl X-Received: by 2002:a67:f403:0:b0:452:b574:3c9a with SMTP id p3-20020a67f403000000b00452b5743c9amr12182406vsn.26.1696321089052; Tue, 03 Oct 2023 01:18:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696321088; cv=none; d=google.com; s=arc-20160816; b=e//QDEj8M+/W1HGjWfBfVvr2HZh1qezSu7g2lcqzybDsc3w66QOVziu5YLGtIhzGm7 LtVGt33c5qUI1IIuwsQnf4II+tg23f807vqvHCnC0eQOxGv88Qdv5wwHKcbMmq7jvvnx Zusve2H9cRYbg6QI6d7GjdJQ3YqqTQRifLtcGvjebGNnzPLC12R94uFlLM9cboduwqZ/ D3sFhC5YwTA3QUXqWgEUbSUaYpCGyIr/RpVjPTEDXPGaiUhs6S4HNGSzQ51qQp7hmxcQ pIE4CTa1oAj+KBiAU6KrPf9oSbXL/eRkdUFrQKxVMtoE4kT/Ge2wQXGFSyG5fOSjBcYI 2Srg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=q5wThsBmotEd7vsvcAg/ILyJcb9zoybeO8ik9nw4AKA=; fh=TCIe+ouf8uohijk8u9x7Etapavm2wN3Yd42AQXAH15U=; b=c5TNH3DeiKx5RyxFRUDJIW2fPZkHoqeGDquzyP4RslkLdG/UxVfH/NxAou3/HElq7g yUs0VZlUvEbFCB3g6ykbXXGfL+Eq6i8DzoaPaTWvpfrWVELc45B1d2AdUtS02+aVk+Lh q30pbRW9pR7m2MIElVCgytPi4oGGI7Jh2DjhegkM+ZtiueNBAd7c/1YYUK8dKN+HjQl3 YNyODqAQXDbfK80aYGyOHbhSd8jKF5Rcn4AL5GdexUKZ8vG/T0OzIOpUwPMaGGRQxEDH /dqpjJRAgL9SQ3GlXaoxhtH+r0+o8sHukYoOWiA+QXcg3XGs+EShGfM/OLJ/dpee44/D Wfqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NYuxprR9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id h3-20020a636c03000000b005694a4640afsi981327pgc.95.2023.10.03.01.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:18:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NYuxprR9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 2B48680ADC69; Tue, 3 Oct 2023 01:18:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239206AbjJCIRr (ORCPT + 18 others); Tue, 3 Oct 2023 04:17:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240348AbjJCIQu (ORCPT ); Tue, 3 Oct 2023 04:16:50 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B86F42110; Tue, 3 Oct 2023 01:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696320934; x=1727856934; h=from:to:cc:subject:date:message-id; bh=8IPj628lYH5qp+6t3Y6GHjDxORB0xZJN4BO5loU4DaE=; b=NYuxprR9qQf5hOF9VS2GGfdActOyr4XeLUVUeiZx/H249KbDH9OfkpjJ n2ucotGwwBJ6g8dh+3DnYe6IExoVnW8RIGm45C9nPcXFjgG4FpGlHVn0M fBv6NX/ZJDWHXCzzD/rvMCBH+EMrYXqbPxnHLLLv0SK+BMaJH3UDwDpYB Mf7eSonfGXX6ZdB+TTaJtoe9pmstGn7AiuaClQ+XXp0UFc35SI7yCL1Pz i5BL6POW4Q4V6Lq8vur6k1pon31D8RoFDPJu6w6vUOrYT+GBo1glfCF3X CjbFvfTNJR/uaGchM+DPqJqOr1mg3GV3Y3z5b5n+4S3Ftcy83LWQcWEWo w==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="469094756" X-IronPort-AV: E=Sophos;i="6.03,196,1694761200"; d="scan'208";a="469094756" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 01:15:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="786020426" X-IronPort-AV: E=Sophos;i="6.03,196,1694761200"; d="scan'208";a="786020426" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga001.jf.intel.com with ESMTP; 03 Oct 2023 01:15:31 -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 v1 1/2] pinctrl: baytrail: drop runtime PM support Date: Tue, 3 Oct 2023 13:45:18 +0530 Message-Id: <20231003081519.27524-1-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:18:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778721581952114075 X-GMAIL-MSGID: 1778721581952114075 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. No functional impact. TODO: Consider moving to DEFINE_LATE_DEV_PM_OPS() in the future once we have enough users to account for its introduction. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg --- drivers/pinctrl/intel/pinctrl-baytrail.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c index ec76e43527c5..14a61a262be1 100644 --- a/drivers/pinctrl/intel/pinctrl-baytrail.c +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -722,8 +721,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 +731,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 +1657,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 +1745,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 08:15:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 147747 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1932647vqb; Tue, 3 Oct 2023 01:18:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBwxw5Vf2cjmbKImwki/MSaBEPJ2fWBNCR5SqsI7Ecf5EH3Cy7Jq5CKZSrhMVgaDAYl5Pk X-Received: by 2002:a05:6870:1707:b0:1d4:fe03:73e with SMTP id h7-20020a056870170700b001d4fe03073emr17210157oae.52.1696321094143; Tue, 03 Oct 2023 01:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696321094; cv=none; d=google.com; s=arc-20160816; b=zGphhKcRle3q1A+sBwRKAUG6e2UD8fu8S0gUeZZqDeKbZigj3umfHWLTQfjwLWFL9X 5QnO9BykpJKMbLUPvOKwNG06YONe4b9HSw9KaQgZPzOh9EYiiKzgDrqOE3GTmMQMeW7Z CmGF+b30E/p/ZTqLRQgVf2OJW9+JbJXaU/s61taU2pcu5rslzGvz7JFUHcM/bNNG8goi 0i2k27siYm/Bf4/GKzcnBAbFAWka4V4dIy4Rw/Cs4ENjpgSc47MsRrW5nkP4dQwzE02p wQcGnphu7A4IJRiPqi03C8Ib4WylzzAWNrXziPcZw1cbNdfnJoW1oLUMy6wJyhk3lTCz cR9w== 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=ItY6+/rgVsNslO4RSKLKnqrXKnJdx2PxjgktbgDQVs0=; fh=TCIe+ouf8uohijk8u9x7Etapavm2wN3Yd42AQXAH15U=; b=r2aK3LiFbGBU5+vngbBl9QM6Byp4JnXR9EU331M1c3tbZcPUHkFrm6FLqTb4WFtNW8 sBycW012WfYwkU62LMO02J5F8AQEb+jlDxZx2NburMZiTL8cAJH82v/nlN+HA3z+9Ow3 Q4MMFqix/TDeXwWNNt3nb/UgicQCBlb7QlQE0rK8eBvpqoNwxXOWJbBi9fFky9dBUbk8 24iDCopeNe63DJmsmbPbLpH2dNHgG5P4vDzeKE9O6Xg81iC54TXpfj12FLu7i7LX2TJQ +W66fMJSLBBbU3Sa+jUChc2VRQxLPDrxqq8sd2+LHhGa1yIgTHHfnopdTF4QeFmTEOOk LPJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P1vr0YCg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id l70-20020a638849000000b00578fdfa353asi922069pgd.402.2023.10.03.01.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:18:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P1vr0YCg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id D5AE0801E77F; Tue, 3 Oct 2023 01:18:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239265AbjJCIRt (ORCPT + 18 others); Tue, 3 Oct 2023 04:17:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240354AbjJCIQu (ORCPT ); Tue, 3 Oct 2023 04:16:50 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2108F35AC; Tue, 3 Oct 2023 01:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696320937; x=1727856937; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=iDLeInzO3LurUSaf58/kXICx+lwAZvPvzMIDho72hkc=; b=P1vr0YCgniCU5MJw4MEESxxXp8f2qpDzIcmX2mXS63mXOIni7djMy59c IsuFMNAo6+C5Vh1c333eadrjqgDzY6Rk8hpZ+1aM0YWzw+AkpwdSd2tRj pKpvg4sor+FXApxH3IB0MKkC8iA7cy3hhMVKNQJToy1goonXxfKvLN+Jl Z8XMkblPYkhvgD0KNn52FJWlpBsCO8HWb3edYgg3hvDHjn8puY6RfuqDa Bv+cf+bPJ1qIba8gaf75pudHDu8KXvSyedKJ1AxHHKvbt1FhwYSh5tEaN vtnzj+qLUlWaPnjqsi5l5GP/s5TExBQQq8gg+KR2Jiy2fTol6IaUR+SUw w==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="469094777" X-IronPort-AV: E=Sophos;i="6.03,196,1694761200"; d="scan'208";a="469094777" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 01:15:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="786020431" X-IronPort-AV: E=Sophos;i="6.03,196,1694761200"; d="scan'208";a="786020431" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga001.jf.intel.com with ESMTP; 03 Oct 2023 01:15:34 -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 v1 2/2] pinctrl: lynxpoint: drop runtime PM support Date: Tue, 3 Oct 2023 13:45:19 +0530 Message-Id: <20231003081519.27524-2-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231003081519.27524-1-raag.jadav@intel.com> References: <20231003081519.27524-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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:18:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778721587403028115 X-GMAIL-MSGID: 1778721587403028115 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. No functional impact. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg --- drivers/pinctrl/intel/pinctrl-lynxpoint.c | 31 ++--------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/pinctrl-lynxpoint.c index c3732a9f0658..18ea1c3fa7bb 100644 --- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c +++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -337,8 +336,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 +370,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 +836,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 +853,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 +864,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, }, };