]> git.baikalelectronics.ru Git - kernel.git/commit
can: tcan4x5x: tcan4x5x_can_probe(): turn on the power before parsing the config
authorDan Murphy <dmurphy@ti.com>
Tue, 10 Dec 2019 16:32:04 +0000 (10:32 -0600)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 2 Jan 2020 14:34:26 +0000 (15:34 +0100)
commit12065c47e5db669629b150260d2fb283d3c38e38
tree583637747cd3736e9f298421917d68f0646164ce
parent97ce953684ea1e7b8c31e7d6729645cb79be498f
can: tcan4x5x: tcan4x5x_can_probe(): turn on the power before parsing the config

The tcan4x5x_parse_config() function now performs action on the device
either reading or writing and a reset. If the devive has a switchable
power supppy (i.e. regulator is managed) it needs to be turned on.

So turn on the regulator if available. If the parsing fails, turn off
the regulator.

Fixes: c52ad193400d ("can: tcan45x: Make wake-up GPIO an optional GPIO")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/tcan4x5x.c