Adjust I2C setup/hold timing in driver?

Is is possible to control the timing on I2C via the linux i2c kernel driver (for the Cyclone V HPS)? Can SDA setup and hold timing be adjusted from userspace?

I have a problem using an external I2C device (which is connected through the FPGA fabric). Investigation of the signals shows that the SDA and SCL edges are toggling very close to each others. By physically placing your finger on the SDA line actually makes it work though, which leads me to suspect SDA hold violation.

hi!
Take a look in your device tree!
Are you using?? compatible = “snps,designware-i2c”;
If so… search in the driver(drivers/i2c/busses/i2c-designware-platdrv.c) for the of_property_reads, over there you will find all properties you can define in your device tree!
for example i2c-sda-hold-time-ns, i2c-sda-falling-time-ns …etc
So I think you can try to change your device tree source file!! And I dont know if you can change these propeties from the userspace(in sysclass).
Check also Documentation/devicetree/bindings/i2c/i2c-designware.txt
bye