Message ID | 20181201154151.14890-11-linus.walleij@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4934630ljp; Sat, 1 Dec 2018 07:53:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/WQLLvUGHbXruAo21rG7Ta2FM3PYw8UynPaiPmSOUns9GmpcMK5TL8FaEiFLSw7uiFCtJdd X-Received: by 2002:a62:6f49:: with SMTP id k70mr9606846pfc.7.1543679608280; Sat, 01 Dec 2018 07:53:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543679608; cv=none; d=google.com; s=arc-20160816; b=KSGBaqE7ckHySgmDCEXnTOXpWig6gO09xxXu3FUzKXWSi5TbEZU1ZDaTBDpEYl3v8y HLmal9K1weghRAUYRlgSZ0mSbt+nt2F3HUJx4EsJ/AQpH8ai71PlFEtHSErnLl5i/6M3 U6LZeUT1vy/3cXKqlIeHjky9coTxpBJqxxMCrF/gUph+4/m0jBfFEJqGNkapWVbeNZnd 75hWh5Md6fIHMQiXvgCZurGeAx1pBcFtikc1wHZftLBSsCfnawIRk2PuNLJaOzLjSd9/ s5WVMWCUIf6sVTHKQGrQc/paYMh/SuJy+3KkapzulqsXz9QksWwhxpyd2BWmfadbHNzP mcQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vSHgOcFCcORkAA/FyvR5Vyf7Y6Xs7jW379bIdSME4VA=; b=UtD8rJU8et3PXtguUWyVQ3jFAutPhiM5tDEBhb4TDfFf05tmgnh6yTF+nMMbUqvjtI HmDDySdzQCPigKVNP2BclU8TNUd98k6pniK5jxaXGtdarRzJzDSs3Ul0BFQJidAAzWo8 jl511bXVH/2X+Q63VLdHumGm9Odzl3hy3eXfCS5aJ7zrI2FQ/TZJjnv2IQ1fJF44vBbE PHNv2oDKLJ5Xnij0KfKXoksdrQf6m8Qs7IZdLxK/y6deLCqT2AOLerrMMN20kyfnQRH3 +CNdiWbZzMZEJCm1m/Dfa13Udg8r1jXI8+rXsFmY3rRhEVkMARXld8Fh4I43h7xCoOxL X9Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=awaJkCYR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q5si8120204pgr.435.2018.12.01.07.53.27; Sat, 01 Dec 2018 07:53:28 -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; dkim=pass header.i=@linaro.org header.s=google header.b=awaJkCYR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727378AbeLBDGN (ORCPT <rfc822;igor.opaniuk@linaro.org> + 32 others); Sat, 1 Dec 2018 22:06:13 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44045 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727169AbeLBDGN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 1 Dec 2018 22:06:13 -0500 Received: by mail-lf1-f67.google.com with SMTP id z13so6189539lfe.11 for <linux-kernel@vger.kernel.org>; Sat, 01 Dec 2018 07:53:23 -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 :mime-version:content-transfer-encoding; bh=vSHgOcFCcORkAA/FyvR5Vyf7Y6Xs7jW379bIdSME4VA=; b=awaJkCYRZMHwI3+jvDJmJ/DvUoUFidnG+SAaLBjW16slimg8aAoDF0vH9xZQqT9Z3k qLgLlVi3ugAetbLrtWXMjvGv/oyg6aY5udlJgo5cjBdRgeu6SOQv0q7/w7toNYRsorHK 2u4SC4UDt3vTPKpq2ir/1B/oUihVXAUfNPmeU= 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:mime-version:content-transfer-encoding; bh=vSHgOcFCcORkAA/FyvR5Vyf7Y6Xs7jW379bIdSME4VA=; b=ezqQgNtwG++5AxcYhkG1opUI4FMwow9TPXWSrFFWWj6NOi3HTD5Y6knMWfIBLG0k6o 8XMix6KMaoLRgN7PF6L1v6Uum3BdI2vvRKQySiU4euC5v3G3xOjy03GXvvwC6sCJ7QGX BxRoFsxjgYRBy5lAwFrrSx1wm4KgkR0syrXfmlS34ajJJdPLAlRNHVXHPU1M36s/qxAO S7iOzkIEwitDgRbjVYAIBaodYMypQ7m1+v0/jJeUc+9+bWaeU+C7acU5ZH5mSrriNAuF Qj3boz044Hv4X0gvztkO5BASqM38kROCQr4zsEhMnt+q7iuswC55oh2FHwLWbO/L+0my oV/A== X-Gm-Message-State: AA+aEWa2JMi/LY4O1YGFotDbQORdv3n6NPh5jrAgwzPy4CNfo8Sgxqj/ K2VVDmoqlMetZ+imf2ek+QaCIw== X-Received: by 2002:a19:a84e:: with SMTP id r75mr6058120lfe.45.1543679602693; Sat, 01 Dec 2018 07:53:22 -0800 (PST) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id 13-v6sm1365426ljj.49.2018.12.01.07.53.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Dec 2018 07:53:21 -0800 (PST) From: Linus Walleij <linus.walleij@linaro.org> To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org> Cc: linux-kernel@vger.kernel.org, Charles Keepax <ckeepax@opensource.cirrus.com>, Bartosz Golaszewski <bgolaszewski@baylibre.com>, Marek Szyprowski <m.szyprowski@samsung.com>, Linus Walleij <linus.walleij@linaro.org> Subject: [PATCH 10/13 v2] regulator: da9211: Hand over GPIO to regulator core Date: Sat, 1 Dec 2018 16:41:48 +0100 Message-Id: <20181201154151.14890-11-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181201154151.14890-1-linus.walleij@linaro.org> References: <20181201154151.14890-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
Regulator ena_gpiod fixups
|
expand
|
diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c index 8f68c7a05d27..109ee12d4362 100644 --- a/drivers/regulator/da9211-regulator.c +++ b/drivers/regulator/da9211-regulator.c @@ -389,6 +389,12 @@ static int da9211_regulator_init(struct da9211 *chip) else config.ena_gpiod = NULL; + /* + * Hand the GPIO descriptor management over to the regulator + * core, remove it from GPIO devres management. + */ + if (config.ena_gpiod) + devm_gpiod_unhinge(chip->dev, config.ena_gpiod); chip->rdev[i] = devm_regulator_register(chip->dev, &da9211_regulators[i], &config); if (IS_ERR(chip->rdev[i])) {
The GPIO descriptors used by the DA9211 driver are retrieved during probe() and it is really helpful to have those under devres management because of all the errorpaths in the intialization. Using the new dev_gpiod_unhinge() call we can remove the devres management of the descriptor right before handing it over to the regulators core. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- ChangeLog v1->v2: - New patch handling this drivers GPIO descriptors properly. --- drivers/regulator/da9211-regulator.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.19.1