From patchwork Tue May 8 10:05:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 910083 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IlnICLiL"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40gFWY2Ntzz9ry1 for ; Tue, 8 May 2018 20:06:33 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mYwHktmO0R7XgbjhJgKGl1OXJ9h6RYcq69l6MzQhVTA=; b=IlnICLiLuS3kvs FaQs0sr7KBscPZiCpNSMSjkTpc8EfdKhDAYuQl9G44Z1qQ6HOmVNERvIVfyzBOuq/5QV8iYuWL7z6 qEXtApfHOkEqLNFsELZDs4yNlmsPjKBdxTOgi1y6ipQ+TmLOqrGmUDNLoWoX5gAmnWWD3RvC4D8ZY oUnrA2KRbba8Q2qo404TwWx+dyhk0iBhRKOwIttdh0sOv/MoHGRYzl+jSPtzlVj8X4WN2I17OfIWT l/reFQ8es0C07FpgOXKDFSNTLsXctETQrzuinHWPM10lQv5Bn8M0ldPFnzTS0kQikSxv7mF1TGmfD oot1rlqgIEJ38/tkw7oA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fFzVr-0002k3-0P; Tue, 08 May 2018 10:06:27 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fFzVd-0002Nw-7N for linux-arm-kernel@lists.infradead.org; Tue, 08 May 2018 10:06:19 +0000 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_Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman , Jiri Slaby , Johan Hovold , Jacek Anaszewski , Pavel Machek 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 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180508_030613_466278_F7E3DD31 X-CRM114-Status: GOOD ( 14.32 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2001:67c:670:201:290:27ff:fe1d:cc33 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: One Thousand Gnomes , Florian Fainelli , linux-serial@vger.kernel.org, Mathieu Poirier , linux-kernel@vger.kernel.org, linux-can@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, Robin Murphy , linux-leds@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.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