0

For the BCM2835, what I would like to do is the following: I want from the user space to be able to change the I2C bus line speed, not just by modifying the CDIV field of the DIV register (Reference), but also by adapting the FEDL / REDL fields of the DEL register (Falling and Rising edge delay).

I have thought of two ways to do that:

  1. With a user space C program. This would use mmap to map the peripheral physical address space on /dev/mem and change the registers values from there. But isn't this generally a bad idea? I suppose it could be that this specific address space is used by a kernel driver (e.g. the i2c_bcm2708), which would create conflicts.

  2. With a kernel module. I have some experience recently with kernel character drivers, but I am still very confused about how the i2c bus infrastructure works. From what I understand, there is usually a single i2c driver that accesses the bus (is it the i2c_bcm2708?) and then several devices can be bound to this driver. Is that correct? Does that mean that I have to modify the i2c_bcm2708 driver? Note that the current implementation of this driver doesn't seem to support what I want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.