diff options
| author | Prathima <Prathima.Lk@amd.com> | 2026-07-10 16:46:35 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-17 15:50:48 +0200 |
| commit | 319138ffcf83de6547651924030eb17c0d7977e5 (patch) | |
| tree | 4d23edab53c89922b22a6a7c80c523c48fd75295 /include/linux | |
| parent | 242b9a9e3df32b9fd6089e01ebdad5a95864ff26 (diff) | |
hwmon/misc: amd-sbi: Move core sbtsi support from hwmon to misc
Move SBTSI(Side-Band Temperature Sensor Interface) core functionality out
of the hwmon-only path and into drivers/misc/amd-sbi so it can be reused
by non-hwmon consumers.
I2C probe parsing is moved from drivers/hwmon/sbtsi_temp.c
into drivers/misc/amd-sbi/tsi.c under CONFIG_AMD_SBTSI. The core driver
stores struct sbtsi_data on the bus device and registers an auxiliary
device amd-sbtsi.temp-sensor.<addr> per target.
The current hwmon temp sensor will now require the CONFIG_AMD_SBTSI
configuration as a new dependency.
This split prepares the driver for additional interfaces while keeping
hwmon support in hwmon subsystem on top of common SBTSI core logic.
Add platform dependencies to clarify this driver is intended to run on
the BMC and not on the managed node.
Reviewed-by: Akshay Gupta <Akshay.Gupta@amd.com>
Signed-off-by: Prathima <Prathima.Lk@amd.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://patch.msgid.link/20260710111642.850022-2-Akshay.Gupta@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/misc/tsi.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/misc/tsi.h b/include/linux/misc/tsi.h new file mode 100644 index 000000000000..befdc2d14160 --- /dev/null +++ b/include/linux/misc/tsi.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * AMD SBTSI shared data structure and auxiliary bus definitions. + * + * Copyright (C) 2026 Advanced Micro Devices, Inc. + */ + +#ifndef _LINUX_MISC_TSI_H_ +#define _LINUX_MISC_TSI_H_ + +#include <linux/i2c.h> +#include <linux/types.h> + +/** + * struct sbtsi_data - driver private data for an AMD SB-TSI device + * @client: underlying I2C client + * @ext_range_mode: sensor uses extended temperature range + * @read_order: if set, decimal part must be read before integer part + */ +struct sbtsi_data { + struct i2c_client *client; + bool ext_range_mode; + bool read_order; +}; + +/* + * Name of the auxiliary device published on the auxiliary bus by the core + * driver. The full device name is "amd-sbtsi.temp-sensor.<id>". where + * <id> is the auxiliary device instance id. + */ +#define AMD_SBTSI_ADEV "amd-sbtsi" +#define AMD_SBTSI_AUX_HWMON "temp-sensor" + +#endif /* _LINUX_MISC_TSI_H_ */ |
