Re: [PATCH v2 1/2] Input: ads7846 - restore half-duplex support
From: Dmitry Torokhov
Date: Sun Apr 19 2026 - 20:14:11 EST
Hi Aaro,
On Sun, Apr 19, 2026 at 07:18:47PM +0300, Aaro Koskinen wrote:
> +static void ads7846_halfd_read_state(struct ads7846 *ts)
> +{
> + struct ads7846_packet *packet = ts->packet;
> + int msg_idx = 0;
> +
> + packet->ignore = false;
> +
> + while (msg_idx < ts->msg_count) {
> + int error;
> +
> + ads7846_wait_for_hsync(ts);
> +
> + error = spi_sync(ts->spi, &ts->msg[msg_idx]);
> + if (error) {
> + dev_err_ratelimited(&ts->spi->dev, "spi_sync --> %d\n",
> + error);
> + packet->ignore = true;
> + return;
Sashiko recommends trying to power down ADC on errors, what do you
think?
Thanks.
--
Dmitry