5

Is it possible to write a driver, say for a OV camera, based on the existing drivers at the RPI git repo?

As is I understand, with a datasheet for a sensor it should be possible to write a similar driver, based on the given ones in the repo. After compilation place the .ko file at lib/modules/.../kernel/drivers/media/i2c/ and hope it gets loaded on boot time.

Has anyone ever tried writing a custom driver, and if so maybe share their experience?

UPDATE

I got my hands on a sensor and its datasheet. I tried altering an existing driver, it compiled and I could insert it via modprobe, but didn't load correctly (I believe, because my debug messages weren't printed and the sensor didn't start). Although I couldn't get the driver running on the raspberry pi, on the Arduino I managed getting the sensor to run, by setting values to the i2c registers. Using the Arduino to get the video data is not possible, since you can only access them via csi.

My next step will be to recompile the RPi kernel, with the new driver already in it. Hopefully this will solve the problem.

David
  • 723
  • 5
  • 22
Wh0Els3
  • 51
  • 2

0 Answers0