From patchwork Fri Sep 28 07:18:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11834 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 130A623E42 for ; Fri, 28 Sep 2012 07:18:30 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 9879CA18CA2 for ; Fri, 28 Sep 2012 07:18:29 +0000 (UTC) Received: by iagf6 with SMTP id f6so21051iag.11 for ; Fri, 28 Sep 2012 00:18:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=uqACAt5HPHCiKhtXyF5QeUStPwhoc4c90L9ej+VYJdg=; b=YoODB5WUgr7ElY39xH3m7BETj0a8s7Jp7lTp7/smuOinnEGBLUo8Z/eu5IhgFp/xZw 8qoLKQZqF73DjJMAg1c6NVQ1Y3aa0yc2ZuFZUlWZ9G5lzzk90DXpROBBxfD7dex38qlY nG/e6CmJoKL8srsz7+QgdhSiC2BqF28gJ3dS1oTfjI7mp+p5yYFpClTX4DwORPBshn+G AIpKZVZexD3r82cfy/emJwtMzZ0fMYWe+gqaNG7OVxTWIblCnB/T1d0XGHyy1j29ScLS qbKgFfZt4RqU/keY0iMOAldm431MaEyLfM0uVjHhtNL8gDP3hNNvn/6g/AFmxnhohYLe QEiQ== Received: by 10.50.160.165 with SMTP id xl5mr855629igb.0.1348816708958; Fri, 28 Sep 2012 00:18:28 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp456208igc; Fri, 28 Sep 2012 00:18:28 -0700 (PDT) Received: by 10.14.179.136 with SMTP id h8mr8793318eem.6.1348816707254; Fri, 28 Sep 2012 00:18:27 -0700 (PDT) Received: from eu1sys200aog115.obsmtp.com (eu1sys200aog115.obsmtp.com [207.126.144.139]) by mx.google.com with SMTP id k2si5965713een.81.2012.09.28.00.18.19 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Sep 2012 00:18:27 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.139 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.139; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.139 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob115.postini.com ([207.126.147.11]) with SMTP ID DSNKUGVPOsJByK1U9REKhp4/CxInGQonAt00@postini.com; Fri, 28 Sep 2012 07:18:27 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 2D9A15C; Fri, 28 Sep 2012 07:17:41 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id F28FA54; Fri, 28 Sep 2012 03:06:29 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id EEE76A8083; Fri, 28 Sep 2012 09:18:08 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 28 Sep 2012 09:18:11 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Linus Walleij , Patrice Chotard Subject: [PATCH v2] pinctrl: clarify idle vs sleep states Date: Fri, 28 Sep 2012 09:18:08 +0200 Message-ID: <1348816688-27531-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQl4XP7gg6jA17L2fgpgcx8ZUt50jC/59skj/0xnePxzDQ9PHxGhD0CwRXHZ0NwnXUQegjOh From: Linus Walleij This pure documentation fix tries to align the "idle" and "sleep" pin states to the idle and suspend states from runtime PM. Cc: Patrice Chotard Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - I changed my mind slightly after experimentation in practice (empirical stuff is the best). So now I think "idle" is for runtime_suspend(), and "sleep" is for suspend() proper. This works best in practice for us. I'm trying to set some model here that will be easy to understand and usable for typical cases. --- include/linux/pinctrl/pinctrl-state.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/include/linux/pinctrl/pinctrl-state.h b/include/linux/pinctrl/pinctrl-state.h index 634608dc..b5919f8 100644 --- a/include/linux/pinctrl/pinctrl-state.h +++ b/include/linux/pinctrl/pinctrl-state.h @@ -6,13 +6,18 @@ * @PINCTRL_STATE_DEFAULT: the state the pinctrl handle shall be put * into as default, usually this means the pins are up and ready to * be used by the device driver. This state is commonly used by - * hogs to configure muxing and pins at boot. + * hogs to configure muxing and pins at boot, and also as a state + * to go into when returning from sleep and idle in + * .pm_runtime_resume() or ordinary .resume() for example. * @PINCTRL_STATE_IDLE: the state the pinctrl handle shall be put into - * when the pins are idle. Could typically be set from a - * pm_runtime_suspend() operation. + * when the pins are idle. This is a state where the system is relaxed + * but not fully sleeping - some power may be on but clocks gated for + * example. Could typically be set from a pm_runtime_suspend() or + * pm_runtime_idle() operation. * @PINCTRL_STATE_SLEEP: the state the pinctrl handle shall be put into - * when the pins are sleeping. Could typically be set from a - * common suspend() function. + * when the pins are sleeping. This is a state where the system is in + * its lowest sleep state. Could typically be set from an + * ordinary .suspend() function. */ #define PINCTRL_STATE_DEFAULT "default" #define PINCTRL_STATE_IDLE "idle"