docs: correct i2cdetect usage and ignore archived notes

The engine exposes only SMBus BYTE_DATA/WORD_DATA, so i2cdetect (which
needs SMBus QUICK or READ_BYTE) cannot scan the bus. Replace the
misleading "i2cdetect -r/-y" scan instructions with a direct i2cget
byte-data read in the README, the cover letter and the smoke test.

Also gitignore the archived internal working documents
(docs/archive-*.md).

Signed-off-by: Simone Chifari <simone.chifari@gmail.com>
This commit is contained in:
Simone
2026-06-27 20:11:37 +02:00
parent fee48bba23
commit 3c86f6c866
4 changed files with 25 additions and 12 deletions
+18 -7
View File
@@ -32,13 +32,25 @@ else
_fail "ch1 adapter not found"
fi
# The engine has no QUICK/BYTE primitive, so `i2cdetect` cannot scan the bus
# ("Bus doesn't support detection commands"). Probe SPD addresses directly with
# a byte-data read of register 0x00 instead.
_scan_spd() {
local bus=$1 found=""
echo "--- SPD scan bus $bus (byte-data read of reg 0x00) ---"
for a in 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57; do
if v=$(i2cget -y "$bus" "$a" 0x00 2>/dev/null); then
echo " $a present (reg0=$v)"
found="$a"
fi
done
[ -n "$found" ]
}
if [ -n "$CH0" ]; then
echo ""
echo "=== SPD scan ch0 (expect 0x50-0x57) ==="
i2cdetect -r -y "$CH0" 2>/dev/null
# at least one SPD slot must respond
if i2cdetect -r -y "$CH0" 2>/dev/null | grep '50' >/dev/null; then
_ok "SPD device at 0x50 on ch0"
if _scan_spd "$CH0"; then
_ok "SPD device present on ch0"
else
_fail "no SPD device on ch0"
fi
@@ -46,8 +58,7 @@ fi
if [ -n "$CH1" ]; then
echo ""
echo "=== SPD scan ch1 ==="
i2cdetect -r -y "$CH1" 2>/dev/null
_scan_spd "$CH1" && _ok "SPD device present on ch1" || true
fi
echo ""