- 24 10月, 2016 20 次提交
-
-
由 Brian Masney 提交于
Move ISL29018/ISL29023/ISL29035 driver out of staging into mainline. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Brian Masney 提交于
Add ABI documentation from the ISL29018 Data Sheet (FN6619.4, Oct 8, 2012) about the infrared suppression that can be controlled with the proximity_on_chip_ambient_infrared_suppression sysfs attribute. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alison Schofield 提交于
Driver was checking for direct mode but not locking it. Use claim/release helper functions to guarantee the device stays in direct mode during raw reads. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Jonathan Cameron 提交于
Driver was checking for direct mode but not locking it. Use claim/release helper functions to guarantee the device stays in direct mode during all write raw operations. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alison Schofield 提交于
Driver was checking for direct mode but not locking it. Use claim/release helper functions to guarantee the device stays in direct mode during raw reads. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Eva Rachel Retuya 提交于
If attribute/s is/are already enabled (by default or via scripts or manual interaction), issuing -a will fail to enable the channels thereby one has to manually disable the said attribute/s before proceeding with auto-enabling. Add a command-line option -A to force-activate all channels regardless of their current state. Suggested-by: NAlison Schofield <amsfield22@gmail.com> Signed-off-by: NEva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Tomas Novotny 提交于
Use a standard framework to get the reference voltage. It is done that way in the iio subsystem and it will simplify extending of the driver. Structure mcp4725_platform_data is left undeleted because it used in the next patch. This change breaks the current users of the driver, but there is no mainline user of struct mcp4725_platform_data. Signed-off-by: NTomas Novotny <tomas@novotny.cz> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crt Mori 提交于
Change in handling of the regulator description means that static checkers correctly assume we could be using dereferenced pointer to the regulator. In reality we will never get the -ENODEV error, as current behavior flow does not predict it, because: If the device tree or board file does not define suitable regulators for the component, it will be substituted by a dummy regulator, or, if regulators are disabled altogether, by stubs. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Suggested-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NCrt Mori <cmo@melexis.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Dan Carpenter 提交于
The "drivers/" part of the path name was missing. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 sayli karnik 提交于
There is a type mismatch between the buffer which is of type s16 and the samples stored, which are declared as __le16. Fix the following sparse warning: drivers/iio/imu/bmi160/bmi160_core.c:411:26: warning: incorrect type in assignment (different base types) drivers/iio/imu/bmi160/bmi160_core.c:411:26: expected signed short [signed] [short] [explicitly-signed] <noident> drivers/iio/imu/bmi160/bmi160_core.c:411:26: got restricted __le16 [addressable] [usertype] sample This is a cosmetic-type patch since it does not alter code behaviour. The le16 is going into a 16bit buf element, and is labelled as IIO_LE in the channel buffer definition. Signed-off-by: Nsayli karnik <karniksayli1995@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Brian Masney 提交于
Rename description from "ISL 29018" to "Intersil 29018" in Kconfig for consistency with other drivers in mainline. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Brian Masney 提交于
Remove blank line between MODULE_DEVICE_TABLE() and its corresponding structure for consistency with the other device table entries. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Brian Masney 提交于
Use the return value from isl29018_set_integration_time() as the return value for isl29018_chip_init() since this is the last piece of work inside that function. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Brian Masney 提交于
Change multiline comments from: /* line1 * line2 * ... */ to /* * line1 * line2 * ... */ Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Brian Masney 提交于
isl29035_detect() did not just do chip detection. Move functionality directly into isl29018_chip_init() to avoid naming confusion. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Brian Masney 提交于
Add newlines to improve code readability in preparation for moving the driver out of staging. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Jonathan Cameron 提交于
There is still stuff to be done in the remaining drivers but pretty much nothing was left from this original TODO. Sorry Greg, should have been keeping this up to date. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 sayli karnik 提交于
mlock is intended to protect only switches between modes. Given this driver doesn't support more than one mode (sysfs polled reads only), replace mlock with a local mutex lock. Signed-off-by: Nsayli karnik <karniksayli1995@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Eva Rachel Retuya 提交于
This driver predates the availability of IIO_CHAN_INFO_SAMP_FREQ attribute wherein usage has some advantages like it can be accessed by in-kernel consumers as well as reduces the code size. Therefore, use IIO_CHAN_INFO_SAMP_FREQ to implement the sampling_frequency attribute instead of using IIO_DEVICE_ATTR() macro. Move code from the functions associated with IIO_DEVICE_ATTR() into respective read and write hooks with the mask set to IIO_CHAN_INFO_SAMP_FREQ. Signed-off-by: NEva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 sayli karnik 提交于
Attributes that were once privately defined become standard with time and hence a special global define is used. Hence update driver ad7152 to use IIO_CHAN_INFO_SAMP_FREQ which is a global define instead of IIO_DEV_ATTR_SAMP_FREQ. Move functionality from IIO_DEV_ATTR_SAMP_FREQ attribute into IIO_CHAN_INFO_SAMP_FREQ to implement the sampling_frequency attribute. Modify ad7152_read_raw() and ad7152_write_raw() to allow reading and writing the element as well. Also add a lock in the driver's private data. Signed-off-by: Nsayli karnik <karniksayli1995@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 12 10月, 2016 9 次提交
-
-
由 Brian Masney 提交于
Add documentation from the ISL29018 Data Sheet (FN6619.4, Oct 8, 2012) about the infrared suppression that can be controlled with the proximity_on_chip_ambient_infrared_suppression sysfs attribute. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Brian Masney 提交于
Fix the following warnings from checkpatch: WARNING: DT compatible string "isil,isl29018" appears un-documented -- check ./Documentation/devicetree/bindings/ WARNING: DT compatible string "isil,isl29023" appears un-documented -- check ./Documentation/devicetree/bindings/ WARNING: DT compatible string "isil,isl29035" appears un-documented -- check ./Documentation/devicetree/bindings/ Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Sandhya Bankar 提交于
This driver predates the availability of IIO_CHAN_INFO_SAMP_FREQ attribute wherein usage has some advantages like it can be accessed by in-kernel consumers as well as reduces the code size. Hence moving functionality from IIO_DEV_ATTR_SAMP_FREQ attribute into IIO_CHAN_INFO_SAMP_FREQ handlers. Also Adding ade7758_read_raw() and ade7758_write_raw() to allow reading/writing the element as well. Signed-off-by: NSandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hans de Goede 提交于
Recently the kernel has gotten support in the iio subsystem for a number of new accelerometers from mCube, Memsic and MiraMEMS. This commit adds the vendor prefixes already used for these vendors in Documentation/devicetree/bindings/i2c/trivial-devices.txt to vendor-prefixes.txt. The "full" company names were taken from the company's websites: http://www.mcubemems.com/ http://www.memsic.com/ http://www.miramems.com/en/Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hans de Goede 提交于
Add an iio driver for the MiraMEMS DA280 3-axis 14-bit accelerometer, as well as for the DA226 which is a fully compatible 2-axis version. Datasheets for the DA280 and DA226 can be found at the manufacturers site: http://www.miramems.com/en/products.asp?list=1Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Eva Rachel Retuya 提交于
This driver predates the availability of IIO_CHAN_INFO_SAMP_FREQ attribute wherein usage has some advantages like it can be accessed by in-kernel consumers as well as reduces the code size. Therefore, use IIO_CHAN_INFO_SAMP_FREQ to implement the sampling_frequency attribute instead of using IIO_DEV_ATTR_SAMP_FREQ() macro. Move code from the functions associated with IIO_DEV_ATTR_SAMP_FREQ() into respective read and write hooks with the mask set to IIO_CHAN_INFO_SAMP_FREQ. Signed-off-by: NEva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hans de Goede 提交于
This driver is based on the DA311 Android driver which can be found here: https://git.matricom.net/Firmware/kernel_amlogic_meson-common/tree/1e70113a5befd07debb68f537156def84c5be57a/drivers/amlogic/input/sensor the mir3da_* files are the DA311 driver. Unfortunately there is no datasheet. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hans de Goede 提交于
Add a driver for the Domintech ARD10 3-axis Accelerometer, based on the android driver found here: https://github.com/domintech/dmard10Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hans de Goede 提交于
Add compatible strings for 2 accelerometers which follow the trivial i2c device bindings and have been supported by the iio subsystem for a while now. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 09 10月, 2016 2 次提交
-
-
由 Eva Rachel Retuya 提交于
This driver predates the availability of IIO_CHAN_INFO_OVERSAMPLING_RATIO attribute wherein usage has some advantages like it can be accessed by in-kernel consumers as well as reduces the code size. Therefore, use IIO_CHAN_INFO_OVERSAMPLING_RATIO to implement the oversampling_ratio attribute instead of using IIO_DEVICE_ATTR() macro. Move code from the functions associated with IIO_DEVICE_ATTR() into the read_raw hook as well as add the write_raw hook with both masks set to IIO_CHAN_INFO_OVERSAMPLING_RATIO. Signed-off-by: NEva Rachel Retuya <eraretuya@gmail.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Eva Rachel Retuya 提交于
The oversampling ratio is controlled using the oversampling pins, OS [2:0] with OS2 being the MSB control bit, and OS0 the LSB control bit. The gpio connected to the OS2 pin is not being set correctly, only OS0 and OS1 pins are being set. Fix the typo to allow proper control of the oversampling pins. Signed-off-by: NEva Rachel Retuya <eraretuya@gmail.com> Fixes: b9618c0c ("staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4") Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 04 10月, 2016 6 次提交
-
-
由 Ico Doornekamp 提交于
Fixes two cases of 'cast to restricted __le16' as reported by sparse. Signed-off-by: NIco Doornekamp <ico@pruts.nl> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Bhumika Goyal 提交于
Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.event_attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 3561 1152 8 4721 1271 drivers/staging/iio/cdc/ad7150.o File size after: text data bss dec hex filename 3625 1088 8 4721 1271 drivers/staging/iio/cdc/ad7150.o Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Bhumika Goyal 提交于
Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.event_attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 11013 6096 0 17109 42d5 drivers/staging/iio/addac/adt7316.o File size after: text data bss dec hex filename 11141 5968 0 17109 42d5 drivers/staging/iio/addac/adt7316.o Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Bhumika Goyal 提交于
Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.event_attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 3295 768 0 4063 fdf drivers/staging/iio/adc/ad7816.o File size after: text data bss dec hex filename 3359 736 0 4095 fff drivers/staging/iio/adc/ad7816.o Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Bhumika Goyal 提交于
Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.event_attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 6271 672 776 7719 1e27 drivers/staging/iio/adc/ad7280a.o File size after: text data bss dec hex filename 6335 608 776 7719 1e27 drivers/staging/iio/adc/ad7280a.o Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Anchal Jain 提交于
Add a blank line after the function to increase the readability of the code. Signed-off-by: NAnchal Jain <anchalj109@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 02 10月, 2016 2 次提交
-
-
由 William Breathitt Gray 提交于
The ACCES 104-QUAD-8 is a general purpose quadrature encoder counter/interface board. The 104-QUAD-8 is capable of monitoring the outputs of eight encoders via four on-board LSI/CSI LS7266R1 24-bit dual-axis quadrature counter chips. Core functions handled by the LS7266R1, such as direction and total count, are available. Performing a write to a counter's IIO_CHAN_INFO_RAW sets the counter and also clears the counter's respective error flag. Although the counters have a 25-bit range, only the lower 24 bits may be set, either directly or via a counter's preset attribute. Interrupts are not supported by this driver. This driver adds IIO support for the ACCES 104-QUAD-8 and ACCES 104-QUAD-4. The base port addresses for the devices may be configured via the base array module parameter. Signed-off-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 William Breathitt Gray 提交于
Quadrature encoders, such as rotary encoders and linear encoders, are devices which are capable of encoding the relative position and direction of motion of a shaft. This patch introduces several IIO constants for supporting quadrature encoder counter devices. IIO_COUNT: Current count (main data provided by the counter device) IIO_INDEX: Counter device index value Signed-off-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 01 10月, 2016 1 次提交
-
-
由 Marcin Malagowski 提交于
This patch adds minimal driver for the Honeywell Amplified Basic Pressure sensors series. Sensors are pretty simple but are available in many variants: - psi/mbar/kPa output, - analog/i2c/spi, - gage/differential measurement, - different measure ranges etc. Refer to datasheets for more details: http://sensing.honeywell.com/honeywell-sensing-basic-board-mount-pressure-sensors-abp-series-datasheet-323005128-c-en.pdf http://sensing.honeywell.com/index.php%3Fci_id%3D45841 Driver internals: - i2c only. measure request is done by the SMBUS QUICK cmd, so if the i2c bus doesn't support it, it is required to send a dummy byte to trigger measurement, - since iio sysfs expects kilopascals, mbar-variants are treated as their respective kPa-s, hence i2c id-table has doubled entries in one line: { "abp060mg", ABP006KG }, { "abp006kg", ABP006KG }, - psi-variants have prescaled values in config, - no temperature reads yet. Work remained: - optional temperature channel, - SPI support, - DT binding. Changes since v1: - mutex is now locked in read_raw(), - corrected error codes, - fixed coding style issues, - renamed few defines and functions abp -> abp060mg (some structs left as they were to keep the sensible meaning). Signed-off-by: NMarcin Malagowski <mrc@bourne.st> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-