xref: /openbmc/linux/drivers/media/common/siano/smsir.h (revision 3cf3cdea)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  *
4  * Siano Mobile Silicon, Inc.
5  * MDTV receiver kernel modules.
6  * Copyright (C) 2006-2009, Uri Shkolnik
7  *
8  * Copyright (c) 2010 - Mauro Carvalho Chehab
9  *	- Ported the driver to use rc-core
10  *	- IR raw event decoding is now done at rc-core
11  *	- Code almost re-written
12  */
13 
14 #ifndef __SMS_IR_H__
15 #define __SMS_IR_H__
16 
17 #include <linux/input.h>
18 #include <media/rc-core.h>
19 
20 struct smscore_device_t;
21 
22 struct ir_t {
23 	struct rc_dev *dev;
24 	char name[40];
25 	char phys[32];
26 
27 	char *rc_codes;
28 
29 	u32 timeout;
30 	u32 controller;
31 };
32 
33 #ifdef CONFIG_SMS_SIANO_RC
34 int sms_ir_init(struct smscore_device_t *coredev);
35 void sms_ir_exit(struct smscore_device_t *coredev);
36 void sms_ir_event(struct smscore_device_t *coredev,
37 			const char *buf, int len);
38 #else
39 inline static int sms_ir_init(struct smscore_device_t *coredev) {
40 	return 0;
41 }
42 inline static void sms_ir_exit(struct smscore_device_t *coredev) {};
43 inline static void sms_ir_event(struct smscore_device_t *coredev,
44 			const char *buf, int len) {};
45 #endif
46 
47 #endif /* __SMS_IR_H__ */
48 
49