2012-09-05 06:57:13 +04:00
|
|
|
/*
|
|
|
|
* System Control Driver
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 Freescale Semiconductor, Inc.
|
|
|
|
* Copyright (C) 2012 Linaro Ltd.
|
|
|
|
*
|
|
|
|
* Author: Dong Aisheng <dong.aisheng@linaro.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LINUX_MFD_SYSCON_H__
|
|
|
|
#define __LINUX_MFD_SYSCON_H__
|
|
|
|
|
2014-05-09 15:07:40 +04:00
|
|
|
#include <linux/err.h>
|
|
|
|
|
2013-03-25 20:56:23 +04:00
|
|
|
struct device_node;
|
|
|
|
|
2013-10-22 12:46:25 +04:00
|
|
|
#ifdef CONFIG_MFD_SYSCON
|
2012-09-05 06:57:13 +04:00
|
|
|
extern struct regmap *syscon_node_to_regmap(struct device_node *np);
|
|
|
|
extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
|
2013-03-13 21:34:20 +04:00
|
|
|
extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s);
|
2012-09-05 06:57:13 +04:00
|
|
|
extern struct regmap *syscon_regmap_lookup_by_phandle(
|
|
|
|
struct device_node *np,
|
|
|
|
const char *property);
|
2013-10-22 12:46:25 +04:00
|
|
|
#else
|
|
|
|
static inline struct regmap *syscon_node_to_regmap(struct device_node *np)
|
|
|
|
{
|
|
|
|
return ERR_PTR(-ENOSYS);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
|
|
|
|
{
|
|
|
|
return ERR_PTR(-ENOSYS);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s)
|
|
|
|
{
|
|
|
|
return ERR_PTR(-ENOSYS);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct regmap *syscon_regmap_lookup_by_phandle(
|
|
|
|
struct device_node *np,
|
|
|
|
const char *property)
|
|
|
|
{
|
|
|
|
return ERR_PTR(-ENOSYS);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-09-05 06:57:13 +04:00
|
|
|
#endif /* __LINUX_MFD_SYSCON_H__ */
|