mbox series

[v2,0/3] platform/x86: move simatic drivers into subdir

Message ID 20230719153518.13073-1-henning.schild@siemens.com
Headers show
Series platform/x86: move simatic drivers into subdir | expand

Message

Henning Schild July 19, 2023, 3:35 p.m. UTC
change since v1:
 - switch LED/wdt Kconfig to "default y"
 - remove guard which could hide whole siemens submenu, and default m

This series does two things. It builds up a Kconfig inheritance chain
for all platform device drivers, namely Watchdog and LED. And then it
puts all Siemens Simatic IPC drivers in the platform/x86/ directory in
a subdirectory called "siemens".

That is so that users have to flip less config switches, and to ease
maintenance.

Henning Schild (3):
  watchdog: make Siemens Simatic watchdog driver default on platform
  leds: simatic-ipc-leds: default config switch to platform switch
  platform/x86: Move all simatic ipc drivers to the subdirectory siemens

 drivers/leds/simple/Kconfig                   |  1 +
 drivers/platform/x86/Kconfig                  | 59 +----------------
 drivers/platform/x86/Makefile                 |  6 +-
 drivers/platform/x86/siemens/Kconfig          | 63 +++++++++++++++++++
 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
 drivers/watchdog/Kconfig                      |  1 +
 12 files changed, 78 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%)

Comments

Andy Shevchenko July 19, 2023, 4:06 p.m. UTC | #1
On Wed, Jul 19, 2023 at 05:35:15PM +0200, Henning Schild wrote:
> change since v1:
>  - switch LED/wdt Kconfig to "default y"
>  - remove guard which could hide whole siemens submenu, and default m
> 
> This series does two things. It builds up a Kconfig inheritance chain
> for all platform device drivers, namely Watchdog and LED. And then it
> puts all Siemens Simatic IPC drivers in the platform/x86/ directory in
> a subdirectory called "siemens".
> 
> That is so that users have to flip less config switches, and to ease
> maintenance.

All three good enough, although I prefer the ordering that 'tristate'
followed by 'default' without interleaved 'depends on'. I leave it
to Hans. Other that that,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Guenter Roeck July 19, 2023, 4:33 p.m. UTC | #2
On 7/19/23 08:35, Henning Schild wrote:
> If a user did choose to enable Siemens Simatic platform support they
> likely want that driver to be enabled without having to flip more config
> switches. So we make the watchdog driver config switch default to the
> platform driver switches value.
> 
> Signed-off-by: Henning Schild <henning.schild@siemens.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index ee97d89dfc11..04e9b40cf7d5 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -1681,6 +1681,7 @@ config NIC7018_WDT
>   config SIEMENS_SIMATIC_IPC_WDT
>   	tristate "Siemens Simatic IPC Watchdog"
>   	depends on SIEMENS_SIMATIC_IPC
> +	default y
>   	select WATCHDOG_CORE
>   	select P2SB
>   	help
Hans de Goede July 25, 2023, 2:27 p.m. UTC | #3
Hi,

On 7/19/23 18:06, Andy Shevchenko wrote:
> On Wed, Jul 19, 2023 at 05:35:15PM +0200, Henning Schild wrote:
>> change since v1:
>>  - switch LED/wdt Kconfig to "default y"
>>  - remove guard which could hide whole siemens submenu, and default m
>>
>> This series does two things. It builds up a Kconfig inheritance chain
>> for all platform device drivers, namely Watchdog and LED. And then it
>> puts all Siemens Simatic IPC drivers in the platform/x86/ directory in
>> a subdirectory called "siemens".
>>
>> That is so that users have to flip less config switches, and to ease
>> maintenance.
> 
> All three good enough, although I prefer the ordering that 'tristate'
> followed by 'default' without interleaved 'depends on'. I leave it
> to Hans. Other that that,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thank you.

Lee, Guenter do you want me to take the entire series on top of:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=platform-drivers-x86-simatic-ipc (aka ib-pdx86-simatic-v6.6)

And send an updated pull-req ?

Or shall I take just 3/3 and will you take the Kconfig
changes from 1/3 resp 2/3 directly ?

Regards,

Hans
Lee Jones July 27, 2023, 9:26 a.m. UTC | #4
On Tue, 25 Jul 2023, Hans de Goede wrote:

> Hi,
> 
> On 7/19/23 18:06, Andy Shevchenko wrote:
> > On Wed, Jul 19, 2023 at 05:35:15PM +0200, Henning Schild wrote:
> >> change since v1:
> >>  - switch LED/wdt Kconfig to "default y"
> >>  - remove guard which could hide whole siemens submenu, and default m
> >>
> >> This series does two things. It builds up a Kconfig inheritance chain
> >> for all platform device drivers, namely Watchdog and LED. And then it
> >> puts all Siemens Simatic IPC drivers in the platform/x86/ directory in
> >> a subdirectory called "siemens".
> >>
> >> That is so that users have to flip less config switches, and to ease
> >> maintenance.
> > 
> > All three good enough, although I prefer the ordering that 'tristate'
> > followed by 'default' without interleaved 'depends on'. I leave it
> > to Hans. Other that that,
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Thank you.
> 
> Lee, Guenter do you want me to take the entire series on top of:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=platform-drivers-x86-simatic-ipc (aka ib-pdx86-simatic-v6.6)
> 
> And send an updated pull-req ?

Please apply - no PR required for me.

> Or shall I take just 3/3 and will you take the Kconfig
> changes from 1/3 resp 2/3 directly ?