From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 34C8E2EB84F for ; Mon, 3 Nov 2025 09:34:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762162475; cv=none; b=RlRpZMf8TU6b0/fMcHJc26X4WK/9zMrOQGOoRZsdPlSeWHtjPIQ72SHiwCch2eUaOft+BqpDxMx2Qltsbrf1QsYSnbYurSJIgxegdP6JJCoqJegEY94l3VgpzE+DCvH2kQwcTWOn4KglWBpZt37cAfnKEj79XKZbQDl/TLVX4nY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762162475; c=relaxed/simple; bh=i7DOvgsvt3ZQmezVkp8vi6qSNyStUcEGPJnNb6H63Pw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=iPg3w1MuisPwH9G26BtUHJzm+kl4RASNgZyodOuxjZThorIAFAa/ERqrbAuZ+HNRkysDsunugeRSGxOdEwU6bar5qXM9xwQoZrn0VuoNsnLS1ZnMJG0N9LCodOEP1KQWzpakAb8GnLPjOzQCXhxOCzfCsrdBQCCSMQRD/PQ3VdM= 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=DhkIGDo5; arc=none smtp.client-ip=209.85.208.43 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="DhkIGDo5" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-640aa1445c3so1947906a12.1 for ; Mon, 03 Nov 2025 01:34:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1762162471; x=1762767271; 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=i7DOvgsvt3ZQmezVkp8vi6qSNyStUcEGPJnNb6H63Pw=; b=DhkIGDo5S2BVh7xneec4YlTW1Nx83x4WZp0g1tx1sZZBxyNLQpgfocqgjic7rHgNMm qA3CTCHtKCPDpDotM8ka4ghjYAmpoxbBNqp3YTn7DiT3PEKovRh43gVFNC5eQ22qdWJ8 8d8RPWYfcPSwr8tuFqyZE7nITz1XWDJgUjAKDzHy2r8tHhqeSY2Wxg5BW9+9Axt+nK3S /bH8tYobIoBsokzH5yZebNuaWRAtEjTuFXF+wO8n+eKN45kBorP669ouWWWuCZh9Pnha EfpS79BZv02PrVW/4UFMndCTGpPzn+V2Opbxr8L5UDhF+FDE5QztYFXlepA1FrD6qMNJ CYuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762162471; x=1762767271; h=mime-version:user-agent:organization:references:in-reply-to:date:cc :to:from:subject:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=i7DOvgsvt3ZQmezVkp8vi6qSNyStUcEGPJnNb6H63Pw=; b=sE29b7yW4vjtpfCj6DRFxbW6vzUqnqFXOaM9vcwiH+QYeI21GX578zTdUgyaiWTBtL QAtJaDSNa8+8FZHoo/b7lp+ehcJTdO+v+BkGkM17ZQG5uVqNwNibbpHu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thqrCtw== X-Received: by 2002:a17:907:7f13:b0:b6d:5718:d43f with SMTP id a640c23a62f3a-b70705ea525mr1074949666b.39.1762162471439; Mon, 03 Nov 2025 01:34:31 -0800 (PST) Received: from [10.203.83.103] (mob-176-247-82-42.net.vodafone.it. [176.247.82.42]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7077975d24sm994396166b.1.2025.11.03.01.34.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Nov 2025 01:34:30 -0800 (PST) Message-ID: <25732d2be08156b4f55e97f5306d1fd080255ae7.camel@baylibre.com> Subject: Re: [PATCH 6/9] iio: imu: st_lsm6dsx: remove event_threshold field from hw struct From: Francesco Lavra To: Andy Shevchenko , Jonathan Cameron Cc: Andy Shevchenko , Lorenzo Bianconi , David Lechner , Nuno =?ISO-8859-1?Q?S=E1?= , Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 03 Nov 2025 10:34:28 +0100 In-Reply-To: References: <20251030072752.349633-1-flavra@baylibre.com> <20251030072752.349633-7-flavra@baylibre.com> <32a7741bc568243c8a19d691b922d9a8c2cba429.camel@baylibre.com> <20251102112958.435688d5@jic23-huawei> Organization: BayLibre Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-Zznj8JQRuN4PD+b2+6iB" 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 --=-Zznj8JQRuN4PD+b2+6iB Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 2025-11-02 at 15:45 +0200, Andy Shevchenko wrote: > On Sun, Nov 2, 2025 at 1:30=E2=80=AFPM Jonathan Cameron wrote: > > On Thu, 30 Oct 2025 15:49:37 +0200 > > Andy Shevchenko wrote: > > > On Thu, Oct 30, 2025 at 12:10:08PM +0100, Francesco Lavra wrote: > > > > On Thu, 2025-10-30 at 10:01 +0200, Andy Shevchenko wrote: > > > > > On Thu, Oct 30, 2025 at 08:27:49AM +0100, Francesco Lavra wrote: >=20 > ... >=20 > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *val =3D (data & reg->mas= k) >> __ffs(reg->mask); > > > > >=20 > > > > > Seems like yet another candidate for field_get() macro. > > > >=20 > > > > FIELD_GET() can only be used with compile-time constant masks. > > > > And apparently this is the case with u8_get_bits() too, because you > > > > get a > > > > "bad bitfield mask" compiler error if you try to use u8_get_bits(). > > >=20 > > > We are talking about different things. > > > Here are the pointers to what I'm talking: > > >=20 > > > - git grep -n -w 'field_get' > > > - > > > https://lore.kernel.org/linux-gpio/cover.1761588465.git.geert+renesas= @glider.be/ > > >=20 > > True that it will be a usecase for that, but given plan is to merge > > that through > > a different tree in next merge window, it's not available for us yet.= =C2=A0 > > Hence would > > be a follow up patch next cycle. >=20 > Yes, but we can still define them here. Dunno either with #under or > under (namespaced) names, but still possible to use now. OK, I will define an ST_LSM6DSX_FIELD_GET() macro. --=-Zznj8JQRuN4PD+b2+6iB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEhleFT5U73KMewxTm7fE7c86UNl8FAmkIdyQACgkQ7fE7c86U Nl+4oQv/f0YDTxKPnmDQtZLAMR1rSQ09I8ZI5A77NP5H9+zOBl/32hcta/Z0ouua Eg/D1CS3D6dzKddOtET0ZHTN6pH83uLRf45ItatUhBpdtSoBs1WGJaWMveIgixVU Ls2WK2onK7krHRYNtjMnH0WKsWdFiU8IYRrs0vdJfOncCsAJkIjtnz+geQvMSLSi E4q6hElEDAtd/jvTwf3WFIeRAXEgcY1nlBnSVIuETjjaNChJ+U4MasoN7L9K2cwy wV72ImowIft5kxrj2HZRx9jwlvv3oyyt3pggFHbp2Q21YRSF8TWeypVIK6aQ0YVp /ZIREHvhNqnZQHMl1fMiifzaW4z58bJAU6Raq7AOhG4Wa6t83ajDGZrXki2lhQrs gYX4i68dSZ84ujA3S/JXpROnc/Udb8RyGYvYZtZXUKKXEY8irlPd0KuHFYOGcKPI s11blc3Qfl9Omaz1II1g9pT0mdFOYqhIVzaLAu1v2EWNXi4KNkgSi6XXUaEIBjWR sFNThTOi =Wfrg -----END PGP SIGNATURE----- --=-Zznj8JQRuN4PD+b2+6iB--