hwmon: Add support for SB-RMI power module
authorAkshay Gupta <Akshay.Gupta@amd.com>
Mon, 26 Jul 2021 13:36:13 +0000 (19:06 +0530)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 17 Aug 2021 21:54:25 +0000 (14:54 -0700)
commit5a0f50d110b36aaf624fc2017d5e08357e2c8143
tree02b156b140ced55495619318fed0c618d92c0280
parent6f447ce0f7c16ee501d92091446362aa3359d89a
hwmon: Add support for SB-RMI power module

On AMD platforms the Out-of-band access is provided by
Advanced Platform Management Link (APML), APML is a
SMBus v2.0 compatible 2-wire processor client interface.
APML is also referred as the sideband interface (SBI).

APML is used to communicate with the
Side-Band Remote Management Interface (SB-RMI) which provides
Soft Mailbox messages to manage power consumption and
power limits of the CPU socket.

- This module add support to read power consumption,
  power limit & max power limit and write power limit.
- To instantiate this driver on a Board Management Controller (BMC)
  connected to an AMD CPU with SB-RMI support, the i2c bus number
  would be the bus connected from the BMC to the CPU.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Akshay Gupta <Akshay.Gupta@amd.com>
Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Link: https://lore.kernel.org/r/20210726133615.9709-1-nchatrad@amd.com
[groeck: Fix uninitialized variable problem when reporting max power]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/sbrmi.c [new file with mode: 0644]