From patchwork Wed Nov 28 10:43:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 152246 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp923664ljp; Wed, 28 Nov 2018 02:44:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/X/MISudQhHVKgE0F/Q095pNfI2Dh3/cDWK40D8eTLp8CEuPiLBwxV7e6jaH2k3t4fZe5kW X-Received: by 2002:a63:1e56:: with SMTP id p22mr28991953pgm.126.1543401857948; Wed, 28 Nov 2018 02:44:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543401857; cv=none; d=google.com; s=arc-20160816; b=yronq0Z8vFgphow/dWJ18fe1NNV9SpNiLfFijdAZAOaMWtGTEFsfpvtcw7e+2nN39W 4oOj9wQ+La9IZ1+A7hbdK1fhBAiFQ7sOTugElCSPgb0FxVrHqSYGCNRhhYKGlg4pOwA8 /8lrStwSN1cwTVOV4m4gbKLxippnnD8n+2YZVKEpWTQNuGfxWNztqxBBnd0HKoeoKAKT wXm3kK6pwBDYdY41zezmoxAxKqnlPyFFdIXoOFBZDqqCl14UaagIVY6l7NwxrT60002W BXtYuGwV199IZNM3gdAJqF806YDvOAhtfEHRNN0/3jAloGf6LRPM2fO5sh8+g5ck+qxn Hnwg== 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=hQwrbOX6jWVhS2xXND6mp6kD61Itg1CrwK7UbFAIOVk=; b=Qc5D18PtFVUNRynSJYM5SW6XeBWwJRewlXsd/5C2zFCw5a2gtUky4nNy/0u0ZhdAd+ xocUqGtLp9TRgc2WvMJPhZgrd2VenLV1PLSqaSTkfVjBuN2FT21xfHNYlEJv7Pj/dnYK CyeCe7hp7AnRFDjGG0fewU6xew8V7NNmslULPc72dNhUaVL7seYsYMR+WwiQ7FiiIoLI cwsnNXjqdS6wgegxZu1IjwFLI4nEs3ZW78qJGX1Kmj0xn/7g66cdlWJ4WcWt0dLEHjZ1 JSeojPn6c9h5L0CuOogmJBbP8N5CAL+WLzPbmLLidV/hZauxyd6SKZuuQV8wCtDTElHK OjWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S9WNOSG0; 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.17; Wed, 28 Nov 2018 02:44:17 -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=S9WNOSG0; 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 S1728332AbeK1Vp2 (ORCPT + 32 others); Wed, 28 Nov 2018 16:45:28 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45593 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728119AbeK1Vp1 (ORCPT ); Wed, 28 Nov 2018 16:45:27 -0500 Received: by mail-lf1-f66.google.com with SMTP id b20so18953315lfa.12 for ; Wed, 28 Nov 2018 02:44:13 -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=hQwrbOX6jWVhS2xXND6mp6kD61Itg1CrwK7UbFAIOVk=; b=S9WNOSG03IE7X5xnnj7NI1JR1pvp3focVQkkb+B92qtxxF46HE4HtXk666CL9U6FV4 l/knRppcviKlsAIuZP938PhblJ0MYGUBJorly1o1esaVcTu0P9xhphSBJC72KMQg/NwA 9Ejf0J0UEVydxS2VUeyIKW0SonhMCFurYqLFg= 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=hQwrbOX6jWVhS2xXND6mp6kD61Itg1CrwK7UbFAIOVk=; b=MLl6Y6KkeAityWtBkfmGAJ1nTDiyVtDaFbCjNapywnNBvbuRl0QzlAHUmKudlD8cUc /vn2+HSAkZQxPcEKKwUfrN1niEX2fymPynDI1c16tv087/1DNPSsVN/pj/bxxZOS/oJm jFE6T4E9/QRWFa8FwWyZnTfxsOZD66zftOqNlip+LU4DvGaLo+Iw26jhqxZWi6uziluX Te5YYvwOiMnS+TeBNWE87BE28WKiWHhb7ezAnjECO6j6NB8UlnCxKjCW86VwErCBUpyh aBC17dX2h0T4DaZxL0k6QIbNWZ5SCLrHBWsCPzh4M+5F5Smf0ToDF2Rr3HGPYHpETZnw xNGw== X-Gm-Message-State: AA+aEWYOC1pVFAEsFzlzCMxD2RwTyMP0GR9uF7SbYwXe8rUshSqHh2A5 2JBevNZzsKC96jxyeADbrPD+QA== X-Received: by 2002:a19:c115:: with SMTP id r21mr2302710lff.144.1543401852268; Wed, 28 Nov 2018 02:44:12 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Nov 2018 02:44:11 -0800 (PST) From: Linus Walleij To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, Charles Keepax , Bartosz Golaszewski , Linus Walleij Subject: [PATCH 08/10] regulator: max77686: Let core handle GPIO descriptor Date: Wed, 28 Nov 2018 11:43:48 +0100 Message-Id: <20181128104350.31902-9-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. Fixes: 96392c3d8ca4 ("regulator: max77686: Pass descriptor instead of GPIO number") Signed-off-by: Linus Walleij --- drivers/regulator/max77686-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.19.1 diff --git a/drivers/regulator/max77686-regulator.c b/drivers/regulator/max77686-regulator.c index f5cee1775905..236cd42002f0 100644 --- a/drivers/regulator/max77686-regulator.c +++ b/drivers/regulator/max77686-regulator.c @@ -255,8 +255,7 @@ static int max77686_of_parse_cb(struct device_node *np, case MAX77686_BUCK8: case MAX77686_BUCK9: case MAX77686_LDO20 ... MAX77686_LDO22: - config->ena_gpiod = devm_gpiod_get_from_of_node(max77686->dev, - np, + config->ena_gpiod = gpiod_get_from_of_node(np, "maxim,ena", 0, GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,