initial based on  http://svenand.blogdrive.com/files/gpio-dev-mem-test.c