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, 5 Jul 2023 19:16:16 +0200	[thread overview]
Message-ID: <ec4f025e-680f-2145-7ca8-1ee6b38baa43@foss.st.com> (raw)
In-Reply-To: <79505e19-c5ee-36ee-c8ae-344c15f8b108@linaro.org>

Hi, Krzysztof

On 7/1/23 10:09, Krzysztof Kozlowski wrote:
> On 28/06/2023 18:21, Valentin CARON wrote:
>> 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
> Why do you need it for dev_err? Isn't it entirely redundant?
>
> Best regards,
> Krzysztof
>
Only to have a clearer error message. To let know to user that spi 
device is not available on this device.

Right now, there is only one compatible where spi device can't be 
enable. So I could use a static message. But this is not the best if a 
new compatible is added.

Regards,
Valentin

  reply	other threads:[~2023-07-05 17:16 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
2023-07-01  8:09     ` Krzysztof Kozlowski
2023-07-05 17:16       ` Valentin CARON [this message]
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=ec4f025e-680f-2145-7ca8-1ee6b38baa43@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).