STRUCT TEGRA_I2C_HW_FEATURE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct tegra_i2c_hw_feature(9) πŸ’–

okay so bestie, this is a page straight out of the Kernel API Manual β€” it's the lowdown on struct tegra_i2c_hw_feature, aka the little struct that tells the Tegra I2C driver what its specific hardware generation can actually do. it's giving "capability checklist but make it a C struct" and honestly? iconic. πŸ¦‹


✨ NAME ✨

struct tegra_i2c_hw_feature β€” per hardware generation features. like, every Tegra chip's I2C controller is a little different, and this struct is the receipts. πŸ’…


🌸 SYNOPSIS 🌸

struct tegra_i2c_hw_feature {
    bool has_continue_xfer_support;
    bool has_per_pkt_xfer_complete_irq;
    bool has_config_load_reg;
    u32 clk_divisor_hs_mode;
    u32 clk_divisor_std_mode;
    u32 clk_divisor_fast_mode;
    u32 clk_divisor_fast_plus_mode;
    bool has_multi_master_mode;
    bool has_slcg_override_reg;
    bool has_mst_fifo;
    bool has_mst_reset;
    const struct i2c_adapter_quirks *quirks;
    bool supports_bus_clear;
    bool has_apb_dma;
    u32 tlow_std_mode;
    u32 thigh_std_mode;
    u32 tlow_fast_mode;
    u32 thigh_fast_mode;
    u32 tlow_fastplus_mode;
    u32 thigh_fastplus_mode;
    u32 tlow_hs_mode;
    u32 thigh_hs_mode;
    u32 setup_hold_time_std_mode;
    u32 setup_hold_time_fast_mode;
    u32 setup_hold_time_fastplus_mode;
    u32 setup_hold_time_hs_mode;
    bool has_interface_timing_reg;
    bool enable_hs_mode_support;
    bool has_mutex;
    bool has_fairarb_reg;
    enum tegra_i2c_variant variant;
    const struct tegra_i2c_regs *regs;
 };

look at all those fields. she's thorough. she contains multitudes. πŸŽ€


πŸ‘‘ Members πŸ‘‘

🧚 the transfer-behaviour girlies

  • has_continue_xfer_support β€” continue-transfer supported. yes queen, keep going.
  • has_per_pkt_xfer_complete_irq β€” Has enable/disable capability for transfer completion interrupt on per packet basis. so you can toggle that interrupt packet-by-packet, no cap.
  • has_config_load_reg β€” Has the config load register to load the new configuration. new config, who dis πŸ’…
  • has_multi_master_mode β€” The I2C controller supports running in single-master or multi-master mode. choose your fighter.
  • quirks β€” I2C adapter quirks for limiting write/read transfer size and not allowing 0 length transfers. she has boundaries.

⏰ clock divisor besties

  • clk_divisor_hs_mode β€” Clock divisor in HS mode.
  • clk_divisor_std_mode β€” Clock divisor in standard mode. It is applicable if there is no fast clock source i.e. single clock source.
  • clk_divisor_fast_mode β€” Clock divisor in fast mode. It is applicable if there is no fast clock source i.e. single clock source.
  • clk_divisor_fast_plus_mode β€” Clock divisor in fast mode plus. It is applicable if there is no fast clock source (i.e. single clock source).

🌈 registers & hardware flexes

  • has_slcg_override_reg β€” The I2C controller supports a register that overrides the second level clock gating. override? she said i'll allow it.
  • has_mst_fifo β€” The I2C controller contains the new MST FIFO interface that provides additional features and allows for longer messages to be transferred in one go. longer messages, one go β€” we love efficiency πŸ™ˆ
  • has_mst_reset β€” The I2C controller contains MASTER_RESET_CTRL register which provides an alternative to controller reset when configured as I2C master. a reset glow-up, if you will ✨
  • supports_bus_clear β€” Bus Clear support to recover from bus hang during SDA stuck low from device for some unknown reasons. the "have you tried turning it off and on again" of I2C, lowkey.
  • has_apb_dma β€” Support of APBDMA on corresponding Tegra chip. dma but make it apb πŸ’œ
  • has_interface_timing_reg β€” Has interface timing register to program the tuned timing settings. tuned. tuned. πŸ”₯
  • enable_hs_mode_support β€” Enable support for high speed (HS) mode transfers. go fast, be safe πŸ¦‹
  • has_mutex β€” Has mutex register for mutual exclusion with other firmwares or VMs. sharing is caring but the mutex is mandatory.
  • has_fairarb_reg β€” Has fairness arbitration register for SMBUS/MCTP support. fair arbitration = no drama in the group chat, periodt.

🫢 timing girlies (low & high periods)

  • tlow_std_mode β€” Low period of the clock in standard mode.
  • thigh_std_mode β€” High period of the clock in standard mode.
  • tlow_fast_mode β€” Low period of the clock in fast mode.
  • thigh_fast_mode β€” High period of the clock in fast mode.
  • tlow_fastplus_mode β€” Low period of the clock in fast-plus mode.
  • thigh_fastplus_mode β€” High period of the clock in fast-plus mode.
  • tlow_hs_mode β€” Low period of the clock in HS mode.
  • thigh_hs_mode β€” High period of the clock in HS mode.

πŸ“ setup & hold times (start/stop conditions)

  • setup_hold_time_std_mode β€” Setup and hold time for start and stop conditions in standard mode.
  • setup_hold_time_fast_mode β€” Setup and hold time for start and stop conditions in fast mode.
  • setup_hold_time_fastplus_mode β€” Setup and hold time for start and stop conditions in fast-plus mode.
  • setup_hold_time_hs_mode β€” Setup and hold time for start and stop conditions in HS mode.

πŸ’« the "who even am i" fields

  • variant β€” This represents the I2C controller variant. main character identification πŸŽ€
  • regs β€” Register offsets for the specific SoC variant. the actual map to the actual hardware, iykyk.

πŸ”­ SEE ALSO πŸ”­

  • Kernel file ./drivers/i2c/busses/i2c-tegra.c
  • struct tegra_i2c_dev(9)

bestie note: this page lives in ./drivers/i2c/busses, and it's dated October 2026. yes, the future. we stay ahead πŸ’…

and that's the whole page β€” struct tegra_i2c_hw_feature(9), straight from the Kernel API Manual, signed off with love. go forth and configure your timing registers, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from