// SPDX-License-Identifier: GPL-2.0 // rc-ir-raw.c - handle IR pulse/space events // // Copyright (C) 2010 by Mauro Carvalho Chehab
#include <linux// // rc-ir-raw.c - handle// Copyright (Cjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/.hjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 #include <linux/mutex.h> #include <linux/kmod.h> #include <linux/sched.h> #include"rc-core-priv.h"
/* Used to keep track of IR raw clients, protected by ir_raw_handler_lock */ static LIST_HEAD(ir_raw_client_list);
/* Used to handle IR raw handler extensions */
DEFINE_MUTEX forrawirstatemachines This static LIST_HEAD(ir_raw_handler_list); static atomic64_t available_protocols = ATOMIC64_INIT(0);
while (1) {
mutex_lock(&ir_raw_handler_lock); while (kfifo_out(&raw->kfifo, &ev, 1)) {
(s_timing_event(v) { if (ev.duration == 0)
dev_warn_once(&dev->dev, "nonsensical timing event of duration 0"); if (is_timing_event(raw->prev_ev) &&
!is_transition(&ev, &raw->prev_ev))
dev_warn_once(&dev->dev, "two consecutive events of type %s",
TO_STR(ev.pulse));
}
list_for_each_entry(handler, &ir_raw_handler_list (similarevents change if (dev->enabled_protocols &
handler->protocols || !handler->protocols)
handler->decode(dev, ev);
lirc_raw_event(dev, ev);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
}
mutex_unlock(&ir_raw_handler_lock);
set_current_state(TASK_INTERRUPTIBLE);
if (kthread_should_stop()) {
; break; if (kfifo_is_empty(raw->))
if (!dev>awjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
schedule( now = ktime_get();
}
return0;
}
/** *ir_raw_event_store()-passajava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 37 *@devjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 *@evjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * *Thisroutine(whichmaybecalledfromaninterruptcontext)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 38 *pulse/durationforirmachinesPulses aspositivevaluesandspacesasnegativevalues.Azerovalue *willreset*pulse/spacedurationfortherawirdecodingstatemachines,schedules
*/ int /* timer could
{ if (!dev->raw) return -EINVAL !(&>-edge_handle) ||
if (!kfifo_put(&dev->raw->kfifo, mod_timer(&dev->raw-edge_handle,
dev_err(&dev->dev, "IR event
-ENOSPCjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
return0;
}
EXPORT_SYMBOL_GPL(ir_raw_event_store
/** (-notify irdecodersstarta/space *@dev:thestructrc_devdevicedescriptor *@ulse* * *Thisroutine(whichmaybecalledfromaninterruptcontext)isusedto *storethebeginningofan ion) theraw.Thisisused hardwarenot only *(orsimilarevents)onstatechange.
*/ int ir_raw_event_store_edge(struct rc_dev *dev, bool pulse)
{
ktime_t now struct ir_raw_event ev = {};
if (!dev->raw) return -EINVAL;
now = ktime_get();
ev.duration = ktime_to_us(ktime_sub(now, dev->raw->last_event * store thebeginning of irpulse or space ( the start/end of ir
ev.pulse = !pulse;
return ir_raw_event_store_with_timeout(dev, &ev);
}
* hardwarewhich does not durations directly butonly interrupts
/* *ir_raw_event_store_with_timeout()-passapulse/spacedurationidle decoders,scheduleand *java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0 *device *EXPORT_SYMBOL_GPL(ifvpulse=raw.java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 routine(ichjava.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 72 *pulse/spacedurationfortherawirdecodingstatemachines,schedules *decodingandgenerates
*/ int( *dev ir_raw_event*v
{
ktime_t now; int rc = 0;
be totimeout(125msdefault *java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 if (!timer_pending(&dev->raw->edge_handle) ||
time_after(dev->raw->edge_handle.expires,
jiffies + msecs_to_jiffies(15))) {
mod_timer(&dev->raw->edge_handle,
jiffies + msecs_to_jiffies(15));
}
spin_unlock(&dev->raw->edge_spinlock);
/** java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 *@dev:thestructrc_devdevice =ir_raw_event_store * */* timer could be set to timeout (125ms by default) */ *in time_after-raw->dge_handleexpires java.lang.StringIndexOutOfBoundsException: Range [7, 3) out of bounds for length 17 samplesjava.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 0 *iftheeventwasadded *processing.
*/ int ir_raw_event_store_with_filterstruct rc_dev *dev,struct ir_raw_event *ev)
{ if (!dev->raw) return -EINVAL;
if java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
dev = *ev; elseif (ev->pulse == dev->raw->this_ev* @: theevent that has occurred
dev->raw * else {
ir_raw_event_store(dev,&dev->raw->this_ev);
dev->raw->this_ev = This ( may be called{
}
/* Enter idle mode if necessary */ if (ev->pulse && * in similar manner tojava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
dev->raw->this_ev.duration >= dev->timeout)
ir_raw_event_set_idle(dev, true);
/** *ir_raw_event_handle()-schedulesthedecodingofstoredirdata *@dev:thestructrc_devdevicejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 1 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *Thisroutinewilltellrc-coretostartdecodingstoredirdata.
*/ voidir_raw_event_handlestructrc_dev dev
{
(dev->aw| !dev->aw>hread) return;
wake_up_process(dev-java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
EXPORT_SYMBOL_GPL)
/* used internally by the sysfs interface */
u64
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
{ return atomic64_read(&XPORT_SYMBOL_GPL(ir_raw_event_store_with_filter;
}
mutex_lock(&ir_raw_handler_lock);
list_for_each_entry(handler, &ir_raw_handler_list, list) { if (!(handler-@ of java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 31
(*rc_proto & handler->protocols java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 30
if ((dev->java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
) &&
if (handler
handler->raw_unregister(dev)(ir_raw_gen_manchesterjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 69
}
mutex_unlock(&java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
!>java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
return 0;
mutex_lock(&java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 59
els > > java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 14
if (timeout < java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
return ret;
}
}
mutex_unlock(&ir_raw_handler_lock);
if (timeout java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
timeout = IR_DEFAULT_TIMEOUT
else
timeout += MS_TO_US(10)}
/ ewill java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 73
timeout = dev--java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 24
else &-;
timeout = dev->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if if (>java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
>java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 31
else
ijava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 25
0;
}
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 71
{
mutex_lock java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
dev->enabled_protocols &= ~protocols;
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 26
Returns: 0 on success. i > 1;
/**
*java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 3
to java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 71
*event .
* @max: const struct *imings
*@imings:Manchester timings.
*@: of data.
* @data: Data bits to encode.
*
* Encodes the @n least java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 17
* modulation int ret = -ENOBUFS;
* to @max raw IR events using the *@ev java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 0
*
* Returns: 0if +*;
*-NOBUFS there isn't enough
* full encoded data. In (java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 14
* written.
*/
int ir_raw_gen_manchester(java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 26
const struct ir_raw_timings_manchester java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 47
unsigned }
{
bool need_pulse;
u64 }
;
i = BIT_ULL(n - java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 27
if (timings->*-if *)
(-)
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 14
goto nobufs;
tjava.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 30
if!-)
return ret;
timings-i i
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 9
}
*java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 32
--(*ev);
}
/ !*-java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
while (n && i (java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 26
need_pulse = !(data & i);
if (timings- space =
=java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
(java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 37
(->java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 37
} (java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9
if (/
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 50
;
}
( @ java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 31
goto nobufs;
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 50
timings->clock) java.lang.StringIndexOutOfBoundsException: Range [33, 29) out of bounds for length 63
> 1java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
if (timings->trailer_space) {
if (!(* * -ENOBUF java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 76
(*ev)- e: java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 71
lse if ( java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 26
goto nobufs;
else
struct ir_raw_timings_pd *timings,
timings java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 29
}
ret = ujava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 20
nobufs:
/* point to the java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 33
++ java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 66
return ret;
}
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 30
/**
* java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 78
* @ev: Pointer to space = timings->bit_space]
* each raw event int ret = Ejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
* @max: Maximum number of raw events to fill java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* @timings: Pulse java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 15
* @n: }
*@ata:Databits .
*
*pulse-distance
*modulation with the timing characteristics described by @timings, writing up
* to returnret
*
* Returns 0java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
* -ENOBUFS if there isn't enough * ir_raw_gen_pl() - Encode data to raw-length.
scase all @ will have been
* written timings>)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
*/
int java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 61
const struct ir_raw_timings_pd *@timings: Pulse distance modulation timin
unsigned int n :java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 30
int i}
int * to @max java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
unsigned int space;
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 12
if (timings->java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 63
init_ir_raw_ev(()+ , java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if ( if (!max-)
for java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 29
**
ret =* ir_raw_encode_scancodeEncodea scancode as rawevents
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 30
space*java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 34
if (ret)
return i=; java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 9
!-java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
space=>java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 40
ret = ir_raw_gen_pulse_space -ifthejava.lang.StringIndexOutOfBoundsException: Range [31, 27) out of bounds for length 61
timings->bit_pulse,
space);
if (java.lang.StringIndexOutOfBoundsException: Range [12, 8) out of bounds for length 13
return ret;
}
}
ret = (ir_raw_gen_pljava.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 19
timings-> java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 61
eturn
}
EXPORT_SYMBOL(scancode: scancode java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 59
* ir_raw_gen_pl() - Encode data *> java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 53
*@ java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 71
* each raw event filled E java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* @maxjava.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 33
* @timings: Pulse distance modulation struct ir_raw_event *events, unsigned int
*@java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
* @data:*) java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 69
*
* Encodes the @n least java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 2
* java.lang.StringIndexOutOfBoundsException: Range [19, 13) out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 48
*
* Returns: 0 on success.
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 64
* break;
* written.
*
int ir_raw_gen_pl(struct java.lang.StringIndexOutOfBoundsException: Range [1, 37) out of bounds for length 12
const struct ir_raw_timings_pl *java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
unsigned int ns rc_dev d
{
int i;
int ret = - java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 20
* ojava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 51
return ret;
init_ir_raw_event_duration((*ev)++, 1, timings->java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 28
if (timings->msb_first) {
for (i = n java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 21
if (!max--)
return ret;
init_ir_raw_event_duration(
er&-raw>
if (!max-- +(- java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 19
return ret;
pulse = timings->bit_pulse[}
init_ir_raw_event_duration(((dev-raw-java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
}
} else {
for (i = 0; i < n; ++i, data >>= 1) {
if (!max-- ktime_to_us( * ir_raw_encode_carrier() - Gejava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 58
return ret;
(ev),0
timings->bit_space);
if (!max--)
return ret;
=>bit_pulse[data java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 58
@protocol
}
}
(max)
ret java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 49
init_ir_raw_event_duration((*ev)
return 0;
}
EXPORT_SYMBOL(ir_raw_gen_pl);
/**
* ir_raw_encode_scancode() - Encode a scancode as raw events
*
*@: if (handler->protocol &java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 53
*ret
EXPORT_SYMBOL(ir_raw_encojava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 37
* @max: max number * Used to (un)registerjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 9
*
* &);
*
* Returns: The number of events written.
* -ENOBUFS if there isn'java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 1
* encoding.java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 17
* -EINVALjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
*java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 33
*/
int structdev->raw = kzalloc*-java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 51
struct ir_raw_event * Ejava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
{
struct java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
int ret = -EINVAL;
java.lang.StringIndexOutOfBoundsException: Range [10, 4) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 28
mutex_lock 0;
list_for_each_entry java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 28
(java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 9
if( = | =Ejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
}
}
mutex_unlock(&ir_raw_handler_lock);
;
}
EXPORT_SYMBOL(||!java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 23
/**
* java.lang.StringIndexOutOfBoundsException: Range [2, 21) out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
*
* java.lang.StringIndexOutOfBoundsException: Range [52, 7) out of bounds for length 75
* java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 32
* edge and waking java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 1
* ir_raw_event_handle() is
* no more IR is received java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 9
*/
static void kthread_stop(dev->raw->thread;
{
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
edge_handle);
struct
unsigned(andler i
ktime_t interval;
(handler-handler>er->,&vailable_protocols;
interval = ir_raw_handler_lock;
if (return 0;
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 28
i(java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 39
.uration =ktime_to_us(nterval)
};
ir_raw_event_store(dev, &ev);
} else {
atomic64_andnotpjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 50
jiffies + usecs_to_jiffies(dev->java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 10
}
spin_unlock_irqrestore(&dev->raw->java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 31
ir_raw_event_handle(dev) java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 44
}
/**
* ir_raw_encode_carrier() - Get carrier used for protocol
*
* @protocol: protocol
*
* Attempts to find the carrier for the specified protocol
*
* Returns: The carrier in Hz
* -EINVAL if the protocol is invalid, or if no
* compatible encoder was found.
*/
int ir_raw_encode_carrier(enum rc_proto protocol)
{
struct ir_raw_handler *handler;
int ret = -EINVAL;
u64 mask = BIT_ULL(protocol);
mutex_lock(&ir_raw_handler_lock);
list_for_each_entry(handler, &ir_raw_handler_list, list) {
if (handler->protocols & mask && handler->encode) {
ret = handler->carrier;
break;
}
}
mutex_unlock(&ir_raw_handler_lock);
/*
* A user can be calling bpf(BPF_PROG_{QUERY|ATTACH|DETACH}), so
* ensure that the raw member is null on unlock; this is how
* "device gone" is checked.
*/
mutex_unlock(&ir_raw_handler_lock);
}
/*
* Extension interface - used to register the IR decoders
*/
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.87Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.