platform/x86: simatic-ipc: add CMOS battery monitoring
authorHenning Schild <henning.schild@siemens.com>
Thu, 6 Jul 2023 15:48:31 +0000 (17:48 +0200)
committerHans de Goede <hdegoede@redhat.com>
Fri, 14 Jul 2023 13:06:40 +0000 (15:06 +0200)
commit917f543407947a007052edf7f89854259e6be008
tree8d4b704b0ddea5ed0faaf44dab53975f35ae382f
parent15fe994ee53a0093f4f7771100cd4ca9c1597748
platform/x86: simatic-ipc: add CMOS battery monitoring

Siemens Simatic Industrial PCs can monitor the voltage of the CMOS
battery with two bits that indicate low or empty state. This can be GPIO
or PortIO based.
Here we model that as a hwmon voltage. The core driver does the PortIO
and provides boilerplate for the GPIO versions. Which are split out to
model runtime dependencies while allowing fine-grained kernel
configuration.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230706154831.19100-3-henning.schild@siemens.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/Kconfig
drivers/platform/x86/Makefile
drivers/platform/x86/simatic-ipc-batt-apollolake.c [new file with mode: 0644]
drivers/platform/x86/simatic-ipc-batt-elkhartlake.c [new file with mode: 0644]
drivers/platform/x86/simatic-ipc-batt-f7188x.c [new file with mode: 0644]
drivers/platform/x86/simatic-ipc-batt.c [new file with mode: 0644]
drivers/platform/x86/simatic-ipc-batt.h [new file with mode: 0644]
drivers/platform/x86/simatic-ipc.c
include/linux/platform_data/x86/simatic-ipc-base.h