Thomas Gleixner | 5765e78 | 2019-05-31 01:09:25 -0700 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Wai Yew CHAY | 8cc7236 | 2009-05-14 08:05:58 +0200 | [diff] [blame] | 2 | /** |
| 3 | * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved. |
| 4 | * |
Wai Yew CHAY | 8cc7236 | 2009-05-14 08:05:58 +0200 | [diff] [blame] | 5 | * @File ctimap.h |
| 6 | * |
| 7 | * @Brief |
| 8 | * This file contains the definition of generic input mapper operations |
| 9 | * for input mapper management. |
| 10 | * |
| 11 | * @Author Liu Chun |
| 12 | * @Date May 23 2008 |
Wai Yew CHAY | 8cc7236 | 2009-05-14 08:05:58 +0200 | [diff] [blame] | 13 | */ |
| 14 | |
| 15 | #ifndef CTIMAP_H |
| 16 | #define CTIMAP_H |
| 17 | |
| 18 | #include <linux/list.h> |
| 19 | |
| 20 | struct imapper { |
| 21 | unsigned short slot; /* the id of the slot containing input data */ |
| 22 | unsigned short user; /* the id of the user resource consuming data */ |
| 23 | unsigned short addr; /* the input mapper ram id */ |
| 24 | unsigned short next; /* the next input mapper ram id */ |
| 25 | struct list_head list; |
| 26 | }; |
| 27 | |
| 28 | int input_mapper_add(struct list_head *mappers, struct imapper *entry, |
| 29 | int (*map_op)(void *, struct imapper *), void *data); |
| 30 | |
| 31 | int input_mapper_delete(struct list_head *mappers, struct imapper *entry, |
| 32 | int (*map_op)(void *, struct imapper *), void *data); |
| 33 | |
| 34 | void free_input_mapper_list(struct list_head *mappers); |
| 35 | |
| 36 | #endif /* CTIMAP_H */ |