I am working with AF9015 I2C-adapter lock. I need lock I2C-bus since
there is two tuners having same I2C address on same bus, demod I2C gate
is used to select correct tuner.
I am trapping demod .i2c_gate_ctrl() calls and locking bus according to
that.
Is there any lock can do recursive locking but unlock frees all locks?
Like that:
gate_open
+gate_open
+gate_close
== lock is free
AFAIK mutex can do only simple lock() + unlock(). Semaphore can do
recursive locking, like lock() + lock() + unlock() + unlock(). But how I
can do lock() + lock() + unlock() == free.
Antti
--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html