Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp155915ybl; Fri, 16 Aug 2019 21:11:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzuXQmBjuOmRgc3YRtQZJHF7jr3vQjEz+jLY/giRvYI61zkNdsSvew214o8ZUuC/hOio2it X-Received: by 2002:a17:902:7782:: with SMTP id o2mr12623205pll.12.1566015074964; Fri, 16 Aug 2019 21:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566015074; cv=none; d=google.com; s=arc-20160816; b=Mu9ZSCIhxJ3NLZJqfR/sf99V+tVNiXljQCMhZLv24TkLNUKaLca2uVs/P5QzwsyUmQ 1T3hu0CQwCGO0z/FBVH6QfdrSMXD6O96jVefbSWgjeKsrKb944hnJNC+mvErrAFDlg66 TEc0QOgfz1XaYmwPHi1CNMxfJftuMTrMdpTwaiAx5vg8tQES553VrEOikaELk+AVmpKL 641liUnCTtcKAapdACZHfBta/yA8sot7mU4k2NavIlITwtNB9ay2LQgyso/cB+VXKi1c yfqzTBaPOeIIqjGk1kTP+C3TbocLVe/glZulNtdqGAIRI0OhIOMzLbcwHyAIP7jBFaGk y4SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=X+idL/lhvdYkCMNixkp/jGh3jjIG6zU/bB3t+K7xLSc=; b=v6D3uuqGtgBaJGIVXy2Cr8DNbzIBybdvmHv8FV+Q7bJaOYZwySfWEPqhrWI0tUULJx mPmuFm1IN6nndVdUA018mTmHr6Q43ygPjOyxXUAgw2JJgNp15JLdcbbea+BLB9MZrIaF GN20XmA9WHff7yFxFLO4sSsPxGJK/4cSV+Td47pPNPEmMuZNiv5ERoegfYkAvgz+Mikl 0exUSOFtsyyFbLFBSmUSyvKFuNI5j2MUZZo2UnzWbzoePqjsPBdGGcBJHzi9BUN/rbXN AnGxhp/xg3DB5Z/uptgf/kom5UAbquTSpxT8HPW+FB0VuoBmjfJ+GfQECugBK4NCHYPg Gs8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="mv/IQMFC"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i10si5808273pfr.130.2019.08.16.21.11.00; Fri, 16 Aug 2019 21:11:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="mv/IQMFC"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726075AbfHQEKG (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.