Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1201144pxj; Fri, 21 May 2021 08:39:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypmDbVKTh8bQ7L2OXzwbvHiViiF6D43MC+wZHlli+fTT+xJnBYhUikm4GO3Lr/aJWTEXsH X-Received: by 2002:a92:6804:: with SMTP id d4mr12576694ilc.5.1621611555346; Fri, 21 May 2021 08:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621611555; cv=none; d=google.com; s=arc-20160816; b=grFrfn+7r3H8mvo4jUfda5ub7UwzkdwbA5jboZ4c9/cUBPVB7RtjCE2ZLjI3z+6eTj OMA1IKaa9hG0K5q9Wad4u2aJHCh9bY02lKq9Y39jrsOltUpy3CIBWBmyUfRKNCRu/Tq6 Zgy2BCHNyFEp7qHtXH08ii9n8EIWxR3t+X2OxOdLSXLbe20Cu3QsAHKUHb+ZNebFNX+A ji/jsylqauWw/yYwmqBphOYFfH4WlfUzSqSmTHs7id1VtwPTGi+B1zYKY/yWH9xNTq9V CQ0udrLe4w9w6hMK4prwtBb/iDH3ZjfoSbkKePvWM2DffLV8QZYmCBd3GCSNoxjsMNED /Dkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WYeE6MJivkcWmEpYNQ79SmK5uwU+IPkW59j/ka/BMaU=; b=fTBDFkUOMErJYPLKMRyxSSojKe3ZqXLXROesGcNXVYp6ecQN8MCKiQOHQYkFD3oBew 7aRqmKRFvLBag1pfJlnDflqRjFm1tYEUK5843LaeuEJYcFl1EiKzYWG7dJvUqtGrYBAa jZ7ukSoq5MTUBvBtellqLJvCiiFNS/UwS3PhJMQahwxmz7i2mQgfH8I8pOutTYU8HFcc L+rh0GHBKg17km/Yzvr/73UcfJHyDm6mIvVzz2+80fJbGrOnKNf6J9Q3JKMuQm0JrbWL I8AcilVNZyJRkC1l0NMuTxdY72e6dAN/YyZrw6T/6+Q4JTusuO0SeFFf9tuV8tu/4UXF +RZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fi2TL2WZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id p8si5782653ils.114.2021.05.21.08.39.02; Fri, 21 May 2021 08:39:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fi2TL2WZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S234114AbhETQmn (ORCPT + 99 others); Thu, 20 May 2021 12:42:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:39864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232796AbhETQmm (ORCPT ); Thu, 20 May 2021 12:42:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5C3AF61019; Thu, 20 May 2021 16:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621528881; bh=awSiHVeGzJRRHkeF4CGvWgRsRaK/KjYATUm/abbBIIc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Fi2TL2WZCTo1uvMAEA9rSm5JD213/Ei7uNCAJHL8SRqDbEP49pI++0Clls5LR3/Q1 4udZS4786wBjfgzZMwLktVrRYPi7FAjfr/1ncvX6uVOd01B8mfNT3X/QDh9KndeljF Q1QNDeiFQxFGIK+3uPJ1yXhgeG4pteTt4nPgfIGNvOwkGXbBQcDUS5TWOBrzk0TQsB pj0gpCnbWw1JUrY0FOGZ1dKQ9pG/OKpbU8wwzn8/4kE2wh4C0p0OxCHsQ9TY+X4TUA 872xohX/ATEO0eI8xZcXt+mMciUR5oj0NWX0szkHW364EcbI91tmgrJy+3J8E6G45X +bjuyZoYPX3Vg== Received: by mail-ed1-f54.google.com with SMTP id w12so12425845edx.1; Thu, 20 May 2021 09:41:21 -0700 (PDT) X-Gm-Message-State: AOAM530R1d+4/+yx1yFLHX1LAcHmRbch+1bAZUj9T64iOWUDlm2pcwFr fKdRixiOuWst25qUhdBiqwHOt/Rl13Dh4Vmkdw== X-Received: by 2002:a05:6402:c7:: with SMTP id i7mr6095866edu.194.1621528879987; Thu, 20 May 2021 09:41:19 -0700 (PDT) MIME-Version: 1.0 References: <20210511090122.6995-1-a-govindraju@ti.com> <20210517221513.GA3263368@robh.at.kernel.org> In-Reply-To: From: Rob Herring Date: Thu, 20 May 2021 11:41:07 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] dt-bindings: gpio: gpio-davinci: Convert to json-schema To: Aswath Govindraju Cc: Vignesh Raghavendra , Lokesh Vutla , Grygorii Strashko , Kishon Vijay Abraham I , Linus Walleij , Bartosz Golaszewski , Keerthy , "open list:GPIO SUBSYSTEM" , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 18, 2021 at 9:13 AM Aswath Govindraju wrote: > > > Hi Rob, > > On 18/05/21 3:45 am, Rob Herring wrote: > > On Tue, May 11, 2021 at 02:31:20PM +0530, Aswath Govindraju wrote: > >> Convert gpio-davinci dt-binding documentation from txt to yaml format. > >> > >> Signed-off-by: Aswath Govindraju > >> --- > >> .../devicetree/bindings/gpio/gpio-davinci.txt | 167 --------------- > >> .../bindings/gpio/gpio-davinci.yaml | 193 ++++++++++++++++++ > >> MAINTAINERS | 2 +- > >> 3 files changed, 194 insertions(+), 168 deletions(-) > >> delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-davinci.txt > >> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-davinci.yaml > >> > > [...] > > >> +properties: > >> + compatible: > >> + oneOf: > >> + - items: > >> + - enum: > >> + - ti,k2g-gpio > >> + - ti,am654-gpio > >> + - ti,j721e-gpio > >> + - ti,am64-gpio > >> + - const: ti,keystone-gpio > >> + > >> + - items: > >> + - const: ti,dm6441-gpio > >> + - items: > >> + - const: ti,keystone-gpio > > > > These 2 can be expressed as an 'enum'. > > I will change this. > > > > >> + > >> + reg: > >> + maxItems: 1 > >> + description: > >> + Physical base address of the controller and the size of memory mapped registers. > > > > Drop. That's every 'reg' property. > > > > I'll drop this. > > >> + > >> + gpio-controller: true > >> + > >> + gpio-ranges: true > >> + > >> + gpio-line-names: > >> + description: strings describing the names of each gpio line. > > > > Any constraints like min/max number of lines? > > > > The max number of lines will be equal to ti,ngpio. Is there any way to > equate maxItems to the a property value in json schema ? There have been discussions about something like that for json-schema, but nothing yet AFAIK. Is there a max for ti,ngpio? Nothing means 2^32. Surely there's something less than that. You can always adjust the max later. > >> + > >> + "#gpio-cells": > >> + const: 2 > >> + description: > >> + first cell is the pin number and second cell is used to specify optional parameters (unused). > >> + > >> + interrupts: > >> + description: > >> + Array of GPIO interrupt number. Only banked or unbanked IRQs are supported at a time. > > > > Needs constraints. How many items and what are they? > > Here also the maximum number of interrupts is equal to ti,ngpio in > unbanked interrupts case. Same as above is there anyway to equate > maxItems to ti,ngpio property in json schma ? If not, then what would be > the best way to handle this ? Banked means 1 combined interrupt?