lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230905074137.GB10702@spacex.com>
Date:   Tue, 5 Sep 2023 00:41:37 -0700
From:   Andy Spencer <aspencer@...cex.com>
To:     Lorenzo Bianconi <lorenzo@...nel.org>
CC:     Linus Walleij <linus.walleij@...aro.org>,
        Kevin Bosien <kbosien@...cex.com>,
        Jim Gruen <jgruen@...cex.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Mario Tesi <mario.tesi@...com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        <linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] RFC: iio: lsm6dsx: Support temperature channel on
 some devices

Hi Lorenzo,

Thanks for reviewing this!

Regarding the TODR and ODR_T_BATCH settings:

> > +			[ST_LSM6DSX_ID_TEMP] = {
> > +				/*
> > +				 * NOTE: this ODR will be capped and controllerd by the
> > +				 * gyro and accelerometer don't have any reg to configure
> > +				 * this ODR.
> > +				 */
> > +				.odr_avl[0] = {  12500, 0x01 },
> > +				.odr_avl[1] = {  26000, 0x02 },
> > +				.odr_avl[2] = {  52000, 0x03 },
> > +				.odr_len = 3,
> 
> please consider we do not support low-power mode iirc (just
> high-performance - bit 4 in CTRL6_C (15h)), so even enabling accel
> sensor, the temp sensor will always runs at 52Hz. Here we should add
> just one entry, like:
> 
> 				.odr_avl[0] = { 52000, 0x03 },
> 				.odr_len = 1,

I didn't see a way to configure the batch data rate in the IIO driver
aside from the "odr_avl" table.

It seemed useful to allow reading the gyro/accel at a high rate, such as
416 Hz, while still allowing the lower temperature sub-sampling rates of
1.6 and 12.5 Hz. My original intent in adding the lower ODR table
entries here was to reuse the sampling_frequency sysfs attr to
configure the batch data rate, since that seems to be what most people
would care about.

Alternately, we could add a separate "odr_batch_avl" table along with a
separate sysfs attr (e.g. "buffer_sampling_frequency"). That would be a
lot more work though, especially since the actual ODR for the temp
sensor won't be configurable anyway.

Note, I don't have any specific need for the lower rates, so if 52 Hz is
the only rate supported, that still "works for me".

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ