mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Cc: Haixu Cui <quic_haixcui@quicinc.com>,
	broonie@kernel.org, virtio-dev@lists.oasis-open.org,
	viresh.kumar@linaro.org, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org, hdanton@sina.com,
	qiang4.zhang@linux.intel.com, alex.bennee@linaro.org,
	quic_ztu@quicinc.com
Subject: Re: [RFC PATCH v4 2/3] virtio-spi: Add virtio-spi.h
Date: Mon, 11 Aug 2025 15:49:04 +0200	[thread overview]
Message-ID: <aJn00MKH5lK6Zwsa@black.igk.intel.com> (raw)
In-Reply-To: <f6f087f9-83c9-452e-9a0f-f8743b8c71c2@quicinc.com>

On Tue, Apr 22, 2025 at 11:33:42AM +0530, Mukesh Kumar Savaliya wrote:
> On 4/1/2025 9:06 AM, Haixu Cui wrote:

[...]

> > +struct virtio_spi_config {
> > +	/* # of /dev/spidev<bus_num>.CS with CS=0..chip_select_max_number -1 */
> > +	__u8 cs_max_number;
> > +	__u8 cs_change_supported;
> > +#define VIRTIO_SPI_RX_TX_SUPPORT_DUAL (1 << 0)
> > +#define VIRTIO_SPI_RX_TX_SUPPORT_QUAD (1 << 1)
> > +#define VIRTIO_SPI_RX_TX_SUPPORT_OCTAL (1 << 2)
> Can use BIT(x) ?

No.

> > +	__u8 tx_nbits_supported;
> > +	__u8 rx_nbits_supported;
> > +	__le32 bits_per_word_mask;
> > +#define VIRTIO_SPI_MF_SUPPORT_CPHA_0 (1 << 0)
> > +#define VIRTIO_SPI_MF_SUPPORT_CPHA_1 (1 << 1)
> > +#define VIRTIO_SPI_MF_SUPPORT_CPOL_0 (1 << 2)
> > +#define VIRTIO_SPI_MF_SUPPORT_CPOL_1 (1 << 3)
> > +#define VIRTIO_SPI_MF_SUPPORT_CS_HIGH (1 << 4)
> > +#define VIRTIO_SPI_MF_SUPPORT_LSB_FIRST (1 << 5)
> > +#define VIRTIO_SPI_MF_SUPPORT_LOOPBACK (1 << 6)
> All with BIT(x) ?

No. There is no such macro in UAPI. There is another one available, though.
Check the spi.h UAPI header for the details.

> > +	__le32 mode_func_supported;
> > +	__le32 max_freq_hz;
> > +	__le32 max_word_delay_ns;
> > +	__le32 max_cs_setup_ns;
> > +	__le32 max_cs_hold_ns;
> > +	__le32 max_cs_inactive_ns;
> > +};

-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2025-08-11 13:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01  3:36 [RFC PATCH v4 0/3] Virtio SPI Linux driver Haixu Cui
2025-04-01  3:36 ` [RFC PATCH v4 1/3] virtio: Add ID for virtio SPI Haixu Cui
2025-04-01  3:36 ` [RFC PATCH v4 2/3] virtio-spi: Add virtio-spi.h Haixu Cui
2025-04-22  6:03   ` Mukesh Kumar Savaliya
2025-04-25  8:24     ` Haixu Cui
2025-08-11 13:50       ` Andy Shevchenko
2025-08-11 13:49     ` Andy Shevchenko [this message]
2025-08-08 13:26   ` Jyothi Kumar Seerapu
2025-08-11 13:25     ` Haixu Cui
2025-08-11 13:52   ` Andy Shevchenko
2025-04-01  3:36 ` [RFC PATCH v4 3/3] SPI: Add virtio SPI driver Haixu Cui
2025-04-22  6:03   ` Mukesh Kumar Savaliya
2025-04-22 14:19     ` Mark Brown
2025-04-22 14:27       ` Mukesh Kumar Savaliya
2025-04-25  3:45     ` Haixu Cui
2025-08-11 14:12   ` Andy Shevchenko
2025-04-22  3:14 ` [RFC PATCH v4 0/3] Virtio SPI Linux driver Haixu Cui

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=aJn00MKH5lK6Zwsa@black.igk.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=alex.bennee@linaro.org \
    --cc=broonie@kernel.org \
    --cc=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=qiang4.zhang@linux.intel.com \
    --cc=quic_haixcui@quicinc.com \
    --cc=quic_msavaliy@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®