Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751557AbdLUGZ2 (ORCPT ); Thu, 21 Dec 2017 01:25:28 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:45213 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750782AbdLUGZ0 (ORCPT ); Thu, 21 Dec 2017 01:25:26 -0500 X-Google-Smtp-Source: ACJfBov/BGCHe6Jmjz67LfyMZ89/JIpTKd3xPy36fCwhNCVzNcl4it6PAWa4IlW7S9vVTXs9rM46Xg== From: Chunyan Zhang To: Mark Brown , Rob Herring Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Chunyan Zhang Subject: [PATCH 0/5] Add regulator suspend and resume support Date: Thu, 21 Dec 2017 14:25:01 +0800 Message-Id: <1513837506-26543-1-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1768 Lines: 42 Some systems need to set regulators to specific states when they enter low power modes, especially around CPUs. Currently the regulator driver, for suspend and resume features, provides two functions which are exported for being called directly by any modules or subsystems when they thought the regulator should be entering into suspend states. This patchset adds hooks to PM suspend core and provides suspend/resume callback functions to regulator device, for those who can be switched off or set low voltage in suspend states only need to implement the callback functions in the driver, and set the right configurations for suspend states via device tree and the APIs which regulator core driver provides. Those drivers who use the old interfaces - i.e. regulator_suspend_prepare() and regulator_suspend_finish() should stop using that, since we leave these two functions empty and plan to remove them one day in the future. Any comments would be greatly appreciated. Thanks, Chunyan Chunyan Zhang (5): bindings: regulator: added support for suspend states regulator: make regulator voltage be an array to support more states drivers: regulator: leave one item to record whether regulator is enabled drivers: regulator: empty the old suspend functions regulator: add PM suspend and resume hooks .../devicetree/bindings/regulator/regulator.txt | 11 +- drivers/regulator/core.c | 342 ++++++++++++++------- drivers/regulator/internal.h | 18 +- drivers/regulator/of_regulator.c | 18 +- include/linux/regulator/driver.h | 2 + include/linux/regulator/machine.h | 31 +- 6 files changed, 299 insertions(+), 123 deletions(-) -- 2.7.4