linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valentin CARON <valentin.caron@foss.st.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	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: Wed, 28 Jun 2023 18:21:06 +0200	[thread overview]
Message-ID: <c232e3f1-b703-d8d2-7e2d-19ed3f5fc3ad@foss.st.com> (raw)
In-Reply-To: <0815474b-a8fa-f486-fc6e-a85df88ed9b9@linaro.org>

Hi,

On 6/27/23 15:39, Krzysztof Kozlowski wrote:
> 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.
Is is still needed for dev_err, so I can't
 > dev_err(&pdev->dev, "spi-slave not yet supported with %s\n", 
compatible);
>
>> +	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?
Effectively, this cast is useless, I will drop it.
>> +		of_device_get_match_data(&pdev->dev);
> Best regards,
> Krzysztof

Thanks,
Valentin


  reply	other threads:[~2023-06-28 16:21 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
2023-06-28 16:21   ` Valentin CARON [this message]
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=c232e3f1-b703-d8d2-7e2d-19ed3f5fc3ad@foss.st.com \
    --to=valentin.caron@foss.st.com \
    --cc=alain.volmat@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=broonie@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@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 \
    /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).