- 14 Mar, 2015 5 commits
-
-
Haneen Mohammed authored
This patch adds ABI documentation entries for in_accel_thresh_falling_value, and in_accel_thresh_rising_value in /events. There is at least one user for these, lis3l02dq in accel. Signed-off-by:
Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Octavian Purdila authored
Add a separate structure for triggers and add the infrastructure to support an arbitrary number of triggers. Each trigger is associated with an interrupt and has an enabled/disabled state. Signed-off-by:
Octavian Purdila <octavian.purdila@intel.com> Acked-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Octavian Purdila authored
Since both triggers and events can share an interrupt, add a data structure that tracks the users of an interrupt so that it enables or disables it only for the first users and respectively last user. This will allows us to easily add more events or triggers. The patch also adds an interrupt enabled counter, so that we can easily know if we need to put the device in normal mode when the resume callback is issued. Signed-off-by:
Octavian Purdila <octavian.purdila@intel.com> Reviewed-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Haneen Mohammed authored
This patch adds ABI documentation entries for in_proximity_en, in_proximity_type, and in_proximity_index in the scan_elements directory. At least one user for these is present, the AS3935 Franklin lightning sensor. Signed-off-by:
Haneen Mohammed <hamohammed.sa@gmail.com> Reviewed-by:
Daniel Baluta <daniel.baluta@intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Darshana Padmadas authored
This patch adds ABI documentation entries for in_magn_offset. There is one user, hid-sensor-magn-3d in drivers/iio/magnetometer. Signed-off-by:
Darshana Padmadas <darshanapadmadas@gmail.com> Reviewed-by:
Daniel Baluta <daniel.baluta@intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 12 Mar, 2015 2 commits
-
-
Søren Andersen authored
Signed-off-by:
Soeren Andersen <san@rosetechnology.dk> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Søren Andersen authored
Bring the Kconfig entry up to date with parts supported by the driver. Signed-off-by:
Soeren Andersen <san@rosetechnology.dk> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 09 Mar, 2015 11 commits
-
-
Roberta Dobrescu authored
This patch removes unused variables from lsiio.c in order to get rid of the warnings regarding them. Signed-off-by:
Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Roberta Dobrescu authored
Definition of _GNU_SOURCE is needed to get rid of some warnings, such as: warning: implicit declaration of function `asprintf'. generic_buffer.c and iio_event_monitor.c define _GNU_SOURCE, but it is also needed in lsiio.c and iio_utils.c. For this reason, this patch adds the definition in Makefile and removes it from where it already exists. Signed-off-by:
Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Roberta Dobrescu authored
This patch moves iio userspace applications out of staging, to tools/iio/ and adds a Makefile in order to compile them easily. It also adds tools/iio/ to MAINTAINERS file. Signed-off-by:
Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Roberta Dobrescu authored
This patch removes inline functions from iio_utils.h in order to clean the code. iio_utils.c contains the implementation of the functions used by iio_event_monitor.c, lsiio.c or generic_buffer.c and iio_utils.h contains the declarations of these functions. Since iio_utils.h is modified, generic_buffer.c and iio_event_monitor.c must include stdlib.h. Signed-off-by:
Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Roberta Dobrescu authored
By adding this line and installing the kernel headers with make headers_install, iio_event_monitor can be compiled without any hacks. Signed-off-by:
Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Vianney le Clément de Saint-Marcq authored
The defined registers only make sense when used for accessing RAM. Make MLX90614_OP_RAM part of the symbol definition to avoid accidental access to the wrong register. Signed-off-by:
Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
NeilBrown authored
Unless we put the device to sleep when not it use, it wastes 6mA. If the device is asleep on probe, the 'id' register sometimes mis-reads - so reset first. If the device responds at all a command sent to the address, it is almost certainly the correct device already. Acked-by:
Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Acked-by:
Hartmut Knaack <knaack.h@gmx.de> Signed-off-by:
NeilBrown <neil@brown.name> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Martin Fuzzey authored
Signed-off-by:
Martin Fuzzey <mfuzzey@parkeon.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Roberta Dobrescu authored
The return value of gpiod_to_irq should be checked before giving it to devm_request_threaded_irq in order to not pass an error code in case it fails. Signed-off-by:
Roberta Dobrescu <roberta.dobrescu@gmail.com> Reviewed-by:
Vlad Dogaru <vlad.dogaru@intel.com> Acked-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Angelo Compagnucci authored
Adding binding documentation for ADC MCP3422. Signed-off-by:
Angelo Compagnucci <angelo.compagnucci@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Angelo Compagnucci authored
Adding binding documentation for Texas Instruments' ADC128S052 ADC chip. Signed-off-by:
Angelo Compagnucci <angelo.compagnucci@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 08 Mar, 2015 3 commits
-
-
Kevin Tsai authored
Added Power Management Support. Signed-off-by:
Kevin Tsai <ktsai@capellamicro.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Tolga Ceylan authored
Code reformatting based on checkpatch.pl with --strict: Comparison to NULL rewritten as !indio_dev Signed-off-by:
Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Tolga Ceylan authored
Code reformatting based on checkpatch.pl with --strict: Alignment should match open paranthesis cases corrected Signed-off-by:
Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 07 Mar, 2015 1 commit
-
-
Masanari Iida authored
This patch fix spelling typo in MODULE_DESCRIPTION Signed-off-by:
Masanari Iida <standby24x7@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 25 Feb, 2015 3 commits
-
-
Srinivas Pandruvada authored
This is a follow up patches after adding i2c mux adapter for bypass mode. Potentially many different types of sensor can be attached to INVMPU6XXX device, which can be connected to main cpu i2c bus in bypass mode. Why do we need this? The system ACPI table entry will consist of only one device for INV6XXX, assuming that this driver will handle all connected sensors. That is not true for the Linux driver. There are bunch of IIO drivers for each sensors, hence we created a mux on this device. So to load these additional drivers, we need to create i2c devices for them in this driver using this mux adapter. There are multiple options: 1. Use the auto detect feature, this needs a new i2c class for the adapter as the existing HWMON class is not acceptable. Also the autodetect has overhead of executing detect method for each matching class of adapters. This is a simple implementation. This option was previously submitted with not a happy feedback. 2. Option is use ACPI magic and parse the configuration data. What we need to create a i2c device at a minimum is address and a name. Address can be obtained for secondary device in more or less in a standard way from using _CRS element. But there is no name. To get name we need to process proprietary vendor data. Not having name is not fun, as you have to create device using the device name of INVN6XXXX, respecting driver duplicate name space restriction. Also each client driver needs to have this name in the id table. Since multiple driver can be loaded, the driver should be able to detect its presence and gracefully exit for the other client driver to take it over. So we use two step process: - Use DMI to id platform and parse propritery data. This is not uncommon for many x86 platform specific driver. We will get both name and address. The change created necessary infrastructure to add more properitery vendor data parsing. - If DMI match fails, then create device on INV6XXX-client (we can't create with same name as INV6XXX as it will cause duplicate name and driver model will reject.) With this each client sensor driver which needs to get attached via INV6XXXX, need this name in the id table and detect the physical presence of sensor in probe and exit if not found. Signed-off-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Krzysztof Kozlowski authored
The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Signed-off-by:
Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Krzysztof Kozlowski authored
The regmap_access_table and regmap_config structures may be const because they are not modified by the driver and regmap_init() accepts pointer to const. Signed-off-by:
Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 22 Feb, 2015 1 commit
-
-
Uwe Kleine-König authored
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:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Alexandre Courbot <acourbot@nvidia.com> Reviewed-by:
Daniel Baluta <daniel.baluta@intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 21 Feb, 2015 1 commit
-
-
Rickard Strandqvist authored
Change struct iio_prtc_trigger_info frequency type from int to unsigned int. Since it is always treated as such in the driver so they type should probably reflect this. Signed-off-by:
Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 14 Feb, 2015 2 commits
-
-
Vaishali Thakkar authored
This patch introduces the use of function put_unaligned_le32. This is done using Coccinelle and semantic patch used is as follows: @@ identifier tmp; expression ptr; expression y,e; type T; @@ - tmp = cpu_to_le32(y); <+... when != tmp - memcpy(ptr, (T)&tmp, ...); + put_unaligned_le32(y,ptr); ...+> ? tmp = e @@ type T; identifier tmp; @@ - T tmp; ...when != tmp Signed-off-by:
Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Daniel Baluta authored
After UAPI header file split [1] all user-kernel interfaces were placed under include/uapi/. This patch moves IIO user specific API from: * include/linux/iio/events.h => include/uapi/linux/iio/events.h * include/linux/types.h => include/uapi/linux/types.h Now there is no need for nasty tricks to compile userspace programs (e.g iio_event_monitor). Just installing the kernel headers with make headers_install command does the job. [1] http://lwn.net/Articles/507794/Signed-off-by:
Daniel Baluta <daniel.baluta@intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 08 Feb, 2015 7 commits
-
-
Rickard Strandqvist authored
Wrong type in printf format string, requires 'int' but the argument type is 'unsigned int' This was found using a static code analysis program called cppcheck Signed-off-by:
Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Rickard Strandqvist authored
Wrong type in printf format string, requires 'int' but the argument type is 'unsigned int' This was found using a static code analysis program called cppcheck Signed-off-by:
Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Tolga Ceylan authored
Line over 80 characters corrected Signed-off-by:
Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Tolga Ceylan authored
Indentation corrections in struct initializations and one line over 80 characters split into two lines Signed-off-by:
Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Octavian Purdila authored
Previous of this patch the check was only done if we enabled the event and it was already enabled. We can do the same if the event is disabled and we want to disable it. The patch also adds the same check on the trigger code. Signed-off-by:
Octavian Purdila <octavian.purdila@intel.com> Acked-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Octavian Purdila authored
This patch combines the any motion and new data interrupts function into a single, generic, interrupt enable function. On top of this, we can later refactor triggers to make it easier to add new triggers. Signed-off-by:
Octavian Purdila <octavian.purdila@intel.com> Acked-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Octavian Purdila authored
Move the slope duration and threshold update in a separate function to reduce code duplicate between chip init and motion interrupt setup. Also move the slope update code from the interrupt setup function to the trigger set state function so that we can later refactor the interrupt code. Signed-off-by:
Octavian Purdila <octavian.purdila@intel.com> Acked-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 04 Feb, 2015 2 commits
-
-
Octavian Purdila authored
Move all core (non-custom) buffer attributes to a vector to make it easier to add more of them in the future. Signed-off-by:
Octavian Purdila <octavian.purdila@intel.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Nicholas Mc Guire authored
return type of wait_for_completion_timeout is unsigned long not int, this patch only fixes up the return handling. Signed-off-by:
Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
- 03 Feb, 2015 2 commits
-
-
Daniel Baluta authored
odr_bits values are between 0 and 11, so we can use the index in kmx61_samp_freq_table instead of odr_bits structure member. Signed-off-by:
Daniel Baluta <daniel.baluta@intel.com> Reviewed-by:
Hartmut Knaack <knaack.h@gmx.de> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-
Devendra Naga authored
This patch adds the error handling for the value returned from ade7759_spi_read_reg_16. With this patch, the following randconfig warnings get fixed automatically. drivers/staging/iio/meter/ade7759.c:224:6: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/staging/iio/meter/ade7759.c:309:6: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by:
Devendra Naga <devendra.aaru@gmail.com> Signed-off-by:
Jonathan Cameron <jic23@kernel.org>
-