drivers/media/usb/gspca/m5602/m5602_s5k4aa.h
Source file repositories/reference/linux-study-clean/drivers/media/usb/gspca/m5602/m5602_s5k4aa.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/gspca/m5602/m5602_s5k4aa.h- Extension
.h- Size
- 2392 bytes
- Lines
- 85
- 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/dmi.hm5602_sensor.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef M5602_S5K4AA_H_
#define M5602_S5K4AA_H_
#include <linux/dmi.h>
#include "m5602_sensor.h"
/*****************************************************************************/
#define S5K4AA_PAGE_MAP 0xec
#define S5K4AA_PAGE_MAP_0 0x00
#define S5K4AA_PAGE_MAP_1 0x01
#define S5K4AA_PAGE_MAP_2 0x02
/* Sensor register definitions for page 0x02 */
#define S5K4AA_READ_MODE 0x03
#define S5K4AA_ROWSTART_HI 0x04
#define S5K4AA_ROWSTART_LO 0x05
#define S5K4AA_COLSTART_HI 0x06
#define S5K4AA_COLSTART_LO 0x07
#define S5K4AA_WINDOW_HEIGHT_HI 0x08
#define S5K4AA_WINDOW_HEIGHT_LO 0x09
#define S5K4AA_WINDOW_WIDTH_HI 0x0a
#define S5K4AA_WINDOW_WIDTH_LO 0x0b
#define S5K4AA_GLOBAL_GAIN__ 0x0f
/* sync lost, if too low, reduces frame rate if too high */
#define S5K4AA_H_BLANK_HI__ 0x1d
#define S5K4AA_H_BLANK_LO__ 0x1e
#define S5K4AA_EXPOSURE_HI 0x17
#define S5K4AA_EXPOSURE_LO 0x18
#define S5K4AA_BRIGHTNESS 0x1f /* (digital?) gain : 5 bits */
#define S5K4AA_GAIN 0x20 /* (analogue?) gain : 7 bits */
#define S5K4AA_NOISE_SUPP 0x37
#define S5K4AA_RM_ROW_SKIP_4X 0x08
#define S5K4AA_RM_ROW_SKIP_2X 0x04
#define S5K4AA_RM_COL_SKIP_4X 0x02
#define S5K4AA_RM_COL_SKIP_2X 0x01
#define S5K4AA_RM_H_FLIP 0x40
#define S5K4AA_RM_V_FLIP 0x80
#define S5K4AA_DEFAULT_GAIN 0x5f
#define S5K4AA_DEFAULT_BRIGHTNESS 0x10
/*****************************************************************************/
/* Kernel module parameters */
extern int force_sensor;
extern bool dump_sensor;
int s5k4aa_probe(struct sd *sd);
int s5k4aa_init(struct sd *sd);
int s5k4aa_init_controls(struct sd *sd);
int s5k4aa_start(struct sd *sd);
void s5k4aa_disconnect(struct sd *sd);
static const struct m5602_sensor s5k4aa = {
.name = "S5K4AA",
.i2c_slave_id = 0x5a,
.i2c_regW = 2,
.probe = s5k4aa_probe,
.init = s5k4aa_init,
.init_controls = s5k4aa_init_controls,
.start = s5k4aa_start,
.disconnect = s5k4aa_disconnect,
};
#endif
Annotation
- Immediate include surface: `linux/dmi.h`, `m5602_sensor.h`.
- 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.