Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1079951pxb; Thu, 4 Mar 2021 02:43:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8swV2prpJ7AwjeMoSeN6NcxVyjDmP9mDg3kp9xiNU+arPxUBUcRsDm6XxFRYXXK58NkiR X-Received: by 2002:a17:906:1a44:: with SMTP id j4mr3543786ejf.401.1614854624456; Thu, 04 Mar 2021 02:43:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614854624; cv=none; d=google.com; s=arc-20160816; b=QWZfAFdcsgRNNIPH0nGNxsp9YBflJC8LyVB04kLxOqe7LNqkopsnD9/DiZ+X0ZGYGl TFzUXQ64STlZdHU6jR//RfQWaVgZyeu0Wze/4F2dcZgmVV8kmR6UhL1TqZtIkd48vU66 RQiKF5sxvdd2wBbRqSh6VLANsI7a5XQ0akJw/wG1k6zJL6sJshvT+7mlywKq1cJJNJ4S /tPEipoGZbuQH+aJSlXamn+B+Vvs+nn63BG3qx5QPOpiT0cI5gCz2Zlz7FhL1wsvcprR Sy9SKhhftz4gzHtPhqI91uE1TH5VIJKTkLOsLFMVuQLINIWM18PehxH7HKppPgQNpiXK o3gQ== 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=244lc1UwizSth8rj5nWBF1E7FR7qBi7Ghgiwf54Vygc=; b=VrZbqCdr92io1nTzLBMUFjG5Xf1HMkVi2VWNT+bESREroNSFuP0gsWVGAmcbE4BER7 nZUT2P+bsEk+/idZaXXbVhxsPTQ8tbpINVATeffXhYIrO9+DJtwkpweu5cYd0m/AUJyG WWwN7T0G4nVBIStssdVD2uwpkjQ74l3wUICsvQT1dGZbMQnJumrH89cW49Atu31Yhqy2 ++3O5AI3tqjgACncq69ouXC8HG017gbIt0zr791q5Zm5Xq7ZiNuoEHW8NE1oj8OTK9w/ RUn9ITJzdQsPHRAbgsBST2fODLdKJWVY+rCy4h7FrPAAqD4rtpvlUOEHGobHmqIwl2Mr Qp/A== 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 q9si15866547edv.547.2021.03.04.02.43.21; Thu, 04 Mar 2021 02:43:44 -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 S1385547AbhCCRU3 (ORCPT + 99 others); Wed, 3 Mar 2021 12:20:29 -0500 Received: from lizzard.sbs.de ([194.138.37.39]:43242 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240964AbhCCNnU (ORCPT ); Wed, 3 Mar 2021 08:43:20 -0500 Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 123DBEi5032384 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 3 Mar 2021 14:11:14 +0100 Received: from md1za8fc.ad001.siemens.net ([167.87.44.113]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 123DBDdd020542; Wed, 3 Mar 2021 14:11:13 +0100 Date: Wed, 3 Mar 2021 14:11:12 +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: <20210303141052.30641e6b@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 Hi Pavel, thanks for looking into this. 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. Ok will do > > + * > > + * 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? Sure, was found in wdt as well. Thx > > +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 . Well we wanted to pick names that are printed on the devices and would like to stick to those. Has been a discussion ... Can we have symlinks to have multiple names per LED? How strong would you feel about us using our names? > Please avoid // comments in the code. Ok > > +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? Will do. Stay tuned for v2. regards, Henning > Best regards, > Pavel >