Skip to content

Option to force-open a device #59

@michael-p

Description

@michael-p

Dear all,

it would be great if this library would optionally allow one to force-open an I2c device (I guess, using I2C_SLAVE_FORCE) similar to what the i2cget and i2cset tools do with the -f option. I know this is very dangerous but there are situations where one does not have many other options, so it would be great to be able to do this!

Best,
Michael

Background: what I would use this for: Basically, a dirty hack.. I want to change the exposure of the camera of the device I'm working with (custom ARM board using an NXP iMX8M Mini SoC). Normally, one would do this using the Video4Linux2 API (basically an ioctl call). However, even though the camera driver supports this (I wrote it:) NXP's low-level V4L2 stack seems to not forward the ioctl calls correctly. This is a known problem and NXP refuses to do anything about it. As a dirty work-around, I just directly write to the camera's registers using i2cset and would now like to transfer this to our Rust application. Since the camera's I2c address is already associated with the camera driver in the device tree I need to force-open it from userspace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions