aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorHermes Wu <Hermes.wu@ite.com.tw>2026-09-30 14:41:31 +0800
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-09-30 16:51:17 +0200
commit7566656c992063a0835688cd908d6924fc7ef112 (patch)
treefc2883396fa2762c953ee382cb0adf58300c56a2 /scripts/Makefile.thinlto
parentmedia: i2c: it6625: use unaligned/units helpers to decode pixel clock (diff)
media: i2c: it6625: decode detected timings via typed register structs
it6625_get_detected_timings() manually assembled each 16-bit field from raw byte-buffer offsets with a shift-and-add sequence. Define two named structs of __be16 fields matching the contiguous REG_H_ACTIVE_1.. REG_V_ACTIVE_0 and REG_H_FP_1..REG_V_BP_0 register layouts at file scope, immediately above the function that uses them -- this driver accesses many such register areas, so keep the layout struct separate from its one caller instead of declaring it locally. Read directly into them, and decode each field with be16_to_cpu(). Guard each struct's size with static_assert() against the expected register range width. Every member is 2 bytes wide and naturally aligned, so the struct is laid out with no padding -- this is safe because the struct is the I2C read target itself, not a cast over a pre-existing raw buffer. Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions