From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796425340; b=ntuWO7XqezuFpfiOP5caQElHmaWLDJyOvEjHHMBzcEivW2o9dr6xLCYvEo9gWHRgACQL G7kVqcp7OWbv057u8m2bw1oEj4t/7Hng5Xp5o6T5DXjhE5TNx+E48e0DdCM9PkQjLfpBj 1528iHIsvndAZ4wjm/xNRGtFBs6YhnjJRHmb43rCH15El1qRZtQ0n3/4oqQDti8Nhe5as 59tCkl0QuMJWhA2DYBRBtjZ83Xc228ujbk58DqLwJwxbaVLKLVnIbSJfMYCK4Jkv+CkK5 js0JwWDJtqoNwIwoELXv3yVJ0v5jSqF6B2wiIe6H4fZxDkB6QTDW1GXwCUk+Gbhz0fQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796425340; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=oS89dYsU/ecmmMce/hOtZby2TKBlaWakRDGM344xy1s=; b=a+fQ92rdBTLG9dIjJtEetNWIhIvjxOP+nyE+kf5nW80lRJWe8Dil1JpVLCxeRflZaD7l hVcdsFWHXa1Xn00PANezhUNuB+ZOUhAKbT1NnvvOlmBRxRdOoM646BaIwRSYtKjTQoDdE RHL5ss3XbBylHI+Bv8DaI6Q/WjH51l++KRbxBP60bY17vY8IDF/uuMJURP9kAAAAbMC8T EtL7yhIC+mJ6f9WHvORANrvJXsU9Ja/ac6N7coJDmmHx0dhoga9hXR6y/yBRrSkCacEYl D9EBL3ufQN4mWi8pdyG68sKGRaAh2CrlxTOtLvUBNYwWROGxG6bz2/Gvo2nhM03hwWQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="AUr/BnMK"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CD98606A32C; Fri, 4 Dec 2026 23:02:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AUr/BnMK Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21E671F00A11; Fri, 4 Dec 2026 23:02:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796425340; bh=oS89dYsU/ecmmMce/hOtZby2TKBlaWakRDGM344xy1s=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=AUr/BnMKJ6UhJhgKtaEs58jYdPDmegGZt8pl/RrlpKOxBoicJvq6MyZRLnLYcfpCV YnVYTAyBN4o9MUsX27WXJgrpYKzoiDzwrzu3aHecPzR0FLLXqCFmT08EopNSkEu/85 8YwXKDL4xqPLq3h2yJ8A0uk8rUk+T75vZdx0iuCB1MSHhitmPhh7t/uWeBHb5IILEq i79LUG9IdtGeBAQhtYda/eR/mS02OnbCYjh6FuOn8Kzm0OF10JsvTUGnqNM38bLdsZ gP2pwmTrJJR8gr+hgIIBlPEiH5QeigxQ/n6exoLgLsAirqMvqmk68Arp+7xDvwxAJw pukVfYoJobBeA== Date: Fri, 4 Dec 2026 23:02:12 +0000 From: Jonathan Cameron To: Andy Shevchenko , nuno.sa@analog.com Cc: Gerard Marull-Paretas , robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dlechner@baylibre.com, andy@kernel.org, Frank.li@nxp.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 4/4] iio: magnetometer: mmc5633: Add mount matrix support Message-ID: <20261204230212.1bce17ab@jic23-hlaptop> In-Reply-To: References: <20261203165654.54866-1-gerard@teslabs.com> <20261203165654.54866-5-gerard@teslabs.com> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) X-Mailing-List: linux-kernel@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-Transfer-Encoding: 7bit On Thu, 3 Dec 2026 19:26:02 +0200 Andy Shevchenko wrote: > On Thu, Dec 03, 2026 at 05:56:54PM +0100, Gerard Marull-Paretas wrote: > > Read the mount matrix from the firmware and expose it, so that user > > space can account for how the sensor is oriented on the board. > > > Reviewed-by: Andy Shevchenko > > While I reviewed that, the more generic Q still stands. Can we rather use IIO > opaque structure and move majority of this code to the IIO core as a helper for > drivers that want it? Jonathan, what do you think? I wasn't keen on doing this in the past because it was relatively rare for firmware to actually provide this info so we only supported it in a few drivers. It still only applies to a subset of IIO devices and the ACPI side of things isn't standard, so those are a bit trickier to deal with. So I think there is a limit to what can be in the core. I'd be interested to see a proposal though and see what it ends up looking like. I guess it would be put the pointer in the iio_opaque structure and then fill it if a driver requests it. So the bit we save on is the pointer in the iio_priv() and the helper function used to find that. Might be worth doing. We aren't very consistent in how we handle the scope of it either. Mix of shared_by_all, by_type, by_dir so generating the attribute from the core is going to be tricky. There are good reasons for some of those variants, but with hindsight this hasn't been as controlled as it should have been. So, maybe? Jonathan > > (It definitely does not affect this series, which is good as it go.) >