All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] hwmon: (ads7871) Fix endianness and modernize driver
@ 2026-05-01  1:30 Tabrez Ahmed
  2026-05-01  1:30 ` [PATCH v4 1/3] hwmon: (ads7871) Fix endianness bug in 16-bit register reads Tabrez Ahmed
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tabrez Ahmed @ 2026-05-01  1:30 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-hwmon, linux-kernel, shuah, me, Tabrez Ahmed

This series addresses several issues in the ads7871 driver. It fixes an
architecture-dependent endianness bug in the 16-bit register read logic,
migrates the driver to the modern hwmon_device_register_with_info() API,
and moves the SPI transfer buffer into the driver's private data structure
to ensure DMA safety.

Note: I do not have access to the physical ADS7871 hardware. This
series has been compile-tested only.

Changes in v4:
- Fixed an additional Big-Endian hazard where passing a pointer
  to a 32-bit 'int' for a 1-byte SPI write transmitted the wrong command
  byte. Refactored to use a dedicated 'u8' transmit variable.

Changes in v3:
- Added Patch 1 to fix the pre-existing endianness bug in 16-bit reads,
  originally flagged by Sashiko AI.
- Fixed multiple formatting and alignment issues caught by checkpatch
  --strict, as requested by Guenter Roeck.
- Added "While at it, fix checkpatch violations" to Patch 2 commit message.

Changes in v2:
- Dropped custom mutex in favor of native hwmon core serialization.
- Split API migration and DMA fix into separate, logical patches.
- Corrected output scaling and sign extension to meet hwmon ABI.

Tabrez Ahmed (3):
  hwmon: (ads7871) Fix endianness bug in 16-bit register reads
  hwmon: (ads7871) Convert to hwmon_device_register_with_info
  hwmon: (ads7871) Use DMA-safe buffer for SPI writes

 drivers/hwmon/ads7871.c | 121 +++++++++++++++++++++++-----------------
 1 file changed, 71 insertions(+), 50 deletions(-)

-- 
2.43.0

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

end of thread, other threads:[~2026-05-01  1:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01  1:30 [PATCH v4 0/3] hwmon: (ads7871) Fix endianness and modernize driver Tabrez Ahmed
2026-05-01  1:30 ` [PATCH v4 1/3] hwmon: (ads7871) Fix endianness bug in 16-bit register reads Tabrez Ahmed
2026-05-01  1:46   ` sashiko-bot
2026-05-01  1:30 ` [PATCH v4 2/3] hwmon: (ads7871) Convert to hwmon_device_register_with_info Tabrez Ahmed
2026-05-01  1:30 ` [PATCH v4 3/3] hwmon: (ads7871) Use DMA-safe buffer for SPI writes Tabrez Ahmed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.