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=-6.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 77684C432C0 for ; Wed, 27 Nov 2019 20:24:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36077207DD for ; Wed, 27 Nov 2019 20:24:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Q8xCo+Zb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727192AbfK0UYV (ORCPT ); Wed, 27 Nov 2019 15:24:21 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:43695 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726703AbfK0UYU (ORCPT ); Wed, 27 Nov 2019 15:24:20 -0500 Received: by mail-ot1-f67.google.com with SMTP id l14so20227061oti.10; Wed, 27 Nov 2019 12:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MixxgPNvg3pUnry2JzNoXYx2kY3tKkdeMgXAkzkyNYs=; b=Q8xCo+ZbqsfjOgoXWTnHWNvKIjvPEEcwP+yXEBzmj2ekJJlDCBa94VFtCAGp2f+bzq elQN5VZ0Q6MrI3M85kFAM7EcRpIT6dOyhTlaodtLBSugf0KJru8davD/6imekZuJmkNx PKcyk5pw+9Yw45suj7kCI5epoouGLLTi0kYP0fey25mulV3BNtcIR6WKxFwJiFpSvh39 r+fZZtaHTh8Vqg56FBTN6g91jdzGaHCpToEq7ANGcvTUaONmosJTjEnzZ0amMb7T/Dfh 2sMqDroQQ4rqoAnUrp4pRzTkVcUnPo3MZ6ZYkFQ/jv9nMvj+GO/NOi53qfubSe832egJ s8hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MixxgPNvg3pUnry2JzNoXYx2kY3tKkdeMgXAkzkyNYs=; b=a0VItJa3X0pfxxUXygSTuVIzLf+Jj1Ay9e7FNkFGehThv21Ac1QcAL0TgBFNrMKmav 76BK+Ug/xqscFobx0z5J4N8o0c1Qp64bMbAFjtfbCUBsbGSO47Nsg/f/xNGPRyxgpiVC LdKTDGXfnB8+OiMsUtO2OQkSKNtSOOklxfWoE5MCVCH2v6Ju2EbZRTVqPWJHSo0qhhoV 9ibM5I5NzvPvQ8stHX2KVQ5S336wB5gi3kXR1dBQcXOOWKTluRLcTtA/uY8kA5b3cB3A IUZChD2dcYWYyJxnxE9FFuJPQwYELakbrdDle8kTr5JQ1aMHMtYhrln5MdxemGLT8SJX U25g== X-Gm-Message-State: APjAAAWFvwoHQdx1EOs+H00bN/xGUtlX3cTzNYxPbu3gyAI6BxPN4N/R Cy9gWWNYkmuTbICHGNGpWpdzpMH8htGFV8DmPpw= X-Google-Smtp-Source: APXvYqzQ//Ez72MjlZ6tnpozQgzvE/hhO0Vn1XVq9GxyZPcPEL2qouYxRSGFV+mE8Gods9QDh7e/ODo46N4kJh7VLCE= X-Received: by 2002:a9d:6acf:: with SMTP id m15mr5155723otq.312.1574886258682; Wed, 27 Nov 2019 12:24:18 -0800 (PST) MIME-Version: 1.0 References: <20191127052935.1719897-1-anarsoul@gmail.com> <20191127052935.1719897-3-anarsoul@gmail.com> <20191127174434.wousbqosmm5vxcsu@gilmour.lan> In-Reply-To: <20191127174434.wousbqosmm5vxcsu@gilmour.lan> From: Vasily Khoruzhick Date: Wed, 27 Nov 2019 12:23:53 -0800 Message-ID: Subject: Re: [PATCH v6 2/7] dt-bindings: thermal: add YAML schema for sun8i-thermal driver bindings To: Maxime Ripard Cc: Yangtao Li , Zhang Rui , Eduardo Valentin , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Chen-Yu Tsai , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , Linux PM , devicetree , arm-linux , =?UTF-8?Q?Ond=C5=99ej_Jirman?= , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 27, 2019 at 9:44 AM Maxime Ripard wrote: > > Hi, > > On Tue, Nov 26, 2019 at 09:29:30PM -0800, Vasily Khoruzhick wrote: > > From: Yangtao Li > > > > sun8i-thermal driver supports thermal sensor in wide range of Allwinner > > SoCs. Add YAML schema for its bindings. > > > > Signed-off-by: Yangtao Li > > Signed-off-by: Vasily Khoruzhick > > --- > > .../thermal/allwinner,sun8i-a83t-ths.yaml | 103 ++++++++++++++++++ > > 1 file changed, 103 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml > > > > diff --git a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml > > new file mode 100644 > > index 000000000000..e622f0a4be90 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml > > @@ -0,0 +1,103 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Allwinner SUN8I Thermal Controller Device Tree Bindings > > + > > +maintainers: > > + - Yangtao Li > > + > > +properties: > > + compatible: > > + oneOf: > > + - const: allwinner,sun8i-a83t-ths > > + - const: allwinner,sun8i-h3-ths > > + - const: allwinner,sun8i-r40-ths > > + - const: allwinner,sun50i-a64-ths > > + - const: allwinner,sun50i-h5-ths > > + - const: allwinner,sun50i-h6-ths > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + resets: > > + maxItems: 1 > > + > > + clocks: > > + minItems: 1 > > + maxItems: 2 > > + > > + clock-names: > > + anyOf: > > + - items: > > + - const: bus > > + - const: mod > > + - items: > > + - const: bus > > This can be: > > clock-names: > minItems: 1 > maxItems: 2 > items: > - const: bus > - const: mod > > And the length should be checked based on the compatible value, with > something like > > if: > properties: > compatible: > contains: > const: allwinner,sun50i-h6-ths > > then: > properties: > clocks: > maxItems: 1 > > clock-names: > maxItems: 1 > > else: > properties: > clocks: > maxItems: 2 > > clock-names: > maxItems: 2 OK, will do > > + > > + '#thermal-sensor-cells': > > + enum: [ 0, 1 ] > > + description: | > > + Definition depends on soc version: > > + > > + For "allwinner,sun8i-h3-ths", > > + value must be 0. > > + For all other compatibles > > + value must be 1. > > This should be checked using an if as well. Will do. > > + > > + nvmem-cells: > > + maxItems: 1 > > + items: > > + - description: Calibration data for thermal sensors > > You can drop the items and just move the description up one level, > under nvmem-cells Will do. > > + > > + nvmem-cell-names: > > + items: > > + - const: calibration > > Ditto for the const Sorry, I don't quite get it. What exactly do you want me to do with this one? nvmem-cell-names must be "calibration" > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - '#thermal-sensor-cells' > > Whether clocks, clock-names and resets are thereshould be check using > an if statement as well. Will do > > + > > +examples: > > + - | > > + ths_a83t: ths@1f04000 { > > You don't need the label at all, and the node name should be > temperature-sensor according to the DT spec, not ths. This applies to > all you examples. OK > > + compatible = "allwinner,sun8i-a83t-ths"; > > + reg = <0x01f04000 0x100>; > > + interrupts = <0 31 0>; > > + nvmem-cells = <&ths_calibration>; > > + nvmem-cell-names = "calibration"; > > + #thermal-sensor-cells = <1>; > > + }; > > New line. OK > > Thanks! > Maxime 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=-6.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 43C0AC432C0 for ; Wed, 27 Nov 2019 20:24:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFD5F207DD for ; Wed, 27 Nov 2019 20:24:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZasQgcYN"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Q8xCo+Zb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFD5F207DD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UNIok3tI+0jbT5nkemWbHv1NgWyPtFZnwGZvqRITuNw=; b=ZasQgcYN9GHlU8 6i5NtyKi7SDwDabClfaoAc6fWVu5Rgkx564G0oZf9c+OyKCI0wZxqwpJi9djyO0fJRixE1gfdZLJc fcJNpFNhTbThUbhkQ8P8VGG6208hLevEbnhSguKyuWddTFE38DFZ/OiuvFKW8l76fBIwOjOCJyasR f1BLDICUzrQeRO58012sutBT0/HPkJY3Q1kqnvYRutiDb0+SPHMX0SJvsGm+Na/yc1EWAsG1r1kCh JNFnO/Cwl2gUc7NKUQLK016KjJjH8Lp3Wvw3PcyrQH1WFTof9dExwzkMy3QxhD1DR8Sv2pyp27VhA EYVwMmo4njzvxtVeyZ7g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ia3rK-0007Hx-KV; Wed, 27 Nov 2019 20:24:22 +0000 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ia3rH-0007HV-OP for linux-arm-kernel@lists.infradead.org; Wed, 27 Nov 2019 20:24:21 +0000 Received: by mail-ot1-x343.google.com with SMTP id z25so20264769oti.5 for ; Wed, 27 Nov 2019 12:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MixxgPNvg3pUnry2JzNoXYx2kY3tKkdeMgXAkzkyNYs=; b=Q8xCo+ZbqsfjOgoXWTnHWNvKIjvPEEcwP+yXEBzmj2ekJJlDCBa94VFtCAGp2f+bzq elQN5VZ0Q6MrI3M85kFAM7EcRpIT6dOyhTlaodtLBSugf0KJru8davD/6imekZuJmkNx PKcyk5pw+9Yw45suj7kCI5epoouGLLTi0kYP0fey25mulV3BNtcIR6WKxFwJiFpSvh39 r+fZZtaHTh8Vqg56FBTN6g91jdzGaHCpToEq7ANGcvTUaONmosJTjEnzZ0amMb7T/Dfh 2sMqDroQQ4rqoAnUrp4pRzTkVcUnPo3MZ6ZYkFQ/jv9nMvj+GO/NOi53qfubSe832egJ s8hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MixxgPNvg3pUnry2JzNoXYx2kY3tKkdeMgXAkzkyNYs=; b=d38Fw47aMu4/nP5OvEn0C0pv28N35vEnp8djkRRbimdZNaZ8jYdITEn2EG34GbUt/4 ObporFw1HMiUUxYIqzFtNs21buoUHiqTIuvvBlyyVCXBGXrmzx15mipvOKz0EdwPj+DA UG+0y5Btrr6mEtZxXLw0wM65/iGQou3tgYB5kj7UBOqLGExjClr9tj4g8+EgKFxdON9c kH3FvSiZe0eJT1gdh7eX3wHh1+jyJBU5FMv+PLmYotB8k05RMKvCKMd16cBc31YlbKth wUuK7MYtZMt+BI69XMFowHHkP5ouK4S8ADwxrInbcBKtAu42uo90krXC0v64Xc411FXw KQeg== X-Gm-Message-State: APjAAAUUqzldPa98PziyB6Aa5ObKLiUOmLJDvR8XMsbufTF8tfyyFfjz AX6O4G88kWZyKMEE5m1ccmuyrpGe+wNLAhJjSpg= X-Google-Smtp-Source: APXvYqzQ//Ez72MjlZ6tnpozQgzvE/hhO0Vn1XVq9GxyZPcPEL2qouYxRSGFV+mE8Gods9QDh7e/ODo46N4kJh7VLCE= X-Received: by 2002:a9d:6acf:: with SMTP id m15mr5155723otq.312.1574886258682; Wed, 27 Nov 2019 12:24:18 -0800 (PST) MIME-Version: 1.0 References: <20191127052935.1719897-1-anarsoul@gmail.com> <20191127052935.1719897-3-anarsoul@gmail.com> <20191127174434.wousbqosmm5vxcsu@gilmour.lan> In-Reply-To: <20191127174434.wousbqosmm5vxcsu@gilmour.lan> From: Vasily Khoruzhick Date: Wed, 27 Nov 2019 12:23:53 -0800 Message-ID: Subject: Re: [PATCH v6 2/7] dt-bindings: thermal: add YAML schema for sun8i-thermal driver bindings To: Maxime Ripard X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191127_122419_823310_484F28F7 X-CRM114-Status: GOOD ( 22.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree , Amit Kucheria , Linux PM , Yangtao Li , Greg Kroah-Hartman , Daniel Lezcano , linux-kernel , Eduardo Valentin , Chen-Yu Tsai , Rob Herring , Mauro Carvalho Chehab , Zhang Rui , =?UTF-8?Q?Ond=C5=99ej_Jirman?= , "David S. Miller" , arm-linux Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Nov 27, 2019 at 9:44 AM Maxime Ripard wrote: > > Hi, > > On Tue, Nov 26, 2019 at 09:29:30PM -0800, Vasily Khoruzhick wrote: > > From: Yangtao Li > > > > sun8i-thermal driver supports thermal sensor in wide range of Allwinner > > SoCs. Add YAML schema for its bindings. > > > > Signed-off-by: Yangtao Li > > Signed-off-by: Vasily Khoruzhick > > --- > > .../thermal/allwinner,sun8i-a83t-ths.yaml | 103 ++++++++++++++++++ > > 1 file changed, 103 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml > > > > diff --git a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml > > new file mode 100644 > > index 000000000000..e622f0a4be90 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml > > @@ -0,0 +1,103 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Allwinner SUN8I Thermal Controller Device Tree Bindings > > + > > +maintainers: > > + - Yangtao Li > > + > > +properties: > > + compatible: > > + oneOf: > > + - const: allwinner,sun8i-a83t-ths > > + - const: allwinner,sun8i-h3-ths > > + - const: allwinner,sun8i-r40-ths > > + - const: allwinner,sun50i-a64-ths > > + - const: allwinner,sun50i-h5-ths > > + - const: allwinner,sun50i-h6-ths > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + resets: > > + maxItems: 1 > > + > > + clocks: > > + minItems: 1 > > + maxItems: 2 > > + > > + clock-names: > > + anyOf: > > + - items: > > + - const: bus > > + - const: mod > > + - items: > > + - const: bus > > This can be: > > clock-names: > minItems: 1 > maxItems: 2 > items: > - const: bus > - const: mod > > And the length should be checked based on the compatible value, with > something like > > if: > properties: > compatible: > contains: > const: allwinner,sun50i-h6-ths > > then: > properties: > clocks: > maxItems: 1 > > clock-names: > maxItems: 1 > > else: > properties: > clocks: > maxItems: 2 > > clock-names: > maxItems: 2 OK, will do > > + > > + '#thermal-sensor-cells': > > + enum: [ 0, 1 ] > > + description: | > > + Definition depends on soc version: > > + > > + For "allwinner,sun8i-h3-ths", > > + value must be 0. > > + For all other compatibles > > + value must be 1. > > This should be checked using an if as well. Will do. > > + > > + nvmem-cells: > > + maxItems: 1 > > + items: > > + - description: Calibration data for thermal sensors > > You can drop the items and just move the description up one level, > under nvmem-cells Will do. > > + > > + nvmem-cell-names: > > + items: > > + - const: calibration > > Ditto for the const Sorry, I don't quite get it. What exactly do you want me to do with this one? nvmem-cell-names must be "calibration" > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - '#thermal-sensor-cells' > > Whether clocks, clock-names and resets are thereshould be check using > an if statement as well. Will do > > + > > +examples: > > + - | > > + ths_a83t: ths@1f04000 { > > You don't need the label at all, and the node name should be > temperature-sensor according to the DT spec, not ths. This applies to > all you examples. OK > > + compatible = "allwinner,sun8i-a83t-ths"; > > + reg = <0x01f04000 0x100>; > > + interrupts = <0 31 0>; > > + nvmem-cells = <&ths_calibration>; > > + nvmem-cell-names = "calibration"; > > + #thermal-sensor-cells = <1>; > > + }; > > New line. OK > > Thanks! > Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel