Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp473916pxb; Wed, 3 Nov 2021 07:18:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSj4eYeUgzUsJa+EO9hDoX3yrhQmhrG+m5yZEvURnzR6CASTDgnkFUP2Us9NKj/e9LAVqm X-Received: by 2002:a17:906:2599:: with SMTP id m25mr56019725ejb.302.1635949105111; Wed, 03 Nov 2021 07:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635949105; cv=none; d=google.com; s=arc-20160816; b=elzzEd0rbP8jUUoyc2ZOXVp7xgCDgfvM453MZpSLdChPA5NZGuLCaBp6EuhAjlQvT9 gx9xzDdcVeaodJzsD5kJO9Xe0/hst06gwnW6/CisZCpIKJ5YlIyTMdOlDbYyS1V6VIUl Aq6yVPdOwidDzE41uF9s9tfq/nlvLdzjE8plsihHCzlsQxd0WQtKD55+Jg2o82p1Qj2A lCuLNRkffho7X2GtUd5qqJArGD6MTRLzrge+jR6sYDYJmK6voKsGNf9gCAihwJve/Dn9 t2fVjt+8cSc24V7qXfPUoeannj1SYCEubP5fQWOv6/PVTSZxqp8HltYAihnOW+/1LYYB bt4Q== 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=zRF2qoGvyy7kc/ee5SOjTw+dqtJ/sa/W5oQGtQqfWEk=; b=mZvSc5X0hrWEAhWswoUw+7sO8K5Lb3Xs+8pF6mai4ADBn5SWkmDZzHlPuqB3k2rJ4a C+7QvLymjYGzwevH57SpVroRNT081LEjglM0agxTAHQlsMEJS9w9iHKmLo4VfbgHVGs2 de+sC2znDwpKPRTi2dXmgcDGKbtxsYzs38Liap+AoG61ovzbOOafDkhT33o94lU+Nimw fW1I1hY9DwwHP/QRAeT8BH3KbEuTZL5FEH2m479bE50qLFOl8yQ0xcnvMtB259wLPYjY AcU2m7lPwQ0FNEk3pQIRl3aaMDLilhBupKl/kKC6l/gJ/6W+0LmhSw3pLcOMkoac0pGn 6BCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jnXNmfzh; 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 k2si3205523edo.509.2021.11.03.07.17.57; Wed, 03 Nov 2021 07:18:25 -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=jnXNmfzh; 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 S231705AbhKCOQP (ORCPT + 99 others); Wed, 3 Nov 2021 10:16:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:37572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231393AbhKCOQO (ORCPT ); Wed, 3 Nov 2021 10:16:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F3EF5604DA; Wed, 3 Nov 2021 14:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635948818; bh=JtiUVBkjhkrls5IZYmkhfWzLdJrUAOtNRhSf6a+L2uY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jnXNmfzhYfAKsZAcftXkjCDLysLiYVP94rm9qOZsC3rAXfU9677BZ77IXB9aF7HBs uJ7gSn6Q+UEJ5+kTy6Wr5pajsTYbfaqcVoWYp9leD7UomUNAkhF7MaGGRH+eH16aOw So5uWWKU25QvvYCmNcPYKwjkPXzSu8kwxJidCMJ2QeqZaR4JukQgFnkmhtBg8oVjLI kG1CENxOfAkfFTn/N+axwUMknQ73g6qDVU/KNhHtCo//+/21fQatsODxIw2TmUQK3r 9xXSv7mNKVv8hFeHZwkQImgClvcvg96ZFZGQivGGAuJNq3pJcWKhbkc/77fGazdnxV KxobObcTAi6GQ== Received: by mail-ed1-f46.google.com with SMTP id f4so9652450edx.12; Wed, 03 Nov 2021 07:13:37 -0700 (PDT) X-Gm-Message-State: AOAM531LGoX/6VtWU6ajwspRstwJMHVy3dDuf573BMwbxaqRCdAQe21Y wE8LwFafMaSPkK5tuMVUP0rYEnCb1p6VWofhEQ== X-Received: by 2002:a17:907:980d:: with SMTP id ji13mr26759965ejc.466.1635948810946; Wed, 03 Nov 2021 07:13:30 -0700 (PDT) MIME-Version: 1.0 References: <20211101122545.3417624-1-horatiu.vultur@microchip.com> <20211101122545.3417624-2-horatiu.vultur@microchip.com> <20211101213201.wdjsuexuuinepu3m@soft-dev3-1.localhost> <20211102222757.ny4c7gdnyxm3gorw@soft-dev3-1.localhost> <087a49e0-30fe-7b09-b246-6d50e96299d1@axentia.se> In-Reply-To: <087a49e0-30fe-7b09-b246-6d50e96299d1@axentia.se> From: Rob Herring Date: Wed, 3 Nov 2021 09:13:19 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 1/2] dt-bindings: i2c-mux: Add property for settle time To: Peter Rosin Cc: Horatiu Vultur , Linux I2C , 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 Wed, Nov 3, 2021 at 6:45 AM Peter Rosin wrote: > > On 2021-11-02 23:27, Horatiu Vultur wrote: > > The 11/02/2021 13:37, Rob Herring wrote: > >> On Mon, Nov 01, 2021 at 10:32:01PM +0100, Horatiu Vultur wrote: > >>> The 11/01/2021 15:32, Peter Rosin wrote: > > *snip* > > >>> > >>> +required: > >>> + - compatible > >> > >> compatible should not be required here. > >> > >>> + - '#address-cells' > >>> + - '#size-cells' > >>> + > >>> examples: > >>> - | > >>> /* > >>> --- > >>> > >>> If I have this then my problem is with the required properties because then I > >>> start to get new warnings once I run: > >>> > >>> make ARCH=arm CROSS_COMPILE=arm-linux- dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/i2c/i2c-mux.yaml > >>> > >>> For example, one of new the warnings is this: > >>> > >>> /home/hvultur/linux/arch/arm/boot/dts/am335x-icev2.dt.yaml: mux-mii-hog: 'compatible' is a required property > >>> From schema: /home/hvultur/linux/Documentation/devicetree/bindings/i2c/i2c-mux.yaml > >>> /home/hvultur/linux/arch/arm/boot/dts/am335x-icev2.dt.yaml: mux-mii-hog: '#address-cells' is a required property > >>> From schema: /home/hvultur/linux/Documentation/devicetree/bindings/i2c/i2c-mux.yaml > >>> /home/hvultur/linux/arch/arm/boot/dts/am335x-icev2.dt.yaml: mux-mii-hog: '#size-cells' is a required property > >>> From schema: /home/hvultur/linux/Documentation/devicetree/bindings/i2c/i2c-mux.yaml There's actually a ton of 'mux' nodes that should be causing warnings too. > >> This is because of the $nodename pattern being pretty lax and matches > >> on mux-mii-hog by mistake. We have 2 options. Change the nodename > >> pattern to '^(i2c-?)?mux(@.*)?$' or add 'select: false'. The former > >> would still match on 'mux' or 'mux@.*' which might still have problems. > >> For the latter, we just need to make sure all the i2c-mux schemas have a > >> $ref to this schema. Also, with that change we'd stop checking 'i2c-mux' > >> nodes that don't yet have a specific schema. That said, I do lean toward > >> the latter option. > > > > From what I can see there are only two i2c-mux schemas and both of them > > have a $ref to this schema [1][2] > > > > [1] https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.yaml#L33 > > [2] https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml#L16 > > I'm a relative yaml bindings newbie, but I assume adding "select: false" will > have the side effect of not enforcing this i2c-mux schema on i2c-muxes that > have not yet been converted to yaml? E.g. i2c-mux-gpio.txt, i2c-mux-pinctrl.txt > etc etc. But there are not too many of those. Is it a prerequisite to update > those bindings to yaml before doing "select: false"? No. We may be losing some checks temporarily, but we've got plenty of other warnings to keep busy. And most cases in tree seem to be pca954x anyways. > Looking further I think > there's a total of about 15-20 drivers doing i2c-muxing (or arbing/gating), > and some of those exist outside the "i2c umbrella". > > I wonder if e.g. this one [1] should really reference i2c-controller.yaml as > it is currently doing, or if i2c-mux.yaml is correct? > > [1] Documentation/devicetree/bindings/power/supply/sbs,sbs-manager.yaml > > Maybe i2c-mux.yaml didn't work in that case because the node names were > "wrong" and did not match the pattern and then someone stuck > i2c-controller.yaml in there simply because that was close enough, and > also happened to work? While the device does have muxing capability, it does much more and the use is rather specific. So I think it is fine. Rob