Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp2861004rwb; Sat, 6 Aug 2022 07:33:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Hbz1wHNo0/nXYcKedb28jgzR5Wk1d6UVN2Dk/B7+FRvdGlGFd7+v6faKGBZF55E9Qj7K+ X-Received: by 2002:a17:902:ecc2:b0:16f:3846:b279 with SMTP id a2-20020a170902ecc200b0016f3846b279mr11164661plh.127.1659796391564; Sat, 06 Aug 2022 07:33:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659796391; cv=none; d=google.com; s=arc-20160816; b=kTZiluL0CN6wyefddNpRqJBAc7HMLQk+7bGHFrCMGO3YN7+GJ6roXNJ3lcNC1iApv0 bEJ9/41nqcjNeyfV9SqiRGm2r88d794UAuP9jEtNhRz8L60dDldmrne6OrJG069VkPyG 2fBDMPeQXgFM3K27MmuQZOI9siPKmBNWuuakDGNelaL4yD2BtAaOPiw2VdLC9EjYCht0 HczxuJB6yaZ0Do3Kyf0wOyjyDaO/2883mzo5VbRRt81Rypv1Vzmd+I/8E5GExG3xNdXm /qaFpMimhpLA1QRZTnwiDlJnJVpyeIFTGL1uPwKmC1eUDcHizCRCKfwt5YBbo11DVCcZ h/Pw== 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=yZQDt9WcnEUArIc/8nLbuVCl2ZXUavHLWWaZ3pdjBac=; b=XgTEaTrhOp1S70b6VUDMhofv30Q6JA3aP3ksY1covJWjlX3HStxN7KzqWBOzY/6qSG 8EWdFUgN6qREalrI4o0D9hf+Mgl+0DxO8zOSgiUd7dg7Kr+9c6r2t55zIRed+mOXy0k+ iZsp3COoAi+n8kkITlEbYv3ch/gfkF9aSSU+pZKDme8q4NqkenwCIgamk2+5qM6L7dfH lydtts2OeqCm0t93gHlu5zH5W6nyiTum70D8kwwL7ExFgx3+64QGYsCmxjeh5YY9m82m KFA2dPI++LiT5kz9FX9srpSJyb4w7eIhZYLYHblW2P+k9yKJR1v3PPABdsYAHuFDjFrN wphg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qy1WpG6P; 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 t3-20020a637803000000b0041c721845f0si718435pgc.343.2022.08.06.07.32.52; Sat, 06 Aug 2022 07:33:11 -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=Qy1WpG6P; 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 S231770AbiHFOWG (ORCPT + 99 others); Sat, 6 Aug 2022 10:22:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbiHFOWE (ORCPT ); Sat, 6 Aug 2022 10:22:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18BBF11A24; Sat, 6 Aug 2022 07:22:04 -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 B6D0BB8069B; Sat, 6 Aug 2022 14:22:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DF4BC433C1; Sat, 6 Aug 2022 14:21:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659795721; bh=HkNJnYcSEBuJ4YsCeTCaPqJ4cCK2gNOMXnFH8NjrmH0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Qy1WpG6PIF54IANVnlB+23sKM3kIajnUro+RKcUEVUV1gEXILZDV31FoOoCDcXvTc tp/AOvvbzBjMt5Rl+WO3nmvS2QyQoEK11FjVAoU5u/LjB9hm1eB2SD/4FD9FFdu9A9 SOw6I58b3/lSO6Qf9qmdgUI1Q+FCYiTxLtIz8gFc/mgTkoGUrBuZHLK3hGTK2EybY1 TvU33TpKC105ejP1MXT5mRh/B6QTa3EmTtNdXZz5Ok1eErivLSQ0FaD5JMrrvrEwtM G65nAu0r2mPOJKsp89T5+aWtZ71njz/uuclqwTBOxB3w2rju9HFrJxWIASRInsMwzt FE6iY6YnZzcrw== Date: Sat, 6 Aug 2022 15:32:21 +0100 From: Jonathan Cameron To: Krzysztof Kozlowski Cc: Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , "H. Nikolaus Schaller" , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] dt-bindings: iio: gyroscope: bosch,bmg160: correct number of pins Message-ID: <20220806153221.1a90bd28@jic23-huawei> In-Reply-To: <20220805075503.16983-1-krzysztof.kozlowski@linaro.org> References: <20220805075503.16983-1-krzysztof.kozlowski@linaro.org> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Fri, 5 Aug 2022 09:55:03 +0200 Krzysztof Kozlowski wrote: > BMG160 has two interrupt pins to which interrupts can be freely mapped. > Correct the schema to express such case and fix warnings like: > > qcom/msm8916-alcatel-idol347.dtb: gyroscope@68: interrupts: [[97, 1], [98, 1]] is too long > > However the basic issue still persists - the interrupts should come in a > defined order. > > Signed-off-by: Krzysztof Kozlowski > > --- > > Changes since v1: > 1. Accept also INT2 as one interrupt (Jonathan). This doesn't work. If we are going to support either interrupt, at the very least we need to require interrupt-names if the first one isn't INT1. So your fix is right but not enough. Driver may ignore interrupt-names for now (would be good to have a sanity check in driver though so the driver explicitly checks for INT2 and doesn't use the interrupt if it is INT2 - support for that being for a future 'feature' addition). A hacky solution would be to require the first one to always be INT1 but that gives us no (backwards compatible) path forwards if someone does have a board where only INT2 is wired. So minimum change I think will be to provide interrupt-names allowing any of INT1 (default if not specified) INT1, INT2 INT2 and your fix below. Thanks, Jonathan > --- > .../devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml b/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml > index b6bbc312a7cf..1414ba9977c1 100644 > --- a/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml > +++ b/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml > @@ -24,8 +24,10 @@ properties: > > interrupts: > minItems: 1 > + maxItems: 2 > description: > Should be configured with type IRQ_TYPE_EDGE_RISING. > + If two interrupts are provided, expected order is INT1 and INT2. > > required: > - compatible