Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 725e93eb authored by Daniel Scheller's avatar Daniel Scheller Committed by Mauro Carvalho Chehab
Browse files

[media] dvb-frontends/cxd2841er: do I2C reads in one go



Doing the I2C read operation with two calls to i2c_transfer() causes the
exclusive I2C bus lock of the underlying adapter to be released. While this
isn't an issue if only one demodulator is attached to the bus, having two
or even more causes troubles in that concurrent accesses to the different
demods will cause all kinds of issues due to wrong data being returned on
read operations (for example, the TS config register will be set wrong).
This changes the read_regs() function to do the operation in one go (by
calling i2c_transfer with the whole msg list instead of one by one) to not
loose the I2C bus lock, fixing all sorts of random runtime failures.

Signed-off-by: default avatarDaniel Scheller <d.scheller@gmx.net>
Acked-by: default avatarAbylay Ospan <aospan@netup.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 5d6d93a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment