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).
This commit is contained in:
parent
e72f32cd0f
commit
34aa2211e7
@ -322,6 +322,12 @@ iicioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *t
|
||||
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user