Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp981938imu; Wed, 28 Nov 2018 02:45:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/V2JppCBLrk5SogD7pXHnb0PX6XLpLsRU5a/Zu7ufsjSIfNa1BI0FaPcLZDMVL9N0PBxMTB X-Received: by 2002:a17:902:e002:: with SMTP id ca2mr36938338plb.103.1543401914519; Wed, 28 Nov 2018 02:45:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543401914; cv=none; d=google.com; s=arc-20160816; b=J0ta7IDXTPMFCBerJ5PGMDIH0Si+KsYvUx/USUkCpItiLo/T3aLYiYsKBg/rJUnWcg iO261mXGg2c8BohrQeFTVhmxZWVw8pN1OWL4QGQ9ThsIiPwYbBik2Flde0x3bmnE1jwP zOk785jVL+ybKbacc4Sq5hvEUdoOCbGrslOC5ZOMIkRAYR7xlT9N5R6W1dJcmgqK7gqH D1thWerkxKb+QvlPflNUVO0qzvr5fMZyOOUUm5F1g6UXR2gZJQ+uOqF+nmWp5dLvIcK6 0mJrY0dLyYq9wR9d9N4aQOAXAkoLPNm0R3qjkAQ19UStWaXUlcA6ta7Dy4ClLK2e0k3N KrUw== 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 s11si6721976pgk.344.2018.11.28.02.44.59; Wed, 28 Nov 2018 02:45: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 S1728288AbeK1VpZ (ORCPT + 99 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 Content-Transfer-Encoding: 8bit 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(-) 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, -- 2.19.1