#
60105b59 |
|
22-Nov-2022 |
Ramona Bolboaca <ramona.bolboaca@analog.com> |
staging: iio: accel: adis16240: Call '__adis_initial_startup()' Call '__adis_initial_startup()' instead of its locked variant in 'adis16240_probe()'. The locks are not needed at this point. Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20221122082757.449452-9-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
6c9304d6 |
|
30-Jan-2022 |
Jonathan Cameron <Jonathan.Cameron@huawei.com> |
iio:imu:adis: Move exports into IIO_ADISLIB namespace In order to avoid unneessary pollution of the global symbol namespace move the common/library functions into a specific namespace and import that into the various specific device drivers that use them. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Song Bao Hua (Barry Song) <song.bao.hua@hisilicon.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220130205701.334592-9-jic23@kernel.org
|
#
9654c414 |
|
03-Jun-2021 |
Jonathan Cameron <Jonathan.Cameron@huawei.com> |
iio: adis: Cleanout unused headers 0-day recently added the include-what-you-use header checker and it gave a warning on an adis patch. As such I decided to run it on all the adis drivers and see if it made sensible suggestions. Note this doesn't represent a complete list of what it suggested changing as I filtered out a few on the basis they are standard headers used to effectively include a bunch of other headers. Could split this into a patch per driver if people prefer. Note to anyone else trying this tool is that it is somewhat of a loose cannon so you will be wanting to carefully check any suggestions before proposing patches! I thought about also reorganising the headers whilst here, but that would make this patch harder to read, or lead to another rather noisy patch across most of the files. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20210603193616.3708447-1-jic23@kernel.org
|
#
4c62db88 |
|
11-Oct-2020 |
Deepak R Varma <mh12gx2825@gmail.com> |
staging: iio: adis16240: add blank line before struct definition Add a blank line before starting structure definition as per coding style guidelines. Issue reported by checkpatch script. Acked-by: Julia Lawall <julia.lawall@inria.fr> Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com> Link: https://lore.kernel.org/r/20201011104800.GA29412@ubuntu204 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
d655844f |
|
11-Oct-2020 |
Deepak R Varma <mh12gx2825@gmail.com> |
staging: iio: adis16240: add blank line before struct definition Add a blank line before starting structure definition as per coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com> Acked-by: Julia Lawall <julia.lawall@inria.fr> Link: https://lore.kernel.org/r/20201011104800.GA29412@ubuntu204 Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
9da32866 |
|
15-Sep-2020 |
Nuno Sá <nuno.sa@analog.com> |
staging: iio: adis16240: Use Managed device functions Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-10-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
d3be8324 |
|
22-May-2020 |
Alexandru Ardelean <alexandru.ardelean@analog.com> |
iio: remove explicit IIO device parent assignment This patch applies the semantic patch: @@ expression I, P, SP; @@ I = devm_iio_device_alloc(P, SP); ... - I->dev.parent = P; It updates 302 files and does 307 deletions. This semantic patch also removes some comments like '/* Establish that the iio_dev is a child of the i2c device */' But this is is only done in case where the block is left empty. The patch does not seem to cover all cases. It looks like in some cases a different variable is used in some cases to assign the parent, but it points to the same reference. In other cases, the block covered by ... may be just too big to be covered by the semantic patch. However, this looks pretty good as well, as it does cover a big bulk of the drivers that should remove the parent assignment. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
fdcf6bbb |
|
10-Feb-2020 |
Nuno Sá <nuno.sa@analog.com> |
iio: imu: adis: Add self_test_reg variable This patch adds a dedicated self_test_reg variable. This is also a step to let new drivers make use of `adis_initial_startup()`. Some devices use MSG_CTRL reg to request a self_test command while others use the GLOB_CMD register. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
77038bd0 |
|
07-Jan-2020 |
Nuno Sá <nuno.sa@analog.com> |
iio: adis: Remove startup_delay All timeouts are now handled by a dedicated timeout struct. This variable is no longer needed. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
380b107b |
|
07-Jan-2020 |
Nuno Sá <nuno.sa@analog.com> |
iio: adis: Introduce timeouts structure The adis library only allows to define a `startup_delay` which for some devices is enough. However, other devices define different timeouts with significantly different timings which could lead to devices to not wait enough time or to wait a lot more than necessary (which is not efficient). This patch introduces a new timeout struct that must be passed into `adis_init()`. There are mainly, for now, three timeouts used. This is also an introductory patch with the goal of refactoring `adis_initial_startup()`. New driver's (eg: adis16480, adis16460) are replicating code for the device initial setup. With some changes (being this the first one) we can pass this to `adis_initial_startup()`. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
969fdd86 |
|
06-Dec-2019 |
Rodrigo Carvalho <rodrigorsdc@gmail.com> |
staging: iio: accel: adis16240: enforce SPI mode on probe function According to the datasheet, this driver supports only SPI mode 3, so we should enforce it on probe function. Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
5a56c518 |
|
13-Sep-2019 |
Rohit Sarkar <rohitsarkar5398@gmail.com> |
staging: iio: ADIS16240: Remove unused include '#include<linux/gpio.h>' isn't being used anywhere. Remove it. Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
b311da85 |
|
13-Aug-2019 |
Rodrigo Ribeiro <rodrigorsdc@gmail.com> |
staging: iio: accel: adis16240: Improve readability on write_raw function Replace shift and minus operation by GENMASK macro and remove the local variables used to store intermediate data. Signed-off-by: Rodrigo Ribeiro Carvalho <rodrigorsdc@gmail.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
10dd571c |
|
25-Jun-2019 |
Alexandru Ardelean <alexandru.ardelean@analog.com> |
iio: adis162xx: fix low-power docs & reports All current ADIS162XX drivers have incorrect values defined via comments. Also, when an error is reported the printed value is incorrect. The functionality itself isn't affected, so it's not a critical issue. And since the change is trivial, it was included in a single patch that fixes these in one go. All values were correlated with the ones specified in the data-sheets. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
bc4054b5 |
|
23-May-2019 |
Rodrigo Ribeiro <rodrigorsdc@gmail.com> |
staging: iio: adis16240: add of_match_table entry This patch adds of_match_table entry in device driver in order to enable spi fallback probing. Signed-off-by: Rodrigo Ribeiro <rodrigorsdc@gmail.com> Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
ed83144e |
|
18-May-2019 |
Lucas Oshiro <lucasseikioshiro@gmail.com> |
staging: iio: adis16240: add device to module device table Add a of_device_id struct and MODULE_DEVICE_TABLE call, in order to add device-tree support for this driver. Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Rodrigo Ribeiro <rodrigorsdc@gmail.com> Co-developed-by: Rodrigo Ribeiro <rodrigorsdc@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
#
2506abea |
|
01-Apr-2019 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
staging: iio: add proper SPDX identifiers to remaining driver files 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>
|
#
5f1d651f |
|
18-Jun-2018 |
Karim Eshapa <karim.eshapa@gmail.com> |
staging:iio:accel:adis16240: sign extend function replace hard code duplication 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>
|
#
85cfa866 |
|
23-Jul-2017 |
Jonathan Cameron <jic23@kernel.org> |
staging:iio:accel: drop assignment of iio_info.driver_module 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>
|
#
baecc573 |
|
23-Mar-2017 |
Mark Stenglein <mark@stengle.in> |
staging: iio: accel: remove unneeded braces around single statements 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>
|
#
2e2c8d22 |
|
14-Mar-2017 |
Varsha Rao <rvarsha016@gmail.com> |
staging: iio: adis16240: Remove mutex_lock() and mutex_unlock() function call. 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>
|
#
0bdd35bd |
|
05-Mar-2017 |
Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> |
staging: iio: adis16240: Group similar macros into enums 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>
|
#
0701dccb |
|
11-Mar-2017 |
simran singhal <singhalsimran0@gmail.com> |
staging: iio: adis16240: Remove exceptional & on function name 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>
|
#
2df79e1b |
|
04-Mar-2017 |
Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> |
staging: iio: accel: Rename source files and update Makefile 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>
|