From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <74e7ad752edff0def1f6eb2267b7a225@quintile.net> From: "Steve Simon" Date: Sun, 17 Nov 2013 23:04:43 +0000 To: 9fans@9fans.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] (no subject) Topicbox-Message-UUID: 8aa2d72e-ead8-11e9-9d60-3106f5b1d025 Subject i2c and gpio I need an i2c driver for plan9, anyone implemented one in the past and have opinions on what they should look like? I have to revisit some old code but I wrote a driver for another OS which implemeted 255 virtual files in /dev/i2c/* one for each possible address (well there are some reserved ones but you get the idea). I need GPIO pins too. again in OSs passim I just had a file per pin, no clever magical mapping of bits into integers. I then allowed a write to reconfigure the port as an output, or a read to set it as an input; the I/O config being persistent. This worked well for us but perhaps is naive? Thoughts anyone? -Steve