From patchwork Mon Feb 12 13:17:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 128070 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3202401ljc; Mon, 12 Feb 2018 05:19:30 -0800 (PST) X-Google-Smtp-Source: AH8x226bih0AqjR5MhVWu8s5pOsyzf5QZVuNUyHBGvdAU7rSiB5wKIjq7ihXZ1gmw0ozOUkgbQ/f X-Received: by 2002:a17:902:1a4:: with SMTP id b33-v6mr10731049plb.58.1518441570857; Mon, 12 Feb 2018 05:19:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518441570; cv=none; d=google.com; s=arc-20160816; b=R8nWIxVG1/lDdi5ozYPxD1sZ0JbqUdnogvxMsS1AftL2dsQtVABC5I+i68pKVnzfVX TuwW6hOAQ9Z4wtU2uq7/qrVo/38l7aQPsfziFe/CPpsP2wEOYmbSmob2vsEF7FFe9nRN xObFuQZc0cUqezeAHgQ6wYETWcmcLY8PpwX4smbCRLjXHKptp4zWJzYnwvR7iJF+lj1u tukZNxmMii64RgNL6tZqod/80ZclXg/sjgSCR03J0DsIJUBQWV87gU8J/BC7bIl/L+em PJ5m40/vJx9hKgcVLDkA+uJzdY90ZYPDXJ92IX3NELNIptvH3fyiGNvnlvF+7cY6+B0f IZjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=SSHe7tfvJHWg3shDhiwaCuRG4ZVCrfbwSX4PZv89Feo=; b=LO6NZ+leVB7w/dQFfx7WWEakzOov1EXylo1cJyM9AYhSwGUZiNlYrv9XTmNw7gxPNG o+X90X7nciRXqgLELBhrGyvpdHlDfcTlhg92wEUs4Dr9jD09tNdujsNMUqxq8PTlhbcP G708YnzuhmHxFGkQdSILr9R7ZwYqqnIGWoNj6bHIrb7TdZ1jr/XGZOWWBUlD0XPSrNtq Aydn/sjFMzKyfjsCEh2x7/QYI8c36tWdOvyhIWtaIcV0aTFWibdkWF3j5NNNzsotxuQD 9utQqKAQ6stBwHSMi7OK7ZLzmVEpTV2XyAso2lnJwcreWj90kmPCW8CeYXpKbAc2KLVz plJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TeKnt0HV; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6-v6si1217488pla.619.2018.02.12.05.19.30; Mon, 12 Feb 2018 05:19:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TeKnt0HV; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933097AbeBLNT3 (ORCPT + 5 others); Mon, 12 Feb 2018 08:19:29 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36316 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935308AbeBLNSF (ORCPT ); Mon, 12 Feb 2018 08:18:05 -0500 Received: by mail-lf0-f67.google.com with SMTP id t79so20401743lfe.3 for ; Mon, 12 Feb 2018 05:18:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jX4buJqmwi3v7ZY16HuFYDWultv1gGtOOAL/qiwPrzY=; b=TeKnt0HVENE+Wx4ldMDpqNcmrtiiyn/QsMgeUuXzWKKSqYU/b4Vxa1MEyzzQS29OE+ q55PrXYds1Yk9GTl0f4Bpcgo4D9kQkx3ecPcJOTsP0ByT0cBiVyLz5CsWp+vzQtlWgqt sBZdpy2eG/OX0PbwRr7Trqbfl34vrnNB8ZE5Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jX4buJqmwi3v7ZY16HuFYDWultv1gGtOOAL/qiwPrzY=; b=Yh55H73d7GAN5TyblEW/8KHrz1DC+erW/KpmjMRFPL1LmdJX+4zGH8l43LwO92jyyH s88fktw//9C+awb3s7QdbwnsCR17DYl5GDeS/7G4pL9AMsHONmIHnaG1nivXDuZrfvR/ D1+KM9nAVRp8OuNOfgwGhycMly13KO5bidoMahnUPGiun6nvQcnguBGta4O+SXx/cmsj jZCtWYsGdiKAW6fVJYuWmPTYKDm+hxcFzWrTbXs/vsC87czJsse9BcOSYkcA1Ct0bDvM hK8XoV49AH+suWqHBZsCL3lGTyqGDVieQ7pnZ7XUjgFO4iowJoMAScQdBZqv/A8+9oQA Kanw== X-Gm-Message-State: APf1xPAgX2y01FsVzttwnGnjKs5iZvXq1LLEQHi4Axh6FnMR2iJsH0CV NAFseCts2Vr7hH72w6uAQ7V8zw== X-Received: by 10.46.68.131 with SMTP id b3mr3373604ljf.13.1518441484003; Mon, 12 Feb 2018 05:18:04 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id r88sm1584648lje.30.2018.02.12.05.18.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 05:18:03 -0800 (PST) From: Linus Walleij To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Linus Walleij , patches@opensource.cirrus.com, Charles Keepax , Lee Jones Subject: [PATCH 16/21] regulator: wm8994: Pass descriptor instead of GPIO number Date: Mon, 12 Feb 2018 14:17:12 +0100 Message-Id: <20180212131717.27193-17-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180212131717.27193-1-linus.walleij@linaro.org> References: <20180212131717.27193-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Instead of passing a global GPIO number for the enable GPIO, pass a descriptor looked up from the device tree node or the board file decriptor table for the regulator. There is a single board file passing the GPIOs for LDO1 and LDO2 through platform data, so augment this to pass descriptors associated with the i2c device as well. Cc: patches@opensource.cirrus.com Cc: Charles Keepax Cc: Lee Jones Signed-off-by: Linus Walleij --- Lee: this patch is touching the MFD core driver for WM8994, but as with all other patches we just change the regulator parts. Would be nice if you could ACK it. --- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 18 ++++++++++++++++-- drivers/mfd/wm8994-core.c | 9 --------- drivers/regulator/wm8994-regulator.c | 19 +++++++++++-------- include/linux/mfd/wm8994/pdata.h | 3 --- 4 files changed, 27 insertions(+), 22 deletions(-) -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Lee Jones diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c index f00988705408..a4db97f156d7 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -193,8 +194,8 @@ static struct wm8994_pdata wm8994_pdata = { 0x3, /* IRQ out, active high, CMOS */ }, .ldo = { - { .enable = S3C64XX_GPN(6), .init_data = &wm8994_ldo1, }, - { .enable = S3C64XX_GPN(4), .init_data = &wm8994_ldo2, }, + { .init_data = &wm8994_ldo1, }, + { .init_data = &wm8994_ldo2, }, }, }; @@ -202,6 +203,18 @@ static const struct i2c_board_info wm1277_devs[] = { { I2C_BOARD_INFO("wm8958", 0x1a), /* WM8958 is the superset */ .platform_data = &wm8994_pdata, .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, + .dev_name = "wm8958", + }, +}; + +static struct gpiod_lookup_table wm8994_gpiod_table = { + .dev_id = "i2c-wm8958", /* I2C device name */ + .table = { + GPIO_LOOKUP("GPION", 6, + "wlf,ldo1ena", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("GPION", 4, + "wlf,ldo2ena", GPIO_ACTIVE_HIGH), + { }, }, }; @@ -366,6 +379,7 @@ static int wlf_gf_module_probe(struct i2c_client *i2c, rev == gf_mods[i].rev)) break; + gpiod_add_lookup_table(&wm8994_gpiod_table); if (i < ARRAY_SIZE(gf_mods)) { dev_info(&i2c->dev, "%s revision %d\n", gf_mods[i].name, rev + 1); diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 953d0790ffd5..c409464231f6 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -302,14 +301,6 @@ static int wm8994_set_pdata_from_of(struct wm8994 *wm8994) if (of_find_property(np, "wlf,ldoena-always-driven", NULL)) pdata->lineout2fb = true; - pdata->ldo[0].enable = of_get_named_gpio(np, "wlf,ldo1ena", 0); - if (pdata->ldo[0].enable < 0) - pdata->ldo[0].enable = 0; - - pdata->ldo[1].enable = of_get_named_gpio(np, "wlf,ldo2ena", 0); - if (pdata->ldo[1].enable < 0) - pdata->ldo[1].enable = 0; - return 0; } #else diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c index 7a4ce6df4f22..d3a5f48119c2 100644 --- a/drivers/regulator/wm8994-regulator.c +++ b/drivers/regulator/wm8994-regulator.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -129,6 +129,7 @@ static int wm8994_ldo_probe(struct platform_device *pdev) int id = pdev->id % ARRAY_SIZE(pdata->ldo); struct regulator_config config = { }; struct wm8994_ldo *ldo; + struct gpio_desc *gpiod; int ret; dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); @@ -145,12 +146,14 @@ static int wm8994_ldo_probe(struct platform_device *pdev) config.driver_data = ldo; config.regmap = wm8994->regmap; config.init_data = &ldo->init_data; - if (pdata) { - config.ena_gpio = pdata->ldo[id].enable; - } else if (wm8994->dev->of_node) { - config.ena_gpio = wm8994->pdata.ldo[id].enable; - config.ena_gpio_initialized = true; - } + + /* Look up LDO enable GPIO from the parent device node */ + gpiod = devm_gpiod_get_optional(pdev->dev.parent, + id ? "wlf,ldo2ena" : "wlf,ldo1ena", + GPIOD_OUT_LOW); + if (IS_ERR(gpiod)) + return PTR_ERR(gpiod); + config.ena_gpiod = gpiod; /* Use default constraints if none set up */ if (!pdata || !pdata->ldo[id].init_data || wm8994->dev->of_node) { @@ -159,7 +162,7 @@ static int wm8994_ldo_probe(struct platform_device *pdev) ldo->init_data = wm8994_ldo_default[id]; ldo->init_data.consumer_supplies = &ldo->supply; - if (!config.ena_gpio) + if (!gpiod) ldo->init_data.constraints.valid_ops_mask = 0; } else { ldo->init_data = *pdata->ldo[id].init_data; diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index 90c60524a496..fca67bd194e2 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h @@ -20,9 +20,6 @@ #define WM8994_NUM_AIF 3 struct wm8994_ldo_pdata { - /** GPIOs to enable regulator, 0 or less if not available */ - int enable; - const struct regulator_init_data *init_data; }; From patchwork Mon Feb 12 13:17:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 128062 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3201303ljc; Mon, 12 Feb 2018 05:18:16 -0800 (PST) X-Google-Smtp-Source: AH8x2244dbFfdnL5rkK1AAOZN/RYiY+Y3Sj5ejWb57FGvhmFMBGltrPUVSZjGTCsnpG/+7WWDH7W X-Received: by 2002:a17:902:5aca:: with SMTP id g10-v6mr10913731plm.334.1518441496058; Mon, 12 Feb 2018 05:18:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518441496; cv=none; d=google.com; s=arc-20160816; b=p8+gv2CGw91fRqpKQQcLN+zGDaV3nar3Jp8p92Snkwdl5hL1IBxY2rUU3AxV7NEp4S 5/7LdVpEUIrxmGLjGe9jgwERQy5a6xibvGLHdrFnOlUiTT9e/67JoNbzvYPyS914Nbzh uLgPvZOtN3FdRGomZ5iVyqj9m67NZaeIJFs9zSW5yuzCiV6YcAct5VG5zJXZRLO7AGDP M/9dM23+12sz5X6RXs3LJFpD2/1rzvHuvnosbF+Ym2KDzHOqrFf9v/xm4iKbLnSY0nnf y9w34Sm3dAQqesofpzvW2xT5OogIKVMfQbWk21M0l+JtS1tqdEqVQk+3+tQTYXa/zUpJ ukuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=F6BsZZ6T87gv6GicDPamr95JDh5j8ewzA0OgqlNdUaw=; b=Uf68D9jXIfSgJZcJ9+N4d7etuUSlbKcjCFrRwS9IdYYpiRqc/wWypPxz049V+9Jt3H NkcLrAPPS3kj88oVmeUQxMTuYbGwCKSj4uYgv8EWyxGEPFojzP4uGIbu71EmXO8NlGtQ 5VqoiqWe83yvDQ0lJBEmYLRiKLb8BxxUXCchZh0m9b38LZCn/N/bF4qDQAVJh6nSHaYc j+Bcco9JSNdzV8rdklF3UGKa87sRhSxEcHtXIMFDFjdypTReDWOq22wNlyPFk0Ax3J66 rCimrjRuuRRrY6oNS+78dy5MhfThoaeck95rnFgbx+Ck4BI1YB6My89czm95n5jRVoN3 41gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IzIhjGxa; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j15si3605235pgt.173.2018.02.12.05.18.15; Mon, 12 Feb 2018 05:18:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IzIhjGxa; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935343AbeBLNSO (ORCPT + 5 others); Mon, 12 Feb 2018 08:18:14 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:43135 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935340AbeBLNSL (ORCPT ); Mon, 12 Feb 2018 08:18:11 -0500 Received: by mail-lf0-f65.google.com with SMTP id q69so2535529lfi.10 for ; Mon, 12 Feb 2018 05:18:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ACvoXNAv1xVkiKV/TF4gUXrH37edKkz51gI4+hUpqdQ=; b=IzIhjGxaHCRTc+LkEyJ0PpR8x26A0y00sV5luY8IwUjEfB89U/sB3kw1qr8IOfJGFp 6Opx0nmOiyZ1lgHJs9px5dVpE6dZhkMh1E0Ua/jE5Kuiy6iTyWgxIDASq51t7reTzzjp PUfv3/gWnGfcVOAtwMT2BQgKuifgzfcoto6zQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ACvoXNAv1xVkiKV/TF4gUXrH37edKkz51gI4+hUpqdQ=; b=bdgQNvCGeQ6b03Y1SYATn4+dIQJDSBUBlElK/2ezaFGRELZS8OoscAcUlrGQOdFlNf qsajELWET8pBR849PkwshmZcqYImTsTE4A4awY+/VCg/Q6e1aYfBUit9HMX7v1NVU32S DE4/dCHtsU7LGUCBpPV+wW6LqBsLnufAKCDsu7uwIhovSe7WFbhU59PW2e/taF6iN+nx GwLL4NOs8Qe6Ju886GmsGIswQ9wHwnAmkmKhCbBxBaLUNIsqbEbWRTMH1E0leNTEkx9c gb4qV+Y1tUS5mU0J/MkjzUAjyxpM6m0LeFLY3Uw8tg23hiqtbBSRZRNj3lDrMZuECLk+ tQ6Q== X-Gm-Message-State: APf1xPDXJ/PNyHNkvbwD04dM/l55L8C9g9m/d0i9PUam4r6dkbLWwDPX hN7TMALWh5orsi1z7f8cO8P9VklmRqE= X-Received: by 10.46.29.23 with SMTP id d23mr405150ljd.7.1518441490100; Mon, 12 Feb 2018 05:18:10 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id r88sm1584648lje.30.2018.02.12.05.18.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 05:18:09 -0800 (PST) From: Linus Walleij To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 19/21] regulator: fixed/gpio: Update device tree bindings Date: Mon, 12 Feb 2018 14:17:15 +0100 Message-Id: <20180212131717.27193-20-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180212131717.27193-1-linus.walleij@linaro.org> References: <20180212131717.27193-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Deprecate the open drain binding for fixed regulator and indicate that we prefer this to be passed in the GPIO phandle flags. Clarify that the line inversion semantics for fixed and GPIO regulators completely overrides the active low flags in the phandle flags. Unfortunately this can not be changed to prefer that we pass the flags in the phandle: the bindings have been specified and deployed such that the presence/absence of this flag and only that controls the line inversion semantics. The crucial semantic is that the absence of the flag means the core will assume the line is active low, which in GPIO terms is an exception, as GPIO lines are normally assumed to be active high. This special device tree semantic cannot be changed without introducing a whole new compatible string for the fixed and GPIO regulators, so we just contain the situation. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- .../devicetree/bindings/regulator/fixed-regulator.txt | 13 +++++++++++-- .../devicetree/bindings/regulator/gpio-regulator.txt | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt index 4fae41d54798..60ce9cb8f891 100644 --- a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt @@ -7,10 +7,19 @@ Optional properties: - gpio: gpio to use for enable control - startup-delay-us: startup time in microseconds - enable-active-high: Polarity of GPIO is Active high -If this property is missing, the default assumed is Active low. + If this property is missing, the default assumed is Active low. + If the phandle flags to the GPIO handle also flag the line as active + low or high, that will be ignored for fixed regulators and the + presence or absence of this flag solely controls the inversion + semantics. +-vin-supply: Input supply name. + +Deprecated properties: - gpio-open-drain: GPIO is open drain type. If this property is missing then default assumption is false. --vin-supply: Input supply name. + Do not use this property in new device trees: instead use the + phandle flag to indicate to the GPIO provider that the line + should be handled as open drain. Any property defined as part of the core regulator binding, defined in regulator.txt, can also be used. diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt index dd1ed789728e..06f5cb4af052 100644 --- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt @@ -12,6 +12,10 @@ Optional properties: defualt is LOW if nothing is specified. - startup-delay-us : Startup time in microseconds. - enable-active-high : Polarity of GPIO is active high (default is low). + If the phandle flags to the GPIO handle also flag the line as + active low or high, that will be ignored for fixed regulators + and the presence or absence of this flag solely controls the + inversion semantics. - regulator-type : Specifies what is being regulated, must be either "voltage" or "current", defaults to voltage.