- 10 10月, 2017 6 次提交
-
-
由 Michał Mirosław 提交于
KXTF9 has mostly compatible register layout to KXCJK accelerometer. There is no motion direction interrupt support, but there is tap direction detection instead (not implemented in this patch). Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Michał Mirosław 提交于
Make sampling_frequency_avail per-type - like sampling_frequency is. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Michał Mirosław 提交于
In preparation for KXTF9 support, make sampling_frequency_avail attribute dynamic. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Michał Mirosław 提交于
Extract reporting of motion event direction from interrupt handler, as it is not supported by KXTF9. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Michał Mirosław 提交于
Fix INT_CTRL1 bit names to match register name and add names for INT_SRC1 bits. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Michał Mirosław 提交于
Refactor ODR/WUF setting code in preparation of KXTF9 support. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 23 8月, 2017 1 次提交
-
-
由 Jonathan Cameron 提交于
The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de>
-
- 25 7月, 2016 1 次提交
-
-
由 Christophe Chapuis 提交于
On the Cube i9 tablet, the ACPI id for the Kionix kxcj9 accelerometer is "KIOX000A" (as can be seen in the DSDT of the Cube i9 tablet). It is the same accelerometer, so only adding the ACPI id is needed. Signed-off-by: NChristophe Chapuis <chris.chapuis@gmail.com> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.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>
-
- 03 4月, 2016 3 次提交
-
-
由 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>
-
由 Adriana Reus 提交于
Some i2c busses (e.g.: Synopsys DesignWare I2C adapter) need to enable/disable the bus at each i2c transfer and must wait for the enable/disable to happen before sending the data. When reading data in the trigger handler, the kxcjk-1013 accel driver does one i2c transfer for each axis. This has an impact on the frequency of the accelerometer at high sample rates due to additional delays introduced by the i2c bus at each transfer. Reading all axis values in one i2c transfer reduces the delays introduced by the i2c bus. Uses i2c_smbus_read_i2c_block_data_or_emulated that will fallback to reading each axis as a separate word in case i2c block read is not supported. Signed-off-by: NAdriana Reus <adriana.reus@intel.com> Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Acked-by: NJonathan Cameron <jic23@kernel.org> Acked-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Adriana Reus 提交于
Use available_scan_masks to allow the iio core to select the data to send to userspace depending on which axes are enabled, instead of doing this in the driver's interrupt handler. Signed-off-by: NAdriana Reus <adriana.reus@intel.com> Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Acked-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 08 11月, 2015 1 次提交
-
-
由 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>
-
- 03 10月, 2015 1 次提交
-
-
由 Octavian Purdila 提交于
Commit 845c8770 ("i2c / ACPI: Assign IRQ for devices that have GpioInt automatically") automatically assigns the first ACPI GPIO interrupt in client->irq, so we can remove the probing code from drivers that use only one interrupt. Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 24 7月, 2015 1 次提交
-
-
由 Octavian Purdila 提交于
Since patch "i2c / ACPI: Use 0 to indicate that device does not have interrupt assigned" [1], 0 is not a valid i2c client irq anymore, so change all driver's checks accordingly. The same issue occurs when the device is instantiated via device tree with no IRQ, or from the i2c sysfs interface, even before the patch above. [1] http://lkml.kernel.org/g/<1430908148-201129-3-git-send-email-mika.westerberg@linux.intel.com> Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 12 7月, 2015 1 次提交
-
-
由 Ana Calinov 提交于
This patch fixes the the following errors given by checkpatch.pl with --strict: Please don't use multiple blank lines. Blank lines aren't necessary after an open brace '{'. Signed-off-by: NAna Calinov <ana.calinov@gmail.com> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 07 5月, 2015 2 次提交
-
-
由 Antonio Ospite 提交于
Some extra blank lines between if checks don't hurt and improve readability. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Cc: Bastien Nocera <hadess@hadess.net> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Antonio Ospite 提交于
This id has been seen in the DSDT of the Teclast X98 Air 3G tablet based on Intel Bay Trail. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Cc: Bastien Nocera <hadess@hadess.net> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 09 4月, 2015 1 次提交
-
-
由 Vlad Dogaru 提交于
In its present state, the driver mandates that its buffer only be triggered by one of the device's own triggers (data ready or any motion). This is not always desirable, for example because the interrupt pins may not be wired in. Patch the driver to be able to accept using an external trigger, such as one based on hrtimer. When using such a trigger, we need to ensure that the device is powered on when the buffer is started. We do that by setting setup_ops for the buffer. Signed-off-by: NVlad Dogaru <vlad.dogaru@intel.com> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 08 3月, 2015 1 次提交
-
-
由 Octavian Purdila 提交于
If the in-kernel push interface is used we may have a different masks on the device buffer and the kernel buffer and in this case the device should generate data for the reunion of the buffers, which is available at indio_dev->active_scan_mask. Compiled tested only except for bmc150-accel which was tested at runtime with the hardware. Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 22 2月, 2015 1 次提交
-
-
由 Uwe Kleine-König 提交于
Since 39b2bbe3 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for outputs. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 01 1月, 2015 1 次提交
-
-
由 Roberta Dobrescu 提交于
This patch fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: NRoberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 12 12月, 2014 4 次提交
-
-
由 Irina Tirdea 提交于
When the device is initialized in probe, it is also powered on. If there is an error after the initialization, the device will remain powered on. Power off the device in case probe fails after device initialization. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Suggested-by: NDaniel Baluta <daniel.baluta@intel.com> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
If there is an error in set mode at runtime resume, reset the state of the runtime usage count. If there is an error in set mode at runtime suspend, make sure the framework retries to suspend the device. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
When CONFIG_PM is not defined and the driver tries to power off the device, kxcjk1013_set_power_state will call pm_runtime_put_autosuspend, which is not implemented (wil return -ENOSYS). Only call pm_runtime calls to change power state when CONFIG_PM is defined. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
When the system resumes, it will first call system resume and then runtime suspend (if CONFIG_RUNTIME_PM is enabled). There is no need to conditionally power on the device in system resume, so always power it on and leave runtime suspend to power it off if needed. Suggested-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 04 12月, 2014 1 次提交
-
-
由 Rafael J. Wysocki 提交于
After commit b2b49ccb (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under drivers/iio/. Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
-
- 16 11月, 2014 1 次提交
-
-
由 Daniel Baluta 提交于
Currently, we get the new GSEL bits by OR-ing the old values with the new ones. This only works first time when the old values are 0. Startup: * GSEL0 = 0, GSEL1 = 0 Set range to 4G: (GSEL0 = 1, GSEL1 = 0) * GSEL0 = 0 | 1 = 1 * GSEL1 = 0 | 0 = 0 * correct Change range to 2G: (GSEL0 = 0, GSEL1 = 0) * GSEL0 = 1 | 0 = 1 * GSEL1 = 0 | 0 = 0 * wrong, GSEL0 should be 0 This has the nice effect that we can use the full scale range, exported in in_accel_scale_available. Fixes: a735e3d7 (iio: accel: kxcjk-1013: Set adjustable range) Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 08 11月, 2014 1 次提交
-
-
由 Bastien Nocera 提交于
The Onda v975w tablet contains an accelerometer that's advertised over ACPI as SMO8500. This device is however a KXCJ9 accelerometer as can be seen in the Windows driver's INF file, and from the etching on the chipset ("KXCJ9 41566 0414"). This patch also removes the attempt to get the IRQ for the "data ready" signal, as it does not seem to be supported by this device on this platform. Signed-off-by: NBastien Nocera <hadess@hadess.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 06 11月, 2014 1 次提交
-
-
由 Daniel Baluta 提交于
Because IIO_EV_DIR_* are not bitmasks but enums, IIO_EV_DIR_RISING | IIO_EV_DIR_FALLING is not equal with IIO_EV_DIR_EITHER. This could lead to potential misformatted sysfs attributes like: * in_accel_x_thresh_(null)_en * in_accel_x_thresh_(null)_period * in_accel_x_thresh_(null)_value or even memory corruption. Fixes: b4b491c0 (iio: accel: kxcjk-1013: Support threshold) Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 15 9月, 2014 1 次提交
-
-
由 Daniel Baluta 提交于
Noticed when compiling with CONFIG_PM_RUNTIME not set: kxcjk-1013.c: warning: ‘kxcjk1013_get_startup_times’ defined but not used [-Wunused-function] Introduced by commit 124e1b1d (iio: accel: kxcjk-1013: support runtime pm). Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 14 9月, 2014 1 次提交
-
-
由 Daniel Baluta 提交于
This patch adds support for KXTJ2-1009 3-axis acceleromenter sensor. KXTJ2-1009 uses the same register definitions as KXCJK-1013. The specification for KXTJ2-1009 can be downloaded from: http://www.kionix.com/sites/default/files/KXTJ2-1009%20Specifications%20Rev%204.pdfReviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 31 8月, 2014 1 次提交
-
-
由 Daniel Baluta 提交于
This patch adds support for KXCJ9-1008 3-axis acceleromenter sensor. KXCJ9-1008 uses the same register definitions as KXCJK-1013. The specification for KXCJ9-1008 can be downloaded from: http://www.kionix.com/sites/default/files/KXCJ9-1008%20Specifications%20Rev%205.pdfSigned-off-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 27 8月, 2014 2 次提交
-
-
由 Srinivas Pandruvada 提交于
This chip has a motion detect capability. Using IIO events to specify thresholds and pushing events. In addition a new trigger of type any-motion is added, which pushes data to buffer only when there is any movement. Change list: Comments addressed for Re: [PATCH 5/6] iio: accel: kxcjk-1013: Support thresholds Date: 07/20/2014 - Both motion detect and data ready can be enabled together - Sending RISING/FALLING events based on int status - Separate interrupt configuration for data ready and motion detect Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Daniel Baluta 提交于
data->range is already set by kxcjk1013_set_range. Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 07 8月, 2014 2 次提交
-
-
由 Srinivas Pandruvada 提交于
This chip can support 3 different ranges. Allowing range specification. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Srinivas Pandruvada 提交于
In an effort to improve raw read performance and at the same time enter low power state at every possible chance. For raw reads, it will keep the system powered on for a default or user specified time, via autosuspend_delay attribute of device power. This will help read multiple samples without power on/off sequence. For triggers it will keep the system on till, requested to be turned off by trigger state by utilizing run time PM usage counters. When runtime pm is not enabled, then it keeps the chip in operation mode always. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 21 7月, 2014 1 次提交
-
-
由 Peter Meerwald 提交于
driver uses i2c_smbus_read_word_data() to the data in the trigger handler and hence already does endianness conversion; the I2C chip has data in little endian, but the value is provides in CPU endianness Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 20 7月, 2014 2 次提交
-
-
由 Srinivas Pandruvada 提交于
Assigning indio_dev->trig is not a good idea, as this can result in wrong reference count for trigger device. If assigned, it is better to increment reference counter by calling iio_trigger_get. Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion with Jonathan. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Srinivas Pandruvada 提交于
This chip needs explicit interrupt ack, introducing try_reenable callback. Also removed separate function to ack interrupt as this doesn't add any value. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-