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
dcb96e76
Commit
dcb96e76
authored
Mar 11, 2003
by
Russell King
Committed by
Linus Torvalds
Mar 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SERIAL] Add sa1100 serial PM support using device model.
parent
fc93ade6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
drivers/serial/sa1100.c
drivers/serial/sa1100.c
+43
-0
No files found.
drivers/serial/sa1100.c
View file @
dcb96e76
...
...
@@ -32,6 +32,7 @@
#include <linux/serial.h>
#include <linux/console.h>
#include <linux/sysrq.h>
#include <linux/device.h>
#include <asm/io.h>
#include <asm/irq.h>
...
...
@@ -857,12 +858,54 @@ static struct uart_driver sa1100_reg = {
.
cons
=
SA1100_CONSOLE
,
};
static
int
sa1100_serial_suspend
(
struct
device
*
dev
,
u32
state
,
u32
level
)
{
int
i
;
for
(
i
=
0
;
i
<
NR_PORTS
;
i
++
)
uart_suspend_port
(
&
sa1100_reg
,
&
sa1100_ports
[
i
].
port
,
level
);
return
0
;
}
static
int
sa1100_serial_resume
(
struct
device
*
dev
,
u32
level
)
{
int
i
;
for
(
i
=
0
;
i
<
NR_PORTS
;
i
++
)
uart_resume_port
(
&
sa1100_reg
,
&
sa1100_ports
[
i
].
port
,
level
);
return
0
;
}
static
struct
device_driver
sa11x0_serial_driver
=
{
.
name
=
"sa11x0_serial"
,
.
bus
=
&
system_bus_type
,
.
devclass
=
&
tty_devclass
,
.
suspend
=
sa1100_serial_suspend
,
.
resume
=
sa1100_serial_resume
,
};
/*
* This "device" covers _all_ ISA 8250-compatible serial devices.
*/
static
struct
sys_device
sa11x0_serial_devs
=
{
.
name
=
"sa11x0_serial"
,
.
id
=
0
,
.
dev
=
{
.
driver
=
&
sa11x0_serial_driver
,
},
};
static
int
__init
sa1100_serial_init
(
void
)
{
int
ret
;
printk
(
KERN_INFO
"Serial: SA11x0 driver $Revision: 1.50 $
\n
"
);
driver_register
(
&
sa11x0_serial_driver
);
sys_device_register
(
&
sa11x0_serial_devs
);
sa1100_init_ports
();
ret
=
uart_register_driver
(
&
sa1100_reg
);
if
(
ret
==
0
)
{
...
...
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