Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp481826imu; Tue, 20 Nov 2018 02:14:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/UG1FQ4zrIrbAW6VOeJNp22mTTdgWrPbkB63qY8pt51JHbv2xzirKHAG9Ar0gN81ei1znnM X-Received: by 2002:a63:6445:: with SMTP id y66mr1390745pgb.250.1542708880778; Tue, 20 Nov 2018 02:14:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542708880; cv=none; d=google.com; s=arc-20160816; b=tEAIT6/Mh5VansFwyupAp0I8nYnAdi/9vFdi7xRFcqLgMvU3fTh/V8qUJmXO0ddGc9 8UHky4iRJcbTNAAzLJ9jv3a9ffJys/KckcAnnwURbqbhRmuVmDrflmnHYRdSq/QbePHm ISGn7oRvs27vc0Yb78xa+LUJyOOFvYtYrDryFy4nDFTzQiOdbUkJezx1ZM3gv7yJUxV7 GUlf++jdkM/UFGr4Bc4vjYOeXIY0F/mB9TIp5+w+tzLTomR6j9ys8x3u6cz+OxWZW53G 6A9nVNpJPAWklv2nbeAN9UYOZO5Vz3NH56QpTFTBvb8IiMDdmWt8DsY8X7Ps1LT2TYAC vktg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=LZYWIZ73Zd9CHwZMPGvrrnMNZUc0hGiO2+8ujTrYztI=; b=R0fkK+ylJtp9nkWx9F0YlEtl/wHtGlMNqYKH/9JBoWpo8LnxZg445k1bZ5mzV7a3r9 nwpJHRMAR5lt6s38+Z+EAmTVHWnB/do8FLZmTbntiDI44qKUfkXK9wrOAbKqvgbeVhQ3 vipoi+0v2TJma2cP0KRzWpn4rwCBHPMs4T7pL1ngYTus/g28N9ng/0DhRQK0JFGxk925 UNtRGfxkzXk/dMuDjFcTwIvtRKFuEviRpX4mgUcl/+WJpFvevsSHVaxkD/ePEtMOeDaj ixrosWCWkFGYpuqWpjI6JZqwyAGt7AuA9SorJsODuaaF4Foetn4ozayX6Xcj7n8v5Qx2 BRIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a24si37360647pgd.248.2018.11.20.02.14.24; Tue, 20 Nov 2018 02:14:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727728AbeKTUmD (ORCPT + 99 others); Tue, 20 Nov 2018 15:42:03 -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 Content-Type: text/plain 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 1.9.1