From patchwork Thu Feb 14 10:25:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Gasnier X-Patchwork-Id: 10812323 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B5F74922 for ; Thu, 14 Feb 2019 10:28:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A23072D2AC for ; Thu, 14 Feb 2019 10:28:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92BB82D2CC; Thu, 14 Feb 2019 10:28:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70D402D2AC for ; Thu, 14 Feb 2019 10:28:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=YVSZkHlwfxmVIgIGiS24kVubYFEKIxRlXtpwcFdngUM=; b=SrK8YLeYlefovL Z3gbfYgFvjSKFo6hzj31Eu5P0BR86i8xgbVawobCptAhPBtdAtsJMN3uxUoGr+KVzqx13XtlQtAHn 97hSgaX/WWJMNBhx2wBaUc6yGeMmLZetwrWJviLz5Hi/lse9yHw7yEP9sOs3TtBAXYQ3/cDdF46tX uhF18w27Cl9RFz8fDv5feEKsgtQEJQYhQi8NszpUoJPkLyTv9V60effklOndvSx91xovz26Kc140y Ksseb1NoyX6q5TccC4FfdaIOgcADhuWAIs8zhn5MxOn/zs9qeBl6YqCMHgazOuU2dvYqE3VwA6QvL EUh6gAgM4bxrAQOqeepg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1guEFv-0002Ar-0U; Thu, 14 Feb 2019 10:28:35 +0000 Received: from mx07-00178001.pphosted.com ([62.209.51.94]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1guEE5-0007pz-3k for linux-arm-kernel@lists.infradead.org; Thu, 14 Feb 2019 10:26:43 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1EAQRL0011458; Thu, 14 Feb 2019 11:26:29 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2qmy1na9uw-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 14 Feb 2019 11:26:29 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 50D0041; Thu, 14 Feb 2019 10:26:27 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0BA584E11; Thu, 14 Feb 2019 10:26:27 +0000 (GMT) Received: from localhost (10.75.127.46) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 14 Feb 2019 11:26:26 +0100 From: Fabrice Gasnier To: , Subject: [PATCH v4 0/3] Add PM support to STM32 LP Timer drivers Date: Thu, 14 Feb 2019 11:25:48 +0100 Message-ID: <1550139951-25788-1-git-send-email-fabrice.gasnier@st.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-02-14_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190214_022641_652777_5844A6F3 X-CRM114-Status: GOOD ( 11.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alexandre.torgue@st.com, tduszyns@gmail.com, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, mcoquelin.stm32@gmail.com, u.kleine-koenig@pengutronix.de, fabrice.gasnier@st.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch series adds power management support for STM32 LP Timer: - PWM driver - Document the pinctrl states for sleep mode It also adds device link between the PWM consumer and the PWM provider. This allows proper sequencing for suspend/resume (e.g. user will likely do a pwm_disable() before the PWM provider suspend executes), see [1]. [1] https://lkml.org/lkml/2019/2/5/770 --- Changes in v4: - improve error handling when adding the PWM consumer device link. Changes in v3: - Move the device_link_add() call to of_pwm_get() as discussed with Uwe. Changes in v2: - Don't disable PWM channel in PWM provider: rather refuse to suspend and report an error as suggested by Uwe and Thierry. - Add patch 3/3 to propose device link addition. - No updates for STM32 LP Timer IIO driver. Patches can be send separately. Fabrice Gasnier (3): dt-bindings: pwm-stm32-lp: document pinctrl sleep state pwm: stm32-lp: Add power management support pwm: core: add consumer device link .../devicetree/bindings/pwm/pwm-stm32-lp.txt | 9 ++-- drivers/pwm/core.c | 50 ++++++++++++++++++++-- drivers/pwm/pwm-stm32-lp.c | 25 +++++++++++ include/linux/pwm.h | 6 ++- 4 files changed, 82 insertions(+), 8 deletions(-)