mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 23:26:45 +07:00
02bee89e79
This patch adds files to control si4713 devices. Internal functions to control device properties and initialization procedures are into these files. Also, a v4l2 subdev interface is also exported. This way other drivers can use this as v4l2 i2c subdevice. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
50 lines
1.4 KiB
C
50 lines
1.4 KiB
C
/*
|
|
* include/media/si4713.h
|
|
*
|
|
* Board related data definitions for Si4713 i2c device driver.
|
|
*
|
|
* Copyright (c) 2009 Nokia Corporation
|
|
* Contact: Eduardo Valentin <eduardo.valentin@nokia.com>
|
|
*
|
|
* This file is licensed under the terms of the GNU General Public License
|
|
* version 2. This program is licensed "as is" without any warranty of any
|
|
* kind, whether express or implied.
|
|
*
|
|
*/
|
|
|
|
#ifndef SI4713_H
|
|
#define SI4713_H
|
|
|
|
/* The SI4713 I2C sensor chip has a fixed slave address of 0xc6 or 0x22. */
|
|
#define SI4713_I2C_ADDR_BUSEN_HIGH 0x63
|
|
#define SI4713_I2C_ADDR_BUSEN_LOW 0x11
|
|
|
|
/*
|
|
* Platform dependent definition
|
|
*/
|
|
struct si4713_platform_data {
|
|
/* Set power state, zero is off, non-zero is on. */
|
|
int (*set_power)(int power);
|
|
};
|
|
|
|
/*
|
|
* Structure to query for Received Noise Level (RNL).
|
|
*/
|
|
struct si4713_rnl {
|
|
__u32 index; /* modulator index */
|
|
__u32 frequency; /* frequency to peform rnl measurement */
|
|
__s32 rnl; /* result of measurement in dBuV */
|
|
__u32 reserved[4]; /* drivers and apps must init this to 0 */
|
|
};
|
|
|
|
/*
|
|
* This is the ioctl number to query for rnl. Users must pass a
|
|
* struct si4713_rnl pointer specifying desired frequency in 'frequency' field
|
|
* following driver capabilities (i.e V4L2_TUNER_CAP_LOW).
|
|
* Driver must return measured value in the same struture, filling 'rnl' field.
|
|
*/
|
|
#define SI4713_IOC_MEASURE_RNL _IOWR('V', BASE_VIDIOC_PRIVATE + 0, \
|
|
struct si4713_rnl)
|
|
|
|
#endif /* ifndef SI4713_H*/
|