Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Sep 2020 09:10:33 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r365556 - stable/12/sys/dev/iicbus/twsi
Message-ID:  <202009100910.08A9AXxS015474@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Thu Sep 10 09:10:33 2020
New Revision: 365556
URL: https://svnweb.freebsd.org/changeset/base/365556

Log:
  MFC r365288: twsi: replace a couple of errno codes with i2c error codes

Modified:
  stable/12/sys/dev/iicbus/twsi/twsi.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/iicbus/twsi/twsi.c
==============================================================================
--- stable/12/sys/dev/iicbus/twsi/twsi.c	Thu Sep 10 09:01:59 2020	(r365555)
+++ stable/12/sys/dev/iicbus/twsi/twsi.c	Thu Sep 10 09:10:33 2020	(r365556)
@@ -573,7 +573,7 @@ twsi_intr(void *arg)
 	case TWSI_STATUS_ADDR_R_NACK:
 		debugf(sc->dev, "No ack received after transmitting the address\n");
 		sc->transfer = 0;
-		sc->error = ETIMEDOUT;
+		sc->error = IIC_ENOACK;
 		sc->control_val = 0;
 		wakeup(sc);
 		break;
@@ -642,7 +642,7 @@ twsi_intr(void *arg)
 	default:
 		debugf(sc->dev, "status=%x hot handled\n", status);
 		sc->transfer = 0;
-		sc->error = ENXIO;
+		sc->error = IIC_EBUSERR;
 		sc->control_val = 0;
 		wakeup(sc);
 		break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009100910.08A9AXxS015474>