Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp210411pxb; Tue, 7 Sep 2021 22:31:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/iAKrSH+LhwyGdjV9U9e2Px4Dp+tKjuMW3N4XNYBtmKttJE1+ssVKOEw9gFbGedJaYrg0 X-Received: by 2002:a05:6638:3782:: with SMTP id w2mr2052487jal.56.1631079081883; Tue, 07 Sep 2021 22:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631079081; cv=none; d=google.com; s=arc-20160816; b=DVJK0ATpWMNAwm7R5LLJyev9ksiwwjIHpjT1RD2fR07w7x390xS1Wd3BDTTZpujNzA m0Mge565AMWFj+lVehU7eYTSwS7OAaQ8mnt2LZJX8jzGVxl6Et1snwha5u55OBlmbcC4 GM1JrCSAi/IBQrxKiM7GP3aeYBrWLwAKJ5sz4aex2FvfKe2a2g2sd1JKhblAaBeZLloZ AYXZ5RVnIQLdYTk7HreQNFxtFsLUXgm+MEeVfag1/4Ot7dKmWJ5AQqa028Y1vctu7y8d rNP7GivF6XyKvIjlccB8b6p8BanbGaUsDRT3tQdCqEf9N1RG4yc5PluwbV7lV++cw8VS 9/lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=rS+LmaBXphNC+umbdRmnwuKKat7FQ5h0n93PLS2Pfaw=; b=wguOKb0p/wjcumlH+UoxrrkYxxphYABSOAk5tdDZoSjV4uwWcIBe4p8GfjLIUBCZR3 nwkRfIpi2qi2pLAOKJauQa5CCEd+ihjRZ/6c8SHXcUc9UbFXQSU8hR6/WpfINFqwEocE jpCVImuTOMUsl8njzGfi1LtCzwF70ZdRbaq7FTI1iEo7kJSrF2RUW+22H6Ms9GUpVPMd AwXNm5t7JFrmP3kkFbwP7Q73fVmpksAsRSlaentC8YU5aVbrhML+aGzMGqytVZl0PFMT KhlTPo5h1nfwH5HPAgqpaC/j0Ib2zAnd1zfbZmDK22geQEUHmfZS0ZXj0RBNaV/X6Whn bGwg== 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 4si909855jaj.45.2021.09.07.22.31.09; Tue, 07 Sep 2021 22:31:21 -0700 (PDT) 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 S1344569AbhIHFbQ (ORCPT + 99 others); Wed, 8 Sep 2021 01:31:16 -0400 Received: from gecko.sbs.de ([194.138.37.40]:38347 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbhIHFbO (ORCPT ); Wed, 8 Sep 2021 01:31:14 -0400 Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 1885TrUL014177 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Sep 2021 07:29:54 +0200 Received: from [167.87.38.78] ([167.87.38.78]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 1885TqKL012102; Wed, 8 Sep 2021 07:29:52 +0200 Subject: Re: [PATCH 1/3] leds:triggers:Extend the kernel panic LED trigger To: chaochao2021666 , =?UTF-8?Q?Marek_Beh=c3=ban?= Cc: pavel@ucw.cz, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, 464759471@qq.com, chao zeng References: <20210906135320.23134-1-chaochao2021666@163.com> <20210907142018.45b2d114@dellmb> <12734c2f.116c.17bc3147806.Coremail.chaochao2021666@163.com> From: Jan Kiszka Message-ID: <69207a27-e66f-425b-861f-c2fb1c8ab65d@siemens.com> Date: Wed, 8 Sep 2021 07:29:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <12734c2f.116c.17bc3147806.Coremail.chaochao2021666@163.com> Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08.09.21 03:45, chaochao2021666 wrote: > Dear Marek > > > For other types of led could be set at the userspace level. But for the > panic, > maybe it would trigger at kernel space during the kernel boot up. > > And currently only blink to indicate the error. we need more kinds of > type to indicate the error. > > we have two leds in the panic trigger group, all in the panic only one > behavior-- blink. > we need different panic led behavior, so extend the led behavior. I > think add more types of  > LED behavior could be helpful. > To make it even clearer, there are three issues to solve for us: One is that we have two LEDs mixing a color, red and green, and the obviously desired panic color it red, not orange. The other is that the desired state in an error case is non-blinking, just on (in line with what our U-Boot will do in case the boot fails). And as we need that behavior prior to userspace, it should be configurable via DT. But that does not exclude extending the sysfs interface as well with the new options. Jan > BRs > Chao > > > At 2021-09-07 20:20:18, "Marek BehĂșn" wrote: >>On Mon, 6 Sep 2021 21:53:18 +0800 >>chaochao2021666@163.com wrote: >> >>> From: chao zeng >>> >>> This commit extend panic trigger, add two new panic trigger >>> "panic_on" and "panic_off" and keep the "panic" compatible with >>> "panic_blink". >>> >>> All the led on the "panic_on" would light and on >>> the "panic_off" would turn off >> >>We don't wont gazillion triggers, each for every possible setting. >> >>Instead extend the existing panic trigger to have another sysfs setting >>where you can set this behavior. >> echo panic >trigger >> echo blink >on_panic >>So the on_panic file can accept "on", "off" or "blink". >> >>Alternatively a pattern could be set as in the ledtrig-pattern trigger. >> >>Also your patches do not use correct spacing in commit titles: >> leds:triggers:Extend the kernel panic LED trigger >>should instead be >> leds: triggers: Extend the kernel panic LED trigger >> >>Marek > -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux