Files
qemu/include/hw/sensor/tmp105.h
Emmanuel Blot 9748c85833 hw/sensor: tmp105: add TMP75, TMP175 and LM75B variants
The TI TMP75/TMP175 and the NXP LM75B share the TMP105 register map and
control semantics, differing only in a few details. Model them as
variants of the TMP105, parameterised by a small per-type class
descriptor covering the fault-queue depths, the writable config bits,
the converter resolution, the set-point masks and the TMP75's
alert-clear on thermostat-mode change.

The variant is class data, not migrated state, so the wire format is
unchanged and all variants share the existing vmstate.

While here, align the shared shutdown handling with the hardware:
entering shutdown now clears the ALERT/OS output in interrupt mode,
correcting the base TMP105 as well.

Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260731-sanmiguel-bmc-locator-v2-7-1266926ba769@free.fr
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2026-09-05 07:05:11 +02:00

24 lines
649 B
C

/*
* Texas Instruments TMP105/TMP75/TMP175/LM75B Temperature Sensor
*
* Browse the data sheet:
*
* http://www.ti.com/lit/gpn/tmp105
*
* Copyright (C) 2012 Alex Horn <alex.horn@cs.ox.ac.uk>
* Copyright (C) 2008-2012 Andrzej Zaborowski <balrogg@gmail.com>
*
* This work is licensed under the terms of the GNU GPL, version 2 or
* later. See the COPYING file in the top-level directory.
*/
#ifndef HW_SENSOR_TMP105_H
#define HW_SENSOR_TMP105_H
/* TMP75, TMP175 and NXP LM75B are register-compatible with TMP105. */
#define TYPE_TMP105 "tmp105"
#define TYPE_TMP175 "tmp175"
#define TYPE_TMP75 "tmp75"
#define TYPE_LM75B "lm75b"
#endif