From patchwork Tue Nov 20 10:12:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Gasnier X-Patchwork-Id: 10690167 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 6913714E2 for ; Tue, 20 Nov 2018 10:13:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56B6928E65 for ; Tue, 20 Nov 2018 10:13:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A0EA2906E; Tue, 20 Nov 2018 10:13:43 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B550728E65 for ; Tue, 20 Nov 2018 10:13:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726177AbeKTUmC (ORCPT ); Tue, 20 Nov 2018 15:42:02 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:38938 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725983AbeKTUmC (ORCPT ); Tue, 20 Nov 2018 15:42:02 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id wAKA90qv018886; Tue, 20 Nov 2018 11:13:04 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2nvg2c034u-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 20 Nov 2018 11:13:04 +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 BCFD83D; Tue, 20 Nov 2018 10:13:02 +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 96C2D266E; Tue, 20 Nov 2018 10:13:02 +0000 (GMT) Received: from localhost (10.75.127.47) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 20 Nov 2018 11:13:01 +0100 From: Fabrice Gasnier To: CC: , , , , , , , , , Subject: [PATCH 0/3] iio: stm32-adc: add PM support Date: Tue, 20 Nov 2018 11:12:29 +0100 Message-ID: <1542708752-26163-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.47] X-ClientProxiedBy: SFHDAG3NODE1.st.com (10.75.127.7) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-20_04:,, signatures=0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch series adds support for power management to stm32-adc iio driver. It slighlty reworks regulator and clock handling, to move them in dedicated routines. Then these routines can be called from probe/remove and PM callbacks. It also takes care of running ADC when going to low power mode. Fabrice Gasnier (3): iio: adc: stm32-adc: move self-calibration to prepare routine iio: adc: stm32-adc: add power management support iio: adc: stm32-adc: switch off running adc when going to low power drivers/iio/adc/stm32-adc-core.c | 182 +++++++++++++++-------- drivers/iio/adc/stm32-adc.c | 303 ++++++++++++++++++++++++++++----------- 2 files changed, 343 insertions(+), 142 deletions(-)