drivers/media/i2c/isl7998x.c
Source file repositories/reference/linux-study-clean/drivers/media/i2c/isl7998x.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/isl7998x.c- Extension
.c- Size
- 55704 bytes
- Lines
- 1627
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/delay.hlinux/gpio/consumer.hlinux/i2c.hlinux/module.hlinux/of_graph.hlinux/pm_runtime.hlinux/regmap.hlinux/slab.hlinux/v4l2-mediabus.hlinux/videodev2.hmedia/v4l2-async.hmedia/v4l2-common.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-fwnode.hmedia/v4l2-ioctl.h
Detected Declarations
struct isl7998x_datafmtstruct isl7998x_modestruct isl7998xenum isl7998x_padsfunction isl7998x_norm_to_valfunction isl7998x_get_nr_inputsfunction isl7998x_wait_power_onfunction isl7998x_set_standardfunction isl7998x_initfunction isl7998x_set_test_patternfunction isl7998x_g_registerfunction isl7998x_s_registerfunction isl7998x_g_stdfunction isl7998x_s_stdfunction isl7998x_querystdfunction isl7998x_g_tvnormsfunction isl7998x_g_input_statusfunction isl7998x_s_streamfunction isl7998x_pre_streamonfunction isl7998x_post_streamofffunction isl7998x_enum_mbus_codefunction isl7998x_enum_frame_sizefunction isl7998x_get_fmtfunction isl7998x_set_fmtfunction isl7998x_set_ctrlfunction isl7998x_mc_initfunction get_link_freq_menu_indexfunction isl7998x_remove_controlsfunction isl7998x_init_controlsfunction isl7998x_probefunction isl7998x_removefunction isl7998x_runtime_resumefunction isl7998x_runtime_suspend
Annotated Snippet
struct isl7998x_datafmt {
u32 code;
enum v4l2_colorspace colorspace;
};
static const struct isl7998x_datafmt isl7998x_colour_fmts[] = {
{ MEDIA_BUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_SRGB },
};
/* Menu items for LINK_FREQ V4L2 control */
static const s64 link_freq_menu_items[] = {
/* 1 channel, 1 lane or 2 channels, 2 lanes */
108000000,
/* 2 channels, 1 lane or 4 channels, 2 lanes */
216000000,
/* 4 channels, 1 lane */
432000000,
};
/* Menu items for TEST_PATTERN V4L2 control */
static const char * const isl7998x_test_pattern_menu[] = {
"Disabled",
"Enabled",
};
static const char * const isl7998x_test_pattern_bars[] = {
"bbbbwb", "bbbwwb", "bbwbwb", "bbwwwb",
};
static const char * const isl7998x_test_pattern_colors[] = {
"Yellow", "Blue", "Green", "Pink",
};
struct isl7998x_mode {
unsigned int width;
unsigned int height;
enum v4l2_field field;
};
static const struct isl7998x_mode supported_modes[] = {
{
.width = 720,
.height = 576,
.field = V4L2_FIELD_SEQ_TB,
},
{
.width = 720,
.height = 480,
.field = V4L2_FIELD_SEQ_BT,
},
};
static const struct isl7998x_video_std {
const v4l2_std_id norm;
unsigned int id;
const struct isl7998x_mode *mode;
} isl7998x_std_res[] = {
{ V4L2_STD_NTSC_443,
ISL7998X_REG_PX_DEC_SDT_STANDARD_NTSC_443,
&supported_modes[1] },
{ V4L2_STD_PAL_M,
ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL_M,
&supported_modes[1] },
{ V4L2_STD_PAL_Nc,
ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL_CN,
&supported_modes[0] },
{ V4L2_STD_PAL_N,
ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL,
&supported_modes[0] },
{ V4L2_STD_PAL_60,
ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL_60,
&supported_modes[1] },
{ V4L2_STD_NTSC,
ISL7998X_REG_PX_DEC_SDT_STANDARD_NTSC_M,
&supported_modes[1] },
{ V4L2_STD_PAL,
ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL,
&supported_modes[0] },
{ V4L2_STD_SECAM,
ISL7998X_REG_PX_DEC_SDT_STANDARD_SECAM,
&supported_modes[0] },
{ V4L2_STD_UNKNOWN,
ISL7998X_REG_PX_DEC_SDT_STANDARD_UNKNOWN,
&supported_modes[1] },
};
struct isl7998x {
struct v4l2_subdev subdev;
struct regmap *regmap;
struct gpio_desc *pd_gpio;
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/module.h`, `linux/of_graph.h`, `linux/pm_runtime.h`, `linux/regmap.h`.
- Detected declarations: `struct isl7998x_datafmt`, `struct isl7998x_mode`, `struct isl7998x`, `enum isl7998x_pads`, `function isl7998x_norm_to_val`, `function isl7998x_get_nr_inputs`, `function isl7998x_wait_power_on`, `function isl7998x_set_standard`, `function isl7998x_init`, `function isl7998x_set_test_pattern`.
- Atlas domain: Driver Families / drivers/media.
- 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.