[PATCH 12/12] iio: accel: kionix-kx022a: Fix IPOL macro name
Matti Vaittinen <[email protected]>
| Newsgroups | org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <c26c2741ca11adf7a089c094d8648f4ec6cbab54.1786347811.git.mazziesaccount@gmail.com> |
From: Matti Vaittinen <[email protected]> The "interrupt polarity high" -macro for KX022A variant is defined as: 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. Signed-off-by: Matti Vaittinen <[email protected]> Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer") --- It appears the KX022A_IPOL_HIGH is unused as the IRQ is currently, unconditionally set level low in kx022a_prepare_irq_pin(). The KX022A hardware would support other configurations though. So, another potential fix would be removing the define altogether. I decided to leave the define there, as having it will allow users who need different configuration to simply change the KX022A_IPOL_LOW to KX022A_IPOL_HIGH, which is kind of a "easy to try" thing. I don't have a strong preference here though. --- 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-kx022a.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 -- 2.55.0
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmp5g+0ACgkQeFA3/03a ocWszgf/R0DYNmXxaREMAcNc1Mz3mLHRrv8E+sAro2trSrF6Go8eA1+1xOyxHaYt KX3EpzAEkpgN0nY0imEM6bcIBbD9CXk5ymKJ6K0Tu6RyP4B7Vm73TsQF8kin/qk6 fddQAJ29oXfPp/5t17MuKM/Nk8dm1OA7aKnZCcEUMK6rbzLop8VcolAUJuzHZS+I I6ndSfDI9ioGNVtGX+PVCvNZy58MO5U3ztj93ZwTVUODPjfy2ZoNvcBHzkWLDe8h IuKpKTIEyj46KB0x3mxJiGJBZpuLRFbbgMd2UoXcv07Zwd64lSNA0BYiDan3ytfn JslR+J2a5+FJQQki/9UWfay1sEE/DA== =CIkl -----END PGP SIGNATURE-----