Source
x
* @keyup_jiffies: time (in jiffies) when the current keypress should be released
/*
* Remote Controller core header
*
* Copyright (C) 2009-2010 by Mauro Carvalho Chehab
*
* 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 version 2 of the License.
*
* 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.
*/
/**
* enum rc_driver_type - type of the RC driver.
*
* @RC_DRIVER_SCANCODE: Driver or hardware generates a scancode.
* @RC_DRIVER_IR_RAW: Driver or hardware generates pulse/space sequences.
* It needs a Infra-Red pulse/space decoder
* @RC_DRIVER_IR_RAW_TX: Device transmitter only,
* driver requires pulse/space data sequence.
*/
enum rc_driver_type {
RC_DRIVER_SCANCODE = 0,
RC_DRIVER_IR_RAW,
RC_DRIVER_IR_RAW_TX,
};
/**
* struct rc_scancode_filter - Filter scan codes.
* @data: Scancode data to match.
* @mask: Mask of bits of scancode to compare.
*/
struct rc_scancode_filter {
u32 data;
u32 mask;
};
/**
* enum rc_filter_type - Filter type constants.
* @RC_FILTER_NORMAL: Filter for normal operation.
* @RC_FILTER_WAKEUP: Filter for waking from suspend.
* @RC_FILTER_MAX: Number of filter types.
*/
enum rc_filter_type {
RC_FILTER_NORMAL = 0,
RC_FILTER_WAKEUP,
RC_FILTER_MAX
};
/**
* struct lirc_fh - represents an open lirc file
* @list: list of open file handles
* @rc: rcdev for this lirc chardev
* @carrier_low: when setting the carrier range, first the low end must be
* set with an ioctl and then the high end with another ioctl
* @send_timeout_reports: report timeouts in lirc raw IR.
* @rawir: queue for incoming raw IR
* @scancodes: queue for incoming decoded scancodes
* @wait_poll: poll struct for lirc device
* @send_mode: lirc mode for sending, either LIRC_MODE_SCANCODE or
* LIRC_MODE_PULSE
* @rec_mode: lirc mode for receiving, either LIRC_MODE_SCANCODE or
* LIRC_MODE_MODE2
*/
struct lirc_fh {
struct list_head list;
struct rc_dev *rc;
int carrier_low;
bool send_timeout_reports;
DECLARE_KFIFO_PTR(rawir, unsigned int);
DECLARE_KFIFO_PTR(scancodes, struct lirc_scancode);
wait_queue_head_t wait_poll;
u8 send_mode;
u8 rec_mode;
};
/**
* struct rc_dev - represents a remote control device