From patchwork Mon Nov 21 12:38:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kurbanov X-Patchwork-Id: 1999 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1565628wrr; Mon, 21 Nov 2022 04:51:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf67RUuHNebqWD1TtrPNhcu3AE6lC4PUofZmq763Vil/61aY/2GJpxqpvAPcPZWv42VCDA97 X-Received: by 2002:a17:906:6403:b0:7b2:9667:241e with SMTP id d3-20020a170906640300b007b29667241emr15652533ejm.115.1669035094010; Mon, 21 Nov 2022 04:51:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669035094; cv=none; d=google.com; s=arc-20160816; b=pTXWu4Jey+KNUppKEGXOq0Yu/CbAZx6WMSMHG6u1xzUYPZfGUmcCCh9g8EwVdHfHW1 afbsulN3dnpLPHl4T+N51+VXtALh4ned+SX3TzAri2+uRTcLHtl4DdcCxQNpqWyY6ZW2 l5QV8lHaXQUGmAPeGncDk6m9087WC4lO+DC3ueU7fY2UgMSkosdImj8LlJRV7l3CbQXW zWEkbYZMpF4qFzO2JDQZgVWfyDA7Fzwmh7EethfS6Mk5XN9lk81/DwLpUpY3BDGuzhhS CQPQdTDoRHxLUPMiKOXTyAc9QoOL2qUxJd8q9vpdhM0JjRy0nCJBr4nCGhz1WTcYcu2b 4afQ== 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:dkim-signature; bh=9etgnCNzUKNIqOnqnqZtauA6kfSyecw38Vgt+Iketbs=; b=ons0ChEZ/5fVA4ry4wKep+npmLh8w4L9aB04e0OMYxVtTF7x4uHH72JrEgP5s+tUoc AdqVZwQh6tpsNiPQOrjzZUjqfpwkasOP50+NcDu8BfNftblckcdmMtmwXLOP64K6EOpi mrDLOeexf38RG8F67OC3/7aWk3gNEMDeSFm2VSyFY9MgCRBMxwejl81CqaAePFHiOAOd LW3kggdQ1h82zkyA2M4nUbeXUrbS+75/HpFFequEL2lbyFSD8gUxiZxgkc26fyIs7cwY QF3kPSoa2PLkXhQQIRED3NTLltb7mBShGA6zIGoP6cR5rFQ4b4n0p/yPngrakzIv09wk qH8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=efZxRIxX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p35-20020a056402502300b00461aa80dfa8si8875771eda.429.2022.11.21.04.51.03; Mon, 21 Nov 2022 04:51:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=efZxRIxX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231551AbiKUMkF (ORCPT + 99 others); Mon, 21 Nov 2022 07:40:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231574AbiKUMjk (ORCPT ); Mon, 21 Nov 2022 07:39:40 -0500 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D85A53F05B; Mon, 21 Nov 2022 04:39:32 -0800 (PST) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 680CE5FD02; Mon, 21 Nov 2022 15:39:29 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1669034369; bh=9etgnCNzUKNIqOnqnqZtauA6kfSyecw38Vgt+Iketbs=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=efZxRIxX+nCc/9AkkYYU6uAT+sxJsm6KjaYUfmpaDEBxD1NO5j0e8d9FcF/diJXJk BC0Vi2BokU1A1TXPK+OP41bceiVLLN2tp/Rvu+zdpOiIpEHzafBMpGjpJ+1OVZ6UQB WrRUYyD1TY6N2Ez3nfEbLz0wxyr4Tp8SUOROvt/nDCvTpVBShjhrm45OxfzpxVVKTE rL186GlEwqYWLSlAPA9kf3WbZ7cnwgEHM1+JlMDwcyZvqI7kizpH56N0/A+Wwzs29r Z7qMMmoDATKOJdJ82KrSVzao6enbuTj9aNSfHgptlaSp+uMmlsrB3OM0trjiUSHGDR HfhDkZrsk71XA== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Mon, 21 Nov 2022 15:39:28 +0300 (MSK) From: Martin Kurbanov To: Pavel Machek , Raphael Teysseyre , Andy Shevchenko CC: , , , Martin Kurbanov Subject: [PATCH v2 0/2] leds: trigger: pattern: notify usespace if pattern finished Date: Mon, 21 Nov 2022 15:38:31 +0300 Message-ID: <20221121123833.164614-1-mmkurbanov@sberdevices.ru> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/11/21 03:43:00 #20593185 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750110135604602263?= X-GMAIL-MSGID: =?utf-8?q?1750110142452244884?= In the current moment, userspace caller can schedule LED pattern with appropriate parameters, but it doesn't have ability to listen to any events indicated pattern finished. This patch series add support for a 'is_running' attribute to signal LED pattern state to userspace. For example of user space code how to use the feature: https://gist.github.com/m-kurbanov/775408521c436a371c3640d49808d08d Changes v1 -> v2: - code style fixes (Andy Shevchenko) - typo fixes (Andy Shevchenko) - add ABI documentation (Andy Shevchenko) - added example on the gist (Andy Shevchenko) Martin Kurbanov (2): leds: trigger: pattern: minor code style changes leds: trigger: pattern: notify usespace if pattern finished .../testing/sysfs-class-led-trigger-pattern | 11 +++ drivers/leds/trigger/ledtrig-pattern.c | 92 ++++++++++++++----- 2 files changed, 80 insertions(+), 23 deletions(-) --- 2.38.1