Re: [PATCH 3/4] leds: simatic-ipc-leds-gpio: add new model 227G

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 28, 2022 at 5:57 PM Henning Schild
<henning.schild@xxxxxxxxxxx> 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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux