All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Valentin Caron <valentin.caron@foss.st.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Alain Volmat <alain.volmat@foss.st.com>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] spi: stm32: disable device mode with st,stm32f4-spi compatible
Date: Wed, 21 Jun 2023 14:25:57 +0200	[thread overview]
Message-ID: <29666c1f-c670-b38c-8555-e606771b480b@linaro.org> (raw)
In-Reply-To: <20230621115523.923176-2-valentin.caron@foss.st.com>

On 21/06/2023 13:55, Valentin Caron wrote:
> STM32 SPI driver is not capable to handle device mode with stm32f4/f7 soc.
> Stop probing if this case happens.
> 
> Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>

...

>  
>  static const struct of_device_id stm32_spi_of_match[] = {
> @@ -1798,8 +1802,15 @@ static int stm32_spi_probe(struct platform_device *pdev)
>  	struct device_node *np = pdev->dev.of_node;
>  	bool device_mode;
>  	int ret;
> +	const struct of_device_id *of_match =
> +		of_match_device(pdev->dev.driver->of_match_table, &pdev->dev);
> +	const struct stm32_spi_cfg *cfg = (const struct stm32_spi_cfg *)of_match->data;

It seems you open-coded of_device_get_match_data().

Best regards,
Krzysztof


WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Valentin Caron <valentin.caron@foss.st.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Alain Volmat <alain.volmat@foss.st.com>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] spi: stm32: disable device mode with st,stm32f4-spi compatible
Date: Wed, 21 Jun 2023 14:25:57 +0200	[thread overview]
Message-ID: <29666c1f-c670-b38c-8555-e606771b480b@linaro.org> (raw)
In-Reply-To: <20230621115523.923176-2-valentin.caron@foss.st.com>

On 21/06/2023 13:55, Valentin Caron wrote:
> STM32 SPI driver is not capable to handle device mode with stm32f4/f7 soc.
> Stop probing if this case happens.
> 
> Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>

...

>  
>  static const struct of_device_id stm32_spi_of_match[] = {
> @@ -1798,8 +1802,15 @@ static int stm32_spi_probe(struct platform_device *pdev)
>  	struct device_node *np = pdev->dev.of_node;
>  	bool device_mode;
>  	int ret;
> +	const struct of_device_id *of_match =
> +		of_match_device(pdev->dev.driver->of_match_table, &pdev->dev);
> +	const struct stm32_spi_cfg *cfg = (const struct stm32_spi_cfg *)of_match->data;

It seems you open-coded of_device_get_match_data().

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-06-21 12:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-21 11:55 [PATCH 0/2] spi: stm32: disable spi device mode for stm32f4-f7 Valentin Caron
2023-06-21 11:55 ` Valentin Caron
2023-06-21 11:55 ` [PATCH 1/2] spi: stm32: disable device mode with st,stm32f4-spi compatible Valentin Caron
2023-06-21 11:55   ` Valentin Caron
2023-06-21 12:25   ` Krzysztof Kozlowski [this message]
2023-06-21 12:25     ` Krzysztof Kozlowski
2023-06-21 11:55 ` [PATCH 2/2] spi: dt-bindings: stm32: do not disable spi-slave property for stm32f4-f7 Valentin Caron
2023-06-21 11:55   ` Valentin Caron
2023-06-21 12:23   ` Krzysztof Kozlowski
2023-06-21 12:23     ` Krzysztof Kozlowski
2023-06-23  0:32 ` (subset) [PATCH 0/2] spi: stm32: disable spi device mode " Mark Brown
2023-06-23  0:32   ` Mark Brown

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=29666c1f-c670-b38c-8555-e606771b480b@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alain.volmat@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.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=robh+dt@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.