summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
Commit message (Collapse)AuthorAgeFilesLines
* staging: iio: accel: Rename source files and update MakefileNarcisa Ana Maria Vasile2017-03-055-7/+0Star
| | | | | | | | | | | | | | | Rename adis162xx_core.c files to adis162xx.c because these are the only source files for these drivers. Update Makefile to correspond to the new file names. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> rename drivers/staging/iio/accel/{adis16201_core.c => adis16201.c} (100%) rename drivers/staging/iio/accel/{adis16203_core.c => adis16203.c} (100%) rename drivers/staging/iio/accel/{adis16209_core.c => adis16209.c} (100%) rename drivers/staging/iio/accel/{adis16240_core.c => adis16240.c} (100%) Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: meter: ade7753: Clean up includesKatie Dunne2017-03-041-7/+6Star
| | | | | | | Alphabetize header files. Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: meter: ade7753: Move header content to implementation fileKatie Dunne2017-03-042-73/+68Star
| | | | | | | | The contents of ade7753.h are only used in ade7753.c. Move the header contents to the implementation file and delete the header file. Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16240: Move contents of the header to the source fileNarcisa Ana Maria Vasile2017-03-042-180/+174Star
| | | | | | | | The contents of the header file are used only by this single source file. Move content into .c file and remove header. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16209: Move contents of the header to the source fileNarcisa Ana Maria Vasile2017-03-042-145/+139Star
| | | | | | | | The contents of the header file are used only by this single source file. Move content into .c file and remove header. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: ad9834: Moved contents of the header to the source fileNarcisa Ana Maria Vasile2017-03-022-72/+72
| | | | | | | | | Moved the contents of the header(ad9834.h) into the corresponding source file with the exception of the platform data struct which is supposed to be used from somewhere else other than the driver. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: ad9832: Moved contents of the header to the source fileNarcisa Ana Maria Vasile2017-03-022-92/+92
| | | | | | | | | Moved the contents of the header(ad9832.h) into the corresponding source file with the exception of the platform data struct which is supposed to be used from somewhere else other than the driver. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16203: Move header file content to source file.Varsha Rao2017-03-022-133/+128Star
| | | | | | | | | The contents of the header file are used only by this single source file. Moved content into adis16203_core.c file and removed adis16203.h file. Arranged #include files in alphabetical order. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: accel: adis16201: Move header file content to source filesimran singhal2017-03-022-145/+139Star
| | | | | | | | The contents of the header file are used only by this single source file. Move content into .c and remove .h. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: ad7152: Use BIT() macro for left shifting 1sayli karnik2017-02-251-4/+4
| | | | | | | | | Replace left shifting on 1 with the BIT(x) macro as suggested by checkpatch.pl. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Staging: iio: impedance-analyzer: ad5933.c - style fixDerek Robson2017-02-191-8/+8
| | | | | | | | Change permissions to octal style. Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: compress return logicGargi Sharma2017-02-181-3/+1Star
| | | | | | | | | | | | | | | | | | | | Simplify function returns by merging assignment and return. Found with Coccinelle. Semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gargi Sharma <gs051095@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16240_core: Replace symbolic permission with octal permissionsayli karnik2017-02-181-1/+1
| | | | | | | | | The patch resolves following checkpatch issue: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:lpc32xx Move out of staging.Jonathan Cameron2017-02-113-232/+0Star
| | | | | | | | | | | | | There are a few more little cleanups that could be done on this driver, but I don't think any are sufficient to justify not moving it out of staging. It's a very simple driver (presumably for a simple part) so not much that can go wrong. I think it was only ever in staging because that's where IIO was as a whole at the time and then we forgot about it! Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Roland Stigge <stigge@antcom.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:lpc32xx rename local state structure to _stateJonathan Cameron2017-02-111-23/+23
| | | | | | | | | | Previously it was called _info with instances as info. This caused some confusion against the info structure that are used in the core of IIO. Since this driver was written it's become a fairly strong convention to use _state and st for instances so change to that. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:lpc32xx Apply consistent prefix to local definesJonathan Cameron2017-02-111-25/+29
| | | | | | | There was a bit of a random mixture going on here so change all prefixes to LPC32XXAD_ Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adc:spear Move out of staging.Jonathan Cameron2017-02-113-406/+0Star
| | | | | | | | | | | | There are some unanswered questions due to disagreements between the code and various datasheets (including between different datasheets for the same part). I don't think that is necessarily a reason to keep it in staging however. I'm partly posting this patch inorder to reignite debate and with a bit of luck find someone who has one of these to test! Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: add copyrightBrian Masney2017-02-111-0/+1
| | | | | | | | Add Brian Masney's copyright to the header for the several rounds of staging cleanups that has been done to this driver. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: use the runtime power management for system sleepBrian Masney2017-02-111-1/+2
| | | | | | | | | | | With the introduction of runtime power management in commit 2db5054ac28d ("staging: iio: isl29028: add runtime power management support"), the system could go to sleep and turn off the device without notifying the runtime power management code. This patch changes the system suspend and resume to go through the runtime power management. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: fix incorrect sleep time when taking initial ↵Brian Masney2017-02-111-10/+21
| | | | | | | | | | | | proximity reading When proximity is enabled in isl29028_enable_proximity(), the function msleep() is called with the sampling frequency, which is not correct. This patch changes the code to sleep the specified amount of time listed in the datasheet instead. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: change mdelay() to msleep()Brian Masney2017-02-111-2/+2
| | | | | | | | | | This driver in some cases can busy wait for upwards of 100 ms. Since the kernel at this point is not running in atomic context, and is running in process context, we can safely use msleep() instead. This patch changes the two occurrences of mdelay() to msleep(). Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Staging: iio: meter: meter.h - style fixDerek Robson2017-02-111-30/+30
| | | | | | | | Changed file permissions to octal. Found with checkpatch. Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: ad7192: fixed symbolic permission references 'S_IRUGO | S_IWUSR'Artur Lorincz2017-02-051-4/+4
| | | | | | | | Replaced the symbolic permission references S_IRUGO and S_IWUSR with their octal counterparts. Signed-off-by: Artur Lorincz <larturus@yahoo.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: addac: adt7136: Fix style to use octal file permissions.Michael S. Hansen2017-02-051-54/+54
| | | | | Signed-off-by: Michael S. Hansen <michael.schacht.hansen@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Staging: iio: resolver: ad2s1210.c - style fixDerek Robson2017-02-041-12/+12
| | | | | | | | Changed symbolic permissions to octal permissions. Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Staging: iio: adc: ad7816: fix symbolic permissions coding style issueJulián de Gortari2017-01-281-5/+5
| | | | | | | | Octal permissions should be used instead of symbolic ones for easier reading. Signed-off-by: Julián de Gortari <kiototeko@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* drivers:staging:iio:cdc: Style fix.Anthony Brandon2017-01-281-15/+15
| | | | | | | Align parameters to parentheses. Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: trigger: free trigger resource correctlyAlison Schofield2017-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | These stand-alone trigger drivers were using iio_trigger_put() where they should have been using iio_trigger_free(). The iio_trigger_put() adds a module_put which is bad since they never did a module_get. In the sysfs driver, module_get/put's are used as triggers are added & removed. This extra module_put() occurs on an error path in the probe routine (probably rare). In the bfin-timer & interrupt trigger drivers, the module resources are not explicitly managed, so it's doing a put on something that was never get'd. It occurs on the probe error path and on the remove path (not so rare). Tested with the sysfs trigger driver. The bfin & interrupt drivers were build tested & inspected only. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: add runtime power management supportBrian Masney2017-01-221-8/+110
| | | | | | | | | | | | | This patch adds runtime power management support to the isl29028 driver. It defaults to powering off the device after two seconds of inactivity. isl29028_chip_init_and_power_on() currently only zeros the CONFIGURE register on the chip, which will cause the chip to turn off. This patch also renames that function to isl29028_clear_configure_reg() since it is now used in several places. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: only set ALS scale when ALS/IR sensing is enabledBrian Masney2017-01-221-2/+6
| | | | | | | | | | | | isl29028_chip_init_and_power_on() calls isl29028_set_als_scale() and this is not needed until the user actually needs to take a reading from the ALS/IR sensor. This patch moves the isl29028_set_als_scale() call from isl29028_chip_init_and_power_on() to isl29028_set_als_ir_mode(). This sets the stage for faster resume times from runtime power management if the user is only querying the proximity sensor. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: only set proximity sampling rate when proximity is ↵Brian Masney2017-01-221-4/+4
| | | | | | | | | | | | | | enabled isl29028_chip_init_and_power_on() calls isl29028_set_proxim_sampling() and this is not needed until the user actually needs to take a proximity reading. This patch moves the isl29028_set_proxim_sampling() call from isl29028_chip_init_and_power_on() to isl29028_enable_proximity(). This sets the stage for faster resume times from the runtime power management if the user is only querying the ALS/IR sensor. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: remove enable flag from isl29028_enable_proximity()Brian Masney2017-01-221-6/+4Star
| | | | | | | | | isl29028_enable_proximity() has a boolean argument named enable. This function is only called once and the enable flag is set to true in that call. This patch removes the enable parameter from that function. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: remove unnecessary parenthesisBrian Masney2017-01-221-1/+1
| | | | | | | | | isl29028_write_raw() contains unnecessary parenthesis when checking to see if the passed in lux scale is valid. This patch removes the unnecessary parenthesis. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: remove out of memory log messageBrian Masney2017-01-221-3/+1Star
| | | | | | | | | | | If the call to devm_iio_device_alloc() fails, then isl29028_probe() logs a message saying that memory cannot be allocated. The user's system most likely has larger issues at this point. This patch removes that error message since the error code is passed on and the message is not necessary. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: remove unnecessary error logging in ↵Brian Masney2017-01-221-3/+1Star
| | | | | | | | | | | | isl29028_chip_init_and_power_on() If the call to isl29028_chip_init_and_power_on() in isl29028_probe() fails, then isl29028_probe() will log an error message. All of the error paths in that call path already have error logging in place. This patch removes the unnecessary logging. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: made error messages consistentBrian Masney2017-01-221-24/+32
| | | | | | | | | The wording and style of the different error messages was not consistent. This patch makes the wording and style consistent throughout the driver. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: move failure logging into isl29028_set_als_scale()Brian Masney2017-01-221-13/+14
| | | | | | | | | | When isl29028_set_als_scale() fails, it was up to both callers to log the failure message. This patch moves the logging into isl29028_set_als_scale() to reduce the overall amount of code in the driver. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: move failure logging into isl29028_set_proxim_sampling()Brian Masney2017-01-221-15/+16
| | | | | | | | | | When isl29028_set_proxim_sampling() fails, it was up to both callers to log the failure message. This patch moves the logging into isl29028_set_proxim_sampling() to reduce the overall amount of code in the driver. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: remove unused define ISL29028_DEV_ATTRBrian Masney2017-01-221-1/+0Star
| | | | | | | | The #define ISL29028_DEV_ATTR was not used so this patch removes the unnecessary code. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: change newlines to improve readabilityBrian Masney2017-01-221-9/+24
| | | | | | | | Add and remove newlines to improve code readability in preparation for moving the driver out of staging. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: made alignment of variables in struct isl29028_chip ↵Brian Masney2017-01-221-5/+5
| | | | | | | | | | | consistent The alignment of the variables in the struct isl29028_chip is not consistent. This changes all of the variables to use consistent alignment to improve the code readability. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: combine isl29028_proxim_get() and isl29028_read_proxim()Brian Masney2017-01-221-14/+8Star
| | | | | | | | | | | isl29028_proxim_get() checks to see if the promixity needs to be enabled on the chip and then calls isl29028_read_proxim(). There are no other callers of isl29028_read_proxim(). The naming between these two functions can be confusing so this patch combines the two to avoid the confusion. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: fix alignment of function argumentsBrian Masney2017-01-221-2/+3
| | | | | | | | | | Two separate calls to regmap_update_bits() in isl29028_set_als_scale() and isl29028_set_als_ir_mode() did not have their function arguments on the next line aligned correctly to the open parenthesis. This patch corrects the alignment. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:addac:adt7316 Fixes Alignment should match open parenthesisScott Matheina2017-01-101-1/+1
| | | | | | | Fixes style issue where Alignment doesn't match open parenthesis Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:kfifo_buf header include push down.Jonathan Cameron2017-01-101-0/+1
| | | | | | | | | As a precursor to splitting buffer.h, lets make sure all drivers include the relevant headers rather than relying on picking them up from kfifo_buf.h. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* staging: iio: ad7606: replace range/range_available with corresponding scaleEva Rachel Retuya2017-01-071-40/+39Star
| | | | | | | | | | | Eliminate the non-standard attributes in_voltage_range and in_voltage_range_available. Implement in_voltage_scale_available in place of these attributes and update the SCALE accordingly. The array scale_avail is introduced to hold the available scale values. Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:trigger: Fix coding style in iio-trig-bfin-timer.c by aligning ↵rishabh hardas2017-01-071-1/+1
| | | | | | | | | parameters with opening bracket. Fixes a warning flagged by checkpatch.pl Signed-off-by: rishabh hardas <rishabheudyptula@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:adt7316: Fix braces not present on all arms of if else statementScott Matheina2016-12-301-1/+2
| | | | | | | Adds braces to second arm of if else statement. Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Staging: iio: impedance-analyzer: ad5933: fix wrong commentsNizam Haider2016-12-101-2/+2
| | | | | | | | according to datasheet complete control register is of 2 bytes. http://www.analog.com/media/en/technical-documentation/data-sheets/AD5933.pdf Signed-off-by: Nizam Haider <nijam.h@hcl.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: made alignment of #defines consistentBrian Masney2016-12-041-21/+21
| | | | | | | | | The alignment of the #defines at the top of the file is not consistent. This changes all of the defines to use consistent alignment to improve the code readability. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>