#
9b924739 |
| 10-Jun-2024 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: adxl34x - switch to using "guard" notation
Switch to using guard(mutex)() notation to acquire and automatically release mutexes.
Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.
Input: adxl34x - switch to using "guard" notation
Switch to using guard(mutex)() notation to acquire and automatically release mutexes.
Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240610164301.1048482-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
985addc1 |
| 10-Jun-2024 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: adxl34x - switch to using managed resources
Switch the driver to use managed resources to simplify error handling.
Link: https://lore.kernel.org/r/20240610164301.1048482-3-dmitry.torokhov@gm
Input: adxl34x - switch to using managed resources
Switch the driver to use managed resources to simplify error handling.
Link: https://lore.kernel.org/r/20240610164301.1048482-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
8f275fc7 |
| 10-Jun-2024 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: adxl34x - use input_set_capability()
Switch to using input_set_capability() instead of using __set_bit() to make clear what exactly kinds of events (EV_KEY, EV_REL) are being declared.
Also
Input: adxl34x - use input_set_capability()
Switch to using input_set_capability() instead of using __set_bit() to make clear what exactly kinds of events (EV_KEY, EV_REL) are being declared.
Also drop redundant calls setting EV_ABS and ABS_X|Y|Z bits as that is taken care by input_set_abs_params().
Link: https://lore.kernel.org/r/20240610164301.1048482-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
6f7e4f81 |
| 10-Jun-2024 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: adxl34x - use device core to create driver-specific device attributes
Instead of creating driver-specific device attributes with sysfs_create_group() have device core do this by setting up de
Input: adxl34x - use device core to create driver-specific device attributes
Instead of creating driver-specific device attributes with sysfs_create_group() have device core do this by setting up dev_groups pointer in the driver structure.
Reviewed-by: Nuno Sa <nuno.sa@analog.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20240610164301.1048482-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
e96220bc |
| 11-May-2023 |
Marek Vasut <marex@denx.de> |
Input: adxl34x - do not hardcode interrupt trigger type
Instead of hardcoding IRQ trigger type to IRQF_TRIGGER_HIGH, let's respect the settings specified in the firmware description.
Fixes: e27c729
Input: adxl34x - do not hardcode interrupt trigger type
Instead of hardcoding IRQ trigger type to IRQF_TRIGGER_HIGH, let's respect the settings specified in the firmware description.
Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers") Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20230509203555.549158-1-marex@denx.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
40be0646 |
| 14-Jan-2023 |
Jonathan Cameron <Jonathan.Cameron@huawei.com> |
Input: adxl34x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS()
The I2C and SPI PM callbacks were identical (though wrapped in some bouncing out to the bus specific container of the struct device
Input: adxl34x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS()
The I2C and SPI PM callbacks were identical (though wrapped in some bouncing out to the bus specific container of the struct device and then back again to get the drvdata). As such rather than just moving these to SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() take the opportunity to unify the struct dev_pm_ops and use the new EXPORT_SIMPLE_DEV_PM_OPS() macro so that we can drop the unused suspend and resume callbacks as well as the structure if !CONFIG_PM_SLEEP without needing to mark the callbacks __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20230114171620.42891-9-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
804f354a |
| 13-Oct-2021 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: adxl34x - fix sparse warning
This fixes the following warning from sparse:
CC [M] drivers/input/misc/adxl34x.o CHECK drivers/input/misc/adxl34x.c drivers/input/misc/adxl34x.c:245:29:
Input: adxl34x - fix sparse warning
This fixes the following warning from sparse:
CC [M] drivers/input/misc/adxl34x.o CHECK drivers/input/misc/adxl34x.c drivers/input/misc/adxl34x.c:245:29: warning: cast to restricted __le16 drivers/input/misc/adxl34x.c:248:29: warning: cast to restricted __le16 drivers/input/misc/adxl34x.c:251:29: warning: cast to restricted __le16
Acked-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/YWZIjb91d6aAwgss@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
af98ff04 |
| 13-Oct-2021 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
Input: adxl34x - make adxl34x_remove() return void
Up to now adxl34x_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no e
Input: adxl34x - make adxl34x_remove() return void
Up to now adxl34x_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle.
Also the return value of i2c and spi remove callbacks is ignored anyway.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20211012153945.2651412-6-u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
33b6c39e |
| 27-Oct-2020 |
Dan Carpenter <dan.carpenter@oracle.com> |
Input: adxl34x - clean up a data type in adxl34x_probe()
The "revid" is used to store negative error codes so it should be an int type.
Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digit
Input: adxl34x - clean up a data type in adxl34x_probe()
The "revid" is used to store negative error codes so it should be an int type.
Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20201026072824.GA1620546@mwanda Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
80503b23 |
| 24-May-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149
Based on 1 normalized pattern(s):
licensed under the gpl 2 or later
extracted by the scancode license scanner the SPDX license
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149
Based on 1 normalized pattern(s):
licensed under the gpl 2 or later
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 82 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190524100845.150836982@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
1dbc080c |
| 20-Sep-2017 |
Arnd Bergmann <arnd@arndb.de> |
Input: adxl34x - do not treat FIFO_MODE() as boolean
FIFO_MODE() is a macro expression with a '<<' operator, which gcc points out could be misread as a '<':
drivers/input/misc/adxl34x.c: In functio
Input: adxl34x - do not treat FIFO_MODE() as boolean
FIFO_MODE() is a macro expression with a '<<' operator, which gcc points out could be misread as a '<':
drivers/input/misc/adxl34x.c: In function 'adxl34x_probe': drivers/input/misc/adxl34x.c:799:36: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context]
While utility of this warning is being disputed (Chief Penguin: "This warning is clearly pure garbage.") FIFO_MODE() extracts range of values, with 0 being FIFO_BYPASS, and not something that is logically boolean.
This converts the test to an explicit comparison with FIFO_BYPASS, making it clearer to gcc and the reader what is intended.
Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
bf9a9f8e |
| 06-Jan-2014 |
Paul Gortmaker <paul.gortmaker@windriver.com> |
Input: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left
Input: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
241ecf1c |
| 10-Dec-2013 |
Michael Hennerich <michael.hennerich@analog.com> |
Input: adxl34x - Fix bug in definition of ADXL346_2D_ORIENT
Coverity report pointet out by Dmitry
Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Michael Hennerich <michael.
Input: adxl34x - Fix bug in definition of ADXL346_2D_ORIENT
Coverity report pointet out by Dmitry
Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
c838cb3d |
| 06-Dec-2013 |
Jingoo Han <jg1.han@samsung.com> |
Input: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhan
Input: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
03c86ee1 |
| 24-Dec-2012 |
Wolfram Sang <w.sang@pengutronix.de> |
Input: adxl34x - default platform_data should not use defines from driver
Only use the defines which are defined in the platform_data include file.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.d
Input: adxl34x - default platform_data should not use defines from driver
Only use the defines which are defined in the platform_data include file.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
1fae0315 |
| 24-Dec-2012 |
Wolfram Sang <w.sang@pengutronix.de> |
Input: adxl34x - don't set THRESH_TAP twice
The datasheet doesn't say anything about writing twice, so this was probably overlooked.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Mi
Input: adxl34x - don't set THRESH_TAP twice
The datasheet doesn't say anything about writing twice, so this was probably overlooked.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
ad4e58b0 |
| 24-Dec-2012 |
Wolfram Sang <w.sang@pengutronix.de> |
Input: adxl34x - consistently use read/write encapsulation
Don't open code the AC_READ and AC_WRITE macros.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michael Hennerich <michael.
Input: adxl34x - consistently use read/write encapsulation
Don't open code the AC_READ and AC_WRITE macros.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
76496e7a |
| 09-Nov-2011 |
JJ Ding <dgdunix@gmail.com> |
Input: convert obsolete strict_strtox to kstrtox
With commit 67d0a0754455f89ef3946946159d8ec9e45ce33a we mark strict_strtox as obsolete. Convert all remaining such uses in drivers/input/.
Also chan
Input: convert obsolete strict_strtox to kstrtox
With commit 67d0a0754455f89ef3946946159d8ec9e45ce33a we mark strict_strtox as obsolete. Convert all remaining such uses in drivers/input/.
Also change long to appropriate types, and return error conditions from kstrtox separately, as Dmitry sugguests.
Signed-off-by: JJ Ding <dgdunix@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
show more ...
|
#
d2d8442d |
| 03-Jul-2011 |
Paul Gortmaker <paul.gortmaker@windriver.com> |
drivers/input: Add module.h to modular drivers implicitly using it
A pending cleanup will mean that module.h won't be implicitly everywhere anymore. Make sure the modular drivers in input dir are a
drivers/input: Add module.h to modular drivers implicitly using it
A pending cleanup will mean that module.h won't be implicitly everywhere anymore. Make sure the modular drivers in input dir are actually calling out for <module.h> explicitly in advance.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
show more ...
|
#
25985edc |
| 31-Mar-2011 |
Lucas De Marchi <lucas.demarchi@profusion.mobi> |
Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
|
#
7be3c134 |
| 05-Aug-2010 |
Michael Hennerich <Michael.Hennerich@analog.com> |
Input: adxl34x - do not mark device as disabled on startup
Do not mark device as desabled on startup - otherwise user must reset disable sysfs hook before the driver delivers any data.
Signed-off-b
Input: adxl34x - do not mark device as disabled on startup
Do not mark device as desabled on startup - otherwise user must reset disable sysfs hook before the driver delivers any data.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
show more ...
|
#
f1cba532 |
| 23-Jul-2010 |
Dan Carpenter <error27@gmail.com> |
Input: adxl34x - fix leak and use after free
These are a couple smatch issues. In the original code, if only one of the allocation fails we leak the other variable so we should goto out_free_mem.
Input: adxl34x - fix leak and use after free
These are a couple smatch issues. In the original code, if only one of the allocation fails we leak the other variable so we should goto out_free_mem.
Also there was a use after free if debugging was enabled and so I moved the kfree() down a line.
Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
show more ...
|
#
af6e1d99 |
| 01-Jul-2010 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: adxl34 - make enable/disable separate from suspend/resume
Suspending and resuming the device should be separate from enabling and disabling it through sysfs attribute and thus should not alte
Input: adxl34 - make enable/disable separate from suspend/resume
Suspending and resuming the device should be separate from enabling and disabling it through sysfs attribute and thus should not alter ac->disabled flag.
[michael.hennerich@analog.com: various fixups] Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
show more ...
|
#
671386bb |
| 25-Jun-2010 |
Michael Hennerich <michael.hennerich@analog.com> |
Input: adxl34x - add support for ADXL346 orientation sensing
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry T
Input: adxl34x - add support for ADXL346 orientation sensing
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
show more ...
|
#
e27c7292 |
| 25-Jun-2010 |
Michael Hennerich <michael.hennerich@analog.com> |
Input: add driver for ADXL345/346 Digital Accelerometers
This is a driver for the ADXL345/346 Three-Axis Digital Accelerometers.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Sign
Input: add driver for ADXL345/346 Digital Accelerometers
This is a driver for the ADXL345/346 Three-Axis Digital Accelerometers.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Chris Verges <chrisv@cyberswitching.com> Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
show more ...
|