blob: fc8b7925c53252c28b3ba46e4fca8bf961873c43 [file] [log] [blame]
Uri Shkolnikebb6c222009-04-05 06:01:37 -03001/****************************************************************
2
3Siano Mobile Silicon, Inc.
4MDTV receiver kernel modules.
5Copyright (C) 2006-2009, Uri Shkolnik
6
Mauro Carvalho Chehab844a9e92010-08-01 17:19:29 -03007 Copyright (c) 2010 - Mauro Carvalho Chehab
8 - Ported the driver to use rc-core
9 - IR raw event decoding is now done at rc-core
10 - Code almost re-written
11
Uri Shkolnikebb6c222009-04-05 06:01:37 -030012This program is free software: you can redistribute it and/or modify
13it under the terms of the GNU General Public License as published by
14the Free Software Foundation, either version 2 of the License, or
15(at your option) any later version.
16
17 This program is distributed in the hope that it will be useful,
18but WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20GNU General Public License for more details.
21
22You should have received a copy of the GNU General Public License
23along with this program. If not, see <http://www.gnu.org/licenses/>.
24
25****************************************************************/
26
27#ifndef __SMS_IR_H__
28#define __SMS_IR_H__
29
30#include <linux/input.h>
Mauro Carvalho Chehab6bda9642010-11-17 13:28:38 -030031#include <media/rc-core.h>
Uri Shkolnikebb6c222009-04-05 06:01:37 -030032
Uri Shkolnikebb6c222009-04-05 06:01:37 -030033#define IR_DEFAULT_TIMEOUT 100
34
Uri Shkolnikebb6c222009-04-05 06:01:37 -030035struct smscore_device_t;
36
37struct ir_t {
David Härdemand8b4b582010-10-29 16:08:23 -030038 struct rc_dev *dev;
Mauro Carvalho Chehab844a9e92010-08-01 17:19:29 -030039 char name[40];
Mauro Carvalho Chehab1722f3b2010-08-01 15:30:50 -030040 char phys[32];
Mauro Carvalho Chehab844a9e92010-08-01 17:19:29 -030041
42 char *rc_codes;
Mauro Carvalho Chehab844a9e92010-08-01 17:19:29 -030043
Uri Shkolnikebb6c222009-04-05 06:01:37 -030044 u32 timeout;
45 u32 controller;
46};
47
Mauro Carvalho Chehabfdd1eeb2012-10-17 16:59:01 -030048#ifdef CONFIG_SMS_SIANO_RC
Uri Shkolnikebb6c222009-04-05 06:01:37 -030049int sms_ir_init(struct smscore_device_t *coredev);
50void sms_ir_exit(struct smscore_device_t *coredev);
51void sms_ir_event(struct smscore_device_t *coredev,
52 const char *buf, int len);
Mauro Carvalho Chehabfdd1eeb2012-10-17 16:59:01 -030053#else
54inline static int sms_ir_init(struct smscore_device_t *coredev) {
55 return 0;
56}
57inline static void sms_ir_exit(struct smscore_device_t *coredev) {};
58inline static void sms_ir_event(struct smscore_device_t *coredev,
59 const char *buf, int len) {};
60#endif
Uri Shkolnikebb6c222009-04-05 06:01:37 -030061
62#endif /* __SMS_IR_H__ */
63