From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: "Ardelean, Alexandru" <alexandru.Ardelean@analog.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
David Jander <david@protonic.nl>
Subject: Re: [PATCH v1] Input: ads7846: do not overwrite spi->mode flags set by spi framework
Date: Wed, 21 Oct 2020 11:27:57 -0700 [thread overview]
Message-ID: <20201021182757.GA444962@dtor-ws> (raw)
In-Reply-To: <20201021105614.tc3jnv5g62hvl5vg@pengutronix.de>
On Wed, Oct 21, 2020 at 12:56:14PM +0200, Oleksij Rempel wrote:
>
> As you can see, I would need to configure my dts with spi-cs-high flag,
> even if the hardware is actually ACTIVE_LOW. If I will go this way, I
> would risk a regression as soon as this issue is fixed.
>
> Since the spi framework is already parsing devicetree and set all needed
> flags, I assume it is wrong to blindly drop all this flags in the
> driver.
Yes, but I wonder if the devices can only work in mode 0 we should be
doing:
spi->mode &= ~SPI_MODE_MASK; // to be defined as 0x03 in spi.h
spi->mode |= SPI_MODE_0;
as we can't simply "or" mode value as is (well, mode 0 is kind of
working, but just on accident).
Thanks.
--
Dmitry
next prev parent reply other threads:[~2020-10-21 18:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 9:04 [PATCH v1] Input: ads7846: do not overwrite spi->mode flags set by spi framework Oleksij Rempel
2020-10-21 9:29 ` Ardelean, Alexandru
2020-10-21 10:56 ` Oleksij Rempel
2020-10-21 18:27 ` Dmitry Torokhov [this message]
2020-10-22 6:54 ` Oleksij Rempel
2020-10-27 3:53 ` Dmitry Torokhov
2020-10-27 8:07 ` Oleksij Rempel
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=20201021182757.GA444962@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=alexandru.Ardelean@analog.com \
--cc=david@protonic.nl \
--cc=kernel@pengutronix.de \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).