History log of /linux-master/drivers/input/misc/max8925_onkey.c
Revision Date Author Comments
# 1bf94844 02-Jan-2023 Jonathan Cameron <Jonathan.Cameron@huawei.com>

Input: max8925_onkey - 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-13-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# a88638c4 15-Oct-2021 Randy Dunlap <rdunlap@infradead.org>

Input: max8925_onkey - don't mark comment as kernel-doc

Change the comment to a normal (non-kernel-doc) comment to avoid
these kernel-doc warnings:

max8925_onkey.c:2: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* MAX8925 ONKEY driver
max8925_onkey.c:2: warning: missing initial short description on line:
* MAX8925 ONKEY driver

Fixes: 3734574cac100 ("Input: enable onkey driver of max8925")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20211002045943.9406-1-rdunlap@infradead.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 0bec8b7e 14-Aug-2019 Stephen Boyd <swboyd@chromium.org>

Input: remove dev_err() usage after platform_get_irq()

We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// <smpl>
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>

While we're here, remove braces on if statements that only have one
statement (manually).

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
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>


# 776bd315 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

input: misc: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# 04115e41 29-May-2014 Himangi Saraogi <himangi774@gmail.com>

Input: max8925_onkey - switch to using managed resources

Let's switch the driver to use managed resources, this will simplify
error handling and driver unbinding logic.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 18fc6f50 05-May-2013 Sachin Kamat <sachin.kamat@linaro.org>

Input: max8925_onkey - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 678e8cb5 04-Feb-2013 Qing Xu <qingx@marvell.com>

mfd: max8925: Fix onkey driver irq base

update onkey driver's irq base, it should get from max8925,
but not save in a private value

Signed-off-by: Qing Xu <qingx@marvell.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.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>


# 104a5f3c 06-Mar-2012 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: max8925_onkey - avoid accessing input device too early

Input device must be allocated (but not necessarily registered) before
requesting IRQs, otherwise there is a chance that IRQ handler fires and
tries to reference not yet allocated input device.

Also it makes sense to store relative IRQ numbers in max8925_onkey_info
structure as they are needed in suspend/resume which we expect to be
called more often than probe and remove.

Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# adab30d7 05-Mar-2012 Kevin Liu <kliu5@marvell.com>

Input: max8925_onkey - allow to be used as a wakeup source

Implement suspend and resume methods to set up devices as wakeup source.

Signed-off-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 840a746b 29-Nov-2011 JJ Ding <dgdunix@gmail.com>

Input: misc - use macro module_platform_driver()

Commit 940ab88962bc1aff3273a8356d64577a6e386736 introduced a new macro to
save some platform_driver boilerplate code. Use it.

Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 2d95ae3b 08-Sep-2010 Haojian Zhuang <haojian.zhuang@gmail.com>

input: Monitor both onkey up and down event

Remove original 3-second ONKEY event. Detect ONKEY changing event directly.
So both UP and DOWN event of ONKEY in max8925 are monitered.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 3734574c 22-May-2010 Haojian Zhuang <haojian.zhuang@gmail.com>

Input: enable onkey driver of max8925

When ONKEY is held for 3 seconds, KEY_POWER event is reported.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>