mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harald Mommer <harald.mommer@opensynergy.com>
To: Haixu Cui <quic_haixcui@quicinc.com>,
	virtio-dev@lists.oasis-open.org, Mark Brown <broonie@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: quic_ztu@quicinc.com, Matti Moell <Matti.Moell@opensynergy.com>,
	Mikhail Golubev <Mikhail.Golubev@opensynergy.com>
Subject: Re: [RFC PATCH v3 3/3] SPI: Add virtio SPI driver.
Date: Mon, 26 Feb 2024 11:41:44 +0100	[thread overview]
Message-ID: <dff0d0a1-628b-4346-987f-94ceb4e08e93@opensynergy.com> (raw)
In-Reply-To: <a7f80f14-e8be-47fe-aa2c-6b40a3fbebd4@quicinc.com>

Hello Haixu,

I was on vacation, therefore no immediate answer. I should not forget to 
set an OOO reply before going to vacation.

On 20.02.24 09:30, Haixu Cui wrote:
>
> Hello Harald,
>
>     Do you add the "spi-virtio" in spidev_spi_ids in spidev.c when you 
> doing the tests? And any other method to expose the spidev interface 
> to userspace?
>
>> +static struct spi_board_info board_info = {
>> +    .modalias = "spi-virtio",
>> +};
>> +

I've a udev rule 50-spi-virtio.rules installed which does the job:

# Bind spi-virtio device spiB.C to user mode SPI device /dev/spidevB.C
# Requires spi driver_override sysfs entry (Linux version 4.20+ and later)
#
# See also 
https://www.mail-archive.com/debian-arm@lists.debian.org/msg22090.html
# and Documentation/spi/spidev.rst
#
#ACTION=="add", SUBSYSTEM=="spi", ENV{MODALIAS}=="spi:spi-virtio", 
PROGRAM+="/bin/sh -c 'echo spidev > %S%p/driver_override && echo %k > 
%S%p/subsystem/drivers/spidev/bind"
ACTION=="add", SUBSYSTEM=="spi", ENV{MODALIAS}=="spi:spi-virtio", 
PROGRAM+="/bin/sh -c 'echo spidev > %S%p/driver_override && echo %k > 
%S/bus/spi/drivers/spidev/bind"

There are no other kernel changes.

However for ancient Linux 4.14 there is no udev rule and the board_info 
looks, there

     .modalias = "spidev", /* Must be "spidev" for user mode SPI */

but this is only for old kernels we're still using in some setup and 
this is irrelevant at latest with 5.14.14 where was a documentation 
update of Documentation/spi/spidev.rst.

Regards
Harald Mommer


  reply	other threads:[~2024-02-26 10:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 13:53 [RFC PATCH v3 0/3] Virtio SPI Linux driver compliant to draft spec V10 Harald Mommer
2024-02-13 13:53 ` [RFC PATCH v3 1/3] virtio: Add ID for virtio SPI Harald Mommer
2024-02-13 13:53 ` [RFC PATCH v3 2/3] virtio-spi: Add virtio-spi.h Harald Mommer
2024-02-13 13:53 ` [RFC PATCH v3 3/3] SPI: Add virtio SPI driver Harald Mommer
2024-02-13 17:49   ` Mark Brown
2024-02-27 14:12     ` Harald Mommer
2024-02-27 14:25       ` Mark Brown
2024-02-20  8:30   ` Haixu Cui
2024-02-26 10:41     ` Harald Mommer [this message]
2024-03-04  7:11   ` Haixu Cui
2024-03-04 10:52     ` [virtio-dev] " Harald Mommer
2024-03-05  7:46       ` Haixu Cui
2024-03-05 10:57         ` Harald Mommer
2024-03-05 17:54           ` [virtio-dev] Re: [RFC PATCH v3 3/3] SPI: Add virtio SPI driver. - Correction Harald Mommer
2024-03-06  7:48             ` Haixu Cui
2024-03-06 16:18               ` Harald Mommer
2024-03-11  9:28                 ` Haixu Cui
2024-03-13  7:05                   ` Haixu Cui
2024-02-14 16:22 ` [virtio-dev] [RFC PATCH v3 0/3] Virtio SPI Linux driver compliant to draft spec V10 Cornelia Huck

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=dff0d0a1-628b-4346-987f-94ceb4e08e93@opensynergy.com \
    --to=harald.mommer@opensynergy.com \
    --cc=Matti.Moell@opensynergy.com \
    --cc=Mikhail.Golubev@opensynergy.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=quic_haixcui@quicinc.com \
    --cc=quic_ztu@quicinc.com \
    --cc=viresh.kumar@linaro.org \
    --cc=virtio-dev@lists.oasis-open.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®