Age | Commit message (Collapse) | Author | Files | Lines |
|
As it has been already done for other st sensors in 'commit 9049531c91b4
("iio: accel: st_accel: inline per-sensor data")', get rid of some
defines and just open code the values into the appropriate struct
elements since the semantic meaning is inherent in the name of the
C99-addressable fields and there is no reason to duplicate the code
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
'gyro_sensor'
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c: In function 'st_lsm6dsx_read_tagged_fifo':
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:520:41: warning:
variable 'gyro_sensor' set but not used [-Wunused-but-set-variable]
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:520:28: warning:
variable 'acc_sensor' set but not used [-Wunused-but-set-variable]
They are not used since commit 14c7c6e1a860 ("iio: imu: st_lsm6dsx: add
st_lsm6dsx_push_tagged_data routine")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Add support to STM LSM6DSR 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dsr.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Final part of the re-organization. Move the `adis16400.h` into
`adis16400.c` since it no longer needs to be shared among other files.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
This change does a simple 1-to-1 rename of the adis16400_core.c file. Now
that the `adis16400_buffer.c` file was removed, everything can be moved
into a single driver file.
But first, this rename.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
This change has been done separately, so that it's easier to visualize the
changed logic in the adis_scan_update() function.
Most of the function in this `adis16400_update_scan_mode()` that deals with
burst-mode will be re-used in the ADIS16480, but with different parameters.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Some variants in the ADIS16400 family support burst mode. This mechanism is
implemented in the `adis16400_buffer.c` file.
Some variants in ADIS16480 are also adding burst mode, which is
functionally similar to ADIS16400, but with different parameters. To get
there, a `adis_burst` struct is added to parametrize certain bits of the
SPI communication to setup: the register that triggers burst-mode, and the
extra-data-length that needs be accounted for when building the bust-length
buffer.
The trigger handler cannot be made generic, since it's very specific to
each ADIS164XX family.
A future enhancement of this `adis_burst` mode will be the possibility to
enable/disable burst-mode. For the ADIS16400 family it's hard-coded to on
by default. But for ADIS16480 there will be a need to disable this.
When that will be implemented, both ADIS16400 & ADIS16480 will have the
burst-mode enable-able/disable-able.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
The trigger handler for the ADIS16400 is very different from the generic
one in the ADIS library. Keeping it in a separate file won't make much
sense once the update_scan_mode function will be made more generic and
moved into the ADIS library.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Add support to STM LSM6DSOX 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dsox.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Inertial sensor data collection and processing can be controlled by
configuring one of the DIOx lines as an external clock input. This
option is available for all devices supported by this driver. However,
only adis1649x devices support different modes for the external clock.
Sync mode is supported by all devices. In this mode, the output data
rate is equal with the clock frequency divided by DEC_RATE + 1. This
mode of calculation is similar with the case when the internal clock is
used.
Pulse Per Second (PPS) Mode, is only supported by adis1649x devices. In
this mode, the output data rate is equal to the product of the external
clock frequency and the scale factor in the SYNC_SCALE register.
This patch uses the "clock-names" property to enable the external clock
in one of the two supported modes: "sync" or "pps". This property is
optional. If it is not specified, the internal clock is used.
This patch also offers the option to select the DIOx line to be used as
an external clock input via the custom "adi,ext-clk-pin" property. If this
field is left empty, DIO2 is assigned as default external clock input pin.
Each DIOx pin supports only one function at a time (data ready line
selection or external clock input).
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Add support to STM ASM330LHH 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/asm330lhh.pdf
Tested-by: Mario Tesi <mario.tesi@st.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
- use temporary variable in get_mount_matrix()
- remove , after { }
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Currently mount matrix is allowed in Device Tree, though there is
no technical issue to extend it to support ACPI.
Convert the function to use device_property_read_string_array() and
thus allow to read mount matrix from ACPI if available.
Example of use in _DSD method:
Name (_DSD, Package ()
{
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package ()
{
Package () { "mount-matrix", Package() {
"1", "0", "0",
"0", "0.866", "0.5",
"0", "-0.5", "0.866",
} },
}
})
At the same time drop the "of" prefix from its name and
convert current users.
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
The ADIS16495 and ADIS16497 are inertial systems that include a triaxis
gyroscope and a triaxis accelerometer. The serial peripheral interface
(SPI) provide a simple interface for data collection and configuration
control. The devices are similar to ADIS16475, ADIS16480, ADIS16485 and
ADIS16488, the main differences are highlighted below:
* The temperature data scale is 0.00565 C/LSB for ADIS16475 and ADIS1648x
devices, while for ADIS1649x 0.0125 C/LSB.
* ADIS1649x devices support different gyroscope measurement ranges which
are dependent on the dash number (-1, -2, -3), see Table 24 in the
ADIS16495 datasheet. However, the ADIS16497 gyroscopes have the same
scale as ADIS16495.
* ADIS16495 devices support the acceleration maximum range of 8g, while
ADIS16497 devices go up to 40g.
* The internal clock for ADIS1649x devices is 4.25 kSPS. The sampling
frequency is calculated by applying a decimation rate which can take a
maximum value of 4250.
* ADIS1649x devices support different default filter frequencies.
Datasheets:
Link: https://www.analog.com/media/en/technical-documentation/data-sheets/adis16495.pdf
Link: https://www.analog.com/media/en/technical-documentation/data-sheets/adis16497.pdf
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
When setting the filter frequency, the driver looks into the
adis16480_def_filter_freqs table for the best match. Pass this table to
the chip_info struct since future devices will need to use a different
table.
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
The adis1648x devices have an internal clock of 2.46 kSPS. The sampling
frequency is calculated by applying a decimation rate which can take the
maximum value of 2047.
Although all adis1648x devices are similar in this regard, devices that
will use this feature will be added in the future.
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
All supported devices provide internal temperature measurement from -40 C
to +85 C, with +25 C representing value 0x00.
This patch treats the temperature scale in a generic way, similar to the
accelerometer and gyroscope scales. So far, there are no temperature max
scale differences between the supported devices. However, devices that
will make use of this feature will be added in the future.
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
The driver does not have a struct of_device_id table, but supported
devices are registered via Device Trees. This patch adds OF device ID
table.
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
The FNCTIO_CTRL register provides configuration control for each I/O pin
(DIO1, DIO2, DIO3 and DIO4).
This patch adds the option to configure each DIOx pin as data ready
indicator with positive or negative polarity by reading the 'interrupts'
and 'interrupt-names' properties from the devicetree. The
'interrupt-names' property is optional, if it is not specified, then the
DIO1 pin is used as default data ready signal.
Although the factory default assigns DIO2 as data ready signal, in the
versions previous this patch, DIO1 pin was used. We should leave this
configuration as is, since some devices might be expecting the interrupt
on the wrong physical pin.
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
We are using "if (ret < 0)" in many places in which the function returns 0
on success. Use "if (ret)" instead for better clarity and correctness.
Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Currently, we snap the timestamp after reading from the buffer and
processing the event. When the IIO poll function is triggered by an
interrupt, we can get a slightly more accurate timestamp by snapping it
prior to reading the data, since the data was already generated prior to
entering the trigger handler. This is not going to make a huge difference,
but we might as well improve slightly.
Do this by using iio_pollfunc_store_time as other drivers do.
Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Add interrupt support for the data ready signal on the BMI160, which fires
an interrupt whenever new accelerometer/gyroscope data is ready to read.
Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Add SPDX identifiers (GPL 2) for the BMI160 driver. bmi160.h had an
identifier, but the other files did not.
Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First set of new device support, features and cleanup for IIO in the 5.1 cycle
A number of interesting new devices supported plus a good set of staging
cleanup including one graduation and one drop.
New device support
* ad56886
- Add support for AD5674R/AD5679R with some minor driver changes to support
more channels.
* ad7768
- New driver and dt bindings for this 24 bit ADC.
* max44009
- New driver and dt bindings for this ambient light sensor.
* mpu6050
- Support the ICM 20602 IMU. Minor tweaks due to slightly different
register map.
* NPCM adc
- New driver and dt bindings for this BMC ADC.
* Sensiron SGP30
- Modifiers for ethanol and H2.
- New driver and dt bindings.
- Follow patch added self cleaning support.
* Sensiron SPS30
- New channel type for mass concentration.
- New driver and bindings.
- Minor tidy up patch followed (drop fmt specifier as unused)
* st_pressure
- lps22hh support. ID plus information structures and dt bindings.
* ti-ads124s08
- Add binding doc and driver.
Staging graduations
* ad7606 driver and bindings.
Staging drops
* ad7152 CDC driver dropped. This part is near EoL and no one is known
to be using it. If anyone surfaces obviously we can bring the driver
back. If not, good to drop it to avoid wasting anyone's time cleaning
it up.
New features
* bme680
- DT support and bindings doc.
* isl29018
- Add regulator for VCC.
* mag3110
- Add regulators for supplies.
* meson-saradc
- Support the temperature sensors of more SoCs.
* mma8452
- Add regulators for power suplies and binding docs to reflect them.
* st-accel
- Support the undocumented but it seems fairly common _ONT ACPI method
to specify orientation of the sensor.
Cleanup, minor fixes and fixes for staging driver that have been broken a
long time
* ad5933
- Drop platform data alternative to specifying the reference voltage
using a regulator.
- Use the clock framework to contorl the reference clock.
- Add a DT binding doc to cover the defacto binding.
* ad7280a
- Split up some big functions to improve readability.
* ad7606
- Allow for timeout if interrupt never occurs.
- Use devm functions to simplify probe and remove.
- Use the find_closest macro to avoid need for precise values from
userspace.
- Add missing vendor prefixes for various DT properties. Note the
driver is in staging still and there are no known devicetrees.
- Add explict OF device ID table.
- Simplify the Kconfig choices
- Change to a threaded IRQ.
- SPDX and simple stype fixes.
* ad7816
- Drop unnecessary variable init.
* ad9523
- Check a return value that was ignored.
* ad9833
- Drop platform data. It was just setting most values to the hardware
defaults.
- Use the clock framework to provide the input clock.
* adt7316 (lots of staging cleanup)
- Fix some wrong register / bit definitions
- Invert the logic of the check for an ldac pin so it actually makes sense.
- Read the right register to get internal vref settings
- Allow adt751x chips to use the internal vref for all DAC channels rather
than a subset.
- Remove dac vref bypass control from parts that don't have one.
- Make the store DAC update mode function consistent with the show one.
- Fix some spellings and other minor tidy up.
- Avoid passing irq numbers around by putting all the irq logic in
one place.
- Fix an issue with the resolution of DAC control.
- Fix support of the high resolution DAC mode (for temp proportional output)
where supported.
- Fix DAC read and write calculations.
* st_lsm6dsx
- Drop an unused variable (set but not read)
* xilinx-xadc
- Check an unhandled return value.
* tag 'iio-for-5.1a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (67 commits)
iio: chemical: sps30: remove printk format specifier
staging: iio: frequency: ad9833: Load clock using clock framework
staging: iio: frequency: ad9833: Get frequency value statically
dt-bindings: iio: light: Add max44009
iio: light: add driver for MAX44009
dt-bindings: iio: adc: Add docs for AD7768-1
iio: adc: Add AD7768-1 ADC basic support
staging: iio: cdc: ad7152: remove driver completely
iio: imu: mpu6050: Add support for the ICM 20602 IMU
dt-bindings: iio: imu: add icm20602 bindings to mpu6050
dt-bindings: iio: pressure: add LPS22HH bindings
iio: st_accel: use ACPI orientation data
iio: adc: add NPCM ADC driver
dt-binding: iio: add NPCM ADC documentation
iio: chemical: sps30: allow changing self cleaning period
dt-bindings: iio: chemical: Add bindings for bme680
iio: chemical: bme680: Add device-tree support
iio:st_pressure:initial lps22hh sensor support
iio: accell: mma8452: add vdd/vddio regulator operation support
dt-bindings: iio: accel: mma8452: add power supplies property
...
|
|
The Invensense ICM-20602 is a 6-axis MotionTracking device that
combines a 3-axis gyroscope and an 3-axis accelerometer. It is very
similar to the ICM-20608 imu which is already supported by the mpu6050
driver. The main difference is that the ICM-20602 has the i2c bus
disable bit in a separate register.
Signed-off-by: Randolph Maaßen <gaireg@gaireg.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/IIO driver updates from Greg KH:
"Here is the big staging and iio driver pull request for 4.21-rc1.
Lots and lots of tiny patches here, nothing major at all. Which is
good, tiny cleanups is nice to see. No new huge driver removal or
addition, this release cycle, although there are lots of good IIO
driver changes, addtions, and movement from staging into the "real"
part of the kernel, which is always great.
Full details are in the shortlog, and all of these have been in
linux-next for a while with no reported issues"
* tag 'staging-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (553 commits)
staging: mt7621-mmc: Correct spelling mistakes in comments
staging: wilc1000: fix missing read_write setting when reading data
mt7621-mmc: char * array declaration might be better as static const
mt7621-mmc: return statement in void function unnecessary
mt7621-mmc: Alignment should match open parenthesis
mt7621-mmc: Removed unnecessary blank lines
mt7621-mmc: Fix some coding style issues
staging: android: ashmem: doc: Fix spelling
staging: rtl8188eu: cleanup brace coding style issues
staging: rtl8188eu: add spaces around '&' in rtw_mlme_ext.c
staging: rtl8188eu: change return type of is_basicrate() to bool
staging: rtl8188eu: simplify null array initializations
staging: rtl8188eu: change order of declarations to improve readability
staging: rtl8188eu: make some arrays static in rtw_mlme_ext.c
staging: rtl8188eu: constify some arrays
staging: rtl8188eu: convert unsigned char arrays to u8
staging: rtl8188eu: remove redundant declaration in rtw_mlme_ext.c
staging: rtl8188eu: remove unused arrays WFD_OUI and WMM_INFO_OUI
staging: rtl8188eu: remove unnecessary parentheses in rtw_mlme_ext.c
staging: rtl8188eu: remove unnecessary comments in rtw_mlme_ext.c
...
|
|
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c: In function 'st_lsm6dsx_shub_read_reg':
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:108:41: warning:
variable 'hub_settings' set but not used [-Wunused-but-set-variable]
It never used since introduction in commit c91c1c844ebd ("iio: imu: st_lsm6dsx:
add i2c embedded controller support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Currently, we're using the devm version of some but not all functions.
Switch to the devm version of iio_triggered_buffer_setup and
iio_device_register to simplify the code a bit and decrease the chance of
bugs.
Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
ACPI provides a generic helper to get I2C Serial Bus resources.
Use it instead of open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Generalize st_lsm6dsx_shub_read_oneshot in order to not use a fixed
read length and take into account iio channel realbits for single
read operations
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Introduce hw FIFO support to lsm6dsx i2c controller.
st_lsm6dsx sensor-hub relies on SLV0 for slave configuration since SLV0
is the only channel that can be used to write into i2c slave devices.
SLV{1,2,3} channels are used to read external data and push them into
the hw FIFO
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Introduce st_lsm6dsx_push_tagged_data routine to push samples
to iio buffers. st_lsm6dsx_push_tagged_data will be reused adding
hw fifo support to st_lsm6dsx i2c embedded controller in order to
improve code readability
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
i2c controller embedded in lsm6dx series can connect up to four
slave devices using accelerometer sensor as trigger for i2c
read/write operations.
Introduce sensor hub support for lsm6dso sensor. Add register map
for lis2mdl magnetometer sensor.
In order to perform single read/write operations st_lsm6dsx driver
relies on SLV0 channel (hw FIFO is not supported yet)
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Add st_lsm6dsx_sensor_set_enable routine and remove
st_lsm6dsx_sensor_{enable/disable} ones in order to make the code more
readable and remove unnecessary functions
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Add ST_LSM6DSX_ID_EXT{0,1,2} sensor ids as reference for slave devices
connected to st_lsm6dsx i2c controller. Moreover introduce odr dependency
between accel and ext devices since i2c embedded controller relies on the
accelerometer sensor as bus read/write trigger so we need to enable accel
device at odr = max(accel_odr, ext_odr) in order to properly communicate
with i2c slave devices
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Remove static qualifier from st_lsm6dsx_set_watermark routine in
order to be reused supporting st_lsm6dsx i2c controller
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Perform a complete device reset at bootstrap reloading trimming parameter
after sw reset is completed. Device sw reset/boot is explained here:
https://www.st.com/resource/en/application_note/dm00517282.pdf,
section 5.7
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Add st_lsm6dsx_update_bits_locked, st_lsm6dsx_read_locked and
st_lsm6dsx_write_locked utility routines in order to guarantee
the bus access is atomic respect to reg page configuration.
This is a preliminary patch to add i2c sensor hub support since
i2c master registers are accessed through a reg page multiplexer
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Handle the merge issues and take the iio and staging driver fixes.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Add support to STM LSM6DSO 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dso.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Add reg addr and max_word_len parameters to st_lsm6dsx_read_block
since LSM6DSO will use a different register address to read samples
from the FIFO and a different sample len
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Remove static qualifier from st_lsm6dsx_check_odr() definition in order to
use it for the support of new devices
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Remove static qualifier from st_lsm6dsx_read_fifo definition and
introduce read_fifo function pointer in fifo_ops data structure
in order to run the proper read_fifo routine since other compliant
devices will use a different FIFO queueing scheme.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
Take into account hw timer samples in pattern length computation done
in st_lsm6dsx_update_watermark routine for watermark configuration.
Moreover use samples in pattern (sip) already computed in
st_lsm6dsx_update_decimators routine
Fixes: 213451076bd3 ("iio: imu: st_lsm6dsx: add hw timestamp support")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
This patch adds support for the regulator framework to the mpu6050
driver.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second set of IIO new device support, features and cleanups.
There are also a couple of fixes that can wait for the coming merge
window.
Core new features
* Support for phase channels (used in time of flight sensors amongst
other things)
* Support for deep UV light channel modifier.
New Device Support
* AD4758 DAC
- New driver and dt bindings.
* adxl345
- Support the adxl375 +-200g part which is register compatible.
* isl29501 Time of flight sensor.
- New driver
* meson-saradc
- Support the Meson8m2 Socs - right now this is just an ID, but there will
be additional difference in future.
* mpu6050
- New ID for 6515 variant.
* si1133 UV sensor.
- New driver
* Spreadtrum SC27xx PMIC ADC
- New driver and dt bindings.
Features
* adxl345
- Add calibration offset readback and writing.
- Add sampling frequency control.
Fixes and Cleanups
* ad5933
- Use a macro for the channel definition to reduce duplication.
* ad9523
- Replace use of core mlock with a local lock. Part of ongoing efforts
to avoid confusing the purpose of mlock which is only about iio core
state changes.
- Fix displayed phase which was out by a factor of 10.
* adxl345
- Add a link to the datasheet.
- Rework the use of the address field in the chan_spec structures to
allow addition of more per channel information.
* adis imu
- Mark switch fall throughs.
* at91-sama5d2
- Fix some casting on big endian systems.
* bmp280
- Drop some DT elements that aren't used and should mostly be done from
userspace rather than in DT.
* hx711
- add clock-frequency dt binding and resulting delay to deal with capacitance
issue on some boards.
- fix a spurious unit-address in the example.
* ina2xx
- Avoid a possible kthread_stop with a stale task_struct.
* ltc2632
- Remove some unused local variables (assigned but value never used).
* max1363
- Use device_get_match_data to remove some boilerplate.
* mma8452
- Mark switch fall throughs.
* sca3000
- Fix a missing return in a switch statement (a bad fallthrough
previously!)
* sigma-delta-modulator
- Drop incorrect unit address from the DT example.
* st_accel
- Use device_get_match_data to drop some boiler plate.
- Move to probe_new for i2c driver as second parameter not used.
* st_sensors library
- Use a strlcpy (safe in this case).
* st_lsm6dsx
- Add some error logging.
* ti-ads7950
- SPDX
- Allow simultaneous buffered and polled reads. Needed on a Lego Mindstorms
EV3 where some channels are used for power supply monitoring at a very low
rate.
* ti-dac5571
- Remove an unused variable.
* xadc
- Drop some dead code.
|
|
Add debug info to error conditions in st_lsm6dsx_read_fifo routine
Suggested-by: Jorge Ramirez-Ortiz <jramirez@baylibre.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
This patch adds support for the MPU 6515 variant. Confirmed that the
driver functions correctly on a LG Nexus 5 (hammerhead) phone.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
We want the staging/iio fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|