844a9e93d7
Rewrites the siano IR implementation. The previous implementation were non-standard. As such, it has issues if more than one device registers IR, as there used to have some static constants used during protocol decoding phase. Also, it used to implement its on RAW decoder, and only for RC5. The new code uses RC core subsystem for handling IR. This brings several new features to the driver, including: - Allow to dynamically replace the IR keycodes; - Supports all existing raw decoders (JVC, NEC, RC-5, RC-6, SONY); - Supports lirc dev; - Doesn't have race conditions when more than one sms IR is registered; - The code size for the IR implementation is very small; - it exports the IR features via /sys/class/rc. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
56 lines
1.5 KiB
C
56 lines
1.5 KiB
C
/****************************************************************
|
|
|
|
Siano Mobile Silicon, Inc.
|
|
MDTV receiver kernel modules.
|
|
Copyright (C) 2006-2009, Uri Shkolnik
|
|
|
|
Copyright (c) 2010 - Mauro Carvalho Chehab
|
|
- Ported the driver to use rc-core
|
|
- IR raw event decoding is now done at rc-core
|
|
- Code almost re-written
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
****************************************************************/
|
|
|
|
#ifndef __SMS_IR_H__
|
|
#define __SMS_IR_H__
|
|
|
|
#include <linux/input.h>
|
|
#include <media/ir-core.h>
|
|
|
|
#define IR_DEFAULT_TIMEOUT 100
|
|
|
|
struct smscore_device_t;
|
|
|
|
struct ir_t {
|
|
struct input_dev *input_dev;
|
|
char name[40];
|
|
char phys[32];
|
|
|
|
char *rc_codes;
|
|
u64 protocol;
|
|
struct ir_dev_props props;
|
|
|
|
u32 timeout;
|
|
u32 controller;
|
|
};
|
|
|
|
int sms_ir_init(struct smscore_device_t *coredev);
|
|
void sms_ir_exit(struct smscore_device_t *coredev);
|
|
void sms_ir_event(struct smscore_device_t *coredev,
|
|
const char *buf, int len);
|
|
|
|
#endif /* __SMS_IR_H__ */
|
|
|