Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8200437imu; Tue, 4 Dec 2018 04:45:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xde6BsMmu+4VPBGVeVJwwTV6gNeKKSbkZCK7ooj6ETUfUKcp0p+/+ypkkHB+3LIcsa0rae X-Received: by 2002:a63:4d0e:: with SMTP id a14mr16751752pgb.408.1543927536944; Tue, 04 Dec 2018 04:45:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543927536; cv=none; d=google.com; s=arc-20160816; b=gZVWO+RpVV845eNXSvPgmM3x6hzxnShAAP2nw/B/ced+YLh8I8z1UU8Q5/1hTLaBCE PGEJWAtJkTU3qW/Fih+x0Bv0TKiRWhQsPMc9nGNhyPoTmIN0Z1h9tXqwkEqFR3nCFUFT 8ByxCQdT25KU9eq1GtprRRotD6xhfE4rDUKXZdLAm9aNfUNITXTytRa2jQpr7195+Nh+ 322DudOli/XVPeP1nq7OIffL7ES+IGQ/I9j/sENELJCoB4LRefYTuVhH8uxDEeP2lujV ObyZCnPBV7dLXZ3c41XlSF1A/xpfuZrO/Q0w9aBGUukdkNWZcKXXQ37rl0A7DSyD4rvx HN5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=L5Hzb6QsBrQAfqrIo1HlcaC9gcG+3D712ZJiFspxuz8=; b=QCb3QYssACjzzJMJqVed88Gy8sES+/EzVmSlMeoK/R5kUTmqvU82XML95pOqb2Zjox Zdax9ztuUnoDDg875tEeauVQ8eWHCU3ffCiYuEiZW29USge/bltQeCN/eG0FP37WZHVA XQZfeohWC7GvistesR0CsTfxyKgK0ZbkzoMsmxYJ19Cw9OX025heQ+TD3RgiqLln629e Z1yzOz0gBC4qsmoIKdvm0P0hnWUpxEKuNFv1EyHw3PGq0dYAHqFPr4lbF0wBCnG6uspJ w4gDXbgYRHLqbBootIJi0WkZH9Me8jw12BEmOfM/1xi4BFrHJPv9GYR4voldavGGtABi MzQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BwF4cBH6; 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 d127si17194503pfg.255.2018.12.04.04.45.20; Tue, 04 Dec 2018 04:45:36 -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=BwF4cBH6; 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 S1726192AbeLDMoq (ORCPT + 99 others); Tue, 4 Dec 2018 07:44:46 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:43395 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbeLDMop (ORCPT ); Tue, 4 Dec 2018 07:44:45 -0500 Received: by mail-lf1-f67.google.com with SMTP id u18so11834038lff.10 for ; Tue, 04 Dec 2018 04:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L5Hzb6QsBrQAfqrIo1HlcaC9gcG+3D712ZJiFspxuz8=; b=BwF4cBH69EO7ZU/dG1VzCxfD0uL7S7+fwZjCFPLGqFW4InnQBElWNlC8qlXLbPdjy/ 2znRIr0cVcYAFqSlt1FwI5QIiSg+aXifzPq7CEcB2sCBWXpaUX7M5URbewQo28ajTdmB 3dDb5nP8hKPl4eqsHgFGiG+0Roa4Rluo+YoyI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L5Hzb6QsBrQAfqrIo1HlcaC9gcG+3D712ZJiFspxuz8=; b=qfLZsxhMLt0P/9clTVYEq4aHRxoVm0nKQ5tti1S1HQkI6NyZBvVXrcs0o6gMD76NGJ ajFlPZwlaW1UjDF4d0Duc/b+85SeACmcBtXIvXYOW5Mj4DGU0b/l/MdS44F6UwLVEe/E TnEU8YQaxa/ugjdaqA/MynkwFa4u+v67bKOZ8oM4iKDyZza9b73rwOz8fi/wmR2JeSt1 4pDNkcu1wTqvqppzwza1xqFd67Wdgnx3Zd9d9iv37tWmc6AUGcyUPywWPyo4dF3vc+Av 9krsZf+lceMKVA8h9Re/nXoMQi16XLsyG4uquUkROZlxkiPYdiWQyJJH/LUaurptjZ3Q vHSg== X-Gm-Message-State: AA+aEWZaP1JPeb7GtUPUN4zMVy/mtO/GKcSB2G1HVw10v5/q1wF1XGrG ILIHI4a79qO8c0KMLnen6OM1MWxqy0hlBnWXFg2FPg== X-Received: by 2002:a19:f813:: with SMTP id a19mr11207810lff.67.1543927482386; Tue, 04 Dec 2018 04:44:42 -0800 (PST) MIME-Version: 1.0 References: <20181201154151.14890-1-linus.walleij@linaro.org> <455ced52-e444-66f2-7dec-9d37bdd5116c@samsung.com> In-Reply-To: <455ced52-e444-66f2-7dec-9d37bdd5116c@samsung.com> From: Linus Walleij Date: Tue, 4 Dec 2018 13:44:30 +0100 Message-ID: Subject: Re: [PATCH 00/13 v2] Regulator ena_gpiod fixups To: Marek Szyprowski Cc: Liam Girdwood , Mark Brown , "linux-kernel@vger.kernel.org" , Charles Keepax , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 4, 2018 at 11:33 AM Marek Szyprowski wrote: > >> Artik5 evaluation board (arch/arm/boot/dts/exynos3250-artik5-eval.dtb): > >> s2mps11-pmic s2mps14-regulator: Failed to get control GPIO for 11/LDO12 > > Question: this is supposed to fail, right? It is something > > like a probe deferral or nonexisting GPIO controller? > > It looks that the issue has been introduced earlier, but I didn't notice it. Sorry :( > gpiod_get_from_of_node() doesn't handle GPIOD_FLAGS_BIT_NONEXCLUSIVE > flag, the rest is just a result of it. OK I see. > Here we have a case, where 2 regulators provided by s2mps11 driver have > a common gpio enable line (by PMIC design), so s2mps11 calls > devm_gpiod_get_from_of_node() 2 times for exactly the same gpio descriptor. > > Fixing gpiod_get_from_of_node() for GPIOD_FLAGS_BIT_NONEXCLUSIVE is trivial: I will add a patch like this to the series! > With the above fix I still however get 2 warnings from devres functions, > but this is probably caused by adding the same entry 2 times to the list > without proper refcounting... I will check that later. Ah I see this regulator driver really excercise all corner cases of these nonexclusive GPIO lines. (Which is good!) Indeed devres is not going to like adding the same thing twice. I just sent a fix for that, subject: "gpio: devres: Handle nonexclusive GPIOs" you could perhaps try it on top of this series? I intend to merge that separately as a fix for current, as it is a bug. Yours, Linus Walleij