TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: R.WIESER
date: 2019-11-24 19:43:00
subject: Re: One I2C bus, two prog

Dennis,

>>Yes, and no.   That kind of behaviour is pretty-much a requirement
>> for accessing hardware in a multi-tasking environment.
...
> Except for the minor facet that Linux treats /everything/ as a /file/
> -- and files don't have commonly have inherent mutex locking.

Which means its good I asked. :-)

But that raises the question about what I should think about whats in the
third link you posted (i2c-concurrent-access-on-linux-mutex), which seems to
indicate its present - and on a low level too.

> and that file is submitted to a spooler daemon
...
> This is the equivalent of a method you've already rejected

I didn't (intend to) reject the gatekeeper method itself, just the part
where the communication with it is supposed to be done by the user "through
some protocol".    I would like to create/see an API, preferrably shadowing
an existing I2C one.

> As I understand, you don't have to worry about two I2C operations
> interfering with each other... BUT
[snip]

That is the problem I tried to explain in my "lightbulb moment" paragraph.
Although I referred to the I2C signals themselves (the "start" and "stop"
ones) I also assumed that those signals would coincide with the locking and
unlocking of the I2C bus (or the other way around).

In other words, I was coining up the possibility of an atomic write-read
sequence (by not ending the write sequence with a "stop" condition, but
sending another "start" instead).    It would solve most, if not all of the
interference problems.

The only question is if that has already been implemented, or if I need
to/can do it myself.

Regards,
Rudy Wieser

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.