From: Clement LE GOFFIC <clement.legoffic@foss.st.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: <linux-kernel@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
<devicetree@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/9] pinctrl: stm32: Introduce HDP driver
Date: Tue, 25 Feb 2025 17:05:14 +0100 [thread overview]
Message-ID: <b074941f-3c6a-4b98-a00e-d22d18280ef5@foss.st.com> (raw)
In-Reply-To: <1990c649-668e-4ae9-82b5-ed9931f41ec4@kernel.org>
On 2/25/25 13:59, Krzysztof Kozlowski wrote:
> On 25/02/2025 09:48, Clément Le Goffic wrote:
>> This patch introduce the driver for the Hardware Debug Port available on
>
> Please do not use "This commit/patch/change", but imperative mood. See
> longer explanation here:
> https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
Ok
>
>> STM32MP platforms. The HDP allows the observation of internal SoC
>> signals by using multiplexers. Each HDP port can provide up to 16
>> internal signals (one of them can be software controlled as a GPO)
>
>
>
> ....
>
>> +
>> +static int stm32_hdp_suspend(struct device *dev)
>> +{
>> + struct stm32_hdp *hdp = dev_get_drvdata(dev);
>> +
>> + hdp->gposet_conf = readl_relaxed(hdp->base + HDP_GPOSET);
>> +
>> + pinctrl_pm_select_sleep_state(dev);
>> +
>> + clk_disable_unprepare(hdp->clk);
>> +
>> + return 0;
>> +}
>> +
>> +static int stm32_hdp_resume(struct device *dev)
>> +{
>> + struct stm32_hdp *hdp = dev_get_drvdata(dev);
>> + int err;
>> +
>> + err = clk_prepare_enable(hdp->clk);
>> + if (err)
>> + return dev_err_probe(hdp->dev, err, "Failed to prepare_enable clk");
>
>
> That's wrong, it is not a probe path.
Indeed
>
>> +
>> + writel_relaxed(HDP_CTRL_ENABLE, hdp->base + HDP_CTRL);
>> + writel_relaxed(hdp->gposet_conf, hdp->base + HDP_GPOSET);
>> + writel_relaxed(hdp->mux_conf, hdp->base + HDP_MUX);
>> +
>> + pinctrl_pm_select_default_state(dev);
>> +
>> + return 0;
>> +}
>> +
>> +DEFINE_SIMPLE_DEV_PM_OPS(stm32_hdp_pm_ops, stm32_hdp_suspend, stm32_hdp_resume);
>> +
>> +static struct platform_driver stm32_hdp_driver = {
>> + .probe = stm32_hdp_probe,
>> + .remove = stm32_hdp_remove,
>> + .driver = {
>> + .name = DRIVER_NAME,
>> + .pm = pm_sleep_ptr(&stm32_hdp_pm_ops),
>> + .of_match_table = stm32_hdp_of_match,
>> + }
>> +};
>> +
>> +module_platform_driver(stm32_hdp_driver);
>> +
>> +MODULE_ALIAS("platform:" DRIVER_NAME);
>
>
> You should not need MODULE_ALIAS() in normal cases. If you need it,
> usually it means your device ID table is wrong (e.g. misses either
> entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute
> for incomplete ID table.
>
Ok
>
>
> Best regards,
> Krzysztof
Best regards,
Clément
next prev parent reply other threads:[~2025-02-25 17:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 8:47 [PATCH 0/9] Introduce HDP support for STM32MP platforms Clément Le Goffic
2025-02-25 8:48 ` [PATCH 1/9] dt-bindings: pinctrl: stm32: Add HDP includes for stm32mp platforms Clément Le Goffic
2025-02-25 13:01 ` Krzysztof Kozlowski
2025-02-25 15:46 ` Clement LE GOFFIC
2025-02-26 7:19 ` Krzysztof Kozlowski
2025-02-25 8:48 ` [PATCH 2/9] dt-bindings: pinctrl: stm32: Introduce HDP Clément Le Goffic
2025-02-25 13:04 ` Krzysztof Kozlowski
2025-02-25 15:51 ` Clement LE GOFFIC
2025-02-26 7:21 ` Krzysztof Kozlowski
2025-02-26 10:52 ` Clement LE GOFFIC
2025-02-26 15:05 ` Krzysztof Kozlowski
2025-02-27 11:05 ` Clement LE GOFFIC
2025-02-25 8:48 ` [PATCH 3/9] pinctrl: stm32: Introduce HDP driver Clément Le Goffic
2025-02-25 12:59 ` Krzysztof Kozlowski
2025-02-25 16:05 ` Clement LE GOFFIC [this message]
2025-02-25 8:48 ` [PATCH 4/9] MAINTAINERS: Add Clément Le Goffic as STM32 HDP maintainer Clément Le Goffic
2025-02-25 8:48 ` [PATCH 5/9] ARM: dts: stm32: add Hardware debug port (HDP) on stm32mp13 Clément Le Goffic
2025-02-25 8:48 ` [PATCH 6/9] ARM: dts: stm32: add Hardware debug port (HDP) on stm32mp15 Clément Le Goffic
2025-02-25 8:48 ` [PATCH 7/9] ARM: dts: stm32: add Hardware debug port (HDP) on stm32mp25 Clément Le Goffic
2025-02-25 13:05 ` Krzysztof Kozlowski
2025-02-25 16:09 ` Clement LE GOFFIC
2025-02-26 7:23 ` Krzysztof Kozlowski
2025-02-26 9:33 ` Alexandre TORGUE
2025-02-26 15:08 ` Krzysztof Kozlowski
2025-02-26 15:30 ` Alexandre TORGUE
2025-02-26 16:54 ` Alexandre TORGUE
2025-02-26 21:27 ` Krzysztof Kozlowski
2025-02-26 21:26 ` Krzysztof Kozlowski
2025-02-26 21:31 ` Krzysztof Kozlowski
2025-02-27 12:16 ` Alexandre TORGUE
2025-02-25 8:48 ` [PATCH 8/9] ARM: dts: stm32: add alternate pinmux for HDP pin and add HDP pinctrl node Clément Le Goffic
2025-02-25 8:48 ` [PATCH 9/9] ARM: dts: stm32: add Hardware debug port (HDP) on stm32mp157c-dk2 board Clément Le Goffic
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=b074941f-3c6a-4b98-a00e-d22d18280ef5@foss.st.com \
--to=clement.legoffic@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--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-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=robh@kernel.org \
/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