Re: [PATCH] iio: accel: mma8452: Expose temperature channel

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

 



On Mon, 24 Feb 2020 15:00:20 -0600
Dylan Howey <Dylan.Howey@xxxxxxxxxxxxx> wrote:

> On 02/14/2020 13:24, Jonathan Cameron wrote:
> > So ideally we'd get someone at Freescale to confirm there is a hardware
> > rather than a documentation issue (i.e. maybe we need some other magic).  
>   
> NXP says there's a documentation issue. CTRL_REG6 can only be written
> when the device is in standby, similar to the other CTRL_REG* registers.
> 
> So I'll need to use mma8452_change_config to set this register. I will
> try this out and send a patch.
> 
> One other detail - the temperature cannot be buffered by the hwfifo.
> If I add hwfifo support, I think the right thing to do would be to
> disable hwfifo implicitly if the temperature channel is enabled and
> fall back to one interrupt per sample.
> 

It's actually fairly uncommon or people to want to sample the temperature
anywhere near as often as acceleration values, so you might be better
off only supporting sysfs polled reads to the temperature channel.

That way there won't be an unusual result of enabling the temperature
channel.

Anyone who wants the temperature (slow changing) can just grab a few
readings alongside using the buffer for the much faster changing
inertial readings.

Jonathan






[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