drivers/media/radio/radio-isa.c
Source file repositories/reference/linux-study-clean/drivers/media/radio/radio-isa.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/radio/radio-isa.c- Extension
.c- Size
- 9938 bytes
- Lines
- 378
- Domain
- Driver Families
- Bucket
- drivers/media
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/init.hlinux/ioport.hlinux/delay.hlinux/videodev2.hlinux/io.hlinux/slab.hmedia/v4l2-device.hmedia/v4l2-ioctl.hmedia/v4l2-fh.hmedia/v4l2-ctrls.hmedia/v4l2-event.hradio-isa.h
Detected Declarations
function radio_isa_querycapfunction radio_isa_g_tunerfunction radio_isa_s_tunerfunction radio_isa_s_frequencyfunction radio_isa_g_frequencyfunction radio_isa_s_ctrlfunction radio_isa_log_statusfunction radio_isa_matchfunction radio_isa_valid_iofunction radio_isa_common_probefunction radio_isa_common_removefunction radio_isa_probefunction radio_isa_removefunction radio_isa_pnp_probefunction radio_isa_pnp_removeexport radio_isa_matchexport radio_isa_probeexport radio_isa_removeexport radio_isa_pnp_probeexport radio_isa_pnp_remove
Annotated Snippet
if (request_region(io, drv->region_size, v4l2_dev->name)) {
bool found = ops->probe(isa, io);
release_region(io, drv->region_size);
if (found) {
isa->io = io;
break;
}
}
}
}
if (!radio_isa_valid_io(drv, isa->io)) {
int i;
if (isa->io < 0)
return -ENODEV;
v4l2_err(v4l2_dev, "you must set an I/O address with io=0x%03x",
drv->io_ports[0]);
for (i = 1; i < drv->num_of_io_ports; i++)
printk(KERN_CONT "/0x%03x", drv->io_ports[i]);
printk(KERN_CONT ".\n");
kfree(isa);
return -EINVAL;
}
return radio_isa_common_probe(isa, pdev, drv->radio_nr_params[dev],
drv->region_size);
}
EXPORT_SYMBOL_GPL(radio_isa_probe);
void radio_isa_remove(struct device *pdev, unsigned int dev)
{
struct radio_isa_card *isa = dev_get_drvdata(pdev);
radio_isa_common_remove(isa, isa->drv->region_size);
}
EXPORT_SYMBOL_GPL(radio_isa_remove);
#ifdef CONFIG_PNP
int radio_isa_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
{
struct pnp_driver *pnp_drv = to_pnp_driver(dev->dev.driver);
struct radio_isa_driver *drv = container_of(pnp_drv,
struct radio_isa_driver, pnp_driver);
struct radio_isa_card *isa;
if (!pnp_port_valid(dev, 0))
return -ENODEV;
isa = radio_isa_alloc(drv, &dev->dev);
if (!isa)
return -ENOMEM;
isa->io = pnp_port_start(dev, 0);
return radio_isa_common_probe(isa, &dev->dev, drv->radio_nr_params[0],
pnp_port_len(dev, 0));
}
EXPORT_SYMBOL_GPL(radio_isa_pnp_probe);
void radio_isa_pnp_remove(struct pnp_dev *dev)
{
struct radio_isa_card *isa = dev_get_drvdata(&dev->dev);
radio_isa_common_remove(isa, pnp_port_len(dev, 0));
}
EXPORT_SYMBOL_GPL(radio_isa_pnp_remove);
#endif
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/ioport.h`, `linux/delay.h`, `linux/videodev2.h`, `linux/io.h`, `linux/slab.h`, `media/v4l2-device.h`.
- Detected declarations: `function radio_isa_querycap`, `function radio_isa_g_tuner`, `function radio_isa_s_tuner`, `function radio_isa_s_frequency`, `function radio_isa_g_frequency`, `function radio_isa_s_ctrl`, `function radio_isa_log_status`, `function radio_isa_match`, `function radio_isa_valid_io`, `function radio_isa_common_probe`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: integration 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.