can: ti_hecc: add missing state changes
authorJeroen Hofstee <jhofstee@victronenergy.com>
Tue, 24 Sep 2019 18:46:06 +0000 (18:46 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 4 Nov 2019 20:47:23 +0000 (21:47 +0100)
commitb5018be6d5dd9dd257bf8236298daac8b1262750
tree83d646903cc4d99828d0d891de9c7205fa767095
parent3b2d652da21450aba19d299a75fe3a6f5d4003ff
can: ti_hecc: add missing state changes

While the ti_hecc has interrupts to report when the error counters increase
to a certain level and which change state it doesn't handle the case that
the error counters go down again, so the reported state can actually be
wrong. Since there is no interrupt for that, do update state based on the
error counters, when the state is not error active and goes down again.

Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/ti_hecc.c