From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Valentin Caron <valentin.caron@foss.st.com>,
Mark Brown <broonie@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Alain Volmat <alain.volmat@foss.st.com>,
linux-spi@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] spi: stm32: disable device mode with st,stm32f4-spi compatible
Date: Tue, 27 Jun 2023 15:39:21 +0200 [thread overview]
Message-ID: <0815474b-a8fa-f486-fc6e-a85df88ed9b9@linaro.org> (raw)
In-Reply-To: <20230627123906.147029-1-valentin.caron@foss.st.com>
On 27/06/2023 14:39, Valentin Caron wrote:
> STM32 SPI driver is not capable to handle device mode with stm32f4 soc.
> Stop probing if this case happens, and print an error with involved
> compatible.
>
...
>
> static const struct of_device_id stm32_spi_of_match[] = {
> @@ -1798,8 +1802,16 @@ static int stm32_spi_probe(struct platform_device *pdev)
> struct device_node *np = pdev->dev.of_node;
> bool device_mode;
> int ret;
> + const char *compatible =
> + of_match_device(pdev->dev.driver->of_match_table, &pdev->dev)->compatible;
The goal was to replace it, so drop it.
> + const struct stm32_spi_cfg *cfg = (const struct stm32_spi_cfg *)
Why do you need the cast? To drop the const? Are you sure it is really
needed?
> + of_device_get_match_data(&pdev->dev);
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-06-27 13:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 12:39 [PATCH v2] spi: stm32: disable device mode with st,stm32f4-spi compatible Valentin Caron
2023-06-27 13:39 ` Krzysztof Kozlowski [this message]
2023-06-28 16:21 ` Valentin CARON
2023-07-01 8:09 ` Krzysztof Kozlowski
2023-07-05 17:16 ` Valentin CARON
2023-07-06 6:08 ` Krzysztof Kozlowski
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=0815474b-a8fa-f486-fc6e-a85df88ed9b9@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=broonie@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=valentin.caron@foss.st.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).