A question about the mutex (or not) in the kernel's I2C handling

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

 



I have spent quite a while searching in places such as stackoverflow
and in the docmentation at linux.kernel.org but I haven't found a very
conclusive answer (no to me anyway).

I have a single I2C bus connected to a single board computer
(Beaglebone Black) running Debian 11, Kernel: 5.10.168.

Is it safe to allow multiple processes to read and write various
devices on the I2C bus?  This may be either different processes
accessing the same device or different processes accessing different
devices on the I2C bus.

I.e. is there a mutex (or equivalent code) in the Linux Kernel I2C
drivers that guarantees completion of one process's I2C transaction
before another one starts?

The information I have managed to find suggests that there is such a
mutex and that I don't need to make sure my processes don't try to
read/write the I2C bus simultaneously but I can't find a definitive
statement to this effect.

So, I'm sorry to ask such a 'user' question here but I would really
like a definite answer please.

-- 
Chris Green



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux