Re: [PATCH v2] iio: adc: ad7124: Micro-optimize channel disabling

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

 



On Mon, 20 Jan 2025 15:52:20 +0000
Nuno Sá <noname.nuno@xxxxxxxxx> wrote:

> On Mon, 2025-01-20 at 15:07 +0100, Uwe Kleine-König wrote:
> > The key objective in ad7124_disable_one() is clearing the
> > AD7124_CHANNEL_EN_MSK bit in the channel register. However there is no
> > advantage to keep the other bits in that register because when the
> > channel is used next time, all fields are rewritten anyhow. So instead
> > of using ad7124_spi_write_mask() (which is a register read plus a
> > register write) use a simple register write clearing the complete
> > register.
> > 
> > Also do the same in the .disable_all() callback by using the
> > .disable_one() callback there.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx>
> > ---  
> 
> Reviewed-by: Nuno Sa <nuno.sa@xxxxxxxxxx>
Applied.  Thanks,







[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