Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3951271rdb; Thu, 14 Sep 2023 07:37:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5vaveA6sqOKOxv4mrBn/5payfBeKKYRi3GZ5g2mIyg3xOPSuKBCUCFMT1lemPZTPBooRy X-Received: by 2002:a17:903:32cf:b0:1bc:6c00:a2cf with SMTP id i15-20020a17090332cf00b001bc6c00a2cfmr7514738plr.53.1694702267676; Thu, 14 Sep 2023 07:37:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694702267; cv=none; d=google.com; s=arc-20160816; b=ykGdjDzLhOC5klIIMKPAmCEwMLjR86LXZ8jmdKzmWJuyKhYGvMxwS01Ug2eotw0HkH B0JcGUbN8HF7VxNUZ5ROEx03D3sADGPr+wsHBCxvMpXsnQJGqHh56elunQqJetXvyiv/ IfwFq1uuI+Zcc5P+eW6fNLZXsvTneJL2u2Wg5993mTS8AZiZZD4RIiPtPa41Awx9QLdr kdZo4p80/pxW1JPNnMEnARJz2c5dR+Q/FSM/0yWICzyr2TdC9PzD3115OF6RE0+t/Pkm n+K7GU5TJyprF/Pxo+P7rZTV6OJEm82nEmU2qzGdM2ltFklkdk9fwCFm/VMbGTPTIX73 Qkuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ieqZclTkK7ivoWRubCLo30O9TnPsBL5yTzgcSVyhwUs=; fh=HOZ++xgByVf3Y1mN52Nf7dh0bdfH9nbnbz77I3h5LUM=; b=auj8tSdBHFqP3+SIyo42c+CczxZpzGxaMAEjVm6ky96DLG6B+y3dNOY4CmyzRbH8qr 4oBGMLixQzGniCHH1sFFApGZgBw4CPoCxxUemXAj7b3NntgQxB17wbwIhgBM1IEsuT39 QVmXLcStxfznR3iuPEmSfK1C0hbhwDZexZqbf0/7iHymwKQYpKKIeREkNrET8S7u9VSv euV57cpVezolu274fBsmpVCTsrKNv9twQ9m1RAisHUVgI+H2kUz5MbHSaMhKXScZlozH GuMQE/bPgNmfqeJRQe80ivg3urap6C2sMCxCNhKjkRoZd5XUE+Kh9OQEmTZA86kEgCQg U39w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AgBWK1Rr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x12-20020a1709028ecc00b001c1fe58a1e8si1809608plo.576.2023.09.14.07.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 07:37:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AgBWK1Rr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E52E0801D498; Thu, 14 Sep 2023 07:27:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240011AbjINO1d (ORCPT + 99 others); Thu, 14 Sep 2023 10:27:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233954AbjINO1c (ORCPT ); Thu, 14 Sep 2023 10:27:32 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F975B9; Thu, 14 Sep 2023 07:27:28 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5605C433C7; Thu, 14 Sep 2023 14:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694701647; bh=6I3beKN7kf1ly/W55tx7vgh+ImD+aULjlZOc4eWou3w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=AgBWK1RrlUnJl+BRslBPUz/e4p3ffDFlx2v0n+BzB78xWwqki9MNuFkXD5028I9// V4yyjgPg044UrtCLkDtPc/PXKMCh4fINxbDZUpzO5cbjG9/SZluxk1UnXM8mPTCiAM 8iPL0WVodR62eaBsgFFt+RZvdm76sdD48P7Ff655dMKn6RPjL3bGTj1WNG9WHDuiyL 25wIb3Sr/vDtVHIyd3Xz5aNZ1sSJRvyHBUb5SQaWjT66/AzMsvC2PeVLblGoAQDNeN IcdCRh/9n8ThUHnQgvtQUvKPi3WzXdjme4ywnDvNtTslnQM2xmItCTqD5G8VM8j4Dc gLqXabIVQVClg== Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-502defbb0c3so1828744e87.0; Thu, 14 Sep 2023 07:27:27 -0700 (PDT) X-Gm-Message-State: AOJu0YyHZhhNeDgw4l+sVAo6/I5iV+luFlqE5dPiy7t4qGFKOfWuVWKN S7j3XFV1oEb4v2ni7E9OFERrAm01E4mbr+estQ== X-Received: by 2002:a05:6512:2354:b0:500:86cf:1249 with SMTP id p20-20020a056512235400b0050086cf1249mr5173641lfu.61.1694701646122; Thu, 14 Sep 2023 07:27:26 -0700 (PDT) MIME-Version: 1.0 References: <20230912-gpio-led-trigger-dt-v1-0-1b50e3756dda@linaro.org> <20230912-gpio-led-trigger-dt-v1-1-1b50e3756dda@linaro.org> <20230913133451.GA2841610-robh@kernel.org> In-Reply-To: From: Rob Herring Date: Thu, 14 Sep 2023 09:27:14 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: leds: Mention GPIO triggers To: Linus Walleij Cc: =?UTF-8?B?SmFuIEt1bmRyw6F0?= , Pavel Machek , Lee Jones , Krzysztof Kozlowski , Conor Dooley , Jacek Anaszewski , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 07:27:31 -0700 (PDT) On Thu, Sep 14, 2023 at 3:40=E2=80=AFAM Linus Walleij wrote: > > On Wed, Sep 13, 2023 at 3:34=E2=80=AFPM Rob Herring wro= te: > > On Tue, Sep 12, 2023 at 03:44:30PM +0200, Linus Walleij wrote: > > > We reuse the trigger-sources phandle to just point to > > > GPIOs we may want to use as LED triggers. > > > > > > Example: > > > > > > gpio: gpio@0 { > > > compatible "my-gpio"; > > > gpio-controller; > > > #gpio-cells =3D <2>; > > > interrupt-controller; > > > #interrupt-cells =3D <2>; > > > #trigger-source-cells =3D <2>; > > > > BTW, this is not documented for any GPIO binding. If we want to specify > > the cell size, then it has to be added to every GPIO controller binding= . > > If not, we then need to reference gpio.yaml in every GPIO controller > > binding (along with unevaluatedProperties). Doesn't have to be done for > > this patch to go in though. > > Yeah I mean this trigger-sources =3D <...>; one-size-fits-all is a bit > weird in a way. > > My other idea was to simply add trigger-gpios to the normal way > and be done with it, but now the trigger binding has this weird > thing. > > Would trigger-gpios be better? Then GPIOs are different than everyone else. I think we have to think about other bindings too. While we could standardize the naming here with trigger-gpios, that won't work with the foos/foo-names style of bindings. trigger-sources is not widely used as it is just USB ATM and a few platforms. We could come up with something different. "trigger-sources-" is the only idea I have. Then the property name gives you the cell name to read. But variable property names have their own challenges. We would need to look at all the current trigger sources (i.e. the linux,default-trigger ones) and see what else might need this. Rob