xref: /OK3568_Linux_fs/kernel/include/linux/mfd/altera-sysmgr.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Copyright (C) 2018-2019 Intel Corporation
4*4882a593Smuzhiyun  * Copyright (C) 2012 Freescale Semiconductor, Inc.
5*4882a593Smuzhiyun  * Copyright (C) 2012 Linaro Ltd.
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun #ifndef __LINUX_MFD_ALTERA_SYSMGR_H__
9*4882a593Smuzhiyun #define __LINUX_MFD_ALTERA_SYSMGR_H__
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #include <linux/err.h>
12*4882a593Smuzhiyun #include <linux/errno.h>
13*4882a593Smuzhiyun #include <linux/firmware/intel/stratix10-smc.h>
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun struct device_node;
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #ifdef CONFIG_MFD_ALTERA_SYSMGR
18*4882a593Smuzhiyun struct regmap *altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np,
19*4882a593Smuzhiyun 						    const char *property);
20*4882a593Smuzhiyun #else
21*4882a593Smuzhiyun static inline struct regmap *
altr_sysmgr_regmap_lookup_by_phandle(struct device_node * np,const char * property)22*4882a593Smuzhiyun altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np,
23*4882a593Smuzhiyun 				     const char *property)
24*4882a593Smuzhiyun {
25*4882a593Smuzhiyun 	return ERR_PTR(-ENOTSUPP);
26*4882a593Smuzhiyun }
27*4882a593Smuzhiyun #endif
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun #endif /* __LINUX_MFD_ALTERA_SYSMGR_H__ */
30