History log of /linux-master/drivers/input/misc/kxtj9.c
Revision Date Author Comments
# b4f2ad7b 28-Jul-2023 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: kxtj9 - use device core to create driver-specific device attributes

Instead of creating driver-specific device attributes with
devm_device_add_group() have device core do this by setting up dev_groups
pointer in the driver structure.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230729005133.1095051-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# d8bde56d 17-May-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Input: Switch i2c drivers back to use .probe()

After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230517164645.162294-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 0ac787e0 02-Jan-2023 Jonathan Cameron <Jonathan.Cameron@huawei.com>

Input: kxtj9 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()

SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection
against unused function warnings. The new combination of pm_sleep_ptr()
and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions,
thus suppressing the warning, but still allowing the unused code to be
removed. Thus also drop the __maybe_unused markings.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230102181842.718010-11-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# b05989d7 18-Nov-2022 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Input: kxtj9 - Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221118224540.619276-218-uwe@kleine-koenig.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# d69f0a43 04-Oct-2020 Andrzej Pietrasiewicz <andrzej.p@collabora.com>

Input: use input_device_enabled()

Use the newly added helper in relevant input drivers.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Link: https://lore.kernel.org/r/20200608112211.12125-3-andrzej.p@collabora.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 78713dfa 29-Oct-2019 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: kxtj9 - switch to using polled mode of input devices

We have added polled mode to the normal input devices with the intent of
retiring input_polled_dev. This converts kxtj9 driver to use the polling
mode of standard input devices and removes dependency on INPUT_POLLDEV.

note that with regular input devices handling polling, there is no longer a
benefit in having separate INPUT_KXTJ9_POLLED_MODE config option.

Link: https://lore.kernel.org/r/20191017204217.106453-23-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# e7339118 29-Oct-2019 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: kxtj9 - switch to using managed resources

Using devm API allows to clean up error handling and drop the remove()
method.

Link: https://lore.kernel.org/r/20191017204217.106453-22-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 45051539 29-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation this program is
distributed in the hope that it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more details you should have received a copy of the gnu general
public license along with this program if not write to the free
software foundation inc 59 temple place suite 330 boston ma 02111
1307 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 136 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000436.384967451@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5ccd9abd 02-Oct-2015 Javier Martinez Canillas <javier@osg.samsung.com>

Input: kxtj9 - remove unneeded retval variable

The retval variable isn't needed since isn't used in the function. Remove
the variable and just return 0 instead.

This also fixes the following make coccicheck warning:

drivers/input/misc/kxtj9.c:638:5-11: Unneeded variable: "retval". Return "0" on line 646

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 800e3b9a 17-Jul-2015 Krzysztof Kozlowski <krzk@kernel.org>

Input: drop owner assignment from i2c_driver

i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 97a652a8 02-Nov-2014 Jingoo Han <jg1.han@samsung.com>

Input: misc - use __maybe_unused instead of ifdef around suspend/resume

Use __maybe_unused instead of ifdef guards around suspend/resume
functions, in order to increase build coverage and fix build warnings.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# c838cb3d 05-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 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>


# e2619cf7 23-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

Input: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 5298cc4c 23-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

Input: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 1cb0aa88 23-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

Input: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 1b92c1cf 17-Mar-2012 Axel Lin <axel.lin@gmail.com>

Input: convert I2C drivers to use module_i2c_driver()

This patch converts the drivers in drivers/input/* to use the
module_i2c_driver() macro which makes the code smaller and a bit
simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 04391660 16-Mar-2012 Christopher Hudson <chris.hudson.comp.eng@gmail.com>

Input: kxtj9 - who_am_i check value and initial data rate fixes

Several fixes based on customer feedback:

* WHO_AM_I value has changed since preliminary parts used for initial
testing;

* Output of le16_to_cpu must be saved to memory before shifting to
preserve sign;

* Initial data rate was not extracted from data control register init.
This was causing the initial data rate to be set to maximum until
it was changed. To fix this problem, it made more sense to specify
initial data rate and extract the register mask from that.

Signed-off-by: Chris Hudson <chudson@kionix.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 2501ec97 30-Jul-2011 Stephen Rothwell <sfr@canb.auug.org.au>

Input: kxtj9 - explicitly include module.h

We need to explicitly include module.h since some of its facilities
are used.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 6eab7ce6 20-Jul-2011 Dan Carpenter <error27@gmail.com>

Input: kxtj9 - fix locking typo in kxtj9_set_poll()

According to the comments we want to call mutex_lock() here instead
of mutex_unlock(). That makes more sense.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 4fd9fcf7 20-Jul-2011 Dan Carpenter <error27@gmail.com>

Input: kxtj9 - fix bug in probe()

We are testing the wrong variable here. I believe tj9->input_dev
is always NULL at this point, so probe() will fail.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# e8e70d83 06-Jul-2011 Chris Hudson <chudson@kionix.com>

Input: add support for Kionix KXTJ9 accelerometer

Signed-off-by: Chris Hudson <chudson@kionix.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>