i2c_new_smbus_alert_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ i2c_new_smbus_alert_device(9) ✨

okay so this is from the Kernel API Manual bestie, and it's literally all about getting an ara client so your SMBus alert support can actually happen πŸ’…


🌸 NAME 🌸

i2c_new_smbus_alert_device β€” get ara client for SMBus alert support


πŸŽ€ SYNOPSIS πŸŽ€

struct i2c_client * i2c_new_smbus_alert_device (struct i2c_adapter
*adapter , struct i2c_smbus_alert_setup *setup );

like, it hands you back a struct i2c_client *, no big deal 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • adapter β€” the target adapter πŸ‘‘ this is the bus you're doing the thing on
  • setup β€” setup data for the SMBus alert handler πŸŽ€ the configuration vibes

⭐ CONTEXT ⭐

can sleep 😴 β€” yes bestie, this one's allowed to nap, so don't go calling it from somewhere rude like an atomic context


πŸ’– DESCRIPTION πŸ’–

So the whole point: this sets up handling of the SMBus alert protocol on a given I2C bus segment. that's the assignment and it ate πŸ”₯

The handling itself lowkey has options β€” it can be done either through our IRQ handler, or by the adapter (from its handler, periodic polling, or whatever). adapter's choice, main character energy 🌈

This returns the ara client, which you should absolutely save for later use with i2c_handle_smbus_alert and ultimately i2c_unregister_device β€” do not lose track of it, that's the whole plot 😭

Or, alternatively, it returns an ERRPTR to indicate an error πŸ’€ (iykyk β€” check it, don't just vibe with it).


🧚 SEE ALSO 🧚

Kernel file ./drivers/i2c/i2c-core-smbus.c plus these iconic friends:


ngl the only thing you really need to remember: save that returned client, and always check for the ERRPTR before you use it πŸ™ˆ

that's the whole page bestie, mwah πŸ’‹ β€” sourced from ./drivers/i2c, the Kernel API Manual, dated October 2026, filed under i2c_new_smbus_alert_device(9) πŸ“πŸ’œ

πŸ“¦ where this page comes from