Message ID | 20181201154151.14890-14-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-v6csp4934708ljp; Sat, 1 Dec 2018 07:53:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/VdlJxPscL9etRfsCOmlt2ZvwBStFHlcBCX9FvhkKNQuudKp8ZJwRXvFsbRoP2dweoc9IAL X-Received: by 2002:a62:220d:: with SMTP id i13mr9629288pfi.162.1543679613882; Sat, 01 Dec 2018 07:53:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543679613; cv=none; d=google.com; s=arc-20160816; b=p6TnqPtqEj02vDhIrIrwlBhwEb/emEv6/cIgsMqXPiDQ8nIeyVwYFdgQVwmkpexcGa djnojr1ikr012O/Eu+9ezQL3DC70SzChnyRrzo1y7YOxssYPy6l3zOgdj5ukAexeRdBe effsj3sJfA4w6u3ZT6aSlZ5rwRhLef65XJUXyzRJs0Ld5G5fwd1d67/hRxTMisuH/Xku 7/RJXgLdXFIkknGVxLOvtAOW1dcgWlbwDLk44beLLIBFBtgEx7cwa18SFLByTPqI4Wse IfcnshOGeUwrm51CJuR+IDzKEl5k3AawWAfUs7wb+Fu4NfLpp3oG6gAoFlBdBe8bbpTO iqoA== 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=6Lls7K5eWZynQmqU5NrZXBxowzW5loY4n6CUGHliIq8=; b=pRor1q8SRKaCmLnOVZNeSFcpb831gBUqpM/5SN5S8sTrLb6geGAcn96+S81ssFm+Gg ubk6xtcJwPGRlYrLaf5tnMdQk5wd8bertGA6mQlkbB1WXF03jCZJq27j9DUnLZBuV91v VHTuiC7yOSLUPJXHS+lsx0x1EOepS/IR/ri1Z0KaIymFeCAtGji5T1cvo//wfbETzbFc TDRLo3fYFu7RzCPuzrGxXc+8XHjcxmqpQfj1D57HVpCNJOVKPBnMG8msL+ByNa7+ehrK obx7hf45TdUeTYa+KhG1oUkGQFHQFh/MiwTlUPj68MDCJMDzPHxbFB+m1DxVH3AxPO+6 MGOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FeW6gnbR; 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 i5si8204825pgn.243.2018.12.01.07.53.33; Sat, 01 Dec 2018 07:53:33 -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=FeW6gnbR; 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 S1727440AbeLBDGU (ORCPT <rfc822;igor.opaniuk@linaro.org> + 32 others); Sat, 1 Dec 2018 22:06:20 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:45469 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727379AbeLBDGT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 1 Dec 2018 22:06:19 -0500 Received: by mail-lj1-f193.google.com with SMTP id s5-v6so7617268ljd.12 for <linux-kernel@vger.kernel.org>; Sat, 01 Dec 2018 07:53:29 -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=6Lls7K5eWZynQmqU5NrZXBxowzW5loY4n6CUGHliIq8=; b=FeW6gnbRXbyaMhFsZRlumaUdm7FLVYSMd/t1qOlZIaTIy/2g1u5mGlgMnAdzWfabOY GIiDVg3frCCe80lRDrECMG3kgcvqoxIaMqax9RcJKTq2EOKR5uYt1zUWtUkhNcGmTvb0 XpHGcT7rsJo0bbfB0bQnOJLWQFY7FCGjH3hd0= 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=6Lls7K5eWZynQmqU5NrZXBxowzW5loY4n6CUGHliIq8=; b=FDyXupEqNZsFQ0Hi+6lqdqZ48iFhTlCkZDyX0WDaibR3c3Nfq6XX9CN6Q4eDHIXJAZ XR8O4wX6DmC0KTM/sLfBtQODFWPUu29j79IuvVVqZa9LAPN6B7U4nIJ2IlZ6F7a/3gip ecns/Dh3fK5h9RIo4vnhTlnmNh+LMJyQO/1qV/8Ee3t4sBI12xXdcBcQNczeYjH3Zp2f OhzsyDZFU7Tx8OvlxIORhgQYHZ6MO8yEnJEoQ+MUfi8jfun6ktcKRaKazWTymXXP8cJe 5SLr06ZVT1KcrHyhtH+j/M+a34/krCRjqQzkCdE5fixsrbbU+v26HJBtehAl4ToOXBDY uQOA== X-Gm-Message-State: AA+aEWa4kwKftchjCiDUnUZdUi8YrNRqfEGeqMr66Pa4fpIIjKGEy2g5 iNuhZztiXbXSbRaGIWBklmEsNKGdkID2mw== X-Received: by 2002:a2e:8546:: with SMTP id u6-v6mr6163700ljj.95.1543679609033; Sat, 01 Dec 2018 07:53:29 -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.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Dec 2018 07:53:28 -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 13/13 v2] regulator: s2mps11: Hand over GPIO to regulator core Date: Sat, 1 Dec 2018 16:41:51 +0100 Message-Id: <20181201154151.14890-14-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/s2mps11.c b/drivers/regulator/s2mps11.c index 63e66f485cc0..ee4a23ab0663 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -1178,7 +1178,12 @@ static int s2mps11_pmic_probe(struct platform_device *pdev) config.of_node = rdata[i].of_node; } config.ena_gpiod = s2mps11->ext_control_gpiod[i]; - + /* + * Hand the GPIO descriptor management over to the regulator + * core, remove it from devres management. + */ + if (config.ena_gpiod) + devm_gpiod_unhinge(&pdev->dev, config.ena_gpiod); regulator = devm_regulator_register(&pdev->dev, ®ulators[i], &config); if (IS_ERR(regulator)) {
The GPIO descriptors used by the S2MPS11 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/s2mps11.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.19.1