All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>,
	Mark Brown <broonie@kernel.org>
Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org, linux-spi@vger.kernel.org,
	David Jander <david@protonic.nl>
Subject: Re: [PATCH v2 2/2] Input: ads7846: do not overwrite spi->mode flags set by spi framework
Date: Mon, 9 Nov 2020 12:02:09 +0100	[thread overview]
Message-ID: <20201109110209.lz5polbjvvoq5fwa@pengutronix.de> (raw)
In-Reply-To: <20201027095724.18654-3-o.rempel@pengutronix.de>

Hello Dmitry,

ping for this patch as well.

Regards,
Oleksij

On Tue, Oct 27, 2020 at 10:57:24AM +0100, Oleksij Rempel wrote:
> Do not overwrite spi->mode flags set by spi framework, otherwise the
> chip select polarity will get lost.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  drivers/input/touchscreen/ads7846.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
> index 8fd7fc39c4fd..f2dc2c8ab5ec 100644
> --- a/drivers/input/touchscreen/ads7846.c
> +++ b/drivers/input/touchscreen/ads7846.c
> @@ -1288,7 +1288,8 @@ static int ads7846_probe(struct spi_device *spi)
>  	 * may not.  So we stick to very-portable 8 bit words, both RX and TX.
>  	 */
>  	spi->bits_per_word = 8;
> -	spi->mode = SPI_MODE_0;
> +	spi->mode &= ~SPI_MODE_X_MASK;
> +	spi->mode |= SPI_MODE_0;
>  	err = spi_setup(spi);
>  	if (err < 0)
>  		return err;
> -- 
> 2.28.0
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2020-11-09 11:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27  9:57 [PATCH v2 0/2] SPI/ Input: ads7846: properly handle spi->mode flags Oleksij Rempel
2020-10-27  9:57 ` [PATCH v2 1/2] spi: introduce SPI_MODE_X_MASK macro Oleksij Rempel
2020-10-27  9:57 ` [PATCH v2 2/2] Input: ads7846: do not overwrite spi->mode flags set by spi framework Oleksij Rempel
2020-11-09 11:02   ` Oleksij Rempel [this message]
2020-11-11 18:51   ` Dmitry Torokhov
2020-11-11 15:48 ` [PATCH v2 0/2] SPI/ Input: ads7846: properly handle spi->mode flags Mark Brown
2020-11-12 19:39 ` Mark Brown

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=20201109110209.lz5polbjvvoq5fwa@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=alexandru.ardelean@analog.com \
    --cc=broonie@kernel.org \
    --cc=david@protonic.nl \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.