1 #ifndef __QCOM_SMEM_STATE__
2 #define __QCOM_SMEM_STATE__
4 #include <linux/errno.h>
7 struct qcom_smem_state;
9 struct qcom_smem_state_ops {
10 int (*update_bits)(void *, u32, u32);
13 #ifdef CONFIG_QCOM_SMEM_STATE
15 struct qcom_smem_state *qcom_smem_state_get(struct device *dev, const char *con_id, unsigned *bit);
16 void qcom_smem_state_put(struct qcom_smem_state *);
18 int qcom_smem_state_update_bits(struct qcom_smem_state *state, u32 mask, u32 value);
20 struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node, const struct qcom_smem_state_ops *ops, void *data);
21 void qcom_smem_state_unregister(struct qcom_smem_state *state);
25 static inline struct qcom_smem_state *qcom_smem_state_get(struct device *dev,
26 const char *con_id, unsigned *bit)
28 return ERR_PTR(-EINVAL);
31 static inline void qcom_smem_state_put(struct qcom_smem_state *state)
35 static inline int qcom_smem_state_update_bits(struct qcom_smem_state *state,
41 static inline struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node,
42 const struct qcom_smem_state_ops *ops, void *data)
44 return ERR_PTR(-EINVAL);
47 static inline void qcom_smem_state_unregister(struct qcom_smem_state *state)