Billy Tsai
13d4f9df33
iio: adc: aspeed: Add func to set sampling rate.
...
Add the function to set the sampling rate and keep the sampling period
for a driver used to wait the fresh value.
In addition, since the ADC clock is required when initializing the ADC
device, move clk_prepare_enable ahead of the initialization phase.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com >
Link: https://lore.kernel.org/r/20210922081520.30580-9-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:32 +01:00
Billy Tsai
90f9647753
iio: adc: aspeed: Fix the calculate error of clock.
...
The ADC clock formula is
ast2400/2500:
ADC clock period = PCLK * 2 * (ADC0C[31:17] + 1) * (ADC0C[9:0] + 1)
ast2600:
ADC clock period = PCLK * 2 * (ADC0C[15:0] + 1)
They all have one fixed divided 2 and the legacy driver didn't handle it.
This patch register the fixed factory clock device as the parent of ADC
clock scaler to fix this issue.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com >
Link: https://lore.kernel.org/r/20210922081520.30580-8-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:32 +01:00
Billy Tsai
1b5ceb55fe
iio: adc: aspeed: Support ast2600 adc.
...
Make driver to support ast2600 adc device.
- Use shared reset controller
- Complete the vref configure function
- Add the model data for ast2600 adc
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com >
Link: https://lore.kernel.org/r/20210922081520.30580-7-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:32 +01:00
Billy Tsai
4c56572c26
iio: adc: aspeed: Use devm_add_action_or_reset.
...
This patch use devm_add_action_or_reset to handle the error in probe
phase.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com >
Link: https://lore.kernel.org/r/20210922081520.30580-6-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:32 +01:00
Billy Tsai
9223bd0471
iio: adc: aspeed: Use model_data to set clk scaler.
...
This patch uses need_prescaler and scaler_bit_width to set the ADC clock
scaler.
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com >
Link: https://lore.kernel.org/r/20210922081520.30580-5-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:32 +01:00
Billy Tsai
1de952a4b1
iio: adc: aspeed: Add vref config function
...
Add the function to check the vref_fixed_mv and set the value to driver
data.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com >
Link: https://lore.kernel.org/r/20210922081520.30580-4-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:32 +01:00
Billy Tsai
eaa74a8d51
iio: adc: aspeed: Restructure the model data
...
This patch refactors the model data structure to distinguish the
function form different versions of aspeed ADC.
- Rename the vref_voltage to vref_fixed_mv and add vref_mv driver data
When driver probe will check vref_fixed_mv value and store it to vref_mv
which isn't const value.
- Add num_channels
Make num_channles of iio device can be changed by different model_data
- Add need_prescaler flag and scaler_bit_width
The need_prescaler flag is used to tell the driver the clock divider needs
another Prescaler and the scaler_bit_width to set the clock divider
bitfield width.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com >
Link: https://lore.kernel.org/r/20210922081520.30580-3-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:32 +01:00
Billy Tsai
89c65417da
iio: adc: aspeed: Keep model data to driver data.
...
Keep the model data pointer to driver data for reducing the usage of
of_device_get_match_data().
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com >
Link: https://lore.kernel.org/r/20210922081520.30580-2-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:32 +01:00
Jacopo Mondi
f840f41fa5
iio: ABI: Document in_concentration_co2_scale
...
Document the 'in_concentration_co2_scale' standard IIO attribute.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Link: https://lore.kernel.org/r/20210920135413.140310-5-jacopo+renesas@jmondi.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:31 +01:00
Jacopo Mondi
c397894e24
iio: chemical: Add Senseair Sunrise 006-0-007 driver
...
Add support for the Senseair Sunrise 006-0-0007 driver through the
IIO subsystem.
Datasheet: https://rmtplusstoragesenseair.blob.core.windows.net/docs/Dev/publicerat/TDE5531.pdf
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Link: https://lore.kernel.org/r/20210920135413.140310-4-jacopo+renesas@jmondi.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:31 +01:00
Jacopo Mondi
c3c780ef76
iio: ABI: docs: Document Senseair Sunrise ABI
...
Add documentation for the sysfs attributes of the sunrise_co2 driver.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Link: https://lore.kernel.org/r/20210920135413.140310-3-jacopo+renesas@jmondi.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:31 +01:00
Jacopo Mondi
c6cb6ac7b3
dt-bindings: iio: chemical: Document senseair,sunrise CO2 sensor
...
Add documentation for the Senseair Sunrise 006-0-0007 CO2 NDIR sensor.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20210920135413.140310-2-jacopo+renesas@jmondi.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:31 +01:00
David Heidelberg
42e1e82441
dt-bindings: iio: magnetometer: asahi-kasei,ak8975 add vid reg
...
Driver and device-tree also use vid-supply regulator.
Fixes: 7e000fbff7 ("dt-bindings: iio: magnetometer: ak8975: convert format to yaml, add maintainer")
Signed-off-by: David Heidelberg <david@ixit.cz >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20210913181949.83179-1-david@ixit.cz
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-19 08:27:26 +01:00
David Heidelberg
2eacfc13c6
dt-bindings: iio: kionix,kxcjk1013: driver support interrupts
...
Device has interrupts support, which description was missing in the bindings.
Signed-off-by: David Heidelberg <david@ixit.cz >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20210919203656.119742-1-david@ixit.cz
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:55 +01:00
Krzysztof Kozlowski
de37b16462
iio: adc: exynos: describe drivers in KConfig
...
Describe better which driver applies to which SoC, to make configuring
kernel for Samsung SoC easier.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com >
Link: https://lore.kernel.org/r/20210924133515.112357-1-krzysztof.kozlowski@canonical.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:54 +01:00
Cai Huoqing
948b3b3daf
iio: adc: rockchip_saradc: Make use of the helper function devm_platform_ioremap_resource()
...
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com >
Link: https://lore.kernel.org/r/20210908105631.1474-1-caihuoqing@baidu.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:54 +01:00
Cai Huoqing
7685f50798
iio: dac: stm32-dac: Make use of the helper function devm_platform_ioremap_resource()
...
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com >
Link: https://lore.kernel.org/r/20210908105638.1525-1-caihuoqing@baidu.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:54 +01:00
Daniel Palmer
0fe1402069
iio: accel: mma7660: Mark acpi match table as maybe unused
...
When building kernels without ACPI support the table is declared
but is not used because ACPI_PTR() turns it into a NULL.
Add the __maybe_unused attribute to stop the compiler whining.
Signed-off-by: Daniel Palmer <daniel@0x0f.com >
Link: https://lore.kernel.org/r/20210919072616.3849723-1-daniel@0x0f.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:54 +01:00
Alexandru Ardelean
2b025c92cd
iio: light: max44000: use device-managed functions in probe
...
This is a simple conversion. Both iio_device_register() and
iio_triggered_buffer_setup() functions have device-managed variants.
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com >
Link: https://lore.kernel.org/r/20210913120002.306280-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:54 +01:00
Alexandru Ardelean
da6fd25909
iio: gyro: adis16080: use devm_iio_device_register() in probe
...
There is nothing else that needs to be done for this driver. The remove
hook calls only the iio_device_unregister() hook.
So this driver can use devm_iio_device_register() directly.
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com >
Link: https://lore.kernel.org/r/20210913115308.301877-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:54 +01:00
Alexandru Ardelean
14a6ee6ec5
iio: dac: ad5064: convert probe to full device-managed
...
This change converts the probe of the AD5064 driver to use only
device-managed functions.
The regulator_bulk_disable() is passed on a devm_add_action_or_reset() hook
and the devm_iio_device_register() can be used to register the IIO device.
The driver has both I2C and SPI hooks inside, so all these can be removed.
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com >
Link: https://lore.kernel.org/r/20210913115237.301310-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:54 +01:00
Alexandru Ardelean
9678844430
staging: iio: ad9832: convert probe to device-managed
...
This change does a conversion of the driver to use device-managed init
functions. The 2 regulators and the clock inits are converted to use
devm_add_action_or_reset() callbacks for de-initializing them when the
driver unloads.
And finally the devm_iio_device_register() function can be use to register
the device.
The remove hook can finally be removed and the spi_set_drvdata() call can
also be removed as the private data is no longer used.
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com >
Link: https://lore.kernel.org/r/20210913115209.300665-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:54 +01:00
Alexandru Ardelean
8a16c76e23
iio: dac: ad7303: convert probe to full device-managed
...
For this conversion, the regulators need to have some cleanup hooks
registered with devm_add_action_or_reset() and then the
devm_io_device_register() call can be used.
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com >
Link: https://lore.kernel.org/r/20210913115121.300082-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:53 +01:00
Daniel Palmer
3b38706466
iio: imu: inv_mpu6050: Mark acpi match table as maybe unused
...
When building kernels without ACPI support the table is declared
but is not used because ACPI_PTR() turns it into a NULL.
Add the __maybe_unused attribute to stop the compiler whining.
Signed-off-by: Daniel Palmer <daniel@0x0f.com >
Acked-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com >
Link: https://lore.kernel.org/r/20210913112913.2148026-1-daniel@0x0f.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:53 +01:00
Cai Huoqing
f27d1e7697
iio: ep93xx: Make use of the helper function devm_platform_ioremap_resource()
...
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com >
Link: https://lore.kernel.org/r/20210908105646.1576-1-caihuoqing@baidu.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-10-17 11:05:53 +01:00
Puranjay Mohan
327a0eaf19
iio: accel: adxl355: Add triggered buffer support
...
Provide a way for continuous data capture by setting up buffer support. The
data ready signal exposed at the DRDY pin of the ADXL355 is exploited as
a hardware interrupt which triggers to fill the buffer.
Signed-off-by: Puranjay Mohan <puranjay12@gmail.com >
Link: https://lore.kernel.org/r/20210903184312.21009-3-puranjay12@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:35 +01:00
Puranjay Mohan
86ff6cb15f
iio: accel: adxl355: use if(ret) in place of ret < 0
...
Replace if(ret < 0) with if(ret) for consistency.
Signed-off-by: Puranjay Mohan <puranjay12@gmail.com >
Link: https://lore.kernel.org/r/20210903184312.21009-2-puranjay12@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:35 +01:00
Lucas Stankus
636d446330
iio: accel: Add driver support for ADXL313
...
ADXL313 is a small, thin, low power, 3-axis accelerometer with high
resolution measurement up to +/-4g. It includes an integrated 32-level
FIFO and has activity and inactivity sensing capabilities.
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADXL313.pdf
Signed-off-by: Lucas Stankus <lucas.p.stankus@gmail.com >
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/d16e2d1967e46bb2b1024b6d23bc4889da77dc6b.1630523106.git.lucas.p.stankus@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:35 +01:00
Lucas Stankus
af1c6b50a2
dt-bindings: iio: accel: Add binding documentation for ADXL313
...
Add device tree binding documentation for ADXL313 3-axis accelerometer.
Signed-off-by: Lucas Stankus <lucas.p.stankus@gmail.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/2eff22d1d22f7e72efdabdc681d02e922682c434.1630523106.git.lucas.p.stankus@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:35 +01:00
Billy Tsai
26a9f730ce
iio: adc: aspeed: completes the bitfield declare.
...
This patch completes the declare of ADC register bitfields and uses the
same prefix ASPEED_ADC_* for these bitfields. In addition, tidy up space
alignment of the codes.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com >
Link: https://lore.kernel.org/r/20210831071458.2334-4-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:35 +01:00
Billy Tsai
2bdb2f00a8
dt-bindings: iio: adc: Add ast2600-adc bindings
...
Add device tree bindings document for the aspeed ast2600 adc device
driver.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20210831071458.2334-3-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:35 +01:00
Alexandru Ardelean
9cec9be7af
iio: adc: ti-ads8344: convert probe to device-managed
...
This change converts the driver to register via devm_iio_device_register().
The regulator disable is moved on a devm_add_action_or_reset() hook.
And the spi_set_drvdata() isn't required anymore.
And finally, the ads8344_remove() can be removed as well.
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com >
Link: https://lore.kernel.org/r/20210903073707.46892-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:34 +01:00
Eugen Hristev
874b4912d9
iio: adc: at91-sama5d2_adc: update copyright and authors information
...
Update copyright and authors information (corrected e-mail address), and
add myself as one of the authors.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com >
Link: https://lore.kernel.org/r/20210901123013.329792-9-eugen.hristev@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:34 +01:00
Eugen Hristev
840bf6cb98
iio: adc: at91-sama5d2_adc: add support for sama7g5 device
...
Add support to sama7g5 ADC which is similar with sama5d2/sam9x60 device.
Differences are highlighted by compatible.
Main differences include 16 channels instead of 12 and missing
resistive touchscreen.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com >
Link: https://lore.kernel.org/r/20210901123013.329792-8-eugen.hristev@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:34 +01:00
Eugen Hristev
d8004c5f46
iio: adc: at91-sama5d2_adc: add helper for COR register
...
Add helper for the COR register. This helper allows to modify the COR
register, removes duplicate code and improves readability.
The COR offset is now part of the register layout. This will allow
different platform with a different offset to use the same helper.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com >
Link: https://lore.kernel.org/r/20210901123013.329792-7-eugen.hristev@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:34 +01:00
Eugen Hristev
e6d5eee4df
iio: adc: at91-sama5d2_adc: add support for separate end of conversion registers
...
Some platforms have separated the end-of-conversion information from the
usual ISR/IMR/IER/IDR registers, into EOC_ISR/EOC_IMR/EOC_IER/EOC_IDR.
To cope with both variants, helpers are being added, that will make
code more clear and more easy to read.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com >
Link: https://lore.kernel.org/r/20210901123013.329792-6-eugen.hristev@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:34 +01:00
Eugen Hristev
8940de2e48
iio: adc: at91-sama5d2_adc: convert to platform specific data structures
...
Convert the driver to platform specific structures. This means:
- create a register layout struct that will hold offsets for registers
- create a platform struct that will hold platform information (number of
channels, indexes for different channels and pointer to layout struct)
- convert specific macros that are platform dependent into platform variables
This step is in fact a no-op, but allows the driver to be more flexible
and for future enhancement including adding new platforms that are partly
compatible with the current driver and differ slightly in register layout
or capabilities for example.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com >
Link: https://lore.kernel.org/r/20210901123013.329792-5-eugen.hristev@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:34 +01:00
Eugen Hristev
841a5b6518
iio: adc: at91-sama5d2_adc: remove unused definition
...
Remove unused register definition
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com >
Link: https://lore.kernel.org/r/20210901123013.329792-4-eugen.hristev@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:33 +01:00
Eugen Hristev
eaefa151f4
iio: adc: at91-sama5d2_adc: initialize hardware after clock is started
...
The hw_init hardware init call must happen after the clock is prepared and
enabled. Otherwise, writing to the registers might lead to a block or
external abort.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com >
Link: https://lore.kernel.org/r/20210901123013.329792-3-eugen.hristev@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:33 +01:00
Eugen Hristev
f928670651
dt-bindings: iio: adc: at91-sama5d2: add compatible for sama7g5-adc
...
Add compatible for microchip,sama7g5-adc device.
Acked-by: Rob Herring <robh@kernel.org >
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com >
Link: https://lore.kernel.org/r/20210901123013.329792-2-eugen.hristev@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:33 +01:00
Matt Ranostay
76e28aa97f
iio: magnetometer: ak8975: add AK09116 support
...
Add additional AK09116 to the magnetometer driver which has the same
register mapping and scaling as the AK09112 device.
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com >
Link: https://lore.kernel.org/r/20210825020738.35877-1-matt.ranostay@konsulko.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:33 +01:00
Navin Sankar Velliangiri
c5dc9e3635
dt-bindings: iio: temperature: add MAXIM max31865 support
...
Add DT bindings for MAXIM max31865 RTD sensor.
Signed-off-by: Navin Sankar Velliangiri <navin@linumiz.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20210824050650.72619-1-navin@linumiz.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:33 +01:00
Navin Sankar Velliangiri
e112dc4e18
iio: temperature: Add MAX31865 RTD Support
...
This patch adds support for Maxim MAX31865 RTD temperature
sensor support.
More information can be found in:
https://datasheets.maximintegrated.com/en/ds/MAX31865.pdf
Signed-off-by: Navin Sankar Velliangiri <navin@linumiz.com >
Link: https://lore.kernel.org/r/20210824050123.71289-1-navin@linumiz.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:33 +01:00
Tang Bin
b0fc3f1dbe
iio: adc: twl6030-gpadc: Use the defined variable to clean code
...
Use the defined variable "dev" to make the code cleaner.
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com >
Link: https://lore.kernel.org/r/20210823095921.16828-1-tangbin@cmss.chinamobile.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:32 +01:00
Alexander Vorwerk
050098500a
staging: iio: cdc: remove braces from single line if blocks
...
Remove braces from single line if blocks to clear checkpatch warnings.
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Alexander Vorwerk <alec@vc-celle.de >
Link: https://lore.kernel.org/r/20210820224914.1260-1-alec@vc-celle.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:32 +01:00
Nuno Sá
25d4abbf3d
iio: ltc2983: fail probe if no channels are given
...
If there are no channels defined in the devicetree, there's no point in
probing the device. We were actually requesting a zero sized 'kmalloc'
array but since we were not touching the ZERO_SIZE_PTR afterwards,
nothing bad was actually happening. Hence this is not really a fix but
rather an improvement.
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com >
Signed-off-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20210825084149.11587-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:32 +01:00
Nuno Sá
919726c9e0
iio: ltc2983: add support for optional reset gpio
...
Check if an optional reset gpio is present and if so, make sure to reset
the device.
Signed-off-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20210825084149.11587-1-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:32 +01:00
Nuno Sá
26df977a90
iio: ad5770r: make devicetree property reading consistent
...
The bindings file for this driver is defining the property as 'reg' but
the driver was reading it with the 'num' name. The bindings actually had
the 'num' property when added in
commit ea52c21268 ("dt-bindings: iio: dac: Add docs for AD5770R DAC")
and then changed it to 'reg' in
commit 2cf3818f18 ("dt-bindings: iio: dac: AD5570R fix bindings errors").
However, both these commits landed in v5.7 so the assumption is
that either 'num' is not being used or if it is, the validations were not
done.
Anyways, if someone comes back yelling about this, we might just support
both of the properties in the future. Not ideal, but that's life...
Fixes: 2cf3818f18 ("dt-bindings: iio: dac: AD5570R fix bindings errors")
Signed-off-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20210818080525.62790-1-nuno.sa@analog.com
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:32 +01:00
Lukas Bulwahn
1d761ca978
iio: gyro: remove dead config dependencies on INPUT_MPU3050
...
Commit b1fe0cf06f ("Input: delete MPU3050 driver") deletes the superseded
MPU3050 driver and its corresponding config INPUT_MPU3050.
The dependencies on the superseding driver in ./drivers/iio/gyro/Kconfig
to ensure that the two drivers are not built into the same kernel is a dead
dependency and not required anymore.
So, remove those config dependencies on INPUT_MPU3050 for MPU3050_I2C.
This issue was detected with ./scripts/checkkconfigsymbols.py.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20210817081330.9645-1-lukas.bulwahn@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:32 +01:00
Alexandru Ardelean
e426965154
iio: st_sensors: remove reference to parent device object on st_sensor_data
...
The idea behind it, is that all devm_ calls in ST sensors are bound to the
parent device object.
However, the reference to that object is kept on both the st_sensor_data
struct and the IIO object parent (indio_dev->dev.parent).
This change only adds a bit consistency and uses the reference stored on
indio_dev->dev.parent, to enforce the assumption that all ST sensors' devm_
calls are bound to the same reference as the one store on st_sensor_data.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20210823112204.243255-6-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2021-09-14 12:00:32 +01:00