mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
First set of new device support, fixes, cleanups and features for IIO in 5.18
This cycle we had quite a few series that applied similar changes to lots of drivers. To keep this description manageable I have called those out in their own section rather than per driver. Particularly pleased to see the long running AFE precision series going in this cycle. Series includes some late breaking fixes. New device support * adi,ada4250 amplifier - New driver and dt bindings for this programmable gain amplifier. * adi,admv1014 microwave down-converter - New driver, dt bindings and some device specific ABI that may be generalized as more drivers for devices similar to this are added. * adi,admv4420 K Band down-converter. - New driver and dt bindings. * adi,adxl367 accelerometer driver. - New driver, dt-bindings + some new IIO ABI definitions to support reference magnitude events where an estimate of the acceleration due to gravity has been removed. - A few fixes as follow up patches. * adi,ltc2688 DAC with toggle and dither modes. - New driver and bindings. Includes some new driver specific (for now) ABI for handling toggle mode and the addition of a dither waveform to the DAC output. * AFE (analog front end) add support for additional types of analog device in front of an ADC. - RTD temperature sensors with dt bindings. - Temperature transducers wit dt bindings. - Related cleanup and features listed in other sections below. * maxim,ds3502 potentiometer. - Add support to ds1803 driver which required significant rework. * mediatek,mt2701-auxadc driver - Add mediatek,mt8186-auxadc - id table and chip specific info only. * semtech,sx9324, semtech,ax9360 - Substantial refactoring of sx9310 to extract core logic for reuse into a separate module - New driver using this supporting sx9324 proximity sensors. - New driver using this supporting sx9360 proximity sensors. * silan,sc7a20 - Compatible with the st,lis2dh (or nearly anyway) so add ID and chip specific info to enable support. Also silan vendor ID added for dt-bindings. Staging graduation * adi,ad7280a monitoring ADC for stacked lithium-ion batteries in electric cars and similar. - Substantial rework of driver required to bring inline with current IIO best practice. An unusual device in IIO so some interesting features we may see more of in future. Multiple driver/core cleanup - Use sysfs_emit() in simple locations where there is no path to change to various core created attributes. - Trivial white space fixes around inconsistency between space after { and before } in id tables. - Introduce new handling for fractional types to avoid repeated similar implementations. Use this in 3 drivers. Note this is also targeted at future use in the AFE driver and was motivated by discussions around the precision related work on that driver. - of related header cleanups - drop of*.h and add mod_devicetable.h as appropriate. - Move a number of symbol exports into IIO_* namespaces. Two categories, 1) Library used by multiple drivers e.g. st_sensors 2) Core driver module exporting functions used by bus specific modules. A few related cleanups in this set. - Switch from CONFIG_PM_* guards to new DEFINE_SIMPLE_DEV_PM_OPS() and similar to simplify drivers and take advantage of these new macros allowing the compiler to do the job or removing unused code without the need for __maybe_unused markings. Conversion of other drivers to these new macros ongoing. Features * adi,adf4350 - Switch from of specific to generic device properties enabling use with other firmware types. * adi,adx345 - Switch from of specific to generic device properties. - Add ACPI ID ADS0345 - Related driver cleanup. * adi,hmc425a - Switch from of specific to generic device properties. * afe analog rescaler driver - Wider range of types supported for scale. - Support offset. - Kunit tests. * atlas,ezo-sensor - Convert from of to device properties. * fsl,mma8452 - Support mount matrix. * infineon,dps310: - Add ACPI ID IFX3100. * invensense,mpu6050 - Convert to generic device properties. * maxim,ds1803 - Add out_raw_available before supporting more devices. - Convert from of specific to device properties. * samsung,ssp_sensors - Convert from of specific to device properties. * st,stm32-timer trigger - Convert from of specific to device properties. * ti,hdc101x - Add ACPI ID TXNW1010. * ti,tsc2046: - Add read_raw support to enable use of iio_hwmon and similar. Fixes / cleanup. * mailmap - Update for Cai Huoqing * MAINTAINERS - Fix Analog Devices related links. - Add entry for ADRF6780 - Add entry for ADMV1013 - Add entry for AD7293 - Add entry for ADMV8818 - Update files listed for adis-lib * iio core: - Fix wrong comment about current_mode being something a driver should ever access. - Use struct_size() rather than open coding in industrialio-hw-consumer * adi,axl355 - Use units.h definitions instead of local versions. * adi,adis-lib - Simplify *updated_bits() macro - Whitespace cleanup. * afe - Note many of these fixes only apply to particular configurations so the problems have probably not been seen in the wild, but will be visible with new usecases enabled this cycle. - Fix application of consumer scale for IIO_VAL_INT. - Apply a scale of 1 when no scale is provided. - Make best effort to establish a valid offset value for fractional cases. - Use s64 for scale calculations where parameters may be signed. - Tidy up include order. - Improve accuracy for small fractional sales - Reduce risk of integer overflow. * ams,as3935 - Use devm_delayed_work_autocancel() to replace open coded equivalent. * aspeed,adc - Fix wrong use of divider flag. * atmel,sama5d2-adc - Relax atmel,trigger-edge-type to optional. - Drop Ludovic Desroches from listed maintainers of the dt-binding inline with previous MAINTAINERS entry update. * fsl,mma8452 - Fix probing when i2c_device_id used. - dev_get_drvdata() on the iio_dev->dev, no longer returns iio_dev. Use dev_to_iio_dev() instead. Note the original path in here worked more by luck than design. * invensense,mpu6050 - Drop ACPI_PTR() protection to avoid an unused warning. - Use fact ACPI_COMPANION() returns null when ACPI_HANDLE() does to simplify handling. * motorola,cpcap-adc - Drop unused assignment. * qcom,spmi-adc - Fix wrong example of 'reg' in binding document. * renesas,rzg2l-adc - Trivial typo fix. * semtech,sx9360 - Fix wrong register handling for event generation. * st_sensors - Allow manual disabling of I2C or SPI module if not needed for a particular board. Default is still to enable the bus specific module if appropriate bus is supported. * st,lsm6dsx - dev_get_drvdata() on the iio_dev->dev, no longer returns iio_dev. Use dev_to_iio_dev() instead. * ti,palmas-gpadc - Split the interrupt fields in the dt-binding example * ti,tsc2046 - Rework state machine to improve readability after recent debugging of an issue fixed elsewhere. - Add a sanity check to avoid very large memory allocations if a crazy delay is specified. * ti,twl6030 - Add error handling if devm_request_threaded_irq() fails. * xilinx,ams - Use devm_delayed_work_autocancel() instead of open coding equivalent. - Fix missing required clock entry in dt-binding. - Fix miss counting of channels resulting in ps channels not being enabled. - Fix incorrect values written to sequencer registers. - Fix sequence for single channel reading. -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmIfdM8RHGppYzIzQGtl cm5lbC5vcmcACgkQVIU0mcT0FoiGlQ//UyRpMX9Bv97LAbMDnqIHLYroTLJA3WFQ AaL/DKB1cVjBCoHlp24qaQrmncvifPF7sKJGKWf7yCHL5fraAYL/kHsCo/jECTho QOk9QaPAMP9ChOoVoP8iz5qrdF2qyoFUG69bX+QYeKhSKzcK1QPRTQ13LIL43d9p OJX47Cu7FfFwuAs5VKSVgpcII0tctv+Fdo6BkkeI+6w/vx2sFSzRaqRtc1ZU4Uav s51dM9JMos52e/G8yQAEOC24QUId4EHxo7QR8WjzZ47yIHRulpYwM6pWAtvOqEy9 eV++yz581+Uqs/qaDDk8nJdpa8aEv/NvfAK6gufB9UOWziMoR3G1pPFWoOLbcyIt IcUG+QyyEiIlmlwDE/m2OcSMzsxgrkEHNb3SE7ZkWZKP8OasGdVMHa7yEKCgLmzM S8EY9TsNA50A2VtowAPrdk74TVG2WeIDvEH2MMAUMjgW2DzsW9cmwFrziyj7ZPLX onoEjd/kpL2zzAArEadvzD1z1lLJcOUWn8ST2kbPQG8n/rp5y2u5PvgWRoO9zJlD ztX614XYRgRUhMrgb0q0nCTi07mnBZrR3P8Hnx1HOoZon/DIqPSL7NumITG09cQc fHqewQOU/WqoTH4tNvfywnBL/VAcxKFlc0B2rWIvp6dD5b0TU34ZdebcjLT1zYeC 6YQKbRaRjVg= =UnWv -----END PGP SIGNATURE----- Merge tag 'iio-for-5.18a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: First set of new device support, fixes, cleanups and features for IIO in 5.18 This cycle we had quite a few series that applied similar changes to lots of drivers. To keep this description manageable I have called those out in their own section rather than per driver. Particularly pleased to see the long running AFE precision series going in this cycle. Series includes some late breaking fixes. New device support * adi,ada4250 amplifier - New driver and dt bindings for this programmable gain amplifier. * adi,admv1014 microwave down-converter - New driver, dt bindings and some device specific ABI that may be generalized as more drivers for devices similar to this are added. * adi,admv4420 K Band down-converter. - New driver and dt bindings. * adi,adxl367 accelerometer driver. - New driver, dt-bindings + some new IIO ABI definitions to support reference magnitude events where an estimate of the acceleration due to gravity has been removed. - A few fixes as follow up patches. * adi,ltc2688 DAC with toggle and dither modes. - New driver and bindings. Includes some new driver specific (for now) ABI for handling toggle mode and the addition of a dither waveform to the DAC output. * AFE (analog front end) add support for additional types of analog device in front of an ADC. - RTD temperature sensors with dt bindings. - Temperature transducers wit dt bindings. - Related cleanup and features listed in other sections below. * maxim,ds3502 potentiometer. - Add support to ds1803 driver which required significant rework. * mediatek,mt2701-auxadc driver - Add mediatek,mt8186-auxadc - id table and chip specific info only. * semtech,sx9324, semtech,ax9360 - Substantial refactoring of sx9310 to extract core logic for reuse into a separate module - New driver using this supporting sx9324 proximity sensors. - New driver using this supporting sx9360 proximity sensors. * silan,sc7a20 - Compatible with the st,lis2dh (or nearly anyway) so add ID and chip specific info to enable support. Also silan vendor ID added for dt-bindings. Staging graduation * adi,ad7280a monitoring ADC for stacked lithium-ion batteries in electric cars and similar. - Substantial rework of driver required to bring inline with current IIO best practice. An unusual device in IIO so some interesting features we may see more of in future. Multiple driver/core cleanup - Use sysfs_emit() in simple locations where there is no path to change to various core created attributes. - Trivial white space fixes around inconsistency between space after { and before } in id tables. - Introduce new handling for fractional types to avoid repeated similar implementations. Use this in 3 drivers. Note this is also targeted at future use in the AFE driver and was motivated by discussions around the precision related work on that driver. - of related header cleanups - drop of*.h and add mod_devicetable.h as appropriate. - Move a number of symbol exports into IIO_* namespaces. Two categories, 1) Library used by multiple drivers e.g. st_sensors 2) Core driver module exporting functions used by bus specific modules. A few related cleanups in this set. - Switch from CONFIG_PM_* guards to new DEFINE_SIMPLE_DEV_PM_OPS() and similar to simplify drivers and take advantage of these new macros allowing the compiler to do the job or removing unused code without the need for __maybe_unused markings. Conversion of other drivers to these new macros ongoing. Features * adi,adf4350 - Switch from of specific to generic device properties enabling use with other firmware types. * adi,adx345 - Switch from of specific to generic device properties. - Add ACPI ID ADS0345 - Related driver cleanup. * adi,hmc425a - Switch from of specific to generic device properties. * afe analog rescaler driver - Wider range of types supported for scale. - Support offset. - Kunit tests. * atlas,ezo-sensor - Convert from of to device properties. * fsl,mma8452 - Support mount matrix. * infineon,dps310: - Add ACPI ID IFX3100. * invensense,mpu6050 - Convert to generic device properties. * maxim,ds1803 - Add out_raw_available before supporting more devices. - Convert from of specific to device properties. * samsung,ssp_sensors - Convert from of specific to device properties. * st,stm32-timer trigger - Convert from of specific to device properties. * ti,hdc101x - Add ACPI ID TXNW1010. * ti,tsc2046: - Add read_raw support to enable use of iio_hwmon and similar. Fixes / cleanup. * mailmap - Update for Cai Huoqing * MAINTAINERS - Fix Analog Devices related links. - Add entry for ADRF6780 - Add entry for ADMV1013 - Add entry for AD7293 - Add entry for ADMV8818 - Update files listed for adis-lib * iio core: - Fix wrong comment about current_mode being something a driver should ever access. - Use struct_size() rather than open coding in industrialio-hw-consumer * adi,axl355 - Use units.h definitions instead of local versions. * adi,adis-lib - Simplify *updated_bits() macro - Whitespace cleanup. * afe - Note many of these fixes only apply to particular configurations so the problems have probably not been seen in the wild, but will be visible with new usecases enabled this cycle. - Fix application of consumer scale for IIO_VAL_INT. - Apply a scale of 1 when no scale is provided. - Make best effort to establish a valid offset value for fractional cases. - Use s64 for scale calculations where parameters may be signed. - Tidy up include order. - Improve accuracy for small fractional sales - Reduce risk of integer overflow. * ams,as3935 - Use devm_delayed_work_autocancel() to replace open coded equivalent. * aspeed,adc - Fix wrong use of divider flag. * atmel,sama5d2-adc - Relax atmel,trigger-edge-type to optional. - Drop Ludovic Desroches from listed maintainers of the dt-binding inline with previous MAINTAINERS entry update. * fsl,mma8452 - Fix probing when i2c_device_id used. - dev_get_drvdata() on the iio_dev->dev, no longer returns iio_dev. Use dev_to_iio_dev() instead. Note the original path in here worked more by luck than design. * invensense,mpu6050 - Drop ACPI_PTR() protection to avoid an unused warning. - Use fact ACPI_COMPANION() returns null when ACPI_HANDLE() does to simplify handling. * motorola,cpcap-adc - Drop unused assignment. * qcom,spmi-adc - Fix wrong example of 'reg' in binding document. * renesas,rzg2l-adc - Trivial typo fix. * semtech,sx9360 - Fix wrong register handling for event generation. * st_sensors - Allow manual disabling of I2C or SPI module if not needed for a particular board. Default is still to enable the bus specific module if appropriate bus is supported. * st,lsm6dsx - dev_get_drvdata() on the iio_dev->dev, no longer returns iio_dev. Use dev_to_iio_dev() instead. * ti,palmas-gpadc - Split the interrupt fields in the dt-binding example * ti,tsc2046 - Rework state machine to improve readability after recent debugging of an issue fixed elsewhere. - Add a sanity check to avoid very large memory allocations if a crazy delay is specified. * ti,twl6030 - Add error handling if devm_request_threaded_irq() fails. * xilinx,ams - Use devm_delayed_work_autocancel() instead of open coding equivalent. - Fix missing required clock entry in dt-binding. - Fix miss counting of channels resulting in ps channels not being enabled. - Fix incorrect values written to sequencer registers. - Fix sequence for single channel reading. * tag 'iio-for-5.18a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (245 commits) iio: adc: xilinx-ams: Fix single channel switching sequence iio: adc: xilinx-ams: Fixed wrong sequencer register settings iio: adc: xilinx-ams: Fixed missing PS channels dt-bindings: iio: adc: zynqmp_ams: Add clock entry iio: accel: mma8452: use the correct logic to get mma8452_data iio: adc: aspeed: Add divider flag to fix incorrect voltage reading. iio: imu: st_lsm6dsx: use dev_to_iio_dev() to get iio_dev struct dt-bindings: iio: Add ltc2688 documentation iio: ABI: add ABI file for the LTC2688 DAC iio: dac: add support for ltc2688 dt-bindings: iio: afe: add bindings for temperature transducers dt-bindings: iio: afe: add bindings for temperature-sense-rtd iio: afe: rescale: add temperature transducers iio: afe: rescale: add RTD temperature sensor support iio: test: add basic tests for the iio-rescale driver iio: afe: rescale: reduce risk of integer overflow iio: afe: rescale: fix accuracy for small fractional scales iio: afe: rescale: add offset support iio: afe: rescale: add INT_PLUS_{MICRO,NANO} support iio: afe: rescale: expose scale processing function ...
This commit is contained in:
commit
cc6ce5ac2c
298 changed files with 12335 additions and 2951 deletions
1
.mailmap
1
.mailmap
|
@ -71,6 +71,7 @@ Boris Brezillon <bbrezillon@kernel.org> <boris.brezillon@free-electrons.com>
|
|||
Brian Avery <b.avery@hp.com>
|
||||
Brian King <brking@us.ibm.com>
|
||||
Brian Silverman <bsilver16384@gmail.com> <brian.silverman@bluerivertech.com>
|
||||
Cai Huoqing <cai.huoqing@linux.dev> <caihuoqing@baidu.com>
|
||||
Changbin Du <changbin.du@intel.com> <changbin.du@gmail.com>
|
||||
Changbin Du <changbin.du@intel.com> <changbin.du@intel.com>
|
||||
Chao Yu <chao@kernel.org> <chao2.yu@samsung.com>
|
||||
|
|
|
@ -476,6 +476,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_i_calibscale
|
|||
What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_q_calibscale
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_voltage_i_calibscale
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_voltage_q_calibscale
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage_calibscale
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_voltage_calibscale
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_calibscale
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_calibscale
|
||||
|
@ -1213,6 +1214,32 @@ Description:
|
|||
number or direction is not specified, applies to all channels of
|
||||
this type.
|
||||
|
||||
What: /sys/.../iio:deviceX/events/in_accel_mag_referenced_en
|
||||
What: /sys/.../iio:deviceX/events/in_accel_mag_referenced_rising_en
|
||||
What: /sys/.../iio:deviceX/events/in_accel_mag_referenced_falling_en
|
||||
What: /sys/.../iio:deviceX/events/in_accel_y_mag_referenced_en
|
||||
What: /sys/.../iio:deviceX/events/in_accel_y_mag_referenced_rising_en
|
||||
What: /sys/.../iio:deviceX/events/in_accel_y_mag_referenced_falling_en
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Similar to in_accel_mag[_y][_rising|_falling]_en, but the event
|
||||
value is relative to a reference magnitude. The reference magnitude
|
||||
includes the graviational acceleration.
|
||||
|
||||
What: /sys/.../iio:deviceX/events/in_accel_mag_referenced_value
|
||||
What: /sys/.../iio:deviceX/events/in_accel_mag_referenced_rising_value
|
||||
What: /sys/.../iio:deviceX/events/in_accel_mag_referenced_falling_value
|
||||
What: /sys/.../iio:deviceX/events/in_accel_y_mag_referenced_value
|
||||
What: /sys/.../iio:deviceX/events/in_accel_y_mag_referenced_rising_value
|
||||
What: /sys/.../iio:deviceX/events/in_accel_y_mag_referenced_falling_value
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
The value to which the reference magnitude of the channel is
|
||||
compared. If the axis is not specified, it applies to all channels
|
||||
of this type.
|
||||
|
||||
What: /sys/.../events/in_steps_change_en
|
||||
KernelVersion: 4.0
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
|
@ -1252,6 +1279,10 @@ Description:
|
|||
Actually start the buffer capture up. Will start trigger
|
||||
if first device and appropriate.
|
||||
|
||||
Note that it might be impossible to configure other attributes,
|
||||
(e.g.: events, scale, sampling rate) if they impact the currently
|
||||
active buffer capture session.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/bufferY
|
||||
KernelVersion: 5.11
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
|
|
13
Documentation/ABI/testing/sysfs-bus-iio-adc-ad7280a
Normal file
13
Documentation/ABI/testing/sysfs-bus-iio-adc-ad7280a
Normal file
|
@ -0,0 +1,13 @@
|
|||
What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_balance_switch_en
|
||||
KernelVersion: 5.14
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Used to enable an output for balancing cells for time
|
||||
controlled via in_voltage_Y-voltageZ_balance_switch_timer.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_balance_switch_timer
|
||||
KernelVersion: 5.14
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Time in seconds for which balance switch will be turned on.
|
||||
Multiple of 71.5 seconds.
|
86
Documentation/ABI/testing/sysfs-bus-iio-dac-ltc2688
Normal file
86
Documentation/ABI/testing/sysfs-bus-iio-dac-ltc2688
Normal file
|
@ -0,0 +1,86 @@
|
|||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_dither_en
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Dither enable. Write 1 to enable dither or 0 to disable it. This is useful
|
||||
for changing the dither parameters. They way it should be done is:
|
||||
|
||||
- disable dither operation;
|
||||
- change dither parameters (eg: frequency, phase...);
|
||||
- enabled dither operation
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_dither_raw
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This raw, unscaled value refers to the dither signal amplitude.
|
||||
The same scale as in out_voltageY_raw applies. However, the
|
||||
offset might be different as it's always 0 for this attribute.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_dither_raw_available
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Available range for dither raw amplitude values.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_dither_offset
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Offset applied to out_voltageY_dither_raw. Read only attribute
|
||||
always set to 0.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_dither_frequency
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Sets the dither signal frequency. Units are in Hz.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_dither_frequency_available
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Returns the available values for the dither frequency.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_dither_phase
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Sets the dither signal phase. Units are in Radians.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_dither_phase_available
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Returns the available values for the dither phase.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_toggle_en
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Toggle enable. Write 1 to enable toggle or 0 to disable it. This is
|
||||
useful when one wants to change the DAC output codes. The way it should
|
||||
be done is:
|
||||
|
||||
- disable toggle operation;
|
||||
- change out_voltageY_raw0 and out_voltageY_raw1;
|
||||
- enable toggle operation.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_raw0
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_raw1
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
It has the same meaning as out_voltageY_raw. This attribute is
|
||||
specific to toggle enabled channels and refers to the DAC output
|
||||
code in INPUT_A (_raw0) and INPUT_B (_raw1). The same scale and offset
|
||||
as in out_voltageY_raw applies.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_symbol
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Performs a SW toggle. This attribute is specific to toggle
|
||||
enabled channels and allows to toggle between out_voltageY_raw0
|
||||
and out_voltageY_raw1 through software. Writing 0 will select
|
||||
out_voltageY_raw0 while 1 selects out_voltageY_raw1.
|
23
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014
Normal file
23
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014
Normal file
|
@ -0,0 +1,23 @@
|
|||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0_i_calibscale_coarse
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read/write value for the digital attenuator gain (IF_I) with coarse steps.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0_q_calibscale_coarse
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read/write value for the digital attenuator gain (IF_Q) with coarse steps.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0_i_calibscale_fine
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read/write value for the digital attenuator gain (IF_I) with fine steps.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0_q_calibscale_fine
|
||||
KernelVersion: 5.18
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read/write value for the digital attenuator gain (IF_Q) with fine steps.
|
28
Documentation/ABI/testing/sysfs-bus-iio-sx9324
Normal file
28
Documentation/ABI/testing/sysfs-bus-iio-sx9324
Normal file
|
@ -0,0 +1,28 @@
|
|||
What: /sys/bus/iio/devices/iio:deviceX/in_proximity<id>_setup
|
||||
Date: November 2021
|
||||
KernelVersion: 5.17
|
||||
Contact: Gwendal Grignou <gwendal@chromium.org>
|
||||
Description:
|
||||
SX9324 has 3 inputs, CS0, CS1 and CS2. Hardware layout
|
||||
defines if the input is
|
||||
+ not connected (HZ),
|
||||
+ grounded (GD),
|
||||
+ connected to an antenna where it can act as a base
|
||||
(DS - data shield), or measured input (MI).
|
||||
|
||||
The sensor rotates measurement across 4 phases
|
||||
(PH0, PH1, PH2, PH3), where the inputs are configured
|
||||
and then measured.
|
||||
|
||||
By default, during the first phase, [PH0], CS0 is measured,
|
||||
while CS1 and CS2 are used as shields.
|
||||
`cat in_proximity0_setup` returns "MI,DS,DS".
|
||||
[PH1], CS1 is measured, CS0 and CS2 are shield:
|
||||
`cat in_proximity1_setup` returns "DS,MI,DS".
|
||||
[PH2], CS2 is measured, CS0 and CS1 are shield:
|
||||
`cat in_proximity1_setup` returns "DS,DS,MI".
|
||||
[PH3], CS1 and CS2 are measured (combo mode):
|
||||
`cat in_proximity1_setup` returns "DS,MI,MI".
|
||||
|
||||
Note, these are the chip default. Hardware layout will most
|
||||
likely dictate different output. The entry is read-only.
|
79
Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
Normal file
79
Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
Normal file
|
@ -0,0 +1,79 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/accel/adi,adxl367.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Analog Devices ADXL367 3-Axis Digital Accelerometer
|
||||
|
||||
maintainers:
|
||||
- Cosmin Tanislav <cosmin.tanislav@analog.com>
|
||||
|
||||
description: |
|
||||
The ADXL367 is an ultralow power, 3-axis MEMS accelerometer.
|
||||
|
||||
The ADXL367 does not alias input signals by to achieve ultralow power
|
||||
consumption, it samples the full bandwidth of the sensor at all
|
||||
data rates. Measurement ranges of +-2g, +-4g, and +-8g are available,
|
||||
with a resolution of 0.25mg/LSB on the +-2 g range.
|
||||
|
||||
In addition to its ultralow power consumption, the ADXL367
|
||||
has many features to enable true system level power reduction.
|
||||
It includes a deep multimode output FIFO, a built-in micropower
|
||||
temperature sensor, and an internal ADC for synchronous conversion
|
||||
of an additional analog input.
|
||||
https://www.analog.com/en/products/adxl367.html
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,adxl367
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
spi-max-frequency: true
|
||||
|
||||
vdd-supply: true
|
||||
vddio-supply: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
accelerometer@53 {
|
||||
compatible = "adi,adxl367";
|
||||
reg = <0x53>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <25 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
};
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
accelerometer@0 {
|
||||
compatible = "adi,adxl367";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <1000000>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <25 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
};
|
77
Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml
Normal file
77
Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml
Normal file
|
@ -0,0 +1,77 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/adc/adi,ad7280a.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Analog Devices AD7280a Lithium Ion Battery Monitoring System
|
||||
|
||||
maintainers:
|
||||
- Michael Hennerich <michael.hennerich@analog.com>
|
||||
- Jonathan Cameron <jic23@kernel.org>
|
||||
|
||||
description: |
|
||||
Bindings for the Analog Devices AD7280a Battery Monitoring System.
|
||||
Used in devices such as hybrid electric cars, battery backup and power tools.
|
||||
Multiple chips can be daisy chained and accessed via a single SPI interface.
|
||||
Data sheet found here:
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7280A.pdf
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: adi,ad7280a
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
description: IRQ line for the ADC
|
||||
maxItems: 1
|
||||
|
||||
spi-max-frequency: true
|
||||
|
||||
adi,voltage-alert-last-chan:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
Allows limiting of scope of which channels are considered for voltage
|
||||
alerts, typically because not all are wired to anything. Only applies to
|
||||
last device in the daisy chain.
|
||||
default: 5
|
||||
enum: [3, 4, 5]
|
||||
|
||||
adi,acquisition-time-ns:
|
||||
description:
|
||||
Additional time may be needed to charge the sampling capacitors depending
|
||||
on external writing.
|
||||
default: 400
|
||||
enum: [400, 800, 1200, 1600]
|
||||
|
||||
adi,thermistor-termination:
|
||||
type: boolean
|
||||
description:
|
||||
Enable the thermistor termination function.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
adc@0 {
|
||||
compatible = "adi,ad7280a";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <700000>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <25 2>;
|
||||
adi,thermistor-termination;
|
||||
adi,acquisition-time-ns = <800>;
|
||||
adi,voltage-alert-last-chan = <5>;
|
||||
};
|
||||
};
|
||||
...
|
|
@ -7,7 +7,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: AT91 SAMA5D2 Analog to Digital Converter (ADC)
|
||||
|
||||
maintainers:
|
||||
- Ludovic Desroches <ludovic.desroches@atmel.com>
|
||||
- Eugen Hristev <eugen.hristev@microchip.com>
|
||||
|
||||
properties:
|
||||
|
@ -72,7 +71,6 @@ required:
|
|||
- atmel,min-sample-rate-hz
|
||||
- atmel,max-sample-rate-hz
|
||||
- atmel,startup-time-ms
|
||||
- atmel,trigger-edge-type
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
|
|
@ -34,6 +34,7 @@ properties:
|
|||
- items:
|
||||
- enum:
|
||||
- mediatek,mt8183-auxadc
|
||||
- mediatek,mt8186-auxadc
|
||||
- mediatek,mt8195-auxadc
|
||||
- mediatek,mt8516-auxadc
|
||||
- const: mediatek,mt8173-auxadc
|
||||
|
|
|
@ -10,7 +10,7 @@ maintainers:
|
|||
- Oskar Andero <oskar.andero@gmail.com>
|
||||
|
||||
description: |
|
||||
Family of simple ADCs with an I2C inteface.
|
||||
Family of simple ADCs with a SPI interface.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
|
|
|
@ -51,7 +51,7 @@ examples:
|
|||
#size-cells = <0>;
|
||||
pmic_iadc: adc@3600 {
|
||||
compatible = "qcom,spmi-iadc";
|
||||
reg = <0x3600 0x100>;
|
||||
reg = <0x3600>;
|
||||
interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
|
||||
qcom,external-resistor-micro-ohms = <10000>;
|
||||
#io-channel-cells = <1>;
|
||||
|
|
|
@ -74,9 +74,9 @@ examples:
|
|||
compatible = "ti,twl6035-pmic", "ti,palmas-pmic";
|
||||
adc {
|
||||
compatible = "ti,palmas-gpadc";
|
||||
interrupts = <18 0
|
||||
16 0
|
||||
17 0>;
|
||||
interrupts = <18 0>,
|
||||
<16 0>,
|
||||
<17 0>;
|
||||
#io-channel-cells = <1>;
|
||||
ti,channel0-current-microamp = <5>;
|
||||
ti,channel3-current-microamp = <10>;
|
||||
|
|
|
@ -92,6 +92,10 @@ properties:
|
|||
description: AMS Controller register space
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: AMS reference clock
|
||||
|
||||
ranges:
|
||||
description:
|
||||
Maps the child address space for PS and/or PL.
|
||||
|
@ -181,12 +185,15 @@ properties:
|
|||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- ranges
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/xlnx-zynqmp-clk.h>
|
||||
|
||||
bus {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
@ -196,6 +203,7 @@ examples:
|
|||
interrupt-parent = <&gic>;
|
||||
interrupts = <0 56 4>;
|
||||
reg = <0x0 0xffa50000 0x0 0x800>;
|
||||
clocks = <&zynqmp_clk AMS_REF>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#io-channel-cells = <1>;
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/afe/temperature-sense-rtd.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Temperature Sense RTD
|
||||
|
||||
maintainers:
|
||||
- Liam Beguin <liambeguin@gmail.com>
|
||||
|
||||
description: |
|
||||
RTDs (Resistance Temperature Detectors) are a kind of temperature sensors
|
||||
used to get a linear voltage to temperature reading within a give range
|
||||
(usually 0 to 100 degrees Celsius).
|
||||
|
||||
When an io-channel measures the output voltage across an RTD such as a
|
||||
PT1000, the interesting measurement is almost always the corresponding
|
||||
temperature, not the voltage output. This binding describes such a circuit.
|
||||
|
||||
The general transfer function here is (using SI units)
|
||||
|
||||
V = R(T) * iexc
|
||||
R(T) = r0 * (1 + alpha * T)
|
||||
T = 1 / (alpha * r0 * iexc) * (V - r0 * iexc)
|
||||
|
||||
The following circuit matches what's in the examples section.
|
||||
|
||||
5V0
|
||||
-----
|
||||
|
|
||||
+---+----+
|
||||
| R 5k |
|
||||
+---+----+
|
||||
|
|
||||
V 1mA
|
||||
|
|
||||
+---- Vout
|
||||
|
|
||||
+---+----+
|
||||
| PT1000 |
|
||||
+---+----+
|
||||
|
|
||||
-----
|
||||
GND
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: temperature-sense-rtd
|
||||
|
||||
io-channels:
|
||||
maxItems: 1
|
||||
description: |
|
||||
Channel node of a voltage io-channel.
|
||||
|
||||
'#io-channel-cells':
|
||||
const: 0
|
||||
|
||||
excitation-current-microamp:
|
||||
description: The current fed through the RTD sensor.
|
||||
|
||||
alpha-ppm-per-celsius:
|
||||
description: |
|
||||
alpha can also be expressed in micro-ohms per ohm Celsius. It's a linear
|
||||
approximation of the resistance versus temperature relationship
|
||||
between 0 and 100 degrees Celsius.
|
||||
|
||||
alpha = (R_100 - R_0) / (100 * R_0)
|
||||
|
||||
Where, R_100 is the resistance of the sensor at 100 degrees Celsius, and
|
||||
R_0 (or r-naught-ohms) is the resistance of the sensor at 0 degrees
|
||||
Celsius.
|
||||
|
||||
Pure platinum has an alpha of 3925. Industry standards such as IEC60751
|
||||
and ASTM E-1137 specify an alpha of 3850.
|
||||
|
||||
r-naught-ohms:
|
||||
description: |
|
||||
Resistance of the sensor at 0 degrees Celsius.
|
||||
Common values are 100 for PT100, 500 for PT500, and 1000 for PT1000
|
||||
|
||||
additionalProperties: false
|
||||
required:
|
||||
- compatible
|
||||
- io-channels
|
||||
- excitation-current-microamp
|
||||
- alpha-ppm-per-celsius
|
||||
- r-naught-ohms
|
||||
|
||||
examples:
|
||||
- |
|
||||
pt1000_1: temperature-sensor0 {
|
||||
compatible = "temperature-sense-rtd";
|
||||
#io-channel-cells = <0>;
|
||||
io-channels = <&temp_adc1 0>;
|
||||
|
||||
excitation-current-microamp = <1000>; /* i = U/R = 5 / 5000 */
|
||||
alpha-ppm-per-celsius = <3908>;
|
||||
r-naught-ohms = <1000>;
|
||||
};
|
||||
...
|
|
@ -0,0 +1,114 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/afe/temperature-transducer.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Temperature Transducer
|
||||
|
||||
maintainers:
|
||||
- Liam Beguin <liambeguin@gmail.com>
|
||||
|
||||
description: |
|
||||
A temperature transducer is a device that converts a thermal quantity
|
||||
into any other physical quantity. This binding applies to temperature to
|
||||
voltage (like the LTC2997), and temperature to current (like the AD590)
|
||||
linear transducers.
|
||||
In both cases these are assumed to be connected to a voltage ADC.
|
||||
|
||||
When an io-channel measures the output voltage of a temperature analog front
|
||||
end such as a temperature transducer, the interesting measurement is almost
|
||||
always the corresponding temperature, not the voltage output. This binding
|
||||
describes such a circuit.
|
||||
|
||||
The general transfer function here is (using SI units)
|
||||
V(T) = Rsense * Isense(T)
|
||||
T = (Isense(T) / alpha) + offset
|
||||
T = 1 / (Rsense * alpha) * (V + offset * Rsense * alpha)
|
||||
|
||||
When using a temperature to voltage transducer, Rsense is set to 1.
|
||||
|
||||
The following circuits show a temperature to current and a temperature to
|
||||
voltage transducer that can be used with this binding.
|
||||
|
||||
VCC
|
||||
-----
|
||||
|
|
||||
+---+---+
|
||||
| AD590 | VCC
|
||||
+---+---+ -----
|
||||
| |
|
||||
V proportional to T +----+----+
|
||||
| D+ --+ |
|
||||
+---- Vout | LTC2997 +--- Vout
|
||||
| D- --+ |
|
||||
+---+----+ +---------+
|
||||
| Rsense | |
|
||||
+---+----+ -----
|
||||
| GND
|
||||
-----
|
||||
GND
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: temperature-transducer
|
||||
|
||||
io-channels:
|
||||
maxItems: 1
|
||||
description: |
|
||||
Channel node of a voltage io-channel.
|
||||
|
||||
'#io-channel-cells':
|
||||
const: 0
|
||||
|
||||
sense-offset-millicelsius:
|
||||
description: |
|
||||
Temperature offset.
|
||||
This offset is commonly used to convert from Kelvins to degrees Celsius.
|
||||
In that case, sense-offset-millicelsius would be set to <(-273150)>.
|
||||
default: 0
|
||||
|
||||
sense-resistor-ohms:
|
||||
description: |
|
||||
The sense resistor.
|
||||
By default sense-resistor-ohms cancels out the resistor making the
|
||||
circuit behave like a temperature transducer.
|
||||
default: 1
|
||||
|
||||
alpha-ppm-per-celsius:
|
||||
description: |
|
||||
Sometimes referred to as output gain, slope, or temperature coefficient.
|
||||
|
||||
alpha is expressed in parts per million which can be micro-amps per
|
||||
degrees Celsius or micro-volts per degrees Celsius. The is the main
|
||||
characteristic of a temperature transducer and should be stated in the
|
||||
datasheet.
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- io-channels
|
||||
- alpha-ppm-per-celsius
|
||||
|
||||
examples:
|
||||
- |
|
||||
ad950: temperature-sensor-0 {
|
||||
compatible = "temperature-transducer";
|
||||
#io-channel-cells = <0>;
|
||||
io-channels = <&temp_adc 3>;
|
||||
|
||||
sense-offset-millicelsius = <(-273150)>; /* Kelvin to degrees Celsius */
|
||||
sense-resistor-ohms = <8060>;
|
||||
alpha-ppm-per-celsius = <1>; /* 1 uA/K */
|
||||
};
|
||||
- |
|
||||
znq_tmp: temperature-sensor-1 {
|
||||
compatible = "temperature-transducer";
|
||||
#io-channel-cells = <0>;
|
||||
io-channels = <&temp_adc 2>;
|
||||
|
||||
sense-offset-millicelsius = <(-273150)>; /* Kelvin to degrees Celsius */
|
||||
alpha-ppm-per-celsius = <4000>; /* 4 mV/K */
|
||||
};
|
||||
...
|
|
@ -0,0 +1,50 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/amplifiers/adi,ada4250.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: ADA4250 Programmable Gain Instrumentation Amplifier
|
||||
|
||||
maintainers:
|
||||
- Antoniu Miclaus <antoniu.miclaus@analog.com>
|
||||
|
||||
description: |
|
||||
Precision Low Power, 110kHz, 26uA, Programmable Gain Instrumentation Amplifier.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,ada4250
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
avdd-supply: true
|
||||
|
||||
adi,refbuf-enable:
|
||||
description:
|
||||
Enable internal buffer to drive the reference pin.
|
||||
type: boolean
|
||||
|
||||
spi-max-frequency: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- avdd-supply
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
amplifier@0 {
|
||||
compatible = "adi,ada4250";
|
||||
reg = <0>;
|
||||
avdd-supply = <&avdd>;
|
||||
};
|
||||
};
|
||||
...
|
146
Documentation/devicetree/bindings/iio/dac/adi,ltc2688.yaml
Normal file
146
Documentation/devicetree/bindings/iio/dac/adi,ltc2688.yaml
Normal file
|
@ -0,0 +1,146 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/dac/adi,ltc2688.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Analog Devices LTC2688 DAC
|
||||
|
||||
maintainers:
|
||||
- Nuno Sá <nuno.sa@analog.com>
|
||||
|
||||
description: |
|
||||
Analog Devices LTC2688 16 channel, 16 bit, +-15V DAC
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/ltc2688.pdf
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,ltc2688
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
vcc-supply:
|
||||
description: Analog Supply Voltage Input.
|
||||
|
||||
iovcc-supply:
|
||||
description: Digital Input/Output Supply Voltage.
|
||||
|
||||
vref-supply:
|
||||
description:
|
||||
Reference Input/Output. The voltage at the REF pin sets the full-scale
|
||||
range of all channels. If not provided the internal reference is used and
|
||||
also provided on the VREF pin".
|
||||
|
||||
clr-gpios:
|
||||
description:
|
||||
If specified, it will be asserted during driver probe. As the line is
|
||||
active low, it should be marked GPIO_ACTIVE_LOW.
|
||||
maxItems: 1
|
||||
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
patternProperties:
|
||||
"^channel@([0-9]|1[0-5])$":
|
||||
type: object
|
||||
|
||||
properties:
|
||||
reg:
|
||||
description: The channel number representing the DAC output channel.
|
||||
maximum: 15
|
||||
|
||||
adi,toggle-mode:
|
||||
description:
|
||||
Set the channel as a toggle enabled channel. Toggle operation enables
|
||||
fast switching of a DAC output between two different DAC codes without
|
||||
any SPI transaction.
|
||||
type: boolean
|
||||
|
||||
adi,output-range-microvolt:
|
||||
description: Specify the channel output full scale range.
|
||||
oneOf:
|
||||
- items:
|
||||
- const: 0
|
||||
- enum: [5000000, 10000000]
|
||||
- items:
|
||||
- const: -5000000
|
||||
- const: 5000000
|
||||
- items:
|
||||
- const: -10000000
|
||||
- const: 10000000
|
||||
- items:
|
||||
- const: -15000000
|
||||
- const: 15000000
|
||||
|
||||
adi,overrange:
|
||||
description: Enable 5% overrange over the selected full scale range.
|
||||
type: boolean
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
adi,toggle-dither-input:
|
||||
description:
|
||||
Selects the TGPx pin to be associated with this channel. This setting
|
||||
only makes sense for toggle or dither enabled channels. If
|
||||
@adi,toggle-mode is not set and this property is given, the channel is
|
||||
assumed to be a dither capable channel. Note that multiple channels
|
||||
can be mapped to the same pin. If this setting is given, the
|
||||
respective @clock must also be provided. Mappings between this and
|
||||
input pins
|
||||
0 - TGP1
|
||||
1 - TGP2
|
||||
2 - TGP3
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 1, 2]
|
||||
|
||||
dependencies:
|
||||
adi,toggle-dither-input: [ clocks ]
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
ltc2688: ltc2688@0 {
|
||||
compatible = "adi,ltc2688";
|
||||
reg = <0>;
|
||||
|
||||
vcc-supply = <&vcc>;
|
||||
iovcc-supply = <&vcc>;
|
||||
vref-supply = <&vref>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
adi,toggle-mode;
|
||||
adi,overrange;
|
||||
};
|
||||
|
||||
channel@1 {
|
||||
reg = <1>;
|
||||
adi,output-range-microvolt = <0 10000000>;
|
||||
|
||||
clocks = <&clock_tgp3>;
|
||||
adi,toggle-dither-input = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
...
|
|
@ -0,0 +1,134 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/frequency/adi,admv1014.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: ADMV1014 Microwave Downconverter
|
||||
|
||||
maintainers:
|
||||
- Antoniu Miclaus <antoniu.miclaus@analog.com>
|
||||
|
||||
description: |
|
||||
Wideband, microwave downconverter optimized for point to point microwave
|
||||
radio designs operating in the 24 GHz to 44 GHz frequency range.
|
||||
|
||||
https://www.analog.com/en/products/admv1014.html
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,admv1014
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
spi-max-frequency:
|
||||
maximum: 1000000
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: lo_in
|
||||
description:
|
||||
External clock that provides the Local Oscilator input.
|
||||
|
||||
vcm-supply:
|
||||
description:
|
||||
Common-mode voltage regulator.
|
||||
|
||||
vcc-if-bb-supply:
|
||||
description:
|
||||
BB and IF supply voltage regulator.
|
||||
|
||||
vcc-vga-supply:
|
||||
description:
|
||||
RF Amplifier supply voltage regulator.
|
||||
|
||||
vcc-vva-supply:
|
||||
description:
|
||||
VVA Control Circuit supply voltage regulator.
|
||||
|
||||
vcc-lna-3p3-supply:
|
||||
description:
|
||||
Low Noise Amplifier 3.3V supply voltage regulator.
|
||||
|
||||
vcc-lna-1p5-supply:
|
||||
description:
|
||||
Low Noise Amplifier 1.5V supply voltage regulator.
|
||||
|
||||
vcc-bg-supply:
|
||||
description:
|
||||
Band Gap Circuit supply voltage regulator.
|
||||
|
||||
vcc-quad-supply:
|
||||
description:
|
||||
Quadruple supply voltage regulator.
|
||||
|
||||
vcc-mixer-supply:
|
||||
description:
|
||||
Mixer supply voltage regulator.
|
||||
|
||||
adi,input-mode:
|
||||
description:
|
||||
Select the input mode.
|
||||
iq - in-phase quadrature (I/Q) input
|
||||
if - complex intermediate frequency (IF) input
|
||||
enum: [iq, if]
|
||||
|
||||
adi,detector-enable:
|
||||
description:
|
||||
Digital Rx Detector Enable. The Square Law Detector output is
|
||||
available at output pin VDET.
|
||||
type: boolean
|
||||
|
||||
adi,p1db-compensation-enable:
|
||||
description:
|
||||
Turn on bits to optimize P1dB.
|
||||
type: boolean
|
||||
|
||||
adi,quad-se-mode:
|
||||
description:
|
||||
Switch the LO path from differential to single-ended operation.
|
||||
se-neg - Single-Ended Mode, Negative Side Disabled.
|
||||
se-pos - Single-Ended Mode, Positive Side Disabled.
|
||||
diff - Differential Mode.
|
||||
enum: [se-neg, se-pos, diff]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- vcm-supply
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
converter@0 {
|
||||
compatible = "adi,admv1014";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <1000000>;
|
||||
clocks = <&admv1014_lo>;
|
||||
clock-names = "lo_in";
|
||||
vcm-supply = <&vcm>;
|
||||
vcc-if-bb-supply = <&vcc_if_bb>;
|
||||
vcc-vga-supply = <&vcc_vga>;
|
||||
vcc-vva-supply = <&vcc_vva>;
|
||||
vcc-lna-3p3-supply = <&vcc_lna_3p3>;
|
||||
vcc-lna-1p5-supply = <&vcc_lna_1p5>;
|
||||
vcc-bg-supply = <&vcc_bg>;
|
||||
vcc-quad-supply = <&vcc_quad>;
|
||||
vcc-mixer-supply = <&vcc_mixer>;
|
||||
adi,quad-se-mode = "diff";
|
||||
adi,detector-enable;
|
||||
adi,p1db-compensation-enable;
|
||||
};
|
||||
};
|
||||
...
|
|
@ -0,0 +1,55 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/frequency/adi,admv4420.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: ADMV4420 K Band Downconverter
|
||||
|
||||
maintainers:
|
||||
- Cristian Pop <cristian.pop@analog.com>
|
||||
|
||||
description:
|
||||
The ADMV4420 is a highly integrated, double balanced, active
|
||||
mixer with an integrated fractional-N synthesizer, ideally suited
|
||||
for next generation K band satellite communications
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,admv4420
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
spi-max-frequency:
|
||||
maximum: 1000000
|
||||
|
||||
adi,lo-freq-khz:
|
||||
description: LO Frequency
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
adi,ref-ext-single-ended-en:
|
||||
description: External reference selected.
|
||||
type: boolean
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
mixer@0 {
|
||||
compatible = "adi,admv4420";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <1000000>;
|
||||
adi,lo-freq-khz = <16750000>;
|
||||
adi,ref-ext-single-ended-en;
|
||||
};
|
||||
};
|
||||
...
|
|
@ -0,0 +1,161 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/proximity/semtech,sx9324.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Semtech's SX9324 capacitive proximity sensor
|
||||
|
||||
maintainers:
|
||||
- Gwendal Grignou <gwendal@chromium.org>
|
||||
- Daniel Campello <campello@chromium.org>
|
||||
|
||||
description: |
|
||||
Semtech's SX9324 proximity sensor.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: semtech,sx9324
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
description:
|
||||
Generated by device to announce preceding read request has finished
|
||||
and data is available or that a close/far proximity event has happened.
|
||||
maxItems: 1
|
||||
|
||||
vdd-supply:
|
||||
description: Main power supply
|
||||
|
||||
svdd-supply:
|
||||
description: Host interface power supply
|
||||
|
||||
"#io-channel-cells":
|
||||
const: 1
|
||||
|
||||
semtech,ph0-pin:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
description: |
|
||||
Array of 3 entries. Index represent the id of the CS pin.
|
||||
Value indicates how each CS pin is used during phase 0.
|
||||
Each of the 3 pins have the following value -
|
||||
0 : unused (high impedance)
|
||||
1 : measured input
|
||||
2 : dynamic shield
|
||||
3 : grounded.
|
||||
For instance, CS0 measured, CS1 shield and CS2 ground is [1, 2, 3]
|
||||
items:
|
||||
enum: [ 0, 1, 2, 3 ]
|
||||
minItems: 3
|
||||
maxItems: 3
|
||||
|
||||
semtech,ph1-pin:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
description: Same as ph0-pin for phase 1.
|
||||
items:
|
||||
enum: [ 0, 1, 2, 3 ]
|
||||
minItems: 3
|
||||
maxItems: 3
|
||||
|
||||
semtech,ph2-pin:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
description: Same as ph0-pin for phase 2.
|
||||
items:
|
||||
enum: [ 0, 1, 2, 3 ]
|
||||
minItems: 3
|
||||
maxItems: 3
|
||||
|
||||
semtech,ph3-pin:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
description: Same as ph0-pin for phase 3.
|
||||
items:
|
||||
enum: [ 0, 1, 2, 3 ]
|
||||
minItems: 3
|
||||
maxItems: 3
|
||||
|
||||
|
||||
semtech,ph01-resolution:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [8, 16, 32, 64, 128, 256, 512, 1024]
|
||||
description:
|
||||
Capacitance measurement resolution. For phase 0 and 1.
|
||||
Higher the number, higher the resolution.
|
||||
default: 128
|
||||
|
||||
semtech,ph23-resolution:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [8, 16, 32, 64, 128, 256, 512, 1024]
|
||||
description:
|
||||
Capacitance measurement resolution. For phase 2 and 3
|
||||
default: 128
|
||||
|
||||
semtech,startup-sensor:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 1, 2, 3]
|
||||
default: 0
|
||||
description: |
|
||||
Phase used for start-up proximity detection.
|
||||
It is used when we enable a phase to remove static offset and measure
|
||||
only capacitance changes introduced by the user.
|
||||
|
||||
semtech,ph01-proxraw-strength:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 0
|
||||
maximum: 7
|
||||
default: 1
|
||||
description:
|
||||
PROXRAW filter strength for phase 0 and 1. A value of 0 represents off,
|
||||
and other values represent 1-1/2^N.
|
||||
|
||||
semtech,ph23-proxraw-strength:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 0
|
||||
maximum: 7
|
||||
default: 1
|
||||
description:
|
||||
Same as proxraw-strength01, for phase 2 and 3.
|
||||
|
||||
semtech,avg-pos-strength:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
|
||||
default: 16
|
||||
description: |
|
||||
Average positive filter strength. A value of 0 represents off and
|
||||
UINT_MAX (4294967295) represents infinite. Other values
|
||||
represent 1-1/N.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#io-channel-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
proximity@28 {
|
||||
compatible = "semtech,sx9324";
|
||||
reg = <0x28>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
|
||||
vdd-supply = <&pp3300_a>;
|
||||
svdd-supply = <&pp1800_prox>;
|
||||
#io-channel-cells = <1>;
|
||||
semtech,ph0-pin = <1 2 3>;
|
||||
semtech,ph1-pin = <3 2 1>;
|
||||
semtech,ph2-pin = <1 2 3>;
|
||||
semtech,ph3-pin = <3 2 1>;
|
||||
semtech,ph01-resolution = <256>;
|
||||
semtech,ph23-resolution = <256>;
|
||||
semtech,startup-sensor = <1>;
|
||||
semtech,ph01-proxraw-strength = <2>;
|
||||
semtech,ph23-proxraw-strength = <2>;
|
||||
semtech,avg-pos-strength = <64>;
|
||||
};
|
||||
};
|
|
@ -0,0 +1,89 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/proximity/semtech,sx9360.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Semtech's SX9360 capacitive proximity sensor
|
||||
|
||||
maintainers:
|
||||
- Gwendal Grignou <gwendal@chromium.org>
|
||||
- Daniel Campello <campello@chromium.org>
|
||||
|
||||
description: |
|
||||
Semtech's SX9360 proximity sensor.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: semtech,sx9360
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
description:
|
||||
Generated by device to announce preceding read request has finished
|
||||
and data is available or that a close/far proximity event has happened.
|
||||
maxItems: 1
|
||||
|
||||
vdd-supply:
|
||||
description: Main power supply
|
||||
|
||||
svdd-supply:
|
||||
description: Host interface power supply
|
||||
|
||||
"#io-channel-cells":
|
||||
const: 1
|
||||
|
||||
semtech,resolution:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
enum: [8, 16, 32, 64, 128, 256, 512, 1024]
|
||||
description:
|
||||
Capacitance measurement resolution. For both phases, "reference" and
|
||||
"measurement". Higher the number, higher the resolution.
|
||||
default: 128
|
||||
|
||||
semtech,proxraw-strength:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 0
|
||||
maximum: 7
|
||||
default: 1
|
||||
description:
|
||||
PROXRAW filter strength for both phases. A value of 0 represents off,
|
||||
and other values represent 1-1/2^N.
|
||||
|
||||
semtech,avg-pos-strength:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
|
||||
default: 16
|
||||
description: |
|
||||
Average positive filter strength. A value of 0 represents off and
|
||||
UINT_MAX (4294967295) represents infinite. Other values
|
||||
represent 1-1/N.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#io-channel-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
proximity@28 {
|
||||
compatible = "semtech,sx9360";
|
||||
reg = <0x28>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
|
||||
vdd-supply = <&pp3300_a>;
|
||||
svdd-supply = <&pp1800_prox>;
|
||||
#io-channel-cells = <1>;
|
||||
semtech,resolution = <256>;
|
||||
semtech,proxraw-strength = <2>;
|
||||
semtech,avg-pos-strength = <64>;
|
||||
};
|
||||
};
|
|
@ -46,6 +46,9 @@ properties:
|
|||
- st,lsm330d-accel
|
||||
- st,lsm330dl-accel
|
||||
- st,lsm330dlc-accel
|
||||
- description: Silan Accelerometers
|
||||
enum:
|
||||
- silan,sc7a20
|
||||
- description: STMicroelectronics Gyroscopes
|
||||
enum:
|
||||
- st,l3g4200d-gyro
|
||||
|
|
|
@ -157,6 +157,8 @@ properties:
|
|||
- maxim,ds1803-050
|
||||
# 100 kOhm digital potentiometer with I2C interface
|
||||
- maxim,ds1803-100
|
||||
# 10 kOhm digital potentiometer with I2C interface
|
||||
- maxim,ds3502
|
||||
# Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs
|
||||
- maxim,max1237
|
||||
# Temperature Sensor, I2C interface
|
||||
|
|
|
@ -1082,6 +1082,8 @@ patternProperties:
|
|||
description: Silicon Image
|
||||
"^silabs,.*":
|
||||
description: Silicon Laboratories
|
||||
"^silan,.*":
|
||||
description: Hangzhou Silan Microelectronics Co., Ltd.
|
||||
"^silead,.*":
|
||||
description: Silead Inc.
|
||||
"^silergy,.*":
|
||||
|
|
123
MAINTAINERS
123
MAINTAINERS
|
@ -461,35 +461,35 @@ AD525X ANALOG DEVICES DIGITAL POTENTIOMETERS DRIVER
|
|||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/AD5254
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/misc/ad525x_dpot.c
|
||||
|
||||
AD5398 CURRENT REGULATOR DRIVER (AD5398/AD5821)
|
||||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/AD5398
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/regulator/ad5398.c
|
||||
|
||||
AD714X CAPACITANCE TOUCH SENSOR DRIVER (AD7142/3/7/8/7A)
|
||||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/AD7142
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/input/misc/ad714x.c
|
||||
|
||||
AD7877 TOUCHSCREEN DRIVER
|
||||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/AD7877
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/input/touchscreen/ad7877.c
|
||||
|
||||
AD7879 TOUCHSCREEN DRIVER (AD7879/AD7889)
|
||||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/AD7879
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/input/touchscreen/ad7879.c
|
||||
|
||||
ADDRESS SPACE LAYOUT RANDOMIZATION (ASLR)
|
||||
|
@ -501,7 +501,7 @@ M: Michael Hennerich <michael.hennerich@analog.com>
|
|||
L: linux-wpan@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://wiki.analog.com/ADF7242
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/net/ieee802154/adf7242.txt
|
||||
F: drivers/net/ieee802154/adf7242.c
|
||||
|
||||
|
@ -535,7 +535,7 @@ ADP5520 BACKLIGHT DRIVER WITH IO EXPANDER (ADP5520/ADP5501)
|
|||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/ADP5520
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/gpio/gpio-adp5520.c
|
||||
F: drivers/input/keyboard/adp5520-keys.c
|
||||
F: drivers/leds/leds-adp5520.c
|
||||
|
@ -546,7 +546,7 @@ ADP5588 QWERTY KEYPAD AND IO EXPANDER DRIVER (ADP5588/ADP5587)
|
|||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/ADP5588
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/gpio/gpio-adp5588.c
|
||||
F: drivers/input/keyboard/adp5588-keys.c
|
||||
|
||||
|
@ -554,7 +554,7 @@ ADP8860 BACKLIGHT DRIVER (ADP8860/ADP8861/ADP8863)
|
|||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/ADP8860
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/video/backlight/adp8860_bl.c
|
||||
|
||||
ADT746X FAN DRIVER
|
||||
|
@ -593,7 +593,7 @@ ADXL34X THREE-AXIS DIGITAL ACCELEROMETER DRIVER (ADXL345/ADXL346)
|
|||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/ADXL345
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
|
||||
F: drivers/input/misc/adxl34x.c
|
||||
|
||||
|
@ -607,10 +607,18 @@ F: drivers/iio/accel/adxl355_core.c
|
|||
F: drivers/iio/accel/adxl355_i2c.c
|
||||
F: drivers/iio/accel/adxl355_spi.c
|
||||
|
||||
ADXL367 THREE-AXIS DIGITAL ACCELEROMETER DRIVER
|
||||
M: Cosmin Tanislav <cosmin.tanislav@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
F: Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
|
||||
F: drivers/iio/accel/adxl367*
|
||||
|
||||
ADXL372 THREE-AXIS DIGITAL ACCELEROMETER DRIVER
|
||||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
|
||||
F: drivers/iio/accel/adxl372.c
|
||||
F: drivers/iio/accel/adxl372_i2c.c
|
||||
|
@ -1050,7 +1058,7 @@ ANALOG DEVICES INC AD7192 DRIVER
|
|||
M: Alexandru Tachici <alexandru.tachici@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
|
||||
F: drivers/iio/adc/ad7192.c
|
||||
|
||||
|
@ -1058,15 +1066,23 @@ ANALOG DEVICES INC AD7292 DRIVER
|
|||
M: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml
|
||||
F: drivers/iio/adc/ad7292.c
|
||||
|
||||
ANALOG DEVICES INC AD7293 DRIVER
|
||||
M: Antoniu Miclaus <antoniu.miclaus@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/dac/adi,ad7293.yaml
|
||||
F: drivers/iio/dac/ad7293.c
|
||||
|
||||
ANALOG DEVICES INC AD7768-1 DRIVER
|
||||
M: Michael Hennerich <Michael.Hennerich@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
|
||||
F: drivers/iio/adc/ad7768-1.c
|
||||
|
||||
|
@ -1075,7 +1091,7 @@ M: Michael Hennerich <Michael.Hennerich@analog.com>
|
|||
M: Renato Lui Geh <renatogeh@gmail.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml
|
||||
F: drivers/iio/adc/ad7780.c
|
||||
|
||||
|
@ -1094,6 +1110,14 @@ L: linux-media@vger.kernel.org
|
|||
S: Maintained
|
||||
F: drivers/media/i2c/ad9389b*
|
||||
|
||||
ANALOG DEVICES INC ADA4250 DRIVER
|
||||
M: Antoniu Miclaus <antoniu.miclaus@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml
|
||||
F: drivers/iio/amplifiers/ada4250.c
|
||||
|
||||
ANALOG DEVICES INC ADGS1408 DRIVER
|
||||
M: Mircea Caprioru <mircea.caprioru@analog.com>
|
||||
S: Supported
|
||||
|
@ -1104,7 +1128,7 @@ ANALOG DEVICES INC ADIN DRIVER
|
|||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/net/adi,adin.yaml
|
||||
F: drivers/net/phy/adin.c
|
||||
|
||||
|
@ -1113,20 +1137,22 @@ M: Nuno Sa <nuno.sa@analog.com>
|
|||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/iio/imu/adis.c
|
||||
F: drivers/iio/imu/adis_buffer.c
|
||||
F: drivers/iio/imu/adis_trigger.c
|
||||
F: include/linux/iio/imu/adis.h
|
||||
|
||||
ANALOG DEVICES INC ADIS16460 DRIVER
|
||||
M: Dragos Bogdan <dragos.bogdan@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml
|
||||
F: drivers/iio/imu/adis16460.c
|
||||
|
||||
ANALOG DEVICES INC ADIS16475 DRIVER
|
||||
M: Nuno Sa <nuno.sa@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
S: Supported
|
||||
F: drivers/iio/imu/adis16475.c
|
||||
F: Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
|
||||
|
@ -1135,22 +1161,54 @@ ANALOG DEVICES INC ADM1177 DRIVER
|
|||
M: Michael Hennerich <Michael.Hennerich@analog.com>
|
||||
L: linux-hwmon@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/hwmon/adi,adm1177.yaml
|
||||
F: drivers/hwmon/adm1177.c
|
||||
|
||||
ANALOG DEVICES INC ADMV1013 DRIVER
|
||||
M: Antoniu Miclaus <antoniu.miclaus@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/frequency/adi,admv1013.yaml
|
||||
F: drivers/iio/frequency/admv1013.c
|
||||
|
||||
ANALOG DEVICES INC ADMV8818 DRIVER
|
||||
M: Antoniu Miclaus <antoniu.miclaus@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/filter/adi,admv8818.yaml
|
||||
F: drivers/iio/filter/admv8818.c
|
||||
|
||||
ANALOG DEVICES INC ADMV1014 DRIVER
|
||||
M: Antoniu Miclaus <antoniu.miclaus@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yaml
|
||||
F: drivers/iio/frequency/admv1014.c
|
||||
|
||||
ANALOG DEVICES INC ADP5061 DRIVER
|
||||
M: Michael Hennerich <Michael.Hennerich@analog.com>
|
||||
L: linux-pm@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/power/supply/adp5061.c
|
||||
|
||||
ANALOG DEVICES INC ADRF6780 DRIVER
|
||||
M: Antoniu Miclaus <antoniu.miclaus@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/frequency/adi,adrf6780.yaml
|
||||
F: drivers/iio/frequency/adrf6780.c
|
||||
|
||||
ANALOG DEVICES INC ADV7180 DRIVER
|
||||
M: Lars-Peter Clausen <lars@metafoo.de>
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/media/i2c/adv7180.c
|
||||
F: Documentation/devicetree/bindings/media/i2c/adv7180.yaml
|
||||
|
||||
|
@ -1193,7 +1251,7 @@ M: Nuno Sá <nuno.sa@analog.com>
|
|||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: sound/soc/codecs/ad1*
|
||||
F: sound/soc/codecs/ad7*
|
||||
F: sound/soc/codecs/adau*
|
||||
|
@ -1204,7 +1262,7 @@ F: sound/soc/codecs/ssm*
|
|||
ANALOG DEVICES INC DMA DRIVERS
|
||||
M: Lars-Peter Clausen <lars@metafoo.de>
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/dma/dma-axi-dmac.c
|
||||
|
||||
ANALOG DEVICES INC IIO DRIVERS
|
||||
|
@ -1212,7 +1270,7 @@ M: Lars-Peter Clausen <lars@metafoo.de>
|
|||
M: Michael Hennerich <Michael.Hennerich@analog.com>
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523
|
||||
F: Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350
|
||||
F: Documentation/devicetree/bindings/iio/*/adi,*
|
||||
|
@ -3286,7 +3344,7 @@ AXI-FAN-CONTROL HARDWARE MONITOR DRIVER
|
|||
M: Nuno Sá <nuno.sa@analog.com>
|
||||
L: linux-hwmon@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/hwmon/adi,axi-fan-control.yaml
|
||||
F: drivers/hwmon/axi-fan-control.c
|
||||
|
||||
|
@ -11300,11 +11358,20 @@ S: Maintained
|
|||
F: Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
|
||||
F: drivers/iio/dac/ltc1660.c
|
||||
|
||||
LTC2688 IIO DAC DRIVER
|
||||
M: Nuno Sá <nuno.sa@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
F: Documentation/ABI/testing/sysfs-bus-iio-dac-ltc2688
|
||||
F: Documentation/devicetree/bindings/iio/dac/adi,ltc2688.yaml
|
||||
F: drivers/iio/dac/ltc2688.c
|
||||
|
||||
LTC2947 HARDWARE MONITOR DRIVER
|
||||
M: Nuno Sá <nuno.sa@analog.com>
|
||||
L: linux-hwmon@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/hwmon/adi,ltc2947.yaml
|
||||
F: drivers/hwmon/ltc2947-core.c
|
||||
F: drivers/hwmon/ltc2947-i2c.c
|
||||
|
@ -11315,7 +11382,7 @@ LTC2983 IIO TEMPERATURE DRIVER
|
|||
M: Nuno Sá <nuno.sa@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
|
||||
F: drivers/iio/temperature/ltc2983.c
|
||||
|
||||
|
@ -11330,7 +11397,7 @@ LTC4306 I2C MULTIPLEXER DRIVER
|
|||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/i2c/i2c-mux-ltc4306.txt
|
||||
F: drivers/i2c/muxes/i2c-mux-ltc4306.c
|
||||
|
||||
|
|
|
@ -123,6 +123,33 @@ config ADXL355_SPI
|
|||
will be called adxl355_spi and you will also get adxl355_core
|
||||
for the core module.
|
||||
|
||||
config ADXL367
|
||||
tristate
|
||||
select IIO_BUFFER
|
||||
select IIO_TRIGGERED_BUFFER
|
||||
|
||||
config ADXL367_SPI
|
||||
tristate "Analog Devices ADXL367 3-Axis Accelerometer SPI Driver"
|
||||
depends on SPI
|
||||
select ADXL367
|
||||
select REGMAP_SPI
|
||||
help
|
||||
Say yes here to add support for the Analog Devices ADXL367 triaxial
|
||||
acceleration sensor.
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called adxl367_spi.
|
||||
|
||||
config ADXL367_I2C
|
||||
tristate "Analog Devices ADXL367 3-Axis Accelerometer I2C Driver"
|
||||
depends on I2C
|
||||
select ADXL367
|
||||
select REGMAP_I2C
|
||||
help
|
||||
Say yes here to add support for the Analog Devices ADXL367 triaxial
|
||||
acceleration sensor.
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called adxl367_i2c.
|
||||
|
||||
config ADXL372
|
||||
tristate
|
||||
select IIO_BUFFER
|
||||
|
@ -349,8 +376,6 @@ config IIO_ST_ACCEL_3AXIS
|
|||
depends on !SENSORS_LIS3_I2C
|
||||
depends on !SENSORS_LIS3_SPI
|
||||
select IIO_ST_SENSORS_CORE
|
||||
select IIO_ST_ACCEL_I2C_3AXIS if (I2C)
|
||||
select IIO_ST_ACCEL_SPI_3AXIS if (SPI_MASTER)
|
||||
select IIO_TRIGGERED_BUFFER if (IIO_BUFFER)
|
||||
help
|
||||
Say yes here to build support for STMicroelectronics accelerometers:
|
||||
|
@ -358,23 +383,30 @@ config IIO_ST_ACCEL_3AXIS
|
|||
LIS331DLH, LSM303DL, LSM303DLM, LSM330, LIS2DH12, H3LIS331DL,
|
||||
LNG2DM, LIS3DE, LIS2DE12, LIS2HH12
|
||||
|
||||
This driver can also be built as a module. If so, these modules
|
||||
will be created:
|
||||
- st_accel (core functions for the driver [it is mandatory]);
|
||||
- st_accel_i2c (necessary for the I2C devices [optional*]);
|
||||
- st_accel_spi (necessary for the SPI devices [optional*]);
|
||||
|
||||
(*) one of these is necessary to do something.
|
||||
Also need to enable at least one of I2C and SPI interface drivers
|
||||
below.
|
||||
|
||||
config IIO_ST_ACCEL_I2C_3AXIS
|
||||
tristate
|
||||
depends on IIO_ST_ACCEL_3AXIS
|
||||
depends on IIO_ST_SENSORS_I2C
|
||||
tristate "STMicroelectronics accelerometers 3-Axis I2C Interface"
|
||||
depends on I2C && IIO_ST_ACCEL_3AXIS
|
||||
default I2C && IIO_ST_ACCEL_3AXIS
|
||||
select IIO_ST_SENSORS_I2C
|
||||
help
|
||||
Build support for STMicroelectronics accelerometers I2C interface.
|
||||
|
||||
To compile this driver as a module, choose M here. The module
|
||||
will be called st_accel_i2c.
|
||||
|
||||
config IIO_ST_ACCEL_SPI_3AXIS
|
||||
tristate
|
||||
depends on IIO_ST_ACCEL_3AXIS
|
||||
depends on IIO_ST_SENSORS_SPI
|
||||
tristate "STMicroelectronics accelerometers 3-Axis SPI Interface"
|
||||
depends on SPI_MASTER && IIO_ST_ACCEL_3AXIS
|
||||
default SPI_MASTER && IIO_ST_ACCEL_3AXIS
|
||||
select IIO_ST_SENSORS_SPI
|
||||
help
|
||||
Build support for STMicroelectronics accelerometers SPI interface.
|
||||
|
||||
To compile this driver as a module, choose M here. The module
|
||||
will be called st_accel_spi.
|
||||
|
||||
config KXSD9
|
||||
tristate "Kionix KXSD9 Accelerometer Driver"
|
||||
|
|
|
@ -15,6 +15,9 @@ obj-$(CONFIG_ADXL345_SPI) += adxl345_spi.o
|
|||
obj-$(CONFIG_ADXL355) += adxl355_core.o
|
||||
obj-$(CONFIG_ADXL355_I2C) += adxl355_i2c.o
|
||||
obj-$(CONFIG_ADXL355_SPI) += adxl355_spi.o
|
||||
obj-$(CONFIG_ADXL367) += adxl367.o
|
||||
obj-$(CONFIG_ADXL367_I2C) += adxl367_i2c.o
|
||||
obj-$(CONFIG_ADXL367_SPI) += adxl367_spi.o
|
||||
obj-$(CONFIG_ADXL372) += adxl372.o
|
||||
obj-$(CONFIG_ADXL372_I2C) += adxl372_i2c.o
|
||||
obj-$(CONFIG_ADXL372_SPI) += adxl372_spi.o
|
||||
|
|
|
@ -300,3 +300,4 @@ MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
|
|||
MODULE_DESCRIPTION("Analog Devices ADIS16201 Dual-Axis Digital Inclinometer and Accelerometer");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS("spi:adis16201");
|
||||
MODULE_IMPORT_NS(IIO_ADISLIB);
|
||||
|
|
|
@ -310,3 +310,4 @@ MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
|
|||
MODULE_DESCRIPTION("Analog Devices ADIS16209 Dual-Axis Digital Inclinometer and Accelerometer");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS("spi:adis16209");
|
||||
MODULE_IMPORT_NS(IIO_ADISLIB);
|
||||
|
|
|
@ -26,7 +26,7 @@ const struct regmap_access_table adxl313_readable_regs_table = {
|
|||
.yes_ranges = adxl313_readable_reg_range,
|
||||
.n_yes_ranges = ARRAY_SIZE(adxl313_readable_reg_range),
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(adxl313_readable_regs_table);
|
||||
EXPORT_SYMBOL_NS_GPL(adxl313_readable_regs_table, IIO_ADXL313);
|
||||
|
||||
static const struct regmap_range adxl313_writable_reg_range[] = {
|
||||
regmap_reg_range(ADXL313_REG_SOFT_RESET, ADXL313_REG_SOFT_RESET),
|
||||
|
@ -41,7 +41,7 @@ const struct regmap_access_table adxl313_writable_regs_table = {
|
|||
.yes_ranges = adxl313_writable_reg_range,
|
||||
.n_yes_ranges = ARRAY_SIZE(adxl313_writable_reg_range),
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(adxl313_writable_regs_table);
|
||||
EXPORT_SYMBOL_NS_GPL(adxl313_writable_regs_table, IIO_ADXL313);
|
||||
|
||||
struct adxl313_data {
|
||||
struct regmap *regmap;
|
||||
|
@ -325,7 +325,7 @@ int adxl313_core_probe(struct device *dev,
|
|||
|
||||
return devm_iio_device_register(dev, indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(adxl313_core_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(adxl313_core_probe, IIO_ADXL313);
|
||||
|
||||
MODULE_AUTHOR("Lucas Stankus <lucas.p.stankus@gmail.com>");
|
||||
MODULE_DESCRIPTION("ADXL313 3-Axis Digital Accelerometer core driver");
|
||||
|
|
|
@ -64,3 +64,4 @@ module_i2c_driver(adxl313_i2c_driver);
|
|||
MODULE_AUTHOR("Lucas Stankus <lucas.p.stankus@gmail.com>");
|
||||
MODULE_DESCRIPTION("ADXL313 3-Axis Digital Accelerometer I2C driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_ADXL313);
|
||||
|
|
|
@ -90,3 +90,4 @@ module_spi_driver(adxl313_spi_driver);
|
|||
MODULE_AUTHOR("Lucas Stankus <lucas.p.stankus@gmail.com>");
|
||||
MODULE_DESCRIPTION("ADXL313 3-Axis Digital Accelerometer SPI driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_ADXL313);
|
||||
|
|
|
@ -9,11 +9,10 @@
|
|||
#define _ADXL345_H_
|
||||
|
||||
enum adxl345_device_type {
|
||||
ADXL345,
|
||||
ADXL375,
|
||||
ADXL345 = 1,
|
||||
ADXL375 = 2,
|
||||
};
|
||||
|
||||
int adxl345_core_probe(struct device *dev, struct regmap *regmap,
|
||||
enum adxl345_device_type type, const char *name);
|
||||
int adxl345_core_probe(struct device *dev, struct regmap *regmap);
|
||||
|
||||
#endif /* _ADXL345_H_ */
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include <linux/iio/iio.h>
|
||||
|
@ -194,7 +195,7 @@ static IIO_CONST_ATTR_SAMP_FREQ_AVAIL(
|
|||
|
||||
static struct attribute *adxl345_attrs[] = {
|
||||
&iio_const_attr_sampling_frequency_available.dev_attr.attr,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const struct attribute_group adxl345_attrs_group = {
|
||||
|
@ -208,30 +209,44 @@ static const struct iio_info adxl345_info = {
|
|||
.write_raw_get_fmt = adxl345_write_raw_get_fmt,
|
||||
};
|
||||
|
||||
static int adxl345_powerup(void *regmap)
|
||||
{
|
||||
return regmap_write(regmap, ADXL345_REG_POWER_CTL, ADXL345_POWER_CTL_MEASURE);
|
||||
}
|
||||
|
||||
static void adxl345_powerdown(void *regmap)
|
||||
{
|
||||
regmap_write(regmap, ADXL345_REG_POWER_CTL, ADXL345_POWER_CTL_STANDBY);
|
||||
}
|
||||
|
||||
int adxl345_core_probe(struct device *dev, struct regmap *regmap,
|
||||
enum adxl345_device_type type, const char *name)
|
||||
int adxl345_core_probe(struct device *dev, struct regmap *regmap)
|
||||
{
|
||||
enum adxl345_device_type type;
|
||||
struct adxl345_data *data;
|
||||
struct iio_dev *indio_dev;
|
||||
const char *name;
|
||||
u32 regval;
|
||||
int ret;
|
||||
|
||||
ret = regmap_read(regmap, ADXL345_REG_DEVID, ®val);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Error reading device ID: %d\n", ret);
|
||||
return ret;
|
||||
type = (uintptr_t)device_get_match_data(dev);
|
||||
switch (type) {
|
||||
case ADXL345:
|
||||
name = "adxl345";
|
||||
break;
|
||||
case ADXL375:
|
||||
name = "adxl375";
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (regval != ADXL345_DEVID) {
|
||||
dev_err(dev, "Invalid device ID: %x, expected %x\n",
|
||||
regval, ADXL345_DEVID);
|
||||
return -ENODEV;
|
||||
}
|
||||
ret = regmap_read(regmap, ADXL345_REG_DEVID, ®val);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(dev, ret, "Error reading device ID\n");
|
||||
|
||||
if (regval != ADXL345_DEVID)
|
||||
return dev_err_probe(dev, -ENODEV, "Invalid device ID: %x, expected %x\n",
|
||||
regval, ADXL345_DEVID);
|
||||
|
||||
indio_dev = devm_iio_device_alloc(dev, sizeof(*data));
|
||||
if (!indio_dev)
|
||||
|
@ -245,10 +260,8 @@ int adxl345_core_probe(struct device *dev, struct regmap *regmap,
|
|||
|
||||
ret = regmap_write(data->regmap, ADXL345_REG_DATA_FORMAT,
|
||||
data->data_range);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Failed to set data range: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
if (ret < 0)
|
||||
return dev_err_probe(dev, ret, "Failed to set data range\n");
|
||||
|
||||
indio_dev->name = name;
|
||||
indio_dev->info = &adxl345_info;
|
||||
|
@ -257,12 +270,9 @@ int adxl345_core_probe(struct device *dev, struct regmap *regmap,
|
|||
indio_dev->num_channels = ARRAY_SIZE(adxl345_channels);
|
||||
|
||||
/* Enable measurement mode */
|
||||
ret = regmap_write(data->regmap, ADXL345_REG_POWER_CTL,
|
||||
ADXL345_POWER_CTL_MEASURE);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Failed to enable measurement mode: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
ret = adxl345_powerup(data->regmap);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(dev, ret, "Failed to enable measurement mode\n");
|
||||
|
||||
ret = devm_add_action_or_reset(dev, adxl345_powerdown, data->regmap);
|
||||
if (ret < 0)
|
||||
|
@ -270,7 +280,7 @@ int adxl345_core_probe(struct device *dev, struct regmap *regmap,
|
|||
|
||||
return devm_iio_device_register(dev, indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(adxl345_core_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(adxl345_core_probe, IIO_ADXL345);
|
||||
|
||||
MODULE_AUTHOR("Eva Rachel Retuya <eraretuya@gmail.com>");
|
||||
MODULE_DESCRIPTION("ADXL345 3-Axis Digital Accelerometer core driver");
|
||||
|
|
|
@ -19,23 +19,15 @@ static const struct regmap_config adxl345_i2c_regmap_config = {
|
|||
.val_bits = 8,
|
||||
};
|
||||
|
||||
static int adxl345_i2c_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
static int adxl345_i2c_probe(struct i2c_client *client)
|
||||
{
|
||||
struct regmap *regmap;
|
||||
|
||||
if (!id)
|
||||
return -ENODEV;
|
||||
|
||||
regmap = devm_regmap_init_i2c(client, &adxl345_i2c_regmap_config);
|
||||
if (IS_ERR(regmap)) {
|
||||
dev_err(&client->dev, "Error initializing i2c regmap: %ld\n",
|
||||
PTR_ERR(regmap));
|
||||
return PTR_ERR(regmap);
|
||||
}
|
||||
if (IS_ERR(regmap))
|
||||
return dev_err_probe(&client->dev, PTR_ERR(regmap), "Error initializing regmap\n");
|
||||
|
||||
return adxl345_core_probe(&client->dev, regmap, id->driver_data,
|
||||
id->name);
|
||||
return adxl345_core_probe(&client->dev, regmap);
|
||||
}
|
||||
|
||||
static const struct i2c_device_id adxl345_i2c_id[] = {
|
||||
|
@ -43,28 +35,33 @@ static const struct i2c_device_id adxl345_i2c_id[] = {
|
|||
{ "adxl375", ADXL375 },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(i2c, adxl345_i2c_id);
|
||||
|
||||
static const struct of_device_id adxl345_of_match[] = {
|
||||
{ .compatible = "adi,adxl345" },
|
||||
{ .compatible = "adi,adxl375" },
|
||||
{ },
|
||||
{ .compatible = "adi,adxl345", .data = (const void *)ADXL345 },
|
||||
{ .compatible = "adi,adxl375", .data = (const void *)ADXL375 },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, adxl345_of_match);
|
||||
|
||||
static const struct acpi_device_id adxl345_acpi_match[] = {
|
||||
{ "ADS0345", ADXL345 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, adxl345_acpi_match);
|
||||
|
||||
static struct i2c_driver adxl345_i2c_driver = {
|
||||
.driver = {
|
||||
.name = "adxl345_i2c",
|
||||
.of_match_table = adxl345_of_match,
|
||||
.acpi_match_table = adxl345_acpi_match,
|
||||
},
|
||||
.probe = adxl345_i2c_probe,
|
||||
.probe_new = adxl345_i2c_probe,
|
||||
.id_table = adxl345_i2c_id,
|
||||
};
|
||||
|
||||
module_i2c_driver(adxl345_i2c_driver);
|
||||
|
||||
MODULE_AUTHOR("Eva Rachel Retuya <eraretuya@gmail.com>");
|
||||
MODULE_DESCRIPTION("ADXL345 3-Axis Digital Accelerometer I2C driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_ADXL345);
|
||||
|
|
|
@ -22,24 +22,18 @@ static const struct regmap_config adxl345_spi_regmap_config = {
|
|||
|
||||
static int adxl345_spi_probe(struct spi_device *spi)
|
||||
{
|
||||
const struct spi_device_id *id = spi_get_device_id(spi);
|
||||
struct regmap *regmap;
|
||||
|
||||
/* Bail out if max_speed_hz exceeds 5 MHz */
|
||||
if (spi->max_speed_hz > ADXL345_MAX_SPI_FREQ_HZ) {
|
||||
dev_err(&spi->dev, "SPI CLK, %d Hz exceeds 5 MHz\n",
|
||||
spi->max_speed_hz);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (spi->max_speed_hz > ADXL345_MAX_SPI_FREQ_HZ)
|
||||
return dev_err_probe(&spi->dev, -EINVAL, "SPI CLK, %d Hz exceeds 5 MHz\n",
|
||||
spi->max_speed_hz);
|
||||
|
||||
regmap = devm_regmap_init_spi(spi, &adxl345_spi_regmap_config);
|
||||
if (IS_ERR(regmap)) {
|
||||
dev_err(&spi->dev, "Error initializing spi regmap: %ld\n",
|
||||
PTR_ERR(regmap));
|
||||
return PTR_ERR(regmap);
|
||||
}
|
||||
if (IS_ERR(regmap))
|
||||
return dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error initializing regmap\n");
|
||||
|
||||
return adxl345_core_probe(&spi->dev, regmap, id->driver_data, id->name);
|
||||
return adxl345_core_probe(&spi->dev, regmap);
|
||||
}
|
||||
|
||||
static const struct spi_device_id adxl345_spi_id[] = {
|
||||
|
@ -47,28 +41,33 @@ static const struct spi_device_id adxl345_spi_id[] = {
|
|||
{ "adxl375", ADXL375 },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(spi, adxl345_spi_id);
|
||||
|
||||
static const struct of_device_id adxl345_of_match[] = {
|
||||
{ .compatible = "adi,adxl345" },
|
||||
{ .compatible = "adi,adxl375" },
|
||||
{ },
|
||||
{ .compatible = "adi,adxl345", .data = (const void *)ADXL345 },
|
||||
{ .compatible = "adi,adxl375", .data = (const void *)ADXL375 },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, adxl345_of_match);
|
||||
|
||||
static const struct acpi_device_id adxl345_acpi_match[] = {
|
||||
{ "ADS0345", ADXL345 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, adxl345_acpi_match);
|
||||
|
||||
static struct spi_driver adxl345_spi_driver = {
|
||||
.driver = {
|
||||
.name = "adxl345_spi",
|
||||
.of_match_table = adxl345_of_match,
|
||||
.acpi_match_table = adxl345_acpi_match,
|
||||
},
|
||||
.probe = adxl345_spi_probe,
|
||||
.id_table = adxl345_spi_id,
|
||||
};
|
||||
|
||||
module_spi_driver(adxl345_spi_driver);
|
||||
|
||||
MODULE_AUTHOR("Eva Rachel Retuya <eraretuya@gmail.com>");
|
||||
MODULE_DESCRIPTION("ADXL345 3-Axis Digital Accelerometer SPI driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_ADXL345);
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/units.h>
|
||||
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include "adxl355.h"
|
||||
|
@ -60,9 +62,6 @@
|
|||
#define ADXL355_PARTID_VAL 0xED
|
||||
#define ADXL355_RESET_CODE 0x52
|
||||
|
||||
#define MEGA 1000000UL
|
||||
#define TERA 1000000000000ULL
|
||||
|
||||
static const struct regmap_range adxl355_read_reg_range[] = {
|
||||
regmap_reg_range(ADXL355_DEVID_AD_REG, ADXL355_FIFO_DATA_REG),
|
||||
regmap_reg_range(ADXL355_OFFSET_X_H_REG, ADXL355_SELF_TEST_REG),
|
||||
|
@ -72,7 +71,7 @@ const struct regmap_access_table adxl355_readable_regs_tbl = {
|
|||
.yes_ranges = adxl355_read_reg_range,
|
||||
.n_yes_ranges = ARRAY_SIZE(adxl355_read_reg_range),
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(adxl355_readable_regs_tbl);
|
||||
EXPORT_SYMBOL_NS_GPL(adxl355_readable_regs_tbl, IIO_ADXL355);
|
||||
|
||||
static const struct regmap_range adxl355_write_reg_range[] = {
|
||||
regmap_reg_range(ADXL355_OFFSET_X_H_REG, ADXL355_RESET_REG),
|
||||
|
@ -82,7 +81,7 @@ const struct regmap_access_table adxl355_writeable_regs_tbl = {
|
|||
.yes_ranges = adxl355_write_reg_range,
|
||||
.n_yes_ranges = ARRAY_SIZE(adxl355_write_reg_range),
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(adxl355_writeable_regs_tbl);
|
||||
EXPORT_SYMBOL_NS_GPL(adxl355_writeable_regs_tbl, IIO_ADXL355);
|
||||
|
||||
enum adxl355_op_mode {
|
||||
ADXL355_MEASUREMENT,
|
||||
|
@ -758,7 +757,7 @@ int adxl355_core_probe(struct device *dev, struct regmap *regmap,
|
|||
|
||||
return devm_iio_device_register(dev, indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(adxl355_core_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(adxl355_core_probe, IIO_ADXL355);
|
||||
|
||||
MODULE_AUTHOR("Puranjay Mohan <puranjay12@gmail.com>");
|
||||
MODULE_DESCRIPTION("ADXL355 3-Axis Digital Accelerometer core driver");
|
||||
|
|
|
@ -60,3 +60,4 @@ module_i2c_driver(adxl355_i2c_driver);
|
|||
MODULE_AUTHOR("Puranjay Mohan <puranjay12@gmail.com>");
|
||||
MODULE_DESCRIPTION("ADXL355 3-Axis Digital Accelerometer I2C driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_ADXL355);
|
||||
|
|
|
@ -63,3 +63,4 @@ module_spi_driver(adxl355_spi_driver);
|
|||
MODULE_AUTHOR("Puranjay Mohan <puranjay12@gmail.com>");
|
||||
MODULE_DESCRIPTION("ADXL355 3-Axis Digital Accelerometer SPI driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_ADXL355);
|
||||
|
|
1588
drivers/iio/accel/adxl367.c
Normal file
1588
drivers/iio/accel/adxl367.c
Normal file
File diff suppressed because it is too large
Load diff
23
drivers/iio/accel/adxl367.h
Normal file
23
drivers/iio/accel/adxl367.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2021 Analog Devices, Inc.
|
||||
* Author: Cosmin Tanislav <cosmin.tanislav@analog.com>
|
||||
*/
|
||||
|
||||
#ifndef _ADXL367_H_
|
||||
#define _ADXL367_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct device;
|
||||
struct regmap;
|
||||
|
||||
struct adxl367_ops {
|
||||
int (*read_fifo)(void *context, __be16 *fifo_buf,
|
||||
unsigned int fifo_entries);
|
||||
};
|
||||
|
||||
int adxl367_probe(struct device *dev, const struct adxl367_ops *ops,
|
||||
void *context, struct regmap *regmap, int irq);
|
||||
|
||||
#endif /* _ADXL367_H_ */
|
90
drivers/iio/accel/adxl367_i2c.c
Normal file
90
drivers/iio/accel/adxl367_i2c.c
Normal file
|
@ -0,0 +1,90 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2021 Analog Devices, Inc.
|
||||
* Author: Cosmin Tanislav <cosmin.tanislav@analog.com>
|
||||
*/
|
||||
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include "adxl367.h"
|
||||
|
||||
#define ADXL367_I2C_FIFO_DATA 0x42
|
||||
|
||||
struct adxl367_i2c_state {
|
||||
struct regmap *regmap;
|
||||
};
|
||||
|
||||
static bool adxl367_readable_noinc_reg(struct device *dev, unsigned int reg)
|
||||
{
|
||||
return reg == ADXL367_I2C_FIFO_DATA;
|
||||
}
|
||||
|
||||
static int adxl367_i2c_read_fifo(void *context, __be16 *fifo_buf,
|
||||
unsigned int fifo_entries)
|
||||
{
|
||||
struct adxl367_i2c_state *st = context;
|
||||
|
||||
return regmap_noinc_read(st->regmap, ADXL367_I2C_FIFO_DATA, fifo_buf,
|
||||
fifo_entries * sizeof(*fifo_buf));
|
||||
}
|
||||
|
||||
static const struct regmap_config adxl367_i2c_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
.readable_noinc_reg = adxl367_readable_noinc_reg,
|
||||
};
|
||||
|
||||
static const struct adxl367_ops adxl367_i2c_ops = {
|
||||
.read_fifo = adxl367_i2c_read_fifo,
|
||||
};
|
||||
|
||||
static int adxl367_i2c_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct adxl367_i2c_state *st;
|
||||
struct regmap *regmap;
|
||||
|
||||
st = devm_kzalloc(&client->dev, sizeof(*st), GFP_KERNEL);
|
||||
if (!st)
|
||||
return -ENOMEM;
|
||||
|
||||
regmap = devm_regmap_init_i2c(client, &adxl367_i2c_regmap_config);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
st->regmap = regmap;
|
||||
|
||||
return adxl367_probe(&client->dev, &adxl367_i2c_ops, st, regmap,
|
||||
client->irq);
|
||||
}
|
||||
|
||||
static const struct i2c_device_id adxl367_i2c_id[] = {
|
||||
{ "adxl367", 0 },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adxl367_i2c_id);
|
||||
|
||||
static const struct of_device_id adxl367_of_match[] = {
|
||||
{ .compatible = "adi,adxl367" },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, adxl367_of_match);
|
||||
|
||||
static struct i2c_driver adxl367_i2c_driver = {
|
||||
.driver = {
|
||||
.name = "adxl367_i2c",
|
||||
.of_match_table = adxl367_of_match,
|
||||
},
|
||||
.probe = adxl367_i2c_probe,
|
||||
.id_table = adxl367_i2c_id,
|
||||
};
|
||||
|
||||
module_i2c_driver(adxl367_i2c_driver);
|
||||
|
||||
MODULE_IMPORT_NS(IIO_ADXL367);
|
||||
MODULE_AUTHOR("Cosmin Tanislav <cosmin.tanislav@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices ADXL367 3-axis accelerometer I2C driver");
|
||||
MODULE_LICENSE("GPL");
|
164
drivers/iio/accel/adxl367_spi.c
Normal file
164
drivers/iio/accel/adxl367_spi.c
Normal file
|
@ -0,0 +1,164 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2021 Analog Devices, Inc.
|
||||
* Author: Cosmin Tanislav <cosmin.tanislav@analog.com>
|
||||
*/
|
||||
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/spi/spi.h>
|
||||
|
||||
#include "adxl367.h"
|
||||
|
||||
#define ADXL367_SPI_WRITE_COMMAND 0x0A
|
||||
#define ADXL367_SPI_READ_COMMAND 0x0B
|
||||
#define ADXL367_SPI_FIFO_COMMAND 0x0D
|
||||
|
||||
struct adxl367_spi_state {
|
||||
struct spi_device *spi;
|
||||
|
||||
struct spi_message reg_write_msg;
|
||||
struct spi_transfer reg_write_xfer[2];
|
||||
|
||||
struct spi_message reg_read_msg;
|
||||
struct spi_transfer reg_read_xfer[2];
|
||||
|
||||
struct spi_message fifo_msg;
|
||||
struct spi_transfer fifo_xfer[2];
|
||||
|
||||
/*
|
||||
* DMA (thus cache coherency maintenance) requires the
|
||||
* transfer buffers to live in their own cache lines.
|
||||
*/
|
||||
u8 reg_write_tx_buf[1] ____cacheline_aligned;
|
||||
u8 reg_read_tx_buf[2];
|
||||
u8 fifo_tx_buf[1];
|
||||
};
|
||||
|
||||
static int adxl367_read_fifo(void *context, __be16 *fifo_buf,
|
||||
unsigned int fifo_entries)
|
||||
{
|
||||
struct adxl367_spi_state *st = context;
|
||||
|
||||
st->fifo_xfer[1].rx_buf = fifo_buf;
|
||||
st->fifo_xfer[1].len = fifo_entries * sizeof(*fifo_buf);
|
||||
|
||||
return spi_sync(st->spi, &st->fifo_msg);
|
||||
}
|
||||
|
||||
static int adxl367_read(void *context, const void *reg_buf, size_t reg_size,
|
||||
void *val_buf, size_t val_size)
|
||||
{
|
||||
struct adxl367_spi_state *st = context;
|
||||
u8 reg = ((const u8 *)reg_buf)[0];
|
||||
|
||||
st->reg_read_tx_buf[1] = reg;
|
||||
st->reg_read_xfer[1].rx_buf = val_buf;
|
||||
st->reg_read_xfer[1].len = val_size;
|
||||
|
||||
return spi_sync(st->spi, &st->reg_read_msg);
|
||||
}
|
||||
|
||||
static int adxl367_write(void *context, const void *val_buf, size_t val_size)
|
||||
{
|
||||
struct adxl367_spi_state *st = context;
|
||||
|
||||
st->reg_write_xfer[1].tx_buf = val_buf;
|
||||
st->reg_write_xfer[1].len = val_size;
|
||||
|
||||
return spi_sync(st->spi, &st->reg_write_msg);
|
||||
}
|
||||
|
||||
static struct regmap_bus adxl367_spi_regmap_bus = {
|
||||
.read = adxl367_read,
|
||||
.write = adxl367_write,
|
||||
};
|
||||
|
||||
static const struct regmap_config adxl367_spi_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
};
|
||||
|
||||
static const struct adxl367_ops adxl367_spi_ops = {
|
||||
.read_fifo = adxl367_read_fifo,
|
||||
};
|
||||
|
||||
static int adxl367_spi_probe(struct spi_device *spi)
|
||||
{
|
||||
struct adxl367_spi_state *st;
|
||||
struct regmap *regmap;
|
||||
|
||||
st = devm_kzalloc(&spi->dev, sizeof(*st), GFP_KERNEL);
|
||||
if (!st)
|
||||
return -ENOMEM;
|
||||
|
||||
st->spi = spi;
|
||||
|
||||
/*
|
||||
* Xfer: [XFR1] [ XFR2 ]
|
||||
* Master: 0x0A ADDR DATA0 DATA1 ... DATAN
|
||||
* Slave: .... ..........................
|
||||
*/
|
||||
st->reg_write_tx_buf[0] = ADXL367_SPI_WRITE_COMMAND;
|
||||
st->reg_write_xfer[0].tx_buf = st->reg_write_tx_buf;
|
||||
st->reg_write_xfer[0].len = sizeof(st->reg_write_tx_buf);
|
||||
spi_message_init_with_transfers(&st->reg_write_msg,
|
||||
st->reg_write_xfer, 2);
|
||||
|
||||
/*
|
||||
* Xfer: [ XFR1 ] [ XFR2 ]
|
||||
* Master: 0x0B ADDR .....................
|
||||
* Slave: ......... DATA0 DATA1 ... DATAN
|
||||
*/
|
||||
st->reg_read_tx_buf[0] = ADXL367_SPI_READ_COMMAND;
|
||||
st->reg_read_xfer[0].tx_buf = st->reg_read_tx_buf;
|
||||
st->reg_read_xfer[0].len = sizeof(st->reg_read_tx_buf);
|
||||
spi_message_init_with_transfers(&st->reg_read_msg,
|
||||
st->reg_read_xfer, 2);
|
||||
|
||||
/*
|
||||
* Xfer: [XFR1] [ XFR2 ]
|
||||
* Master: 0x0D .....................
|
||||
* Slave: .... DATA0 DATA1 ... DATAN
|
||||
*/
|
||||
st->fifo_tx_buf[0] = ADXL367_SPI_FIFO_COMMAND;
|
||||
st->fifo_xfer[0].tx_buf = st->fifo_tx_buf;
|
||||
st->fifo_xfer[0].len = sizeof(st->fifo_tx_buf);
|
||||
spi_message_init_with_transfers(&st->fifo_msg, st->fifo_xfer, 2);
|
||||
|
||||
regmap = devm_regmap_init(&spi->dev, &adxl367_spi_regmap_bus, st,
|
||||
&adxl367_spi_regmap_config);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
return adxl367_probe(&spi->dev, &adxl367_spi_ops, st, regmap, spi->irq);
|
||||
}
|
||||
|
||||
static const struct spi_device_id adxl367_spi_id[] = {
|
||||
{ "adxl367", 0 },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, adxl367_spi_id);
|
||||
|
||||
static const struct of_device_id adxl367_of_match[] = {
|
||||
{ .compatible = "adi,adxl367" },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, adxl367_of_match);
|
||||
|
||||
static struct spi_driver adxl367_spi_driver = {
|
||||
.driver = {
|
||||
.name = "adxl367_spi",
|
||||
.of_match_table = adxl367_of_match,
|
||||
},
|
||||
.probe = adxl367_spi_probe,
|
||||
.id_table = adxl367_spi_id,
|
||||
};
|
||||
|
||||
module_spi_driver(adxl367_spi_driver);
|
||||
|
||||
MODULE_IMPORT_NS(IIO_ADXL367);
|
||||
MODULE_AUTHOR("Cosmin Tanislav <cosmin.tanislav@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices ADXL367 3-axis accelerometer SPI driver");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -1176,7 +1176,7 @@ bool adxl372_readable_noinc_reg(struct device *dev, unsigned int reg)
|
|||
{
|
||||
return (reg == ADXL372_FIFO_DATA);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(adxl372_readable_noinc_reg);
|
||||
EXPORT_SYMBOL_NS_GPL(adxl372_readable_noinc_reg, IIO_ADXL372);
|
||||
|
||||
int adxl372_probe(struct device *dev, struct regmap *regmap,
|
||||
int irq, const char *name)
|
||||
|
@ -1260,7 +1260,7 @@ int adxl372_probe(struct device *dev, struct regmap *regmap,
|
|||
|
||||
return devm_iio_device_register(dev, indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(adxl372_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(adxl372_probe, IIO_ADXL372);
|
||||
|
||||
MODULE_AUTHOR("Stefan Popa <stefan.popa@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices ADXL372 3-axis accelerometer driver");
|
||||
|
|
|
@ -67,3 +67,4 @@ module_i2c_driver(adxl372_i2c_driver);
|
|||
MODULE_AUTHOR("Stefan Popa <stefan.popa@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices ADXL372 3-axis accelerometer I2C driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(IIO_ADXL372);
|
||||
|
|
|
@ -59,3 +59,4 @@ module_spi_driver(adxl372_spi_driver);
|
|||
MODULE_AUTHOR("Stefan Popa <stefan.popa@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices ADXL372 3-axis accelerometer SPI driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(IIO_ADXL372);
|
||||
|
|
|
@ -1065,7 +1065,6 @@ static int bma180_remove(struct i2c_client *client)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int bma180_suspend(struct device *dev)
|
||||
{
|
||||
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
|
||||
|
@ -1092,11 +1091,7 @@ static int bma180_resume(struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(bma180_pm_ops, bma180_suspend, bma180_resume);
|
||||
#define BMA180_PM_OPS (&bma180_pm_ops)
|
||||
#else
|
||||
#define BMA180_PM_OPS NULL
|
||||
#endif
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(bma180_pm_ops, bma180_suspend, bma180_resume);
|
||||
|
||||
static const struct i2c_device_id bma180_ids[] = {
|
||||
{ "bma023", BMA023 },
|
||||
|
@ -1137,7 +1132,7 @@ MODULE_DEVICE_TABLE(of, bma180_of_match);
|
|||
static struct i2c_driver bma180_driver = {
|
||||
.driver = {
|
||||
.name = "bma180",
|
||||
.pm = BMA180_PM_OPS,
|
||||
.pm = pm_sleep_ptr(&bma180_pm_ops),
|
||||
.of_match_table = bma180_of_match,
|
||||
},
|
||||
.probe = bma180_probe,
|
||||
|
|
|
@ -136,7 +136,7 @@ const struct regmap_config bma400_regmap_config = {
|
|||
.writeable_reg = bma400_is_writable_reg,
|
||||
.volatile_reg = bma400_is_volatile_reg,
|
||||
};
|
||||
EXPORT_SYMBOL(bma400_regmap_config);
|
||||
EXPORT_SYMBOL_NS(bma400_regmap_config, IIO_BMA400);
|
||||
|
||||
static const struct iio_mount_matrix *
|
||||
bma400_accel_get_mount_matrix(const struct iio_dev *indio_dev,
|
||||
|
@ -826,7 +826,7 @@ int bma400_probe(struct device *dev, struct regmap *regmap, const char *name)
|
|||
|
||||
return iio_device_register(indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL(bma400_probe);
|
||||
EXPORT_SYMBOL_NS(bma400_probe, IIO_BMA400);
|
||||
|
||||
void bma400_remove(struct device *dev)
|
||||
{
|
||||
|
@ -846,7 +846,7 @@ void bma400_remove(struct device *dev)
|
|||
|
||||
iio_device_unregister(indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL(bma400_remove);
|
||||
EXPORT_SYMBOL_NS(bma400_remove, IIO_BMA400);
|
||||
|
||||
MODULE_AUTHOR("Dan Robertson <dan@dlrobertson.com>");
|
||||
MODULE_DESCRIPTION("Bosch BMA400 triaxial acceleration sensor core");
|
||||
|
|
|
@ -61,3 +61,4 @@ module_i2c_driver(bma400_i2c_driver);
|
|||
MODULE_AUTHOR("Dan Robertson <dan@dlrobertson.com>");
|
||||
MODULE_DESCRIPTION("Bosch BMA400 triaxial acceleration sensor (I2C)");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(IIO_BMA400);
|
||||
|
|
|
@ -120,3 +120,4 @@ module_spi_driver(bma400_spi_driver);
|
|||
MODULE_AUTHOR("Dan Robertson <dan@dlrobertson.com>");
|
||||
MODULE_DESCRIPTION("Bosch BMA400 triaxial acceleration sensor (SPI)");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(IIO_BMA400);
|
||||
|
|
|
@ -203,7 +203,7 @@ const struct regmap_config bmc150_regmap_conf = {
|
|||
.val_bits = 8,
|
||||
.max_register = 0x3f,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bmc150_regmap_conf);
|
||||
EXPORT_SYMBOL_NS_GPL(bmc150_regmap_conf, IIO_BMC150);
|
||||
|
||||
static int bmc150_accel_set_mode(struct bmc150_accel_data *data,
|
||||
enum bmc150_power_modes mode,
|
||||
|
@ -1801,7 +1801,7 @@ int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bmc150_accel_core_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(bmc150_accel_core_probe, IIO_BMC150);
|
||||
|
||||
void bmc150_accel_core_remove(struct device *dev)
|
||||
{
|
||||
|
@ -1824,7 +1824,7 @@ void bmc150_accel_core_remove(struct device *dev)
|
|||
regulator_bulk_disable(ARRAY_SIZE(data->regulators),
|
||||
data->regulators);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bmc150_accel_core_remove);
|
||||
EXPORT_SYMBOL_NS_GPL(bmc150_accel_core_remove, IIO_BMC150);
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int bmc150_accel_suspend(struct device *dev)
|
||||
|
@ -1899,7 +1899,7 @@ const struct dev_pm_ops bmc150_accel_pm_ops = {
|
|||
SET_RUNTIME_PM_OPS(bmc150_accel_runtime_suspend,
|
||||
bmc150_accel_runtime_resume, NULL)
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bmc150_accel_pm_ops);
|
||||
EXPORT_SYMBOL_NS_GPL(bmc150_accel_pm_ops, IIO_BMC150);
|
||||
|
||||
MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
|
|
@ -280,3 +280,4 @@ module_i2c_driver(bmc150_accel_driver);
|
|||
MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DESCRIPTION("BMC150 I2C accelerometer driver");
|
||||
MODULE_IMPORT_NS(IIO_BMC150);
|
||||
|
|
|
@ -84,3 +84,4 @@ module_spi_driver(bmc150_accel_driver);
|
|||
MODULE_AUTHOR("Markus Pargmann <mpa@pengutronix.de>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DESCRIPTION("BMC150 SPI accelerometer driver");
|
||||
MODULE_IMPORT_NS(IIO_BMC150);
|
||||
|
|
|
@ -146,7 +146,7 @@ const struct regmap_config bmi088_regmap_conf = {
|
|||
.volatile_table = &bmi088_volatile_table,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bmi088_regmap_conf);
|
||||
EXPORT_SYMBOL_NS_GPL(bmi088_regmap_conf, IIO_BMI088);
|
||||
|
||||
static int bmi088_accel_power_up(struct bmi088_accel_data *data)
|
||||
{
|
||||
|
@ -533,7 +533,7 @@ int bmi088_accel_core_probe(struct device *dev, struct regmap *regmap,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bmi088_accel_core_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(bmi088_accel_core_probe, IIO_BMI088);
|
||||
|
||||
|
||||
void bmi088_accel_core_remove(struct device *dev)
|
||||
|
@ -547,7 +547,7 @@ void bmi088_accel_core_remove(struct device *dev)
|
|||
pm_runtime_set_suspended(dev);
|
||||
bmi088_accel_power_down(data);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bmi088_accel_core_remove);
|
||||
EXPORT_SYMBOL_NS_GPL(bmi088_accel_core_remove, IIO_BMI088);
|
||||
|
||||
static int __maybe_unused bmi088_accel_runtime_suspend(struct device *dev)
|
||||
{
|
||||
|
@ -571,7 +571,7 @@ const struct dev_pm_ops bmi088_accel_pm_ops = {
|
|||
SET_RUNTIME_PM_OPS(bmi088_accel_runtime_suspend,
|
||||
bmi088_accel_runtime_resume, NULL)
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bmi088_accel_pm_ops);
|
||||
EXPORT_SYMBOL_NS_GPL(bmi088_accel_pm_ops, IIO_BMI088);
|
||||
|
||||
MODULE_AUTHOR("Niek van Agt <niek.van.agt@topicproducts.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
|
|
@ -83,3 +83,4 @@ module_spi_driver(bmi088_accel_driver);
|
|||
MODULE_AUTHOR("Niek van Agt <niek.van.agt@topicproducts.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DESCRIPTION("BMI088 accelerometer driver (SPI)");
|
||||
MODULE_IMPORT_NS(IIO_BMI088);
|
||||
|
|
|
@ -153,7 +153,6 @@ static int da280_probe(struct i2c_client *client,
|
|||
return devm_iio_device_register(&client->dev, indio_dev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int da280_suspend(struct device *dev)
|
||||
{
|
||||
return da280_enable(to_i2c_client(dev), false);
|
||||
|
@ -163,9 +162,8 @@ static int da280_resume(struct device *dev)
|
|||
{
|
||||
return da280_enable(to_i2c_client(dev), true);
|
||||
}
|
||||
#endif
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(da280_pm_ops, da280_suspend, da280_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(da280_pm_ops, da280_suspend, da280_resume);
|
||||
|
||||
static const struct acpi_device_id da280_acpi_match[] = {
|
||||
{"MIRAACC", da280},
|
||||
|
@ -184,7 +182,7 @@ static struct i2c_driver da280_driver = {
|
|||
.driver = {
|
||||
.name = "da280",
|
||||
.acpi_match_table = ACPI_PTR(da280_acpi_match),
|
||||
.pm = &da280_pm_ops,
|
||||
.pm = pm_sleep_ptr(&da280_pm_ops),
|
||||
},
|
||||
.probe = da280_probe,
|
||||
.id_table = da280_i2c_id,
|
||||
|
|
|
@ -256,7 +256,6 @@ static int da311_probe(struct i2c_client *client,
|
|||
return devm_iio_device_register(&client->dev, indio_dev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int da311_suspend(struct device *dev)
|
||||
{
|
||||
return da311_enable(to_i2c_client(dev), false);
|
||||
|
@ -266,9 +265,8 @@ static int da311_resume(struct device *dev)
|
|||
{
|
||||
return da311_enable(to_i2c_client(dev), true);
|
||||
}
|
||||
#endif
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(da311_pm_ops, da311_suspend, da311_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(da311_pm_ops, da311_suspend, da311_resume);
|
||||
|
||||
static const struct i2c_device_id da311_i2c_id[] = {
|
||||
{"da311", 0},
|
||||
|
@ -279,7 +277,7 @@ MODULE_DEVICE_TABLE(i2c, da311_i2c_id);
|
|||
static struct i2c_driver da311_driver = {
|
||||
.driver = {
|
||||
.name = "da311",
|
||||
.pm = &da311_pm_ops,
|
||||
.pm = pm_sleep_ptr(&da311_pm_ops),
|
||||
},
|
||||
.probe = da311_probe,
|
||||
.id_table = da311_i2c_id,
|
||||
|
|
|
@ -170,7 +170,6 @@ static int dmard06_probe(struct i2c_client *client,
|
|||
return devm_iio_device_register(&client->dev, indio_dev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int dmard06_suspend(struct device *dev)
|
||||
{
|
||||
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
|
||||
|
@ -199,11 +198,8 @@ static int dmard06_resume(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(dmard06_pm_ops, dmard06_suspend, dmard06_resume);
|
||||
#define DMARD06_PM_OPS (&dmard06_pm_ops)
|
||||
#else
|
||||
#define DMARD06_PM_OPS NULL
|
||||
#endif
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(dmard06_pm_ops, dmard06_suspend,
|
||||
dmard06_resume);
|
||||
|
||||
static const struct i2c_device_id dmard06_id[] = {
|
||||
{ "dmard05", 0 },
|
||||
|
@ -227,7 +223,7 @@ static struct i2c_driver dmard06_driver = {
|
|||
.driver = {
|
||||
.name = DMARD06_DRV_NAME,
|
||||
.of_match_table = dmard06_of_match,
|
||||
.pm = DMARD06_PM_OPS,
|
||||
.pm = pm_sleep_ptr(&dmard06_pm_ops),
|
||||
},
|
||||
};
|
||||
module_i2c_driver(dmard06_driver);
|
||||
|
|
|
@ -126,7 +126,7 @@ static int dmard09_probe(struct i2c_client *client,
|
|||
}
|
||||
|
||||
static const struct i2c_device_id dmard09_id[] = {
|
||||
{ "dmard09", 0},
|
||||
{ "dmard09", 0 },
|
||||
{ },
|
||||
};
|
||||
|
||||
|
|
|
@ -218,7 +218,6 @@ static int dmard10_probe(struct i2c_client *client,
|
|||
return devm_iio_device_register(&client->dev, indio_dev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int dmard10_suspend(struct device *dev)
|
||||
{
|
||||
return dmard10_shutdown(to_i2c_client(dev));
|
||||
|
@ -228,9 +227,9 @@ static int dmard10_resume(struct device *dev)
|
|||
{
|
||||
return dmard10_reset(to_i2c_client(dev));
|
||||
}
|
||||
#endif
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(dmard10_pm_ops, dmard10_suspend, dmard10_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(dmard10_pm_ops, dmard10_suspend,
|
||||
dmard10_resume);
|
||||
|
||||
static const struct i2c_device_id dmard10_i2c_id[] = {
|
||||
{"dmard10", 0},
|
||||
|
@ -241,7 +240,7 @@ MODULE_DEVICE_TABLE(i2c, dmard10_i2c_id);
|
|||
static struct i2c_driver dmard10_driver = {
|
||||
.driver = {
|
||||
.name = "dmard10",
|
||||
.pm = &dmard10_pm_ops,
|
||||
.pm = pm_sleep_ptr(&dmard10_pm_ops),
|
||||
},
|
||||
.probe = dmard10_probe,
|
||||
.id_table = dmard10_i2c_id,
|
||||
|
|
|
@ -178,7 +178,7 @@ const struct regmap_config fxls8962af_i2c_regmap_conf = {
|
|||
.val_bits = 8,
|
||||
.max_register = FXLS8962AF_MAX_REG,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(fxls8962af_i2c_regmap_conf);
|
||||
EXPORT_SYMBOL_NS_GPL(fxls8962af_i2c_regmap_conf, IIO_FXLS8962AF);
|
||||
|
||||
const struct regmap_config fxls8962af_spi_regmap_conf = {
|
||||
.reg_bits = 8,
|
||||
|
@ -186,7 +186,7 @@ const struct regmap_config fxls8962af_spi_regmap_conf = {
|
|||
.val_bits = 8,
|
||||
.max_register = FXLS8962AF_MAX_REG,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(fxls8962af_spi_regmap_conf);
|
||||
EXPORT_SYMBOL_NS_GPL(fxls8962af_spi_regmap_conf, IIO_FXLS8962AF);
|
||||
|
||||
enum {
|
||||
fxls8962af_idx_x,
|
||||
|
@ -1240,7 +1240,7 @@ int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq)
|
|||
|
||||
return devm_iio_device_register(dev, indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fxls8962af_core_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(fxls8962af_core_probe, IIO_FXLS8962AF);
|
||||
|
||||
static int __maybe_unused fxls8962af_runtime_suspend(struct device *dev)
|
||||
{
|
||||
|
@ -1306,7 +1306,7 @@ const struct dev_pm_ops fxls8962af_pm_ops = {
|
|||
SET_RUNTIME_PM_OPS(fxls8962af_runtime_suspend,
|
||||
fxls8962af_runtime_resume, NULL)
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(fxls8962af_pm_ops);
|
||||
EXPORT_SYMBOL_NS_GPL(fxls8962af_pm_ops, IIO_FXLS8962AF);
|
||||
|
||||
MODULE_AUTHOR("Sean Nyekjaer <sean@geanix.com>");
|
||||
MODULE_DESCRIPTION("NXP FXLS8962AF/FXLS8964AF accelerometer driver");
|
||||
|
|
|
@ -55,3 +55,4 @@ module_i2c_driver(fxls8962af_driver);
|
|||
MODULE_AUTHOR("Sean Nyekjaer <sean@geanix.com>");
|
||||
MODULE_DESCRIPTION("NXP FXLS8962AF/FXLS8964AF accelerometer i2c driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_FXLS8962AF);
|
||||
|
|
|
@ -55,3 +55,4 @@ module_spi_driver(fxls8962af_driver);
|
|||
MODULE_AUTHOR("Sean Nyekjaer <sean@geanix.com>");
|
||||
MODULE_DESCRIPTION("NXP FXLS8962AF/FXLS8964AF accelerometer spi driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_FXLS8962AF);
|
||||
|
|
|
@ -65,3 +65,4 @@ module_i2c_driver(kxsd9_i2c_driver);
|
|||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DESCRIPTION("KXSD9 accelerometer I2C interface");
|
||||
MODULE_IMPORT_NS(IIO_KXSD9);
|
||||
|
|
|
@ -66,3 +66,4 @@ module_spi_driver(kxsd9_spi_driver);
|
|||
MODULE_AUTHOR("Jonathan Cameron <jic23@kernel.org>");
|
||||
MODULE_DESCRIPTION("Kionix KXSD9 SPI driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_KXSD9);
|
||||
|
|
|
@ -476,7 +476,7 @@ int kxsd9_common_probe(struct device *dev,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(kxsd9_common_probe);
|
||||
EXPORT_SYMBOL_NS(kxsd9_common_probe, IIO_KXSD9);
|
||||
|
||||
void kxsd9_common_remove(struct device *dev)
|
||||
{
|
||||
|
@ -490,7 +490,7 @@ void kxsd9_common_remove(struct device *dev)
|
|||
pm_runtime_disable(dev);
|
||||
kxsd9_power_down(st);
|
||||
}
|
||||
EXPORT_SYMBOL(kxsd9_common_remove);
|
||||
EXPORT_SYMBOL_NS(kxsd9_common_remove, IIO_KXSD9);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int kxsd9_runtime_suspend(struct device *dev)
|
||||
|
@ -516,7 +516,7 @@ const struct dev_pm_ops kxsd9_dev_pm_ops = {
|
|||
SET_RUNTIME_PM_OPS(kxsd9_runtime_suspend,
|
||||
kxsd9_runtime_resume, NULL)
|
||||
};
|
||||
EXPORT_SYMBOL(kxsd9_dev_pm_ops);
|
||||
EXPORT_SYMBOL_NS(kxsd9_dev_pm_ops, IIO_KXSD9);
|
||||
|
||||
MODULE_AUTHOR("Jonathan Cameron <jic23@kernel.org>");
|
||||
MODULE_DESCRIPTION("Kionix KXSD9 driver");
|
||||
|
|
|
@ -160,7 +160,6 @@ static int mc3230_remove(struct i2c_client *client)
|
|||
return mc3230_set_opcon(iio_priv(indio_dev), MC3230_MODE_OPCON_STANDBY);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int mc3230_suspend(struct device *dev)
|
||||
{
|
||||
struct mc3230_data *data;
|
||||
|
@ -178,9 +177,8 @@ static int mc3230_resume(struct device *dev)
|
|||
|
||||
return mc3230_set_opcon(data, MC3230_MODE_OPCON_WAKE);
|
||||
}
|
||||
#endif
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(mc3230_pm_ops, mc3230_suspend, mc3230_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(mc3230_pm_ops, mc3230_suspend, mc3230_resume);
|
||||
|
||||
static const struct i2c_device_id mc3230_i2c_id[] = {
|
||||
{"mc3230", 0},
|
||||
|
@ -191,7 +189,7 @@ MODULE_DEVICE_TABLE(i2c, mc3230_i2c_id);
|
|||
static struct i2c_driver mc3230_driver = {
|
||||
.driver = {
|
||||
.name = "mc3230",
|
||||
.pm = &mc3230_pm_ops,
|
||||
.pm = pm_sleep_ptr(&mc3230_pm_ops),
|
||||
},
|
||||
.probe = mc3230_probe,
|
||||
.remove = mc3230_remove,
|
||||
|
|
|
@ -238,7 +238,7 @@ const struct regmap_config mma7455_core_regmap = {
|
|||
.val_bits = 8,
|
||||
.max_register = MMA7455_REG_TW,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(mma7455_core_regmap);
|
||||
EXPORT_SYMBOL_NS_GPL(mma7455_core_regmap, IIO_MMA7455);
|
||||
|
||||
int mma7455_core_probe(struct device *dev, struct regmap *regmap,
|
||||
const char *name)
|
||||
|
@ -293,7 +293,7 @@ int mma7455_core_probe(struct device *dev, struct regmap *regmap,
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mma7455_core_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(mma7455_core_probe, IIO_MMA7455);
|
||||
|
||||
void mma7455_core_remove(struct device *dev)
|
||||
{
|
||||
|
@ -306,7 +306,7 @@ void mma7455_core_remove(struct device *dev)
|
|||
regmap_write(mma7455->regmap, MMA7455_REG_MCTL,
|
||||
MMA7455_MCTL_MODE_STANDBY);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mma7455_core_remove);
|
||||
EXPORT_SYMBOL_NS_GPL(mma7455_core_remove, IIO_MMA7455);
|
||||
|
||||
MODULE_AUTHOR("Joachim Eastwood <manabian@gmail.com>");
|
||||
MODULE_DESCRIPTION("Freescale MMA7455L core accelerometer driver");
|
||||
|
|
|
@ -61,3 +61,4 @@ module_i2c_driver(mma7455_i2c_driver);
|
|||
MODULE_AUTHOR("Joachim Eastwood <manabian@gmail.com>");
|
||||
MODULE_DESCRIPTION("Freescale MMA7455L I2C accelerometer driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_MMA7455);
|
||||
|
|
|
@ -49,3 +49,4 @@ module_spi_driver(mma7455_spi_driver);
|
|||
MODULE_AUTHOR("Joachim Eastwood <manabian@gmail.com>");
|
||||
MODULE_DESCRIPTION("Freescale MMA7455L SPI accelerometer driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_MMA7455);
|
||||
|
|
|
@ -222,7 +222,6 @@ static int mma7660_remove(struct i2c_client *client)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int mma7660_suspend(struct device *dev)
|
||||
{
|
||||
struct mma7660_data *data;
|
||||
|
@ -241,12 +240,8 @@ static int mma7660_resume(struct device *dev)
|
|||
return mma7660_set_mode(data, MMA7660_MODE_ACTIVE);
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(mma7660_pm_ops, mma7660_suspend, mma7660_resume);
|
||||
|
||||
#define MMA7660_PM_OPS (&mma7660_pm_ops)
|
||||
#else
|
||||
#define MMA7660_PM_OPS NULL
|
||||
#endif
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(mma7660_pm_ops, mma7660_suspend,
|
||||
mma7660_resume);
|
||||
|
||||
static const struct i2c_device_id mma7660_i2c_id[] = {
|
||||
{"mma7660", 0},
|
||||
|
@ -270,7 +265,7 @@ MODULE_DEVICE_TABLE(acpi, mma7660_acpi_id);
|
|||
static struct i2c_driver mma7660_driver = {
|
||||
.driver = {
|
||||
.name = "mma7660",
|
||||
.pm = MMA7660_PM_OPS,
|
||||
.pm = pm_sleep_ptr(&mma7660_pm_ops),
|
||||
.of_match_table = mma7660_of_match,
|
||||
.acpi_match_table = ACPI_PTR(mma7660_acpi_id),
|
||||
},
|
||||
|
|
|
@ -104,6 +104,7 @@
|
|||
struct mma8452_data {
|
||||
struct i2c_client *client;
|
||||
struct mutex lock;
|
||||
struct iio_mount_matrix orientation;
|
||||
u8 ctrl_reg1;
|
||||
u8 data_cfg;
|
||||
const struct mma_chip_info *chip_info;
|
||||
|
@ -176,6 +177,7 @@ static const struct mma8452_event_regs trans_ev_regs = {
|
|||
* @enabled_events: event flags enabled and handled by this driver
|
||||
*/
|
||||
struct mma_chip_info {
|
||||
const char *name;
|
||||
u8 chip_id;
|
||||
const struct iio_chan_spec *channels;
|
||||
int num_channels;
|
||||
|
@ -379,8 +381,8 @@ static ssize_t mma8452_show_scale_avail(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct mma8452_data *data = iio_priv(i2c_get_clientdata(
|
||||
to_i2c_client(dev)));
|
||||
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
|
||||
struct mma8452_data *data = iio_priv(indio_dev);
|
||||
|
||||
return mma8452_show_int_plus_micros(buf, data->chip_info->mma_scales,
|
||||
ARRAY_SIZE(data->chip_info->mma_scales));
|
||||
|
@ -1189,6 +1191,20 @@ static const struct attribute_group mma8452_event_attribute_group = {
|
|||
.attrs = mma8452_event_attributes,
|
||||
};
|
||||
|
||||
static const struct iio_mount_matrix *
|
||||
mma8452_get_mount_matrix(const struct iio_dev *indio_dev,
|
||||
const struct iio_chan_spec *chan)
|
||||
{
|
||||
struct mma8452_data *data = iio_priv(indio_dev);
|
||||
|
||||
return &data->orientation;
|
||||
}
|
||||
|
||||
static const struct iio_chan_spec_ext_info mma8452_ext_info[] = {
|
||||
IIO_MOUNT_MATRIX(IIO_SHARED_BY_TYPE, mma8452_get_mount_matrix),
|
||||
{ }
|
||||
};
|
||||
|
||||
#define MMA8452_FREEFALL_CHANNEL(modifier) { \
|
||||
.type = IIO_ACCEL, \
|
||||
.modified = 1, \
|
||||
|
@ -1227,6 +1243,7 @@ static const struct attribute_group mma8452_event_attribute_group = {
|
|||
}, \
|
||||
.event_spec = mma8452_transient_event, \
|
||||
.num_event_specs = ARRAY_SIZE(mma8452_transient_event), \
|
||||
.ext_info = mma8452_ext_info, \
|
||||
}
|
||||
|
||||
#define MMA8652_CHANNEL(axis, idx, bits) { \
|
||||
|
@ -1248,6 +1265,7 @@ static const struct attribute_group mma8452_event_attribute_group = {
|
|||
}, \
|
||||
.event_spec = mma8452_motion_event, \
|
||||
.num_event_specs = ARRAY_SIZE(mma8452_motion_event), \
|
||||
.ext_info = mma8452_ext_info, \
|
||||
}
|
||||
|
||||
static const struct iio_chan_spec mma8451_channels[] = {
|
||||
|
@ -1301,6 +1319,7 @@ enum {
|
|||
|
||||
static const struct mma_chip_info mma_chip_info_table[] = {
|
||||
[mma8451] = {
|
||||
.name = "mma8451",
|
||||
.chip_id = MMA8451_DEVICE_ID,
|
||||
.channels = mma8451_channels,
|
||||
.num_channels = ARRAY_SIZE(mma8451_channels),
|
||||
|
@ -1325,6 +1344,7 @@ static const struct mma_chip_info mma_chip_info_table[] = {
|
|||
MMA8452_INT_FF_MT,
|
||||
},
|
||||
[mma8452] = {
|
||||
.name = "mma8452",
|
||||
.chip_id = MMA8452_DEVICE_ID,
|
||||
.channels = mma8452_channels,
|
||||
.num_channels = ARRAY_SIZE(mma8452_channels),
|
||||
|
@ -1341,6 +1361,7 @@ static const struct mma_chip_info mma_chip_info_table[] = {
|
|||
MMA8452_INT_FF_MT,
|
||||
},
|
||||
[mma8453] = {
|
||||
.name = "mma8453",
|
||||
.chip_id = MMA8453_DEVICE_ID,
|
||||
.channels = mma8453_channels,
|
||||
.num_channels = ARRAY_SIZE(mma8453_channels),
|
||||
|
@ -1357,6 +1378,7 @@ static const struct mma_chip_info mma_chip_info_table[] = {
|
|||
MMA8452_INT_FF_MT,
|
||||
},
|
||||
[mma8652] = {
|
||||
.name = "mma8652",
|
||||
.chip_id = MMA8652_DEVICE_ID,
|
||||
.channels = mma8652_channels,
|
||||
.num_channels = ARRAY_SIZE(mma8652_channels),
|
||||
|
@ -1366,6 +1388,7 @@ static const struct mma_chip_info mma_chip_info_table[] = {
|
|||
.enabled_events = MMA8452_INT_FF_MT,
|
||||
},
|
||||
[mma8653] = {
|
||||
.name = "mma8653",
|
||||
.chip_id = MMA8653_DEVICE_ID,
|
||||
.channels = mma8653_channels,
|
||||
.num_channels = ARRAY_SIZE(mma8653_channels),
|
||||
|
@ -1380,6 +1403,7 @@ static const struct mma_chip_info mma_chip_info_table[] = {
|
|||
.enabled_events = MMA8452_INT_FF_MT,
|
||||
},
|
||||
[fxls8471] = {
|
||||
.name = "fxls8471",
|
||||
.chip_id = FXLS8471_DEVICE_ID,
|
||||
.channels = mma8451_channels,
|
||||
.num_channels = ARRAY_SIZE(mma8451_channels),
|
||||
|
@ -1522,13 +1546,6 @@ static int mma8452_probe(struct i2c_client *client,
|
|||
struct mma8452_data *data;
|
||||
struct iio_dev *indio_dev;
|
||||
int ret;
|
||||
const struct of_device_id *match;
|
||||
|
||||
match = of_match_device(mma8452_dt_ids, &client->dev);
|
||||
if (!match) {
|
||||
dev_err(&client->dev, "unknown device model\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
|
||||
if (!indio_dev)
|
||||
|
@ -1537,7 +1554,18 @@ static int mma8452_probe(struct i2c_client *client,
|
|||
data = iio_priv(indio_dev);
|
||||
data->client = client;
|
||||
mutex_init(&data->lock);
|
||||
data->chip_info = match->data;
|
||||
|
||||
data->chip_info = device_get_match_data(&client->dev);
|
||||
if (!data->chip_info && id) {
|
||||
data->chip_info = &mma_chip_info_table[id->driver_data];
|
||||
} else {
|
||||
dev_err(&client->dev, "unknown device model\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = iio_read_mount_matrix(&client->dev, &data->orientation);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
data->vdd_reg = devm_regulator_get(&client->dev, "vdd");
|
||||
if (IS_ERR(data->vdd_reg))
|
||||
|
@ -1581,11 +1609,11 @@ static int mma8452_probe(struct i2c_client *client,
|
|||
}
|
||||
|
||||
dev_info(&client->dev, "registering %s accelerometer; ID 0x%x\n",
|
||||
match->compatible, data->chip_info->chip_id);
|
||||
data->chip_info->name, data->chip_info->chip_id);
|
||||
|
||||
i2c_set_clientdata(client, indio_dev);
|
||||
indio_dev->info = &mma8452_info;
|
||||
indio_dev->name = id->name;
|
||||
indio_dev->name = data->chip_info->name;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
indio_dev->channels = data->chip_info->channels;
|
||||
indio_dev->num_channels = data->chip_info->num_channels;
|
||||
|
@ -1810,7 +1838,7 @@ MODULE_DEVICE_TABLE(i2c, mma8452_id);
|
|||
static struct i2c_driver mma8452_driver = {
|
||||
.driver = {
|
||||
.name = "mma8452",
|
||||
.of_match_table = of_match_ptr(mma8452_dt_ids),
|
||||
.of_match_table = mma8452_dt_ids,
|
||||
.pm = &mma8452_pm_ops,
|
||||
},
|
||||
.probe = mma8452_probe,
|
||||
|
|
|
@ -526,7 +526,6 @@ static int mma9551_remove(struct i2c_client *client)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int mma9551_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
|
||||
|
@ -558,9 +557,7 @@ static int mma9551_runtime_resume(struct device *dev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int mma9551_suspend(struct device *dev)
|
||||
{
|
||||
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
|
||||
|
@ -586,12 +583,10 @@ static int mma9551_resume(struct device *dev)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops mma9551_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(mma9551_suspend, mma9551_resume)
|
||||
SET_RUNTIME_PM_OPS(mma9551_runtime_suspend,
|
||||
mma9551_runtime_resume, NULL)
|
||||
SYSTEM_SLEEP_PM_OPS(mma9551_suspend, mma9551_resume)
|
||||
RUNTIME_PM_OPS(mma9551_runtime_suspend, mma9551_runtime_resume, NULL)
|
||||
};
|
||||
|
||||
static const struct acpi_device_id mma9551_acpi_match[] = {
|
||||
|
@ -612,7 +607,7 @@ static struct i2c_driver mma9551_driver = {
|
|||
.driver = {
|
||||
.name = MMA9551_DRV_NAME,
|
||||
.acpi_match_table = ACPI_PTR(mma9551_acpi_match),
|
||||
.pm = &mma9551_pm_ops,
|
||||
.pm = pm_ptr(&mma9551_pm_ops),
|
||||
},
|
||||
.probe = mma9551_probe,
|
||||
.remove = mma9551_remove,
|
||||
|
@ -625,3 +620,4 @@ MODULE_AUTHOR("Irina Tirdea <irina.tirdea@intel.com>");
|
|||
MODULE_AUTHOR("Vlad Dogaru <vlad.dogaru@intel.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DESCRIPTION("MMA9551L motion-sensing platform driver");
|
||||
MODULE_IMPORT_NS(IIO_MMA9551);
|
||||
|
|
|
@ -219,7 +219,7 @@ int mma9551_read_config_byte(struct i2c_client *client, u8 app_id,
|
|||
return mma9551_transfer(client, app_id, MMA9551_CMD_READ_CONFIG,
|
||||
reg, NULL, 0, val, 1);
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_config_byte);
|
||||
EXPORT_SYMBOL_NS(mma9551_read_config_byte, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_write_config_byte() - write 1 configuration byte
|
||||
|
@ -244,7 +244,7 @@ int mma9551_write_config_byte(struct i2c_client *client, u8 app_id,
|
|||
return mma9551_transfer(client, app_id, MMA9551_CMD_WRITE_CONFIG, reg,
|
||||
&val, 1, NULL, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_write_config_byte);
|
||||
EXPORT_SYMBOL_NS(mma9551_write_config_byte, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_read_status_byte() - read 1 status byte
|
||||
|
@ -269,7 +269,7 @@ int mma9551_read_status_byte(struct i2c_client *client, u8 app_id,
|
|||
return mma9551_transfer(client, app_id, MMA9551_CMD_READ_STATUS,
|
||||
reg, NULL, 0, val, 1);
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_status_byte);
|
||||
EXPORT_SYMBOL_NS(mma9551_read_status_byte, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_read_config_word() - read 1 config word
|
||||
|
@ -300,7 +300,7 @@ int mma9551_read_config_word(struct i2c_client *client, u8 app_id,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_config_word);
|
||||
EXPORT_SYMBOL_NS(mma9551_read_config_word, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_write_config_word() - write 1 config word
|
||||
|
@ -327,7 +327,7 @@ int mma9551_write_config_word(struct i2c_client *client, u8 app_id,
|
|||
return mma9551_transfer(client, app_id, MMA9551_CMD_WRITE_CONFIG, reg,
|
||||
(u8 *)&v, 2, NULL, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_write_config_word);
|
||||
EXPORT_SYMBOL_NS(mma9551_write_config_word, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_read_status_word() - read 1 status word
|
||||
|
@ -358,7 +358,7 @@ int mma9551_read_status_word(struct i2c_client *client, u8 app_id,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_status_word);
|
||||
EXPORT_SYMBOL_NS(mma9551_read_status_word, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_read_config_words() - read multiple config words
|
||||
|
@ -397,7 +397,7 @@ int mma9551_read_config_words(struct i2c_client *client, u8 app_id,
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_config_words);
|
||||
EXPORT_SYMBOL_NS(mma9551_read_config_words, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_read_status_words() - read multiple status words
|
||||
|
@ -436,7 +436,7 @@ int mma9551_read_status_words(struct i2c_client *client, u8 app_id,
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_status_words);
|
||||
EXPORT_SYMBOL_NS(mma9551_read_status_words, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_write_config_words() - write multiple config words
|
||||
|
@ -471,7 +471,7 @@ int mma9551_write_config_words(struct i2c_client *client, u8 app_id,
|
|||
return mma9551_transfer(client, app_id, MMA9551_CMD_WRITE_CONFIG,
|
||||
reg, (u8 *)be_buf, len * sizeof(u16), NULL, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_write_config_words);
|
||||
EXPORT_SYMBOL_NS(mma9551_write_config_words, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_update_config_bits() - update bits in register
|
||||
|
@ -507,7 +507,7 @@ int mma9551_update_config_bits(struct i2c_client *client, u8 app_id,
|
|||
|
||||
return mma9551_write_config_byte(client, app_id, reg, tmp);
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_update_config_bits);
|
||||
EXPORT_SYMBOL_NS(mma9551_update_config_bits, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_gpio_config() - configure gpio
|
||||
|
@ -586,7 +586,7 @@ int mma9551_gpio_config(struct i2c_client *client, enum mma9551_gpio_pin pin,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_gpio_config);
|
||||
EXPORT_SYMBOL_NS(mma9551_gpio_config, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_read_version() - read device version information
|
||||
|
@ -616,7 +616,7 @@ int mma9551_read_version(struct i2c_client *client)
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_version);
|
||||
EXPORT_SYMBOL_NS(mma9551_read_version, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_set_device_state() - sets HW power mode
|
||||
|
@ -646,7 +646,7 @@ int mma9551_set_device_state(struct i2c_client *client, bool enable)
|
|||
MMA9551_SLEEP_CFG_FLEEN :
|
||||
MMA9551_SLEEP_CFG_SNCEN);
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_set_device_state);
|
||||
EXPORT_SYMBOL_NS(mma9551_set_device_state, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_set_power_state() - sets runtime PM state
|
||||
|
@ -680,7 +680,7 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_set_power_state);
|
||||
EXPORT_SYMBOL_NS(mma9551_set_power_state, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_sleep() - sleep
|
||||
|
@ -699,7 +699,7 @@ void mma9551_sleep(int freq)
|
|||
else
|
||||
msleep_interruptible(sleep_val);
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_sleep);
|
||||
EXPORT_SYMBOL_NS(mma9551_sleep, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_read_accel_chan() - read accelerometer channel
|
||||
|
@ -755,7 +755,7 @@ int mma9551_read_accel_chan(struct i2c_client *client,
|
|||
mma9551_set_power_state(client, false);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_accel_chan);
|
||||
EXPORT_SYMBOL_NS(mma9551_read_accel_chan, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_read_accel_scale() - read accelerometer scale
|
||||
|
@ -773,7 +773,7 @@ int mma9551_read_accel_scale(int *val, int *val2)
|
|||
|
||||
return IIO_VAL_INT_PLUS_MICRO;
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_read_accel_scale);
|
||||
EXPORT_SYMBOL_NS(mma9551_read_accel_scale, IIO_MMA9551);
|
||||
|
||||
/**
|
||||
* mma9551_app_reset() - reset application
|
||||
|
@ -792,7 +792,7 @@ int mma9551_app_reset(struct i2c_client *client, u32 app_mask)
|
|||
MMA9551_RSC_OFFSET(app_mask),
|
||||
MMA9551_RSC_VAL(app_mask));
|
||||
}
|
||||
EXPORT_SYMBOL(mma9551_app_reset);
|
||||
EXPORT_SYMBOL_NS(mma9551_app_reset, IIO_MMA9551);
|
||||
|
||||
MODULE_AUTHOR("Irina Tirdea <irina.tirdea@intel.com>");
|
||||
MODULE_AUTHOR("Vlad Dogaru <vlad.dogaru@intel.com>");
|
||||
|
|
|
@ -1165,7 +1165,6 @@ static int mma9553_remove(struct i2c_client *client)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int mma9553_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
|
||||
|
@ -1197,9 +1196,7 @@ static int mma9553_runtime_resume(struct device *dev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int mma9553_suspend(struct device *dev)
|
||||
{
|
||||
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
|
||||
|
@ -1225,12 +1222,10 @@ static int mma9553_resume(struct device *dev)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops mma9553_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(mma9553_suspend, mma9553_resume)
|
||||
SET_RUNTIME_PM_OPS(mma9553_runtime_suspend,
|
||||
mma9553_runtime_resume, NULL)
|
||||
SYSTEM_SLEEP_PM_OPS(mma9553_suspend, mma9553_resume)
|
||||
RUNTIME_PM_OPS(mma9553_runtime_suspend, mma9553_runtime_resume, NULL)
|
||||
};
|
||||
|
||||
static const struct acpi_device_id mma9553_acpi_match[] = {
|
||||
|
@ -1251,7 +1246,7 @@ static struct i2c_driver mma9553_driver = {
|
|||
.driver = {
|
||||
.name = MMA9553_DRV_NAME,
|
||||
.acpi_match_table = ACPI_PTR(mma9553_acpi_match),
|
||||
.pm = &mma9553_pm_ops,
|
||||
.pm = pm_ptr(&mma9553_pm_ops),
|
||||
},
|
||||
.probe = mma9553_probe,
|
||||
.remove = mma9553_remove,
|
||||
|
@ -1263,3 +1258,4 @@ module_i2c_driver(mma9553_driver);
|
|||
MODULE_AUTHOR("Irina Tirdea <irina.tirdea@intel.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DESCRIPTION("MMA9553L pedometer platform driver");
|
||||
MODULE_IMPORT_NS(IIO_MMA9551);
|
||||
|
|
|
@ -142,3 +142,4 @@ module_platform_driver(ssp_accel_driver);
|
|||
MODULE_AUTHOR("Karol Wrona <k.wrona@samsung.com>");
|
||||
MODULE_DESCRIPTION("Samsung sensorhub accelerometers driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(IIO_SSP_SENSORS);
|
||||
|
|
|
@ -36,6 +36,7 @@ enum st_accel_type {
|
|||
LIS3DHH,
|
||||
LIS2DE12,
|
||||
LIS2HH12,
|
||||
SC7A20,
|
||||
ST_ACCEL_MAX,
|
||||
};
|
||||
|
||||
|
@ -61,6 +62,7 @@ enum st_accel_type {
|
|||
#define LIS3DE_ACCEL_DEV_NAME "lis3de"
|
||||
#define LIS2DE12_ACCEL_DEV_NAME "lis2de12"
|
||||
#define LIS2HH12_ACCEL_DEV_NAME "lis2hh12"
|
||||
#define SC7A20_ACCEL_DEV_NAME "sc7a20"
|
||||
|
||||
#ifdef CONFIG_IIO_BUFFER
|
||||
int st_accel_allocate_ring(struct iio_dev *indio_dev);
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* Denis Ciocca <denis.ciocca@st.com>
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/iio/iio.h>
|
||||
#include <linux/iio/buffer.h>
|
||||
|
@ -65,7 +64,3 @@ int st_accel_allocate_ring(struct iio_dev *indio_dev)
|
|||
return devm_iio_triggered_buffer_setup(indio_dev->dev.parent, indio_dev,
|
||||
NULL, &st_sensors_trigger_handler, &st_accel_buffer_setup_ops);
|
||||
}
|
||||
|
||||
MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
|
||||
MODULE_DESCRIPTION("STMicroelectronics accelerometers buffer");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
|
|
@ -1087,6 +1087,89 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
|
|||
.multi_read_bit = true,
|
||||
.bootime = 2,
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Not an ST part. Register-compatible with the LIS2DH, even
|
||||
* though the WAI value is different.
|
||||
*/
|
||||
.wai = 0x11,
|
||||
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
|
||||
.sensors_supported = {
|
||||
[0] = SC7A20_ACCEL_DEV_NAME,
|
||||
},
|
||||
.ch = (struct iio_chan_spec *)st_accel_12bit_channels,
|
||||
.odr = {
|
||||
.addr = 0x20,
|
||||
.mask = 0xf0,
|
||||
.odr_avl = {
|
||||
{ .hz = 1, .value = 0x01, },
|
||||
{ .hz = 10, .value = 0x02, },
|
||||
{ .hz = 25, .value = 0x03, },
|
||||
{ .hz = 50, .value = 0x04, },
|
||||
{ .hz = 100, .value = 0x05, },
|
||||
{ .hz = 200, .value = 0x06, },
|
||||
{ .hz = 400, .value = 0x07, },
|
||||
{ .hz = 1600, .value = 0x08, },
|
||||
},
|
||||
},
|
||||
.pw = {
|
||||
.addr = 0x20,
|
||||
.mask = 0xf0,
|
||||
.value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE,
|
||||
},
|
||||
.enable_axis = {
|
||||
.addr = ST_SENSORS_DEFAULT_AXIS_ADDR,
|
||||
.mask = ST_SENSORS_DEFAULT_AXIS_MASK,
|
||||
},
|
||||
.fs = {
|
||||
.addr = 0x23,
|
||||
.mask = 0x30,
|
||||
.fs_avl = {
|
||||
[0] = {
|
||||
.num = ST_ACCEL_FS_AVL_2G,
|
||||
.value = 0x00,
|
||||
.gain = IIO_G_TO_M_S_2(1000),
|
||||
},
|
||||
[1] = {
|
||||
.num = ST_ACCEL_FS_AVL_4G,
|
||||
.value = 0x01,
|
||||
.gain = IIO_G_TO_M_S_2(2000),
|
||||
},
|
||||
[2] = {
|
||||
.num = ST_ACCEL_FS_AVL_8G,
|
||||
.value = 0x02,
|
||||
.gain = IIO_G_TO_M_S_2(4000),
|
||||
},
|
||||
[3] = {
|
||||
.num = ST_ACCEL_FS_AVL_16G,
|
||||
.value = 0x03,
|
||||
.gain = IIO_G_TO_M_S_2(12000),
|
||||
},
|
||||
},
|
||||
},
|
||||
.bdu = {
|
||||
.addr = 0x23,
|
||||
.mask = 0x80,
|
||||
},
|
||||
.drdy_irq = {
|
||||
.int1 = {
|
||||
.addr = 0x22,
|
||||
.mask = 0x10,
|
||||
},
|
||||
.addr_ihl = 0x25,
|
||||
.mask_ihl = 0x02,
|
||||
.stat_drdy = {
|
||||
.addr = ST_SENSORS_DEFAULT_STAT_ADDR,
|
||||
.mask = 0x07,
|
||||
},
|
||||
},
|
||||
.sim = {
|
||||
.addr = 0x23,
|
||||
.value = BIT(0),
|
||||
},
|
||||
.multi_read_bit = true,
|
||||
.bootime = 2,
|
||||
},
|
||||
};
|
||||
|
||||
/* Default accel DRDY is available on INT1 pin */
|
||||
|
@ -1329,7 +1412,7 @@ const struct st_sensor_settings *st_accel_get_settings(const char *name)
|
|||
|
||||
return &st_accel_sensors_settings[index];
|
||||
}
|
||||
EXPORT_SYMBOL(st_accel_get_settings);
|
||||
EXPORT_SYMBOL_NS(st_accel_get_settings, IIO_ST_SENSORS);
|
||||
|
||||
int st_accel_common_probe(struct iio_dev *indio_dev)
|
||||
{
|
||||
|
@ -1383,8 +1466,9 @@ int st_accel_common_probe(struct iio_dev *indio_dev)
|
|||
|
||||
return devm_iio_device_register(parent, indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL(st_accel_common_probe);
|
||||
EXPORT_SYMBOL_NS(st_accel_common_probe, IIO_ST_SENSORS);
|
||||
|
||||
MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
|
||||
MODULE_DESCRIPTION("STMicroelectronics accelerometers driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_ST_SENSORS);
|
||||
|
|
|
@ -107,6 +107,10 @@ static const struct of_device_id st_accel_of_match[] = {
|
|||
.compatible = "st,lis2hh12",
|
||||
.data = LIS2HH12_ACCEL_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "silan,sc7a20",
|
||||
.data = SC7A20_ACCEL_DEV_NAME,
|
||||
},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, st_accel_of_match);
|
||||
|
@ -142,6 +146,7 @@ static const struct i2c_device_id st_accel_id_table[] = {
|
|||
{ LIS3DE_ACCEL_DEV_NAME },
|
||||
{ LIS2DE12_ACCEL_DEV_NAME },
|
||||
{ LIS2HH12_ACCEL_DEV_NAME },
|
||||
{ SC7A20_ACCEL_DEV_NAME },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, st_accel_id_table);
|
||||
|
@ -194,3 +199,4 @@ module_i2c_driver(st_accel_driver);
|
|||
MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
|
||||
MODULE_DESCRIPTION("STMicroelectronics accelerometers i2c driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_ST_SENSORS);
|
||||
|
|
|
@ -164,3 +164,4 @@ module_spi_driver(st_accel_driver);
|
|||
MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
|
||||
MODULE_DESCRIPTION("STMicroelectronics accelerometers spi driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_ST_SENSORS);
|
||||
|
|
|
@ -611,7 +611,6 @@ static int stk8312_remove(struct i2c_client *client)
|
|||
return stk8312_set_mode(data, STK8312_MODE_STANDBY);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int stk8312_suspend(struct device *dev)
|
||||
{
|
||||
struct stk8312_data *data;
|
||||
|
@ -630,12 +629,8 @@ static int stk8312_resume(struct device *dev)
|
|||
return stk8312_set_mode(data, data->mode | STK8312_MODE_ACTIVE);
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(stk8312_pm_ops, stk8312_suspend, stk8312_resume);
|
||||
|
||||
#define STK8312_PM_OPS (&stk8312_pm_ops)
|
||||
#else
|
||||
#define STK8312_PM_OPS NULL
|
||||
#endif
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(stk8312_pm_ops, stk8312_suspend,
|
||||
stk8312_resume);
|
||||
|
||||
static const struct i2c_device_id stk8312_i2c_id[] = {
|
||||
/* Deprecated in favour of lowercase form */
|
||||
|
@ -648,7 +643,7 @@ MODULE_DEVICE_TABLE(i2c, stk8312_i2c_id);
|
|||
static struct i2c_driver stk8312_driver = {
|
||||
.driver = {
|
||||
.name = STK8312_DRIVER_NAME,
|
||||
.pm = STK8312_PM_OPS,
|
||||
.pm = pm_sleep_ptr(&stk8312_pm_ops),
|
||||
},
|
||||
.probe = stk8312_probe,
|
||||
.remove = stk8312_remove,
|
||||
|
|
|
@ -504,7 +504,6 @@ static int stk8ba50_remove(struct i2c_client *client)
|
|||
return stk8ba50_set_power(data, STK8BA50_MODE_SUSPEND);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int stk8ba50_suspend(struct device *dev)
|
||||
{
|
||||
struct stk8ba50_data *data;
|
||||
|
@ -523,12 +522,8 @@ static int stk8ba50_resume(struct device *dev)
|
|||
return stk8ba50_set_power(data, STK8BA50_MODE_NORMAL);
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(stk8ba50_pm_ops, stk8ba50_suspend, stk8ba50_resume);
|
||||
|
||||
#define STK8BA50_PM_OPS (&stk8ba50_pm_ops)
|
||||
#else
|
||||
#define STK8BA50_PM_OPS NULL
|
||||
#endif
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(stk8ba50_pm_ops, stk8ba50_suspend,
|
||||
stk8ba50_resume);
|
||||
|
||||
static const struct i2c_device_id stk8ba50_i2c_id[] = {
|
||||
{"stk8ba50", 0},
|
||||
|
@ -546,7 +541,7 @@ MODULE_DEVICE_TABLE(acpi, stk8ba50_acpi_id);
|
|||
static struct i2c_driver stk8ba50_driver = {
|
||||
.driver = {
|
||||
.name = "stk8ba50",
|
||||
.pm = STK8BA50_PM_OPS,
|
||||
.pm = pm_sleep_ptr(&stk8ba50_pm_ops),
|
||||
.acpi_match_table = ACPI_PTR(stk8ba50_acpi_id),
|
||||
},
|
||||
.probe = stk8ba50_probe,
|
||||
|
|
|
@ -64,6 +64,17 @@ config AD7266
|
|||
To compile this driver as a module, choose M here: the module will be
|
||||
called ad7266.
|
||||
|
||||
config AD7280
|
||||
tristate "Analog Devices AD7280A Lithium Ion Battery Monitoring System"
|
||||
depends on SPI
|
||||
select CRC8
|
||||
help
|
||||
Say yes here to build support for Analog Devices AD7280A
|
||||
Lithium Ion Battery Monitoring System.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called ad7280a
|
||||
|
||||
config AD7291
|
||||
tristate "Analog Devices AD7291 ADC driver"
|
||||
depends on I2C
|
||||
|
|
|
@ -10,6 +10,7 @@ obj-$(CONFIG_AD7091R5) += ad7091r5.o ad7091r-base.o
|
|||
obj-$(CONFIG_AD7124) += ad7124.o
|
||||
obj-$(CONFIG_AD7192) += ad7192.o
|
||||
obj-$(CONFIG_AD7266) += ad7266.o
|
||||
obj-$(CONFIG_AD7280) += ad7280a.o
|
||||
obj-$(CONFIG_AD7291) += ad7291.o
|
||||
obj-$(CONFIG_AD7292) += ad7292.o
|
||||
obj-$(CONFIG_AD7298) += ad7298.o
|
||||
|
|
|
@ -942,7 +942,6 @@ static const struct iio_info ab8500_gpadc_info = {
|
|||
.read_raw = ab8500_gpadc_read_raw,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int ab8500_gpadc_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct iio_dev *indio_dev = dev_get_drvdata(dev);
|
||||
|
@ -965,7 +964,6 @@ static int ab8500_gpadc_runtime_resume(struct device *dev)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ab8500_gpadc_parse_channel() - process devicetree channel configuration
|
||||
|
@ -1199,20 +1197,16 @@ static int ab8500_gpadc_remove(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops ab8500_gpadc_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
SET_RUNTIME_PM_OPS(ab8500_gpadc_runtime_suspend,
|
||||
ab8500_gpadc_runtime_resume,
|
||||
NULL)
|
||||
};
|
||||
static DEFINE_RUNTIME_DEV_PM_OPS(ab8500_gpadc_pm_ops,
|
||||
ab8500_gpadc_runtime_suspend,
|
||||
ab8500_gpadc_runtime_resume, NULL);
|
||||
|
||||
static struct platform_driver ab8500_gpadc_driver = {
|
||||
.probe = ab8500_gpadc_probe,
|
||||
.remove = ab8500_gpadc_remove,
|
||||
.driver = {
|
||||
.name = "ab8500-gpadc",
|
||||
.pm = &ab8500_gpadc_pm_ops,
|
||||
.pm = pm_ptr(&ab8500_gpadc_pm_ops),
|
||||
},
|
||||
};
|
||||
builtin_platform_driver(ab8500_gpadc_driver);
|
||||
|
|
|
@ -260,7 +260,7 @@ int ad7091r_probe(struct device *dev, const char *name,
|
|||
|
||||
return devm_iio_device_register(dev, iio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad7091r_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(ad7091r_probe, IIO_AD7091R);
|
||||
|
||||
static bool ad7091r_writeable_reg(struct device *dev, unsigned int reg)
|
||||
{
|
||||
|
@ -290,7 +290,7 @@ const struct regmap_config ad7091r_regmap_config = {
|
|||
.writeable_reg = ad7091r_writeable_reg,
|
||||
.volatile_reg = ad7091r_volatile_reg,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ad7091r_regmap_config);
|
||||
EXPORT_SYMBOL_NS_GPL(ad7091r_regmap_config, IIO_AD7091R);
|
||||
|
||||
MODULE_AUTHOR("Beniamin Bia <beniamin.bia@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7091Rx multi-channel converters");
|
||||
|
|
|
@ -111,3 +111,4 @@ module_i2c_driver(ad7091r5_driver);
|
|||
MODULE_AUTHOR("Beniamin Bia <beniamin.bia@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7091R5 multi-channel ADC driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_AD7091R);
|
||||
|
|
|
@ -970,3 +970,4 @@ module_spi_driver(ad71124_driver);
|
|||
MODULE_AUTHOR("Stefan Popa <stefan.popa@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7124 SPI driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(IIO_AD_SIGMA_DELTA);
|
||||
|
|
|
@ -433,7 +433,7 @@ static ssize_t ad7192_show_ac_excitation(struct device *dev,
|
|||
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
|
||||
struct ad7192_state *st = iio_priv(indio_dev);
|
||||
|
||||
return sprintf(buf, "%d\n", !!(st->mode & AD7192_MODE_ACX));
|
||||
return sysfs_emit(buf, "%d\n", !!(st->mode & AD7192_MODE_ACX));
|
||||
}
|
||||
|
||||
static ssize_t ad7192_show_bridge_switch(struct device *dev,
|
||||
|
@ -443,7 +443,7 @@ static ssize_t ad7192_show_bridge_switch(struct device *dev,
|
|||
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
|
||||
struct ad7192_state *st = iio_priv(indio_dev);
|
||||
|
||||
return sprintf(buf, "%d\n", !!(st->gpocon & AD7192_GPOCON_BPDSW));
|
||||
return sysfs_emit(buf, "%d\n", !!(st->gpocon & AD7192_GPOCON_BPDSW));
|
||||
}
|
||||
|
||||
static ssize_t ad7192_set(struct device *dev,
|
||||
|
@ -1048,3 +1048,4 @@ module_spi_driver(ad7192_driver);
|
|||
MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7190, AD7192, AD7193, AD7195 ADC");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_AD_SIGMA_DELTA);
|
||||
|
|
1111
drivers/iio/adc/ad7280a.c
Normal file
1111
drivers/iio/adc/ad7280a.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -693,7 +693,7 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,
|
|||
|
||||
return devm_iio_device_register(dev, indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad7606_probe);
|
||||
EXPORT_SYMBOL_NS_GPL(ad7606_probe, IIO_AD7606);
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
||||
|
@ -725,7 +725,7 @@ static int ad7606_resume(struct device *dev)
|
|||
}
|
||||
|
||||
SIMPLE_DEV_PM_OPS(ad7606_pm_ops, ad7606_suspend, ad7606_resume);
|
||||
EXPORT_SYMBOL_GPL(ad7606_pm_ops);
|
||||
EXPORT_SYMBOL_NS_GPL(ad7606_pm_ops, IIO_AD7606);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -101,3 +101,4 @@ module_platform_driver(ad7606_driver);
|
|||
MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7606 ADC");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_AD7606);
|
||||
|
|
|
@ -362,3 +362,4 @@ module_spi_driver(ad7606_driver);
|
|||
MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7606 ADC");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_AD7606);
|
||||
|
|
|
@ -375,3 +375,4 @@ module_spi_driver(ad7780_driver);
|
|||
MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7780 and similar ADCs");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_AD_SIGMA_DELTA);
|
||||
|
|
|
@ -474,3 +474,4 @@ module_spi_driver(ad7791_driver);
|
|||
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7787/AD7788/AD7789/AD7790/AD7791 ADC driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_AD_SIGMA_DELTA);
|
||||
|
|
|
@ -867,3 +867,4 @@ module_spi_driver(ad7793_driver);
|
|||
MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7793 and similar ADCs");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(IIO_AD_SIGMA_DELTA);
|
||||
|
|
|
@ -42,7 +42,7 @@ void ad_sd_set_comm(struct ad_sigma_delta *sigma_delta, uint8_t comm)
|
|||
* to select the channel */
|
||||
sigma_delta->comm = comm & AD_SD_COMM_CHAN_MASK;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sd_set_comm);
|
||||
EXPORT_SYMBOL_NS_GPL(ad_sd_set_comm, IIO_AD_SIGMA_DELTA);
|
||||
|
||||
/**
|
||||
* ad_sd_write_reg() - Write a register
|
||||
|
@ -94,7 +94,7 @@ int ad_sd_write_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sd_write_reg);
|
||||
EXPORT_SYMBOL_NS_GPL(ad_sd_write_reg, IIO_AD_SIGMA_DELTA);
|
||||
|
||||
static int ad_sd_read_reg_raw(struct ad_sigma_delta *sigma_delta,
|
||||
unsigned int reg, unsigned int size, uint8_t *val)
|
||||
|
@ -171,7 +171,7 @@ int ad_sd_read_reg(struct ad_sigma_delta *sigma_delta,
|
|||
out:
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sd_read_reg);
|
||||
EXPORT_SYMBOL_NS_GPL(ad_sd_read_reg, IIO_AD_SIGMA_DELTA);
|
||||
|
||||
/**
|
||||
* ad_sd_reset() - Reset the serial interface
|
||||
|
@ -199,7 +199,7 @@ int ad_sd_reset(struct ad_sigma_delta *sigma_delta,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sd_reset);
|
||||
EXPORT_SYMBOL_NS_GPL(ad_sd_reset, IIO_AD_SIGMA_DELTA);
|
||||
|
||||
int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta,
|
||||
unsigned int mode, unsigned int channel)
|
||||
|
@ -238,7 +238,7 @@ int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sd_calibrate);
|
||||
EXPORT_SYMBOL_NS_GPL(ad_sd_calibrate, IIO_AD_SIGMA_DELTA);
|
||||
|
||||
/**
|
||||
* ad_sd_calibrate_all() - Performs channel calibration
|
||||
|
@ -262,7 +262,7 @@ int ad_sd_calibrate_all(struct ad_sigma_delta *sigma_delta,
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sd_calibrate_all);
|
||||
EXPORT_SYMBOL_NS_GPL(ad_sd_calibrate_all, IIO_AD_SIGMA_DELTA);
|
||||
|
||||
/**
|
||||
* ad_sigma_delta_single_conversion() - Performs a single data conversion
|
||||
|
@ -337,7 +337,7 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
|
|||
|
||||
return IIO_VAL_INT;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sigma_delta_single_conversion);
|
||||
EXPORT_SYMBOL_NS_GPL(ad_sigma_delta_single_conversion, IIO_AD_SIGMA_DELTA);
|
||||
|
||||
static int ad_sd_buffer_postenable(struct iio_dev *indio_dev)
|
||||
{
|
||||
|
@ -465,7 +465,7 @@ int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig)
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sd_validate_trigger);
|
||||
EXPORT_SYMBOL_NS_GPL(ad_sd_validate_trigger, IIO_AD_SIGMA_DELTA);
|
||||
|
||||
static int devm_ad_sd_probe_trigger(struct device *dev, struct iio_dev *indio_dev)
|
||||
{
|
||||
|
@ -524,7 +524,7 @@ int devm_ad_sd_setup_buffer_and_trigger(struct device *dev, struct iio_dev *indi
|
|||
|
||||
return devm_ad_sd_probe_trigger(dev, indio_dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_ad_sd_setup_buffer_and_trigger);
|
||||
EXPORT_SYMBOL_NS_GPL(devm_ad_sd_setup_buffer_and_trigger, IIO_AD_SIGMA_DELTA);
|
||||
|
||||
/**
|
||||
* ad_sd_init() - Initializes a ad_sigma_delta struct
|
||||
|
@ -545,7 +545,7 @@ int ad_sd_init(struct ad_sigma_delta *sigma_delta, struct iio_dev *indio_dev,
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sd_init);
|
||||
EXPORT_SYMBOL_NS_GPL(ad_sd_init, IIO_AD_SIGMA_DELTA);
|
||||
|
||||
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
|
||||
MODULE_DESCRIPTION("Analog Devices Sigma-Delta ADCs");
|
||||
|
|
|
@ -539,7 +539,9 @@ static int aspeed_adc_probe(struct platform_device *pdev)
|
|||
data->clk_scaler = devm_clk_hw_register_divider(
|
||||
&pdev->dev, clk_name, clk_parent_name, scaler_flags,
|
||||
data->base + ASPEED_REG_CLOCK_CONTROL, 0,
|
||||
data->model_data->scaler_bit_width, 0, &data->clk_lock);
|
||||
data->model_data->scaler_bit_width,
|
||||
data->model_data->need_prescaler ? CLK_DIVIDER_ONE_BASED : 0,
|
||||
&data->clk_lock);
|
||||
if (IS_ERR(data->clk_scaler))
|
||||
return PTR_ERR(data->clk_scaler);
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue