Received: by 10.192.165.148 with SMTP id m20csp4109459imm; Tue, 8 May 2018 03:08:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqCRK+ZYU+rsKE/C710iYFCOv3JFSDqIcy5cLRFztFXrMRwgYHhCQcrSJwR6SDpBdL+5hvT X-Received: by 2002:a65:5c4d:: with SMTP id v13-v6mr32070784pgr.428.1525774115306; Tue, 08 May 2018 03:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525774115; cv=none; d=google.com; s=arc-20160816; b=0oO8isIKpb+UsUifeT+Cilqq0RYX6xTCUjHcfQeCrrERDlIjCFmwKAgawY72vgEx6o U/Ukl4xKCCNK5xTXHVRLMr/kr3Mm1mm34cv7/lZerUr0SCt68jon+2ejP6SWXyvk7lLa Q6I/G6ZiFItFGcl5k1zfS9npbLBIadszd2dGHcQ3CuHIwALdIYaqggtjNDQ6WR1/XkDW ocFuAXq17lk6/tfGl5qC4ozdUW3fVs2vW0LKSIIx9h8WPRK+pWEnMQN1EYH4ILKuqDX9 teu0nux6i3t6Fz3w95g5pHgCVbR49O+SGkpQyPiOm0D84P4xHJgPefouA1K2JrvuLVlS 9i/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=YGPNViFfEVcpvsQMOKRz+Im6aAJmOHuR7Q0JOjpvHL8=; b=SVcpDjx42+YvmVOL/fzNb1KFlyj9zKemJyv0DCCASLKWfBccKOXugF+MQ4f3Qz92VQ dvUO3ato869g8rZo7vLfOOFmoN/OsOI0RR9Beq7VETOXuaV2rbezhdn5dRETG2l2zrVh xJ3+ZRRhFF99fq3BZYFReVHWyxjUBaGcg1cNa/YtBNieyEsieRvSE0r6KccNj2yp2W9L 6rS9lUE1Ss/MIYTTYyWy1cwz7itMc2fI/B9vXxiEFytD/yTHJOQElpKIFFdwA3PzI29m OVPtL9+SDtX8MGEbYvth0omOcKB6t/nwFZWNpNeBLwLi0Yzd0gaUoihNi9tK8imSGrQ1 0yJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si15842741pfe.158.2018.05.08.03.08.20; Tue, 08 May 2018 03:08:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932376AbeEHKGC (ORCPT + 99 others); Tue, 8 May 2018 06:06:02 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:50455 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932187AbeEHKF5 (ORCPT ); Tue, 8 May 2018 06:05:57 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fFzVF-0001wW-Fc; Tue, 08 May 2018 12:05:49 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1fFzVA-0004FV-Qm; Tue, 08 May 2018 12:05:44 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman , Jiri Slaby , Johan Hovold , Jacek Anaszewski , Pavel Machek Cc: linux-serial@vger.kernel.org, linux-leds@vger.kernel.org, linux-can@vger.kernel.org, kernel@pengutronix.de, One Thousand Gnomes , Florian Fainelli , Mathieu Poirier , linux-kernel@vger.kernel.org, Robin Murphy , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/3] led_trigger_register_format and tty triggers Date: Tue, 8 May 2018 12:05:40 +0200 Message-Id: <20180508100543.12559-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, while working on a patch that adds led triggers to drivers/tty (patch 3) I thought that being able to pass a format string (and the respective parameters) to led_trigger_register_simple instead of a constant string would be nice. This is implemented in the first patch. The second patch converts the can leds to this new function which demonstrates nicely the added benefit for users. Both patches are new in v3. The third patch finally implements the triggers for the tty framework. Compared to v2 I reduced the need for #ifdefs, make use of led_trigger_register_format() and excluded serdev devices from triggering as suggested by Johan Hovold. Also code cleanup in the error case is done now and hopefully the kbuild test robot is happy now. Best regards Uwe Uwe Kleine-König (3): leds: triggers: provide led_trigger_register_format() can: simplify LED trigger handling tty: implement led triggers arch/arm/boot/dts/imx25-logitech-baby.dts | 192 ++++++++++++++++++++++ drivers/leds/led-triggers.c | 84 +++++++--- drivers/net/can/led.c | 30 +--- drivers/tty/Kconfig | 7 + drivers/tty/tty_buffer.c | 2 + drivers/tty/tty_io.c | 3 + drivers/tty/tty_port.c | 32 +++- include/linux/can/dev.h | 3 - include/linux/leds.h | 30 ++-- include/linux/tty.h | 22 +++ 10 files changed, 341 insertions(+), 64 deletions(-) create mode 100644 arch/arm/boot/dts/imx25-logitech-baby.dts -- 2.17.0