Re: recursive locking problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 14, 2011 at 01:45:47PM +0300, Antti Palosaari wrote:
> >>Interesting idea, but it didn't worked. It deadlocks. I think it
> >>locks since I2C-mux is controlled by I2C "switch" in same I2C bus,
> >>not GPIO or some other HW.
> >
> >Take a look at drivers/i2c/muxes/pca954x.c. You need to use
> >parent->algo->master_xfer/smbus_xfer directly as the lock that
> >protects you from having both gates open is the lock of the
> >root i2c bus.
> 
> Ah yes, rather similar case. I see it as commented in pca954x.c:
> /* Write to mux register. Don't use i2c_transfer()/i2c_smbus_xfer()
>    for this as they will try to lock adapter a second time */
> 
> This looks even more hackish solution than calling existing demod
> .i2c_gate_ctrl() callback from USB-interface driver. But yes, it
> must work - not beautiful but workable workaround.

This is not a hack. This is the official way to do it.
The I2C mux framework was designed to allow multiplexers controlled
through the same I2C bus.

  Daniel

--
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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux