drivers/media/dvb-frontends/drx39xyj/drx_driver.h
Source file repositories/reference/linux-study-clean/drivers/media/dvb-frontends/drx39xyj/drx_driver.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/dvb-frontends/drx39xyj/drx_driver.h- Extension
.h- Size
- 78735 bytes
- Lines
- 2327
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/errno.hlinux/i2c.h
Detected Declarations
struct i2c_device_addrstruct tuner_commonstruct tuner_instancestruct tuner_opsstruct tuner_instancestruct drxu_code_infostruct drx_mc_version_recstruct drx_filter_infostruct drx_channelstruct drx_complexstruct drx_frequency_planstruct drx_scan_paramstruct drxtps_infostruct drx_versionstruct drx_version_liststruct drxuio_cfgstruct drxuio_datastruct drxoobstruct drxoob_statusstruct drx_cfgstruct drx_cfg_mpeg_outputstruct drxi2c_datastruct drx_aud_statusstruct drx_cfg_aud_rdsstruct drx_cfg_aud_volumestruct drx_cfg_i2s_outputstruct drx_cfg_aud_ass_thresstruct drx_aud_carrierstruct drx_cfg_aud_carriersstruct drx_cfg_aud_mixerstruct drx_cfg_aud_prescalestruct drx_aud_beepstruct drx_aud_datastruct drx_access_funcstruct drx_reg_dumpstruct drx_common_attrstruct drx_demod_instancestruct drx_demod_instanceenum tuner_lock_statusenum drx_standardenum drx_substandardenum drx_bandwidthenum drx_mirrorenum drx_modulationenum drx_hierarchyenum drx_priorityenum drx_coderateenum drx_guard
Annotated Snippet
struct i2c_device_addr {
u16 i2c_addr; /* The I2C address of the device. */
u16 i2c_dev_id; /* The device identifier. */
void *user_data; /* User data pointer */
};
/*
* \def IS_I2C_10BIT( addr )
* \brief Determine if I2C address 'addr' is a 10 bits address or not.
* \param addr The I2C address.
* \return int.
* \retval 0 if address is not a 10 bits I2C address.
* \retval 1 if address is a 10 bits I2C address.
*/
#define IS_I2C_10BIT(addr) \
(((addr) & 0xF8) == 0xF0)
/*------------------------------------------------------------------------------
Exported FUNCTIONS
------------------------------------------------------------------------------*/
/*
* \fn drxbsp_i2c_init()
* \brief Initialize I2C communication module.
* \return int Return status.
* \retval 0 Initialization successful.
* \retval -EIO Initialization failed.
*/
int drxbsp_i2c_init(void);
/*
* \fn drxbsp_i2c_term()
* \brief Terminate I2C communication module.
* \return int Return status.
* \retval 0 Termination successful.
* \retval -EIO Termination failed.
*/
int drxbsp_i2c_term(void);
/*
* \fn int drxbsp_i2c_write_read( struct i2c_device_addr *w_dev_addr,
* u16 w_count,
* u8 * wData,
* struct i2c_device_addr *r_dev_addr,
* u16 r_count,
* u8 * r_data)
* \brief Read and/or write count bytes from I2C bus, store them in data[].
* \param w_dev_addr The device i2c address and the device ID to write to
* \param w_count The number of bytes to write
* \param wData The array to write the data to
* \param r_dev_addr The device i2c address and the device ID to read from
* \param r_count The number of bytes to read
* \param r_data The array to read the data from
* \return int Return status.
* \retval 0 Success.
* \retval -EIO Failure.
* \retval -EINVAL Parameter 'wcount' is not zero but parameter
* 'wdata' contains NULL.
* Idem for 'rcount' and 'rdata'.
* Both w_dev_addr and r_dev_addr are NULL.
*
* This function must implement an atomic write and/or read action on the I2C bus
* No other process may use the I2C bus when this function is executing.
* The critical section of this function runs from and including the I2C
* write, up to and including the I2C read action.
*
* The device ID can be useful if several devices share an I2C address.
* It can be used to control a "switch" on the I2C bus to the correct device.
*/
int drxbsp_i2c_write_read(struct i2c_device_addr *w_dev_addr,
u16 w_count,
u8 *wData,
struct i2c_device_addr *r_dev_addr,
u16 r_count, u8 *r_data);
/*
* \fn drxbsp_i2c_error_text()
* \brief Returns a human readable error.
* Counter part of numerical drx_i2c_error_g.
*
* \return char* Pointer to human readable error text.
*/
char *drxbsp_i2c_error_text(void);
/*
* \var drx_i2c_error_g;
* \brief I2C specific error codes, platform dependent.
*/
extern int drx_i2c_error_g;
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/errno.h`, `linux/i2c.h`.
- Detected declarations: `struct i2c_device_addr`, `struct tuner_common`, `struct tuner_instance`, `struct tuner_ops`, `struct tuner_instance`, `struct drxu_code_info`, `struct drx_mc_version_rec`, `struct drx_filter_info`, `struct drx_channel`, `struct drx_complex`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.