xref: /openbmc/linux/sound/pci/ctxfi/ctimap.h (revision 8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17)
15765e78eSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2*a08b9f2fSAditya Srivastava /*
38cc72361SWai Yew CHAY  * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved.
48cc72361SWai Yew CHAY  *
58cc72361SWai Yew CHAY  * @File	ctimap.h
68cc72361SWai Yew CHAY  *
78cc72361SWai Yew CHAY  * @Brief
88cc72361SWai Yew CHAY  * This file contains the definition of generic input mapper operations
98cc72361SWai Yew CHAY  * for input mapper management.
108cc72361SWai Yew CHAY  *
118cc72361SWai Yew CHAY  * @Author	Liu Chun
128cc72361SWai Yew CHAY  * @Date 	May 23 2008
138cc72361SWai Yew CHAY  */
148cc72361SWai Yew CHAY 
158cc72361SWai Yew CHAY #ifndef CTIMAP_H
168cc72361SWai Yew CHAY #define CTIMAP_H
178cc72361SWai Yew CHAY 
188cc72361SWai Yew CHAY #include <linux/list.h>
198cc72361SWai Yew CHAY 
208cc72361SWai Yew CHAY struct imapper {
218cc72361SWai Yew CHAY 	unsigned short slot; /* the id of the slot containing input data */
228cc72361SWai Yew CHAY 	unsigned short user; /* the id of the user resource consuming data */
238cc72361SWai Yew CHAY 	unsigned short addr; /* the input mapper ram id */
248cc72361SWai Yew CHAY 	unsigned short next; /* the next input mapper ram id */
258cc72361SWai Yew CHAY 	struct list_head	list;
268cc72361SWai Yew CHAY };
278cc72361SWai Yew CHAY 
288cc72361SWai Yew CHAY int input_mapper_add(struct list_head *mappers, struct imapper *entry,
298cc72361SWai Yew CHAY 		     int (*map_op)(void *, struct imapper *), void *data);
308cc72361SWai Yew CHAY 
318cc72361SWai Yew CHAY int input_mapper_delete(struct list_head *mappers, struct imapper *entry,
328cc72361SWai Yew CHAY 		     int (*map_op)(void *, struct imapper *), void *data);
338cc72361SWai Yew CHAY 
348cc72361SWai Yew CHAY void free_input_mapper_list(struct list_head *mappers);
358cc72361SWai Yew CHAY 
368cc72361SWai Yew CHAY #endif /* CTIMAP_H */
37