Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 2020 07:42:53 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r365288 - head/sys/dev/iicbus/twsi
Message-ID:  <202009030742.0837grkL006709@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Thu Sep  3 07:42:53 2020
New Revision: 365288
URL: https://svnweb.freebsd.org/changeset/base/365288

Log:
  twsi: replace a couple of errno codes with i2c error codes
  
  Reviewed by:	manu
  MFC after:	1 week

Modified:
  head/sys/dev/iicbus/twsi/twsi.c

Modified: head/sys/dev/iicbus/twsi/twsi.c
==============================================================================
--- head/sys/dev/iicbus/twsi/twsi.c	Thu Sep  3 05:25:39 2020	(r365287)
+++ head/sys/dev/iicbus/twsi/twsi.c	Thu Sep  3 07:42:53 2020	(r365288)
@@ -579,7 +579,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;
@@ -660,7 +660,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?202009030742.0837grkL006709>