From: Krzysztof Kozlowski <krzk@kernel.org>
To: "André Draszik" <andre.draszik@linaro.org>,
"Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Rob Herring" <robh@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Tomasz Figa" <tomasz.figa@gmail.com>,
"Peter Griffin" <peter.griffin@linaro.org>
Cc: Will McVicker <willmcvicker@google.com>,
Sam Protsenko <semen.protsenko@linaro.org>,
kernel-team@android.com, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] pinctrl: samsung: support a bus clock
Date: Fri, 3 May 2024 11:13:06 +0200 [thread overview]
Message-ID: <c39eab66-4e78-4f24-bcaf-003161b38ed0@kernel.org> (raw)
In-Reply-To: <c4c73732595b067369a6c8d71508d54358962552.camel@linaro.org>
On 02/05/2024 12:41, André Draszik wrote:
> On Thu, 2024-05-02 at 09:46 +0200, Krzysztof Kozlowski wrote:
>> On 02/05/2024 09:41, Tudor Ambarus wrote:
>>>>
>>>> @@ -223,6 +268,13 @@ static void exynos_irq_release_resources(struct irq_data *irqd)
>>>> shift = irqd->hwirq * bank_type->fld_width[PINCFG_TYPE_FUNC];
>>>> mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1;
>>>>
>>>> + if (clk_enable(bank->drvdata->pclk)) {
>>>> + dev_err(bank->gpio_chip.parent,
>>>> + "unable to enable clock for deconfiguring pin %s-%lu\n",
>>>> + bank->name, irqd->hwirq);
>>>> + return;
>>>
>>> but here we just print an error. I guess that for consistency reasons it
>>> would be good to follow up with a patch and change the return types of
>>> these methods and return the error too when the clock enable fails.
>>
>> That's a release, so usually void callback. The true issue is that we
>> expect release to always succeed, I think.
>>
>> This points to issue with this patchset: looks like some patchwork all
>> around the places having register accesses. But how do you even expect
>> interrupts and pins to work if entire pinctrl block is clock gated?
>
> I was initially thinking the same, but the clock seems to be required for
> register access only, interrupts are still being received and triggered
> with pclk turned off as per my testing.
Probably we could simplify this all and keep the clock enabled always,
when device is not suspended. Toggling clock on/off for every pin change
is also an overhead. Anyway, I merged the patches for now, because it
addresses real problem and seems like one of reasonable solutions.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-05-03 9:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 13:25 [PATCH v3 0/2] clock support for Samsung Exynos pin controller (Google Tensor gs101) André Draszik
2024-04-26 13:25 ` [PATCH v3 1/2] dt-bindings: pinctrl: samsung: google,gs101-pinctrl needs a clock André Draszik
2024-04-26 13:25 ` [PATCH v3 2/2] pinctrl: samsung: support a bus clock André Draszik
2024-05-02 7:41 ` Tudor Ambarus
2024-05-02 7:46 ` Krzysztof Kozlowski
2024-05-02 10:41 ` André Draszik
2024-05-03 9:13 ` Krzysztof Kozlowski [this message]
2024-05-03 9:30 ` André Draszik
2024-04-29 17:28 ` [PATCH v3 0/2] clock support for Samsung Exynos pin controller (Google Tensor gs101) Krzysztof Kozlowski
2024-04-29 17:45 ` Krzysztof Kozlowski
2024-04-29 20:06 ` André Draszik
2024-04-29 20:11 ` André Draszik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c39eab66-4e78-4f24-bcaf-003161b38ed0@kernel.org \
--to=krzk@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=andre.draszik@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel-team@android.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=robh@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=semen.protsenko@linaro.org \
--cc=tomasz.figa@gmail.com \
--cc=tudor.ambarus@linaro.org \
--cc=willmcvicker@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).