From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86D62C4338F for ; Thu, 29 Jul 2021 05:53:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 676C461054 for ; Thu, 29 Jul 2021 05:53:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233900AbhG2Fx0 (ORCPT ); Thu, 29 Jul 2021 01:53:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:59034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233739AbhG2FxZ (ORCPT ); Thu, 29 Jul 2021 01:53:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C210F60C51; Thu, 29 Jul 2021 05:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627538002; bh=ndPuKMgqpIbhmriDtRgAwJR0/HGvhnXHJhwddEWsuSI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jBBKp0xb5ULry4DVjTYZWx9gHV0P3v7/rQpUe+oyFU9StOQ6efu0uZnFFssdytP8C S9LT+ayF86lLNN1dNCgxkiplAQj8rAQU2JFcI4XHNMiS93FokimrSlv4y21ac5ZIyg /z8XWXycUbOKrN5vtpfhdLD4lVwS2DyZdqw+t6AE= Date: Thu, 29 Jul 2021 07:53:17 +0200 From: Greg KH To: Ian Pilcher Cc: linux-block@vger.kernel.org, linux-leds@vger.kernel.org, axboe@kernel.dk, linux-kernel@vger.kernel.org, pavel@ucw.cz, kernelnewbies@kernelnewbies.org Subject: Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation Message-ID: References: <20210729015344.3366750-1-arequipeno@gmail.com> <20210729015344.3366750-2-arequipeno@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210729015344.3366750-2-arequipeno@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org On Wed, Jul 28, 2021 at 08:53:37PM -0500, Ian Pilcher wrote: > * Document the sysfs attributes (/sys/class/block/led_trigger_* > and /sys/class/block/${DEV}/led_trigger) that can be used to > create, list, and delete block device LED triggers and to > set and clear device/trigger associations. sysfs apis belong in Documentation/ABI/ like all other entries. > > * Pull API documentation from block/blk-ledtrig.c (once it > exists). > > Signed-off-by: Ian Pilcher > --- > Documentation/block/index.rst | 1 + > Documentation/block/led-triggers.rst | 124 +++++++++++++++++++++++++++ > 2 files changed, 125 insertions(+) > create mode 100644 Documentation/block/led-triggers.rst > > diff --git a/Documentation/block/index.rst b/Documentation/block/index.rst > index 86dcf7159f99..a125ecdb4c7b 100644 > --- a/Documentation/block/index.rst > +++ b/Documentation/block/index.rst > @@ -25,3 +25,4 @@ Block > stat > switching-sched > writeback_cache_control > + led-triggers > diff --git a/Documentation/block/led-triggers.rst b/Documentation/block/led-triggers.rst > new file mode 100644 > index 000000000000..a67e06c68073 > --- /dev/null > +++ b/Documentation/block/led-triggers.rst > @@ -0,0 +1,124 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +============ > +LED Triggers > +============ > + > +Available when ``CONFIG_BLK_LED_TRIGGERS=y``. > + > +sysfs interface > +=============== > + > +Create a new block device LED trigger:: > + > + # echo foo > /sys/class/block/led_trigger_new > + > +The name must be unique among all LED triggers (not just block device LED > +triggers). > + > +Create two more:: > + > + # echo bar baz > /sys/class/block/led_trigger_new > + > +List the triggers:: > + > + # cat /sys/class/block/led_trigger_list > + baz: 0 > + bar: 0 > + foo: 0 As was pointed out, this is not ok for a sysfs file, sorry. thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A7E1C4338F for ; Thu, 29 Jul 2021 06:12:33 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A67361042 for ; Thu, 29 Jul 2021 06:12:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2A67361042 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1m8yz1-0002IO-0u; Thu, 29 Jul 2021 01:53:27 -0400 Received: from mail.kernel.org ([198.145.29.99]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m8yyz-0002HE-4P for kernelnewbies@kernelnewbies.org; Thu, 29 Jul 2021 01:53:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C210F60C51; Thu, 29 Jul 2021 05:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627538002; bh=ndPuKMgqpIbhmriDtRgAwJR0/HGvhnXHJhwddEWsuSI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jBBKp0xb5ULry4DVjTYZWx9gHV0P3v7/rQpUe+oyFU9StOQ6efu0uZnFFssdytP8C S9LT+ayF86lLNN1dNCgxkiplAQj8rAQU2JFcI4XHNMiS93FokimrSlv4y21ac5ZIyg /z8XWXycUbOKrN5vtpfhdLD4lVwS2DyZdqw+t6AE= Date: Thu, 29 Jul 2021 07:53:17 +0200 From: Greg KH To: Ian Pilcher Subject: Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation Message-ID: References: <20210729015344.3366750-1-arequipeno@gmail.com> <20210729015344.3366750-2-arequipeno@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210729015344.3366750-2-arequipeno@gmail.com> Cc: axboe@kernel.dk, kernelnewbies@kernelnewbies.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, pavel@ucw.cz, linux-leds@vger.kernel.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Wed, Jul 28, 2021 at 08:53:37PM -0500, Ian Pilcher wrote: > * Document the sysfs attributes (/sys/class/block/led_trigger_* > and /sys/class/block/${DEV}/led_trigger) that can be used to > create, list, and delete block device LED triggers and to > set and clear device/trigger associations. sysfs apis belong in Documentation/ABI/ like all other entries. > > * Pull API documentation from block/blk-ledtrig.c (once it > exists). > > Signed-off-by: Ian Pilcher > --- > Documentation/block/index.rst | 1 + > Documentation/block/led-triggers.rst | 124 +++++++++++++++++++++++++++ > 2 files changed, 125 insertions(+) > create mode 100644 Documentation/block/led-triggers.rst > > diff --git a/Documentation/block/index.rst b/Documentation/block/index.rst > index 86dcf7159f99..a125ecdb4c7b 100644 > --- a/Documentation/block/index.rst > +++ b/Documentation/block/index.rst > @@ -25,3 +25,4 @@ Block > stat > switching-sched > writeback_cache_control > + led-triggers > diff --git a/Documentation/block/led-triggers.rst b/Documentation/block/led-triggers.rst > new file mode 100644 > index 000000000000..a67e06c68073 > --- /dev/null > +++ b/Documentation/block/led-triggers.rst > @@ -0,0 +1,124 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +============ > +LED Triggers > +============ > + > +Available when ``CONFIG_BLK_LED_TRIGGERS=y``. > + > +sysfs interface > +=============== > + > +Create a new block device LED trigger:: > + > + # echo foo > /sys/class/block/led_trigger_new > + > +The name must be unique among all LED triggers (not just block device LED > +triggers). > + > +Create two more:: > + > + # echo bar baz > /sys/class/block/led_trigger_new > + > +List the triggers:: > + > + # cat /sys/class/block/led_trigger_list > + baz: 0 > + bar: 0 > + foo: 0 As was pointed out, this is not ok for a sysfs file, sorry. thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies