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
ed9ce517
Commit
ed9ce517
authored
Feb 20, 2003
by
Stelian Pop
Committed by
Linus Torvalds
Feb 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] meye suspend/resume capabilities
This adds suspend/resume capabilities to the meye driver.
parent
90c25ebb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
5 deletions
+55
-5
Documentation/video4linux/meye.txt
Documentation/video4linux/meye.txt
+1
-1
drivers/media/video/meye.c
drivers/media/video/meye.c
+41
-1
drivers/media/video/meye.h
drivers/media/video/meye.h
+12
-2
include/linux/meye.h
include/linux/meye.h
+1
-1
No files found.
Documentation/video4linux/meye.txt
View file @
ed9ce517
Vaio Picturebook Motion Eye Camera Driver Readme
------------------------------------------------
Copyright (C) 2001-200
2
Stelian Pop <stelian@popies.net>
Copyright (C) 2001-200
3
Stelian Pop <stelian@popies.net>
Copyright (C) 2001-2002 Alcôve <www.alcove.com>
Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
...
...
drivers/media/video/meye.c
View file @
ed9ce517
/*
* Motion Eye video4linux driver for Sony Vaio PictureBook
*
* Copyright (C) 2001-200
2
Stelian Pop <stelian@popies.net>
* Copyright (C) 2001-200
3
Stelian Pop <stelian@popies.net>
*
* Copyright (C) 2001-2002 Alcve <www.alcove.com>
*
...
...
@@ -1225,6 +1225,42 @@ static struct video_device meye_template = {
.
fops
=
&
meye_fops
,
};
#ifdef CONFIG_PM
static
int
meye_suspend
(
struct
pci_dev
*
pdev
,
u32
state
)
{
pci_save_state
(
pdev
,
meye
.
pm_state
);
meye
.
pm_mchip_mode
=
meye
.
mchip_mode
;
mchip_hic_stop
();
mchip_set
(
MCHIP_MM_INTA
,
0x0
);
return
0
;
}
static
int
meye_resume
(
struct
pci_dev
*
pdev
)
{
pci_restore_state
(
pdev
,
meye
.
pm_state
);
pci_write_config_word
(
meye
.
mchip_dev
,
MCHIP_PCI_SOFTRESET_SET
,
1
);
mchip_delay
(
MCHIP_HIC_CMD
,
0
);
mchip_delay
(
MCHIP_HIC_STATUS
,
MCHIP_HIC_STATUS_IDLE
);
wait_ms
(
1
);
mchip_set
(
MCHIP_VRJ_SOFT_RESET
,
1
);
wait_ms
(
1
);
mchip_set
(
MCHIP_MM_PCI_MODE
,
5
);
wait_ms
(
1
);
mchip_set
(
MCHIP_MM_INTA
,
MCHIP_MM_INTA_HIC_1_MASK
);
switch
(
meye
.
pm_mchip_mode
)
{
case
MCHIP_HIC_MODE_CONT_OUT
:
mchip_continuous_start
();
break
;
case
MCHIP_HIC_MODE_CONT_COMP
:
mchip_cont_compression_start
();
break
;
}
return
0
;
}
#endif
static
int
__devinit
meye_probe
(
struct
pci_dev
*
pcidev
,
const
struct
pci_device_id
*
ent
)
{
int
ret
;
...
...
@@ -1391,6 +1427,10 @@ static struct pci_driver meye_driver = {
.
id_table
=
meye_pci_tbl
,
.
probe
=
meye_probe
,
.
remove
=
__devexit_p
(
meye_remove
),
#ifdef CONFIG_PM
.
suspend
=
meye_suspend
,
.
resume
=
meye_resume
,
#endif
};
static
int
__init
meye_init_module
(
void
)
{
...
...
drivers/media/video/meye.h
View file @
ed9ce517
/*
* Motion Eye video4linux driver for Sony Vaio PictureBook
*
* Copyright (C) 2001-200
2
Stelian Pop <stelian@popies.net>
* Copyright (C) 2001-200
3
Stelian Pop <stelian@popies.net>
*
* Copyright (C) 2001-2002 Alcve <www.alcove.com>
*
...
...
@@ -31,7 +31,13 @@
#define _MEYE_PRIV_H_
#define MEYE_DRIVER_MAJORVERSION 1
#define MEYE_DRIVER_MINORVERSION 5
#define MEYE_DRIVER_MINORVERSION 6
#include <linux/config.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/sonypi.h>
#include <linux/meye.h>
/****************************************************************************/
/* Motion JPEG chip registers */
...
...
@@ -309,6 +315,10 @@ struct meye {
struct
video_device
video_dev
;
/* video device parameters */
struct
video_picture
picture
;
/* video picture parameters */
struct
meye_params
params
;
/* additional parameters */
#ifdef CONFIG_PM
u32
pm_state
[
16
];
/* PCI configuration space */
u8
pm_mchip_mode
;
/* old mchip mode */
#endif
};
#endif
include/linux/meye.h
View file @
ed9ce517
/*
* Motion Eye video4linux driver for Sony Vaio PictureBook
*
* Copyright (C) 2001-200
2
Stelian Pop <stelian@popies.net>
* Copyright (C) 2001-200
3
Stelian Pop <stelian@popies.net>
*
* Copyright (C) 2001-2002 Alcve <www.alcove.com>
*
...
...
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