Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2329676rdg; Mon, 16 Oct 2023 00:14:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNN7DqduHNGGNy+Vf+v4JyMZUBTJWxmsTXlqWziHRhygaS80zZJuzsQYkngQm2zPHMYHJL X-Received: by 2002:a05:6a20:d41f:b0:16b:f3b1:c045 with SMTP id il31-20020a056a20d41f00b0016bf3b1c045mr19186214pzb.23.1697440463868; Mon, 16 Oct 2023 00:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697440463; cv=none; d=google.com; s=arc-20160816; b=BJn3rka/V3VaxRoX9jU+uKM9WxFHojyJDXvbk+Y/goy2Z/shiXs0T7HTuPC5e15T/O cVRqYGCXMlEttJJZ6le13lus+E5vFvkFusL5uF834iU4cp9SBVqUX9r6cuuOEhBJ9gpk FHxxamem7TGLaLatEQeMidR8XQiPOkdIhkgmVZ5YwBQd0pNrK36VnE22xfFf07usls3k Hy2XcaZLzO7/LR41B5KGqT5f2ypdXLvUk0M3nlefKc3j7asqD96+a3aRxs5QM1Y9VmvI USRv9RwXed9JQ0R3cfrrhGVqNXbCDme/rgmcS6gKNqPFVUiqsupnVv7YRHwzYQsc/MYD vh3A== 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 :message-id:date:subject:cc:to:from; bh=ZgF8NiYnYKYyJdQ/tIiRaUeWFspbrfV1oZhrrqjjQLQ=; fh=DWsu+nphnXaftKgW3nlltk1unhQS9IMzmZZBp0Uyh98=; b=oJ35VZR/kHAEEqHOUYSumNS5E8Sk0064DvSL+6Q3FCksWopt31r8lVGPqkWWsDUZQU cdG6ksLUM7XJL4KjZAJTg7GM1QMfU21/6djGzDg2kd52gJ/V1X5LLUEVOqM8e5nPBYjl 00scw7IOlvYzGURkfBMaje7EdnOlRVa3tELY73nR7p7pK61ueACKss7OBHVMP3Z8/ulk lvCkAp1l4g4QtaiQqM+wW7msjNCMNQtGiaRGmAWCjCsNBnBnwYMhaWMuqPivVh8NJ6Xt hez5kmULta3goBJHuxs3aiEpVOPRnXEYxLGO04lMI1XD6DjqXdvyW3u/PnZ/uozil1QP c3dA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id bs67-20020a632846000000b005b7dd1e334csi354637pgb.601.2023.10.16.00.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 00:14:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id C579880C2814; Mon, 16 Oct 2023 00:14:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232240AbjJPHOH convert rfc822-to-8bit (ORCPT + 99 others); Mon, 16 Oct 2023 03:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231853AbjJPHNz (ORCPT ); Mon, 16 Oct 2023 03:13:55 -0400 Received: from mxout70.expurgate.net (mxout70.expurgate.net [91.198.224.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D66BFF; Mon, 16 Oct 2023 00:13:52 -0700 (PDT) Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1qsHnH-002Nhz-Aj; Mon, 16 Oct 2023 09:13:39 +0200 Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qsHnG-00ADhL-9f; Mon, 16 Oct 2023 09:13:38 +0200 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id DB2B424004D; Mon, 16 Oct 2023 09:13:37 +0200 (CEST) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id 38533240049; Mon, 16 Oct 2023 09:13:37 +0200 (CEST) Received: from localhost.localdomain (unknown [10.2.3.40]) by mail.dev.tdt.de (Postfix) with ESMTPSA id D30732BD62; Mon, 16 Oct 2023 09:13:36 +0200 (CEST) From: Florian Eckert To: Eckert.Florian@googlemail.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, pavel@ucw.cz, lee@kernel.org, kabel@kernel.org, u.kleine-koenig@pengutronix.de Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-leds@vger.kernel.org Subject: [PATCH v3 0/4] ledtrig-tty: add additional tty state evaluation Date: Mon, 16 Oct 2023 09:13:28 +0200 Message-ID: <20231016071332.597654-1-fe@dev.tdt.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Content-Transfer-Encoding: 8BIT X-purgate-type: clean X-purgate-ID: 151534::1697440419-4E731C7C-B86B7ACA/0/0 X-purgate: clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 00:14:20 -0700 (PDT) Changes in v3: - Add missing 'kernel test robot' information to the commit message. - Additional information added to the commit message Changes in v2: - rename new function from tty_get_mget() to tty_get_tiocm() as requested by 'Jiri Slaby'. - As suggested by 'Jiri Slaby', fixed tabs in function documentation throughout the file '/drivers/tty/tty_io.c' in a separate commit. - Move the variable definition to the top in function 'ledtrig_tty_work()'. This was reported by the 'kernel test robot' after my change in v1. - Also set the 'max_brightness' to 'blink_brightness' if no 'blink_brightness' was set. This fixes a problem at startup when the brightness is still set to 0 and only 'line_*' is evaluated. I looked in the netdev trigger and that's exactly how it's done there. v1: This is a follow-up patchset, based on the mailing list discussion from March 2023 based on the old patchset v7 [1]. I have changed, the LED trigger handling via the sysfs interfaces as suggested by Uwe Kleine-König. Florian Eckert (4): tty: whitespaces in descriptions corrected by replacing tabs with spaces. tty: add new helper function tty_get_tiocm trigger: ledtrig-tty: move variable definition to the top trigger: ledtrig-tty: add new line mode to triggers .../ABI/testing/sysfs-class-led-trigger-tty | 53 ++++ drivers/leds/trigger/ledtrig-tty.c | 280 +++++++++++++++++- drivers/tty/tty_io.c | 130 ++++---- include/linux/tty.h | 1 + 4 files changed, 396 insertions(+), 68 deletions(-) -- 2.30.2