summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/accel
Commit message (Collapse)AuthorAgeFilesLines
* staging: iio: add proper SPDX identifiers to remaining driver filesGreg Kroah-Hartman2019-04-032-4/+2Star
| | | | | | | | | | | | | | There are a number of IIO staging drivers that do not have a proper SPDX identifier on it. So fix that up and at the same time, remove the "free form" license text, as that's pretty much impossible for any tool to parse. Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: add missing SPDX lines to Makefile filesGreg Kroah-Hartman2019-04-031-0/+1
| | | | | | | | | There are a few remaining drivers/staging/*/Makefile files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman2019-04-031-0/+1
| | | | | | | | There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:iio:accel:adis16240: sign extend function replace hard code duplicationKarim Eshapa2018-06-241-9/+2Star
| | | | | | | | Use sign_extend32 kernel function instead of code duplication, Safe also for 16 bit. and remove declaration of bits variable not needed. Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging:iio:accel:adis16203: sign extend function rather code duplicationKarim Eshapa2018-06-161-5/+1Star
| | | | | | | | Use sign_extend32 kernel function instead of code duplication. This function is also safe for 16 bits. Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Move adis16209 driver out of stagingShreeya Patel2018-03-303-343/+0Star
| | | | | | | | Move the adis16209 driver out of staging directory and merge to the mainline IIO subsystem. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Use GENMASKShreeya Patel2018-03-301-17/+14Star
| | | | | | | | Use GENMASK to improve readability and remove the local variables used to store intermediate data. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Remove unused headersShreeya Patel2018-03-301-3/+0Star
| | | | | | | | Remove few unused header files since the adis core handles the sysfs and buffer support. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Add a blank line after return statementsShreeya Patel2018-03-301-0/+2
| | | | | | | | Add a blank line after return statements to improve the code readability. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Prefer reverse christmas tree orderingShreeya Patel2018-03-301-2/+2
| | | | | | | | Prefer reverse christmas tree ordering of declarations to improve readability. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Indent the field definitionsShreeya Patel2018-03-301-5/+5
| | | | | | | | Have indentation in field definitions to make them clearly different from the register addresses. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Move adis16201 driver out of stagingHimanshu Jha2018-03-243-334/+0Star
| | | | | | | | Move adis16201 driver out of staging and merge into mainline IIO subsystem. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Fix 80 character line limitHimanshu Jha2018-03-241-1/+2
| | | | | | | | Split the line over 80 characters limit to fix checkpatch warning. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Use GENMASKHimanshu Jha2018-03-241-19/+15Star
| | | | | | | | Use GENMASK to improve readability and remove the local variables used to store intermediate data. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Remove unused headersHimanshu Jha2018-03-241-3/+0Star
| | | | | | | | Remove few unused headers files since the adis core handles the buffer and sysfs support. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Adjust argument to match open parenthesesHimanshu Jha2018-03-181-1/+1
| | | | | | | | In adis16201_read_raw() adjust an argument to match an open parentheses using tabs and spaces. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Prefer reverse christmas tree orderingHimanshu Jha2018-03-181-2/+2
| | | | | | | | Prefer reverse christmas tree ordering of declarations to improve readability. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Use sign_extend32 functionHimanshu Jha2018-03-181-3/+2Star
| | | | | | | Use sign_extned32() for 32 bit sign extending rather than hard coding. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Add comments about units in read_raw()Himanshu Jha2018-03-181-9/+18
| | | | | | | | | Clarify the conversion and formation of resultant data in the adis16201_read_raw() with sufficient comments and remove the unnecessary comments. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Group register definitionsHimanshu Jha2018-03-181-84/+54Star
| | | | | | | | | Group register definitions with its register field bits to improve readability and easy identification. A small comment is also added to denote the purpose/functionality of the grouped register definitions. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Add _REG suffix to registersHimanshu Jha2018-03-181-42/+42
| | | | | | | | Add a _REG suffix to distinguish between registers and the register bit fileds. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Remove unnecessary commentsHimanshu Jha2018-03-181-36/+0Star
| | | | | | | | Remove few unnecessary comments since the macro definitions clearly justify their purpose. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Rename few macro definitionsHimanshu Jha2018-03-181-7/+7
| | | | | | | | | | | | | | | | | | | | | Rename the macro definitions with suitable names specifying their purpose. * ADIS16201_STARTUP_DELAY_MS: Remove the comment specifying the delay in microseconds and rename it with addtition of _MS suffix. * ADIS16201_MSC_CTRL_ACTIVE_DATA_RDY_HIGH: Rename the macro to make it similar to other misc control registers which denotes the data ready polarity. * ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT: Rename to denote it is a failure bit. * ADIS16201_GLOB_CMD_FACTORY_RESET: Remove ambiguous _CAL suffix and add _RESET suffix instead to denote factory reset command. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Use sign_extend32 functionShreeya Patel2018-03-071-3/+2Star
| | | | | | | | Use sign_extend32 function instead of manually coding it. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Adjust a switch statementShreeya Patel2018-03-071-2/+8
| | | | | | | | | Adjust a switch block to explicitly match channels and return -EINVAL as default case which makes the code semantically more clear. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Change some macro namesShreeya Patel2018-03-071-24/+24
| | | | | | | | Make some of the macro names according to the names given in the datasheet of the adis16209 driver. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Remove and add some comments and group the definitionsShreeya Patel2018-03-071-93/+39Star
| | | | | | | | | | | | | Remove some unnecessay comments and group the control register and register field macros together. Some of the register names does not make it's puporse very clear and hence, add some comments for more information. Also there are certain unit based comments which are not providing sufficient information, so expand those comments. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Add a blank space before returnsHimanshu Jha2018-03-071-0/+4
| | | | | | | Adding a blank space before/after some returns improves readability. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: accel: adis16201: Prefer alphabetical sequence of header filesHimanshu Jha2018-03-071-3/+3
| | | | | | | Arrange header files in alphabetical sequence to improve readability. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Add _REG postfix for registersShreeya Patel2018-03-031-42/+43
| | | | | | | | | The defined names for registers does not make it very clear that they are registers and hence, add _REG postfix. This improves the readability of the code. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Change the definition nameShreeya Patel2018-03-031-2/+2
| | | | | | | | | The change in the definition name makes it then obvious what the units are throughout the driver and there will be no need of the comment. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: adis16209: Arrange headers in alphabetical orderShreeya Patel2018-03-031-2/+2
| | | | | | | | Arrange the headers in alphabetical order for cleanup purpose. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging:iio:accel: drop assignment of iio_info.driver_moduleJonathan Cameron2017-08-224-4/+0Star
| | | | | | | | | The equivalent this is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* Staging: iio: accel: adis16203: fixed a brace coding style issueRené Hickersberger?=2017-04-141-2/+1Star
| | | | | | | Fixed a brace coding style issue. Signed-off-by: René Hickersberger <renehickersberger@gmx.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: accel: remove unneeded braces around single statementsMark Stenglein2017-03-252-6/+3Star
| | | | | | | | Fixes three checkpatch warnings due to braces used when single statements are sufficient. Signed-off-by: Mark Stenglein <mark@stengle.in> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: adis16203: Remove locking on raw reads of IIO_CHAN_INFO_CALIBBIASGargi Sharma2017-03-231-3/+0Star
| | | | | | | | | adis16203_read_raw does not need lock for IIO_CHAN_INFO_CALIBBIAS since adis_read_reg_16 is already atomic and nothing else needs to be protected. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16209: Remove mutex_lock() and mutex_unlock() callsNarcisa Ana Maria Vasile2017-03-191-4/+0Star
| | | | | | | | | | | The function adis16209_read_raw() is safe to be run in parallel. The call to adis_read_reg_16() is safe since adis_read_reg() uses the txrx_lock from struct adis to protect simultaneous changes. Remove mutex.h inclusion since it is no longer needed. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: accel: adis16201: remove iio_dev mlockAishwarya Pant2017-03-191-5/+1Star
| | | | | | | | | In the driver adis16201 read raw does not require an iio_dev->mlock for reads. It can run concurrently as adis_read_reg_16() is protected by a transaction lock. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16240: Remove mutex_lock() and mutex_unlock() function call.Varsha Rao2017-03-181-16/+1Star
| | | | | | | | | | | | | | | | | Remove mutex_lock() and mutex_unlock() function calls, as the adis16240_spi_read_signed() function can be run parallel and safely multiple times. Also remove the mutex.h header file and comment, which are no longer required. As indio_dev is declared and initialized in adis16240_spi_read_signed(), again declaration to same type and initialization to same value is not required, remove it from adis16240_read_12bit_signed(). Simplify the return logic, by merging assignment and return into a single line. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16240: Group similar macros into enumsNarcisa Ana Maria Vasile2017-03-131-6/+8
| | | | | | | Group the scan indexes into an enum. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16209: Group similar macros into enumsNarcisa Ana Maria Vasile2017-03-131-8/+10
| | | | | | | Group the scan indexes into an enum. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16203: Remove exceptional & on function namesimran singhal2017-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // </smpl> Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16209: Remove exceptional & on function namesimran singhal2017-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // </smpl> Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16201: Remove exceptional & on function namesimran singhal2017-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // </smpl> Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: adis16240: Remove exceptional & on function namesimran singhal2017-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // </smpl> Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* 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: 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: 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>