drivers/iio/pressure/hsc030pa.c
Source file repositories/reference/linux-study-clean/drivers/iio/pressure/hsc030pa.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/iio/pressure/hsc030pa.c- Extension
.c- Size
- 20226 bytes
- Lines
- 542
- Domain
- Driver Families
- Bucket
- drivers/iio
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/array_size.hlinux/bitfield.hlinux/bits.hlinux/cleanup.hlinux/init.hlinux/math64.hlinux/mod_devicetable.hlinux/module.hlinux/printk.hlinux/property.hlinux/regulator/consumer.hlinux/string.hlinux/types.hlinux/units.hlinux/iio/buffer.hlinux/iio/iio.hlinux/iio/sysfs.hlinux/iio/trigger_consumer.hlinux/iio/triggered_buffer.hlinux/unaligned.hhsc030pa.h
Detected Declarations
struct hsc_func_specstruct hsc_range_configenum hsc_variantsfunction hsc_measurement_is_validfunction hsc_get_measurementfunction hsc_trigger_handlerfunction hsc_read_rawfunction hsc_common_probe
Annotated Snippet
struct hsc_func_spec {
u32 output_min;
u32 output_max;
};
/*
* function A: 10% - 90% of 2^14
* function B: 5% - 95% of 2^14
* function C: 5% - 85% of 2^14
* function F: 4% - 94% of 2^14
*/
static const struct hsc_func_spec hsc_func_spec[] = {
[HSC_FUNCTION_A] = { .output_min = 1638, .output_max = 14746 },
[HSC_FUNCTION_B] = { .output_min = 819, .output_max = 15565 },
[HSC_FUNCTION_C] = { .output_min = 819, .output_max = 13926 },
[HSC_FUNCTION_F] = { .output_min = 655, .output_max = 15401 },
};
enum hsc_variants {
HSC001BA = 0x00, HSC1_6BA = 0x01, HSC2_5BA = 0x02, HSC004BA = 0x03,
HSC006BA = 0x04, HSC010BA = 0x05, HSC1_6MD = 0x06, HSC2_5MD = 0x07,
HSC004MD = 0x08, HSC006MD = 0x09, HSC010MD = 0x0a, HSC016MD = 0x0b,
HSC025MD = 0x0c, HSC040MD = 0x0d, HSC060MD = 0x0e, HSC100MD = 0x0f,
HSC160MD = 0x10, HSC250MD = 0x11, HSC400MD = 0x12, HSC600MD = 0x13,
HSC001BD = 0x14, HSC1_6BD = 0x15, HSC2_5BD = 0x16, HSC004BD = 0x17,
HSC2_5MG = 0x18, HSC004MG = 0x19, HSC006MG = 0x1a, HSC010MG = 0x1b,
HSC016MG = 0x1c, HSC025MG = 0x1d, HSC040MG = 0x1e, HSC060MG = 0x1f,
HSC100MG = 0x20, HSC160MG = 0x21, HSC250MG = 0x22, HSC400MG = 0x23,
HSC600MG = 0x24, HSC001BG = 0x25, HSC1_6BG = 0x26, HSC2_5BG = 0x27,
HSC004BG = 0x28, HSC006BG = 0x29, HSC010BG = 0x2a, HSC100KA = 0x2b,
HSC160KA = 0x2c, HSC250KA = 0x2d, HSC400KA = 0x2e, HSC600KA = 0x2f,
HSC001GA = 0x30, HSC160LD = 0x31, HSC250LD = 0x32, HSC400LD = 0x33,
HSC600LD = 0x34, HSC001KD = 0x35, HSC1_6KD = 0x36, HSC2_5KD = 0x37,
HSC004KD = 0x38, HSC006KD = 0x39, HSC010KD = 0x3a, HSC016KD = 0x3b,
HSC025KD = 0x3c, HSC040KD = 0x3d, HSC060KD = 0x3e, HSC100KD = 0x3f,
HSC160KD = 0x40, HSC250KD = 0x41, HSC400KD = 0x42, HSC250LG = 0x43,
HSC400LG = 0x44, HSC600LG = 0x45, HSC001KG = 0x46, HSC1_6KG = 0x47,
HSC2_5KG = 0x48, HSC004KG = 0x49, HSC006KG = 0x4a, HSC010KG = 0x4b,
HSC016KG = 0x4c, HSC025KG = 0x4d, HSC040KG = 0x4e, HSC060KG = 0x4f,
HSC100KG = 0x50, HSC160KG = 0x51, HSC250KG = 0x52, HSC400KG = 0x53,
HSC600KG = 0x54, HSC001GG = 0x55, HSC015PA = 0x56, HSC030PA = 0x57,
HSC060PA = 0x58, HSC100PA = 0x59, HSC150PA = 0x5a, HSC0_5ND = 0x5b,
HSC001ND = 0x5c, HSC002ND = 0x5d, HSC004ND = 0x5e, HSC005ND = 0x5f,
HSC010ND = 0x60, HSC020ND = 0x61, HSC030ND = 0x62, HSC001PD = 0x63,
HSC005PD = 0x64, HSC015PD = 0x65, HSC030PD = 0x66, HSC060PD = 0x67,
HSC001NG = 0x68, HSC002NG = 0x69, HSC004NG = 0x6a, HSC005NG = 0x6b,
HSC010NG = 0x6c, HSC020NG = 0x6d, HSC030NG = 0x6e, HSC001PG = 0x6f,
HSC005PG = 0x70, HSC015PG = 0x71, HSC030PG = 0x72, HSC060PG = 0x73,
HSC100PG = 0x74, HSC150PG = 0x75, HSC_VARIANTS_MAX
};
static const char * const hsc_triplet_variants[HSC_VARIANTS_MAX] = {
[HSC001BA] = "001BA", [HSC1_6BA] = "1.6BA", [HSC2_5BA] = "2.5BA",
[HSC004BA] = "004BA", [HSC006BA] = "006BA", [HSC010BA] = "010BA",
[HSC1_6MD] = "1.6MD", [HSC2_5MD] = "2.5MD", [HSC004MD] = "004MD",
[HSC006MD] = "006MD", [HSC010MD] = "010MD", [HSC016MD] = "016MD",
[HSC025MD] = "025MD", [HSC040MD] = "040MD", [HSC060MD] = "060MD",
[HSC100MD] = "100MD", [HSC160MD] = "160MD", [HSC250MD] = "250MD",
[HSC400MD] = "400MD", [HSC600MD] = "600MD", [HSC001BD] = "001BD",
[HSC1_6BD] = "1.6BD", [HSC2_5BD] = "2.5BD", [HSC004BD] = "004BD",
[HSC2_5MG] = "2.5MG", [HSC004MG] = "004MG", [HSC006MG] = "006MG",
[HSC010MG] = "010MG", [HSC016MG] = "016MG", [HSC025MG] = "025MG",
[HSC040MG] = "040MG", [HSC060MG] = "060MG", [HSC100MG] = "100MG",
[HSC160MG] = "160MG", [HSC250MG] = "250MG", [HSC400MG] = "400MG",
[HSC600MG] = "600MG", [HSC001BG] = "001BG", [HSC1_6BG] = "1.6BG",
[HSC2_5BG] = "2.5BG", [HSC004BG] = "004BG", [HSC006BG] = "006BG",
[HSC010BG] = "010BG", [HSC100KA] = "100KA", [HSC160KA] = "160KA",
[HSC250KA] = "250KA", [HSC400KA] = "400KA", [HSC600KA] = "600KA",
[HSC001GA] = "001GA", [HSC160LD] = "160LD", [HSC250LD] = "250LD",
[HSC400LD] = "400LD", [HSC600LD] = "600LD", [HSC001KD] = "001KD",
[HSC1_6KD] = "1.6KD", [HSC2_5KD] = "2.5KD", [HSC004KD] = "004KD",
[HSC006KD] = "006KD", [HSC010KD] = "010KD", [HSC016KD] = "016KD",
[HSC025KD] = "025KD", [HSC040KD] = "040KD", [HSC060KD] = "060KD",
[HSC100KD] = "100KD", [HSC160KD] = "160KD", [HSC250KD] = "250KD",
[HSC400KD] = "400KD", [HSC250LG] = "250LG", [HSC400LG] = "400LG",
[HSC600LG] = "600LG", [HSC001KG] = "001KG", [HSC1_6KG] = "1.6KG",
[HSC2_5KG] = "2.5KG", [HSC004KG] = "004KG", [HSC006KG] = "006KG",
[HSC010KG] = "010KG", [HSC016KG] = "016KG", [HSC025KG] = "025KG",
[HSC040KG] = "040KG", [HSC060KG] = "060KG", [HSC100KG] = "100KG",
[HSC160KG] = "160KG", [HSC250KG] = "250KG", [HSC400KG] = "400KG",
[HSC600KG] = "600KG", [HSC001GG] = "001GG", [HSC015PA] = "015PA",
[HSC030PA] = "030PA", [HSC060PA] = "060PA", [HSC100PA] = "100PA",
[HSC150PA] = "150PA", [HSC0_5ND] = "0.5ND", [HSC001ND] = "001ND",
[HSC002ND] = "002ND", [HSC004ND] = "004ND", [HSC005ND] = "005ND",
[HSC010ND] = "010ND", [HSC020ND] = "020ND", [HSC030ND] = "030ND",
[HSC001PD] = "001PD", [HSC005PD] = "005PD", [HSC015PD] = "015PD",
[HSC030PD] = "030PD", [HSC060PD] = "060PD", [HSC001NG] = "001NG",
[HSC002NG] = "002NG", [HSC004NG] = "004NG", [HSC005NG] = "005NG",
[HSC010NG] = "010NG", [HSC020NG] = "020NG", [HSC030NG] = "030NG",
[HSC001PG] = "001PG", [HSC005PG] = "005PG", [HSC015PG] = "015PG",
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/bitfield.h`, `linux/bits.h`, `linux/cleanup.h`, `linux/init.h`, `linux/math64.h`, `linux/mod_devicetable.h`, `linux/module.h`.
- Detected declarations: `struct hsc_func_spec`, `struct hsc_range_config`, `enum hsc_variants`, `function hsc_measurement_is_valid`, `function hsc_get_measurement`, `function hsc_trigger_handler`, `function hsc_read_raw`, `function hsc_common_probe`.
- Atlas domain: Driver Families / drivers/iio.
- Implementation status: integration implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.