Linux RTC
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: Mark Brown <broonie@kernel.org>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [RESEND PATCH] rtc: ds1343: Force SPI chip select to be active high
Date: Thu, 11 Jul 2024 16:29:07 +0100	[thread overview]
Message-ID: <6f122282-1675-497f-bc2f-0bbfba6640aa@mev.co.uk> (raw)
In-Reply-To: <bd7c0eb9-bcb6-42e3-8be6-3d07452e3fd5@sirena.org.uk>

On 11/07/2024 15:21, Mark Brown wrote:
> On Thu, Jul 11, 2024 at 03:05:01PM +0100, Ian Abbott wrote:
> 
>> I think the devicetree node for the RTC device ought to be setting
>> `spi-cs-high` but cannot do so at the moment because the driver clobbers it.
> 
> Specifying spi-cs-high in the device tree should almost always be
> redundant or a mistake, if the device needs a high chip select then we
> already know that from the compatible.  The property is adding nothing
> but potential confusion, in the normal course of affairs the driver
> should just specify the configuration it needs for the bus.

So `spi->mode |= SPI_CS_HIGH;` is safer than `spi->mode ^= SPI_CS_HIGH;`?

Regarding `spi-cs-high` in the device tree, what about the compatibility 
table for `spi-cs-high` and `cs-gpio` active level in 
"Documentation/devicetree/bindings/spi/spi-controller.yaml"?

-- 
-=( Ian Abbott <abbotti@mev.co.uk> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-


  reply	other threads:[~2024-07-11 15:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 17:52 [RESEND PATCH] rtc: ds1343: Force SPI chip select to be active high Ian Abbott
2024-07-10 18:40 ` Alexandre Belloni
2024-07-11 14:05   ` Ian Abbott
2024-07-11 14:21     ` Mark Brown
2024-07-11 15:29       ` Ian Abbott [this message]
2024-07-11 16:12         ` Mark Brown
2024-07-24 16:46   ` Ian Abbott

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=6f122282-1675-497f-bc2f-0bbfba6640aa@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=alexandre.belloni@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=stable@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