Re: [PATCH v2 1/2] Input: ads7846 - restore half-duplex support
From: Dmitry Torokhov
Date: Tue May 05 2026 - 00:45:48 EST
On Mon, Apr 20, 2026 at 10:32:03PM +0300, Aaro Koskinen wrote:
> Hi,
>
> On Sun, Apr 19, 2026 at 05:13:56PM -0700, Dmitry Torokhov 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?
>
> If we want to re-work error handling, then I guess it should be done the
> same way for both full and half-duplex modes, and belongs to a separate
> change set. This code has been in use quite a while, maybe 20 years,
> and I haven't seen those errors in real use anyway, and AFAIK there
> hasn't been any bug/problem reports by others either.
>
> Maybe it wasn't so clearly stated in the commit message, but the patch
> just restores the old code verbatim that was working fine for half-duplex
> mode.
Fair enough, applied.
Thanks.
--
Dmitry