Commit 2dddacb8 authored by Tristan Gingold's avatar Tristan Gingold

libwr2rf: also clear offline configuration in case of vtu reset

parent 9170c22d
......@@ -684,6 +684,16 @@ int libwr2rf_vtu_reset (struct libwr2rf_dev *dev, unsigned id, unsigned rst)
v &= ~TRIGUNIT_REGS_CONTROL_VTURESET;
libwr2rf_write16(dev, addr + TRIGUNIT_REGS_CONTROL, v);
if (rst) {
/* Also clear offline configuration in case of reset. */
v = libwr2rf_read16(dev, addr + TRIGUNIT_REGS_CONFIGOFFLINE);
if (v & TRIGUNIT_REGS_CONFIGOFFLINE_VALID)
{
v &= ~TRIGUNIT_REGS_CONFIGOFFLINE_VALID;
libwr2rf_write16(dev, addr + TRIGUNIT_REGS_CONFIGOFFLINE, v);
}
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment