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
66d52b89
Commit
66d52b89
authored
Apr 28, 2002
by
Dave Jones
Committed by
Jaroslav Kysela
Apr 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sonypi update.
From Stelian, already in 2.4
parent
39992f07
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
Documentation/sonypi.txt
Documentation/sonypi.txt
+4
-1
drivers/char/sonypi.c
drivers/char/sonypi.c
+14
-3
drivers/char/sonypi.h
drivers/char/sonypi.h
+2
-1
No files found.
Documentation/sonypi.txt
View file @
66d52b89
...
...
@@ -43,7 +43,7 @@ Several options can be passed to the sonypi driver, either by adding them
to /etc/modules.conf file, when the driver is compiled as a module or by
adding the following to the kernel command line (in your bootloader):
sonypi=minor[[[[
,camera],fnkeyinit],verbose],compat
]
sonypi=minor[[[[
[,camera],fnkeyinit],verbose],compat],nojogdial
]
where:
...
...
@@ -71,6 +71,9 @@ where:
(prior to version 1.5) and does not work anymore,
add this option and report to the author.
nojogdial: gives more accurate PKEY events on those Vaio models
which don't have a jogdial (like the FX series).
Module use:
-----------
...
...
drivers/char/sonypi.c
View file @
66d52b89
...
...
@@ -50,6 +50,7 @@ static int verbose; /* = 0 */
static
int
fnkeyinit
;
/* = 0 */
static
int
camera
;
/* = 0 */
static
int
compat
;
/* = 0 */
static
int
nojogdial
;
/* = 0 */
/* Inits the queue */
static
inline
void
sonypi_initq
(
void
)
{
...
...
@@ -310,24 +311,28 @@ void sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) {
int
i
;
u8
sonypi_jogger_ev
,
sonypi_fnkey_ev
;
u8
sonypi_capture_ev
,
sonypi_bluetooth_ev
;
u8
sonypi_pkey_ev
;
if
(
sonypi_device
.
model
==
SONYPI_DEVICE_MODEL_TYPE2
)
{
sonypi_jogger_ev
=
SONYPI_TYPE2_JOGGER_EV
;
sonypi_fnkey_ev
=
SONYPI_TYPE2_FNKEY_EV
;
sonypi_capture_ev
=
SONYPI_TYPE2_CAPTURE_EV
;
sonypi_bluetooth_ev
=
SONYPI_TYPE2_BLUETOOTH_EV
;
sonypi_pkey_ev
=
nojogdial
?
SONYPI_TYPE2_PKEY_EV
:
SONYPI_TYPE1_PKEY_EV
;
}
else
{
sonypi_jogger_ev
=
SONYPI_TYPE1_JOGGER_EV
;
sonypi_fnkey_ev
=
SONYPI_TYPE1_FNKEY_EV
;
sonypi_capture_ev
=
SONYPI_TYPE1_CAPTURE_EV
;
sonypi_bluetooth_ev
=
SONYPI_TYPE1_BLUETOOTH_EV
;
sonypi_pkey_ev
=
SONYPI_TYPE1_PKEY_EV
;
}
v1
=
inb_p
(
sonypi_device
.
ioport1
);
v2
=
inb_p
(
sonypi_device
.
ioport2
);
if
((
v2
&
SONYPI_TYPE1_PKEY_EV
)
==
SONYPI_TYPE1_PKEY_EV
)
{
if
((
v2
&
sonypi_pkey_ev
)
==
sonypi_pkey_ev
)
{
for
(
i
=
0
;
sonypi_pkeyev
[
i
].
event
;
i
++
)
if
(
sonypi_pkeyev
[
i
].
data
==
v1
)
{
event
=
sonypi_pkeyev
[
i
].
event
;
...
...
@@ -713,11 +718,12 @@ static int __devinit sonypi_probe(struct pci_dev *pcidev) {
SONYPI_DRIVER_MAJORVERSION
,
SONYPI_DRIVER_MINORVERSION
);
printk
(
KERN_INFO
"sonypi: detected %s model, "
"camera = %s, compat = %s
\n
"
,
"camera = %s, compat = %s
, nojogdial = %s
\n
"
,
(
sonypi_device
.
model
==
SONYPI_DEVICE_MODEL_TYPE1
)
?
"type1"
:
"type2"
,
camera
?
"on"
:
"off"
,
compat
?
"on"
:
"off"
);
compat
?
"on"
:
"off"
,
nojogdial
?
"on"
:
"off"
);
printk
(
KERN_INFO
"sonypi: enabled at irq=%d, port1=0x%x, port2=0x%x
\n
"
,
sonypi_device
.
irq
,
sonypi_device
.
ioport1
,
sonypi_device
.
ioport2
);
...
...
@@ -791,6 +797,9 @@ static int __init sonypi_setup(char *str) {
if
(
ints
[
0
]
==
4
)
goto
out
;
compat
=
ints
[
5
];
if
(
ints
[
0
]
==
5
)
goto
out
;
nojogdial
=
ints
[
6
];
out:
return
1
;
}
...
...
@@ -817,5 +826,7 @@ MODULE_PARM(camera,"i");
MODULE_PARM_DESC
(
camera
,
"set this if you have a MotionEye camera (PictureBook series)"
);
MODULE_PARM
(
compat
,
"i"
);
MODULE_PARM_DESC
(
compat
,
"set this if you want to enable backward compatibility mode"
);
MODULE_PARM
(
nojogdial
,
"i"
);
MODULE_PARM_DESC
(
nojogdial
,
"set this if you have a Vaio without a jogdial (like the fx series)"
);
EXPORT_SYMBOL
(
sonypi_camera_command
);
drivers/char/sonypi.h
View file @
66d52b89
...
...
@@ -35,7 +35,7 @@
#ifdef __KERNEL__
#define SONYPI_DRIVER_MAJORVERSION 1
#define SONYPI_DRIVER_MINORVERSION 1
0
#define SONYPI_DRIVER_MINORVERSION 1
1
#include <linux/types.h>
#include <linux/pci.h>
...
...
@@ -141,6 +141,7 @@ static struct sonypi_irq_list sonypi_type2_irq_list[] = {
#define SONYPI_TYPE1_BLUETOOTH_EV 0x30
#define SONYPI_TYPE2_BLUETOOTH_EV 0x08
#define SONYPI_TYPE1_PKEY_EV 0x40
#define SONYPI_TYPE2_PKEY_EV 0x08
#define SONYPI_BACK_EV 0x08
#define SONYPI_LID_EV 0x38
...
...
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