Linux IIO development
 help / color / mirror / Atom feed
From: Neel Bullywon <neelb2403@gmail.com>
To: jic23@kernel.org
Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Neel Bullywon <neelb2403@gmail.com>
Subject: [PATCH v7 0/3] iio: magnetometer: bmc150_magn: cleanup and formatting
Date: Sun, 15 Feb 2026 20:54:51 -0500	[thread overview]
Message-ID: <20260216015454.61836-1-neelb2403@gmail.com> (raw)

This series cleans up the bmc150_magn driver in three patches:

1/3: Replace manual mutex lock/unlock with guard()/scoped_guard()
2/3: Replace msleep(5) with fsleep(5 * USEC_PER_MSEC)
3/3: Minor formatting cleanup for initializer lists and indentation

Changes in v7:
- Place cleanup.h include just before delay.h (Andy).
- Use guard() with case-level braces instead of scoped_guard() for the
  IIO_CHAN_INFO_RAW case block in read_raw (Andy).
- Apply case-level braces consistently to all case blocks using guard()
  in write_raw (Andy).
- Use guard() instead of scoped_guard() for suspend, returning
  directly (David).
- Keep samp_freq_table as one entry per line with fixed indent and
  spaces inside braces (David, Andy).

Changes in v6:
- Split fsleep change into its own patch (Andy).
- Use scoped_guard() instead of { guard() } for the IIO_CHAN_INFO_RAW
  case block in read_raw (Andy).
- Use 5 * USEC_PER_MSEC instead of 5000 for fsleep (Andy).
- Restyle bmc150_magn_samp_freq_table to group four entries per line
  with index comments (Andy).
- Remove trailing comma from scan_masks terminator (Andy).

Changes in v5:
- Split into two patches: functional and formatting (Jonathan).
- Use fsleep() instead of usleep_range() (Jonathan).
- Use scoped_guard() for short single-statement scopes (Jonathan).
- Add {} scope for guard() in case blocks (Jonathan).
- Leave trigger_handler unchanged (Jonathan).
- Drop all unnecessary reformatting (Jonathan).

Changes in v4:
- Extend guard() usage to all mutex_lock() instances in the driver.
- Replace msleep(5) with usleep_range(5000, 6000).

Changes in v3:
- Add Reviewed-by tags.

Changes in v2:
- Use guard() for mutex protection in bmc150_magn_data_rdy_trigger_set_state.

base-commit: e7aa57247700733e52a8e2e4dee6a52c2a76de02

Neel Bullywon (3):
  iio: magnetometer: bmc150_magn: use automated cleanup for mutex
  iio: magnetometer: bmc150_magn: replace msleep with fsleep
  iio: magnetometer: bmc150_magn: minor formatting cleanup

 drivers/iio/magnetometer/bmc150_magn.c | 142 ++++++++++---------------
 1 file changed, 59 insertions(+), 83 deletions(-)

-- 
2.44.0


             reply	other threads:[~2026-02-16  1:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16  1:54 Neel Bullywon [this message]
2026-02-16  1:54 ` [PATCH v7 1/3] iio: magnetometer: bmc150_magn: use automated cleanup for mutex Neel Bullywon
2026-02-16  8:33   ` Andy Shevchenko
2026-02-20 10:34     ` Jonathan Cameron
2026-02-20 19:29       ` Neel Bullywon
2026-02-16  1:54 ` [PATCH v7 2/3] iio: magnetometer: bmc150_magn: replace msleep with fsleep Neel Bullywon
2026-02-20 10:37   ` Jonathan Cameron
2026-02-16  1:54 ` [PATCH v7 3/3] iio: magnetometer: bmc150_magn: minor formatting cleanup Neel Bullywon
2026-02-16  8:35   ` Andy Shevchenko
2026-02-20 10:37     ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260216015454.61836-1-neelb2403@gmail.com \
    --to=neelb2403@gmail.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox