Commit Graph

6 Commits

Author SHA1 Message Date
Thomas Stranger b5d3dea894 drivers: sensor: ds18b20: indicate error for missing response
When multiple devices are on the bus, and no slave matches
the sent rom, the master receives only ones.
This should be handled explicitly and the error reporting
should not rely on the crc mismatch of the scratchpad.

Note: Make sure that the sensor configuration is loaded to the
eeprom (copy scratchpad), otherwise the resolution will not match
the expectations in case a node looses power and recovers.
As in that case the configuration will not be applied again.
Also the sensor may still report the power on reset value
of +85°C just after the sensor powered up.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger 6fd767d6e4 drivers: sensor: ds18b20: verify scratchpad write
Verify that the scratchpad write was successful by
reading back the configuration.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger 53e3936a2e drivers: sensor: ds18b20: verify crc of scratchpad.
After each read of the scratchpad the crc of the data
is checked and in case of a mismatch an error is returned.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger f4acf390dd drivers: sensor: ds18b20: cleanup header/includes
- Move the content of the header file into the source file,
and drop unnecessary includes.
- Also, drop the bus access function.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Fredrik Gihl 2d31d45429 drivers: sensors: Add support for ds18s20
Added support for the older ds18s20 inside the (newer) ds18b20.

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-05-13 16:06:35 -04:00
Maureen Helm c02e3aa47a drivers: sensor: maxim: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00