- 08 Mar, 2020 31 commits
-
-
Jean-Baptiste Maneyrol authored
This way there is no need anymore to export the power function to i2c and spi modules. Bus setup is done inside init when power is on and the result is now checked. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jean-Baptiste Maneyrol authored
If we are here it means we have fifo enabled for 1 sensor at least. And interrupt is always required for using trigger. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jean-Baptiste Maneyrol authored
i2c auxiliary mux is done by analog switches. You do not need to set them for every i2c transfer. Just set i2c bypass bit at init and do noting in i2c de/select. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
Split the binding in two to reflect the threshold monitor capabilities and hence interrupts vs the more straight forward parts that don't have this facility. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org>
-
Fabrice Gasnier authored
Clock should be enabled as soon as using master modes, even before enabling timer. Or, this may provoke bad behavior on the other end (slave timer). Then, introduce 'clk_enabled' flag, instead of relying on CR1 EN bit, to keep track of clock being enabled (balanced refcount). Propagate this anywhere else in the driver. Also add 'remove' routine to stop timer and disable clock in case it has been left enabled. Enforce the user interface has been unregistered in the remove routine, before disabling the hardware to avoid possible race. So, remove use of devm_ variant to register triggers and unregister them before the hardware gets disabled [1]. [1] https://patchwork.kernel.org/patch/9956247/Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
David Heidelberg authored
- allow autoloading when build as module and defined inside DT Signed-off-by: David Heidelberg <david@ixit.cz> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
David Heidelberg authored
Use devm_add_action_or_reset to automatically disable the device and allow you to get rid of the remove function entirely. Signed-off-by: David Heidelberg <david@ixit.cz> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
David Heidelberg authored
AL3320a is fairly simple chip, so for suspend is enough to disable and later enable it again. Signed-off-by: David Heidelberg <david@ixit.cz> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
David Heidelberg authored
Based on: - 3320A in-kernel driver - https://www.spinics.net/lists/linux-iio/msg25145.html - https://lore.kernel.org/patchwork/patch/684179/ I decided to keep it aside of AL3320A due to different approach and much simpler design of 3010. Tested on Nexus 7 2012 (grouper/tilapia). Tested-by: David Heidelberg <david@ixit.cz> Tested-by: Dmitry Osipenko <digetx@gmail.com> Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: David Heidelberg <david@ixit.cz> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
David Heidelberg authored
- modified to be in part with al3010 driver - cleanup using bitfield, no functionality change intended Signed-off-by: David Heidelberg <david@ixit.cz> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
David Heidelberg authored
The Dyna-Image AL3010 is a 16-bit digital ambient light sensor which provides a multiple gain function with linear response over a dynamic range 1216/4863/19452/77806. Signed-off-by: David Heidelberg <david@ixit.cz> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
David Heidelberg authored
This commit add dt-bindings support to al3320a driver and vendor-prefix dynaimage. Partly based on unmerged commit: "iio: Add Dyna-Image AP3223 ambient light and proximity driver" Signed-off-by: David Heidelberg <david@ixit.cz> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Tachici authored
Move ad7192 ADC driver out of staging into mainline. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Tachici authored
Updated mainline documentation on ad7192 userspace sysfs. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Tachici authored
This patch removes spi_device_id table and moves the init data (id of the chip) in the .data field of of_device_id table. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Tachici authored
This patch changes the static const struct iio_chan_spec arrays in a way that all the necessary attributes are set at compile time. Now ad7192_channels_config only makes the channels attribute of iio_dev point to the right array depending on the chip. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Tachici authored
This patch makes the ad7192_probe fail in case regulator_get_voltage will return an error or voltage is set to 0. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mircea Caprioru authored
This patch adds the posibility do read and write registers from userspace using the kernel debug direct register access option. Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nuno Sá authored
All of the actions done in `adis16460_initial_setup()` are now done in `__adis_initial_startup()` so, there's no need for code duplication. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nuno Sá authored
All actions done in `adis16480_initial_setup()` are now done in `__adis_initial_startup()` so, there's no need for code duplication. Furthermore, the call to `adis16480_initial_setup()` is done before any device configuration since the device will be reset if not already (via rst pin). This is actually fixing a potential bug since `adis_reset()` was being called after configuring the device which is obviously a problem. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Ardelean authored
Each driver/chip that wants to validate it's product id, can now specify a 'prod_id_reg' and an expected 'prod_id' value. The 'prod_id' value is intentionally left 0 (uninitialized). There aren't (yet) any product IDs with value 0; this enforces that both 'prod_id_reg' and 'prod_id' are specified. At the very least, this routine validates that the SPI connection to the ADIS chip[s] works well. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nuno Sá authored
All the ADIS devices perform, at the beginning, a self test to make sure the device is in a sane state. Previously, the logic was that the self-test was performed in adis_initial_startup() and if that failed a reset was done and then a self-test was attempted again. This change unifies the reset mechanism under the adis_initial_startup() call. A HW reset will be done if GPIO is configured, or a SW reset otherwise. This should make sure that the chip is in a sane state for self-test. Once the reset is done, the self-test operation will be performed. If anything goes wrong with self-test, the driver should just bail/error-out (i.e. no second attempt). The chip would likely not be a in a sane state state if the self-test fails after a reset. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nuno Sá authored
This patch adds a dedicated self_test_reg variable. This is also a step to let new drivers make use of `adis_initial_startup()`. Some devices use MSG_CTRL reg to request a self_test command while others use the GLOB_CMD register. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Ardelean authored
This change splits the __adis_initial_startup() away from adis_initial_startup(). The unlocked version can be used in certain calls during probe, where races won't happen since the ADIS driver may not be registered yet with IIO. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Ardelean authored
This change overrides commit 380b107b ("iio: adis: Introduce timeouts structure"). It removes the memory allocation and moves the 'adis_data' information to be static on the chip_info struct. This also adds a timeout structure to ADIS16334, since it was initially omitted. This was omitted (by accident) when the change was done. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Ardelean authored
This change overrides commit 380b107b ("iio: adis: Introduce timeouts structure"). It removes the memory allocation and moves the 'adis_data' information to be static on the chip_info struct. This also adds a timeout structure to ADIS16334, since it was initially omitted. This was omitted (by accident) when the change was done. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Ardelean authored
This change overrides commit 380b107b ("iio: adis: Introduce timeouts structure"). It removes the memory allocation and moves the 'adis_data' information to be static on the chip_info struct. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lorenzo Bianconi authored
Add missing return value check in st_lsm6dsx_shub_read_oneshot disabling the slave device connected to the st_lsm6dsx i2c controller. The issue is reported by coverity with the following error: Unchecked return value: If the function returns an error value, the error value may be mistaken for a normal value. Addresses-Coverity-ID: 1456767 ("Unchecked return value") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Beniamin Bia authored
Add Beniamin Bia and Michael Hennerich as maintainers for HMC425A attenuator. Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Michael Hennerich authored
Document support for Analog Devices MC425A Step Attenuator. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Michael Hennerich authored
This patch adds support for the HMC425A 0.5 dB LSB GaAs MMIC 6-BIT DIGITAL POSITIVE CONTROL ATTENUATOR, 2.2 - 8.0 GHz. Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/hmc425A.pdfSigned-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 21 Feb, 2020 4 commits
-
-
Beniamin Bia authored
This patch add write_raw_get_fmt function to specify conversion for hardware gain. Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Beniamin Bia authored
This patch handles the db suffix used for writing micro db values. Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Fabrice Gasnier authored
The stm32-timer-cnt driver doesn't use the iio interface. The iio headers aren't relevant and can be removed as reported by William in [1]. With this change, mod_devicetable.h needs to be added to define the 'of_device_id' struct. [1] https://lkml.org/lkml/2020/2/10/1516Reported-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Fabrice Gasnier authored
Add suspend/resume PM sleep ops. When going to low power, enforce the counter isn't active. Gracefully restore its state upon resume in case it's been left enabled prior to suspend. Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 14 Feb, 2020 5 commits
-
-
Jean-Baptiste Maneyrol authored
Add missing mpu6000 and new icm20609, icm20689, icm20690, and iam20680. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jean-Baptiste Maneyrol authored
As every chip has some little variant in LPF bandwidth values, use common values that are working for all chips. Simplify the LPF setting function. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jean-Baptiste Maneyrol authored
Same generation as ICM20602 but different registers. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jean-Baptiste Maneyrol authored
Automotive certified IMU, similar to ICM20608. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jean-Baptiste Maneyrol authored
They are similar to ICM20608 chip. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-