From nobody Sat Sep 26 23:50:54 2026 Received: from mta1.migadu.com (out-54.mta1.migadu.com [95.215.58.54]) (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 014163BED24 for ; Fri, 28 Aug 2026 07:40:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787902830; cv=none; b=D+5i2a0BVqX9cvJ8AgnIAsGcJMbqC6f0zQxL9uqU0tKtpe4ZG9DPVDqvBwsD8kl/6aojLHpHLPAfQxKty576c2UaJrzSJqMJ5xNNoJDZd4paV9ALpJCCEjx44LdJPxBHfwrLgHEkWIDQTUk9Ckwor732U6fa26+uIgO3S26CUIo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787902830; c=relaxed/simple; bh=WiHmKiduUpKlnP5Po+j7XyvB9JPEn6BsDP5e1SZg/Wo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=V+0FyisJQUMdJSHd2b/otEp9fokssc1RmhqrpTFzS2/uYXyPTdq4ZkwYLJNpCjNvozhckDTjFpcbJ4gEqMc/6OlYvE2IZhcmaCMmfs3N9lsDnciDnqyhSWkHHkilzY7EpKzIC2OL8R1RBv8VPacuz770x3ZyOf1HlYTOPRPXyXM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=PnibB2CA; arc=none smtp.client-ip=95.215.58.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="PnibB2CA" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=WiHmKiduUpKlnP5Po+j7XyvB9JPEn6BsDP5e1SZg/Wo=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787902827; v=1; x=1788507627; b=PnibB2CA8LZMNHDRYeFs6XBkoOj4LJ5hSJ3avR6N2kzXZFn69JZwO8cQAw067hGMj7MjoBbl 7o7OXB/JM8zyI8RcMapmzlXwgEzEFqAmksDUOW4xWZ4Zeq5ILprIT5Zg1QWsWza7Q4IauJTMczt 6AStfBx14vk/Hl7jc7mez7vI= X-Envelope-To: linux-kernel@vger.kernel.org Received: by mta10.migadu.com with ESMTPS id e770f2a1a4a2e097; Fri, 28 Aug 2026 07:40:26 +0000 X-Mizu-Trace-ID: e770f2a1a4a2e097 X-Migadu-Flow: FLOW_OUT Date: Fri, 28 Aug 2026 10:40:18 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen , Matti Vaittinen Cc: Matti Vaittinen , Jonathan Cameron , David Lechner , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , Mehdi Djait , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] iio: pressure: rohm-bm1390: Fix AVE_NUM initialization Message-ID: <78db4d1cf1d63f6533d519e28059b981f98e5239.1787901813.git.mazziesaccount@gmail.com> Reply-To: Matti Vaittinen References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KXP85shw15DLAuOJ" Content-Disposition: inline In-Reply-To: --KXP85shw15DLAuOJ Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Matti Vaittinen The BM1390 tries to initialize the AVE_NUM to 110b at the start-up. The field location is not taken into account, and value is written unsifted. This causes the AVE_NUM to be initialized to zero. Use FIELD_PREP() to shift the intended AVE_NUM value to correct field. Fixes: 81ca5979b6ed ("iio: pressure: Support ROHM BU1390") Signed-off-by: Matti Vaittinen --- I believe this was already applied to Jonathan's 'testing' branch. I didn't find that from public IIO repository though, so spinning it here just for the sake of the completeness. --- drivers/iio/pressure/rohm-bm1390.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iio/pressure/rohm-bm1390.c b/drivers/iio/pressure/rohm= -bm1390.c index d00d7ed54cb1..29454570f257 100644 --- a/drivers/iio/pressure/rohm-bm1390.c +++ b/drivers/iio/pressure/rohm-bm1390.c @@ -479,6 +479,7 @@ static const struct iio_info bm1390_info =3D { =20 static int bm1390_chip_init(struct bm1390_data *data) { + u8 regval; int ret; =20 ret =3D regmap_write_bits(data->regmap, BM1390_REG_POWER, @@ -512,8 +513,9 @@ static int bm1390_chip_init(struct bm1390_data *data) * Default to use IIR filter in "middle" mode. Also the AVE_NUM must * be fixed when IIR is in use. */ + regval =3D FIELD_PREP(BM1390_MASK_AVE_NUM, BM1390_IIR_AVE_NUM); ret =3D regmap_update_bits(data->regmap, BM1390_REG_MODE_CTRL, - BM1390_MASK_AVE_NUM, BM1390_IIR_AVE_NUM); + BM1390_MASK_AVE_NUM, regval); if (ret) return ret; =20 --=20 2.55.0 --KXP85shw15DLAuOJ Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmqRO2IACgkQeFA3/03a ocUgAQf8CprQW87BeQOSYHeD0fIHQjf5nlgVHDgY4164H+HMjQ3C2PkgQcxQlj89 l5FC8iJ4DVxcvl+ImABmqQu6bx4hHYzhjXVHC1zTSYRdkdwChFdV/GRXInNywb1g 8Y2dxhhqGVslwCXkbj1xI6v4qi5FK7PPrnJAHtwdG7GISjf+aGYvEUJ1cWeGnuRq H7qkwl98ODTblEZiNSv2OGFZMXSWSoMtSVOqgZBDN0Fy/I6ew1uZmrY+3gRRxk31 QBNuycCJi9dI4yib2sDiN8fp42iF+hrQ+TQEmRcbMzdkoIQ0uOjcJw5koWlKUUVW QY9Y0o15UF4qNuRKpfPPnN3XM2XrAA== =n0Xu -----END PGP SIGNATURE----- --KXP85shw15DLAuOJ-- From nobody Sat Sep 26 23:50:54 2026 Received: from mta0.migadu.com (out-21.mta0.migadu.com [91.218.175.21]) (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 A1B283BED24 for ; Fri, 28 Aug 2026 07:40:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787902848; cv=none; b=KXwXa9jQytp6g+nylC3QFqhIvo6L4UgJHP62m5d0eMpFw1fG80r3gqpYAIS8CsrXJ0Dvn7P4IgNwY8x1QCR3BvkTKChzNdeYs7ZxwSaJ9PT85W6+Ihl87f4mEA4ziTIhFVT96coa8IWX40xhkMp/xv9oceqBWVkuVGUNMtqv8vg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787902848; c=relaxed/simple; bh=CWanOnGG+UyjZ4ed1HNy/1QZ5KYEbVCpitfQSakJMhw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fmmAMRlvhmhhR913LZj6Te22Xl6HceFv5vwie3I0CcW8nrVgEm6BwIUpprdojE8zekSx9qUqJLoJ0APJW51HYqyS8+0T29bLkL8RYuLDKhTyPcrRifdt8Hu4f8EPSZ5yr/vfmSlZF9hKBGLKpdPuhG0wQ3+hzhINqalDWwgn5k0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=uI3TkJZc; arc=none smtp.client-ip=91.218.175.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="uI3TkJZc" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=CWanOnGG+UyjZ4ed1HNy/1QZ5KYEbVCpitfQSakJMhw=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787902844; v=1; x=1788507644; b=uI3TkJZcR5HgbFgaXAES8+amdOkqZu7PjdIwVBSNfbm4LeqCzEIzNxct/kh7cnEqGlptZvse dvxJVn9TIxtja678znWWRR5JVJqU2RmuM/w1HOcaAMlq7YsfOdEJuSlhgx5+X9YMeZpJQJ1aVCN B39aG8OMBzsQ9JBsKEW0UiJ8= X-Envelope-To: linux-kernel@vger.kernel.org Received: by mta11.migadu.com with ESMTPS id 87aaefbaeb70aad9; Fri, 28 Aug 2026 07:40:44 +0000 X-Mizu-Trace-ID: 87aaefbaeb70aad9 X-Migadu-Flow: FLOW_OUT Date: Fri, 28 Aug 2026 10:40:36 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen , Matti Vaittinen Cc: Matti Vaittinen , Jonathan Cameron , David Lechner , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , Mehdi Djait , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] iio: light: rohm-bu27034: Fix infinite delay on error Message-ID: <7f0d8efb3578cd4f23a7c70fa4a8f7a967c9df8e.1787901813.git.mazziesaccount@gmail.com> Reply-To: Matti Vaittinen References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iPlJb4LuCnClPMEz" Content-Disposition: inline In-Reply-To: --iPlJb4LuCnClPMEz Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Matti Vaittinen When reading an integration-time fails, the code will use error code to compute the sleep time. Fix this by using the smallest integration time as a default if reading fails. Fixes: e52afbd61039 ("iio: light: ROHM BU27034 Ambient Light Sensor") Signed-off-by: Matti Vaittinen --- Revision history: v1 =3D> v2: - Moved Fixes before SOB - Clarified units for the smallest integration time as suggested by Andy --- drivers/iio/light/rohm-bu27034.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/iio/light/rohm-bu27034.c b/drivers/iio/light/rohm-bu27= 034.c index f9a421618406..cb2afddc75f6 100644 --- a/drivers/iio/light/rohm-bu27034.c +++ b/drivers/iio/light/rohm-bu27034.c @@ -137,6 +137,7 @@ static const struct iio_gain_sel_pair bu27034_gains[] = =3D { #define BU27034_MEAS_MODE_200MS 2 #define BU27034_MEAS_MODE_400MS 4 =20 +#define BU27034_INT_TIME_US_MIN (55 * USEC_PER_MSEC) static const struct iio_itime_sel_mul bu27034_itimes[] =3D { GAIN_SCALE_ITIME_US(400000, BU27034_MEAS_MODE_400MS, 8), GAIN_SCALE_ITIME_US(200000, BU27034_MEAS_MODE_200MS, 4), @@ -1162,6 +1163,15 @@ static int bu27034_buffer_thread(void *arg) data =3D iio_priv(idev); =20 wait_ms =3D bu27034_get_int_time(data); + + /* + * If reading the integration time fails, default to the minimum so we + * don't lose samples. This may waste CPU cycles, but as a hardening + * against theoretical, once-in-a-blue-moon error, this should be Ok. + */ + if (wait_ms < 0) + wait_ms =3D BU27034_INT_TIME_US_MIN; + wait_ms /=3D 1000; =20 wait_ms -=3D BU27034_MEAS_WAIT_PREMATURE_MS; --=20 2.55.0 --iPlJb4LuCnClPMEz Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmqRO3QACgkQeFA3/03a ocWprwgAuMW+8SNHkdRXkBD2VPg+Vc/UYBgwtxBoLA9zia1FuMgwyslAaLb42L67 O3tsgKScB0y6RZ2gIBFw+d0Jpd8/3vTrRa3ai12ueHzAbqUJu+EtXZnKFPRKCrJQ pmcEFhwPaDeDdkuEMPmk+9gFE9CgZuKYbCc6tAZFQ1Y1MAjO9C4Y/SVHp7E+MH+3 FJlATNWkjaUc0Mb4XufFR8B+enfBliNt2Y0lyyHsNbWUy0+/4do5nDiWMN0JjVXh F5xc5g/xYRTDBTjT4JkRv71tUpjFXzaZkHsLzXO2s3TBAbYksIkgvAmemR2PFbqS rqX9OY7PdsnyDuFNHKuz0tZyT7ordQ== =bbX1 -----END PGP SIGNATURE----- --iPlJb4LuCnClPMEz-- From nobody Sat Sep 26 23:50:54 2026 Received: from mta0.migadu.com (out-32.mta0.migadu.com [91.218.175.32]) (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 467563ABDB3 for ; Fri, 28 Aug 2026 07:41:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787902864; cv=none; b=Du94kg5Cnzt8vYAU3WH17WLezdx5G+96zBH1YEHTEaFapU9kwIFmXV4yNGylNHaQ3hkYoyXEOMwswy8vJ7l4M6sfFWAz0nkvqOwNGtPthm6nVZ5bVnLoChZme4oBcky2xlMWiVKzfNvwfzK4z0C1SoqJiEb0Nc5ItSj04nwrqdQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787902864; c=relaxed/simple; bh=XYnOlZNecNU7j2jhNiOFeWbXe/IQi0ASVyCFakZh0vc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Eceu9ela0Uahoyr3xPTCB8QEt94dGr3hpeREmCPNg/FVf7jmN7XLo4VNirbXtMa+Va7L4E04PGlmAgbKEn3sNUYYN+7MS7uHY+svR0wJeDKKfkqTrxflKMhofADdf5Rhf9k8zKIIXIad6AvZleuY5M1BUbVAx8wUDeRMCcmU680= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=OJkK/Qvm; arc=none smtp.client-ip=91.218.175.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="OJkK/Qvm" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=XYnOlZNecNU7j2jhNiOFeWbXe/IQi0ASVyCFakZh0vc=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787902861; v=1; x=1788507661; b=OJkK/Qvmo2RhRJM42FQR3G4/1ZGzX/8In6c8hDGAvaIYK+l3tA0NhE2VUXDf3Wr7mp3bzN93 J3vTsF6arhsdU4rSDehW8YdOqGoxVBl5EpEv+gZ8GWyQ23UPmAAZLuw4OyTZYS7GqSwZzKVilzU DXYllHonK+VX3JvXgvwkVHXw= X-Envelope-To: linux-kernel@vger.kernel.org Received: by mta11.migadu.com with ESMTPS id 793fdaa71214d916; Fri, 28 Aug 2026 07:41:01 +0000 X-Mizu-Trace-ID: 793fdaa71214d916 X-Migadu-Flow: FLOW_OUT Date: Fri, 28 Aug 2026 10:40:51 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen , Matti Vaittinen Cc: Matti Vaittinen , Jonathan Cameron , David Lechner , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , Mehdi Djait , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] iio: accel: kionix-kx022a: Prevent memory leak and fix state Message-ID: <9e4453fcc00df6ec988207df8916226d18aecb20.1787901813.git.mazziesaccount@gmail.com> Reply-To: Matti Vaittinen References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Ris3llGW6/HBkn17" Content-Disposition: inline In-Reply-To: --Ris3llGW6/HBkn17 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Matti Vaittinen The driver allocates memory for samples at buffer enable path. If regmap operation fails in the kx022a_fifo_enable() at the buffer enable path, the allocated memory is never freed. Furthermore, the state information and previous hardware configuration(s) aren't undone, potentially leaving WMI interrupts and buffers enabled, or driver state flags wrong. Free the memory and revert the hardware configuration and state flags on error path. Fixes: e7123a4dfcd7 ("iio: accel: kionix-kx022a: Refactor driver and add ch= ip_info structure") Signed-off-by: Matti Vaittinen Reviewed-by: Mehdi Djait --- Revision history: v1 =3D> v2: - Fix unwinding the fifo enabling - Move Fixes before the SOB. --- drivers/iio/accel/kionix-kx022a.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-k= x022a.c index 8a13f78aeab0..fa94bc0fd8cf 100644 --- a/drivers/iio/accel/kionix-kx022a.c +++ b/drivers/iio/accel/kionix-kx022a.c @@ -980,26 +980,44 @@ static int kx022a_fifo_enable(struct kx022a_data *dat= a) guard(mutex)(&data->mutex); ret =3D __kx022a_turn_on_off(data, false); if (ret) - return ret; + goto err_free_out; =20 /* Update watermark to HW */ ret =3D kx022a_fifo_set_wmi(data); if (ret) - return ret; + goto err_wmi_out; =20 /* Enable buffer */ ret =3D regmap_set_bits(data->regmap, data->chip_info->buf_cntl2, KX022A_MASK_BUF_EN); if (ret) - return ret; + goto err_wmi_out; =20 data->state |=3D KX022A_STATE_FIFO; ret =3D regmap_set_bits(data->regmap, data->ien_reg, KX022A_MASK_WMI); if (ret) - return ret; + goto err_buf_en_out; =20 - return __kx022a_turn_on_off(data, true); + ret =3D __kx022a_turn_on_off(data, true); + if (ret) + goto err_on_out; + + return ret; + +err_on_out: + regmap_clear_bits(data->regmap, data->ien_reg, + KX022A_MASK_WMI); +err_buf_en_out: + regmap_clear_bits(data->regmap, data->chip_info->buf_cntl2, + KX022A_MASK_BUF_EN); + data->state &=3D ~KX022A_STATE_FIFO; +err_wmi_out: + __kx022a_turn_on_off(data, true); +err_free_out: + kfree(data->fifo_buffer); + + return ret; } =20 static int kx022a_buffer_postenable(struct iio_dev *idev) --=20 2.55.0 --Ris3llGW6/HBkn17 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmqRO4MACgkQeFA3/03a ocWihAf/Visbz6MOtiAwoNQaAWLhvKgXKE7aDu8W6zNRAGycFiU2TKW4cvMzkUpS UIMkHym+MdtqGr2mkb2qj4IObYZfJO1Otyw8V6+luSc982pnjiTnCkG57Ah9GxFj O0Ug1HsRO0ZkABSFvsku4sLrp3QvFsfbGWxZiWzEaox2Jrc3yNMwh6YjzzyQdaFK l+otvT5389vCwwcEuk89wLSPUrnUdgFDbyJRD7xPm33vypAdHmFRCKHikYp4FOiB evOOYgAL0PfVHT+/FEGqDiG/Bg66BzsSDYnKM2gr/lf8vdNxJTzMfj+Dn7ItVCXi Y8UwZ/HZ4EecKcRekBsG5/Ye0Gab7A== =pbN6 -----END PGP SIGNATURE----- --Ris3llGW6/HBkn17-- From nobody Sat Sep 26 23:50:54 2026 Received: from mta0.migadu.com (out-40.mta0.migadu.com [91.218.175.40]) (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 D0B873C1400 for ; Fri, 28 Aug 2026 07:41:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787902884; cv=none; b=A9xaFSvadfhwtqozO4LQDFJbwwxPC5OXu5gfjcWYfqO+oty41Qq8N6UyA1c/Vszqd72cLIzPkR/nEpn+wqxy89zxEi7zpYOleN/5U7dFlT6lryISv0Nobs9YK0XQRP9nQtSVE9HnZm9TgWVcU+zVDadSdci2g2KfFyCMFwHM1gs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787902884; c=relaxed/simple; bh=lxQwDZUBPKMiN4rKy7Wx4GnvGH6bw5PgAm6OjTB5zS8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Fgy8fLjWZ35Zou6rgFcIUWlWa6eJ7oj3FPlNsH1sCxcVrR1GHW5MquWXOI9Fq3QMHtbcMrDrurmndq+C6KDD1nN6itKWkUk1oC3PJxp2+N31a6vI3tmgl8qQAV28i+kn7mK5RClbJ6ISxXmUnje3srJulQRH2eYdlgdlsk4K/II= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=NV9r7Nis; arc=none smtp.client-ip=91.218.175.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="NV9r7Nis" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=lxQwDZUBPKMiN4rKy7Wx4GnvGH6bw5PgAm6OjTB5zS8=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787902880; v=1; x=1788507680; b=NV9r7NisaxEkdQNNWw5FX5n9PzcMgTFIRk+J6U6K3rsuSXGqWRXaWnD+rhcytjBe/MD3q1qw 79vwv4DCN+mW3sx5QQLxyj4zoJIVgXYSCAdtISXDla8AeXp/51tRggljqKNRhhCF9R9z3uYzz9x Xdtmqi0mq6VlmefaoyFXbTV4= X-Envelope-To: linux-kernel@vger.kernel.org Received: by mta12.migadu.com with ESMTPS id 52cc6e5ea10533eb; Fri, 28 Aug 2026 07:41:20 +0000 X-Mizu-Trace-ID: 52cc6e5ea10533eb X-Migadu-Flow: FLOW_OUT Date: Fri, 28 Aug 2026 10:41:15 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen , Matti Vaittinen Cc: Matti Vaittinen , Jonathan Cameron , David Lechner , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , Mehdi Djait , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/4] iio: accel: kionix-kx022a: Fix IPOL macro name Message-ID: Reply-To: Matti Vaittinen References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0hs/Mw2K0VOgxflI" Content-Disposition: inline In-Reply-To: --0hs/Mw2K0VOgxflI Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Matti Vaittinen The "interrupt polarity high"-macro for KX022A variant is defined as: "#define KX022A_MASK_IPOL KX022A_MASK_IPOL1" However, the KX022A_MASK_IPOL1 is not defined anywhere, so actually using the KX022A_IPOL_HIGH would produce a compile error. Fix the define by using correct mask. Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer") Signed-off-by: Matti Vaittinen Reviewed-by: Mehdi Djait --- Revision history: v1 =3D> v2: - Fixed the commit message where line: "#define KX022A_MASK_IPOL KX022A_MASK_IPOL1" was lost, as git treated it as a comment :) - Moved Fixes before SOB --- drivers/iio/accel/kionix-kx022a.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/kionix-kx022a.h b/drivers/iio/accel/kionix-k= x022a.h index 0ed54f584223..a2d122c1e234 100644 --- a/drivers/iio/accel/kionix-kx022a.h +++ b/drivers/iio/accel/kionix-kx022a.h @@ -65,7 +65,7 @@ #define KX022A_MASK_IEN BIT(5) #define KX022A_MASK_IPOL BIT(4) #define KX022A_IPOL_LOW 0 -#define KX022A_IPOL_HIGH KX022A_MASK_IPOL1 +#define KX022A_IPOL_HIGH KX022A_MASK_IPOL #define KX022A_MASK_ITYP BIT(3) #define KX022A_ITYP_PULSE KX022A_MASK_ITYP #define KX022A_ITYP_LEVEL 0 --=20 2.55.0 --0hs/Mw2K0VOgxflI Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmqRO5sACgkQeFA3/03a ocXcdwf9H+X03uz+kSa/2wDaPaP5+zmcu+pfvOrlMAbjuoshbCtfbWk6F8SDfCoT ZNnUOPAacDrCjaIYTjIaYXCAo4hy3hJgdaevaMWhEeq0QYcbrM5gQ2VXahuFCrp5 TeRDncKi7N+sM6zuQwubGrqUDwa/Zrb6eskiR0FciUq2AISk2bY94S9kLit90VVM jDlEhuho4fTsbWqH3DsdYsI9/lkRgxukvS+tmXetB+Ba/iZA71d+flmxq8nWkl5e fOPGsW4s4mSWW68xL6YZwZiNiJTgLMeuHgHgOYR04J3jjYV3vIOzkhNnM/lD+Ch1 spM+dOfifcs/qQIYUziCWDEr8eOf3g== =dyl7 -----END PGP SIGNATURE----- --0hs/Mw2K0VOgxflI--