mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-03 05:43:52 +00:00
soc: qcom: smem_state: Add stubs for disabled smem_state
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Andy Gross <andy.gross@linaro.org>
This commit is contained in:
parent
39a3366a31
commit
e8b123e600
1 changed files with 35 additions and 0 deletions
|
@ -1,12 +1,17 @@
|
||||||
#ifndef __QCOM_SMEM_STATE__
|
#ifndef __QCOM_SMEM_STATE__
|
||||||
#define __QCOM_SMEM_STATE__
|
#define __QCOM_SMEM_STATE__
|
||||||
|
|
||||||
|
#include <linux/errno.h>
|
||||||
|
|
||||||
|
struct device_node;
|
||||||
struct qcom_smem_state;
|
struct qcom_smem_state;
|
||||||
|
|
||||||
struct qcom_smem_state_ops {
|
struct qcom_smem_state_ops {
|
||||||
int (*update_bits)(void *, u32, u32);
|
int (*update_bits)(void *, u32, u32);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_QCOM_SMEM_STATE
|
||||||
|
|
||||||
struct qcom_smem_state *qcom_smem_state_get(struct device *dev, const char *con_id, unsigned *bit);
|
struct qcom_smem_state *qcom_smem_state_get(struct device *dev, const char *con_id, unsigned *bit);
|
||||||
void qcom_smem_state_put(struct qcom_smem_state *);
|
void qcom_smem_state_put(struct qcom_smem_state *);
|
||||||
|
|
||||||
|
@ -15,4 +20,34 @@ int qcom_smem_state_update_bits(struct qcom_smem_state *state, u32 mask, u32 val
|
||||||
struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node, const struct qcom_smem_state_ops *ops, void *data);
|
struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node, const struct qcom_smem_state_ops *ops, void *data);
|
||||||
void qcom_smem_state_unregister(struct qcom_smem_state *state);
|
void qcom_smem_state_unregister(struct qcom_smem_state *state);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
static inline struct qcom_smem_state *qcom_smem_state_get(struct device *dev,
|
||||||
|
const char *con_id, unsigned *bit)
|
||||||
|
{
|
||||||
|
return ERR_PTR(-EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void qcom_smem_state_put(struct qcom_smem_state *state)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int qcom_smem_state_update_bits(struct qcom_smem_state *state,
|
||||||
|
u32 mask, u32 value)
|
||||||
|
{
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node,
|
||||||
|
const struct qcom_smem_state_ops *ops, void *data)
|
||||||
|
{
|
||||||
|
return ERR_PTR(-EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void qcom_smem_state_unregister(struct qcom_smem_state *state)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue