Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3267731imw; Mon, 11 Jul 2022 05:31:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v30/mZgXzynept+HoHTk8SLETc3SJyAQgM+MPeqYOAMzpLA8T/u4WqIo9Y7p4YL2xpQe46 X-Received: by 2002:a17:906:d550:b0:726:2b34:2fd6 with SMTP id cr16-20020a170906d55000b007262b342fd6mr18092376ejc.311.1657542712084; Mon, 11 Jul 2022 05:31:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657542712; cv=none; d=google.com; s=arc-20160816; b=QZcqqZvU1x7waNY4AivwjLWG9+WTbSMnsLAaMTr8AKiEu8egW4Aux5HLKcdchIvSfB JE+GQbcZ6RqwqHGEGLBC7cHo44oOQBatS6hg2hTGn293hBvdSycbH4RR9FpVxMtrxl6o FjGvm5cvVS1QlCxfkPc28PM4tiYAZeWF1X3gVA+5I+rQuAABx8Sf3zwY+eRYtzmqBYeK 9M1PK2BDIwnRSZbQqgtmclIyGJfxp9qhvc4peVb2MMlUA0ivbsryt98yydkNds514Imb 05g2phNmv1IFWG2caV0s+b0Eq6sn0oLJzUgqVi93BcFfKhGDH/Y7jK+jd+WCd59yeYA1 V7Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lH5GVPsbDqKEQrxDT1eEarutaSmaNQ5mH4kp2KOjXaM=; b=B6bcVt/La04/w6M1mOwib3aaswpHyODGBlrF1ChZUHOcO5fhaIAtOwK6hyZtGzf4t2 ZGaTjO59vl3xBRu1utBvzWufcWlOyLQEapGpetjSJCdyoSq9tX7mAjiZmLn38ugADspw oCGB+zl12+LFfF44CiM7CDpOTSuZ0CGufyshWiS1QnX18p/LwWYhtpps0VEAdG5Uo4M/ wU5gupxgA75itP7UOtNw3h2fvgO/L6s42Ah1SWywxUsPnWbbAdein+UeFZvD90xzrxjS tQm5MYbql93WUHegViovyq1jKE6kS7NqY07IeqOU80+UDjkiRMrP5+yHGxyD/tW8WfIW Q9Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YdURxBL8; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c18-20020a05640227d200b0043ad5453f9fsi4791012ede.609.2022.07.11.05.31.27; Mon, 11 Jul 2022 05:31:52 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=YdURxBL8; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231609AbiGKMKP (ORCPT + 99 others); Mon, 11 Jul 2022 08:10:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231603AbiGKMKN (ORCPT ); Mon, 11 Jul 2022 08:10:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E05F491FD; Mon, 11 Jul 2022 05:10:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0D2ACB80ED5; Mon, 11 Jul 2022 12:10:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97F91C34115; Mon, 11 Jul 2022 12:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657541409; bh=JidRq+aIP/KXPZW1wchQTZoyRdoLEIqVo+G5vnBfgzs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YdURxBL8s5KFA6/l+0muCip0f35rftbIwYV0+0cXJyNPljhWxBFJodKI+qv0Ip2DP KnsNSGxgoyvXa0Z6OHPAAqi7MbGLi6hr9hF2p2YTpNGA+SKLNrgf51rEP6AbMDIvel KoFNezaykyWMe6GTNuirFEfxbG0uFeDE2zAI1Sy2r+h/pnQhaRYZoq2mefu0D/ZPYO Pl04YVa+t0NUIYHBpz0ZOPpwT25EhIQdCtzV9xOaDtH1VA6gCtOsgOuFZUAZaAyjN0 /1zXZUznzNCnhMlveAB0wg7vkwV/6R9eMNK0e+LKMe94djge8UJtsDMwVThMWe/CIz B/JGmm3FNTjXQ== Received: by pali.im (Postfix) id 9500D9D7; Mon, 11 Jul 2022 14:10:06 +0200 (CEST) Date: Mon, 11 Jul 2022 14:10:06 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Linus Walleij Cc: Rob Herring , Pavel Machek , Krzysztof Kozlowski , Marek =?utf-8?B?QmVow7pu?= , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] dt-bindings: leds: register-bit-led: Add value property Message-ID: <20220711121006.kjk44rubi5gpqycj@pali> References: <20220706112828.27278-1-pali@kernel.org> <20220706162111.GA145516-robh@kernel.org> <20220706162335.2eewgf7l3xghdjtr@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Monday 11 July 2022 14:06:50 Linus Walleij wrote: > On Wed, Jul 6, 2022 at 6:23 PM Pali Rohár wrote: > > On Wednesday 06 July 2022 10:21:11 Rob Herring wrote: > > > On Wed, Jul 06, 2022 at 01:28:27PM +0200, Pali Rohár wrote: > > > > Allow to define inverted logic (0 - enable LED, 1 - disable LED) via value > > > > property. This property name is already used by other syscon drivers, e.g. > > > > syscon-reboot. > > > > > > Yes, but those are potentially multi-bit values. This is a single bit > > > value, and the only value that's ever needed is 0. Why not just use > > > 'active-low' here? > > > > Just because to have uniform definitions across more syscon nodes. > > But what happens if he mask and value don't line up? > > mask = 0x10; > value = 0x08; Same what would happen in other drivers, no? Only those value bits are take into account which are also sets in the mask. > If you just state active-low; this kind of mistake is not possible to make. > > So I'd rather go for active-low; > > Yours, > Linus Walleij