Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 /*
0003  *
0004  * Siano Mobile Silicon, Inc.
0005  * MDTV receiver kernel modules.
0006  * Copyright (C) 2006-2009, Uri Shkolnik
0007  *
0008  * Copyright (c) 2010 - Mauro Carvalho Chehab
0009  *  - Ported the driver to use rc-core
0010  *  - IR raw event decoding is now done at rc-core
0011  *  - Code almost re-written
0012  */
0013 
0014 #ifndef __SMS_IR_H__
0015 #define __SMS_IR_H__
0016 
0017 #include <linux/input.h>
0018 #include <media/rc-core.h>
0019 
0020 struct smscore_device_t;
0021 
0022 struct ir_t {
0023     struct rc_dev *dev;
0024     char name[40];
0025     char phys[32];
0026 
0027     char *rc_codes;
0028 
0029     u32 timeout;
0030     u32 controller;
0031 };
0032 
0033 #ifdef CONFIG_SMS_SIANO_RC
0034 int sms_ir_init(struct smscore_device_t *coredev);
0035 void sms_ir_exit(struct smscore_device_t *coredev);
0036 void sms_ir_event(struct smscore_device_t *coredev,
0037             const char *buf, int len);
0038 #else
0039 inline static int sms_ir_init(struct smscore_device_t *coredev) {
0040     return 0;
0041 }
0042 inline static void sms_ir_exit(struct smscore_device_t *coredev) {};
0043 inline static void sms_ir_event(struct smscore_device_t *coredev,
0044             const char *buf, int len) {};
0045 #endif
0046 
0047 #endif /* __SMS_IR_H__ */
0048