Re: [PATCH RFC v2 2/4] iio: adc: ad7380: enable regmap cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 27 Dec 2024 09:48:35 +0100
Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx> wrote:

> On Tue, Dec 24, 2024 at 10:34:31AM +0100, Julien Stephan wrote:
> > Enable regmap cache, to avoid useless access on spi bus.
> > Don't store anymore the oversampling ratio in private data structure.  
> 
> I would split that. 

Splitting it probably makes sense, though the regcache enabling patch will be small
(which is fine).

> There are a few changes in this patch that I don't
> understand, e.g. why does the return type of ad7380_update_xfers()
> change?

On first call of this, the register contents may not be in the cache
so you might get an error from the bus read. Even if we known it is in the cache
(and from a quick glance I'm not sure we do as we haven't forced a full
fill of the regcache or accessed this register) from a local code point of view
it is correct to handle the potential error and pass it to higher layers.

Jonathan


> 
> Best regards
> Uwe






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux