th1520_aon_power_update(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’– th1520_aon_power_update(9) โ€” the Kernel API Manual glow-up โœจ

ok so bestie, welcome to the th1520_aon_power_update page from the Kernel API Manual ๐ŸŽ€ this one's a little function with a big job: telling the TH1520 AON subsystem to flip a resource's power on or off. no cap, it's giving "tiny but essential." ๐Ÿฆ‹


โœจ NAME โœจ

th1520_aon_power_update โ€” change the power state of a resource via TH1520 AON ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

int th1520_aon_power_update (struct th1520_aon_chan *aon_chan , u16 rsrc , bool power_on );

like, look at her. three args, returns an int. iconic. ๐Ÿ‘‘


๐Ÿซถ ARGUMENTS ๐Ÿซถ

  • aon_chan โ€” pointer to the AON channel structure. your little handle to the channel, bestie ๐Ÿ’–
  • rsrc โ€” the resource ID whose power state needs updating. a u16, so it's a number, not a vibe ๐ŸŒˆ
  • power_on โ€” a boolean: true means the resource should be powered on, false means powered off. it's literally just on or off, no in-between main character energy ๐Ÿ”ฅ

๐Ÿงš DESCRIPTION ๐Ÿงš

okay so here's the tea โ˜• โ€” this function asks the TH1520 AON subsystem to set the power mode of the given resource (rsrc) to either on or off. simple as that.

the way it does it: it constructs the message in struct th1520_aon_msg_req_set_resource_power_mode, and then it invokes th1520_aon_call_rpc to actually make the request. ๐ŸŽ€

and if the AON call fails? it logs an error message, and it logs the specific return code too, so you're never left guessing what went wrong. helpful queen behavior fr fr ๐Ÿ™ˆ


๐Ÿ’€ RETURN ๐Ÿ’€

  • 0 on success โญ (slay)
  • a negative error code in case of failures โ€” and that error code is propagated from th1520_aon_call_rpc, so it's their business, not hers ๐Ÿ’…

๐Ÿ”ฎ SEE ALSO ๐Ÿ”ฎ


ngl bestie, if this call fails, check the error message and the return code in the log โ€” the specific return code comes straight through from th1520_aon_call_rpc, iykyk ๐Ÿ’œ

and that's the whole page, periodt ๐Ÿซถ this little diva lives in ./drivers/firmware, dated October 2026, and she's serving Kernel API Manual energy from the very first line to the last ๐ŸŒธโœจ๐Ÿ’–

๐Ÿ“ฆ where this page comes from