From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341AbcFVI1f (ORCPT ); Wed, 22 Jun 2016 04:27:35 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:3375 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750834AbcFVI1c (ORCPT ); Wed, 22 Jun 2016 04:27:32 -0400 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Wed, 22 Jun 2016 01:26:20 -0700 From: Alexandre Courbot To: Liam Girdwood , Mark Brown , "Rob Herring" , Mark Rutland CC: , , , Alexandre Courbot Subject: [PATCH 0/6] regulator: add enable GPIO property to pwm-regulator Date: Wed, 22 Jun 2016 17:25:52 +0900 Message-ID: <20160622082558.20935-1-acourbot@nvidia.com> X-Mailer: git-send-email 2.8.3 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds the ability for the pwm-regulator driver to have an enable-gpio property, a feature that is required for the VDD_GPU regulator of Jetson TX1. Before doing that though, it goes through a few required changes/improvements in the regulator framework. Patch 1 allows the regulator core to use both an enable GPIO and an enable callback for a given driver. This is required for our use-case since the PWM also needs to be enabled/disabled in pwm-regulator regardless of whether we are using an enable GPIO or not. Patches 2-4 factorize the enable GPIO DT parsing code. With fixed and GPIO regulators already using that feature, and PWM to do the same, it probably makes sense to only have one function doing this. The parsing function supports more properties than individual drivers require, but the DT binding is the authority on which properties are valid, not the implementation. Finally patches 5-6 add support for the enable GPIO in pwm-regulator and the corresponding DT binding. The binding is kept minimal (active-high and open-drain properties can be specified in the GPIO phandle) on purpose. Alexandre Courbot (6): regulator: core: Allow simultaneous use of enable op and GPIO regulator: of: Add enable GPIO configuration function regulator: fixed: Use of_get_regulator_gpio_config regulator: gpio: Use of_get_regulator_gpio_config pwm-regulator: Support for enable GPIO dt-bindings: pwm-regulator: Document enable-gpio property .../bindings/regulator/pwm-regulator.txt | 7 ++- drivers/regulator/core.c | 34 ++++++++------ drivers/regulator/fixed.c | 52 +++++++++++----------- drivers/regulator/gpio-regulator.c | 47 ++++++++++--------- drivers/regulator/of_regulator.c | 52 ++++++++++++++++++++++ drivers/regulator/pwm-regulator.c | 5 +++ include/linux/regulator/of_regulator.h | 14 ++++++ 7 files changed, 149 insertions(+), 62 deletions(-) -- 2.8.3