[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29666c1f-c670-b38c-8555-e606771b480b@linaro.org>
Date: Wed, 21 Jun 2023 14:25:57 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Valentin Caron <valentin.caron@...s.st.com>,
Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
Alain Volmat <alain.volmat@...s.st.com>,
linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] spi: stm32: disable device mode with st,stm32f4-spi
compatible
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@...s.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
Powered by blists - more mailing lists