Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.7 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387527; b=rtzmIwaWEbKDrz5E0hy2wfG8YBXZz8yACc20OJJm61Qsg4eQ8/pMCGRalUE6yFPdt8DP DzLmHGMYhCQhWouBlRBbYyPVni3cLhD1pE2YylbDOE7nIg98y/7EC6qgX73SPI5WD8jL6 dFcLR8JgM8qG7oTOkeHlHx1ZB2dfkcEHG3fPFhw3khw/TNajKeciyv+ipRNM4G1zjG1Ch 1J0WS1pqlpx5QdWRivJVMNxWXxzSt/CmtyLdfzrf5ZjbvHW6Y2N+u7+QNnCmZB15FlJHS DzOo4QZpp+MrgKALtaVkh6ar6HkPCbK8k4qR23GBGwXqLWtp4/aaRaFwD8NLtMFH0ug== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387527; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:Organization; bh=q/3J0aqqwOUYn/HqyM0EB8eBxlUBrehsrGZP8K19Wsk=; b=AALJuaLLaJhRzBeM5h+ZHntoyVeksQyeZUJmX1QhHB1S1YlWSDOvBogi6guc8YnLXu9G YSx3S/uPgmHA9olSLgIgwWVc3TnOkMtUIRFqt+lFBRSgjdU0yA+QWpxIcViKt3Ok+Zwyg 72EMD/hPSA4FbWCwLOSG9/hxuYy/ZPL7N7iebdnx/GuDUmHJICwUKSXGy38pvvIzKMXfY +App2Rjz/vCwATZ2xdnfUxsJViiy4Wkkbd9yQ+4Mcc89Xy5O0YeYNkh1LJ6a1iKjgt3j0 PGeBcpLoDYvoVWaILF1OCTgyhPQJivjssSxU6V2nkg5dFxd0jnkzt1+YO7553iLFcLw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=aXf8yuNT; arc=none smtp.remote-ip=192.198.163.7 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EEE95606A322 for ; Fri, 4 Dec 2026 12:32:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EEE95606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=aXf8yuNT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796387528; x=1827923528; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=q/3J0aqqwOUYn/HqyM0EB8eBxlUBrehsrGZP8K19Wsk=; b=aXf8yuNTBR4veLQpPy/F1DAfoTO0llVlEv47MnbKxUuP+hj3UiZvQZzV np33/qlDDu1T6C6AGVUF6JdTonazjEioGDQhnCmndmnnjwEQXROldph4i J1W/zXQMLtDD3ebuVPQbzyHV2YBMftVRzvAN/Glhe2A5VF0yahtVJvXgg iVv9SzniSc0bDAHjKFjdYCO/JsJ2KOxU+jwQrz6B+yPXve0CWDDijLSs/ y0ap0PfoNfUnOLPB9mY4F+cBM4pZfarQFsBt4guzzufHvUCJEIdJb5X8y xqe2DtKv6jcdbnCJr28bcRRmX40P8QDUGhJkx3IJE7j+6M/UJf8fAdueo A==; X-CSE-ConnectionGUID: I38dZmtoQ2yokVItOOnPIw== X-CSE-MsgGUID: 8/7WXRDHQ5er/Cb8ELLklQ== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="5224105" X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="5224105" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 04:19:52 -0800 X-CSE-ConnectionGUID: 8GO+OxIMSe+nJ8melMZaYg== X-CSE-MsgGUID: rLrXyVUCQaqpqNZmE5r4jQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="14454857" Received: from alekseim-mobl.ger.corp.intel.com (HELO localhost) ([10.245.245.10]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 04:19:49 -0800 Date: Fri, 4 Dec 2026 14:19:45 +0200 From: Andy Shevchenko To: hexin@hexin.host Cc: linux-iio@vger.kernel.org, Michael Hennerich , Puranjay Mohan , Marcelo Schmitt , Antoniu Miclaus , Ramona Gradinariu , Petre Rodan , Jonathan Cameron , David Lechner , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , linux@analog.com Subject: Re: [PATCH v3 00/18] iio: accel: add mount matrix support to 18 accelerometer drivers Message-ID: References: <20261204-work-v3-0-c7b74b9bc63f@hexin.host> X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261204-work-v3-0-c7b74b9bc63f@hexin.host> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Fri, Dec 04, 2026 at 07:12:51PM +0800, He Xin via B4 Relay wrote: > These drivers ignore the mount matrix described by the firmware, so userspace > gets raw sensor axes on any board whose sensor is not mounted axis-aligned > with the display. A udev/hwdb override does not cover it either: it keys off > the sensor modalias and DMI, which do not tell such boards apart. > > Each patch follows the pattern of the drivers that already support this: try > the ACPI ROTM method first, fall back to the "mount-matrix" property > (devicetree, or _DSD on ACPI platforms), and keep the result in the driver's > private data so it can be exposed through IIO_MOUNT_MATRIX(). The patches > remain independent of each other. > > The ACPI tables on the platform this was tested on are part of the board > firmware rather than a local SSDT overlay, and that firmware provides > "mount-matrix" through _DSD today. Adding the ROTM method to it later does > not require touching these drivers again. > > Andy suggested on the mxc6255 patch that the matrix belongs in the IIO core > rather than in every driver. I kept the per-driver shape because that is what > kxcjk-1013, bmc150-accel, mxc4005, bmi323 and st_lsm6dsx already do; moving > parsing and storage into the core, together with those five, is a separate > change and I can send it as a follow-up. > > One behaviour change: a board whose firmware describes the property with the > wrong number of entries now fails to probe with -EINVAL instead of being > ignored, which is what the drivers that already support the property do. A > board that provides neither ROTM nor the property keeps the identity matrix. > > Not converted here, because the change would not have the same shape: > adis16201, adis16209 and sca3000 list their channels as array literals, > adxl313_core and fxls8962af-core keep the probe in the bus wrappers, and > mma9551/mma9553 differ in both. hid-sensor-accel-3d, ssp_accel_sensor and > cros_ec_accel_legacy take the orientation from the HID/SSP/EC side rather > than from a firmware property. The v2 was not settled yet. Please, read v2 replies in act accordingly. With such a series you need to wait at least 24h from the last reply on the previous version and at least 1w from the previous round. -- With Best Regards, Andy Shevchenko