2023-07-13 15:06:12

by Henning Schild

[permalink] [raw]
Subject: [PATCH v2 0/3] platform/x86: simatic-ipc: add another model and hwmon module loading

cahnged since v1:
- switch to using a list of modules per device
- add p3 and make the watchdog module load code use what p2 created

The first patch just adds a device that is pretty similar to another one
we already had here.

The second patch loads modules for hwmon support, should they be
available. That will save users the need to detect and manually load
those modules after a machine has been clearly identified by its Siemens
Simatic IPC station id.

And finally p3 changes another request_module call to use the mechanism
introduced in p2.

Henning Schild (3):
platform/x86: simatic-ipc: add another model
platform/x86: simatic-ipc: add auto-loading of hwmon modules
platform/x86: simatic-ipc: use extra module loading for watchdog

drivers/platform/x86/simatic-ipc.c | 74 ++++++++++++++-----
include/linux/platform_data/x86/simatic-ipc.h | 1 +
2 files changed, 57 insertions(+), 18 deletions(-)

--
2.41.0



2023-07-13 15:27:06

by Henning Schild

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] platform/x86: simatic-ipc: add another model and hwmon module loading

Am Thu, 13 Jul 2023 16:48:29 +0200
schrieb Henning Schild <[email protected]>:

> cahnged since v1:
> - switch to using a list of modules per device
> - add p3 and make the watchdog module load code use what p2 created
>
> The first patch just adds a device that is pretty similar to another
> one we already had here.
>
> The second patch loads modules for hwmon support, should they be
> available. That will save users the need to detect and manually load
> those modules after a machine has been clearly identified by its
> Siemens Simatic IPC station id.
>
> And finally p3 changes another request_module call to use the
> mechanism introduced in p2.

Note that this is based on

[PATCH 0/2] platform/x86: add CMOS battery monitoring for simatic IPCs

which is based on

[PATCH v2 1/2] platform/x86: simatic-ipc: add another model BX-21A

Henning

> Henning Schild (3):
> platform/x86: simatic-ipc: add another model
> platform/x86: simatic-ipc: add auto-loading of hwmon modules
> platform/x86: simatic-ipc: use extra module loading for watchdog
>
> drivers/platform/x86/simatic-ipc.c | 74
> ++++++++++++++----- include/linux/platform_data/x86/simatic-ipc.h |
> 1 + 2 files changed, 57 insertions(+), 18 deletions(-)
>


2023-07-14 10:29:06

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] platform/x86: simatic-ipc: add another model and hwmon module loading

Hi,

On 7/13/23 16:48, Henning Schild wrote:
> cahnged since v1:
> - switch to using a list of modules per device
> - add p3 and make the watchdog module load code use what p2 created
>
> The first patch just adds a device that is pretty similar to another one
> we already had here.
>
> The second patch loads modules for hwmon support, should they be
> available. That will save users the need to detect and manually load
> those modules after a machine has been clearly identified by its Siemens
> Simatic IPC station id.
>
> And finally p3 changes another request_module call to use the mechanism
> introduced in p2.
>
> Henning Schild (3):
> platform/x86: simatic-ipc: add another model
> platform/x86: simatic-ipc: add auto-loading of hwmon modules
> platform/x86: simatic-ipc: use extra module loading for watchdog

Thank you. I've merged this into the new platform-drivers-x86-simatic-ipc
branch where I'm collecting all the pending platform/x86: simatic-ipc
work.

Regards,

Hans




> drivers/platform/x86/simatic-ipc.c | 74 ++++++++++++++-----
> include/linux/platform_data/x86/simatic-ipc.h | 1 +
> 2 files changed, 57 insertions(+), 18 deletions(-)
>


2023-07-14 11:16:58

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] platform/x86: simatic-ipc: add another model and hwmon module loading

Hi Henning,

On 7/13/23 16:48, Henning Schild wrote:
> cahnged since v1:
> - switch to using a list of modules per device
> - add p3 and make the watchdog module load code use what p2 created
>
> The first patch just adds a device that is pretty similar to another one
> we already had here.
>
> The second patch loads modules for hwmon support, should they be
> available. That will save users the need to detect and manually load
> those modules after a machine has been clearly identified by its Siemens
> Simatic IPC station id.
>
> And finally p3 changes another request_module call to use the mechanism
> introduced in p2.
>
> Henning Schild (3):
> platform/x86: simatic-ipc: add another model
> platform/x86: simatic-ipc: add auto-loading of hwmon modules
> platform/x86: simatic-ipc: use extra module loading for watchdog
>
> drivers/platform/x86/simatic-ipc.c | 74 ++++++++++++++-----
> include/linux/platform_data/x86/simatic-ipc.h | 1 +
> 2 files changed, 57 insertions(+), 18 deletions(-)

p.s.

Looking at the latest simatic pdx86 code:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=platform-drivers-x86-simatic-ipc

I see 5 Kconfig options and 5 .c files directly under

drivers/platform/x86/

at this point I think it would be nice to move this into its
own simatic subdir: drivers/platform/x86/simatic

with its own Makefile and Kconfig to avoid cluttering the main
drivers/platform/x86 dir and Kconfig too much.

Can you prepare a patch for this on top of:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=platform-drivers-x86-simatic-ipc

?

See:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28

For an example of a similar move done for Dell.

Note this example also adds

"default m"

to all options except for the main X86_PLATFORM_DRIVERS_DELL (X86_PLATFORM_DRIVERS_SIMATIC in this case) so that on interactive make config only the X86_PLATFORM_DRIVERS_SIMATIC will gets asked about and then the rest will automatically get enabled as modules.

Regards,

Hans




2023-07-17 08:14:02

by Henning Schild

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] platform/x86: simatic-ipc: add another model and hwmon module loading

Am Fri, 14 Jul 2023 12:18:04 +0200
schrieb Hans de Goede <[email protected]>:

> Hi Henning,
>
> On 7/13/23 16:48, Henning Schild wrote:
> > cahnged since v1:
> > - switch to using a list of modules per device
> > - add p3 and make the watchdog module load code use what p2 created
> >
> > The first patch just adds a device that is pretty similar to
> > another one we already had here.
> >
> > The second patch loads modules for hwmon support, should they be
> > available. That will save users the need to detect and manually load
> > those modules after a machine has been clearly identified by its
> > Siemens Simatic IPC station id.
> >
> > And finally p3 changes another request_module call to use the
> > mechanism introduced in p2.
> >
> > Henning Schild (3):
> > platform/x86: simatic-ipc: add another model
> > platform/x86: simatic-ipc: add auto-loading of hwmon modules
> > platform/x86: simatic-ipc: use extra module loading for watchdog
> >
> > drivers/platform/x86/simatic-ipc.c | 74
> > ++++++++++++++----- include/linux/platform_data/x86/simatic-ipc.h |
> > 1 + 2 files changed, 57 insertions(+), 18 deletions(-)
>
> p.s.
>
> Looking at the latest simatic pdx86 code:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=platform-drivers-x86-simatic-ipc
>
> I see 5 Kconfig options and 5 .c files directly under
>
> drivers/platform/x86/
>
> at this point I think it would be nice to move this into its
> own simatic subdir: drivers/platform/x86/simatic
>
> with its own Makefile and Kconfig to avoid cluttering the main
> drivers/platform/x86 dir and Kconfig too much.
>
> Can you prepare a patch for this on top of:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=platform-drivers-x86-simatic-ipc
>
> ?
>
> See:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28
>
> For an example of a similar move done for Dell.
>
> Note this example also adds
>
> "default m"
>
> to all options except for the main X86_PLATFORM_DRIVERS_DELL
> (X86_PLATFORM_DRIVERS_SIMATIC in this case) so that on interactive
> make config only the X86_PLATFORM_DRIVERS_SIMATIC will gets asked
> about and then the rest will automatically get enabled as modules.

I will look into the relocation of the drivers and send patches in the
coming days.

Thanks,
Henning

> Regards,
>
> Hans
>
>
>