From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: Sense of soc bus? (was: [PATCH] base: soc: Export soc_device_to_device() helper) Date: Mon, 18 Nov 2019 07:55:39 -0800 Message-ID: <20191118155539.GB35479@atomide.com> References: <586fa37c-6292-aca4-fa7c-73064858afaf@suse.de> <20191111064040.GA3502217@kroah.com> <20191112052347.GA1197504@kroah.com> <20191112072926.isjxfa4ci6akhx56@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Geert Uytterhoeven Cc: Andreas =?utf-8?Q?F=C3=A4rber?= , Neil Armstrong , Greg Kroah-Hartman , Geert Uytterhoeven , linux-realtek-soc@lists.infradead.org, Linus Walleij , Bjorn Andersson , Thierry Reding , Lee Jones , Rob Herring , Kevin Hilman , "Rafael J. Wysocki" , Michal Simek , Jonathan Hunter , NXP Linux Team , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , boot-architecture@lists.linaro.org, Sascha Hauer List-Id: linux-omap@vger.kernel.org * Geert Uytterhoeven [191115 15:51]: > On Fri, Nov 15, 2019 at 1:01 PM Andreas Färber wrote: > > Am 15.11.19 um 09:58 schrieb Geert Uytterhoeven: > > > We do our best to use it solely for detecting quirks in early SoC revisions. > > > > Got a pointer? I fail to immediately understand how sysfs would help > > drivers (as opposed to userspace) detect quirks: Parsing strings back > > doesn't sound efficient, and I don't see you exporting any custom APIs > > in drivers/soc/renesas/renesas-soc.c? > > We use soc_device_match(), inside kernel drivers. > Exposure through sysfs is a side-effect of using soc_device_register(), > and welcomed, as it allows the user to find out quickly which SoC and > revision is being used. For the omap variants too, we've so far gotten away with early SoC detection for platform code, and then use soc_device_match() in few cases for drivers at probe time if needed. Regards, Tony