This patch improves the backend property, it can be either a phandle or a of_path. During probe() of the state driver the backend property is dereferenced and the resulting of_path is saved in the state context. In a later patch it will be used to generate a phandle reference to the backend during DT fixup. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
25 lines
694 B
C
25 lines
694 B
C
#ifndef __STATE_H
|
|
#define __STATE_H
|
|
|
|
#include <of.h>
|
|
|
|
struct state;
|
|
|
|
int state_backend_dtb_file(struct state *state, const char *of_path,
|
|
const char *path);
|
|
int state_backend_raw_file(struct state *state, const char *of_path,
|
|
const char *path, off_t offset, size_t size);
|
|
|
|
struct state *state_new_from_node(const char *name, struct device_node *node);
|
|
void state_release(struct state *state);
|
|
|
|
struct state *state_by_name(const char *name);
|
|
struct state *state_by_node(const struct device_node *node);
|
|
int state_get_name(const struct state *state, char const **name);
|
|
|
|
int state_load(struct state *state);
|
|
int state_save(struct state *state);
|
|
void state_info(void);
|
|
|
|
#endif /* __STATE_H */
|