Refactor raspi revision detection