1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * System Control Driver 4 * 5 * Copyright (C) 2012 Freescale Semiconductor, Inc. 6 * Copyright (C) 2012 Linaro Ltd. 7 * 8 * Author: Dong Aisheng <dong.aisheng@linaro.org> 9 */ 10 11#ifndef __LINUX_MFD_SYSCON_H__ 12#define __LINUX_MFD_SYSCON_H__ 13 14#include <linux/err.h> 15#include <linux/errno.h> 16 17struct device_node; 18 19#ifdef CONFIG_MFD_SYSCON 20extern struct regmap *syscon_node_to_regmap(struct device_node *np); 21extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s); 22extern struct regmap *syscon_regmap_lookup_by_phandle( 23 struct device_node *np, 24 const char *property); 25#else 26static inline struct regmap *syscon_node_to_regmap(struct device_node *np) 27{ 28 return ERR_PTR(-ENOTSUPP); 29} 30 31static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s) 32{ 33 return ERR_PTR(-ENOTSUPP); 34} 35 36static inline struct regmap *syscon_regmap_lookup_by_phandle( 37 struct device_node *np, 38 const char *property) 39{ 40 return ERR_PTR(-ENOTSUPP); 41} 42#endif 43 44#endif /* __LINUX_MFD_SYSCON_H__ */ 45