[PATCH v4 0/2] iio: magnetometer: bmc150: use FIELD_PREP and FIELD_GET helpers

From: Hungyu Lin

Date: Wed Jun 10 2026 - 00:25:16 EST


Replace open-coded bitfield operations with FIELD_PREP() and
FIELD_GET() helpers where appropriate.

Also simplify bmc150_magn_set_odr() by returning directly from
the matching table entry.

v4:
- Split include sorting into a separate prerequisite patch
- Remove the extra blank line in bmc150_magn_get_odr()

v3:
- Add missing include <linux/bitfield.h>

v2:
- Use FIELD_PREP() and FIELD_GET() helpers as suggested by
Jonathan Cameron
- Simplify bmc150_magn_set_odr() by returning directly from
the matching table entry

Hungyu Lin (2):
iio: magnetometer: bmc150: sort includes
iio: magnetometer: bmc150: use FIELD_PREP and FIELD_GET helpers

drivers/iio/magnetometer/bmc150_magn.c | 50 +++++++++++++-------------
1 file changed, 24 insertions(+), 26 deletions(-)

--
2.34.1