Message ID | 20230718105213.1275-4-henning.schild@siemens.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | platform/x86: move simatic ipc drivers into subdir | expand |
Hans, this is based on your tag "ib-pdx86-simatic-v6.6" as you requested. Henning Am Tue, 18 Jul 2023 12:52:13 +0200 schrieb Henning Schild <henning.schild@siemens.com>: > Users without a Siemens Simatic IPC will not care about any of these > drivers. Users who do care can enable the submenu and all drivers > behind it will be enabled. > > Suggested-by: Hans de Goede <hdegoede@redhat.com> > Signed-off-by: Henning Schild <henning.schild@siemens.com> > --- > drivers/platform/x86/Kconfig | 59 +------------- > drivers/platform/x86/Makefile | 6 +- > drivers/platform/x86/siemens/Kconfig | 77 > +++++++++++++++++++ drivers/platform/x86/siemens/Makefile | > 11 +++ .../simatic-ipc-batt-apollolake.c | 0 > .../simatic-ipc-batt-elkhartlake.c | 0 > .../{ => siemens}/simatic-ipc-batt-f7188x.c | 0 > .../x86/{ => siemens}/simatic-ipc-batt.c | 0 > .../x86/{ => siemens}/simatic-ipc-batt.h | 0 > .../platform/x86/{ => siemens}/simatic-ipc.c | 0 > 10 files changed, 90 insertions(+), 63 deletions(-) > create mode 100644 drivers/platform/x86/siemens/Kconfig > create mode 100644 drivers/platform/x86/siemens/Makefile > rename drivers/platform/x86/{ => > siemens}/simatic-ipc-batt-apollolake.c (100%) rename > drivers/platform/x86/{ => siemens}/simatic-ipc-batt-elkhartlake.c > (100%) rename drivers/platform/x86/{ => > siemens}/simatic-ipc-batt-f7188x.c (100%) rename > drivers/platform/x86/{ => siemens}/simatic-ipc-batt.c (100%) rename > drivers/platform/x86/{ => siemens}/simatic-ipc-batt.h (100%) rename > drivers/platform/x86/{ => siemens}/simatic-ipc.c (100%) > > diff --git a/drivers/platform/x86/Kconfig > b/drivers/platform/x86/Kconfig index 487d3d8f4da9..f5fcb1ca1b63 100644 > --- a/drivers/platform/x86/Kconfig > +++ b/drivers/platform/x86/Kconfig > @@ -1074,64 +1074,7 @@ config INTEL_SCU_IPC_UTIL > low level access for debug work and updating the firmware. > Say N unless you will be doing this on an Intel MID platform. > > -config SIEMENS_SIMATIC_IPC > - tristate "Siemens Simatic IPC Class driver" > - help > - This Simatic IPC class driver is the central of several > drivers. It > - is mainly used for system identification, after which > drivers in other > - classes will take care of driving specifics of those > machines. > - i.e. LEDs and watchdog. > - > - To compile this driver as a module, choose M here: the > module > - will be called simatic-ipc. > - > -config SIEMENS_SIMATIC_IPC_BATT > - tristate "CMOS battery driver for Siemens Simatic IPCs" > - depends on HWMON > - depends on SIEMENS_SIMATIC_IPC > - default SIEMENS_SIMATIC_IPC > - help > - This option enables support for monitoring the voltage of > the CMOS > - batteries of several Industrial PCs from Siemens. > - > - To compile this driver as a module, choose M here: the > module > - will be called simatic-ipc-batt. > - > -config SIEMENS_SIMATIC_IPC_BATT_APOLLOLAKE > - tristate "CMOS Battery monitoring for Simatic IPCs based on > Apollo Lake GPIO" > - depends on PINCTRL_BROXTON > - depends on SIEMENS_SIMATIC_IPC_BATT > - default SIEMENS_SIMATIC_IPC_BATT > - help > - This option enables CMOS battery monitoring for Simatic > Industrial PCs > - from Siemens based on Apollo Lake GPIO. > - > - To compile this driver as a module, choose M here: the > module > - will be called simatic-ipc-batt-apollolake. > - > -config SIEMENS_SIMATIC_IPC_BATT_ELKHARTLAKE > - tristate "CMOS Battery monitoring for Simatic IPCs based on > Elkhart Lake GPIO" > - depends on PINCTRL_ELKHARTLAKE > - depends on SIEMENS_SIMATIC_IPC_BATT > - default SIEMENS_SIMATIC_IPC_BATT > - help > - This option enables CMOS battery monitoring for Simatic > Industrial PCs > - from Siemens based on Elkhart Lake GPIO. > - > - To compile this driver as a module, choose M here: the > module > - will be called simatic-ipc-batt-elkhartlake. > - > -config SIEMENS_SIMATIC_IPC_BATT_F7188X > - tristate "CMOS Battery monitoring for Simatic IPCs based on > Nuvoton GPIO" > - depends on GPIO_F7188X > - depends on SIEMENS_SIMATIC_IPC_BATT > - default SIEMENS_SIMATIC_IPC_BATT > - help > - This option enables CMOS battery monitoring for Simatic > Industrial PCs > - from Siemens based on Nuvoton GPIO. > - > - To compile this driver as a module, choose M here: the > module > - will be called simatic-ipc-batt-elkhartlake. > +source "drivers/platform/x86/siemens/Kconfig" > > config WINMATE_FM07_KEYS > tristate "Winmate FM07/FM07P front-panel keys driver" > diff --git a/drivers/platform/x86/Makefile > b/drivers/platform/x86/Makefile index 522da0d1584d..f3bf4b90b878 > 100644 --- a/drivers/platform/x86/Makefile > +++ b/drivers/platform/x86/Makefile > @@ -131,11 +131,7 @@ obj-$(CONFIG_INTEL_SCU_IPC_UTIL) += > intel_scu_ipcutil.o obj-$(CONFIG_X86_INTEL_LPSS) += > pmc_atom.o > # Siemens Simatic Industrial PCs > -obj-$(CONFIG_SIEMENS_SIMATIC_IPC) += > simatic-ipc.o -obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT) > += simatic-ipc-batt.o > -obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_APOLLOLAKE) += > simatic-ipc-batt-apollolake.o > -obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_ELKHARTLAKE) += > simatic-ipc-batt-elkhartlake.o > -obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_F7188X) += > simatic-ipc-batt-f7188x.o > +obj-$(CONFIG_X86_PLATFORM_DRIVERS_SIEMENS) += > siemens/ # Winmate obj-$(CONFIG_WINMATE_FM07_KEYS) += > winmate-fm07-keys.o diff --git a/drivers/platform/x86/siemens/Kconfig > b/drivers/platform/x86/siemens/Kconfig new file mode 100644 index > 000000000000..64479f83698c --- /dev/null +++ > b/drivers/platform/x86/siemens/Kconfig @@ -0,0 +1,77 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +# > +# Siemens X86 Platform Specific Drivers > +# > + > +menuconfig X86_PLATFORM_DRIVERS_SIEMENS > + bool "Siemens X86 Platform Specific Device Drivers" > + help > + Say Y here to get to see options for device drivers for > various > + Siemens x86 platforms, mainly Simatic Industrial PCs. > + This option alone does not add any kernel code. > + > + If you say N, all options in this submenu will be skipped > and disabled. + > +if X86_PLATFORM_DRIVERS_SIEMENS > + > +config SIEMENS_SIMATIC_IPC > + tristate "Siemens Simatic IPC Class driver" > + default m > + help > + This Simatic IPC class driver is the central of several > drivers. It > + is mainly used for system identification, after which > drivers in other > + classes will take care of driving specifics of those > machines. > + i.e. LEDs and watchdog. > + > + To compile this driver as a module, choose M here: the > module > + will be called simatic-ipc. > + > +config SIEMENS_SIMATIC_IPC_BATT > + tristate "CMOS battery driver for Siemens Simatic IPCs" > + depends on HWMON > + depends on SIEMENS_SIMATIC_IPC > + default SIEMENS_SIMATIC_IPC > + help > + This option enables support for monitoring the voltage of > the CMOS > + batteries of several Industrial PCs from Siemens. > + > + To compile this driver as a module, choose M here: the > module > + will be called simatic-ipc-batt. > + > +config SIEMENS_SIMATIC_IPC_BATT_APOLLOLAKE > + tristate "CMOS Battery monitoring for Simatic IPCs based on > Apollo Lake GPIO" > + depends on PINCTRL_BROXTON > + depends on SIEMENS_SIMATIC_IPC_BATT > + default SIEMENS_SIMATIC_IPC_BATT > + help > + This option enables CMOS battery monitoring for Simatic > Industrial PCs > + from Siemens based on Apollo Lake GPIO. > + > + To compile this driver as a module, choose M here: the > module > + will be called simatic-ipc-batt-apollolake. > + > +config SIEMENS_SIMATIC_IPC_BATT_ELKHARTLAKE > + tristate "CMOS Battery monitoring for Simatic IPCs based on > Elkhart Lake GPIO" > + depends on PINCTRL_ELKHARTLAKE > + depends on SIEMENS_SIMATIC_IPC_BATT > + default SIEMENS_SIMATIC_IPC_BATT > + help > + This option enables CMOS battery monitoring for Simatic > Industrial PCs > + from Siemens based on Elkhart Lake GPIO. > + > + To compile this driver as a module, choose M here: the > module > + will be called simatic-ipc-batt-elkhartlake. > + > +config SIEMENS_SIMATIC_IPC_BATT_F7188X > + tristate "CMOS Battery monitoring for Simatic IPCs based on > Nuvoton GPIO" > + depends on GPIO_F7188X > + depends on SIEMENS_SIMATIC_IPC_BATT > + default SIEMENS_SIMATIC_IPC_BATT > + help > + This option enables CMOS battery monitoring for Simatic > Industrial PCs > + from Siemens based on Nuvoton GPIO. > + > + To compile this driver as a module, choose M here: the > module > + will be called simatic-ipc-batt-elkhartlake. > + > +endif # X86_PLATFORM_DRIVERS_SIEMENS > diff --git a/drivers/platform/x86/siemens/Makefile > b/drivers/platform/x86/siemens/Makefile new file mode 100644 > index 000000000000..2b384b4cb8ba > --- /dev/null > +++ b/drivers/platform/x86/siemens/Makefile > @@ -0,0 +1,11 @@ > +# SPDX-License-Identifier: GPL-2.0 > +# > +# Makefile for linux/drivers/platform/x86/siemens > +# Siemens x86 Platform-Specific Drivers > +# > + > +obj-$(CONFIG_SIEMENS_SIMATIC_IPC) += > simatic-ipc.o +obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT) > += simatic-ipc-batt.o > +obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_APOLLOLAKE) += > simatic-ipc-batt-apollolake.o > +obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_ELKHARTLAKE) += > simatic-ipc-batt-elkhartlake.o > +obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_F7188X) += > simatic-ipc-batt-f7188x.o diff --git > a/drivers/platform/x86/simatic-ipc-batt-apollolake.c > b/drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c > similarity index 100% rename from > drivers/platform/x86/simatic-ipc-batt-apollolake.c rename to > drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c diff --git > a/drivers/platform/x86/simatic-ipc-batt-elkhartlake.c > b/drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c > similarity index 100% rename from > drivers/platform/x86/simatic-ipc-batt-elkhartlake.c rename to > drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c diff > --git a/drivers/platform/x86/simatic-ipc-batt-f7188x.c > b/drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c similarity > index 100% rename from drivers/platform/x86/simatic-ipc-batt-f7188x.c > rename to drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c diff > --git a/drivers/platform/x86/simatic-ipc-batt.c > b/drivers/platform/x86/siemens/simatic-ipc-batt.c similarity index > 100% rename from drivers/platform/x86/simatic-ipc-batt.c rename to > drivers/platform/x86/siemens/simatic-ipc-batt.c diff --git > a/drivers/platform/x86/simatic-ipc-batt.h > b/drivers/platform/x86/siemens/simatic-ipc-batt.h similarity index > 100% rename from drivers/platform/x86/simatic-ipc-batt.h rename to > drivers/platform/x86/siemens/simatic-ipc-batt.h diff --git > a/drivers/platform/x86/simatic-ipc.c > b/drivers/platform/x86/siemens/simatic-ipc.c similarity index 100% > rename from drivers/platform/x86/simatic-ipc.c rename to > drivers/platform/x86/siemens/simatic-ipc.c
On Tue, Jul 18, 2023 at 12:52:13PM +0200, Henning Schild wrote: > Users without a Siemens Simatic IPC will not care about any of these > drivers. Users who do care can enable the submenu and all drivers behind > it will be enabled. ... > # Siemens Simatic Industrial PCs > +obj-$(CONFIG_X86_PLATFORM_DRIVERS_SIEMENS) += siemens/ Do you need conditional here? We have stumbled over similar for entire intel subfolder, it might affect the rest as well when you don't expect it. obj-y += siemens/ ?
Am Tue, 18 Jul 2023 17:23:30 +0300 schrieb Andy Shevchenko <andriy.shevchenko@linux.intel.com>: > On Tue, Jul 18, 2023 at 12:52:13PM +0200, Henning Schild wrote: > > Users without a Siemens Simatic IPC will not care about any of these > > drivers. Users who do care can enable the submenu and all drivers > > behind it will be enabled. > > ... > > > # Siemens Simatic Industrial PCs > > +obj-$(CONFIG_X86_PLATFORM_DRIVERS_SIEMENS) += > > siemens/ > > Do you need conditional here? We have stumbled over similar for > entire intel subfolder, it might affect the rest as well when you > don't expect it. > > obj-y += siemens/ > > ? > It was requested to be done like that by Hans, he wanted me to do a similar thing that https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28 is doing. And that is what i did. If there was a y ... the whole "one switch to rule them all" story would not work out anymore. Thanks for the review though. Henning
On Tue, Jul 18, 2023 at 04:47:27PM +0200, Henning Schild wrote: > Am Tue, 18 Jul 2023 17:23:30 +0300 > schrieb Andy Shevchenko <andriy.shevchenko@linux.intel.com>: > > > On Tue, Jul 18, 2023 at 12:52:13PM +0200, Henning Schild wrote: > > > Users without a Siemens Simatic IPC will not care about any of these > > > drivers. Users who do care can enable the submenu and all drivers > > > behind it will be enabled. ... > > > # Siemens Simatic Industrial PCs > > > +obj-$(CONFIG_X86_PLATFORM_DRIVERS_SIEMENS) += > > > siemens/ > > > > Do you need conditional here? We have stumbled over similar for > > entire intel subfolder, it might affect the rest as well when you > > don't expect it. > > > > obj-y += siemens/ > > > > ? > > It was requested to be done like that by Hans, he wanted me to do a > similar thing that "Similar" is not the "same". :-) > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28 > is doing. > > And that is what i did. If there was a y ... the whole "one switch to > rule them all" story would not work out anymore. See these: https://git.kernel.org/torvalds/c/8bd836feb6ca https://git.kernel.org/torvalds/c/4f6c131c3c31
Am Tue, 18 Jul 2023 18:15:06 +0300 schrieb Andy Shevchenko <andriy.shevchenko@linux.intel.com>: > On Tue, Jul 18, 2023 at 04:47:27PM +0200, Henning Schild wrote: > > Am Tue, 18 Jul 2023 17:23:30 +0300 > > schrieb Andy Shevchenko <andriy.shevchenko@linux.intel.com>: > > > > > On Tue, Jul 18, 2023 at 12:52:13PM +0200, Henning Schild wrote: > > > > Users without a Siemens Simatic IPC will not care about any of > > > > these drivers. Users who do care can enable the submenu and all > > > > drivers behind it will be enabled. > > ... > > > > > # Siemens Simatic Industrial PCs > > > > +obj-$(CONFIG_X86_PLATFORM_DRIVERS_SIEMENS) += > > > > siemens/ > > > > > > Do you need conditional here? We have stumbled over similar for > > > entire intel subfolder, it might affect the rest as well when you > > > don't expect it. > > > > > > obj-y += siemens/ > > > > > > ? > > > > It was requested to be done like that by Hans, he wanted me to do a > > similar thing that > > "Similar" is not the "same". :-) > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28 > > is doing. > > > > And that is what i did. If there was a y ... the whole "one switch > > to rule them all" story would not work out anymore. > > See these: > https://git.kernel.org/torvalds/c/8bd836feb6ca > https://git.kernel.org/torvalds/c/4f6c131c3c31 Ok i will switch that to a simple y without a CONFIG item to it, and start that inheritance chain at SIEMENS_SIMATIC_IPC. That in fact also makes sure the interface does not change and "make olddefconfig" does not turn the Siemens stuff back off because the newly introduced guard is blocking/hiding what used to be turned on. Thanks! Henning
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 487d3d8f4da9..f5fcb1ca1b63 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -1074,64 +1074,7 @@ config INTEL_SCU_IPC_UTIL low level access for debug work and updating the firmware. Say N unless you will be doing this on an Intel MID platform. -config SIEMENS_SIMATIC_IPC - tristate "Siemens Simatic IPC Class driver" - help - This Simatic IPC class driver is the central of several drivers. It - is mainly used for system identification, after which drivers in other - classes will take care of driving specifics of those machines. - i.e. LEDs and watchdog. - - To compile this driver as a module, choose M here: the module - will be called simatic-ipc. - -config SIEMENS_SIMATIC_IPC_BATT - tristate "CMOS battery driver for Siemens Simatic IPCs" - depends on HWMON - depends on SIEMENS_SIMATIC_IPC - default SIEMENS_SIMATIC_IPC - help - This option enables support for monitoring the voltage of the CMOS - batteries of several Industrial PCs from Siemens. - - To compile this driver as a module, choose M here: the module - will be called simatic-ipc-batt. - -config SIEMENS_SIMATIC_IPC_BATT_APOLLOLAKE - tristate "CMOS Battery monitoring for Simatic IPCs based on Apollo Lake GPIO" - depends on PINCTRL_BROXTON - depends on SIEMENS_SIMATIC_IPC_BATT - default SIEMENS_SIMATIC_IPC_BATT - help - This option enables CMOS battery monitoring for Simatic Industrial PCs - from Siemens based on Apollo Lake GPIO. - - To compile this driver as a module, choose M here: the module - will be called simatic-ipc-batt-apollolake. - -config SIEMENS_SIMATIC_IPC_BATT_ELKHARTLAKE - tristate "CMOS Battery monitoring for Simatic IPCs based on Elkhart Lake GPIO" - depends on PINCTRL_ELKHARTLAKE - depends on SIEMENS_SIMATIC_IPC_BATT - default SIEMENS_SIMATIC_IPC_BATT - help - This option enables CMOS battery monitoring for Simatic Industrial PCs - from Siemens based on Elkhart Lake GPIO. - - To compile this driver as a module, choose M here: the module - will be called simatic-ipc-batt-elkhartlake. - -config SIEMENS_SIMATIC_IPC_BATT_F7188X - tristate "CMOS Battery monitoring for Simatic IPCs based on Nuvoton GPIO" - depends on GPIO_F7188X - depends on SIEMENS_SIMATIC_IPC_BATT - default SIEMENS_SIMATIC_IPC_BATT - help - This option enables CMOS battery monitoring for Simatic Industrial PCs - from Siemens based on Nuvoton GPIO. - - To compile this driver as a module, choose M here: the module - will be called simatic-ipc-batt-elkhartlake. +source "drivers/platform/x86/siemens/Kconfig" config WINMATE_FM07_KEYS tristate "Winmate FM07/FM07P front-panel keys driver" diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile index 522da0d1584d..f3bf4b90b878 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile @@ -131,11 +131,7 @@ obj-$(CONFIG_INTEL_SCU_IPC_UTIL) += intel_scu_ipcutil.o obj-$(CONFIG_X86_INTEL_LPSS) += pmc_atom.o # Siemens Simatic Industrial PCs -obj-$(CONFIG_SIEMENS_SIMATIC_IPC) += simatic-ipc.o -obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT) += simatic-ipc-batt.o -obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_APOLLOLAKE) += simatic-ipc-batt-apollolake.o -obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_ELKHARTLAKE) += simatic-ipc-batt-elkhartlake.o -obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_F7188X) += simatic-ipc-batt-f7188x.o +obj-$(CONFIG_X86_PLATFORM_DRIVERS_SIEMENS) += siemens/ # Winmate obj-$(CONFIG_WINMATE_FM07_KEYS) += winmate-fm07-keys.o diff --git a/drivers/platform/x86/siemens/Kconfig b/drivers/platform/x86/siemens/Kconfig new file mode 100644 index 000000000000..64479f83698c --- /dev/null +++ b/drivers/platform/x86/siemens/Kconfig @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Siemens X86 Platform Specific Drivers +# + +menuconfig X86_PLATFORM_DRIVERS_SIEMENS + bool "Siemens X86 Platform Specific Device Drivers" + help + Say Y here to get to see options for device drivers for various + Siemens x86 platforms, mainly Simatic Industrial PCs. + This option alone does not add any kernel code. + + If you say N, all options in this submenu will be skipped and disabled. + +if X86_PLATFORM_DRIVERS_SIEMENS + +config SIEMENS_SIMATIC_IPC + tristate "Siemens Simatic IPC Class driver" + default m + help + This Simatic IPC class driver is the central of several drivers. It + is mainly used for system identification, after which drivers in other + classes will take care of driving specifics of those machines. + i.e. LEDs and watchdog. + + To compile this driver as a module, choose M here: the module + will be called simatic-ipc. + +config SIEMENS_SIMATIC_IPC_BATT + tristate "CMOS battery driver for Siemens Simatic IPCs" + depends on HWMON + depends on SIEMENS_SIMATIC_IPC + default SIEMENS_SIMATIC_IPC + help + This option enables support for monitoring the voltage of the CMOS + batteries of several Industrial PCs from Siemens. + + To compile this driver as a module, choose M here: the module + will be called simatic-ipc-batt. + +config SIEMENS_SIMATIC_IPC_BATT_APOLLOLAKE + tristate "CMOS Battery monitoring for Simatic IPCs based on Apollo Lake GPIO" + depends on PINCTRL_BROXTON + depends on SIEMENS_SIMATIC_IPC_BATT + default SIEMENS_SIMATIC_IPC_BATT + help + This option enables CMOS battery monitoring for Simatic Industrial PCs + from Siemens based on Apollo Lake GPIO. + + To compile this driver as a module, choose M here: the module + will be called simatic-ipc-batt-apollolake. + +config SIEMENS_SIMATIC_IPC_BATT_ELKHARTLAKE + tristate "CMOS Battery monitoring for Simatic IPCs based on Elkhart Lake GPIO" + depends on PINCTRL_ELKHARTLAKE + depends on SIEMENS_SIMATIC_IPC_BATT + default SIEMENS_SIMATIC_IPC_BATT + help + This option enables CMOS battery monitoring for Simatic Industrial PCs + from Siemens based on Elkhart Lake GPIO. + + To compile this driver as a module, choose M here: the module + will be called simatic-ipc-batt-elkhartlake. + +config SIEMENS_SIMATIC_IPC_BATT_F7188X + tristate "CMOS Battery monitoring for Simatic IPCs based on Nuvoton GPIO" + depends on GPIO_F7188X + depends on SIEMENS_SIMATIC_IPC_BATT + default SIEMENS_SIMATIC_IPC_BATT + help + This option enables CMOS battery monitoring for Simatic Industrial PCs + from Siemens based on Nuvoton GPIO. + + To compile this driver as a module, choose M here: the module + will be called simatic-ipc-batt-elkhartlake. + +endif # X86_PLATFORM_DRIVERS_SIEMENS diff --git a/drivers/platform/x86/siemens/Makefile b/drivers/platform/x86/siemens/Makefile new file mode 100644 index 000000000000..2b384b4cb8ba --- /dev/null +++ b/drivers/platform/x86/siemens/Makefile @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for linux/drivers/platform/x86/siemens +# Siemens x86 Platform-Specific Drivers +# + +obj-$(CONFIG_SIEMENS_SIMATIC_IPC) += simatic-ipc.o +obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT) += simatic-ipc-batt.o +obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_APOLLOLAKE) += simatic-ipc-batt-apollolake.o +obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_ELKHARTLAKE) += simatic-ipc-batt-elkhartlake.o +obj-$(CONFIG_SIEMENS_SIMATIC_IPC_BATT_F7188X) += simatic-ipc-batt-f7188x.o diff --git a/drivers/platform/x86/simatic-ipc-batt-apollolake.c b/drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c similarity index 100% rename from drivers/platform/x86/simatic-ipc-batt-apollolake.c rename to drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c diff --git a/drivers/platform/x86/simatic-ipc-batt-elkhartlake.c b/drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c similarity index 100% rename from drivers/platform/x86/simatic-ipc-batt-elkhartlake.c rename to drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c diff --git a/drivers/platform/x86/simatic-ipc-batt-f7188x.c b/drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c similarity index 100% rename from drivers/platform/x86/simatic-ipc-batt-f7188x.c rename to drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c diff --git a/drivers/platform/x86/simatic-ipc-batt.c b/drivers/platform/x86/siemens/simatic-ipc-batt.c similarity index 100% rename from drivers/platform/x86/simatic-ipc-batt.c rename to drivers/platform/x86/siemens/simatic-ipc-batt.c diff --git a/drivers/platform/x86/simatic-ipc-batt.h b/drivers/platform/x86/siemens/simatic-ipc-batt.h similarity index 100% rename from drivers/platform/x86/simatic-ipc-batt.h rename to drivers/platform/x86/siemens/simatic-ipc-batt.h diff --git a/drivers/platform/x86/simatic-ipc.c b/drivers/platform/x86/siemens/simatic-ipc.c similarity index 100% rename from drivers/platform/x86/simatic-ipc.c rename to drivers/platform/x86/siemens/simatic-ipc.c
Users without a Siemens Simatic IPC will not care about any of these drivers. Users who do care can enable the submenu and all drivers behind it will be enabled. Suggested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Henning Schild <henning.schild@siemens.com> --- drivers/platform/x86/Kconfig | 59 +------------- drivers/platform/x86/Makefile | 6 +- drivers/platform/x86/siemens/Kconfig | 77 +++++++++++++++++++ drivers/platform/x86/siemens/Makefile | 11 +++ .../simatic-ipc-batt-apollolake.c | 0 .../simatic-ipc-batt-elkhartlake.c | 0 .../{ => siemens}/simatic-ipc-batt-f7188x.c | 0 .../x86/{ => siemens}/simatic-ipc-batt.c | 0 .../x86/{ => siemens}/simatic-ipc-batt.h | 0 .../platform/x86/{ => siemens}/simatic-ipc.c | 0 10 files changed, 90 insertions(+), 63 deletions(-) create mode 100644 drivers/platform/x86/siemens/Kconfig create mode 100644 drivers/platform/x86/siemens/Makefile rename drivers/platform/x86/{ => siemens}/simatic-ipc-batt-apollolake.c (100%) rename drivers/platform/x86/{ => siemens}/simatic-ipc-batt-elkhartlake.c (100%) rename drivers/platform/x86/{ => siemens}/simatic-ipc-batt-f7188x.c (100%) rename drivers/platform/x86/{ => siemens}/simatic-ipc-batt.c (100%) rename drivers/platform/x86/{ => siemens}/simatic-ipc-batt.h (100%) rename drivers/platform/x86/{ => siemens}/simatic-ipc.c (100%)