mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 21:32:06 +07:00
39233b7c61
device_node_to_regmap() is exactly like syscon_node_to_regmap(), but it does not check that the node is compatible with "syscon", and won't attach the first clock it finds to the regmap. The rationale behind this, is that one device node with a standard compatible string "foo,bar" can be covered by multiple drivers sharing a regmap, or by a single driver doing all the job without a regmap, but these are implementation details which shouldn't reflect on the devicetree. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Lee Jones <lee.jones@linaro.org> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@kernel.org> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: od@zcrc.me Cc: Mathieu Malaterre <malat@debian.org>
51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* System Control Driver
|
|
*
|
|
* Copyright (C) 2012 Freescale Semiconductor, Inc.
|
|
* Copyright (C) 2012 Linaro Ltd.
|
|
*
|
|
* Author: Dong Aisheng <dong.aisheng@linaro.org>
|
|
*/
|
|
|
|
#ifndef __LINUX_MFD_SYSCON_H__
|
|
#define __LINUX_MFD_SYSCON_H__
|
|
|
|
#include <linux/err.h>
|
|
#include <linux/errno.h>
|
|
|
|
struct device_node;
|
|
|
|
#ifdef CONFIG_MFD_SYSCON
|
|
extern struct regmap *device_node_to_regmap(struct device_node *np);
|
|
extern struct regmap *syscon_node_to_regmap(struct device_node *np);
|
|
extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
|
|
extern struct regmap *syscon_regmap_lookup_by_phandle(
|
|
struct device_node *np,
|
|
const char *property);
|
|
#else
|
|
static inline struct regmap *device_node_to_regmap(struct device_node *np)
|
|
{
|
|
return ERR_PTR(-ENOTSUPP);
|
|
}
|
|
|
|
static inline struct regmap *syscon_node_to_regmap(struct device_node *np)
|
|
{
|
|
return ERR_PTR(-ENOTSUPP);
|
|
}
|
|
|
|
static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
|
|
{
|
|
return ERR_PTR(-ENOTSUPP);
|
|
}
|
|
|
|
static inline struct regmap *syscon_regmap_lookup_by_phandle(
|
|
struct device_node *np,
|
|
const char *property)
|
|
{
|
|
return ERR_PTR(-ENOTSUPP);
|
|
}
|
|
#endif
|
|
|
|
#endif /* __LINUX_MFD_SYSCON_H__ */
|