From patchwork Wed Nov 28 10:43:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 152245 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp923613ljp; Wed, 28 Nov 2018 02:44:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/UkYCtnZ1GLRgrq5D2lJ+UkjZU3OaC1pkQCGLUIIN+uik/iElJl6ldHUzRbphLQ2mjLlocy X-Received: by 2002:a62:4181:: with SMTP id g1mr13494207pfd.45.1543401854891; Wed, 28 Nov 2018 02:44:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543401854; cv=none; d=google.com; s=arc-20160816; b=QCicsBLNIE6eqT3/90EmF7z8jVVikOhA5/c7yybtIp/Id1J4WA6w21engN457u7Eky Z4LHlG/t1xEN9T38B7PghcmdwUDMTwx/WHNLzoEthyMh0ODElou5reS4KSPTyMFBMS0g NIGP+cYZfgB/9uHm3SYcYH5LAUMfHy5izs3ETpVbAUlk+eEWdsI8liDHqzo729cNUhD8 ziHkYCBthLr3MhhwvqSmgGOQYdyR1QcNf/c6ojGHJ3zjy1QRfC8rvJfiKbyq8UlI6Ssl krbtF3Z3HGfvvFCb79f94eZfdDQDJtk+ePhyC2JuwV1ihMWM5BuvO7a8nDexosk+aU/O uySA== 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=Qj9cUi+6gOc4BrcoirROwJkL8i1x0/qXXxenGaYp240=; b=diFOKB9Fg/T3J7B4GN+wtUdXCFUB9hQIAaSuZkVrXOjGZ9VPR5vZtloQOCaNeagA6i tEMT167iVxHmOjuzRUrV/5FChJk1Gjmo5yjawflBLX5fH6JR32n9/5qUSTSI1MKV19y5 qqb44zsmq6qw0AeGt/iDjKr08APWovMJlXmTAGAVJ2NZn3JUn33S/jwduahxpaE9zPBz 1HebH+s5XVs+uqYWQn32olHqyY84OxDAiB2NCoCpXIIZ04Ny7Twn8prhTCJ+b96mhsdN gCfZzkqkq33a57OFCeQyh7E0RqQqATz3MsQwnrVrESDH/Bk4siZEkMoniOkL+WVgQEHT OaWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OTei0WA3; 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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si6837725pgh.132.2018.11.28.02.44.14; Wed, 28 Nov 2018 02:44:14 -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=OTei0WA3; 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 S1728296AbeK1VpZ (ORCPT + 32 others); Wed, 28 Nov 2018 16:45:25 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:33253 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728119AbeK1VpY (ORCPT ); Wed, 28 Nov 2018 16:45:24 -0500 Received: by mail-lf1-f66.google.com with SMTP id i26so18981323lfc.0 for ; Wed, 28 Nov 2018 02:44:11 -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=Qj9cUi+6gOc4BrcoirROwJkL8i1x0/qXXxenGaYp240=; b=OTei0WA3qfzGmNXPR3XuoQKPZLjzXRefTJ2Tk31d9PYPDSSk1N0bdc6Ajoy1oSNhH6 5eu7YJSbSbCWKXP/Su9QydV4Raw7CJ6jBqJleOUfwhHyq2E1AVnybFJCuOqVmeebovcK DKfbYeyKEVhr4ajup+HMSJW18keAtNx18+BUI= 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=Qj9cUi+6gOc4BrcoirROwJkL8i1x0/qXXxenGaYp240=; b=NoF4Y/GQz4SX+tooWLq/x0+/Icla/FzVVYezOHG+zAXlFZJp9iRM6uNzJiQzCtWATs Zusgn1vxcB8F9cYhVR11zinfaObqHLzrLr4NZcDs0piuUw6rMQ0a9xuzaTXefZUCV5Zk sZa2Tsm/+/VmINInO855b9rz5OSDodNlFqPO6tFwwlwTu5PU+DJHaTuzRR2qeKKgbZC5 ryH4FW+DjF7RREH3Lh+sgJ00ZEaU384lunw/zKe9PJw4k41Z05IrlBhYZrOB4+NdzZ/D ZZLSKuHUM8KkYy7jawTlVzGI6mo3No1mgkYm61o+l3/hYrT/KoaW/NUvLQ2gF9omOmGt RogQ== X-Gm-Message-State: AGRZ1gKP9c8DJiIE/FGrOI21KFvRwC/aCFrTHIwW9CqJMox0vpOJnRgM 1ocGjpZdHsddGabD0Y4cU6HW4Q== X-Received: by 2002:a19:54d7:: with SMTP id b84mr20234596lfl.131.1543401850175; Wed, 28 Nov 2018 02:44:10 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id c20sm1095101lfj.67.2018.11.28.02.44.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Nov 2018 02:44:09 -0800 (PST) From: Linus Walleij To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, Charles Keepax , Bartosz Golaszewski , Linus Walleij Subject: [PATCH 07/10] regulator: da9211: Let core handle GPIO descriptors Date: Wed, 28 Nov 2018 11:43:47 +0100 Message-Id: <20181128104350.31902-8-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128104350.31902-1-linus.walleij@linaro.org> References: <20181128104350.31902-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the gpiod_get_from_of_node() rather than the devm_* version so that the regulator core can handle the lifecycle of these descriptors. This patch requires "gpio: Export gpiod_get_from_of_node()" to be applied first. Fixes: 11da04af0d3b ("regulator: da9211: Pass descriptors instead of GPIO numbers") Signed-off-by: Linus Walleij --- drivers/regulator/da9211-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.19.1 diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c index 8f68c7a05d27..bfdead356526 100644 --- a/drivers/regulator/da9211-regulator.c +++ b/drivers/regulator/da9211-regulator.c @@ -293,8 +293,8 @@ static struct da9211_pdata *da9211_parse_regulators_dt( pdata->init_data[n] = da9211_matches[i].init_data; pdata->reg_node[n] = da9211_matches[i].of_node; - pdata->gpiod_ren[n] = devm_gpiod_get_from_of_node(dev, - da9211_matches[i].of_node, + pdata->gpiod_ren[n] = + gpiod_get_from_of_node(da9211_matches[i].of_node, "enable", 0, GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,