1 #ifndef __VMMC_MODULE_H__
2 #define __VMMC_MODULE_H__
4 #include <linux/list.h>
5 #include <linux/kernel.h>
6 #include <linux/tapi/tapi.h>
10 struct vmmc_module_ops
{
11 int (*sync
)(struct vmmc_module
*);
12 int (*enable
)(struct vmmc_module
*, bool enable
);
22 const struct vmmc_module_ops
*ops
;
25 #define VMMC_MODULE_FLAG_PIN_USED(x) (x)
26 #define VMMC_MODULE_FLAG_MODIFIED 31
28 struct list_head head
;
30 unsigned int refcount
;
33 int vmmc_module_init(struct vmmc_module
*module
, size_t num_pins
,
34 const struct vmmc_module_ops
*ops
);
35 int vmmc_module_sync(struct vmmc_module
*module
);
38 struct vmmc_module
*modules
[2];
42 struct vmmc_endpoint
{
43 struct tapi_endpoint ep
;
44 struct vmmc_module
*module
;
47 void vmmc_link_enable(struct vmmc_link
*link
);
48 void vmmc_link_disable(struct vmmc_link
*link
);
49 unsigned int vmmc_link_init(struct vmmc_link
*link
,
50 struct vmmc_module
*a
, struct vmmc_module
*b
);
51 void vmmc_link_put(struct vmmc_link
*link
);
53 int vmmc_module_get_pin(struct vmmc_module
*module
);
54 void vmmc_module_put_pin(struct vmmc_module
*module
, unsigned int pin
);
55 void vmmc_module_set_pin_input(struct vmmc_module
*module
, unsigned int pin
,
56 struct vmmc_module
*input
);
59 static inline struct vmmc_module
*tapi_endpoint_to_vmmc_module(struct tapi_endpoint
*ep
)
61 return tapi_endpoint_get_data(ep
);
This page took 0.045052 seconds and 5 git commands to generate.