Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp407753ybh; Thu, 12 Mar 2020 04:21:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvZfOcBn+VW42GfFkAJPtcz6XiCeL64+84H8JQT+Tx8k8StmjSrnfD5Z0I9bRldeUlsRxJf X-Received: by 2002:a9d:369:: with SMTP id 96mr5507234otv.174.1584012088090; Thu, 12 Mar 2020 04:21:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584012088; cv=none; d=google.com; s=arc-20160816; b=RmboNTcIS//iQ5dPyYl/gy1vSq8ljVslkUeVjZz9fNUnXzsbK7XpPaCXb8rmJj/GQX Kl8BJK05cFbnr0vA/9pG7Xl5mwFUKMXVm3eoRTiZCU6qC94zLU6GRoI/ObWoOhvOtWAS +PQrroPkWfJCv4NTbO+JP+r9KHA395bHXmoFJpYtqOp7uJRcfAlZaXIQJOMUM2yHQvdA I0tX42HQ77vZEOSip2I8cri64nFL4SqMKYeK6lCFG0ZwVWVL/INgenD22ExkQ+qTtk7l 14zpE/Xd3eU08ygJqOCznR5efQILl/2Ycb1E6wX2w36/WSCOIb2P8f9QmDXKmyC0SK9Y khGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=LVgU8t0MAxviHf4QRc/ryu3oTQ3XVaER8sqU/29VMkQ=; b=F0IDVnv7JOqJ+m9IkmUoCVJ55hWNx72V4sL+xf6FqkqiLCJPjxF4ys2aRuuNYyhuyZ vrt3uzoheNaIkWYUr6EHKBCgWsDCN3TknVAlBy8T71zD2U9IJnYVc2FG8C8oY8bRtj5V tw/oFezEs24RZdBiNucLQiPKfEONRVRvooG5bSZGSg4lRBogULmEs65c09s2XehNA7sX 9VwscUQv0WBjF0tLMDk1iRp3XfKbopobelnoH2M4TIGfJ/jqyIBcpH3EpW61y5jxE1iA I7CqmyJpymEJAZTZf8sLutlYyNGL1D9YPfJ712as/C4iejVGENaMByLUPKVzuhseh9GA FEFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j20si2533332oii.168.2020.03.12.04.21.14; Thu, 12 Mar 2020 04:21:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727030AbgCLLT5 (ORCPT + 99 others); Thu, 12 Mar 2020 07:19:57 -0400 Received: from sauhun.de ([88.99.104.3]:41226 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbgCLLT5 (ORCPT ); Thu, 12 Mar 2020 07:19:57 -0400 Received: from localhost (p54B331A0.dip0.t-ipconnect.de [84.179.49.160]) by pokefinder.org (Postfix) with ESMTPSA id E76E22C1ECC; Thu, 12 Mar 2020 12:19:53 +0100 (CET) Date: Thu, 12 Mar 2020 12:19:51 +0100 From: Wolfram Sang To: Luca Ceresoli Cc: Geert Uytterhoeven , Wolfram Sang , Linux I2C , Linux-Renesas , linux-i3c@lists.infradead.org, Kieran Bingham , Niklas =?utf-8?Q?S=C3=B6derlund?= , Jacopo Mondi , Laurent Pinchart , Vladimir Zapolskiy , Linux Kernel Mailing List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Alexandre Belloni Subject: Re: [RFC PATCH 3/7] i2c: allow DT nodes without 'compatible' Message-ID: <20200312111950.GA1013@ninjato> References: <20200220172403.26062-1-wsa+renesas@sang-engineering.com> <20200220172403.26062-4-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Luca, > But the kernel currently ignores nodes that have no matching driver, > right? So in this case the kernel knows that that address is used, but > ignores this information and considers the address as available. I'd rather call it "unbound" than available. See later. > Seen in this perspective, we should have a "compatible" for all nodes: > it is just describing the hardware and could be out of the kernel > control. But instead of discarding all nodes without a matching driver, And what compatible value would you use if you know there is something sitting there and don't know what? This is what this series aims to address because we thought a compatible name like "reserved" would not be a good idea. > the i2c-core-of code should mark them as "reserved". >=20 > Does it sound correct? With this patch series, this is quite what happens for ancillary addresses. They get their own dummy device automatically now, are marked as reserved and can only be obtained by the driver which bound to the main address (of_node of ancillary addr =3D=3D of_node of main addr). For the main address, I think things are a bit different. They already have their struct device. The only thing we gain from reserving them (=3D binding to the dummy driver) is that they are kinda blocked for userspace access. The "protection" is kinda low, though. There are already ways to communicate with bound addresses from userspace. In kernel space we still need to probe this address until a driver is bound to it, I don't see what a "reserved" state gains us here. If we are talking about the pool of available addresses, we are all good because we operate on existing struct device and don't care if they are bound or not. Or? What would be kinda nice, though, is when i2cdetect could show reserved addresses (unbound but having a struct device) as "RR" or so. However, I currently can't see a way to do it without breaking compability. > Clearly this does not fit the case reported by Alexandre: a device > having a driver which is known to be badly buggy, so we don't want to > instantiate it. But again, this should not affect DT as it is not > describing the HW, but only an implementation detail. Probably disabling > or blacklisting the driver would be a better option there? "Fixing the driver" is the first thing coming to my mind ;) But yeah, blacklisting would be another good solution. With only the information above, DT is not the right place to fix a broken driver. > My apologies to Wolfram, I appreciate a lot the effort you are doing, > but before reviewing this patch I have never realized what I tried to > explain above. All good, Luca! Talking over code usually brings in viewpoints which have been missed so far. This is expected. Actually, I am very happy to have this discussion! All the best, Wolfram --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl5qGtIACgkQFA3kzBSg Kbbq1g//cGduBAVmcRJ6Vsggj4Ku7GeXkHPmq+ql8nV8hwFA8TL+CLMs7E/uwg7m cKOtGFlayuUVDPQUNioVeupDTKj35wDbQEXQ9TJaUzqELdDc2oeDYyOnfO/CGc7Y g32bVMtt/p7G+vvYqPv5yk61q14hSvH4d2+kkhIlD62fHfJEdNtEN0j4avxnNgUz H2rDXxEAQcSpegYDW+fAytaFqguTW8++Mq8egMucI3t0ol396y7Ils24B21KdqYI gjOtstIJLcl4NEUJME/Z6YtYQjuXBxgV4tQjkCypm5u+6+13JfiSEZsRD7mP5KGv QIsU+wlqgMqi2HGB5VtUnDtxkSaQRoMcZ4M5/GqVr0rcAKJKxIeo0AkIkmAlnWVG 1KnFSbLMB0xf6udLt/V5B38xyYvCoohbl3W2kHNRjI1MB1JO1PaaclAu+KNou+i8 jdGKlcc7F/PGGJ50HWqKNlgx45bi5MgGrDOaxru+vVUeBuJJLedPySfxsFJbiZK5 oRY88yHNVzPjtpBOWgQENx2VYEOVrpDdCZjU9S4rCZC/PCFeFm2jvRa9VR5tW2Ol ovghfXLlzyL/lDjm8eGJxQYk6sqK7JsyYAlWbJp3sNVrgPSm9ufSSN75FBjq7WXk KLDaK0AY0DXFMpD4Znb3/SMaJrOZ9ZRfx9nnM2JnrNcNd0OgjbM= =AZPQ -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--