i3c_master_set_info(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i3c_master_set_info(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ this is the page for i3c_master_set_info β€” she's a little function with big main character energy, and we're gonna get you two acquainted 🫢


🌸 NAME 🌸

i3c_master_set_info β€” literally just sets the master device information, that's her whole job, and she does it slayfully πŸ’–


✨ SYNOPSIS ✨

int i3c_master_set_info (struct i3c_master_controller *master , const
       struct i3c_device_info *info );

no cap, that's the whole signature. returns an int, takes two pointers, done πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • master β€” the master, aka the one actually sending frames on the bus 🚌 she's the main character here, respect her.
  • info β€” the I3C device information. this is the tea she's about to drink β˜•

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. this function sets the master device info. periodt. and here's the important bit: this should be called from i3c_master_controller_ops->bus_init β€” like, that's the designated spot, don't be out here calling her from random places πŸ™ˆ

now, lowkey not every field in i3c_device_info is meaningful for a master device β€” some of them are just along for the ride. here's the list of fields you should have properly filled in, bestie, take notes πŸ“:

  • i3c_device_info->dyn_addr
  • i3c_device_info->bcr
  • i3c_device_info->dcr
  • i3c_device_info->pid
  • i3c_device_info->hdr_cap β€” but ONLY if the I3C_BCR_HDR_CAP bit is set in i3c_device_info->bcr, iykyk πŸ‘‘
⚠️ and this one's serious: this function must be called with the bus lock held in maintenance mode. not normal use mode, not vibes mode β€” maintenance mode. don't skip this, fr fr πŸ’€

⭐ RETURN ⭐

returns 0 if info contains valid information β€” and like, not every piece of information can be checked, but at minimum we can make sure info->dyn_addr and info->bcr are correct, so that's the vibe check she runs βœ…

returns -EINVAL otherwise. so if you see that, something's off and it's giving "go fix your struct" energy 😭


🌈 SEE ALSO 🌈

the whole friend group, in this exact order, no cap:

Kernel file ./drivers/i3c/master.c, i3c_bus_maintenance_lock(9), i3c_bus_maintenance_unlock(9), i3c_bus_normaluse_lock(9), i3c_bus_normaluse_unlock(9), i3c_master_queue_hotjoin(9), i3c_master_send_ccc_cmd_locked(9), i3c_master_get_free_addr(9), i3c_master_setaasa_locked(9), i3c_master_entdaa_locked(9), i3c_master_enec_disec_locked(9), i3c_master_disec_locked(9), i3c_master_enec_locked(9), i3c_master_defslvs_locked(9), i3c_master_reattach_i3c_dev_locked(9), i3c_master_has_wakeup_enabled_devs(9), i3c_master_dma_map_single(9), i3c_master_dma_unmap_single(9), i3c_master_bus_init(9), __i3c_master_add_i3c_dev_locked(9), i3c_master_add_i3c_dev_locked(9), i3c_master_do_daa_ext(9), i3c_master_do_daa(9), i3c_master_queue_ibi(9), i3c_generic_ibi_free_pool(9), i3c_generic_ibi_alloc_pool(9), i3c_generic_ibi_get_free_slot(9), i3c_generic_ibi_recycle_slot(9), i3c_master_register(9), i3c_master_unregister(9), i3c_dev_disable_ibi_locked(9), i3c_dev_enable_ibi_locked(9), i3c_dev_request_ibi_locked(9), i3c_dev_free_ibi_locked(9)


and that's the page, bestie πŸ’œ this masterpiece lives at ./drivers/i3c, dated October 2026 β€” go forth and call her from bus_init like a good kernel dev 🧚✨

πŸ“¦ where this page comes from