Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp576329ybh; Sun, 12 Jul 2020 16:21:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/XvGVTNHcCkGzQvgWkRTRg2wq653HjjIo1Fgz3UQ8Xu/4WElcDbwEqhNZTdracNU9BRxy X-Received: by 2002:aa7:df08:: with SMTP id c8mr86942582edy.372.1594596075514; Sun, 12 Jul 2020 16:21:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594596075; cv=none; d=google.com; s=arc-20160816; b=B0Nqy9U+5RoGedkGA5xyi9k1bfEEjwh47R0Jh/5GPlrrpF7f8kOda3w4qJpqO279Xa PLRH4Cw1sVX1rxdhntJRMMU7OUP/j569M5Xh9aupqhGU3i8Xp3QRZlSoKo0EW9FisPVI mwUiiOi5U63JdcTxZ/aW+7rXK/Pv6QqEzSKxCujxLIt40Wy1SNeaI9HNRLq69+RCko7o i3wp5c6q8IPMeNv/5PLtOtM2psKmdA7DuwJSgV0WHApIqMive1F7LntwscWUUKnF1dQp CD2Ndih0IX+IDxQdgnO+lgHhZ6oD8eeoEBtgC9niXE9YfxuzKKD+lRswGD8vQo90axT4 YATw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=oWEGZNZzPfZSyReuwO/r4sDrMA3Ym1alNAfm/HZaDUE=; b=XNlypht69wQiMlSC6m1azYh00oGRW9i4EpneBn7g3WQ7XGhdTKGkpaDk+uj5F31yS0 ETjIKtwR3VHhm0eg6dBQfkBE4lEZYldAkAqs6wflINRYnbKdc44PTuBo2iCaJRnUeGZA tygz6HXeJQFKX6qAWLIhRX4YMJsUJsw76VUIkdeOQW0uPZQyvmmkxnRBIJPPI6B57vfY igIK34y96Bh5pKS8XQELJprmSkB5FSbgJPTOMQjXlTTO+tZwSGriGTBUNeym4SqqNMLL amEPGSnIDO6TP4LDcOL4jXgNyCuoSXgsH6bUnab3zqoq6R0H+iIR5q5pl06RF224BjwL ha5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nic.cz header.s=default header.b=dgarWx6W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si8253833edr.480.2020.07.12.16.20.53; Sun, 12 Jul 2020 16:21:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nic.cz header.s=default header.b=dgarWx6W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728256AbgGLXSo (ORCPT + 99 others); Sun, 12 Jul 2020 19:18:44 -0400 Received: from mail.nic.cz ([217.31.204.67]:34040 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727785AbgGLXSn (ORCPT ); Sun, 12 Jul 2020 19:18:43 -0400 Received: from localhost (unknown [172.20.6.135]) by mail.nic.cz (Postfix) with ESMTPSA id 1C496140637; Mon, 13 Jul 2020 01:18:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1594595922; bh=oWEGZNZzPfZSyReuwO/r4sDrMA3Ym1alNAfm/HZaDUE=; h=Date:From:To; b=dgarWx6WIlF5MziAb8hhRGF0jJpKwHv1ukVGYMshFaJ0BLFHVaS8AdZqUmwhGKiSX TIGAe3AjNYw36p8Iw4ZKT/60tRNhn2hHflEqIfi0hpAviHIOBJVodrF7tYQBIbD3bV d0rmZU6noMPs44fDiolwpvRhhT9L2OTiTvTeMdgw= Date: Mon, 13 Jul 2020 01:18:41 +0200 From: Marek Behun To: =?UTF-8?B?T25kxZllag==?= Jirman Cc: Pavel Machek , linux-kernel@vger.kernel.org, Jacek Anaszewski , Dan Murphy , "open list:LED SUBSYSTEM" Subject: Re: [PATCH RFC] leds: Add support for per-LED device triggers Message-ID: <20200713011841.25904273@nic.cz> In-Reply-To: <20200713011544.0adc51f1@nic.cz> References: <20200702144712.1994685-1-megous@megous.com> <20200711100409.GA18901@amd> <20200711210111.5ysijhexgyzyr7u7@core.my.home> <20200712072554.GC4721@duo.ucw.cz> <20200712134911.r3lig4hgyqhmslth@core.my.home> <20200712191111.GA20592@amd> <20200712223821.742ljr4qxdrx3aqv@core.my.home> <20200713011544.0adc51f1@nic.cz> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-100.0 required=5.9 tests=SHORTCIRCUIT,URIBL_BLOCKED, USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Jul 2020 01:15:44 +0200 Marek Behun wrote: > On Mon, 13 Jul 2020 00:38:21 +0200 > Ond=C5=99ej Jirman wrote: >=20 > > So after trying to use this, this seems to disallow the use of multiple= HW > > triggers per LED. That's fine by me, because using one HW sysfs configu= red > > trigger per LED that use case is my proposal, but is it desireable in g= eneral? =20 >=20 > Why? If you register one LED and several triggers, all sharing the same > trigger_type pointer, I think it should work. >=20 > Marek The problem arises when I have two LEDs and two HW triggers, and the hardware allows setting one HW trigger on both LEDs and other HW trigger only on one LED. But this could simply be ignored - the set_trigger function could simply return -ENOTSUPP or something. Marek