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]
Date:   Wed, 30 Dec 2020 12:37:48 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Jyoti Bhayana <jbhayana@...gle.com>
Cc:     Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Rob Herring <robh@...nel.org>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>,
        linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
        cristian.marussi@....com, sudeep.holla@....com,
        egranata@...gle.com, mikhail.golubev@...nsynergy.com,
        Igor.Skalkin@...nsynergy.com, Peter.hilber@...nsynergy.com,
        ankitarora@...gle.com
Subject: Re: [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

On Thu, 24 Dec 2020 03:19:20 +0000
Jyoti Bhayana <jbhayana@...gle.com> wrote:

> Hi,
> 
> This series adds support for ARM SCMI Protocol based IIO Device.
> This driver provides support for Accelerometer and Gyroscope sensor
> using new SCMI Sensor Protocol defined by the upcoming SCMIv3.0 ARM
> specification, which is available at 
> 
> https://developer.arm.com/documentation/den0056/c/
> 
> The series is currently based on top of:
> 
> commit f83eb664cdb4 ("Merge tag 'scmi-voltage-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into for-next/scmi")
> 
> in Sudeep for-next/scmi branch:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/\
> linux.git/log/?h=for-next/scmi
> 
> This version of the patch series has been tested using 
> version 5.4.21 branch of Android common kernel.
> 
> Any feedback welcome,
> 
> Thanks,
> 
> Jyoti Bhayana
> 
> v1 --> v2
> - Incorporated the feedback comments from v1 review of the patch
> - Regarding the new ABI for sensor_power,sensor_max_range,
> and sensor_resolution, these are some of the sensor attributes
> which Android passes to the apps. If there is any other way of getting
> those values, please let us know

So, sensor_max_range can effectively be exposed as a combination of
scale and the *_raw_avail for a raw read (via the read_avail callback in IIO).
We'll ignore the fact the interface assumes a single value (so I assume symmetric?)

I think resolution in android is equivalent to _scale in IIO terms?
Docs seem to say it's "resolution of the sensor in sensor's units".
There are a few corners where that might not be true (sensors that do some
odd padding for example) but we can probably rely on it normally being fine.

Power.  Hmm. Currently we have no provision for this as users
of the sensor don't care.  The OS might of course, but individual applications
tend not to.

The question is much more general than IIO if we go down the route of
exposing this from the kernel as we should define some sort of power query
interface for any device in the system in a generic way. I'm not sure if
any such thing already exists.

Jonathan

> 
> Jyoti Bhayana (1):
>   iio/scmi: Adding support for IIO SCMI Based Sensors
> 
>  MAINTAINERS                                |   6 +
>  drivers/iio/common/Kconfig                 |   1 +
>  drivers/iio/common/Makefile                |   1 +
>  drivers/iio/common/scmi_sensors/Kconfig    |  18 +
>  drivers/iio/common/scmi_sensors/Makefile   |   5 +
>  drivers/iio/common/scmi_sensors/scmi_iio.c | 693 +++++++++++++++++++++
>  6 files changed, 724 insertions(+)
>  create mode 100644 drivers/iio/common/scmi_sensors/Kconfig
>  create mode 100644 drivers/iio/common/scmi_sensors/Makefile
>  create mode 100644 drivers/iio/common/scmi_sensors/scmi_iio.c
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ