lkml.org 
[lkml]   [2022]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/4] leds: simatic-ipc-leds-gpio: add new model 227G
On Thu, Jul 28, 2022 at 5:57 PM Henning Schild
<henning.schild@siemens.com> wrote:
>
> This adds support of the Siemens Simatic IPC227G. Its LEDs are connected
> to GPIO pins provided by the gpio-f7188x module. We make sure that
> gets loaded, if not enabled in the kernel config no LED support will be
> available.

...

> + switch (plat->devmode) {
> + case SIMATIC_IPC_DEVICE_127E:
> + simatic_ipc_led_gpio_table = &simatic_ipc_led_gpio_table_127e;
> + break;
> + case SIMATIC_IPC_DEVICE_227G:

> + if (!IS_ENABLED(CONFIG_GPIO_F7188X))
> + return -ENODEV;

Hmm... What is the difference with the 127E model in the sense of the
driver absence? Why do we need this check?

> + request_module("gpio-f7188x");

I'm not sure why you need request_module().

> + simatic_ipc_led_gpio_table = &simatic_ipc_led_gpio_table_227g;
> + break;
> + default:
> + return -ENODEV;
> + }

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-07-28 23:43    [W:1.149 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site