Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2378329rdb; Tue, 10 Oct 2023 02:01:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDrN4uYDfABtp2SSXiJhpKCFliw+ncOokCID59YrvLk8u+8aneRmV5GsU1jxF0cyI7oND2 X-Received: by 2002:a05:6870:818d:b0:1d5:8c26:74e5 with SMTP id k13-20020a056870818d00b001d58c2674e5mr20439440oae.10.1696928464400; Tue, 10 Oct 2023 02:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696928464; cv=none; d=google.com; s=arc-20160816; b=XXNk/F9LIKc0kgEg7dMuoNTQrdUHFMar1N60igmrhwhjzRJU8KxjmBuVQUA4x/tEpl PmJ+iM/NoxvY8W9tm4WNy4YoNJT4oVqFPlaJRhcybCECDaKT3PqSkEpFlWUssmQAxF7E cpBbQo95b0e/VDklG4Ys+ub31gNfcLmVyLgx2KOVLsoXma/mZvDmv58oQ4zFNtNc1XYG Xf747dfqivJByqFKrK36m5MovBC5LaEncxUZC+TAT9YSdW1taWHGmpSNBQ79Vf6gm+Aw sDSXZ/TiAycJQ55lcjZZf3OT97HKPz9El5k+ZTgxZys0TWpYKW/hUaTXzr8lr1736t73 tLeQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=EjlCSHvtl9ZqV3JA91LWsA0I5JwlpYxQgxRg3gapvZ4=; fh=t6KfvmvooTm+qKbnodC1/vjP1I8JsNlTVdAq/FYh+2E=; b=FoElVMw9b04DW3ovqHeoGQqQ4lHmYHWx/+9GkpF2uzyiPmfEBXL0Bhva98YbnzBj2w KuFnUjp1NftpntFPdqv9MbtpARFgrZA5PJvK08wgtXB+hEdeDLveHDROYdbcYejVDIy8 k+qCdWl4x4PI4G4J/nQmVRrwjKZDQAvbSTNk2R3da1L64no0wpwjw4HYibUCuwu+6vPl hsoM8oyw2TR/ICzMcdS5r4Zkhb5LSAtfzLFukeTKHqvmVHaRxO+prBFfks5xLPmr7+4g 2BzpfUdsbR/BMPO/xL/OuxxkzUPSZBAnZ99KH2T/SAOVODbbPAJ2WoedWlktaAs4uoPu LW5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EC7EPtjK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id o1-20020a634101000000b00573f6ee58fasi11198818pga.376.2023.10.10.02.01.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 02:01:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EC7EPtjK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 482D98092179; Tue, 10 Oct 2023 02:00:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbjJJJAN (ORCPT + 99 others); Tue, 10 Oct 2023 05:00:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbjJJI7z (ORCPT ); Tue, 10 Oct 2023 04:59:55 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40AA7B6; Tue, 10 Oct 2023 01:59:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54B7BC433C7; Tue, 10 Oct 2023 08:59:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696928393; bh=VPdLVYDkYK6Xvvcav5U5Gbw4A7BwKmwy+jdIVkYAH2I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EC7EPtjKcAAcpm/405fN5lsGG+9c3dRCZJiVjy5bcLboQL9MxDHd2N4su1QzUSmj6 6YkKV9H/B+zOO+0TZBp4dmJ9jgUG4YqoNx6AvMMekEpfKOHOmS4Kfo9BB3izTET1Om u00gHSpP+Gp+eeHXroaxJuOr5D1X2lW8wdTtLf12vOrBNdKpN5ohTADh/utOt21+Mp Ui9qeqFcCAFCScX64YLzzmk1TkGnjQY7vOchevn9S0w/T2SxM0Ltth3py6KSRF45lL n0pGPZWtqQSA9CwwnpAsklG2RC4bUW8sTbgU/ws5JV4XwnHcHD6JcCsMBp2xLeG5hh +13ZbjgTp57Ww== Date: Tue, 10 Oct 2023 10:00:02 +0100 From: Jonathan Cameron To: Jagath Jog J Cc: andriy.shevchenko@linux.intel.com, lars@metafoo.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij Subject: Re: [RFC 1/2] dt-bindings: iio: imu: Add DT binding doc for BMI323 Message-ID: <20231010100002.0163d681@jic23-huawei> In-Reply-To: References: <20230918080314.11959-1-jagathjog1996@gmail.com> <20230918080314.11959-2-jagathjog1996@gmail.com> <20230924143710.7c6edc4a@jic23-huawei> <20230930170530.0b8f185c@jic23-huawei> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; 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=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Tue, 10 Oct 2023 02:00:35 -0700 (PDT) X-Spam-Level: ** On Sun, 8 Oct 2023 11:54:39 +0530 Jagath Jog J wrote: > Hi Jonathan, >=20 > Few more questions before sending the next series. >=20 > On Sat, Sep 30, 2023 at 9:35=E2=80=AFPM Jonathan Cameron wrote: > > > > On Thu, 28 Sep 2023 03:07:22 +0530 > > Jagath Jog J wrote: > > =20 > > > HI Jonathan, > > > > > > On Sun, Sep 24, 2023 at 7:07=E2=80=AFPM Jonathan Cameron wrote: =20 > > > > > > > > On Mon, 18 Sep 2023 13:33:13 +0530 > > > > Jagath Jog J wrote: > > > > =20 > > > > > Add devicetree description document for Bosch BMI323, a 6-Axis IM= U. > > > > > > > > > > Signed-off-by: Jagath Jog J =20 >=20 > > > > > + interrupts: > > > > > + maxItems: 1 > > > > > + > > > > > + interrupt-names: > > > > > + enum: > > > > > + - INT1 > > > > > + - INT2 > > > > > + description: | > > > > > + set to "INT1" if INT1 pin should be used as interrupt inpu= t, set > > > > > + to "INT2" if INT2 pin should be used instead =20 > > > > > > > > Why not both? Sure driver might elect to use only one, but the bin= ding > > > > describes the hardware not the driver and both might be wired. =20 > > > > > > If both interrupt pins are wired, should the DTS file need to define > > > both of the pins? =20 > > > > Yes it should. + we need the names to know which is which. > > You could rely on order, but it's more flexible to not do so, particula= rly > > when you also need to support case where only one is wired. =20 >=20 > In the driver, I currently prioritize INT1 over INT2 when checking > (bmi323_trigger_probe(..)) based on the interrupt-names defined > in the device tree. However, I'm open to suggestions on the best > way to ensure that the order doesn't affect the selection process > when both interrupts are defined in the device tree. If they are both present it is absolutely fine to pick one in preference to the other. >=20 > Each feature, such as data-ready, watermark, tap, and others, supports > either INT1 or INT2. Based on the interrupt pin defined in the device tre= e, > I configure the all the features accordingly. That's an implementation choice to do them all based on one interrupt pin so absolutely fine to do that in the Linux driver, but the dt binding should allow for other choices as there are sometimes efficiency gains in doing so. >=20 > Regarding your earlier suggestion to have two different controls for > drive-open-drain, do I need to define sensor-specific drive controls > in bindings for both interrupt pins? > for ex: bosch,irq{1,2}-open-drain Hmm. We do have precedence for a single control e.g. nxp,fxls8962af.yaml as drive-open-drain. So perhaps just go with that and if anyone is needs different values we can figure it out later. pin control (which is where that binding item comes from) seems to have examples doing much the same. Sets of pins with a single drive-open-drain entry. Linus, any comments on this as you've dealt with far more similar cases than me! Jonathan >=20 > Regards > Jagath > > > > > > Jonathan > > > > =20