It's a good idea to reset a ip-block/spi device before using it, this patch will reset the device. Signed-off-by: Sean Nyekjaer <sean@xxxxxxxxxx> --- drivers/net/can/m_can/tcan4x5x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c index 7f26c2d53f8c..dd812d40d475 100644 --- a/drivers/net/can/m_can/tcan4x5x.c +++ b/drivers/net/can/m_can/tcan4x5x.c @@ -361,14 +361,15 @@ static int tcan4x5x_parse_config(struct m_can_classdev *cdev) tcan4x5x_disable_wake(cdev); } - tcan4x5x->reset_gpio = devm_gpiod_get_optional(cdev->dev, "reset", - GPIOD_OUT_LOW); + GPIOD_OUT_HIGH); if (IS_ERR(tcan4x5x->reset_gpio)) tcan4x5x->reset_gpio = NULL; usleep_range(700, 1000); + gpiod_set_value(tcan4x5x->reset_gpio, 0); + tcan4x5x->device_state_gpio = devm_gpiod_get_optional(cdev->dev, "device-state", GPIOD_IN); -- 2.24.0