From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12E8B2D7DF8 for ; Fri, 16 Jan 2026 19:27:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768591630; cv=none; b=c0HadDQj6vH0XQXfMizBx3p7fZ48kd12Aw/V5G1IfehXR0ea8mNsQvI4KOztvpKQr4b99xSUiU8GpT0KcpN68MmV6V1KIw3OJZp7nngwDmyj65qrOoFgZ3j7PSyFJE/YRia26BB+DIEZB6V0v5XAjUpSZklLL5g9iw/gcUQdO3Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768591630; c=relaxed/simple; bh=05pbaXg3cASMRFyUvy9m8uJF/8TnPa2mWOaokKT8+Mo=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=stzwPStU1sTADryYTUdKJ4SJBfCnUY/jHGbMdFatTu0FTXY1L3xDJmixw9PBZZOwykWHjTBBkADJGNLVE6eqsm0MIygFo5wyLTQ/kQD1PDFwYxauKggPWW68TA+G009uzTQ8eV+IPa+HrWZKwObCBEOwmv5RWd0+pa6wNqz9a78= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=sv8/WRfU; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="sv8/WRfU" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-b8765b7f4c0so400172066b.0 for ; Fri, 16 Jan 2026 11:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1768591626; x=1769196426; darn=vger.kernel.org; h=mime-version:user-agent:organization:references:in-reply-to:date:cc :to:from:subject:message-id:from:to:cc:subject:date:message-id :reply-to; bh=05pbaXg3cASMRFyUvy9m8uJF/8TnPa2mWOaokKT8+Mo=; b=sv8/WRfUpXMtPcBG3xEA7dWA99zQGzpyHY2+JJGQC71kDOvfFdBtM2k/sSqpde89ww /0qWON1/RyvNObS/luDKk8SmDPfWRW+dmYsL54V+L6FOOQsXZKzjn3YzJi1J+kqHgnys d32GAGpibNy6oT+XzJNrJVdy7DgYAli+QqXNHxK4SVZqvMmNXAL5DWJY2d8CRCM586P+ fIiS8pSZ0qAxeX9R4lILjMTcumjfAIkQ6GsJ1lihnb8XZLASBVGxpyzDVXZRll/9h4x5 Hr4BqDGUNtF0LUu9YAW6/5OvPfqWUVjwxTikVw3H7QV34DOUmxjtvSlxT3x7fB2HXZ85 c8iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768591626; x=1769196426; h=mime-version:user-agent:organization:references:in-reply-to:date:cc :to:from:subject:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=05pbaXg3cASMRFyUvy9m8uJF/8TnPa2mWOaokKT8+Mo=; b=FZKm6k8dWvLqpGvBsHU1dF41LAMPTFqF8n02uvZQ1sfxUcr1amzSi8E7fTowal0AWs XdFNs1JFBZ2wYRfutTB9Vj4TPrfhKbFA7HQLcoEoa/PAf2Dbx5aS8ZEfEOENhgjbfDO8 yeLrI61s9CmngLJy9EQRQRrNtmTt1NU/Enms1tCQtAa8SS35lTZhPuXUTfKMItNhsYft oDKIQiDtL/PI93U9sV2OJLNz6uNAsEEG7wcjpwiRWNUERS2c7l3ENXjPA71iuIUJpWvP nVdTKBF/us5/Ht03WoqJKAlGlIKkA/2El/IkzmDhuSs8VqVPavcHk5dXLR3ZZ3q8UD3i csGw== X-Forwarded-Encrypted: i=1; AJvYcCWchm6/RO7gsjXC0yLvx9FD7x2zLFZVRcOTfMGG0dYGzLLqpHrX5fHFQBZ5c7Foh6FfU8XfudEDZCQJr8Y=@vger.kernel.org X-Gm-Message-State: AOJu0YwKsZq7u6zt2xj/RtVuI7dLwdJZO9loMhPI++GGlEyTdSuZFxZo orx9j2E9fVFTjTVBcQIE25bH8MM6l78EIX4JnXInh24hHfX5GqAf8+5SNj2LEFnriVw= X-Gm-Gg: AY/fxX6nIJ4qelptUt7LPqvARM0sFQ9J1c7xguxBWNZCrQ9r34dEfRYP9O2nv19ZzuH Q7R7ooTGlJJseSzHbT7mAbh08pV6dMQw/lY1UVKc1DKHVApPlhXejJYkZeruAOeyH01Zs8tejKM nxYj7XnEYY+PwzlWCYiPx2+CqJwl1oXl8s1N2K1l07Z4kkRv0trQmglDWUEZ3oRrRneHjnV7FcM 7UcWJxYkBXRFk0LEPuv1yRfnVkqCAMf8UJhdJTc8tDZ3Is1SkZiNa+j1rvULXl+FJrpSnLy5KBk FqaX6RI0J18T6jW4QXDeWFWry1KzB0K3j8MzpclQUcy3KuUqfOGUzXeCNh/SfkHhlTEJl9lC+GY E5zRhmIu8ANO6L5yUqmbcXZHMYBQrJWqpeYO8ohuRfKqkee2u0NEOqU98Kaz7cEjUvAkKOLlw/k HxVW8V X-Received: by 2002:a17:907:1b06:b0:b7a:72bd:ac65 with SMTP id a640c23a62f3a-b8792d6cf43mr390275866b.9.1768591626456; Fri, 16 Jan 2026 11:27:06 -0800 (PST) Received: from [10.203.83.189] ([151.47.40.155]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b87959c9763sm291434966b.35.2026.01.16.11.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jan 2026 11:27:05 -0800 (PST) Message-ID: <43a8feadc9326c35bde8da12d4045ba61be97051.camel@baylibre.com> Subject: Re: [PATCH 3/3] iio: imu: st_lsm6dsx: add support for rotation sensor From: Francesco Lavra To: Jonathan Cameron Cc: Lorenzo Bianconi , David Lechner , Nuno =?ISO-8859-1?Q?S=E1?= , Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 16 Jan 2026 20:26:56 +0100 In-Reply-To: <20260116182716.2ff8925f@jic23-huawei> References: <20260109181528.154127-1-flavra@baylibre.com> <20260109181528.154127-4-flavra@baylibre.com> <20260111164651.56a0cf14@jic23-huawei> <20260116182716.2ff8925f@jic23-huawei> Organization: BayLibre Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-jkBQ1DquNMSj7Q+VRiU/" User-Agent: Evolution 3.46.4-2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 --=-jkBQ1DquNMSj7Q+VRiU/ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2026-01-16 at 18:27 +0000, Jonathan Cameron wrote: >=20 > >=20 > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0const struct st_lsm6dsx_= reg *mux; > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0int err; > > > > + > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0mux =3D &hw->settings->s= f_settings.page_mux;=C2=A0=20 > > >=20 > > > Just to check, can you use regmaps support for paging instead of > > > doing > > > this by hand? > > > That would avoid future problems with enabling caching or similar=C2= =A0=20 > >=20 > > No, the chip has multiple register sets with overlapping addresses, and > > struct regmap_range_cfg is not usable here. >=20 > Paged addressing always has overlapping addresses, so I'm not following. > The trick this does is to map those higher pages to a fake set of > addresses. I thought having a fake set of addresses in the driver would be frowned upon since it would create a mismatch between the code and the device datasheet. But I guess it wouldn't be so bad if appropriate offsets between register pages are chosen. Anyway, as you noted in this case the different pages cannot be selected via a simple bank selector register. > An example is the ICM42600: > https://invensense.tdk.com/wp-content/uploads/2020/04/ds-000347_icm-42688= -p-datasheet.pdf > for a suitable datasheet (some of the newer parts have a much more > complex scheme) >=20 > I took a look at the datasheet and seems there are multiple types of > paging > going on and effectively ends up with two nested paging controls. So fair > enough it > doesn't fit here. --=-jkBQ1DquNMSj7Q+VRiU/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEhleFT5U73KMewxTm7fE7c86UNl8FAmlqkQAACgkQ7fE7c86U Nl8Ccwv9HfKeLdC6Xs6g6/SaZHmxb0rdPjFz42eQBr8/MvVGooXlErXlcaYOq64C fSt093nuTxsKZJPUUURl02yGuamY/C55mTAUmx2KXweCXNnV1bax4XmX20RcfSRS VS3VisegKJd3BN1TgaZJU85icA3fYbbkBIRE+6Moc27rJ51TdExGDsPm+8V4cNh9 n21LjOKHJE644lreMsOhD8x18bBEerUbBDnL8UM/sRg1yV1nxnRYZwSkUzT/sri7 BWTasrS1vPfLGPymoQ2moPcdMrtamto3v+AjstDQVVK29g8CyrEqbUpjc0DMgTlx +XbLJRDSJIw7nPHguYPFh5ArL1dKV5QfAKwxv2Y0f3PktwhgmlK6y05mCphD0zD0 SUkEtsGfMqpl1RdbI/oJoLZioEHXSINMQziaRpy+X/O++uWa5B76e6Qz+6+rNrzm /2AakmSQQxnNQXRXBU8gHzIywJGYn9983CTn7ozmAz23zI198WvnX6cR6gRFKpcK 7mVNLue2 =NlLK -----END PGP SIGNATURE----- --=-jkBQ1DquNMSj7Q+VRiU/--