STRUCT TEGRA_I2C_HW_FEATURE(9)
π 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 containsMASTER_RESET_CTRLregister 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms