include/linux/mfd/si476x-core.h
Source file repositories/reference/linux-study-clean/include/linux/mfd/si476x-core.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mfd/si476x-core.h- Extension
.h- Size
- 15533 bytes
- Lines
- 532
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kfifo.hlinux/atomic.hlinux/i2c.hlinux/regmap.hlinux/mutex.hlinux/mfd/core.hlinux/videodev2.hlinux/regulator/consumer.hlinux/mfd/si476x-platform.hlinux/mfd/si476x-reports.h
Detected Declarations
struct si476x_corestruct si476x_func_infostruct si476x_power_down_argsstruct si476x_rds_status_reportstruct si476x_rsq_status_argsstruct si476x_tune_freq_argsenum si476x_freq_supported_chipsenum si476x_part_revisionsenum si476x_mfd_cellsenum si476x_power_stateenum si476x_tunemodeenum si476x_smoothmetricsenum si476x_injsideenum si476x_i2c_typeenum si476x_power_grid_typeenum si476x_interrupt_flagsenum si476x_rdsint_sourcesenum si476x_status_response_bitsenum si476x_common_receiver_propertiesenum si476x_am_receiver_propertiesenum si476x_fm_receiver_propertiesenum si476x_prop_audio_pwr_line_filter_bitsenum si476x_prop_fm_rds_config_bitsfunction si476x_core_lockfunction si476x_core_unlockfunction hz_to_si476xfunction si476x_to_hzfunction hz_to_v4l2function v4l2_to_hzfunction v4l2_to_si476xfunction si476x_to_v4l2
Annotated Snippet
struct si476x_core {
struct i2c_client *client;
struct regmap *regmap;
int chip_id;
struct mfd_cell cells[SI476X_MFD_CELLS];
struct mutex cmd_lock; /* for serializing fm radio operations */
atomic_t users;
wait_queue_head_t rds_read_queue;
struct kfifo rds_fifo;
struct work_struct rds_fifo_drainer;
bool rds_drainer_is_working;
struct mutex rds_drainer_status_lock;
wait_queue_head_t command;
atomic_t cts;
wait_queue_head_t tuning;
atomic_t stc;
struct si476x_power_up_args power_up_parameters;
enum si476x_power_state power_state;
struct regulator_bulk_data supplies[4];
int gpio_reset;
struct si476x_pinmux pinmux;
enum si476x_phase_diversity_mode diversity_mode;
atomic_t is_alive;
struct delayed_work status_monitor;
#define SI476X_WORK_TO_CORE(w) container_of(to_delayed_work(w), \
struct si476x_core, \
status_monitor)
int revision;
int rds_fifo_depth;
};
static inline struct si476x_core *i2c_mfd_cell_to_core(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev->parent);
return i2c_get_clientdata(client);
}
/**
* si476x_core_lock() - lock the core device to get an exclusive access
* to it.
* @core: Core device structure
*/
static inline void si476x_core_lock(struct si476x_core *core)
{
mutex_lock(&core->cmd_lock);
}
/**
* si476x_core_unlock() - unlock the core device to relinquish an
* exclusive access to it.
* @core: Core device structure
*/
static inline void si476x_core_unlock(struct si476x_core *core)
{
mutex_unlock(&core->cmd_lock);
}
/* *_TUNE_FREQ family of commands accept frequency in multiples of
10kHz */
static inline u16 hz_to_si476x(struct si476x_core *core, int freq)
{
u16 result;
switch (core->power_up_parameters.func) {
default:
case SI476X_FUNC_FM_RECEIVER:
result = freq / 10000;
break;
case SI476X_FUNC_AM_RECEIVER:
result = freq / 1000;
break;
}
return result;
}
Annotation
- Immediate include surface: `linux/kfifo.h`, `linux/atomic.h`, `linux/i2c.h`, `linux/regmap.h`, `linux/mutex.h`, `linux/mfd/core.h`, `linux/videodev2.h`, `linux/regulator/consumer.h`.
- Detected declarations: `struct si476x_core`, `struct si476x_func_info`, `struct si476x_power_down_args`, `struct si476x_rds_status_report`, `struct si476x_rsq_status_args`, `struct si476x_tune_freq_args`, `enum si476x_freq_supported_chips`, `enum si476x_part_revisions`, `enum si476x_mfd_cells`, `enum si476x_power_state`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.