From: Michal Simek <michal.simek@amd.com>
To: Abdurrahman Hussain <abdurrahman@nexthop.ai>,
Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: xilinx: use device property accessors.
Date: Fri, 16 Jan 2026 08:51:00 +0100 [thread overview]
Message-ID: <b3c81793-32f8-4b2c-a32d-bc90024580ca@amd.com> (raw)
In-Reply-To: <20260115003328.26095-1-abdurrahman@nexthop.ai>
On 1/15/26 01:33, Abdurrahman Hussain wrote:
> This makes the driver work on non-OF platforms.
> Also, make irq optional, since the driver can already work in
> polling mode.
>
> Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
> ---
> drivers/spi/spi-xilinx.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
> index c86dc56f38b4..9fb1da2fcce4 100644
> --- a/drivers/spi/spi-xilinx.c
> +++ b/drivers/spi/spi-xilinx.c
> @@ -405,11 +405,11 @@ static int xilinx_spi_probe(struct platform_device *pdev)
> bits_per_word = pdata->bits_per_word;
> force_irq = pdata->force_irq;
> } else {
> - of_property_read_u32(pdev->dev.of_node, "xlnx,num-ss-bits",
> - &num_cs);
> - ret = of_property_read_u32(pdev->dev.of_node,
> - "xlnx,num-transfer-bits",
> - &bits_per_word);
> + device_property_read_u32(&pdev->dev, "xlnx,num-ss-bits",
> + &num_cs);
> + ret = device_property_read_u32(&pdev->dev,
> + "xlnx,num-transfer-bits",
> + &bits_per_word);
> if (ret)
> bits_per_word = 8;
> }
> @@ -471,7 +471,7 @@ static int xilinx_spi_probe(struct platform_device *pdev)
> xspi->bytes_per_word = bits_per_word / 8;
> xspi->buffer_size = xilinx_spi_find_buffer_size(xspi);
>
> - xspi->irq = platform_get_irq(pdev, 0);
> + xspi->irq = platform_get_irq_optional(pdev, 0);
> if (xspi->irq < 0 && xspi->irq != -ENXIO) {
> return xspi->irq;
> } else if (xspi->irq >= 0) {
I expect this is another IP which you are using on systems with ACPI.
Can you share ASL fragment you use for testing?
Thanks,
Michal
next prev parent reply other threads:[~2026-01-16 7:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 0:33 Abdurrahman Hussain
2026-01-16 7:51 ` Michal Simek [this message]
2026-01-16 19:56 ` Abdurrahman Hussain
2026-01-16 15:23 ` Andrew Lunn
2026-01-16 20:00 ` Abdurrahman Hussain
2026-01-16 20:11 ` Andrew Lunn
2026-01-16 20:17 ` Abdurrahman Hussain
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=b3c81793-32f8-4b2c-a32d-bc90024580ca@amd.com \
--to=michal.simek@amd.com \
--cc=abdurrahman@nexthop.ai \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/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
all inboxes | Powered by JetHome®