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 X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 460DFC3A59B for ; Sat, 17 Aug 2019 04:10:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B68221743 for ; Sat, 17 Aug 2019 04:10:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566015011; bh=17g7BfaMmHq30WUcz3+b9tVZ/imTY1C0pBnfPfxS7cs=; h=In-Reply-To:References:Subject:From:Cc:To:Date:List-ID:From; b=zn2r2W5MEUZnFy5HcWAcu4+dbFw9E3NW9FqqoljOq5qmC33zZZTaUHpQBzpsRwgo/ VMfjyx1IXHw805fisgps5jw3xpe1gjzICaZQS12KRoQZoO7KUJoUcFlCW3XQmo4oJE +ORPSfCU3uBvrJ1ZVAZkzjBSyQiWqDVtlrtLqCV4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726013AbfHQEKG (ORCPT ); Sat, 17 Aug 2019 00:10:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:44446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbfHQEKG (ORCPT ); Sat, 17 Aug 2019 00:10:06 -0400 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C56FD21019; Sat, 17 Aug 2019 04:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566015005; bh=17g7BfaMmHq30WUcz3+b9tVZ/imTY1C0pBnfPfxS7cs=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=mv/IQMFCwqZvuNX0TFvREpAUmWNti9NodB6yjXZjh1bx1e7V1AiOMLcnDtLiYxSw9 gwYsIhMIDll1sm1WUeZ/rO5moGRPj9p3n5qTDqyKjVpXYtkXStBCyl5RpkLHplCkIA 5iEVM7HmBPj622VzENZ5L9kUDwuIv2uBs7ijN7hY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <72bce036fa8cba3db6e5ba82249837ee46e9c077.1564091601.git.amit.kucheria@linaro.org> <20190816213648.GA10244@bogus> Subject: Re: [PATCH 07/15] dt: thermal: tsens: Document interrupt support in tsens driver From: Stephen Boyd Cc: Linux Kernel Mailing List , linux-arm-msm , Bjorn Andersson , Eduardo Valentin , Andy Gross , Andy Gross , Daniel Lezcano , Mark Rutland , Zhang Rui , Linux PM list , DTML To: Amit Kucheria , Rob Herring User-Agent: alot/0.8.1 Date: Fri, 16 Aug 2019 21:10:04 -0700 Message-Id: <20190817041005.C56FD21019@mail.kernel.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Quoting Amit Kucheria (2019-08-16 15:02:08) >=20 > Depending on the version of the tsens IP, there can be 1 (upper/lower > threshold), 2 (upper/lower + critical threshold) or 3 (upper/lower + > critical + zero degree) interrupts. This patch series only introduces > support for a single interrupt (upper/lower). >=20 > I used the names tsens0, tsens1 to encapsulate the controller instance > since some SoCs have 1 controller, others have two. So we'll end up > with something like the following in DT: >=20 > tsens0: thermal-sensor@c263000 { > compatible =3D "qcom,sdm845-tsens", "qcom,tsens-v= 2"; > reg =3D <0 0x0c263000 0 0x1ff>, /* TM */ > <0 0x0c222000 0 0x1ff>; /* SROT */ > #qcom,sensors =3D <13>; > interrupts =3D , > ; > interrupt-names =3D "tsens0", "tsens0-critical"; > #thermal-sensor-cells =3D <1>; > }; >=20 > tsens1: thermal-sensor@c265000 { > compatible =3D "qcom,sdm845-tsens", "qcom,tsens-v= 2"; > reg =3D <0 0x0c265000 0 0x1ff>, /* TM */ > <0 0x0c223000 0 0x1ff>; /* SROT */ > #qcom,sensors =3D <8>; > interrupts =3D , > ; > interrupt-names =3D "tsens1", "tsens1-critical"; > #thermal-sensor-cells =3D <1>; > } >=20 > Does that work? >=20 Can you convert this binding to YAML? Then it looks like we can enforce the number of interrupts based on the compatible string.