Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4428737ybc; Fri, 15 Nov 2019 04:36:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwHPp7gCFzFuAoHeRn9wPQg6Oiy67lSufgUaB3vIc3MYhUYGlgf8Np2OTuO+WwM6aswOUfe X-Received: by 2002:adf:d4d0:: with SMTP id w16mr15454641wrk.184.1573821409296; Fri, 15 Nov 2019 04:36:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573821409; cv=none; d=google.com; s=arc-20160816; b=Qvv7RtydJA+IPexaHOwwwCpnecVQaahGrfukfWcDLJqR91a6nLlo+E10clQqauBMbt e6jd/40LoXxAL8wsitAsaJInks9ZllJsTiVfgJMJ8sJ/Un86qpRF0DVBvbM5zeLLxh+W /TP3PC5s2OU2Hdy6F/Y+tAh8nvYtGKToadEMpji2aO/9T9i1iCdMg+po/h1vhnPNna/m j2S2nbNiubkubPYapUXACvxH8tH1MxjEmgmS8GhA9ZmsIBgUCiuoefXzr0NnxjUta63o gnUtESEeUIHY8vFiFxz4rlJMe/jMzN+TI3vg400E/zOfz5iR0w+kbCrJwpD+y02MjVzo S66A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=CvJpvX7gDFGBqci6jluU8FguxvZfbl0ty3ibtr9QGxY=; b=hsimrEqMJLFrOLU2mzGWUABF/X6BYbnAlWzVvZImpvaIyJ78CXafnNTyGhohub52wW 68B0sAr3DDjxWOo816IIYlOSdwdCdXmSHcyNM+SR03YEozassVnjYVgoXkLuQyqp/PiZ 6SPoKlgrNl+CaeVAhXF0ZDh8kGW1g6rR9n2DDhbdSyViX8wwhnZ5EcgEWlxAR0kZn9/Q kYBOia4Ri797huxjOMg0yHAS9rOz5D0H5FBV+gjArWG9Ttr+kn2rOGM8HElGchyTEa/Y WnQki5iMeN+xJTdTMGUioMIs0Om96UA3iBo3zTJ6ZP84WNG+orF3TG1I5UEkBGCSPW1E UFPg== 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 g31si6136688edg.206.2019.11.15.04.36.24; Fri, 15 Nov 2019 04:36:49 -0800 (PST) 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 S1727560AbfKOMfK convert rfc822-to-8bit (ORCPT + 99 others); Fri, 15 Nov 2019 07:35:10 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:38854 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727496AbfKOMfK (ORCPT ); Fri, 15 Nov 2019 07:35:10 -0500 Received: by mail-ot1-f67.google.com with SMTP id z25so7888900oti.5; Fri, 15 Nov 2019 04:35:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=weseOzPMtZu2Zkh9G1J+5ddsMGjRBKSp1rgb8MnewWI=; b=Y8gMEmARIyyPz+5yibhUCCzAPO8+umg05BceZRw1lhRNI3WYVX4DoF1CpYG3mIO79c 6spRqeeWPCv3nLKnZjfHWVKFCbI1V/1QkpKj7r+cQ1ywtGsD9Bhe6QC5rfYqoSoVb3h3 rsdGDLWMsjl58Zxwl3Nn4DNWBvAnQxQMxfpcVp0NV1EOiMTlI850NHBR3C+6jh0oWYDF ezTQikj6OS1Sv+fYoYPvY0cYAjc6W3Rjlzk1HphvRjRBDNy7CAc35HGRlfr2YFa8UNr0 9avmZa0xoj+HQgi+UFCOy+1xkRxjHQlgZ69gjNNYrulWLFSQgjFQ4uLo9/h1BqI+H6+p Q2nQ== X-Gm-Message-State: APjAAAVEGi2hyVQP1mXyBRULe4XhdpBdwmTMgmazAmkhvw4+RZq2abJ2 EhilzH4vCKDUF7YNzV1fbsIxU/WVhISlQhPzARc= X-Received: by 2002:a9d:5511:: with SMTP id l17mr2945702oth.145.1573821307279; Fri, 15 Nov 2019 04:35:07 -0800 (PST) MIME-Version: 1.0 References: <20191103013645.9856-3-afaerber@suse.de> <20191111045609.7026-1-afaerber@suse.de> <20191111052741.GB3176397@kroah.com> <586fa37c-6292-aca4-fa7c-73064858afaf@suse.de> <20191111064040.GA3502217@kroah.com> <20191112052347.GA1197504@kroah.com> <20191112072926.isjxfa4ci6akhx56@pengutronix.de> In-Reply-To: From: Geert Uytterhoeven Date: Fri, 15 Nov 2019 13:34:55 +0100 Message-ID: Subject: Re: Sense of soc bus? (was: [PATCH] base: soc: Export soc_device_to_device() helper) To: =?UTF-8?Q?Andreas_F=C3=A4rber?= Cc: Neil Armstrong , Greg Kroah-Hartman , Geert Uytterhoeven , linux-realtek-soc@lists.infradead.org, Tony Lindgren , Linus Walleij , Bjorn Andersson , Thierry Reding , Lee Jones , Rob Herring , Kevin Hilman , "Rafael J. Wysocki" , Michal Simek , Jonathan Hunter , NXP Linux Team , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , boot-architecture@lists.linaro.org, Sascha Hauer , Fabio Estevam , "linux-tegra@vger.kernel.org" , "open list:ARM/Amlogic Meson..." , "open list:TI ETHERNET SWITCH DRIVER (CPSW)" , Alexander Sverdlin , Linux ARM , Linux Kernel Mailing List , Hartley Sweeten , Pengutronix Kernel Team , Shawn Guo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andreas, On Fri, Nov 15, 2019 at 1:01 PM Andreas Färber wrote: > Am 15.11.19 um 09:58 schrieb Geert Uytterhoeven: > > On Fri, Nov 15, 2019 at 9:52 AM Neil Armstrong wrote: > >> On 12/11/2019 11:47, Andreas Färber wrote: > >>> For example, RTD1295 will support LSADC only from revision B00 > >>> on (and it's not the first time I'm seeing such things in the industry). > >>> So if a user complains, it will be helpful to see that information. > >>> > >>> Referencing your Amlogic review, with all due respect for its authors, > >>> the common framework here just lets that information evaporate into the > >>> deeps of sysfs. > >> > >> Hopefully we never had the case where needed to use the soc info in drivers, > >> but now we have one and having such infrastructure already in-place will help. > >> > >> Renesas platforms makes a extensive usage of the soc info infrastructure to > >> figure out plenty of HW parameters at runtime and lower their DT changes. > > > > 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. FTR, lshw (Ubuntu 18.04 has v2.18, which does seem to be the latest upstream version) does not parse /sys/devices/soc0/. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds