Date: Sat, 31 May 2014 14:38:06 +0000 (UTC) From: Luiz Otavio O Souza <loos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266923 - head/sys/dev/iicbus Message-ID: <201405311438.s4VEc6KF049741@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: loos Date: Sat May 31 14:38:05 2014 New Revision: 266923 URL: http://svnweb.freebsd.org/changeset/base/266923 Log: Ignore IIC_ENOADDR from iicbus_reset() as it only means we have a master-only controller. This fixes the iic bus scan with i2c(8) (on supported controllers). Tested with gpioiic(4). Modified: head/sys/dev/iicbus/iic.c Modified: head/sys/dev/iicbus/iic.c ============================================================================== --- head/sys/dev/iicbus/iic.c Sat May 31 14:27:50 2014 (r266922) +++ head/sys/dev/iicbus/iic.c Sat May 31 14:38:05 2014 (r266923) @@ -322,6 +322,12 @@ iicioctl(struct cdev *dev, u_long cmd, c case I2CRSTCARD: error = iicbus_reset(parent, IIC_UNKNOWN, 0, NULL); + /* + * Ignore IIC_ENOADDR as it only means we have a master-only + * controller. + */ + if (error == IIC_ENOADDR) + error = 0; break; case I2CWRITE:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405311438.s4VEc6KF049741>