From patchwork Fri Dec 23 12:24:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 88944 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp3296331qgi; Fri, 23 Dec 2016 04:25:47 -0800 (PST) X-Received: by 10.98.78.88 with SMTP id c85mr13594359pfb.138.1482495947371; Fri, 23 Dec 2016 04:25:47 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y67si34013481pfb.71.2016.12.23.04.25.47; Fri, 23 Dec 2016 04:25:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941648AbcLWMZp (ORCPT + 4 others); Fri, 23 Dec 2016 07:25:45 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:45365 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941608AbcLWMZl (ORCPT ); Fri, 23 Dec 2016 07:25:41 -0500 Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OIN02GDD16RP2B0@mailout1.samsung.com>; Fri, 23 Dec 2016 21:25:39 +0900 (KST) Received: from epsmges5p4.samsung.com (unknown [182.195.42.88]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20161223122539epcas5p1fc2eed35f4190775db138ab151ef0208~S4jO6l2XW2961929619epcas5p1j; Fri, 23 Dec 2016 12:25:39 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p4.samsung.com (EPCPMTA) with SMTP id F1.92.06849.3C71D585; Fri, 23 Dec 2016 21:25:39 +0900 (KST) Received: from epcpsbgm2new.samsung.com (u27.gpu120.samsung.co.kr [203.254.230.27]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20161223122538epcas5p29515ceff21963ab035b3b32878830ce2~S4jOo4Rj31585015850epcas5p2K; Fri, 23 Dec 2016 12:25:38 +0000 (GMT) X-AuditID: b6c32a58-f79726d000001ac1-fe-585d17c3b658 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 32.F0.28332.2C71D585; Fri, 23 Dec 2016 21:25:38 +0900 (KST) Received: from AMDC2765.digital.local ([106.116.147.25]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OIN00JTK15R7DD0@mmp2.samsung.com>; Fri, 23 Dec 2016 21:25:38 +0900 (KST) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Ulf Hansson , Bartlomiej Zolnierkiewicz Subject: [PATCH 7/9] pinctrl: samsung: Add property to mark pad state as suitable for power down Date: Fri, 23 Dec 2016 13:24:47 +0100 Message-id: <1482495889-6201-8-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1482495889-6201-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIIsWRmVeSWpSXmKPExsWy7bCmlu5h8dgIg+0b2C02zljPanH+PJA1 5c9yJotNj6+xWmye/4fR4nPvEUaLGef3MVmsPXKX3eLwm3ZWi1W7gBLH14Y7cHvsnHWX3WPT qk42jzvX9rB5bF5S79G3ZRWjx+dNcgFsUVw2Kak5m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E5Zwgrh/GKUWHC/kQWkik3AUKLrbRdYlYhAM6NE w5JeMIdZYAeTxOSza8BmCQskSdyeNhmsg0VAVeLy7GtARRwcvALuEt9+S0Csk5M4eWwyK4jN KeAhsXXDK3YQWwio5ML2h+wTGHkXMDKsYpRILUguKE5KzzXKSy3XK07MLS7NS9dLzs/dxAiO gmfSOxgP73I/xCjAwajEw3vibEyEEGtiWXFl7iFGCQ5mJRHeKcKxEUK8KYmVValF+fFFpTmp xYcYTYHumsgsJZqcD4zQvJJ4QxNzE3NjAwtzS0sTIyVx3sbZz8KFBNITS1KzU1MLUotg+pg4 OKUaGK3OCMxz2uCT+G53ie5+tXvxy5uilrzeMLkvP/9sXBVLa+BbPoPJWyf3B7z4uPjHAomz X2x2zZKylHnFazAva6vGu5K8CPXbuzVm/fG1rLpk3qKY43Zwk69txaaPpsv+fCnQnczlY2rU 1tnnF6B/mtkz9n98B4fJ8xlHNC2SJ38xTVJlu/o2TYmlOCPRUIu5qDgRAA1Pk5CYAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161223122538epcas5p29515ceff21963ab035b3b32878830ce2 X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 105P X-HopCount: 7 X-CMS-RootMailID: 20161223122538epcas5p29515ceff21963ab035b3b32878830ce2 X-RootMTR: 20161223122538epcas5p29515ceff21963ab035b3b32878830ce2 References: <1482495889-6201-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Add support for special property "samsung,off-state", which indicates a special state suitable for device's "sleep" state. Its pin values/properties should match the configuration in power down mode. It indicates that pin controller can notify runtime power management subsystem, that it is ready for runtime suspend if its all pins are configured for such state. This in turn might allow to turn respective power domain off to reduce power consumption. Signed-off-by: Marek Szyprowski --- Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | 8 ++++++++ drivers/pinctrl/samsung/pinctrl-samsung.c | 4 ++++ drivers/pinctrl/samsung/pinctrl-samsung.h | 1 + 3 files changed, 13 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index b7bd2e12a269..354eea0e7798 100644 --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt @@ -105,6 +105,7 @@ Required Properties: - samsung,pin-drv: Drive strength configuration. - samsung,pin-pud-pdn: Pull up/down configuration in power down mode. - samsung,pin-drv-pdn: Drive strength configuration in power down mode. + - samsung,off-state: Mark this configuration as suitable for bank power off. The values specified by these config properties should be derived from the hardware manual and these values are programmed as-is into the pin @@ -113,6 +114,13 @@ Required Properties: Note: A child should include atleast a pin function selection property or pin configuration property (one or more) or both. + Note: Special property "samsung,off-state" indicates that this state can + be used for device's "sleep" pins state. Its pin values/properties should + match the configuration in power down mode. It indicates that pin control + can notify runtime power management subsystem, that it is ready for runtime + suspend if its all pins are configured for such state. This in turn might + allow to turn respective power domain off to reduce power consumption. + The client nodes that require a particular pin function selection and/or pin configuration should use the bindings listed in the "pinctrl-bindings.txt" file. diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index a7b7d75373f2..301169d2b6e1 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -692,6 +692,10 @@ static int samsung_pinctrl_create_function(struct device *dev, } func->name = func_np->full_name; + if (of_property_read_bool(func_np, "samsung,off-state")) + func->rpm_active = false; + else + func->rpm_active = true; func->groups = devm_kzalloc(dev, npins * sizeof(char *), GFP_KERNEL); if (!func->groups) diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.h b/drivers/pinctrl/samsung/pinctrl-samsung.h index 32b949e2a89b..edeafa00abd3 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.h +++ b/drivers/pinctrl/samsung/pinctrl-samsung.h @@ -280,6 +280,7 @@ struct samsung_pmx_func { const char **groups; u8 num_groups; u32 val; + bool rpm_active; }; /* list of all exported SoC specific data */