mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-09-03 02:16:09 +02:00

Added a sysfs entry to support writing to the offset register on page1. This register is used to calibrate the chip canceling offset errors in the current ADC. This means that, over time, reading the IAD register will not return the correct current measurement, it will have an offset. Writing to the offset register if the two's complement of the current register while passing zero current to the load will calibrate the measurements. This change was tested on real hardware and it was able to calibrate the chip correctly. Signed-off-by: Luiz Sampaio <sampaio.ime@gmail.com> Link: https://lore.kernel.org/r/20210519223046.13798-7-sampaio.ime@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
617 B
617 B
What: /sys/bus/w1/devices/.../page1 Date: April 2021 Contact: Luiz Sampaio sampaio.ime@gmail.com Description: read the contents of the page1 of the DS2438 see Documentation/w1/slaves/w1_ds2438.rst for detailed information Users: any user space application which wants to communicate with DS2438
What: /sys/bus/w1/devices/.../offset Date: April 2021 Contact: Luiz Sampaio sampaio.ime@gmail.com Description: write the contents to the offset register of the DS2438 see Documentation/w1/slaves/w1_ds2438.rst for detailed information Users: any user space application which wants to communicate with DS2438