Lines Matching +full:auto +full:- +full:i2c

2   Copyright (c), 2004-2005,2007-2010 Trident Microsystems, Inc.
37 #include <linux/i2c.h>
40 * This structure contains the I2C address, the device ID and a user_data pointer.
44 u16 i2c_addr; /* The I2C address of the device. */
51 * \brief Determine if I2C address 'addr' is a 10 bits address or not.
52 * \param addr The I2C address.
54 * \retval 0 if address is not a 10 bits I2C address.
55 * \retval 1 if address is a 10 bits I2C address.
60 /*------------------------------------------------------------------------------
62 ------------------------------------------------------------------------------*/
66 * \brief Initialize I2C communication module.
69 * \retval -EIO Initialization failed.
75 * \brief Terminate I2C communication module.
78 * \retval -EIO Termination failed.
89 * \brief Read and/or write count bytes from I2C bus, store them in data[].
90 * \param w_dev_addr The device i2c address and the device ID to write to
93 * \param r_dev_addr The device i2c address and the device ID to read from
98 * \retval -EIO Failure.
99 * \retval -EINVAL Parameter 'wcount' is not zero but parameter
104 * This function must implement an atomic write and/or read action on the I2C bus
105 * No other process may use the I2C bus when this function is executing.
106 * The critical section of this function runs from and including the I2C
107 * write, up to and including the I2C read action.
109 * The device ID can be useful if several devices share an I2C address.
110 * It can be used to control a "switch" on the I2C bus to the correct device.
129 * \brief I2C specific error codes, platform dependent.
133 #define TUNER_MODE_SUB0 0x0001 /* for sub-mode (e.g. RF-AGC setting) */
134 #define TUNER_MODE_SUB1 0x0002 /* for sub-mode (e.g. RF-AGC setting) */
135 #define TUNER_MODE_SUB2 0x0004 /* for sub-mode (e.g. RF-AGC setting) */
136 #define TUNER_MODE_SUB3 0x0008 /* for sub-mode (e.g. RF-AGC setting) */
137 #define TUNER_MODE_SUB4 0x0010 /* for sub-mode (e.g. RF-AGC setting) */
138 #define TUNER_MODE_SUB5 0x0020 /* for sub-mode (e.g. RF-AGC setting) */
139 #define TUNER_MODE_SUB6 0x0040 /* for sub-mode (e.g. RF-AGC setting) */
140 #define TUNER_MODE_SUB7 0x0080 /* for sub-mode (e.g. RF-AGC setting) */
142 #define TUNER_MODE_DIGITAL 0x0100 /* for digital channel (e.g. DVB-T) */
167 u8 sub_mode; /* Index to sub-mode in use */
168 char ***sub_mode_descriptions; /* Pointer to description of sub-modes */
169 u8 sub_modes; /* Number of available sub-modes */
252 * \brief Enable I2C single or I2C multimaster mode on host.
267 * \brief Defines maximum chunksize of an i2c write action by host.
269 * This indicates the maximum size of data the I2C device driver is able to
270 * write at a time. This includes I2C device address and register addressing.
287 * \brief Defines maximum chunksize of an i2c read action by host.
289 * This indicates the maximum size of data the I2C device driver is able to read
318 * \brief Generic AUTO value for DRX enumerated types.
341 * \brief OOB-RX capability flag
343 * Device has OOB-RX
355 * \brief DVB-T capability flag
357 * Device has DVB-T
362 * \brief ITU-B capability flag
364 * Device has ITU-B
411 * \brief SMA-TX capability flag
418 * \brief SMA-RX capability flag
425 * \brief ITU-A/C capability flag
427 * Device has ITU-A/C
432 /*-------------------------------------------------------------------------
434 -------------------------------------------------------------------------*/
445 * Block writes speed up I2C traffic between host and demod.
447 * x->lowbyte(x), highbyte(x)
460 /*-------------------------------------------------------------------------
462 -------------------------------------------------------------------------*/
469 DRX_STANDARD_DVBT = 0, /*< Terrestrial DVB-T. */
498 * \brief Modulation sub-standards.
506 /*< Sub-standard unknown. */
508 /*< Auto (default) sub-standard */
522 /*< Auto Set Bandwidth */
638 DRX_CLASSIFICATION_COCHANNEL, /*< Co-channel. */
713 * \brief Frame number in current super-frame.
750 * enum drxu_code_action - indicate if firmware has to be uploaded or verified.
875 * Based on ANSI 55-1 and 55-2
879 /*< ANSI 55-1 */
881 /*< ANSI 55-2 A */
883 /*< ANSI 55-2 B */
886 /*-------------------------------------------------------------------------
888 -------------------------------------------------------------------------*/
942 * o major number = bits 31-20 (first three nibbles of MSW)
943 * o minor number = bits 19-16 (fourth nibble of MSW)
944 * o patch number = bits 15-0 (remaining nibbles in LSW)
950 * - mc_dev_type == 0 => any device allowed
951 * - mc_base_version == 0.0.0 => full microcode (mc_version is the version)
952 * - mc_base_version != 0.0.0 => patch microcode, the base microcode version
958 u16 aux_type; /* type of aux data - 0x8000 for version record */
1108 * \struct struct drxtps_info * TPS information, DVB-T specific.
1337 * \struct struct drxi2c_data * \brief Data for I2C via 2nd or 3rd or etc I2C port.
1344 u16 port_nr; /*< I2C port number */
1364 DRX_AUD_STANDARD_A2, /*< set A2-Korea FM Stereo */
1366 DRX_AUD_STANDARD_FM_STEREO,/*< set to FM-Stereo Radio */
1385 /*< used as auto and for readback */
1388 /* CTRL_AUD_GET_STATUS - struct drx_aud_status */
1414 /* CTRL_AUD_READ_RDS - DRXRDSdata_t */
1425 /* DRX_CFG_AUD_VOLUME - struct drx_cfg_aud_volume - set/get */
1464 s16 volume; /*< volume, range -114 to 12 dB */
1465 enum drx_aud_avc_mode avc_mode; /*< AVC auto volume control mode */
1471 s16 strength_left; /*< quasi-peak, left speaker */
1472 s16 strength_right; /*< quasi-peak, right speaker */
1475 /* DRX_CFG_I2S_OUTPUT - struct drx_cfg_i2s_output - set/get */
1506 DRX_I2S_POLARITY_RIGHT,/*< wordstrobe - right high, left low */
1507 DRX_I2S_POLARITY_LEFT /*< wordstrobe - right low, left high */
1515 u32 frequency; /*< range from 8000-48000 Hz */
1523 /* ------------------------------expert interface-----------------------------*/
1525 * /enum enum drx_aud_fm_deemphasis * setting for FM-Deemphasis in audio demodulator.
1613 * /enum enum drx_aud_fm_matrix * setting for FM-Matrix in audio demodulator.
1715 …typedef int(*drx_write_block_func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device …
1722 …typedef int(*drx_read_block_func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device …
1728 /* Write 8-bits value to device */
1729 …typedef int(*drx_write_reg8func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device …
1734 /* Read 8-bits value to device */
1735 …typedef int(*drx_read_reg8func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device …
1740 /* Read modify write 8-bits value to device */
1741 …_read_modify_write_reg8func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device */
1747 /* Write 16-bits value to device */
1748 …typedef int(*drx_write_reg16func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device …
1753 /* Read 16-bits value to device */
1754 …typedef int(*drx_read_reg16func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device …
1759 /* Read modify write 16-bits value to device */
1760 …read_modify_write_reg16func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device */
1766 /* Write 32-bits value to device */
1767 …typedef int(*drx_write_reg32func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device …
1772 /* Read 32-bits value to device */
1773 …typedef int(*drx_read_reg32func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device …
1778 /* Read modify write 32-bits value to device */
1779 …read_modify_write_reg32func_t) (struct i2c_device_addr *dev_addr, /* address of I2C device */
1854 /* Channel scan - inner loop: demod related */
1857 /* Channel scan - inner loop: SYSObj related */
1859 /* Channel scan - parameters for default DTV scan function in core driver */
1873 u8 tuner_port_nr; /*< nr of I2C port to which tuner is */
1906 /*< i2c address and device identifier */
1912 struct i2c_adapter *i2c; member
1916 /*-------------------------------------------------------------------------
1919 -------------------------------------------------------------------------*/
1924 (x == DRX_STANDARD_DVBT) ? "DVB-T" : \
1932 (x == DRX_STANDARD_ITU_A) ? "ITU-A" : \
1933 (x == DRX_STANDARD_ITU_B) ? "ITU-B" : \
1934 (x == DRX_STANDARD_ITU_C) ? "ITU-C" : \
1935 (x == DRX_STANDARD_ITU_D) ? "ITU-D" : \
1938 (x == DRX_STANDARD_AUTO) ? "Auto" : \
1948 (x == DRX_BANDWIDTH_AUTO) ? "Auto" : \
1955 (x == DRX_FFTMODE_AUTO) ? "Auto" : \
1963 (x == DRX_GUARD_AUTO) ? "Auto" : \
1978 (x == DRX_CONSTELLATION_AUTO) ? "Auto" : \
1987 (x == DRX_CODERATE_AUTO) ? "Auto" : \
1995 (x == DRX_HIERARCHY_AUTO) ? "Auto" : \
2006 (x == DRX_MIRROR_AUTO) ? "Auto" : \
2012 (x == DRX_CLASSIFICATION_COCHANNEL) ? "Co-channel" : \
2017 (x == DRX_CLASSIFICATION_AUTO) ? "Auto" : \
2044 (x == DRX_INTERLEAVEMODE_AUTO) ? "Auto" : \
2051 (x == DRX_LDPC_AUTO) ? "Auto" : \
2058 (x == DRX_CARRIER_AUTO) ? "Auto" : \
2068 (x == DRX_FRAMEMODE_AUTO) ? "Auto" : \
2075 (x == DRX_PILOT_AUTO) ? "Auto" : \
2111 (x == DRX_MODULE_BSP_I2C) ? "BSP I2C" : \
2140 (x == DRX_OOB_MODE_A) ? "ANSI 55-1 " : \
2141 (x == DRX_OOB_MODE_B_GRADE_A) ? "ANSI 55-2 A" : \
2142 (x == DRX_OOB_MODE_B_GRADE_B) ? "ANSI 55-2 B" : \
2150 (x == DRX_AUD_STANDARD_AUTO) ? "Auto" : \
2151 (x == DRX_AUD_STANDARD_M_MONO) ? "M-Standard Mono" : \
2153 (x == DRX_AUD_STANDARD_BG_FM) ? "B/G-Dual Carrier FM (A2)" : \
2154 (x == DRX_AUD_STANDARD_D_K1) ? "D/K1-Dual Carrier FM" : \
2155 (x == DRX_AUD_STANDARD_D_K2) ? "D/K2-Dual Carrier FM" : \
2156 (x == DRX_AUD_STANDARD_D_K3) ? "D/K3-Dual Carrier FM" : \
2157 (x == DRX_AUD_STANDARD_BG_NICAM_FM) ? "B/G-NICAM-FM" : \
2158 (x == DRX_AUD_STANDARD_L_NICAM_AM) ? "L-NICAM-AM" : \
2159 (x == DRX_AUD_STANDARD_I_NICAM_FM) ? "I-NICAM-FM" : \
2160 (x == DRX_AUD_STANDARD_D_K_NICAM_FM) ? "D/K-NICAM-FM" : \
2194 /*-------------------------------------------------------------------------
2196 -------------------------------------------------------------------------*/
2209 #define DRX_ATTR_MCRECORD(d) ((d)->my_common_attr->mcversion)
2210 #define DRX_ATTR_MIRRORFREQSPECT(d) ((d)->my_common_attr->mirror_freq_spect)
2211 #define DRX_ATTR_CURRENTPOWERMODE(d)((d)->my_common_attr->current_power_mode)
2212 #define DRX_ATTR_ISOPENED(d) ((d)->my_common_attr->is_opened)
2213 #define DRX_ATTR_USEBOOTLOADER(d) ((d)->my_common_attr->use_bootloader)
2214 #define DRX_ATTR_CURRENTSTANDARD(d) ((d)->my_common_attr->current_standard)
2215 #define DRX_ATTR_PREVSTANDARD(d) ((d)->my_common_attr->prev_standard)
2216 #define DRX_ATTR_CACHESTANDARD(d) ((d)->my_common_attr->di_cache_standard)
2217 #define DRX_ATTR_CURRENTCHANNEL(d) ((d)->my_common_attr->current_channel)
2218 #define DRX_ATTR_MICROCODE(d) ((d)->my_common_attr->microcode)
2219 #define DRX_ATTR_VERIFYMICROCODE(d) ((d)->my_common_attr->verify_microcode)
2220 #define DRX_ATTR_CAPABILITIES(d) ((d)->my_common_attr->capabilities)
2221 #define DRX_ATTR_PRODUCTID(d) ((d)->my_common_attr->product_id)
2222 #define DRX_ATTR_INTERMEDIATEFREQ(d) ((d)->my_common_attr->intermediate_freq)
2223 #define DRX_ATTR_SYSCLOCKFREQ(d) ((d)->my_common_attr->sys_clock_freq)
2224 #define DRX_ATTR_TUNERRFAGCPOL(d) ((d)->my_common_attr->tuner_rf_agc_pol)
2225 #define DRX_ATTR_TUNERIFAGCPOL(d) ((d)->my_common_attr->tuner_if_agc_pol)
2226 #define DRX_ATTR_TUNERSLOWMODE(d) ((d)->my_common_attr->tuner_slow_mode)
2227 #define DRX_ATTR_TUNERSPORTNR(d) ((d)->my_common_attr->tuner_port_nr)
2228 #define DRX_ATTR_I2CADDR(d) ((d)->my_i2c_dev_addr->i2c_addr)
2229 #define DRX_ATTR_I2CDEVID(d) ((d)->my_i2c_dev_addr->i2c_dev_id)
2234 /* Macros with device-specific handling are converted to CFG functions */
2271 /* Access Macros with device-specific handling */
2325 /*-------------------------------------------------------------------------
2327 -------------------------------------------------------------------------*/