How to get device data on i2c bus (DS3231) from user space, if it is used by the system (used as the main hardware clock)? When I try to get a register dump using the i2cdump utility, I get an error and a message that the device is busy. This is logical, but the data still need to be obtained. Delete, read the data and add the clock to the system again is not an option, the data must be read quite often.

  • one
    Depends on the driver and its launch space (kernel or user space). If the driver in the kernel is implemented through the regmap i2c API, then the contents of the registers can be obtained via debugfs. Or you do not have Linux there? - 0andriy
  • Linux. Thanks for the direction, I will look. - Sergey Sakhno
  • I looked, in the current kernel, the driver is written using the regmap API, so in this case nothing needs to be done - everything is already written. - 0andriy
  • Apparently for the 4.x.x kernel, this will work, but in my case, the 3.4 kernel. And updating the kernel to the current is now impossible. - Sergey Sakhno
  • i2cdump with the -f flag seems to be normal chiatt - Sergey Sakhno

0