- 15 8月, 2016 1 次提交
-
-
由 Alison Schofield 提交于
Select IIO_BUFFER and IIO_TRIGGERED_BUFFER to compile. Remove IIO_TRIGGER if present since IIO_BUFFER selects it. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 03 7月, 2016 1 次提交
-
-
由 Bijosh Thykkoottathil 提交于
Added macros for sensing range as the corresponding magic numbers were used at multiple places. - ISL29125_SENSING_RANGE_0 for 375 lux full range - ISL29125_SENSING_RANGE_1 for 10k lux full range Signed-off-by: NBijosh Thykkoottathil <bijosh.t@hotmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 01 7月, 2016 1 次提交
-
-
由 Gregor Boirie 提交于
Adds a new per-device sysfs attribute "current_timestamp_clock" to allow userspace to select a particular POSIX clock for buffered samples and events timestamping. Following clocks, as listed in clock_gettime(2), are supported: CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, CLOCK_BOOTTIME and CLOCK_TAI. Signed-off-by: NGregor Boirie <gregor.boirie@parrot.com> Acked-by: NSanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 12 6月, 2016 4 次提交
-
-
由 Alison Schofield 提交于
Replace the code that guarantees the device stays in direct mode with iio_device_claim_direct_mode() which does same. Includes a tiny bit of refactoring (single case -> if) and simplified return flow. Also prevents a theoretical race condition by effectively taking the lock a little earlier than before. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alison Schofield 提交于
Replace the code that guarantees the device stays in direct mode with iio_device_claim_direct_mode() which does same. This allows removal of an unused lock in the device private global data. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Acked-by: NPeter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alison Schofield 提交于
Replace the code that guarantees the device stays in direct mode with iio_device_claim_direct_mode() which does same. This allows removal of an unused lock in the device private global data. Also prevents a previous race condition when a buffer is enabled whilst a raw read is going on. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Acked-by: NPeter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alison Schofield 提交于
Replace the code that guarantees the device stays in direct mode with iio_device_claim_direct_mode() which does same. This allows removal of an unused lock in the device private global data. Also prevents a possible race around a buffer being enabled whilst a read is going on. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Acked-by: NPeter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 03 6月, 2016 1 次提交
-
-
由 Yong Li 提交于
Without this, the iio:deviceX is missing in the /sys/bus/i2c/devices/0-0039 Some userspace tools use this path to identify a specific instance of the device. Signed-off-by: NYong Li <sdliyong@gmail.com> Reviewed-By: NMatt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 30 5月, 2016 2 次提交
-
-
由 Linus Walleij 提交于
Using the struct i2c_device->id field for naming the light sensor is a bad idea: when booting from the pure device tree this is NULL and that causes the device not to have the "name" property in sysfs and that in turn confuses the "lsiio" command to stop listing devices. So instead of using the device .id, use the hard string "bh1780", which works just fine. Fixes: 1f0477f1 ("iio: light: new driver for the ROHM BH1780") Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
The code in runtime_[suspend|resume] was assuming that the i2c client data was the bh1780 state container, but it contains the IIO device. So first dereference the IIO device from the i2c client, then get the state container using the iio_priv() call. Fixes: 1f0477f1 ("iio: light: new driver for the ROHM BH1780") Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 22 5月, 2016 2 次提交
-
-
由 Crestez Dan Leonard 提交于
This is not implemented and doesn't really make sense because IIO proximity is unit-less. Remove IIO_CHAN_INFO_SCALE from info_mask because so that the _scale sysfs entry won't appear. This fixes userspace tools like generic_buffer which abort when reads returns an error. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alison Schofield 提交于
This driver does not call i2c_smbus_read|write_byte_data(), so remove the corresponding functionality test. It uses regmap to handle byte transfers transparently. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Reviewed-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Reviewed-by: NMatt Ranostay <matt.ranostay@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 04 5月, 2016 1 次提交
-
-
由 Linus Walleij 提交于
When writing a value using direct reg access from debugfs we need to return and not fall through to reading the value, lest we'll dereference a NULL pointer. Cc: Dan Carpenter <dan.carpenter@oracle.com> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 24 4月, 2016 6 次提交
-
-
由 Crestez Dan Leonard 提交于
Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
This patch exposes ALSTIM as illuminance_integration_time and ALSPGA as illuminance_scale. Changing ALSTIM also changes the number of bits available in the data register. This is handled inside raw value reading because: * It's very easy to shift a few bits * It allows SCALE and INT_TIME to be completely independent controls * Buffer support requires constant scan_type.realbits per-channel Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
This is exposed as an output channel with "led" as an extend_name. Other sensors also have support for controlling an external LED. It's not clear that simply exposing an undecorated output channel is the correct approach. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
The proximity sensor relies on sending pulses to an external IR led and it is disabled by default on powerup. The driver will enable it with a default power setting. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
This just adds support for reporting illuminance with default settings. Important default registers are written on probe because the device otherwise lacks a reset function. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Dan Carpenter 提交于
It causes a static checker warning if we use "buf" on the failure path so move that inside the if statement. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 20 4月, 2016 1 次提交
-
-
由 Peter Meerwald-Stadler 提交于
ultraviolet (UV) light sensor with I2C interface with a peak sensitivity at 355 nm strangely, chip uses two addresses 0x38 and 0x39 for LSB and MSB data, resp. datasheet: http://www.vishay.com/docs/84277/veml6070.pdfSigned-off-by: NPeter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 17 4月, 2016 1 次提交
-
-
由 Linus Walleij 提交于
This is a reimplementation of the old misc device driver for the ROHM BH1780 ambient light sensor (drivers/misc/bh1780gli.c). Differences from the old driver: - Uses the IIO framework - Uses runtime PM to idle the hardware after 5 seconds - No weird custom power management from userspace - No homebrewn values in sysfs This uses the same (undocumented) device tree compatible-string as the old driver ("rohm,bh1780gli"). Cc: Arnd Bergmann <arnd@arndb.de> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Daniel Mack <daniel@caiaq.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 16 4月, 2016 1 次提交
-
-
由 Slawomir Stepien 提交于
This fixes the error reported by checkpatch.pl: ERROR: that open brace { should be on the previous line Signed-off-by: NSlawomir Stepien <sst@poczta.fm> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 03 4月, 2016 1 次提交
-
-
由 Irina Tirdea 提交于
GPIO handling code has been removed from the drivers (since this is now handled by the ACPI core) in commit 0f079650 ("iio: remove gpio interrupt probing from drivers that use a single interrupt"). Remove the include for linux/gpio/consumer.h since it is no longer used. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 20 3月, 2016 2 次提交
-
-
由 Amitoj Kaur Chawla 提交于
flush_scheduled_work is scheduled for deprecation. Replace cancel_delayed_work and flush_scheduled_work with cancel_delayed_work_sync instead to ensure there is no pending or running work item. Since there is only one work item, chip->poweroff_work, there are no further dependencies of flush_scheduled_work(). Acked-by: NTejun Heo <tj@kernel.org> Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Matt Ranostay 提交于
Correct issue that the last entry in FIFO was being read twice due to an incorrect decrement of entry count variable before condition check. Signed-off-by: NMatt Ranostay <mranostay@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 28 2月, 2016 1 次提交
-
-
由 Matt Ranostay 提交于
Previously most drivers that used a i2c_check_functionality() check condition required various error codes on failure. This patchset converts to a standard of -EOPNOTSUPP Signed-off-by: NMatt Ranostay <mranostay@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 31 1月, 2016 3 次提交
-
-
由 Alexander Koch 提交于
Enable operation of the TI OPT3001 light sensor without having an interrupt line available to connect the INT pin to. In this operation mode, we issue a conversion request and simply wait for the conversion time available as timeout value, determined from integration time configuration and the worst-case time given in the data sheet (sect. 6.5, table on p. 5): short integration time (100ms): 110ms + 3ms = 113ms long integration time (800ms): 880ms + 3ms = 883ms This change is transparent as behaviour defaults to using the interrupt method if an interrupt no. is configured via device tree. Interrupt-less operation mode is performed when no valid interrupt no. is given. Signed-off-by: NAlexander Koch <mail@alexanderkoch.net> Signed-off-by: NMichael Hornung <mhornung.linux@gmail.com> Tested-by: NAndreas Dannenberg <dannenberg@ti.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alexander Koch 提交于
Change variable type of struct opt3001 members 'ok_to_ignore_lock' and 'result_ready' uint16-bitfield of length one to bool. They are used as bool, let the compiler do the optimization. Signed-off-by: NAlexander Koch <mail@alexanderkoch.net> Signed-off-by: NMichael Hornung <mhornung.linux@gmail.com> Tested-by: NAndreas Dannenberg <dannenberg@ti.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alexander Koch 提交于
Extract integration times as #define constants. This prepares using them for delay/timeout length determination. Signed-off-by: NAlexander Koch <mail@alexanderkoch.net> Signed-off-by: NMichael Hornung <mhornung.linux@gmail.com> Tested-by: NAndreas Dannenberg <dannenberg@ti.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 16 1月, 2016 1 次提交
-
-
由 Gabriele Mazzotta 提交于
As per the ACPI specification (Revision 5.0) [1], the data coming from the sensor represent the ambient light illuminance reading expressed in lux. So use IIO_CHAN_INFO_PROCESSED to signify that the data are pre-processed. However, to keep backward ABI compatibility, the IIO_CHAN_INFO_RAW bit is not removed. [1] http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf This issue has also been responsible for at least one userspace bug report hence marking what is a small semantic fix really for stable. [2] https://github.com/hadess/iio-sensor-proxy/issues/46Signed-off-by: NGabriele Mazzotta <gabriele.mzt@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 23 12月, 2015 3 次提交
-
-
由 Adriana Reus 提交于
A bit of refactoring for better readability. Moved and slightly reorganized all the activity necessary for reading als and proximity into a different function. This way the switch in read raw becomes clearer and more compact. Signed-off-by: NAdriana Reus <adriana.reus@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Adriana Reus 提交于
Add interrupt support for proximity. Add two threshold events to signal rising and falling directions. Signed-off-by: NAdriana Reus <adriana.reus@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Adriana Reus 提交于
When setting als only or proximity only modes make sure that we mark the other component as disabled. This fix is in preparation of adding event support because that will make it possible to switch between one-shot and continuous modes and not tracking these correctly may cause faulty behaviour (e.g wrongfully considering px enabled and not setting an appropriate mode in the chip). Signed-off-by: NAdriana Reus <adriana.reus@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 20 12月, 2015 1 次提交
-
-
由 Markus Elfring 提交于
The return type "unsigned int" was used by the ltr501_match_samp_freq() function despite of the aspect that it will eventually return a negative error code. Improve this implementation detail by deletion of the type modifier then. This issue was detected by using the Coccinelle software. Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net> Acked-by: NPeter Meerwald-Stadler <pmeerw@pmeerw.net> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 03 12月, 2015 3 次提交
-
-
由 Adriana Reus 提交于
Add power management for sleep as well as runtime pm. Signed-off-by: NAdriana Reus <adriana.reus@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Adriana Reus 提交于
Keep track of the als and px enabled/disabled status in order to enable them selectively. Signed-off-by: NAdriana Reus <adriana.reus@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Adriana Reus 提交于
This chip supports two power modes. 1. "one-shot" mode - the chip activates and executes one complete conversion loop and then shuts itself down. This is the default mode chosen for raw reads. 2. "continuous" mode - the chip takes continuous measurements. Continuous mode is more expensive power-wise but may be more reliable. Add a property so that if preferred, the default power mode for raw reads can be set to continuous. Separate one-shot enabling in a separate function that will be used depending on the chosen power mode. Also create a function for powering the chip on and off. Signed-off-by: NAdriana Reus <adriana.reus@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 21 11月, 2015 1 次提交
-
-
由 Matt Ranostay 提交于
Add missing pm_runtime_mark_last_busy to apds9960_set_power_state function. Unless pm_runtime_mark_last_busy is called the pm_runtime_put_autosuspend may put the device into suspend before the delay time requested. Signed-off-by: NMatt Ranostay <mranostay@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 08 11月, 2015 2 次提交
-
-
由 Adriana Reus 提交于
At probe, runtime pm should be setup before registering the sysfs interface so that all the power attributes are accurate and functional when registering. Also, when removing the device we should unregister first to make sure that the interfaces that may result in wakeups are no longer available. Fix this behaviour for the following drivers: bmc150, bmg160, kmx61, kxcj-1013, mma9551, mma9553, rpr0521. Signed-off-by: NAdriana Reus <adriana.reus@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Adriana Reus 提交于
Make sure we poweroff the chip if for any reason iio_register returns an error. Signed-off-by: NAdriana Reus <adriana.reus@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-