History log of /linux-master/drivers/input/misc/da9063_onkey.c
Revision Date Author Comments
# 0c64117d 20-Dec-2023 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: da9063_onkey - avoid explicitly setting input's parent

devm_input_allocate_device() already sets parent of the new input
device, there's no need to set it up explicitly.

Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/ZYOseYfVgg0Ve6Zl@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# ec4fcc6b 20-Dec-2023 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: da9063_onkey - avoid using OF-specific APIs

There is nothing OF-specific in the driver, so switch from OF properties
helpers to generic device helpers.

Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/ZYOsUfKceOFXuCt5@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# c67f8a13 14-Dec-2023 Biju Das <biju.das.jz@bp.renesas.com>

Input: da9063 - use dev_err_probe()

Replace dev_err()->dev_err_probe() to simplify probe().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20231213214803.9931-4-biju.das.jz@bp.renesas.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# bd2334ed 14-Dec-2023 Biju Das <biju.das.jz@bp.renesas.com>

Input: da9063 - drop redundant prints in probe()

The memory allocation core code already prints error message in case of
OOM. So, drop additional print messages for OOM cases.

While at it, input_register_device() is already printing error messages on
failure. Drop the redundant print.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20231213214803.9931-3-biju.das.jz@bp.renesas.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 9594f273 13-Dec-2023 Biju Das <biju.das.jz@bp.renesas.com>

Input: da9063 - simplify obtaining OF match data

Simplify probe() by replacing of_match_node() for retrieving match data by
device_get_match_data().

Some minor cleanups:
* Remove the trailing comma in the terminator entry for the OF
table making code robust against (theoretical) misrebases or other
similar things where the new entry goes _after_ the termination without
the compiler noticing.
* Move OF table near to the user.
* Arrange variables in reverse xmas tree order in probe().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20231213214803.9931-2-biju.das.jz@bp.renesas.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# d7781232 17-Jul-2023 Samuel Holland <samuel.holland@sifive.com>

Input: da9063 - add wakeup support

Mark the IRQ as a wake IRQ so it will be enabled during system suspend.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20230717192004.1304287-1-samuel.holland@sifive.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# dfafa560 01-Mar-2022 Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Input: da9063 - use devm_delayed_work_autocancel()

Use devm_delayed_work_autocancel() instead of hand-writing it.
This saves a few lines of code.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/a76ac3f4c7aee205395b89b5b3f587e30a48df96.1645205312.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# afce285b 16-Sep-2019 Marco Felsch <m.felsch@pengutronix.de>

Input: da9063 - fix capability and drop KEY_SLEEP

Since commit f889beaaab1c ("Input: da9063 - report KEY_POWER instead of
KEY_SLEEP during power key-press") KEY_SLEEP isn't supported anymore. This
caused input device to not generate any events if "dlg,disable-key-power"
is set.

Fix this by unconditionally setting KEY_POWER capability, and not
declaring KEY_SLEEP.

Fixes: f889beaaab1c ("Input: da9063 - report KEY_POWER instead of KEY_SLEEP during power key-press")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Cc: stable@vger.kernel.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>


# c942fddf 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

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

Based on 3 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 as published by
the free software foundation either version 2 of the license or at
your option any later version 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

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [kishon] [vijay] [abraham]
[i] [kishon]@[ti] [com] 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

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [graeme] [gregory]
[gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
[kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
[hk] [hemahk]@[ti] [com] 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

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

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

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5f462872 20-May-2019 Wolfram Sang <wsa+renesas@sang-engineering.com>

Input: da9063_onkey - convert header to SPDX

Convert the header of the source file to SPDX.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 6981a235 20-May-2019 Wolfram Sang <wsa+renesas@sang-engineering.com>

Input: da9063_onkey - remove platform_data support

There are no in-kernel users anymore, so remove this outdated interface.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Tested-by: Steve Twiss <stwiss.opensource@diasemi.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 4cd216cb 22-Jan-2017 Guenter Roeck <linux@roeck-us.net>

Input: misc - drop calls to platform_set_drvdata and i2c_set_clientdata

There is no call to i2c_get_clientdata(), platform_get_drvdata(),
or dev_get_drvdata() in any of the drivers in this patch.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 8dd5e0b3 26-Oct-2016 Javier Martinez Canillas <javier@osg.samsung.com>

Input: da9063 - fix module autoload when registered via OF

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/input/misc/da9063_onkey.ko | grep alias
alias: platform:da9063-onkey

After this patch:

$ modinfo drivers/input/misc/da9063_onkey.ko | grep alias
alias: platform:da9063-onkey
alias: of:N*T*Cdlg,da9062-onkeyC*
alias: of:N*T*Cdlg,da9062-onkey
alias: of:N*T*Cdlg,da9063-onkeyC*
alias: of:N*T*Cdlg,da9063-onkey

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


# 04d7ad83 26-Oct-2016 Steve Twiss <stwiss.opensource@diasemi.com>

Input: da9061 - onkey driver

Copyright header is updated to add DA9061 in its description and the module
description macro is extended to include DA9061.

Minor change to the code, alters dev_dbg() statements to report a generic
"PMIC" instead of DA9063. This device driver is compatible with DA9061,
DA9062 and DA9063.

Kconfig is updated to reflect support for DA9061/62/63.

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# f889beaa 12-Dec-2015 Steve Twiss <stwiss.opensource@diasemi.com>

Input: da9063 - report KEY_POWER instead of KEY_SLEEP during power key-press

Stop reporting KEY_SLEEP for a short key-press and report KEY_POWER instead
This change applies to both DA9063 and DA9062 ONKEY drivers.

A previous application used for testing by the developer required a
KEY_SLEEP and KEY_POWER input_report_key event to distinguish between a
short and long key-press of the power key. This is not the general
convention and the typical solution is for KEY_POWER to be used in both
cases: suspend and S/W power off.

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# a27b5e0a 27-Jul-2015 S Twiss <stwiss.opensource@diasemi.com>

Input: add DA9062 OnKey capability to DA9063 OnKey driver

Add DA9062 OnKey support into the existing DA9063 OnKey driver component by
using generic access tables for common register and bit mask definitions.

The following change will add generic register and bit mask support to the
DA9063 OnKey.

The following alterations have been made to the DA9063 OnKey:

- Addition of a da906x_chip_config structure to hold all
generic registers and bitmasks for this type of OnKey component.
- Addition of an struct of_device_id table for DA9063 and DA9062
defaults
- Refactoring functions to use struct da9063_onkey accesses to generic
registers/masks instead of using defines from registers.h
- Re-work of da9063_onkey_probe() to use of_match_node() and
dev_get_regmap() to provide initialisation of generic registers and
masks and access to regmap

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 5179f0ce 08-Jun-2015 Steve Twiss <stwiss.opensource@diasemi.com>

Input: add OnKey driver for DA9063 MFD part

This adds OnKey driver support for DA9063.

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>