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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89C30C432C3 for ; Fri, 15 Nov 2019 12:35:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BB142073C for ; Fri, 15 Nov 2019 12:35:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727574AbfKOMfK convert rfc822-to-8bit (ORCPT ); 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-Google-Smtp-Source: APXvYqxQbOJhyQwpGQWBZF1hmsyHYrJBcMAR+hAoTdODxyYX/u2VKxAy7/eJUh/M6a4TbETYPv02VjN0xr9BlR4aCVA= 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