Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a6e3b81f
Commit
a6e3b81f
authored
Nov 17, 2010
by
Mauro Carvalho Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[media] rc: Remove ir-common.h
Signed-off-by:
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
parent
bce8d0fe
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
85 additions
and
96 deletions
+85
-96
drivers/media/video/bt8xx/bttv-input.c
drivers/media/video/bt8xx/bttv-input.c
+5
-0
drivers/media/video/bt8xx/bttv.h
drivers/media/video/bt8xx/bttv.h
+0
-1
drivers/media/video/bt8xx/bttvp.h
drivers/media/video/bt8xx/bttvp.h
+42
-1
drivers/media/video/saa7134/saa7134-input.c
drivers/media/video/saa7134/saa7134-input.c
+15
-15
drivers/media/video/saa7134/saa7134.h
drivers/media/video/saa7134/saa7134.h
+22
-1
include/media/ir-common.h
include/media/ir-common.h
+0
-77
include/media/ir-kbd-i2c.h
include/media/ir-kbd-i2c.h
+1
-1
No files found.
drivers/media/video/bt8xx/bttv-input.c
View file @
a6e3b81f
...
...
@@ -147,6 +147,11 @@ static void bttv_input_timer(unsigned long data)
* testing.
*/
#define RC5_START(x) (((x) >> 12) & 3)
#define RC5_TOGGLE(x) (((x) >> 11) & 1)
#define RC5_ADDR(x) (((x) >> 6) & 31)
#define RC5_INSTR(x) ((x) & 63)
/* decode raw bit pattern to RC5 code */
static
u32
bttv_rc5_decode
(
unsigned
int
code
)
{
...
...
drivers/media/video/bt8xx/bttv.h
View file @
a6e3b81f
...
...
@@ -17,7 +17,6 @@
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <media/v4l2-device.h>
#include <media/ir-common.h>
#include <media/i2c-addr.h>
#include <media/tuner.h>
...
...
drivers/media/video/bt8xx/bttvp.h
View file @
a6e3b81f
...
...
@@ -41,7 +41,7 @@
#include <linux/device.h>
#include <media/videobuf-dma-sg.h>
#include <media/tveeprom.h>
#include <media/ir-co
mmon
.h>
#include <media/ir-co
re
.h>
#include <media/ir-kbd-i2c.h>
#include "bt848.h"
...
...
@@ -120,6 +120,47 @@ struct bttv_format {
int
hshift
,
vshift
;
/* for planar modes */
};
struct
card_ir
{
struct
rc_dev
*
dev
;
char
name
[
32
];
char
phys
[
32
];
#if 0
int users;
u32 running:1;
#endif
/* Usual gpio signalling */
u32
mask_keycode
;
u32
mask_keydown
;
u32
mask_keyup
;
u32
polling
;
u32
last_gpio
;
int
shift_by
;
int
start
;
// What should RC5_START() be
int
addr
;
// What RC5_ADDR() should be.
int
rc5_remote_gap
;
struct
work_struct
work
;
struct
timer_list
timer
;
/* RC5 gpio */
u32
rc5_gpio
;
struct
timer_list
timer_end
;
/* timer_end for code completion */
u32
last_bit
;
/* last raw bit seen */
u32
code
;
/* raw code under construction */
struct
timeval
base_time
;
/* time of last seen code */
int
active
;
/* building raw code */
#if 0
/* NEC decoding */
u32 nec_gpio;
struct tasklet_struct tlet;
/* IR core raw decoding */
u32 raw_decode;
#endif
};
/* ---------------------------------------------------------- */
struct
bttv_geometry
{
...
...
drivers/media/video/saa7134/saa7134-input.c
View file @
a6e3b81f
...
...
@@ -61,7 +61,7 @@ static int saa7134_raw_decode_irq(struct saa7134_dev *dev);
static
int
build_key
(
struct
saa7134_dev
*
dev
)
{
struct
card_ir
*
ir
=
dev
->
remote
;
struct
saa7134_
card_ir
*
ir
=
dev
->
remote
;
u32
gpio
,
data
;
/* here comes the additional handshake steps for some cards */
...
...
@@ -385,7 +385,7 @@ static int get_key_pinnacle_color(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
void
saa7134_input_irq
(
struct
saa7134_dev
*
dev
)
{
struct
card_ir
*
ir
;
struct
saa7134_
card_ir
*
ir
;
if
(
!
dev
||
!
dev
->
remote
)
return
;
...
...
@@ -404,7 +404,7 @@ void saa7134_input_irq(struct saa7134_dev *dev)
static
void
saa7134_input_timer
(
unsigned
long
data
)
{
struct
saa7134_dev
*
dev
=
(
struct
saa7134_dev
*
)
data
;
struct
card_ir
*
ir
=
dev
->
remote
;
struct
saa7134_
card_ir
*
ir
=
dev
->
remote
;
build_key
(
dev
);
mod_timer
(
&
ir
->
timer
,
jiffies
+
msecs_to_jiffies
(
ir
->
polling
));
...
...
@@ -413,17 +413,17 @@ static void saa7134_input_timer(unsigned long data)
static
void
ir_raw_decode_timer_end
(
unsigned
long
data
)
{
struct
saa7134_dev
*
dev
=
(
struct
saa7134_dev
*
)
data
;
struct
card_ir
*
ir
=
dev
->
remote
;
struct
saa7134_
card_ir
*
ir
=
dev
->
remote
;
ir_raw_event_handle
(
dev
->
remote
->
dev
);
ir
->
active
=
0
;
ir
->
active
=
false
;
}
static
int
__saa7134_ir_start
(
void
*
priv
)
{
struct
saa7134_dev
*
dev
=
priv
;
struct
card_ir
*
ir
;
struct
saa7134_
card_ir
*
ir
;
if
(
!
dev
)
return
-
EINVAL
;
...
...
@@ -435,7 +435,7 @@ static int __saa7134_ir_start(void *priv)
if
(
ir
->
running
)
return
0
;
ir
->
running
=
1
;
ir
->
running
=
true
;
if
(
ir
->
polling
)
{
setup_timer
(
&
ir
->
timer
,
saa7134_input_timer
,
(
unsigned
long
)
dev
);
...
...
@@ -446,7 +446,7 @@ static int __saa7134_ir_start(void *priv)
init_timer
(
&
ir
->
timer_end
);
ir
->
timer_end
.
function
=
ir_raw_decode_timer_end
;
ir
->
timer_end
.
data
=
(
unsigned
long
)
dev
;
ir
->
active
=
0
;
ir
->
active
=
false
;
}
return
0
;
...
...
@@ -455,7 +455,7 @@ static int __saa7134_ir_start(void *priv)
static
void
__saa7134_ir_stop
(
void
*
priv
)
{
struct
saa7134_dev
*
dev
=
priv
;
struct
card_ir
*
ir
;
struct
saa7134_
card_ir
*
ir
;
if
(
!
dev
)
return
;
...
...
@@ -470,10 +470,10 @@ static void __saa7134_ir_stop(void *priv)
del_timer_sync
(
&
dev
->
remote
->
timer
);
else
if
(
ir
->
raw_decode
)
{
del_timer_sync
(
&
ir
->
timer_end
);
ir
->
active
=
0
;
ir
->
active
=
false
;
}
ir
->
running
=
0
;
ir
->
running
=
false
;
return
;
}
...
...
@@ -511,7 +511,7 @@ static void saa7134_ir_close(struct rc_dev *rc)
int
saa7134_input_init1
(
struct
saa7134_dev
*
dev
)
{
struct
card_ir
*
ir
;
struct
saa7134_
card_ir
*
ir
;
struct
rc_dev
*
rc
;
char
*
ir_codes
=
NULL
;
u32
mask_keycode
=
0
;
...
...
@@ -764,7 +764,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
ir
->
dev
=
rc
;
dev
->
remote
=
ir
;
ir
->
running
=
0
;
ir
->
running
=
false
;
/* init hardware-specific stuff */
ir
->
mask_keycode
=
mask_keycode
;
...
...
@@ -934,7 +934,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
static
int
saa7134_raw_decode_irq
(
struct
saa7134_dev
*
dev
)
{
struct
card_ir
*
ir
=
dev
->
remote
;
struct
saa7134_
card_ir
*
ir
=
dev
->
remote
;
unsigned
long
timeout
;
int
space
;
...
...
@@ -953,7 +953,7 @@ static int saa7134_raw_decode_irq(struct saa7134_dev *dev)
if
(
!
ir
->
active
)
{
timeout
=
jiffies
+
jiffies_to_msecs
(
15
);
mod_timer
(
&
ir
->
timer_end
,
timeout
);
ir
->
active
=
1
;
ir
->
active
=
true
;
}
return
1
;
...
...
drivers/media/video/saa7134/saa7134.h
View file @
a6e3b81f
...
...
@@ -119,6 +119,27 @@ struct saa7134_format {
unsigned
int
uvswap
:
1
;
};
struct
saa7134_card_ir
{
struct
rc_dev
*
dev
;
char
name
[
32
];
char
phys
[
32
];
int
users
;
u32
polling
;
u32
last_gpio
;
u32
mask_keycode
,
mask_keydown
,
mask_keyup
;
bool
running
;
bool
active
;
struct
timer_list
timer
;
struct
timer_list
timer_end
;
/* timer_end for code completion */
/* IR core raw decoding */
u32
raw_decode
;
};
/* ----------------------------------------------------------- */
/* card configuration */
...
...
@@ -530,7 +551,7 @@ struct saa7134_dev {
/* infrared remote */
int
has_remote
;
struct
card_ir
*
remote
;
struct
saa7134_
card_ir
*
remote
;
/* pci i/o */
char
name
[
32
];
...
...
include/media/ir-common.h
deleted
100644 → 0
View file @
bce8d0fe
/*
* some common functions to handle infrared remote protocol decoding for
* drivers which have not yet been (or can't be) converted to use the
* regular protocol decoders...
*
* (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _IR_COMMON
#define _IR_COMMON
#include <linux/input.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <media/ir-core.h>
#define RC5_START(x) (((x)>>12)&3)
#define RC5_TOGGLE(x) (((x)>>11)&1)
#define RC5_ADDR(x) (((x)>>6)&31)
#define RC5_INSTR(x) ((x)&63)
/* this was saa7134_ir and bttv_ir, moved here for
* rc5 decoding. */
struct
card_ir
{
struct
rc_dev
*
dev
;
char
name
[
32
];
char
phys
[
32
];
int
users
;
u32
running
:
1
;
/* Usual gpio signalling */
u32
mask_keycode
;
u32
mask_keydown
;
u32
mask_keyup
;
u32
polling
;
u32
last_gpio
;
int
shift_by
;
int
start
;
// What should RC5_START() be
int
addr
;
// What RC5_ADDR() should be.
int
rc5_remote_gap
;
struct
work_struct
work
;
struct
timer_list
timer
;
/* RC5 gpio */
u32
rc5_gpio
;
struct
timer_list
timer_end
;
/* timer_end for code completion */
u32
last_bit
;
/* last raw bit seen */
u32
code
;
/* raw code under construction */
struct
timeval
base_time
;
/* time of last seen code */
int
active
;
/* building raw code */
/* NEC decoding */
u32
nec_gpio
;
struct
tasklet_struct
tlet
;
/* IR core raw decoding */
u32
raw_decode
;
};
/* Routines from ir-functions.c */
void
ir_rc5_timer_end
(
unsigned
long
data
);
#endif
include/media/ir-kbd-i2c.h
View file @
a6e3b81f
#ifndef _IR_I2C
#define _IR_I2C
#include <media/ir-co
mmon
.h>
#include <media/ir-co
re
.h>
#define DEFAULT_POLLING_INTERVAL 100
/* ms */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment