Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1215497pxj; Fri, 21 May 2021 08:58:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyzCffBOwQYxEmPpkowq1fHWgzJIBnhqEU2JzfMxgyDM0xtqLmKl+CW/fBxKEQ/xMpTz33 X-Received: by 2002:a92:c951:: with SMTP id i17mr12143186ilq.198.1621612701132; Fri, 21 May 2021 08:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621612701; cv=none; d=google.com; s=arc-20160816; b=QNTkIAxQIK84MgmEUQ4djau9DRkOX09FbADIOF8ScNWf/7X4VuxwzYgypbyoHPfsMK i6AyWVUnJBVVZyF4JCK25crhmgBoG80JjoIhZ6hsjgFoOlnuCaIfxn7VLtfl3iephpDg eOSNL29QcPMTWKcQ41zUY0FzybfF6oJ3/Kqajw0F3MZzXfjfNX8lETB6GcK7lVxM/klF endFnby/VaUGCYCxeuFyg6XICuzNKEDqlqOnXJ7GIEV0afNoB7SasvDcghxMvAPucKFA 0ECThsMlT3Q+INPWW/5/wh56rq0/QunnKMOFTJ7CuWSAL0tpbEOkYzZ2gCsZKL56LMKe REgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Hahd3sJXjUgbQKssP+efhi1/PrDATemEHuhR+XCl+SA=; b=mTLxbSqPDOWnsQe2RRF4eDiYUd86f0RA5Q+E53Tj1OGMNFl2h7+RgsImpES7em0zYl 3byuyCVix4mArDILfBfd/T0UThSuRj+vS8gd8UVabuskUYhEU8sy/AfzCtkC+zTkWo10 15uGca3cGehpzO1aNwPybtP1zvGj57hUbVnrPT/xP6tgSrerq297YP5x8/hMSt51ogi7 d0YJvxnUeso8N9/zl4oPXRsQj9yqUWV9Pn8To1QCq5nN/GElauDLreKynhcwKLa6VE7e FhrorgoGbPkyI5mfuUFj5gqbpMKXreFYooIBTzmZO/gIfKChPurn65EnEDdlf/MRXlmm HkRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="ll54Kt+/"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si5513082ioj.76.2021.05.21.08.58.08; Fri, 21 May 2021 08:58:21 -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=@ti.com header.s=ti-com-17Q1 header.b="ll54Kt+/"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234516AbhETRFe (ORCPT + 99 others); Thu, 20 May 2021 13:05:34 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:46356 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234386AbhETRFd (ORCPT ); Thu, 20 May 2021 13:05:33 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 14KH4A59061988; Thu, 20 May 2021 12:04:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1621530250; bh=Hahd3sJXjUgbQKssP+efhi1/PrDATemEHuhR+XCl+SA=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=ll54Kt+/1sM8XptacJI2fGaMqjqQ6sDSsFszlSQr1cskjDxgt8m5sw9Ni4Y96v1OI R6M69OCEIkPG4jXcUFlTJaY8alqaunzKotc8OArubdgGrdB7aov0OOwQZEYJvFLL4Y VVL6bsyNwAirEGU8llEJj4Xqwu3HSB6+rjTuAjCE= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 14KH4A3V004928 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 20 May 2021 12:04:10 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 20 May 2021 12:04:09 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Thu, 20 May 2021 12:04:10 -0500 Received: from [10.250.235.117] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 14KH44Wk078148; Thu, 20 May 2021 12:04:05 -0500 Subject: Re: [PATCH] dt-bindings: gpio: gpio-davinci: Convert to json-schema To: Rob Herring CC: Vignesh Raghavendra , Lokesh Vutla , Grygorii Strashko , Kishon Vijay Abraham I , Linus Walleij , Bartosz Golaszewski , Keerthy , "open list:GPIO SUBSYSTEM" , , "linux-kernel@vger.kernel.org" References: <20210511090122.6995-1-a-govindraju@ti.com> <20210517221513.GA3263368@robh.at.kernel.org> From: Aswath Govindraju Message-ID: <50d6dea2-f35d-d620-a8f2-29ad97365119@ti.com> Date: Thu, 20 May 2021 22:34:03 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 20/05/21 10:11 pm, Rob Herring wrote: > 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. Thank you. I will put an cap on this number based on the existing device trees. > >>>> + >>>> + "#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? > Yes, one combined interrupt per bank and there can be multiple banks per gpio instance. Thanks, Aswath