Re: [PATCH v6 3/6] iio: pressure: dps310: rework the raw read paths
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-iio,dev.linux.lists.llvm,org.kernel.vger.linux-kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Mon, Aug 24, 2026 at 11:12:00PM +0300, Rupesh Majhi wrote: > Raw reads take the lock themselves, so a processed pressure read takes it > twice: once for the raw read, then again when > dps310_calculate_pressure() trylocks to refresh temperature. Refresh is > skipped whenever lock is busy. > > Split raw reads into variants that expect lock held, one helper per > channel taking it once for the whole sequence. Temperature refresh is > unconditional now. Buffered capture later in this series needs the same > shape. > Also use get_unaligned_be24() for 24-bit results, and mark functions that > need the lock with __must_hold() rather than a comment. The first part should be in a separate patch (24-bit value handling). ... You also need cleanup.h for ACQUIRE(). > #include <linux/math64.h> > #include <linux/module.h> > #include <linux/regmap.h> > +#include <linux/unaligned.h> -- With Best Regards, Andy Shevchenko