1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * include/linux/platform_data/media/si4713.h 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Board related data definitions for Si4713 i2c device driver. 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * Copyright (c) 2009 Nokia Corporation 7*4882a593Smuzhiyun * Contact: Eduardo Valentin <eduardo.valentin@nokia.com> 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * This file is licensed under the terms of the GNU General Public License 10*4882a593Smuzhiyun * version 2. This program is licensed "as is" without any warranty of any 11*4882a593Smuzhiyun * kind, whether express or implied. 12*4882a593Smuzhiyun * 13*4882a593Smuzhiyun */ 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun #ifndef SI4713_H 16*4882a593Smuzhiyun #define SI4713_H 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun /* The SI4713 I2C sensor chip has a fixed slave address of 0xc6 or 0x22. */ 19*4882a593Smuzhiyun #define SI4713_I2C_ADDR_BUSEN_HIGH 0x63 20*4882a593Smuzhiyun #define SI4713_I2C_ADDR_BUSEN_LOW 0x11 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun /* 23*4882a593Smuzhiyun * Platform dependent definition 24*4882a593Smuzhiyun */ 25*4882a593Smuzhiyun struct si4713_platform_data { 26*4882a593Smuzhiyun bool is_platform_device; 27*4882a593Smuzhiyun }; 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun /* 30*4882a593Smuzhiyun * Structure to query for Received Noise Level (RNL). 31*4882a593Smuzhiyun */ 32*4882a593Smuzhiyun struct si4713_rnl { 33*4882a593Smuzhiyun __u32 index; /* modulator index */ 34*4882a593Smuzhiyun __u32 frequency; /* frequency to perform rnl measurement */ 35*4882a593Smuzhiyun __s32 rnl; /* result of measurement in dBuV */ 36*4882a593Smuzhiyun __u32 reserved[4]; /* drivers and apps must init this to 0 */ 37*4882a593Smuzhiyun }; 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun /* 40*4882a593Smuzhiyun * This is the ioctl number to query for rnl. Users must pass a 41*4882a593Smuzhiyun * struct si4713_rnl pointer specifying desired frequency in 'frequency' field 42*4882a593Smuzhiyun * following driver capabilities (i.e V4L2_TUNER_CAP_LOW). 43*4882a593Smuzhiyun * Driver must return measured value in the same structure, filling 'rnl' field. 44*4882a593Smuzhiyun */ 45*4882a593Smuzhiyun #define SI4713_IOC_MEASURE_RNL _IOWR('V', BASE_VIDIOC_PRIVATE + 0, \ 46*4882a593Smuzhiyun struct si4713_rnl) 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun #endif /* ifndef SI4713_H*/ 49