From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752356AbbJMKps (ORCPT ); Tue, 13 Oct 2015 06:45:48 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:45845 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932249AbbJMKpo (ORCPT ); Tue, 13 Oct 2015 06:45:44 -0400 From: Sascha Hauer To: linux-kernel@vger.kernel.org Cc: Liam Girdwood , Mark Brown , kernel@pengutronix.de, alkml@pengutronix.de, Sascha Hauer Subject: [PATCH 7/8] regulator: i.MX anatop: Allow supply regulator Date: Tue, 13 Oct 2015 12:45:30 +0200 Message-Id: <1444733131-26995-8-git-send-email-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1444733131-26995-1-git-send-email-s.hauer@pengutronix.de> References: <1444733131-26995-1-git-send-email-s.hauer@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The anatop regulators are SoC internal LDO regulators usually supplied by an external PMIC. This patch adds support for specifying the supply from the device tree using the vin-supply property. Signed-off-by: Sascha Hauer --- Documentation/devicetree/bindings/regulator/anatop-regulator.txt | 1 + drivers/regulator/anatop-regulator.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt index 758eae2..37c4ea0 100644 --- a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt @@ -13,6 +13,7 @@ Optional properties: - anatop-delay-reg-offset: Anatop MFD step time register offset - anatop-delay-bit-shift: Bit shift for the step time register - anatop-delay-bit-width: Number of bits used in the step time register +- vin-supply: The supply for this regulator Any property defined as part of the core regulator binding, defined in regulator.txt, can also be used. diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index 52ea605..ba78870 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -30,6 +30,7 @@ #include #include #include +#include #define LDO_RAMP_UP_UNIT_IN_CYCLES 64 /* 64 cycles per step */ #define LDO_RAMP_UP_FREQ_IN_MHZ 24 /* cycle based on 24M OSC */ @@ -199,6 +200,7 @@ static int anatop_regulator_probe(struct platform_device *pdev) rdesc->owner = THIS_MODULE; initdata = of_get_regulator_init_data(dev, np, rdesc); + initdata->supply_regulator = "vin"; sreg->initdata = initdata; anatop_np = of_get_parent(np); @@ -262,6 +264,7 @@ static int anatop_regulator_probe(struct platform_device *pdev) rdesc->vsel_reg = sreg->control_reg; rdesc->vsel_mask = ((1 << sreg->vol_bit_width) - 1) << sreg->vol_bit_shift; + rdesc->min_dropout_uv = 125000; config.dev = &pdev->dev; config.init_data = initdata; -- 2.6.1