clicky wrote:Oh, thanks! That makes perfect sense. Only think I am not sure now is (as I have both revision RPis and would like to use both):
a) should I in software detect revision of board and adjust bus number accordingly?
b) is there a way something else to do it for me (underlying software, kernel, module or whatever is responsible for it)?
If it is the first one, does anyone know good reference how to detect revision of the board so I can adjust bus number accordingly?
Detect the board ID )-:
I've been through several iterations of this - boards programmed incorrectly, with bogus numbers and so on and finally settled on this algorithm:
Read /proc/cpuinfo and search for "Revision" and extract the string.
Look at the last digit - if it's "2" or "3" then it's a Rev 1 board - anything else and it's Rev 2.
no-doubt this will break again in the future, but for now, it seems to be the best way.
(It won't catch the incorrectly programmed rev 1's which have 0000 there, but I'm fairly sure I've heard of a Rev 2 with 0000 there too)
I wish there was a better way.