Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1135632pxb; Thu, 4 Mar 2021 04:22:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+F9/KAcWzM+Hl7nnx4p5CHnUrNkg+Vb8oqeoefXlUqxDpDoDmORRSC9/2Wubtnp0MLcgV X-Received: by 2002:a17:906:6b1b:: with SMTP id q27mr3774491ejr.508.1614860569934; Thu, 04 Mar 2021 04:22:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614860569; cv=none; d=google.com; s=arc-20160816; b=W7rcJWMFhC1Di9Ma+FSiYL6Zdc5ciq8wwJeIEA4NLUHzRnQQdwm7y2CvG6fRUTbZ72 2jY2DRvdlZii59UAN9WcTEE11WCa8ydCaoOKZObL6eUiKptHiB/glnY+fRUMoyzUe9pH TjtXizPMfY1cBvZQi7UN8KlHIvx6c9yotNHtg+5H36AJ6hV6wm0m5HXAz/UmQnyCYqLe 3Tj6BhhoFVGcXDmMJCnbLuLQI+gqtLvTuUi+rsGKm4JMk+DeV+HWvnYT9n6ZAt60DdjF 4BzhSa6ocULakhKL1wBC6LqtylD6C5hHL0rvGspindjUlyshunzOBCKuFOLI0qMYE/RN B7Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=vZFTaHdi2OzVT8XWpo5B2bSwZ8YBqpHbM6UNKKUj07g=; b=RghHUfHl9BdEmPQlLzVc/IlgjCLXG4y/TjEZSJ8lEpt0mfoOhTDd2l8s/BA7P8/9nL bqhq/heW/kZs6kg/foqolXgPAcm35QkpHQZav8EIJ/tffUHTe83hfSw1x5VWpQKEtS6h XAac1ScAUAchOvj8fsplvd9Qm8mJBXlNNRUQYjtQTK7IMjFijux1u1asQ+4j3pMCRL1L VzGkL1GdszYcubXVsMe9lcy6R/vWAahoFXY73HG/ruj3ggz/4YS3pbHCB6c5d9RM2dlx jlg67H8ZgEGpYI1EIHw1gyexFe7MFHHTTJBssdgCpaBmRXInmDzvSqWJ1ectgIKduDPi C+lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si14804027edi.135.2021.03.04.04.22.27; Thu, 04 Mar 2021 04:22:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1580924AbhCCSrI (ORCPT + 99 others); Wed, 3 Mar 2021 13:47:08 -0500 Received: from gecko.sbs.de ([194.138.37.40]:52534 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236550AbhCCRmg (ORCPT ); Wed, 3 Mar 2021 12:42:36 -0500 Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 123HbPra023052 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 3 Mar 2021 18:37:25 +0100 Received: from md1za8fc.ad001.siemens.net ([139.22.36.86]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 123HbOhh022715; Wed, 3 Mar 2021 18:37:24 +0100 Date: Wed, 3 Mar 2021 18:37:23 +0100 From: Henning Schild To: Pavel Machek Cc: , , , , Srikanth Krishnakar , Jan Kiszka , Gerd Haeussler , Guenter Roeck , Wim Van Sebroeck , Mark Gross , Hans de Goede Subject: Re: [PATCH 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs Message-ID: <20210303183714.62c0f06f@md1za8fc.ad001.siemens.net> In-Reply-To: <20210302205452.GA32573@duo.ucw.cz> References: <20210302163309.25528-1-henning.schild@siemens.com> <20210302163309.25528-3-henning.schild@siemens.com> <20210302205452.GA32573@duo.ucw.cz> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Tue, 2 Mar 2021 21:54:52 +0100 schrieb Pavel Machek : > Hi! > > > This driver adds initial support for several devices from Siemens. > > It is based on a platform driver introduced in an earlier commit. > > Ok. > > > diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile > > index 2a698df9da57..c15e1e3c5958 100644 > > --- a/drivers/leds/Makefile > > +++ b/drivers/leds/Makefile > > @@ -93,6 +93,7 @@ obj-$(CONFIG_LEDS_TURRIS_OMNIA) += > > leds-turris-omnia.o obj-$(CONFIG_LEDS_WM831X_STATUS) += > > leds-wm831x-status.o obj-$(CONFIG_LEDS_WM8350) += > > leds-wm8350.o obj-$(CONFIG_LEDS_WRAP) += > > leds-wrap.o +obj-$(CONFIG_LEDS_SIEMENS_SIMATIC_IPC) += > > simatic-ipc-leds.o > > Let's put this into drivers/leds/simple. You'll have to create it. Can you please go into detail why? We plan to add more devices in the future, which might in fact make this a little less simple. But we can discuss that when the time is right and start with simple. regards, Henning > > + * > > + * This program is free software; you can redistribute it and/or > > modify > > + * it under the terms of the GNU General Public License version 2 > > as > > + * published by the Free Software Foundation. > > + */ > > Remove? > > > +static struct simatic_ipc_led simatic_ipc_leds_io[] = { > > + {1 << 15, "simatic-ipc:green:run-stop"}, > > + {1 << 7, "simatic-ipc:yellow:run-stop"}, > > + {1 << 14, "simatic-ipc:red:error"}, > > + {1 << 6, "simatic-ipc:yellow:error"}, > > + {1 << 13, "simatic-ipc:red:maint"}, > > + {1 << 5, "simatic-ipc:yellow:maint"}, > > + {0, ""}, > > +}; > > Please use names consistent with other systems, this is user > visible. If you have two-color power led, it should be > :green:power... See include/dt-bindings/leds/common.h . > > Please avoid // comments in the code. > > > +module_init(simatic_ipc_led_init_module); > > +module_exit(simatic_ipc_led_exit_module); > > No need for such verbosity for functions that are static. > > > +MODULE_LICENSE("GPL"); > > GPL v2? > > Best regards, > Pavel >