public inbox for linux-iio@vger.kernel.org
help / color / mirror / Atom feed
* [PATCH v4 0/2] iio: adc: mcp320x: bitfield refactoring
@ 2026-04-22 22:14 Gustavo Pagnotta Faria
  2026-04-22 22:14 ` [PATCH v4 1/2] iio: adc: mcp320x: sort headers alphabetically Gustavo Pagnotta Faria
  2026-04-22 22:14 ` [PATCH v4 2/2] iio: adc: mcp320x: refactor driver to use bitfield API Gustavo Pagnotta Faria
  0 siblings, 2 replies; 9+ messages in thread
From: Gustavo Pagnotta Faria @ 2026-04-22 22:14 UTC (permalink / raw)
  To: andy, dlechner, jic23, nuno.sa; +Cc: Gustavo Pagnotta Faria, linux-iio

This patch series refactors the mcp320x driver to use the standard
Linux bitfield API and sorts the headers alphabetically as requested.

Changes in v4:
 - Separated the patch into a series (Patch 1: sort headers,
Patch 2: bitfield refactor).
 - Fixed style of MCP3550 comment
 - Avoided variable reassignments (foo = bar(foo)) and used explicit
temporary variables.
 - Replaced boolean casting (!differential) with ternary operator.
 - Fixed line length limit warning in the mcp3301 case by introducing
temporary variables.
 - Fixed placement of RX data extraction in the MCP3550 block to
strictly follow the descriptive comment, as requested.
 - Link to v3: https://lore.kernel.org/linux-iio/20260422030846.45317-1-gustavo.pagnotta@ime.usp.br/

Changes in v3:
 - Removed wildcard 'X' from all macros (including MCP355X -> MCP3550),
using lowest part number instead.
 - Separated Tx channel masks for 4-channel (MCP3004) and
8-channel (MCP3008).
 - Added comment explaining MCP3550 Data and Status bits usage.
 - Replaced be16_to_cpup() and be32_to_cpup() with get_unaligned_be16()
and get_unaligned_be32(), moving them inside the relevant switch cases.
 - Fixed accidental removal of '~' operator in MCP3550 overrange clearing.
 - Link to v2: https://lore.kernel.org/linux-iio/20260420215021.14112-1-gustavo.pagnotta@ime.usp.br/

Changes in v2:
 - Sent previously as an unversioned reply to the v1 thread.
 - Fixed typo in author's email address.
 - Link to v1: https://lore.kernel.org/linux-iio/20260420212405.11789-1-gustavo.pagnotta@ime.usp.br/

Gustavo Pagnotta Faria (2):
  iio: adc: mcp320x: sort headers alphabetically
  iio: adc: mcp320x: refactor driver to use bitfield API

 drivers/iio/adc/mcp320x.c | 89 ++++++++++++++++++++++++++++-----------
 1 file changed, 65 insertions(+), 24 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-04-24 11:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22 22:14 [PATCH v4 0/2] iio: adc: mcp320x: bitfield refactoring Gustavo Pagnotta Faria
2026-04-22 22:14 ` [PATCH v4 1/2] iio: adc: mcp320x: sort headers alphabetically Gustavo Pagnotta Faria
2026-04-23 17:46   ` Andy Shevchenko
2026-04-23 20:45     ` Gustavo Pagnotta Faria
2026-04-24  8:01       ` Andy Shevchenko
2026-04-24 11:37         ` Jonathan Cameron
2026-04-22 22:14 ` [PATCH v4 2/2] iio: adc: mcp320x: refactor driver to use bitfield API Gustavo Pagnotta Faria
2026-04-24  8:05   ` Andy Shevchenko
2026-04-24 11:45     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox