From 8a1f7f114cf61eeda985c77b6c153454c56e48b7 Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Sun, 18 Oct 2026 09:26:46 +0300 Subject: [PATCH] xm: probe for ImageDesign (MIS) sensors The XM HAL listed no ImageDesign address, so detect_imagedesign_sensor never ran on Xiongmai and a MIS2003 board reported no sensor at all: the WebUI showed "unknown". libsns_X123_XM530 finds MIS2003/MIS2006 at 0x30 (0x60 8-bit), reading the ID from 0x3000/0x3001, which is what detect_imagedesign_sensor already does. Reported in OpenIPC/openxiongmai#8. --- src/hal/xm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hal/xm.c b/src/hal/xm.c index 9ce5f990..ab65cee5 100644 --- a/src/hal/xm.c +++ b/src/hal/xm.c @@ -15,16 +15,16 @@ static unsigned char soi_addrs[] = {0x60, 0x80, 0}; static unsigned char onsemi_addrs[] = {0x20, 0}; static unsigned char ssens_addrs[] = {0x60, 0}; static unsigned char omni_addrs[] = {0x6c, 0}; +// ImageDesign MIS2003/MIS2006, which libsns_X123_XM530 probes at 0x30 +static unsigned char imagedesign_addrs[] = {0x60, 0}; // only for reference, used in XM510 static unsigned char bg_addrs[] = {0x64, 0}; -static sensor_addr_t xm_possible_i2c_addrs[] = {{SENSOR_SONY, sony_addrs}, - {SENSOR_SMARTSENS, ssens_addrs}, - {SENSOR_ONSEMI, onsemi_addrs}, - {SENSOR_SOI, soi_addrs}, - {SENSOR_OMNIVISION, omni_addrs}, - {SENSOR_BRIGATES, bg_addrs}, - {0, NULL}}; +static sensor_addr_t xm_possible_i2c_addrs[] = { + {SENSOR_SONY, sony_addrs}, {SENSOR_SMARTSENS, ssens_addrs}, + {SENSOR_ONSEMI, onsemi_addrs}, {SENSOR_SOI, soi_addrs}, + {SENSOR_OMNIVISION, omni_addrs}, {SENSOR_IMAGEDESIGN, imagedesign_addrs}, + {SENSOR_BRIGATES, bg_addrs}, {0, NULL}}; int xm_open_sensor_fd() { return universal_open_sensor_fd("/dev/xm_i2c"); }