public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: gregkh@linuxfoundation•org (Greg Kroah-Hartman)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 2/4] base: soc: Introduce soc_device_match() interface
Date: Wed, 19 Oct 2016 10:26:12 +0200	[thread overview]
Message-ID: <20161019082612.GA6199@kroah.com> (raw)
In-Reply-To: <1475572167-29581-3-git-send-email-geert+renesas@glider.be>

On Tue, Oct 04, 2016 at 11:09:25AM +0200, Geert Uytterhoeven wrote:
> From: Arnd Bergmann <arnd@arndb•de>
> 
> We keep running into cases where device drivers want to know the exact
> version of the a SoC they are currently running on. In the past, this has
> usually been done through a vendor specific API that can be called by a
> driver, or by directly accessing some kind of version register that is
> not part of the device itself but that belongs to a global register area
> of the chip.
> 
> Common reasons for doing this include:
> 
> - A machine is not using devicetree or similar for passing data about
>   on-chip devices, but just announces their presence using boot-time
>   platform devices, and the machine code itself does not care about the
>   revision.
> 
> - There is existing firmware or boot loaders with existing DT binaries
>   with generic compatible strings that do not identify the particular
>   revision of each device, but the driver knows which SoC revisions
>   include which part.
> 
> - A prerelease version of a chip has some quirks and we are using the same
>   version of the bootloader and the DT blob on both the prerelease and the
>   final version. An update of the DT binding seems inappropriate because
>   that would involve maintaining multiple copies of the dts and/or
>   bootloader.
> 
> This patch introduces the soc_device_match() interface that is meant to
> work like of_match_node() but instead of identifying the version of a
> device, it identifies the SoC itself using a vendor-agnostic interface.
> 
> Unlike of_match_node(), we do not do an exact string compare but instead
> use glob_match() to allow wildcards in strings.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb•de>
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp•com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider•be>
> ---
>  drivers/base/Kconfig    |  1 +
>  drivers/base/soc.c      | 66 +++++++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/sys_soc.h |  3 +++
>  3 files changed, 70 insertions(+)

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation•org>

  parent reply	other threads:[~2016-10-19  8:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1475572167-29581-1-git-send-email-geert+renesas@glider.be>
     [not found] ` <1475572167-29581-5-git-send-email-geert+renesas@glider.be>
2016-10-05 12:17   ` [PATCH/RFC 4/4] soc: renesas: Identify SoC and register with the SoC bus Dirk Behme
2016-10-10 14:23   ` Arnd Bergmann
2016-10-19  8:02     ` Geert Uytterhoeven
2016-10-19 10:59       ` Arnd Bergmann
2016-10-21 18:16         ` Geert Uytterhoeven
2016-10-21 21:16           ` Arnd Bergmann
2016-10-22  7:44             ` Geert Uytterhoeven
2016-10-29 21:27               ` Arnd Bergmann
2016-10-31 10:30                 ` Geert Uytterhoeven
     [not found] ` <1475572167-29581-2-git-send-email-geert+renesas@glider.be>
2016-10-10 14:15   ` [PATCH 1/4] base: soc: Early register bus when needed Arnd Bergmann
2016-10-10 14:28 ` [PATCH 0/4] soc: renesas: Identify SoC and register with the SoC bus Arnd Bergmann
2016-10-19  8:10   ` Geert Uytterhoeven
2016-10-19 10:32     ` Arnd Bergmann
     [not found] ` <1475572167-29581-3-git-send-email-geert+renesas@glider.be>
2016-10-19  8:26   ` Greg Kroah-Hartman [this message]
     [not found] ` <1475572167-29581-4-git-send-email-geert+renesas@glider.be>
2016-10-10 14:13   ` [PATCH 3/4] base: soc: Check for NULL SoC device attributes Arnd Bergmann
2016-10-19  8:26   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161019082612.GA6199@kroah.com \
    --to=gregkh@linuxfoundation$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox