i2c: bcm2835: Can't support I2C_M_IGNORE_NAK
authorNoralf Trønnes <noralf@tronnes.org>
Thu, 22 Sep 2016 20:05:50 +0000 (22:05 +0200)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:45:15 +0000 (15:45 +0100)
commitb35e9cda9f0e6210274edcfd44e65c024db68915
treebe7ea4efa8637b1bf6e7bf596b555877c6c38154
parentc43298656f6ce9abe7203bd01d331d71af952c48
i2c: bcm2835: Can't support I2C_M_IGNORE_NAK

The controller can't support this flag, so remove it.

Documentation/i2c/i2c-protocol states that all of the message is sent:

I2C_M_IGNORE_NAK:
    Normally message is interrupted immediately if there is [NA] from the
    client. Setting this flag treats any [NA] as [A], and all of
    message is sent.

From the BCM2835 ARM Peripherals datasheet:

    The ERR field is set when the slave fails to acknowledge either
    its address or a data byte written to it.

So when the controller doesn't receive an ack, it sets ERR and raises
an interrupt. In other words, the whole message is not sent.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
drivers/i2c/busses/i2c-bcm2835.c