change since v1:
- split into two patches to separate leds from platform code and ease
merging
These are rather simple patches adding LED support for yet another Simatic
IPC model.
Henning Schild (2):
platform/x86: simatic-ipc: add another model BX-21A
leds: simatic-ipc-leds-gpio: add Elkhart Lake version
drivers/leds/simple/Kconfig | 13 +++++
drivers/leds/simple/Makefile | 1 +
.../leds/simple/simatic-ipc-leds-gpio-core.c | 4 ++
.../simatic-ipc-leds-gpio-elkhartlake.c | 57 +++++++++++++++++++
drivers/platform/x86/simatic-ipc.c | 3 +
.../platform_data/x86/simatic-ipc-base.h | 3 +-
include/linux/platform_data/x86/simatic-ipc.h | 3 +-
7 files changed, 82 insertions(+), 2 deletions(-)
create mode 100644 drivers/leds/simple/simatic-ipc-leds-gpio-elkhartlake.c
--
2.41.0
This adds support for the Siemens Simatic IPC model BX-21A. Actual
drivers for that model will be sent in separate patches.
Signed-off-by: Henning Schild <[email protected]>
---
drivers/platform/x86/simatic-ipc.c | 3 +++
include/linux/platform_data/x86/simatic-ipc-base.h | 3 ++-
include/linux/platform_data/x86/simatic-ipc.h | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/simatic-ipc.c b/drivers/platform/x86/simatic-ipc.c
index c773995b230d..4402cd354104 100644
--- a/drivers/platform/x86/simatic-ipc.c
+++ b/drivers/platform/x86/simatic-ipc.c
@@ -48,6 +48,7 @@ static struct {
{SIMATIC_IPC_IPC477E, SIMATIC_IPC_DEVICE_NONE, SIMATIC_IPC_DEVICE_427E},
{SIMATIC_IPC_IPCBX_39A, SIMATIC_IPC_DEVICE_227G, SIMATIC_IPC_DEVICE_227G},
{SIMATIC_IPC_IPCPX_39A, SIMATIC_IPC_DEVICE_NONE, SIMATIC_IPC_DEVICE_227G},
+ {SIMATIC_IPC_IPCBX_21A, SIMATIC_IPC_DEVICE_BX_21A, SIMATIC_IPC_DEVICE_NONE},
};
static int register_platform_devices(u32 station_id)
@@ -72,6 +73,8 @@ static int register_platform_devices(u32 station_id)
pdevname = KBUILD_MODNAME "_leds_gpio_apollolake";
if (ledmode == SIMATIC_IPC_DEVICE_227G)
pdevname = KBUILD_MODNAME "_leds_gpio_f7188x";
+ if (ledmode == SIMATIC_IPC_DEVICE_BX_21A)
+ pdevname = KBUILD_MODNAME "_leds_gpio_elkhartlake";
platform_data.devmode = ledmode;
ipc_led_platform_device =
platform_device_register_data(NULL,
diff --git a/include/linux/platform_data/x86/simatic-ipc-base.h b/include/linux/platform_data/x86/simatic-ipc-base.h
index 57d6a10dfc9e..68c455f5edad 100644
--- a/include/linux/platform_data/x86/simatic-ipc-base.h
+++ b/include/linux/platform_data/x86/simatic-ipc-base.h
@@ -2,7 +2,7 @@
/*
* Siemens SIMATIC IPC drivers
*
- * Copyright (c) Siemens AG, 2018-2021
+ * Copyright (c) Siemens AG, 2018-2023
*
* Authors:
* Henning Schild <[email protected]>
@@ -20,6 +20,7 @@
#define SIMATIC_IPC_DEVICE_127E 3
#define SIMATIC_IPC_DEVICE_227E 4
#define SIMATIC_IPC_DEVICE_227G 5
+#define SIMATIC_IPC_DEVICE_BX_21A 6
struct simatic_ipc_platform {
u8 devmode;
diff --git a/include/linux/platform_data/x86/simatic-ipc.h b/include/linux/platform_data/x86/simatic-ipc.h
index a48bb5240977..1a8e4c1099e3 100644
--- a/include/linux/platform_data/x86/simatic-ipc.h
+++ b/include/linux/platform_data/x86/simatic-ipc.h
@@ -2,7 +2,7 @@
/*
* Siemens SIMATIC IPC drivers
*
- * Copyright (c) Siemens AG, 2018-2021
+ * Copyright (c) Siemens AG, 2018-2023
*
* Authors:
* Henning Schild <[email protected]>
@@ -34,6 +34,7 @@ enum simatic_ipc_station_ids {
SIMATIC_IPC_IPC227G = 0x00000F01,
SIMATIC_IPC_IPCBX_39A = 0x00001001,
SIMATIC_IPC_IPCPX_39A = 0x00001002,
+ SIMATIC_IPC_IPCBX_21A = 0x00001101,
};
static inline u32 simatic_ipc_get_station_id(u8 *data, int max_len)
--
2.41.0
On Thu, Jul 13, 2023 at 01:56:37PM +0200, Henning Schild wrote:
> change since v1:
> - split into two patches to separate leds from platform code and ease
> merging
>
> These are rather simple patches adding LED support for yet another Simatic
> IPC model.
FWIW,
Reviewed-by: Andy Shevchenko <[email protected]>
> Henning Schild (2):
> platform/x86: simatic-ipc: add another model BX-21A
> leds: simatic-ipc-leds-gpio: add Elkhart Lake version
>
> drivers/leds/simple/Kconfig | 13 +++++
> drivers/leds/simple/Makefile | 1 +
> .../leds/simple/simatic-ipc-leds-gpio-core.c | 4 ++
> .../simatic-ipc-leds-gpio-elkhartlake.c | 57 +++++++++++++++++++
> drivers/platform/x86/simatic-ipc.c | 3 +
> .../platform_data/x86/simatic-ipc-base.h | 3 +-
> include/linux/platform_data/x86/simatic-ipc.h | 3 +-
> 7 files changed, 82 insertions(+), 2 deletions(-)
> create mode 100644 drivers/leds/simple/simatic-ipc-leds-gpio-elkhartlake.c
>
> --
> 2.41.0
>
--
With Best Regards,
Andy Shevchenko
Hi,
On 7/13/23 13:56, Henning Schild wrote:
> This adds support for the Siemens Simatic IPC model BX-21A. Actual
> drivers for that model will be sent in separate patches.
>
> Signed-off-by: Henning Schild <[email protected]>
Thank you. I've merged this into a new platform-drivers-x86-simatic-ipc
branch where I'm collecting all the pending platform/x86: simatic-ipc
work.
I'll tag + send a pull-request for Lee later today so that Lee
can merge the (immutable) tag and then apply 2/2 of this series
on top.
Regards,
Hans
> ---
> drivers/platform/x86/simatic-ipc.c | 3 +++
> include/linux/platform_data/x86/simatic-ipc-base.h | 3 ++-
> include/linux/platform_data/x86/simatic-ipc.h | 3 ++-
> 3 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/simatic-ipc.c b/drivers/platform/x86/simatic-ipc.c
> index c773995b230d..4402cd354104 100644
> --- a/drivers/platform/x86/simatic-ipc.c
> +++ b/drivers/platform/x86/simatic-ipc.c
> @@ -48,6 +48,7 @@ static struct {
> {SIMATIC_IPC_IPC477E, SIMATIC_IPC_DEVICE_NONE, SIMATIC_IPC_DEVICE_427E},
> {SIMATIC_IPC_IPCBX_39A, SIMATIC_IPC_DEVICE_227G, SIMATIC_IPC_DEVICE_227G},
> {SIMATIC_IPC_IPCPX_39A, SIMATIC_IPC_DEVICE_NONE, SIMATIC_IPC_DEVICE_227G},
> + {SIMATIC_IPC_IPCBX_21A, SIMATIC_IPC_DEVICE_BX_21A, SIMATIC_IPC_DEVICE_NONE},
> };
>
> static int register_platform_devices(u32 station_id)
> @@ -72,6 +73,8 @@ static int register_platform_devices(u32 station_id)
> pdevname = KBUILD_MODNAME "_leds_gpio_apollolake";
> if (ledmode == SIMATIC_IPC_DEVICE_227G)
> pdevname = KBUILD_MODNAME "_leds_gpio_f7188x";
> + if (ledmode == SIMATIC_IPC_DEVICE_BX_21A)
> + pdevname = KBUILD_MODNAME "_leds_gpio_elkhartlake";
> platform_data.devmode = ledmode;
> ipc_led_platform_device =
> platform_device_register_data(NULL,
> diff --git a/include/linux/platform_data/x86/simatic-ipc-base.h b/include/linux/platform_data/x86/simatic-ipc-base.h
> index 57d6a10dfc9e..68c455f5edad 100644
> --- a/include/linux/platform_data/x86/simatic-ipc-base.h
> +++ b/include/linux/platform_data/x86/simatic-ipc-base.h
> @@ -2,7 +2,7 @@
> /*
> * Siemens SIMATIC IPC drivers
> *
> - * Copyright (c) Siemens AG, 2018-2021
> + * Copyright (c) Siemens AG, 2018-2023
> *
> * Authors:
> * Henning Schild <[email protected]>
> @@ -20,6 +20,7 @@
> #define SIMATIC_IPC_DEVICE_127E 3
> #define SIMATIC_IPC_DEVICE_227E 4
> #define SIMATIC_IPC_DEVICE_227G 5
> +#define SIMATIC_IPC_DEVICE_BX_21A 6
>
> struct simatic_ipc_platform {
> u8 devmode;
> diff --git a/include/linux/platform_data/x86/simatic-ipc.h b/include/linux/platform_data/x86/simatic-ipc.h
> index a48bb5240977..1a8e4c1099e3 100644
> --- a/include/linux/platform_data/x86/simatic-ipc.h
> +++ b/include/linux/platform_data/x86/simatic-ipc.h
> @@ -2,7 +2,7 @@
> /*
> * Siemens SIMATIC IPC drivers
> *
> - * Copyright (c) Siemens AG, 2018-2021
> + * Copyright (c) Siemens AG, 2018-2023
> *
> * Authors:
> * Henning Schild <[email protected]>
> @@ -34,6 +34,7 @@ enum simatic_ipc_station_ids {
> SIMATIC_IPC_IPC227G = 0x00000F01,
> SIMATIC_IPC_IPCBX_39A = 0x00001001,
> SIMATIC_IPC_IPCPX_39A = 0x00001002,
> + SIMATIC_IPC_IPCBX_21A = 0x00001101,
> };
>
> static inline u32 simatic_ipc_get_station_id(u8 *data, int max_len)