17 #include <linux/export.h>
19 static char *state2str(
unsigned short state)
25 default:
return "???";
38 static void *controller_start(
struct seq_file *seq, loff_t *
pos)
49 static void *controller_next(
struct seq_file *seq,
void *
v, loff_t *
pos)
58 static void controller_stop(
struct seq_file *seq,
void *v)
64 static int controller_show(
struct seq_file *seq,
void *v)
73 state2str(ctr->
state),
80 static int contrstats_show(
struct seq_file *seq,
void *v)
98 .start = controller_start,
99 .next = controller_next,
100 .stop = controller_stop,
101 .show = controller_show,
105 .start = controller_start,
106 .next = controller_next,
107 .stop = controller_stop,
108 .show = contrstats_show,
113 return seq_open(file, &seq_controller_ops);
118 return seq_open(file, &seq_contrstats_ops);
123 .open = seq_controller_open,
131 .open = seq_contrstats_open,
143 static void *applications_start(
struct seq_file *seq, loff_t *pos)
155 applications_next(
struct seq_file *seq,
void *v, loff_t *pos)
164 static void applications_stop(
struct seq_file *seq,
void *v)
171 applications_show(
struct seq_file *seq,
void *v)
188 applstats_show(
struct seq_file *seq,
void *v)
206 .start = applications_start,
207 .next = applications_next,
208 .stop = applications_stop,
209 .show = applications_show,
213 .start = applications_start,
214 .next = applications_next,
215 .stop = applications_stop,
216 .show = applstats_show,
222 return seq_open(file, &seq_applications_ops);
228 return seq_open(file, &seq_applstats_ops);
233 .open = seq_applications_open,
241 .open = seq_applstats_open,
249 static void *capi_driver_start(
struct seq_file *seq, loff_t *pos)
256 static void *capi_driver_next(
struct seq_file *seq,
void *v, loff_t *pos)
261 static void capi_driver_stop(
struct seq_file *seq,
void *v)
267 static int capi_driver_show(
struct seq_file *seq,
void *v)
276 .start = capi_driver_start,
277 .next = capi_driver_next,
278 .stop = capi_driver_stop,
279 .show = capi_driver_show,
286 err =
seq_open(file, &seq_capi_driver_ops);
292 .open = seq_capi_driver_open,
305 proc_create(
"capi/controller", 0,
NULL, &proc_controller_ops);
306 proc_create(
"capi/contrstats", 0,
NULL, &proc_contrstats_ops);
307 proc_create(
"capi/applications", 0,
NULL, &proc_applications_ops);
308 proc_create(
"capi/applstats", 0,
NULL, &proc_applstats_ops);
309 proc_create(
"capi/driver", 0,
NULL, &proc_driver_ops);