From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43D23C433EF for ; Mon, 11 Jul 2022 12:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231594AbiGKMKP (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@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