SyntekUSBVideoCamera
Functions | Variables
stk11xx-sysfs.c File Reference

Driver for Syntek USB video camera. More...

#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/kref.h>
#include <linux/device.h>
#include <linux/mm.h>
#include <linux/usb.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include "stk11xx.h"

Go to the source code of this file.

Functions

static ssize_t show_release (struct device *class, struct device_attribute *attr, char *buf)
 show_release More...
 
static ssize_t show_videostatus (struct device *class, struct device_attribute *attr, char *buf)
 show_videostatus More...
 
static ssize_t show_informations (struct device *class, struct device_attribute *attr, char *buf)
 show_informations More...
 
static ssize_t show_fps (struct device *class, struct device_attribute *attr, char *buf)
 show_fps More...
 
static ssize_t show_brightness (struct device *class, struct device_attribute *attr, char *buf)
 show_brightness More...
 
static ssize_t store_brightness (struct device *class, struct device_attribute *attr, const char *buf, size_t count)
 store_brightness More...
 
static ssize_t show_contrast (struct device *class, struct device_attribute *attr, char *buf)
 show_contrast More...
 
static ssize_t store_contrast (struct device *class, struct device_attribute *attr, const char *buf, size_t count)
 store_contrast More...
 
static ssize_t show_whitebalance (struct device *class, struct device_attribute *attr, char *buf)
 show_whitebalance More...
 
static ssize_t store_whitebalance (struct device *class, struct device_attribute *attr, const char *buf, size_t count)
 store_whitebalance More...
 
static ssize_t show_colour (struct device *class, struct device_attribute *attr, char *buf)
 show_colour More...
 
static ssize_t store_colour (struct device *class, struct device_attribute *attr, const char *buf, size_t count)
 store_colour More...
 
static ssize_t show_hflip (struct device *class, struct device_attribute *attr, char *buf)
 show_hflip More...
 
static ssize_t store_hflip (struct device *class, struct device_attribute *attr, const char *buf, size_t count)
 store_hflip More...
 
static ssize_t show_vflip (struct device *class, struct device_attribute *attr, char *buf)
 show_vflip More...
 
static ssize_t store_vflip (struct device *class, struct device_attribute *attr, const char *buf, size_t count)
 store_vflip More...
 
static DEVICE_ATTR (release, S_IRUGO, show_release, NULL)
 
static DEVICE_ATTR (videostatus, S_IRUGO, show_videostatus, NULL)
 
static DEVICE_ATTR (informations, S_IRUGO, show_informations, NULL)
 
static DEVICE_ATTR (fps, S_IRUGO, show_fps, NULL)
 
static DEVICE_ATTR (brightness, S_IRUGO|S_IWUGO, show_brightness, store_brightness)
 
static DEVICE_ATTR (contrast, S_IRUGO|S_IWUGO, show_contrast, store_contrast)
 
static DEVICE_ATTR (whitebalance, S_IRUGO|S_IWUGO, show_whitebalance, store_whitebalance)
 
static DEVICE_ATTR (colour, S_IRUGO|S_IWUGO, show_colour, store_colour)
 
static DEVICE_ATTR (hflip, S_IRUGO|S_IWUGO, show_hflip, store_hflip)
 
static DEVICE_ATTR (vflip, S_IRUGO|S_IWUGO, show_vflip, store_vflip)
 
int stk11xx_create_sysfs_files (struct video_device *vdev)
 Create the 'sys' entries. More...
 
void stk11xx_remove_sysfs_files (struct video_device *vdev)
 Remove the 'sys' entries. More...
 

Variables

const struct stk11xx_coord stk11xx_image_sizes [STK11XX_NBR_SIZES]
 

Detailed Description

Driver for Syntek USB video camera.

Author
Nicolas VIVIEN
Date
2006-10-23
Version
v2.0.x
Note
Copyright (C) Nicolas VIVIEN
Licences

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 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

SubVersion
Date
2009-03-25 15:13:05 +0100 (mer 25 mar 2009)
Revision
84
Author
nicklas79
HeadURL
https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/tags/2.1.0/stk11xx-sysfs.c

Definition in file stk11xx-sysfs.c.

Function Documentation

◆ DEVICE_ATTR() [1/10]

static DEVICE_ATTR ( brightness  ,
S_IRUGO|  S_IWUGO,
show_brightness  ,
store_brightness   
)
static

Brightness value

◆ DEVICE_ATTR() [2/10]

static DEVICE_ATTR ( colour  ,
S_IRUGO|  S_IWUGO,
show_colour  ,
store_colour   
)
static

Hue value

◆ DEVICE_ATTR() [3/10]

static DEVICE_ATTR ( contrast  ,
S_IRUGO|  S_IWUGO,
show_contrast  ,
store_contrast   
)
static

Contrast value

◆ DEVICE_ATTR() [4/10]

static DEVICE_ATTR ( fps  ,
S_IRUGO  ,
show_fps  ,
NULL   
)
static

FPS value

◆ DEVICE_ATTR() [5/10]

static DEVICE_ATTR ( hflip  ,
S_IRUGO|  S_IWUGO,
show_hflip  ,
store_hflip   
)
static

Horizontal filp value

◆ DEVICE_ATTR() [6/10]

static DEVICE_ATTR ( informations  ,
S_IRUGO  ,
show_informations  ,
NULL   
)
static

Informations

◆ DEVICE_ATTR() [7/10]

static DEVICE_ATTR ( release  ,
S_IRUGO  ,
show_release  ,
NULL   
)
static

Release value

◆ DEVICE_ATTR() [8/10]

static DEVICE_ATTR ( vflip  ,
S_IRUGO|  S_IWUGO,
show_vflip  ,
store_vflip   
)
static

Vertical filp value

◆ DEVICE_ATTR() [9/10]

static DEVICE_ATTR ( videostatus  ,
S_IRUGO  ,
show_videostatus  ,
NULL   
)
static

Video status

◆ DEVICE_ATTR() [10/10]

static DEVICE_ATTR ( whitebalance  ,
S_IRUGO|  S_IWUGO,
show_whitebalance  ,
store_whitebalance   
)
static

Whitebalance value

◆ show_brightness()

static ssize_t show_brightness ( struct device *  class,
struct device_attribute *  attr,
char *  buf 
)
static

show_brightness

Parameters
classClass device
Return values
bufAdress of buffer with the 'brightness' value
Returns
Size of buffer

Definition at line 220 of file stk11xx-sysfs.c.

References stk11xx_video::brightness, usb_stk11xx::vdev, and usb_stk11xx::vsettings.

◆ show_colour()

static ssize_t show_colour ( struct device *  class,
struct device_attribute *  attr,
char *  buf 
)
static

show_colour

Parameters
classClass device
Return values
bufAdress of buffer with the 'colour' value
Returns
Size of buffer

Definition at line 357 of file stk11xx-sysfs.c.

References stk11xx_video::colour, usb_stk11xx::vdev, and usb_stk11xx::vsettings.

◆ show_contrast()

static ssize_t show_contrast ( struct device *  class,
struct device_attribute *  attr,
char *  buf 
)
static

show_contrast

Parameters
classClass device
Return values
bufAdress of buffer with the 'contrast' value
Returns
Size of buffer

Definition at line 265 of file stk11xx-sysfs.c.

References stk11xx_video::contrast, usb_stk11xx::vdev, and usb_stk11xx::vsettings.

◆ show_fps()

static ssize_t show_fps ( struct device *  class,
struct device_attribute *  attr,
char *  buf 
)
static

show_fps

Parameters
classClass device
Return values
bufAdress of buffer with the 'fps' value
Returns
Size of buffer

Definition at line 202 of file stk11xx-sysfs.c.

References stk11xx_video::fps, usb_stk11xx::vdev, and usb_stk11xx::vsettings.

◆ show_hflip()

static ssize_t show_hflip ( struct device *  class,
struct device_attribute *  attr,
char *  buf 
)
static

show_hflip

Parameters
classClass device
Return values
bufAdress of buffer with the 'hflip' value
Returns
Size of buffer

Definition at line 403 of file stk11xx-sysfs.c.

References stk11xx_video::hflip, usb_stk11xx::vdev, and usb_stk11xx::vsettings.

◆ show_informations()

static ssize_t show_informations ( struct device *  class,
struct device_attribute *  attr,
char *  buf 
)
static

show_informations

Parameters
classClass device
Return values
bufAdress of buffer with the 'informations' value
Returns
Size of buffer

Definition at line 106 of file stk11xx-sysfs.c.

References stk11xx_video::palette, usb_stk11xx::vdev, and usb_stk11xx::vsettings.

◆ show_release()

static ssize_t show_release ( struct device *  class,
struct device_attribute *  attr,
char *  buf 
)
static

show_release

Parameters
classClass device
Return values
bufAdress of buffer with the 'release' value
Returns
Size of buffer

Definition at line 64 of file stk11xx-sysfs.c.

References usb_stk11xx::release, and usb_stk11xx::vdev.

◆ show_vflip()

static ssize_t show_vflip ( struct device *  class,
struct device_attribute *  attr,
char *  buf 
)
static

show_vflip

Parameters
classClass device
Return values
bufAdress of buffer with the 'vflip' value
Returns
Size of buffer

Definition at line 447 of file stk11xx-sysfs.c.

References usb_stk11xx::vdev, stk11xx_video::vflip, and usb_stk11xx::vsettings.

◆ show_videostatus()

static ssize_t show_videostatus ( struct device *  class,
struct device_attribute *  attr,
char *  buf 
)
static

show_videostatus

Parameters
classClass device
Return values
bufAdress of buffer with the 'videostatus' value
Returns
Size of buffer

Definition at line 82 of file stk11xx-sysfs.c.

References usb_stk11xx::vdev, usb_stk11xx::vframes_dumped, usb_stk11xx::vframes_error, and usb_stk11xx::visoc_errors.

◆ show_whitebalance()

static ssize_t show_whitebalance ( struct device *  class,
struct device_attribute *  attr,
char *  buf 
)
static

show_whitebalance

Parameters
classClass device
Return values
bufAdress of buffer with the 'whitebalance' value
Returns
Size of buffer

Definition at line 311 of file stk11xx-sysfs.c.

References usb_stk11xx::vdev, usb_stk11xx::vsettings, and stk11xx_video::whiteness.

◆ stk11xx_create_sysfs_files()

int stk11xx_create_sysfs_files ( struct video_device *  vdev)

Create the 'sys' entries.

This function permits to create all the entries in the 'sys' filesystem.

Parameters
vdevVideo device structure
Returns
0 if all is OK

Definition at line 502 of file stk11xx-sysfs.c.

References usb_stk11xx::vdev.

◆ stk11xx_remove_sysfs_files()

void stk11xx_remove_sysfs_files ( struct video_device *  vdev)

Remove the 'sys' entries.

This function permits to remove all the entries in the 'sys' filesystem.

Parameters
vdevVideo device structure
Returns
0 if all is OK

Definition at line 530 of file stk11xx-sysfs.c.

References usb_stk11xx::vdev.

◆ store_brightness()

static ssize_t store_brightness ( struct device *  class,
struct device_attribute *  attr,
const char *  buf,
size_t  count 
)
static

store_brightness

Parameters
classClass device
bufBuffer
countCounter
Returns
Size of buffer

Definition at line 238 of file stk11xx-sysfs.c.

References stk11xx_video::brightness, dev_stk11xx_set_camera_quality(), usb_stk11xx::vdev, and usb_stk11xx::vsettings.

◆ store_colour()

static ssize_t store_colour ( struct device *  class,
struct device_attribute *  attr,
const char *  buf,
size_t  count 
)
static

store_colour

Parameters
classClass device
bufBuffer
countCounter
Returns
Size of buffer

Definition at line 375 of file stk11xx-sysfs.c.

References stk11xx_video::colour, dev_stk11xx_set_camera_quality(), usb_stk11xx::vdev, and usb_stk11xx::vsettings.

◆ store_contrast()

static ssize_t store_contrast ( struct device *  class,
struct device_attribute *  attr,
const char *  buf,
size_t  count 
)
static

store_contrast

Parameters
classClass device
bufBuffer
countCounter
Returns
Size of buffer

Definition at line 283 of file stk11xx-sysfs.c.

References stk11xx_video::contrast, dev_stk11xx_set_camera_quality(), usb_stk11xx::vdev, and usb_stk11xx::vsettings.

◆ store_hflip()

static ssize_t store_hflip ( struct device *  class,
struct device_attribute *  attr,
const char *  buf,
size_t  count 
)
static

store_hflip

Parameters
classClass device
bufBuffer
countCounter
Returns
Size of buffer

Definition at line 421 of file stk11xx-sysfs.c.

References stk11xx_video::hflip, usb_stk11xx::vdev, and usb_stk11xx::vsettings.

◆ store_vflip()

static ssize_t store_vflip ( struct device *  class,
struct device_attribute *  attr,
const char *  buf,
size_t  count 
)
static

store_vflip

Parameters
classClass device
bufBuffer
countCounter
Returns
Size of buffer

Definition at line 465 of file stk11xx-sysfs.c.

References usb_stk11xx::vdev, stk11xx_video::vflip, and usb_stk11xx::vsettings.

◆ store_whitebalance()

static ssize_t store_whitebalance ( struct device *  class,
struct device_attribute *  attr,
const char *  buf,
size_t  count 
)
static

store_whitebalance

Parameters
classClass device
bufBuffer
countCounter
Returns
Size of buffer

Definition at line 329 of file stk11xx-sysfs.c.

References dev_stk11xx_set_camera_quality(), usb_stk11xx::vdev, usb_stk11xx::vsettings, and stk11xx_video::whiteness.

Variable Documentation

◆ stk11xx_image_sizes

stk11xx_image_sizes
extern

List of all resolutions supported by the driver

Definition at line 1 of file stk11xx-v4l.c.