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-next>] [day] [month] [year] [list]
Message-ID: <20220419154555.24191-1-ddrokosov@sberdevices.ru>
Date:   Tue, 19 Apr 2022 15:45:48 +0000
From:   Rokosov Dmitry Dmitrievich <DDRokosov@...rdevices.ru>
To:     "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "stano.jakubek@...il.com" <stano.jakubek@...il.com>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "jic23@...nel.org" <jic23@...nel.org>,
        "lars@...afoo.de" <lars@...afoo.de>,
        "andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
        "stephan@...hold.net" <stephan@...hold.net>
CC:     "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        kernel <kernel@...rdevices.ru>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Rokosov Dmitry Dmitrievich <DDRokosov@...rdevices.ru>
Subject: [PATCH v1 0/3] iio: accel: add MSA311 accelerometer driver

MSA311 is a tri-axial, low-g accelerometer with I2C digital output for
sensitivity consumer applications. It has dynamical user selectable full
scales range of +-2g/+-4g/+-8g/+-16g and allows acceleration measurements
with output data rates from 1Hz to 1000Hz.

Datasheet can be found at following URL:
https://cdn-shop.adafruit.com/product-files/5309/MSA311-V1.1-ENG.pdf

This driver supports following MSA311 features:
    - IIO interface
    - Different power modes: NORMAL, SUSPEND and LOW (using pm_runtime)
    - ODR (Output Data Rate) selection
    - Scale and samp_freq selection
    - IIO triggered buffer, IIO reg access
    - NEW_DATA interrupt + trigger

Below features to be done:
    - Motion Events: ACTIVE, TAP, ORIENT, FREEFALL

Also this patchset has new vendor prefix for MEMSensing Microsystems and
MSA311 dt-binding schema.

You can test msa311 driver using libiio and gnuplot following below
instructions:
$ # Read 4K samples using buffer with depth equals to 64 samples and
$ # rotate device a little bit
$ iio_readdev -u "local:" -b 64 -s 4096 msa311 > /data/local/tmp/msa311.dat
$ gnuplot
gnuplot> set title "MSA311 Accel Data"
gnuplot>
gnuplot> set key below
gnuplot>
gnuplot> set xdata time
gnuplot> set format x "%H:%M\n%.4S"
gnuplot> set xlabel "timestamp"
gnuplot>
gnuplot> set autoscale y
gnuplot> plot 'msa311.dat' binary format='%int16%int16%int16%uint16%uint64'\
>      using ($5/1000000000):1 title "acc_x" with lines,\
>     'msa311.dat' binary format='%int16%int16%int16%uint16%uint64' using\
>     ($5/1000000000):2 title "acc_y" with lines,\
>     'msa311.dat' binary format='%int16%int16%int16%uint16%uint64' using\
>     ($5/1000000000):3 title "acc_z" with lines

Dmitry Rokosov (3):
  dt-bindings: vendor-prefixes: add MEMSensing Microsystems Co., Ltd.
  iio: add MEMSensing MSA311 3-axis accelerometer driver
  dt-bindings: iio: accel: add dt-binding schema for msa311 accel driver

 .../bindings/iio/accel/memsensing,msa311.yaml      |   64 +
 .../devicetree/bindings/vendor-prefixes.yaml       |    2 +
 MAINTAINERS                                        |    7 +
 drivers/iio/accel/Kconfig                          |   13 +
 drivers/iio/accel/Makefile                         |    2 +
 drivers/iio/accel/msa311.c                         | 2068 ++++++++++++++++++++
 6 files changed, 2156 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/accel/memsensing,msa311.yaml
 create mode 100644 drivers/iio/accel/msa311.c

-- 
2.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ