i3c_master_e...disec_locked(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿฆ‹ i3c_master_enec_disec_locked(9) โ€” kernel API manual, bestie edition โœจ

okay so real quick, the manual name is i3c_master_e...disec_locked(9) and this is the kernel API manual, and we're about to talk about the most "enable/disable the vibes" function in the whole I3C subsystem ๐Ÿ’…


๐Ÿ’– NAME ๐Ÿ’–

i3c_master_enec_disec_locked โ€” send an ENEC or DISEC CCC command ๐ŸŽ€

like, literally the function that tells your slaves "hey bestie turn your events on" or "bestie turn your events off", no cap.


โœจ SYNOPSIS โœจ

int i3c_master_enec_disec_locked (struct i3c_master_controller *master ,
u8 addr , bool enable , u8 evts , bool suppress_m2 );

she takes five arguments and returns an int, periodt. ๐Ÿซถ


๐ŸŒธ ARGUMENTS ๐ŸŒธ

  • master โ€” the master used to send frames on the bus ๐ŸšŒ like, this is the main character doing the sending, iykyk
  • addr โ€” a valid I3C slave address or I3C_BROADCAST_ADDR ๐Ÿ“ฎ so either you're sliding into one specific slave's DMs, or you're doing a full group-chat blast to everybody
  • enable โ€” true to send ENEC, false to send DISEC โšก ENEC = on era, DISEC = off era, that's the whole vibe check
  • evts โ€” events to enable or disable ๐ŸŽฏ the actual event bits you want to flip, choose wisely bestie
  • suppress_m2 โ€” if true, treat an M2 (NACK) error from the CCC as success ๐Ÿ˜Œ like, we're gonna pretend that rejection didn't happen

๐Ÿ‘‘ DESCRIPTION ๐Ÿ‘‘

Send an ENEC or DISEC CCC command to enable or disable some or all events coming from a specific slave, or all devices if addr is I3C_BROADCAST_ADDR. ๐Ÿฆ‹

So basically: pick your target (one slave or everybody), pick your direction (enable or disable), pick your events, and she handles the CCC command for you. iconic behaviour honestly.

When suppress_m2 is true, a NACK of the broadcast (which can happen when no devices are present on the bus) is not reported as an error. ๐Ÿ’€ like when the group chat is empty and nobody replies, you don't want that to count as a whole crisis. This is useful for callers that want to configure event reporting unconditionally, regardless of whether any devices are currently on the bus. ๐Ÿ™ˆ so you can just... set it and forget it, no "wait is anyone even there" energy required.

๐Ÿšจ okay but fr fr, listen: This function must be called with the bus lock held in write mode. Not read mode, not "eh whatever mode", write mode. do not skip this, it's not a suggestion, it's the rule ๐Ÿ’…

๐Ÿ’œ RETURN ๐Ÿ’œ

0 in case of success, or a negative error code otherwise. โญ like she either gives you the clean zero (slay) or a negative number (not slay, go read the error).


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

okay so the source file for all this is the kernel file ./drivers/i3c/master.c ๐Ÿ“ and here's the whole friend group, everyone she hangs out with, no gatekeeping:


and that's the whole page bestie!! ๐ŸŽ€โœจ๐Ÿฆ‹

cute little sign-off: this one lives in ./drivers/i3c (the <purple>i3c</purple> part, you already knew), dated October 2026, and it's the i3c_master_e...disec_locked(9) kernel API manual page ๐Ÿ’– go enable some events, ily, bye!! ๐Ÿซถ

๐Ÿ“ฆ where this page comes from