Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1581493

Re: [PATCH 2/4] pinctrl: samsung: Register pinctrl before GPIO

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Krzysztof Kozlowski <krzk@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] pinctrl: samsung: Register pinctrl before GPIO
Date Wed, 15 Feb 2017 18:40:01 +0100
Message-ID <tbbIB-2Ve-9@gated-at.bofh.it> (permalink)
References <talTH-2mg-3@gated-at.bofh.it> <talTI-2mg-21@gated-at.bofh.it>
X-Original-To Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8vWVOVlF3AV0njAiFaFj0CEbwyyXed7pxS4XIOKn+Bs=; b=aD9y2Wjmbu0v51xNdr+9lgjvtH7sfyop4As2iBIna4OOZ33+9bv6IxMmHcgslEHkNq FGaha/KYTAXUciNqndJPkmjCe5LoRe7k6I/nqcG6WvZKQgIGfNfunLsuEqjz4tLtTatW EqaXixzeqIh89bMqYOvL8d2DCQj9G/OAAH1D1WhSREJLjFmDkDbtRj9MHodWBtHV5bXf S7HmZLb58SqIfqdZyyAmyNRbDOeaHDtnbT2AWFdheaQLgPVI4sEhydJERGBh241ykSAd ummPyDY5bCLak/D6XsH+sFEDONm39N9fIlZFNRLi1cziPt7LbglFOg7k+GL5TfDq+kIt 4YrQ==
X-Gm-Message-State AMke39mQrTDEB4abzIT7mMe8RZgtBfRaOUTW6PaphaMERsA11iNzsgSSvmIK5moW8IP/Dw==
X-Received by 10.223.161.157 with SMTP id u29mr2569323wru.152.1487180185854; Wed, 15 Feb 2017 09:36:25 -0800 (PST)
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Disposition inline
User-Agent Mutt/1.6.2-neo (2016-08-21)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 34
Organization linux.* mail to news gateway
X-Original-Cc linus.walleij@linaro.org, tomasz.figa@gmail.com, s.nawrocki@samsung.com, linux-gpio@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com
X-Original-Date Wed, 15 Feb 2017 19:36:22 +0200
X-Original-Message-ID <20170215173622.plyut5et35lgd47e@kozik-lap>
X-Original-References <1486980666-7143-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> <1486980666-7143-2-git-send-email-ckeepax@opensource.wolfsonmicro.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1581493

Show key headers only | View raw


On Mon, Feb 13, 2017 at 10:11:04AM +0000, Charles Keepax wrote:
> If we request a GPIO hog, then gpiochip_add_data will attempt to request
> some of its own GPIOs. The driver also uses gpiochip_generic_request
> which means that for any GPIO request to succeed the pinctrl needs to be
> registered. Currently however the driver registers the GPIO and then the
> pinctrl meaning all GPIO hog requests will fail, which then in turn causes
> the whole driver to fail probe. Fix this up by ensuring we register the
> pinctrl first.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
>  drivers/pinctrl/samsung/pinctrl-samsung.c | 32 +++++++++++++++----------------

I think the code makes sense altough the description describes
theoretical issue - we do not use GPIO hogs. Of course out of tree DTS
could use them... so maybe mention that this is not an existing case?

For the code itself:
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


>  1 file changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
> index d79eada..1134bc3 100644
> --- a/drivers/pinctrl/samsung/pinctrl-samsung.c
> +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
> @@ -893,6 +893,19 @@ static int samsung_pinctrl_register(struct platform_device *pdev,
>  	return 0;
>  }
>  

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 2/4] pinctrl: samsung: Register pinctrl before GPIO Krzysztof Kozlowski <krzk@kernel.org> - 2017-02-15 18:40 +0100

csiph-web