dvb_module_probe(9)
π dvb_module_probe(9) β like, the manual manual, bestie π
okay so real talk, this is a page from the Kernel API Manual, and it's all about dvb_module_probe(9) β the little helper that goes "hiiii π" to an I2C module for you. it's giving matchmaker energy fr fr. let's get into it π«Ά
β¨ NAME β¨
dvb_module_probe β a helper routine that probes an I2C module. that's it. that's the whole job. iconic. π
πΈ SYNOPSIS πΈ
struct i2c_client * dvb_module_probe (const char *module_name , const
char *name , struct i2c_adapter *adap , unsigned char addr , void
*platform_data );
like, look at all those parameters. she's got range. π keep reading, i'll introduce you to each one π
π ARGUMENTS π
module_nameβ the name of the I2C module you're probing. this is the who of the whole operation π«nameβ an optional name for the I2C module, and it's used for debug purposes only (so, vibes and logging). if it'sNULL, it just defaults tomodule_name. so you're never left empty-handed, bestie π«Άadapβ pointer tostruct i2c_adapter, which describes the I2C adapter where the module is gonna be bound. basically the address of the friend group the module is joining πaddrβ the I2C address of the adapter, in 7-bit notation. seven bits, no cap. don't go adding extra bits, i'm watching you πplatform_dataβ the platform data that gets passed along to the I2C module being probed. it's the little gift bag you hand over at the door π
π¦ DESCRIPTION π¦
so here's the tea β β this function binds an I2C device into the DVB core. and it should be used by all drivers that use the I2C bus to control the hardware. all of them. no exceptions, no shortcuts, i don't make the rules (okay, the kernel makes the rules, but still). π₯
and listen β a module that you bound with dvb_module_probe should use dvb_module_release to unbind. you can't just ghost it, that's not how healthy relationships work π
NOTE: π¨ okay so storytime π¨ β in the past, DVB modules (mainly frontends) were bound via the dvb_attach macro, which does an ugly hack using I2C low level functions. i said what i said. π¬ such usage is deprecated and will be removed soon. so instead of that mess, use this routine. glow-up era, periodt. β¨
π RETURN π
- on success, it returns a
struct i2c_clientpointing to the bound I2C device. slay π NULLotherwise. (and yes, you do have to check. don't be out here dereferencingNULL, that's not the flex you think it is π)
π SEE ALSO π
everything's connected, iykyk β here's the whole friend group, all from the kernel file ./include/media/dvbdev.h:
enum dvb_device_type(9)struct dvb_adapter(9)struct dvb_device(9)struct dvbdevfops_node(9)dvb_device_get(9)dvb_device_put(9)dvb_register_adapter(9)dvb_unregister_adapter(9)dvb_register_device(9)dvb_remove_device(9)dvb_unregister_device(9)dvb_create_media_graph(9)dvb_register_media_controller(9)dvb_get_media_controller(9)dvb_generic_open(9)dvb_generic_release(9)dvb_generic_ioctl(9)dvb_usercopy(9)dvb_module_release(9)dvb_attach(9)dvb_detach(9)
aaaand that's the page!! π this one lives under ./include/media, and the version is dated October 2026 β so yes, she's a little futuristic, we love that for her. mwah, go probe responsibly, bestie πβ¨π§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms