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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F53BC433EF for ; Thu, 24 Mar 2022 13:56:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 53D5A10E8C2; Thu, 24 Mar 2022 13:56:29 +0000 (UTC) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id 822D710E8C2 for ; Thu, 24 Mar 2022 13:56:28 +0000 (UTC) Received: by mail-ot1-f53.google.com with SMTP id z9-20020a05683020c900b005b22bf41872so3316969otq.13 for ; Thu, 24 Mar 2022 06:56:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3hu2/w4zk2LRja1m6kxbb1AV3tlPT/cRATwQnTQCk3g=; b=6H1P9d3ZWBcAb6CkWEIDwTwEmxXR9tKOf+d4hs4bxKGLSNy14ip3wtJ9g0mBF1ZWy8 KakqmMij3GTMHJE9CNcG94O+xfNSbHuaIf2ZQ5ydiexv3VXddCdqA44lwfeRPkN75M2e v7d+L5G+emdEKeWgPeaA7HaeEA/KLZ20+OohuA+YzBK12GxIq9KDzPiz4gDQdUCz81Z8 p79c8p3F//Cz20tq6d7CZ3nhDNxo6Gt9ygN+OXmSwRVGgMty7D7HAxkhEit+P2kNh0N1 78z58nt2/g3LmDqQXZJ1Pp4LMUWA2WEighz+/Y/jAJvlqMkuyRgvW7K7Uq61J6Je6X9N DeuQ== X-Gm-Message-State: AOAM531Nmm/f1zCkZDM0bjAjdh+B0oLDMxv8mhSHJ1nq39Y5d1I97qX8 0T3nwGzjReTPbbx82dA2LQ== X-Google-Smtp-Source: ABdhPJzA6saZCLeJ/O7iPhpz9VqLML3Yhcc/Zlf/qqvBPu2YEFRUzp5i2fzD5+VZxAbgM6rJADtQoA== X-Received: by 2002:a9d:5a07:0:b0:5cd:afdb:b0da with SMTP id v7-20020a9d5a07000000b005cdafdbb0damr2127434oth.188.1648130187606; Thu, 24 Mar 2022 06:56:27 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id j145-20020acaeb97000000b002d9f37166c1sm1409446oih.17.2022.03.24.06.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 06:56:26 -0700 (PDT) Received: (nullmailer pid 1960215 invoked by uid 1000); Thu, 24 Mar 2022 13:56:25 -0000 Date: Thu, 24 Mar 2022 08:56:25 -0500 From: Rob Herring To: Sui Jingfeng <15330273260@189.cn> Subject: Re: [PATCH v11 7/7] drm/lsdc: add drm driver for loongson display controller Message-ID: References: <20220321162916.1116541-1-15330273260@189.cn> <20220321162916.1116541-8-15330273260@189.cn> <2aa26f44-38aa-4b3c-ccc3-0956a2ab5d77@189.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2aa26f44-38aa-4b3c-ccc3-0956a2ab5d77@189.cn> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Qing Zhang , Thomas Bogendoerfer , suijingfeng , kernel test robot , David Airlie , dri-devel@lists.freedesktop.org, Roland Scheidegger , linux-kernel@vger.kernel.org, Jiaxun Yang , linux-mips@vger.kernel.org, Andrey Zhizhikin , Krzysztof Kozlowski , Thomas Zimmermann , Sam Ravnborg , "David S . Miller" , Dan Carpenter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Mar 24, 2022 at 03:32:01PM +0800, Sui Jingfeng wrote: > > On 2022/3/23 04:49, Rob Herring wrote: > > > + } > > > + > > > + spin_lock_init(&li2c->reglock); > > > + > > > + snprintf(compat, sizeof(compat), "lsdc,i2c-gpio-%d", index); > > compatible values shouldn't have an index and you shouldn't need a > > index in DT. You need to iterate over child nodes with matching > > compatible. > > Why compatible values shouldn't have an index, does devicetree > specification prohibit this? [1] Probably not explicitly, but that's fundamentally not how compatible works. 'compatible' defines WHAT the device is, not WHICH device and that is used for matching devices to drivers. Drivers work on multiple instances. > The recommended format is "manufacturer,model", where manufacturer is a string describing the name > of the manufacturer (such as a stock ticker symbol), and model specifies the model number. [1] I don't see anything saying to put the instance in there, do you? > > [1] https://www.devicetree.org/specifications/ >