Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4525692rwb; Tue, 6 Sep 2022 08:41:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR4jfEO8PYXe1yBnRVX0LT0jC1liB2PHG/hPNkLtIpwUCtztgXFm7UQQQ4bTIEGzOvP3LmVb X-Received: by 2002:a17:902:d4c9:b0:176:e21b:ab60 with SMTP id o9-20020a170902d4c900b00176e21bab60mr354187plg.9.1662478916389; Tue, 06 Sep 2022 08:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662478916; cv=none; d=google.com; s=arc-20160816; b=f0acnr6XIbhpvGYEVfEayg4F6pFM7nT2IPcURYae868ayFQequDDac+9t6fZI+1CTz zKRNdqTHVWui0ReE//96IN+nU1HhWidAwrhI4KAu/85Bast5fP7qf8JGBA3eh+bHCpHH xyKsxEbWIbHn4chLORnguOpr32A3qAnPnni/UmaCPhiNH25WVCVqZVidKMTQhunAywW+ J/+/vyiuaoudtzwO+SEyHlIqoG2ovWdIrwaMLy5X6trUOYIjX4KZeoNl2m4mwY5j4DYQ sTsYhyKb9OrcHg2z0/M4DUS70KSDNK51QwtkcM7u3/vwVHm+gRkLhzhrs5xs+htEMfcT 1/fQ== 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=YG81fsrgVvtbiqNYNBZnqjl/kHiLEsWdD0wbROrMHQI=; b=FCMIVL8dl1wKosxar+W0cdpTsTTeydHRC/o/xqCzICmEA7Oe3Nx6Yee+v19yERWx2S IteynuKfNZNcrcA2mMtIUAVmxu1CthNNIkFX/B5Es5DQY1ACj/baqCeazeGa3rBczvP8 YcrxLk5/oE5LNZZqqYCK4eeSqi1jZxiqrBmLijFkA4Tqbqn43yx9SGlheuv2Lo+pimLE 8/v8CB5E4UxSJfyD3sL3XrhPJ1IeRKmapT8+kv13w+9+A3pVb6saTHR93r6YpMtf7Hjz 6q7RCXyBnsJWKDVQeMezzqVWEkAJrYQuAW1elaycmIQOePCwjtuEQIXkIdNho+56uUeg AnhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CM2gzKkG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u18-20020a17090341d200b00172883f5a2asi14356877ple.624.2022.09.06.08.41.45; Tue, 06 Sep 2022 08:41:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CM2gzKkG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240683AbiIFNgA (ORCPT + 99 others); Tue, 6 Sep 2022 09:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240681AbiIFNfS (ORCPT ); Tue, 6 Sep 2022 09:35:18 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1940875FD2 for ; Tue, 6 Sep 2022 06:33:48 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id fg1so1181478ejc.2 for ; Tue, 06 Sep 2022 06:33:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=YG81fsrgVvtbiqNYNBZnqjl/kHiLEsWdD0wbROrMHQI=; b=CM2gzKkGrZAirkis7zZWySHvo3koLz+Flptuhq4k+FAbtvqnjCVv8lFcFCyLc0EnU5 gUv5rzrNgm3Ofu4x2a0ATbiZ/KaHh7xnWWMrKnRQb9SAkns6X0kRhKarftovu5cGYKZk /8KT61ZTXg4XzZTUy0iff3or9U2KP84m2hh1lDqgnmKjf18geSSoF/MU4lVMsNx/Mgc/ m14jTtEK9FRMPrvNJ98E8sCC998TkQQ+iD2Y/LpaVQ6EELbjK1n+kY/3oIojdR5NwfjO ecPVAAUdkKW2wGzbck1q+GsQCnPC483nqohQztM8nt/eUWbT5EdZwhPWrSmU9evTDc/c P9SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=YG81fsrgVvtbiqNYNBZnqjl/kHiLEsWdD0wbROrMHQI=; b=NKE2Pv/iUQJDnbOQcvTZPtoiptjHBCi3ttyK+S1LAsWqtXz0fzyMrl7gfjWozYQJ78 kwcaewWQPt7I7JQwdOaKxHu4a1lmTU1XVuhcAYIvtrhNHp68XnSb4b/KaHvxPXNEhDyO jN+6Cd/3stZv5iDSYBFaOb/VXDR/gdwNKPEtk/veq8U6H1KAVNOWgE3UotvleaGzWKbO FKZ/donmYWgKY+ygEJDVrehVKZfS2qjnN5xjK1RkfCDvRy+3bUnRwjH4XlWSj+49LEe7 5HJf3lutmIhdok0eszr08qL43DNv/mmGMHAP3Xs0bvSKc0fy5vx30X0ut/xZ1iMYzBEk mGSQ== X-Gm-Message-State: ACgBeo3s2lR3LT3O6ixRt0itlgPls3K90LtEOWCOXHOXmm52rG1uE3QE gVteiL/F6dlH8TjmCK15MBDqLVPM3LM6d27xlFj7vA== X-Received: by 2002:a17:907:a420:b0:765:70a4:c101 with SMTP id sg32-20020a170907a42000b0076570a4c101mr9117964ejc.526.1662471226679; Tue, 06 Sep 2022 06:33:46 -0700 (PDT) MIME-Version: 1.0 References: <20220906082820.4030401-1-martyn.welch@collabora.co.uk> <20220906082820.4030401-2-martyn.welch@collabora.co.uk> In-Reply-To: From: Linus Walleij Date: Tue, 6 Sep 2022 15:33:34 +0200 Message-ID: Subject: Re: [PATCH v2 2/5] dt-bindings: gpio: pca95xx: add entry for pcal6534 and PI4IOE5V6534Q To: Andy Shevchenko Cc: Martyn Welch , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Martyn Welch , Krzysztof Kozlowski , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 6, 2022 at 3:20 PM Andy Shevchenko wrote: > On Tue, Sep 06, 2022 at 03:08:00PM +0200, Linus Walleij wrote: > > On Tue, Sep 6, 2022 at 2:19 PM Andy Shevchenko > > wrote: > > > On Tue, Sep 06, 2022 at 09:28:16AM +0100, Martyn Welch wrote: > > > > From: Martyn Welch > > > > > > > > The NXP PCAL6534 is a 34-bit I2C I/O expander similar to the PCAL6524. The > > > > Diodes PI4IOE5V6534Q is a functionally identical chip provided by Diodes > > > > Inc. > > > > > > ... > > > > > > > + oneOf: > > > > + - items: > > > > + - const: diodes,pi4ioe5v6534q > > > > + - const: nxp,pcal6534 > > > > > > ^^^ > > > > > > > + - items: > > > > + - enum: > > > > > > > + - nxp,pcal6534 > > > > > > ^^^ > > > > > > Not sure why is this dup? > > > > No that is how DT compatibles work. One version of the component, > > bought from NXP will look like this: > > > > compatible = "nxp,pcal6534"; > > > > Another version bought from diodes will look like this: > > > > compatible = "diodes,pi4ioe5v6534q", "nxp,pcal6534"; > > > > Then the drivers are probed matching from left to right, > > with the "most compatible" matching first. > > > > This also answers your question on the implementation. > > Then I don't understand why the const list above is only for new chips > and not for the old one where the same can be applied. That's YAML. It's because the const list is the most compact way to express two precise items following after each other, and the enum list is an implicit list of single-item const:s, as you cannot enum tuples. > Mysterious ways of DT... It's not DT, it's YAML that is mysterious. DT itself is a pretty straight-forward grammar, while YAML is a meta-grammar describing the DT grammar (ML stands for Meta Language). All meta languages are mysterious. Yours, Linus Walleij