[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201021182757.GA444962@dtor-ws>
Date: Wed, 21 Oct 2020 11:27:57 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
David Jander <david@...tonic.nl>
Subject: Re: [PATCH v1] Input: ads7846: do not overwrite spi->mode flags set
by spi framework
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
Powered by blists - more mailing lists