- 27 Sep, 2016 11 commits
-
-
Brian Masney authored
Removes unused variable and associated #defines that was found using make W=1. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Sandhya Bankar authored
Fix the following sparse endianness warnings: drivers/iio/magnetometer/ak8975.c:716:16: warning: cast to restricted __le16 drivers/iio/magnetometer/ak8975.c:837:19: warning: cast to restricted __le16 drivers/iio/magnetometer/ak8975.c:838:19: warning: cast to restricted __le16 drivers/iio/magnetometer/ak8975.c:839:19: warning: cast to restricted __le16 Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Matt Ranostay authored
Add support for the LMP91000 potentiostat which is used for chemical sensing applications. Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Matt Ranostay authored
Allow IIO_CHAN_INFO_SCALE and IIO_CHAN_INFO_OFFSET attributes for processing by checking voltage from a regulator. Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Matt Ranostay authored
Allow access to underlying channel IIO_CHAN_INFO_OFFSET from a consumer. Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Sandhya Bankar authored
Fixing below warnings: drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16 drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16 drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16 drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16 Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Lars-Peter Clausen authored
Add support for the AD7766, AD7766-1, AD7766-2, AD7767, AD7767-1, AD7767-2 Analog to Digital converters. It's a family of single channel 24-bit SAR ADCs. They are all digital interface compatible and the main difference is the internal decimation rate and analog performance. For communication with the host processor a SPI interface is used. In addition the part has a data ready pin that is pulsed for one MCLK cycle when a conversion has completed and can be used as a IIO trigger. Datasheets: http://www.analog.com/media/en/technical-documentation/data-sheets/AD7766.pdf http://www.analog.com/media/en/technical-documentation/data-sheets/AD7767.pdfSigned-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Lars-Peter Clausen authored
Use the new iio_trigger_validate_own_device() to verify that the trigger can only be attached to the matching IIO device rather than using a custom variant. While the implementation of iio_trigger_validate_own_device() and the custom variant and are not identical their behaviour is. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Lars-Peter Clausen authored
Use the new iio_trigger_validate_own_device() to verify that the trigger can only be attached to the matching IIO device rather than using a custom variant. While the implementation of iio_trigger_validate_own_device() and the custom variant and are not identical their behaviour is. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Lars-Peter Clausen authored
Some triggers can only be attached to the IIO device that corresponds to the same physical device. Currently each driver that requires this implements its own trigger validation function. Introduce a new helper function called iio_trigger_validate_own_device() that can be used to do this check. Having a common implementation avoids code duplication and unnecessary boiler-plate code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Sandhya Bankar authored
Fixing below warnings: drivers/iio/dac/ad5592r.c:58:41: warning: incorrect type in argument 2 (different base types) drivers/iio/dac/ad5592r.c:58:41: expected unsigned short [usertype] *buf drivers/iio/dac/ad5592r.c:58:41: got restricted __be16 *<noident> drivers/iio/dac/ad5592r.c:62:41: warning: incorrect type in argument 2 (different base types) drivers/iio/dac/ad5592r.c:62:41: expected unsigned short [usertype] *buf drivers/iio/dac/ad5592r.c:62:41: got restricted __be16 *<noident> drivers/iio/dac/ad5592r.c:92:41: warning: incorrect type in argument 2 (different base types) drivers/iio/dac/ad5592r.c:92:41: expected unsigned short [usertype] *buf drivers/iio/dac/ad5592r.c:92:41: got restricted __be16 *<noident> drivers/iio/dac/ad5592r.c:110:41: warning: incorrect type in argument 2 (different base types) drivers/iio/dac/ad5592r.c:110:41: expected unsigned short [usertype] *buf drivers/iio/dac/ad5592r.c:110:41: got restricted __be16 *<noident> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
- 24 Sep, 2016 3 commits
-
-
Sandhya Bankar authored
Fixing below warning: drivers/iio/adc/max1027.c:241:34: warning: dubious: x | !y . Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Markus Elfring authored
A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Wei Yongjun authored
Fixes the following sparse warning: drivers/iio/accel/mma7660.c:42:11: warning: symbol 'mma7660_nscale' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
- 22 Sep, 2016 26 commits
-
-
Mugunthan V N authored
When help ('?') option is passed to the command, the help text printed but not from '?' switch case of getopt_long() but as a invalid argument as below. Fix this by adding '?' to opt_String of getopt_long(). root@am437x-evm:~# ./iio_generic_buffer -? ./iio_generic_buffer: invalid option -- '?' Usage: generic_buffer [options]... Capture, convert and output data from IIO device buffer -a Auto-activate all available channels ... Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Arnd Bergmann authored
The -Wempty-body gcc warning triggers in the newly added zpa2326 driver: drivers/iio/pressure/zpa2326.c: In function 'zpa2326_dequeue_pressure': drivers/iio/pressure/zpa2326.c:578:3: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] The use of an empty statement behind 'if (...)' is harmless here, but it shows that the dev_dbg() macro is not used correctly: when the "DEBUG" macro is not set, dev_dbg() already defaults to a no-operation, though one that lets the compiler know that the arguments are used, and lets it check the format string. Fixing this also simplifies the driver. Fixes: 03b262f2 ("iio:pressure: initial zpa2326 barometer support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Arnd Bergmann authored
The newly added __sca3000_get_base_freq function handles all valid modes of the SCA3000_REG_ADDR_MODE register, but gcc notices that any other value (i.e. 0x00) causes the base_freq variable to not get initialized: drivers/staging/iio/accel/sca3000_core.c: In function 'sca3000_write_raw': drivers/staging/iio/accel/sca3000_core.c:527:23: error: 'base_freq' may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds explicit error handling for unexpected register values, to ensure this cannot happen. Fixes: e0f3fc9b ("iio: accel: sca3000_core: implemented IIO_CHAN_INFO_SAMP_FREQ") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Sandhya Bankar authored
This issue was found by checkpatch. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sandhya Bankar authored
This patch was found by checkpatch. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rehas Sachdeva authored
Move the test to check if a variable is NULL, to right after it is being assigned, rather than some statements later. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
sayli karnik authored
This patch removes an unnecessary variable used to store return values in order to reduce memory usage. Done using coccinelle: @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret return - ret + C ; Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rehas Sachdeva authored
Remove 'x=a;' from a consecutive double assignment of the form 'x=a; x=b;'. Issue detected by the semantic patch found here: https://github.com/coccinelle/coccinellery/blob/master/write2/write2.cocciSigned-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Yannis Damigos authored
This patch fixes multiple black lines issue found by checkpatch.pl Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rehas Sachdeva authored
Remove unnecessary parentheses from right side of an assignment. Issue detected by the following Coccinelle semantic patch: @r@ identifier x; expression e1, e2; @@ - x = (e1 << e2); + x = e1 << e2; Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rehas Sachdeva authored
Replaces left shift operation (1 << d) by BIT(x) macro. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rehas Sachdeva authored
Setting the variable 'refresh_rate = 60;' has no use to the rest of the function. Hence the if statement setting it and the variable itself can be removed. This was detected using the following Coccinelle semantic patch: @@ type T; identifier i; constant C; @@ ( extern T i; | - T i; <+... when != i - i = C; ...+> ) Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Katie Dunne authored
Issue found by checkpatch. Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
David Lin authored
Add myself as greybus uart and log protocol driver maintainer. Signed-off-by: David Lin <dtwlin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chaehyun Lim authored
Fixes checkpatch.pl warning: CHECK: Alignment should match open parenthesis Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chaehyun Lim authored
Fixes checkpatch.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Richard Groux authored
Minor error spotted by checkpatch.pl in greybus code indent should use tabs where possible Signed-off-by: Richard Groux <rgroux@sauron-mordor.net> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Richard Groux authored
Minor error spotted by checkpatch.pl in greybus space required before the open brace '{' Signed-off-by: Richard Groux <rgroux@sauron-mordor.net> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Eva Rachel Retuya authored
Modify return statement to use the value being returned directly instead of assigning it first to 'ret' and returning this variable. Coccinelle semantic patch used: @@ expression e; local idexpression ret; @@ -ret = +return e; -return ret; Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Eva Rachel Retuya authored
Eliminate unneeded parentheses around the right hand side of an assignment. Coccinelle semantic patch used: @@ expression e1, e2; identifier v; @@ ( v = (e1 == e2) | v = (e1 != e2) | v = (e1 <= e2) | v = (e1 >= e2) | v = - ( e1 - ) ) Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Eva Rachel Retuya authored
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andrey Shvetsov authored
This patch replaces the enum value MOST_CH_ISOC_AVP with the more appropriate MOST_CH_ISOC. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Gromm authored
This patch adds the strings 'rx', 'tx' and 'isoc' to the list of accepted identifiers when setting up a channel configuration. To keep consistency it removes the prefix "dir_" from strings returned by the attributes set_direction and available_directions and it removes the suffix "_avp" from the string "isoc_avp" returned by the attributes set_datatype and available_datatypes. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andrey Shvetsov authored
This patch removes trailing zeros from the strings returned by the attributes available_datatypes and available_directions. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Gromm authored
Function most_submit_mbo() causes an exception only if either the pointer mbo or mbo->context equals NULL. From the underlying architecture's point of view both cases must _not_ come true and would happen only, if something has tampered with the pointers. This would render runtime code unable to recover anyway. So, instead trying to hide that things are already critically out of control we're better off with a WARN_ON() assertion. This patch replaces the return type of the function most_submit_mbo() with 'void' and adds a WARN_ONCE() assertion. Additionally, code calling the function is adapted accordingly. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Juliana Rodrigues authored
This patch fixes a checkpatch warning in a block comment by adapting it to the community preferred coding style. Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-