FW: Writing to I2C device during Barebox boot
Ivor Kruger
ivor at veriline.co.za
Wed Oct 9 21:59:54 EDT 2013
I can hardly believe it myself but I have succeeded (i think) in writing a
new driver for a I2C chip I use.
I probe the driver/device during boot and all seems well.
The device shows up in the device tree.
So before the init process for the board ends, I would like to write a few
values to the device (it controls the PSU, thus the reason for doing it in
barebox).
I want to do this in the board.c file at the end of the
pcm049_devices_init function. Is this the right place?
But this is where my linux knowledge is letting me down.
How do I get a "handle" to the device in order to call the write_reg
function?
Your pointers and help is much appreciated.
More information about the barebox
mailing list