Received: by 2002:ac0:b7d5:0:0:0:0:0 with SMTP id v21csp12804ime; Thu, 28 Jul 2022 15:11:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR7HEHaEg2mKAfa4p1E0HxXyM4GTIgnfdUugeOAbi3r8OzFghcDrPm5Tdh84UQq41Al+GtMr X-Received: by 2002:a17:90b:4c03:b0:1f2:b977:c64e with SMTP id na3-20020a17090b4c0300b001f2b977c64emr775466pjb.211.1659046303465; Thu, 28 Jul 2022 15:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659046303; cv=none; d=google.com; s=arc-20160816; b=alDma+js414h2i0euNS4LZZ9r29Ib9sbj6hAxi+tP5ZCsuKUPXwnB1htm7CECWr31F Z+9ZOdl4oHOqBlJ5CycrYyzzgkkWJdwOVCcI19r7bFOIaqYnTvQ80L7kDyU1Q1Yc31VA AtpK0M0UkInCfZp0hJeAD37WY+nRixD1bTIiXunrCpCQ8paOH+ORfstJRKx5xUtI6IjY 5+j+ZDw8k1oeAREKlq3G1Vu33y/qg+GQfLwIm6HCm2x9nEEJEGhfNg/sNgMboL/D9aw3 yFbyzVRVQxjfg3Xxq8H0IzdgKDjywOqguwCCAq6F0teXa8EWDEvps4mgWx2OXwToma3w KdRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GVWM8KDlgWl9FAw3nke74hvfEJOpdeYFEgFkcinpKNc=; b=ag0QjcCOOuM5FL5VKxo2YVUL7mvs5Ses/dhUnGUoa/vSmZKxhllkgONHu8HS1RG8ju hDc+NSfnJjwRpOHiUcKvhMrKzKq/ZCgUdQSjuZ99HZubTbowouQRT0zCqRFuIeYg8fEr KakYng3mclQXMC0I4q2dCUnUDkubIpzPSJheoDlJY9ZzMJ/wG4Dg1E6qcWRANNP4/wpo WBmH9UOWmtSbxC2h99O31GnDxxeuqzSgdr2cV1PAvJJ95Bh2yjz2EqcyEzf2xv1u4b1J ME/bl0tD5vPuawGK4DhocwgnAjyEw7G4q8fp2cIroC8ERbgqTKdh3pnGZMeGjBuZ0AAA 59Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bysSJ6a9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l11-20020a170903244b00b0016d25e75731si2510967pls.111.2022.07.28.15.11.28; Thu, 28 Jul 2022 15:11:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bysSJ6a9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229693AbiG1VmM (ORCPT + 99 others); Thu, 28 Jul 2022 17:42:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbiG1VmL (ORCPT ); Thu, 28 Jul 2022 17:42:11 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31CD76069C; Thu, 28 Jul 2022 14:42:10 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id bp15so5305991ejb.6; Thu, 28 Jul 2022 14:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=GVWM8KDlgWl9FAw3nke74hvfEJOpdeYFEgFkcinpKNc=; b=bysSJ6a9V5jE+Kbbhxd7/Duh4WyyGfYgBIt6fKo257mRk4kAlS1FSVxiFpzZ1O6foj FCGQEdgTbFRrdYyuLhnuFRopOi7Q4Aoilm2gT6eyw4p4Us9w65LyRiNYNX7K+7mxshvn r04cREj6q2StXzQ0cbaEF7ywJz3+C3ewjb3UiurB1aVOBzvShi7wX6cn6Dplg0BG2STm WVVgvYsPwVFClI+loFKDHFUXy2Q1N+lzWMycla6BtWL/LULywnqBVMCcDXpMOr57derV LPqCTATZiO0B9E4WrMjs3AqxSUmTt8OG3utczKDe/XuLloXktAbqMWNsau8P/Vhyux9b 8zJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=GVWM8KDlgWl9FAw3nke74hvfEJOpdeYFEgFkcinpKNc=; b=sExhidFHGZZb6v4H6LQ5vD7muw6cjp1U8rkaZs7MsZcMDUMnbGHatzbRHK6rTbg+vh VHBP4PvW/5yD71AUIpio/0b9E8sDlQhetDgW8dP9f1b/e2p/jWA2nCgSKoaaObw156SO 48a5Rc9vBYPqMs5ghxHpZ4Khn8+AAaniIx6nD1hwHe3KUIehPk0N3gJqBmxaoW1OwV2/ 9CBzL3FUO7I7hydM+R9+6lE5tNFCuwBBZ1dSN8jkdC2GWzfBa/T5zBqUDgScwtlajlhd jCGqjwZFQq3g7DXuAGSKFqmh7MTlOedG8R+1+JxlQw8wlf36DGDGp0RkMtshSmzt/No9 0JUg== X-Gm-Message-State: AJIora8y3ErWpGR7vM9Wuq8LttPmnpyKzpqmvT3mI9NSqfVUJVzhBamc ZykPn1JTEqOGScbf4ZcgttOtVC9CFNFRskavjak= X-Received: by 2002:a17:907:9706:b0:72b:4b0d:86a2 with SMTP id jg6-20020a170907970600b0072b4b0d86a2mr625974ejc.242.1659044528358; Thu, 28 Jul 2022 14:42:08 -0700 (PDT) MIME-Version: 1.0 References: <20220728155652.29516-1-henning.schild@siemens.com> <20220728155652.29516-4-henning.schild@siemens.com> In-Reply-To: <20220728155652.29516-4-henning.schild@siemens.com> From: Andy Shevchenko Date: Thu, 28 Jul 2022 23:41:31 +0200 Message-ID: Subject: Re: [PATCH 3/4] leds: simatic-ipc-leds-gpio: add new model 227G To: Henning Schild Cc: Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Bartosz Golaszewski , Linus Walleij , Tasanakorn Phaipool , Sheng-Yuan Huang , Kuan-Wei Ho Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 28, 2022 at 5:57 PM Henning Schild 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