* Re: [PATCH V3 1/2] tps6507x-ts: Add DT support
From: Manish Badarkhe @ 2013-07-29 6:17 UTC (permalink / raw)
To: Vishwanathrao Badarkhe, Manish
Cc: Dmitry Torokhov, davinci-linux-open-source@linux.davincidsp.com,
linux-doc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org, rob.herring@calxeda.com,
grant.likely@secretlab.ca, rob@landley.net,
linux-input@vger.kernel.org
In-Reply-To: <CAKDJKT6UETVpPT9B6LE59_EMrxNGpTmUiu9iddHoWOYhGpHP3Q@mail.gmail.com>
Hi Dmitry
On Mon, Jul 1, 2013 at 4:40 PM, Manish Badarkhe
<badarkhe.manish@gmail.com> wrote:
>
> Hi Dmitry
>
>
> On Wed, Jun 12, 2013 at 12:23 PM, Vishwanathrao Badarkhe, Manish
> <manishv.b@ti.com> wrote:
> > Hi Dmitry,
> >
> > On Mon, Jun 10, 2013 at 23:33:11, Dmitry Torokhov wrote:
> >> Manish,
> >>
> >> On Mon, Jun 10, 2013 at 10:23:16AM +0000, Vishwanathrao Badarkhe,
> >> Manish wrote:
> >> > Hi Dmitry,
> >> >
> >> > On Mon, Jun 10, 2013 at 11:34:42, Dmitry Torokhov wrote:
> >> > > Hi Manish,
> >> > >
> >> > > On Tue, May 21, 2013 at 02:24:17PM +0530, Vishwanathrao Badarkhe,
> >> > > Manish wrote:
> >> > >
> >> > > > + struct touchscreen_init_data *init_data = NULL;
> >> > > > + int err;
> >> > > > +
> >> > > > + if (node)
> >> > > > + node = of_find_node_by_name(node, "tsc");
> >> > >
> >> > > Why do you have to locate OF node manually instead of already
> >> > > having it attached to the device stucture?
> >> >
> >> > As TPS6507x is mfd device containing two nodes, regulator and
> >> > touchscreen.
> >> > It is necessary to use "of_find_node_by_name" to find child "tsc"
> >> > node
> >> > of TPS6507x MFD device.
> >>
> >> I understand that TPS6507x is a MFD device, However, I still do not
> >> understand why you do not attach OF data to the child platform device
> >> representing touch screen when you create it.
> >
> > I gone through most of MFD devices in mainline kernel where
> > "of_find_node_by_name"
> > function is used in order to populate child node properties.
> > See below example of max8925 MFD device.
> >
> > Max8025 MFD device has following modules
> > 1. Touch screen
> > 2. Charger
> > 3. Backlight
> > 4. regulator
> >
> > In DT case, device node for max8925 MFD device is in
> > "arch/arm/boot/dts/mmp2-brownstone.dts"
> > file having child nodes as regulator, backlight and charger.
> > Respective drivers (regulator, backlight and charger) of max8925 MFD
> > device used
> > "of_find_node_by_name" function in order to populate child node
> > properties.
> >
> > Here, also same case for TPS6507x MFD device
> >
> > TPS6507x MFD device has two childs:
> > 1. regulator
> > 2. touch screen.
> >
> > Regulator driver for TPS6507x is already in mainline and using function
> > "of_find_node_by_name" to populate device tree properties for
> > regulators.
> > On similar lines I used "of_find_node_by_name" to populate device
> > tree properties for touch screen.
> >
> > Still, I agreed that it is possible to attach OF data to child platform
> > device
> > but it requires changes in MFD driver of TPS6507x.
> >
> > Please let me know your opinion about this.
>
> Please let me know so accordingly I will make changes in code.
>
Please provide your comments so accordingly will make changes in code.
Regards
Manish Badarkhe
^ permalink raw reply
* Re: [PATCH v2 2/2] input/uinput: add UI_GET_SYSPATH ioctl to retrieve the sysfs path
From: Benjamin Tissoires @ 2013-07-29 9:16 UTC (permalink / raw)
To: David Herrmann
Cc: Benjamin Tissoires, Dmitry Torokhov, Peter Hutterer,
open list:HID CORE LAYER, linux-kernel
In-Reply-To: <CANq1E4RfTLtDz1RYixg4qdkNxrU22rSaZxFss4++A-0hYM0bEQ@mail.gmail.com>
Hi David,
On Sat, Jul 27, 2013 at 3:07 PM, David Herrmann <dh.herrmann@gmail.com> wrote:
> Hi
>
> On Mon, Jul 15, 2013 at 3:37 PM, Benjamin Tissoires
> <benjamin.tissoires@redhat.com> wrote:
>> Evemu [1] uses uinput to replay devices traces it has recorded. However,
>> the way evemu uses uinput is slightly different from how uinput is
>> supposed to be used.
>> Evemu creates the device node through uinput, bu inject events through
>> the input device node directly (and skipping the uinput node).
>>
>> Currently, evemu relies on an heuristic to guess which input node was
>> created. The problem is that is heuristic is subjected to races between
>> different uinput devices or even with physical devices. Having a way
>> to retrieve the sysfs path allows us to find the event node without
>> having to rely on this heuristic.
>
> It would actually be enough to return the "input_no" from
> input_register_device() (which is currently local but we could save it
> in "dev"). Or only the device-name. I don't know why you want the full
> syspath. It's just overhead in the kernel that we could easily let
> user-space do. And the path /sys/class/input/<devname> can be put
> together by user-space.
I agree that the "input_no" is enough, but that would infer a change
in the input struct. However, we (Peter and I) want to be able to use
it in RHEL, or any other legacy distribution, where it is not
acceptable to ask to recompile a new kernel to do regressions tests.
For those distributions, I have set up a backport of uinput [2] and
with this backport, you only need to recompile the uinput module (not
the whole kernel tree).
Anyway, returning the input name seems enough too. It will remove the
path retrieval and a free :)
I agree this is not the kind of argument we usually like in the kernel
tree, but as this feature (resolution and input retrieval) seems to be
only valuable for regression tests (Xorg or Wayland), I think it is
valuable.
>
> Anyway, Dmitry has to decide on that. Apart from some style-issues I
> mentioned below:
> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
thanks!
>
> Cheers
> David
>
>> [1] http://www.freedesktop.org/wiki/Evemu/
[2] https://github.com/bentiss/uinput
>>
>> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>> ---
>> drivers/input/misc/uinput.c | 37 ++++++++++++++++++++++++++++++++++++-
>> include/linux/uinput.h | 1 +
>> include/uapi/linux/uinput.h | 3 +++
>> 3 files changed, 40 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
>> index 7d518b4..49a9f7d 100644
>> --- a/drivers/input/misc/uinput.c
>> +++ b/drivers/input/misc/uinput.c
>> @@ -22,6 +22,7 @@
>> * Changes/Revisions:
>> * 0.4 12/07/2013 (Peter Hutterer <peter.hutterer@redhat.com>)
>> * - update uinput_user_dev struct to allow abs resolution
>> + * - add UI_GET_SYSPATH ioctl
>
> What tree is that patch against? I cannot see an "0.4" entry in:
> http://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/tree/drivers/input/misc/uinput.c?h=next
looks like you miss the msg title: 2/2. It is part of a series where
the first patch was done by Peter here:
https://patchwork.kernel.org/patch/2827521/
>
>> * 0.3 09/04/2006 (Anssi Hannula <anssi.hannula@gmail.com>)
>> * - updated ff support for the changes in kernel interface
>> * - added MODULE_VERSION
>> @@ -667,6 +668,21 @@ static int uinput_ff_upload_from_user(const char __user *buffer,
>> __ret; \
>> })
>>
>> +static int uinput_str_to_user(const char *str, unsigned int maxlen,
>> + void __user *p)
>
> As Peter mentioned, I'd move "maxlen" to the end.
right. I just copied/pasted the code in evdev.c, but this can be easily changed.
>
>> +{
>> + int len;
>> +
>> + if (!str)
>> + return -ENOENT;
>> +
>> + len = strlen(str) + 1;
>> + if (len > maxlen)
>> + len = maxlen;
>> +
>> + return copy_to_user(p, str, len) ? -EFAULT : len;
>
> I'd prefer a "strlcpy()" so we guarantee a terminating 0 for
> user-space, but I guess that'd be rather complex to do here. I
> couldn't find any strlcpy_to_user()...
Definitively, adding a terminating 0 seems a good idea to prevent
leaking of information from the kernel.
>
>> +}
>> +
>> static long uinput_ioctl_handler(struct file *file, unsigned int cmd,
>> unsigned long arg, void __user *p)
>> {
>> @@ -676,6 +692,8 @@ static long uinput_ioctl_handler(struct file *file, unsigned int cmd,
>> struct uinput_ff_erase ff_erase;
>> struct uinput_request *req;
>> char *phys;
>> + const char *path;
>> + unsigned int size;
>>
>> retval = mutex_lock_interruptible(&udev->mutex);
>> if (retval)
>> @@ -828,7 +846,24 @@ static long uinput_ioctl_handler(struct file *file, unsigned int cmd,
>> break;
>>
>> default:
>> - retval = -EINVAL;
>> + retval = -EAGAIN;
>> + }
>> +
>> + if (retval == -EAGAIN) {
>> + size = _IOC_SIZE(cmd);
>> +
>> + /* Now check variable-length commands */
>> + switch (cmd & ~IOCSIZE_MASK) {
>> + case UI_GET_SYSPATH(0):
>> + path = kobject_get_path(&udev->dev->dev.kobj,
>> + GFP_KERNEL);
>
> I know, device registration is protected by udev->mutex but I'd still prefer:
> if (udev->state != UIST_CREATED)
> return -ENOENT;
oops. Definitively, this should be added.
>
> But that's probably a matter of taste.
I think it is a mistake not adding this. Without it (in the current
implementation), the user-space can call it before the device is
created, leading to some garbage (or even oopses) depending on how
kobject_get_path() handles the queries for non added devices.
Cheers,
Benjamin
>
>> + retval = uinput_str_to_user(path, size, p);
>> + kfree(path);
>> + break;
>> +
>> + default:
>> + retval = -EINVAL;
>> + }
>> }
>>
>> out:
>> diff --git a/include/linux/uinput.h b/include/linux/uinput.h
>> index 6291a22..64fab81 100644
>> --- a/include/linux/uinput.h
>> +++ b/include/linux/uinput.h
>> @@ -22,6 +22,7 @@
>> * Changes/Revisions:
>> * 0.4 12/07/2013 (Peter Hutterer <peter.hutterer@redhat.com>)
>> * - update uinput_user_dev struct to allow abs resolution
>> + * - add UI_GET_SYSPATH ioctl
>> * 0.3 24/05/2006 (Anssi Hannula <anssi.hannulagmail.com>)
>> * - update ff support for the changes in kernel interface
>> * - add UINPUT_VERSION
>> diff --git a/include/uapi/linux/uinput.h b/include/uapi/linux/uinput.h
>> index f6a393b..d826409 100644
>> --- a/include/uapi/linux/uinput.h
>> +++ b/include/uapi/linux/uinput.h
>> @@ -22,6 +22,7 @@
>> * Changes/Revisions:
>> * 0.4 12/07/2013 (Peter Hutterer <peter.hutterer@redhat.com>)
>> * - update uinput_user_dev struct to allow abs resolution
>> + * - add UI_GET_SYSPATH ioctl
>> * 0.3 24/05/2006 (Anssi Hannula <anssi.hannulagmail.com>)
>> * - update ff support for the changes in kernel interface
>> * - add UINPUT_VERSION
>> @@ -75,6 +76,8 @@ struct uinput_ff_erase {
>> #define UI_BEGIN_FF_ERASE _IOWR(UINPUT_IOCTL_BASE, 202, struct uinput_ff_erase)
>> #define UI_END_FF_ERASE _IOW(UINPUT_IOCTL_BASE, 203, struct uinput_ff_erase)
>>
>> +#define UI_GET_SYSPATH(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 300, len)
>> +
>> /*
>> * To write a force-feedback-capable driver, the upload_effect
>> * and erase_effect callbacks in input_dev must be implemented.
>> --
>> 1.8.3.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply
* Re: [PATCH] hid: Add new driver for non-compliant Xin-Mo devices.
From: Jiri Kosina @ 2013-07-29 9:51 UTC (permalink / raw)
To: Olivier Scherler; +Cc: linux-kernel, linux-input
In-Reply-To: <1374945602-11894-2-git-send-email-oscherler@ithink.ch>
On Sat, 27 Jul 2013, oscherler@ithink.ch wrote:
> From: Olivier Scherler <oscherler@ithink.ch>
>
> The driver currently only supports the Dual Arcade controller.
> It fixes the negative axis event values (the devices sends -2) to match the
> logical axis minimum of the HID report descriptor (the report announces -1).
> It is needed because hid-input discards out of bounds values.
Applied, thanks Olivier.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* Re: [PATCH 3/5] input.h: add keycodes for Fn Lock
From: Mauro Carvalho Chehab @ 2013-07-29 10:03 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input
In-Reply-To: <20130729045358.GC8539@core.coreip.homeip.net>
Hi Dmitry,
Em Sun, 28 Jul 2013 21:53:58 -0700
Dmitry Torokhov <dmitry.torokhov@gmail.com> escreveu:
> Hi Mauro,
>
> On Mon, Jul 29, 2013 at 12:59:37AM -0300, Mauro Carvalho Chehab wrote:
> > Samsung notebooks have a FN LOCK key. It works like CAPS LOCK or NUM
> > LOCK keys.
> >
> > When FN LOCK key is pressed, any further press to a key with a blue label
> > on it (Fn keys) will produce the alternate code.
> >
> > Another press makes the keyboard to return to its normal state.
> >
> > On the notebooks where such feature were found, a FN LOCK on event
> > produces scancode 0xa8, and a FN LOCK off event produces scancode 0xa9.
> >
> > Yet, it is better to reserve some space at the keymap to allow some
> > different implementation of this feature where the same keycode might
> > be used.
> >
> > Also, as this is actually a switch, add a switch indicator to report
> > when this switch is set/reset.
> >
> > Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
> > ---
> > include/uapi/linux/input.h | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
> > index d584047..4622c34 100644
> > --- a/include/uapi/linux/input.h
> > +++ b/include/uapi/linux/input.h
> > @@ -716,6 +716,10 @@ struct input_keymap_entry {
> > #define BTN_DPAD_LEFT 0x222
> > #define BTN_DPAD_RIGHT 0x223
> >
> > +#define KEY_FNLOCK_TOGGLE 0x224 /* Request switch Fn on or off */
> > +#define KEY_FNLOCK_ON 0x225
> > +#define KEY_FNLOCK_OFF 0x226
> > +
> > #define BTN_TRIGGER_HAPPY 0x2c0
> > #define BTN_TRIGGER_HAPPY1 0x2c0
> > #define BTN_TRIGGER_HAPPY2 0x2c1
> > @@ -853,6 +857,7 @@ struct input_keymap_entry {
> > #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */
> > #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */
> > #define SW_LINEIN_INSERT 0x0d /* set = inserted */
> > +#define SW_FNLOCK 0x0e /* set = Fn locked */
>
> I am not sure if we need both the keys and the switch, so I would
> probably simply go with the keys, and not bother with switch. Then we do
> not need to touch the atkbd driver at all and rely on udev to set up the
> keymap and force release keys.
The hole idea of doing those patches is to have an userspace tool that will
be able to show software LEDs, like mate-applet-lockeys, that will query
the input driver to know the current status. So, the better is to keep
control of it as soon as kernel starts controlling the Keyboard, as,
otherwise, the software LED indicators may be wrong.
If you think that having both keycodes and a switch is an overkill, then
the better is to just keep the switch.
--
Cheers,
Mauro
^ permalink raw reply
* Re: [PATCH 1/5] atkbd: Fix key release for Fn keys on Samsung series 5 ultra 540UC
From: Mauro Carvalho Chehab @ 2013-07-29 10:04 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input
In-Reply-To: <20130729044909.GA8539@core.coreip.homeip.net>
Em Sun, 28 Jul 2013 21:49:09 -0700
Dmitry Torokhov <dmitry.torokhov@gmail.com> escreveu:
> Hi Mauro,
>
>
> On Mon, Jul 29, 2013 at 12:59:35AM -0300, Mauro Carvalho Chehab wrote:
> > Samsung series 5 ultra notebooks don't produce release events for certain
> > keys (Fn+F1, Fn+F11, Fn+F12 and Fn Lock). Add those keys at the release
> > fixup table.
> >
>
> As I mentioned, the force release should be handled by udev instead of
> adding kernel driver quirk.
Ah, OK. I'll drop both patches 1 and 2 on a next patchset.
--
Cheers,
Mauro
^ permalink raw reply
* Re: [PATCH 3/5] input.h: add keycodes for Fn Lock
From: Mauro Carvalho Chehab @ 2013-07-29 10:50 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input
In-Reply-To: <20130729070346.0cad1ace@samsung.com>
Em Mon, 29 Jul 2013 07:03:46 -0300
Mauro Carvalho Chehab <m.chehab@samsung.com> escreveu:
> Hi Dmitry,
>
> Em Sun, 28 Jul 2013 21:53:58 -0700
> Dmitry Torokhov <dmitry.torokhov@gmail.com> escreveu:
>
> > Hi Mauro,
> >
> > On Mon, Jul 29, 2013 at 12:59:37AM -0300, Mauro Carvalho Chehab wrote:
> > > Samsung notebooks have a FN LOCK key. It works like CAPS LOCK or NUM
> > > LOCK keys.
> > >
> > > When FN LOCK key is pressed, any further press to a key with a blue label
> > > on it (Fn keys) will produce the alternate code.
> > >
> > > Another press makes the keyboard to return to its normal state.
> > >
> > > On the notebooks where such feature were found, a FN LOCK on event
> > > produces scancode 0xa8, and a FN LOCK off event produces scancode 0xa9.
> > >
> > > Yet, it is better to reserve some space at the keymap to allow some
> > > different implementation of this feature where the same keycode might
> > > be used.
> > >
> > > Also, as this is actually a switch, add a switch indicator to report
> > > when this switch is set/reset.
> > >
> > > Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
> > > ---
> > > include/uapi/linux/input.h | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
> > > index d584047..4622c34 100644
> > > --- a/include/uapi/linux/input.h
> > > +++ b/include/uapi/linux/input.h
> > > @@ -716,6 +716,10 @@ struct input_keymap_entry {
> > > #define BTN_DPAD_LEFT 0x222
> > > #define BTN_DPAD_RIGHT 0x223
> > >
> > > +#define KEY_FNLOCK_TOGGLE 0x224 /* Request switch Fn on or off */
> > > +#define KEY_FNLOCK_ON 0x225
> > > +#define KEY_FNLOCK_OFF 0x226
> > > +
> > > #define BTN_TRIGGER_HAPPY 0x2c0
> > > #define BTN_TRIGGER_HAPPY1 0x2c0
> > > #define BTN_TRIGGER_HAPPY2 0x2c1
> > > @@ -853,6 +857,7 @@ struct input_keymap_entry {
> > > #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */
> > > #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */
> > > #define SW_LINEIN_INSERT 0x0d /* set = inserted */
> > > +#define SW_FNLOCK 0x0e /* set = Fn locked */
> >
> > I am not sure if we need both the keys and the switch, so I would
> > probably simply go with the keys, and not bother with switch. Then we do
> > not need to touch the atkbd driver at all and rely on udev to set up the
> > keymap and force release keys.
>
> The hole idea of doing those patches is to have an userspace tool that will
> be able to show software LEDs, like mate-applet-lockeys, that will query
> the input driver to know the current status. So, the better is to keep
> control of it as soon as kernel starts controlling the Keyboard, as,
> otherwise, the software LED indicators may be wrong.
>
> If you think that having both keycodes and a switch is an overkill, then
> the better is to just keep the switch.
After thinking for a little bit, I can see a few alternatives:
1) add patch 3/5 and patch 4/5 as is. No need to apply patch 5/5. The
Fn Lock switch support will start work as soon as udev initializes the
keytables.
2) Add patches 3/5 and patch 4/5 as is, and patch 5/5 rebased, as:
http://git.infradead.org/users/mchehab/samsung.git/commitdiff/96171bbd42d8ab9dfc3f36e0d4796080a8989344
This way, all keyboards with FN LOCK will require a quirk at atkbd.
The key handling will only start after udev starts.
3) Modify patch 3/5 to only have there a switch (or a LED). That will
require a change at patch 5/5 to use the scancodes to handle the
switch directly.
IMHO, (3) is better, as it will start handling the FN LOCK earlier,
reducing the risk of someone press the key after keyboard reset and
before udev to load the keytable, and providing a more reliable
software LED indication.
Please let me know what works best for you, and I'll redo the patches.
Thanks!
Mauro
^ permalink raw reply
* [PATCH v6] Input: sysrq - DT binding for key sequence
From: mathieu.poirier @ 2013-07-29 16:33 UTC (permalink / raw)
To: robherring2, grant.likely, dmitry.torokhov
Cc: devicetree, john.stultz, linux-input, kernel-team,
mathieu.poirier
From: "Mathieu J. Poirier" <mathieu.poirier@linaro.org>
Adding a simple device tree binding for the specification of key sequences.
Definition of the keys found in the sequence are located in
'include/uapi/linux/input.h'.
For the sysrq driver, holding the sequence of keys down for a specific amount of time
will reset the system.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
changes for v6:
- Made binding description more specific. 'sysrq-reset-seq's definition
was enhanced and the case where 'timeout-ms' is omitted clearly
explained.
---
.../devicetree/bindings/input/input-reset.txt | 34 ++++++++++++++++++++
drivers/tty/sysrq.c | 37 ++++++++++++++++++++++
2 files changed, 71 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/input-reset.txt
diff --git a/Documentation/devicetree/bindings/input/input-reset.txt b/Documentation/devicetree/bindings/input/input-reset.txt
new file mode 100644
index 0000000..13421a9
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/input-reset.txt
@@ -0,0 +1,34 @@
+Input: sysrq reset sequence
+
+A simple binding to represent a set of keys as described in
+include/uapi/linux/input.h. This is to communicate a
+sequence of keys to the sysrq driver. Upon holding the keys
+for a specified amount of time (if specified) the system is
+sync'ed and reset.
+
+Key sequences are global to the system but all the keys in a
+set must be coming from the same input device.
+
+The /chosen node should contain a 'linux,sysrq-reset-seq' child
+node to define a set of keys.
+
+Required property:
+sysrq-reset-seq: array of Linux keycodes, one keycode per cell.
+
+Optional property:
+timeout-ms: duration keys must be pressed together in milliseconds
+before generating a sysrq. If omitted the system is rebooted
+immediately when a valid sequence has beend recognized.
+
+Example:
+
+ chosen {
+ linux,sysrq-reset-seq {
+ keyset = <0x03
+ 0x04
+ 0x0a>;
+ timeout-ms = <3000>;
+ };
+ };
+
+Would represent KEY_2, KEY_3 and KEY_9.
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index d5cc3ac..b04a24d 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -45,6 +45,7 @@
#include <linux/moduleparam.h>
#include <linux/jiffies.h>
#include <linux/syscalls.h>
+#include <linux/of.h>
#include <asm/ptrace.h>
#include <asm/irq_regs.h>
@@ -681,6 +682,34 @@ static void sysrq_detect_reset_sequence(struct sysrq_state *state,
}
}
+static void sysrq_of_get_keyreset_config(void)
+{
+ u32 key;
+ struct device_node *np;
+ struct property *prop;
+ const __be32 *p;
+
+ np = of_find_node_by_path("/chosen/linux,sysrq-reset-seq");
+ if (!np) {
+ pr_debug("No sysrq node found");
+ return;
+ }
+
+ /* reset in case a __weak definition was present */
+ sysrq_reset_seq_len = 0;
+
+ of_property_for_each_u32(np, "keyset", prop, p, key) {
+ if ((key == KEY_RESERVED || key > KEY_MAX) ||
+ (sysrq_reset_seq_len == SYSRQ_KEY_RESET_MAX))
+ break;
+
+ sysrq_reset_seq[sysrq_reset_seq_len++] = (unsigned short)key;
+ }
+
+ /* get reset timeout if any */
+ of_property_read_u32(np, "timeout-ms", &sysrq_reset_downtime_ms);
+}
+
static void sysrq_reinject_alt_sysrq(struct work_struct *work)
{
struct sysrq_state *sysrq =
@@ -914,6 +943,7 @@ static inline void sysrq_register_handler(void)
int error;
int i;
+ /* first check if a __weak interface was instantiated */
for (i = 0; i < ARRAY_SIZE(sysrq_reset_seq); i++) {
key = platform_sysrq_reset_seq[i];
if (key == KEY_RESERVED || key > KEY_MAX)
@@ -922,6 +952,13 @@ static inline void sysrq_register_handler(void)
sysrq_reset_seq[sysrq_reset_seq_len++] = key;
}
+ /*
+ * DT configuration takes precedence over anything
+ * that would have been defined via the __weak
+ * interface
+ */
+ sysrq_of_get_keyreset_config();
+
error = input_register_handler(&sysrq_handler);
if (error)
pr_err("Failed to register input handler, error %d", error);
--
1.8.1.2
^ permalink raw reply related
* [PATCH v3 1/3] Input: omap-keypad: Enable wakeup capability for keypad.
From: Illia Smyrnov @ 2013-07-29 16:45 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, linux-omap, Felipe Balbi
In-Reply-To: <1375116311-13999-1-git-send-email-illia.smyrnov@ti.com>
Enable/disable IRQ wake in suspend/resume handlers
to make the keypad wakeup capable.
Signed-off-by: Illia Smyrnov <illia.smyrnov@ti.com>
---
drivers/input/keyboard/omap4-keypad.c | 43 +++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 0244262..feab00f 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -74,6 +74,7 @@ struct omap4_keypad {
struct input_dev *input;
void __iomem *base;
+ bool irq_wake_enabled;
unsigned int irq;
unsigned int rows;
@@ -380,6 +381,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
goto err_free_input;
}
+ device_init_wakeup(&pdev->dev, true);
pm_runtime_put_sync(&pdev->dev);
error = input_register_device(keypad_data->input);
@@ -393,6 +395,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
err_pm_disable:
pm_runtime_disable(&pdev->dev);
+ device_init_wakeup(&pdev->dev, false);
free_irq(keypad_data->irq, keypad_data);
err_free_keymap:
kfree(keypad_data->keymap);
@@ -418,6 +421,8 @@ static int omap4_keypad_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
+ device_init_wakeup(&pdev->dev, false);
+
input_unregister_device(keypad_data->input);
iounmap(keypad_data->base);
@@ -439,12 +444,50 @@ static const struct of_device_id omap_keypad_dt_match[] = {
MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
#endif
+#ifdef CONFIG_PM_SLEEP
+static int omap4_keypad_suspend(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
+ int error;
+
+ if (device_may_wakeup(&pdev->dev)) {
+ error = enable_irq_wake(keypad_data->irq);
+ if (!error)
+ keypad_data->irq_wake_enabled = true;
+ }
+
+ return 0;
+}
+
+static int omap4_keypad_resume(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
+
+ if (device_may_wakeup(&pdev->dev) && keypad_data->irq_wake_enabled) {
+ disable_irq_wake(keypad_data->irq);
+ keypad_data->irq_wake_enabled = false;
+ }
+
+ return 0;
+}
+
+static SIMPLE_DEV_PM_OPS(omap4_keypad_pm_ops, omap4_keypad_suspend,
+ omap4_keypad_resume);
+
+#define OMAP4_KEYPAD_PM_OPS (&omap4_keypad_pm_ops)
+#else
+#define OMAP4_KEYPAD_PM_OPS NULL
+#endif
+
static struct platform_driver omap4_keypad_driver = {
.probe = omap4_keypad_probe,
.remove = omap4_keypad_remove,
.driver = {
.name = "omap4-keypad",
.owner = THIS_MODULE,
+ .pm = OMAP4_KEYPAD_PM_OPS,
.of_match_table = of_match_ptr(omap_keypad_dt_match),
},
};
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 2/3] Input: omap-keypad: errata i689: Correct debounce time
From: Illia Smyrnov @ 2013-07-29 16:45 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, linux-omap, Felipe Balbi
In-Reply-To: <1375116311-13999-1-git-send-email-illia.smyrnov@ti.com>
From: Axel Haslam <axelhaslam@ti.com>
Set debounce time value to 12ms to workaround the errata.
ERRATA DESCRIPTION:
When a key is released for a time shorter than the debounce time,
in-between 2 key press (KP1 and KP2), the keyboard state machine will go to
idle mode and will never detect the key release (after KP1,and also after KP2),
and thus will never generate a new IRQ indicating the key release.
>From the operating system standpoint, only a key press as been detected,
and the key will keep on being printed on the screen until another or
the same key is pressed again.When the failing state has been reached,
the KBD_STATEMACHINE register will show "idle state" and the KBD_FULLCODE
register won't be empty, this is the signature of the bug.There is no impact
on the power consumption of the system as the state machine goes to IDLE state.
WORKAROUND:
First thing is to program the debounce time correctly:
If X (us) is the maximum time of bounces when a key is pressed or released,
and Y (us) is the minimum time of a key release that is expected to be detected,
then the debounce time should be set to a value inbetween X and Y.
In case it is still possible to get shorter than debounce time key-release
events, then the only solution is to implement a software workaround:
Before printing a second character on the screen, the software must check if
the keyboard has hit the failing condition (cf signature of the bug above)
or if the key is still really pressed and then take the appropriate actions.
Silicon revisions impacted: OMAP4430 ES 1.0,2.0,2.1,2.2,2.3
OMAP4460 ES 1.0,1.1
OMAP5430 ES 1.0
Signed-off-by: Axel Haslam <axelhaslam@ti.com>
Signed-off-by: Illia Smyrnov <illia.smyrnov@ti.com>
---
Based on top of v3.11-rc3
Depends on:
Input: omap-keypad: Cleanup - use bitfiled instead of hardcoded values
https://patchwork.kernel.org/patch/2832913/
drivers/input/keyboard/omap4-keypad.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index feab00f..e8bdc76 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -62,8 +62,10 @@
/* OMAP4 values */
#define OMAP4_VAL_IRQDISABLE 0x0
-#define OMAP4_VAL_DEBOUNCINGTIME 0x7
-#define OMAP4_VAL_PVT 0x7
+
+/* Errata i689: set debounce time value to 12ms */
+#define OMAP4_VAL_DEBOUNCINGTIME 0x2
+#define OMAP4_VAL_PVT 0x6
enum {
KBD_REVISION_OMAP4 = 0,
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 3/3] Input: omap-keypad: Setup irq type from DT
From: Illia Smyrnov @ 2013-07-29 16:45 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, linux-omap, Felipe Balbi
In-Reply-To: <1375116311-13999-1-git-send-email-illia.smyrnov@ti.com>
OMAP4 is DT only, so read the keypad IRQ type from DT instead hardcoding it
in driver.
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Illia Smyrnov <illia.smyrnov@ti.com>
---
Based on top of v3.11-rc3
Depends on:
Input: omap-keypad: Convert to threaded IRQ
https://patchwork.kernel.org/patch/2832920/
drivers/input/keyboard/omap4-keypad.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index e8bdc76..75f8b94 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -375,8 +375,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
}
error = request_threaded_irq(keypad_data->irq, omap4_keypad_irq_handler,
- omap4_keypad_irq_thread_fn,
- IRQF_TRIGGER_RISING,
+ omap4_keypad_irq_thread_fn, 0,
"omap4-keypad", keypad_data);
if (error) {
dev_err(&pdev->dev, "failed to register interrupt\n");
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 0/3] Input: omap-keypad: Wakeup capability and w/a for i689 errata.
From: Illia Smyrnov @ 2013-07-29 16:45 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, linux-omap, Felipe Balbi
This patchset adds wake up capability for the keypad and
workaround for i689 errata.
Based on top of v3.11-rc3
Depends on:
Input: omap-keypad: Convert to threaded IRQ
https://patchwork.kernel.org/patch/2832920/
Input: omap-keypad: Cleanup - use bitfiled instead of hardcoded values
https://patchwork.kernel.org/patch/2832913/
Axel Haslam (1):
Input: omap-keypad: errata i689: Correct debounce time
Illia Smyrnov (2):
Input: omap-keypad: Enable wakeup capability for keypad.
Input: omap-keypad: Setup irq type from DT
drivers/input/keyboard/omap4-keypad.c | 52 ++++++++++++++++++++++++++++++---
1 file changed, 48 insertions(+), 4 deletions(-)
--
1.7.9.5
^ permalink raw reply
* Re: [PATCH v3 1/3] Input: omap-keypad: Enable wakeup capability for keypad.
From: Felipe Balbi @ 2013-07-29 18:04 UTC (permalink / raw)
To: Illia Smyrnov
Cc: Dmitry Torokhov, linux-input, linux-kernel, linux-omap,
Felipe Balbi
In-Reply-To: <1375116311-13999-2-git-send-email-illia.smyrnov@ti.com>
[-- Attachment #1: Type: text/plain, Size: 2030 bytes --]
Hi,
On Mon, Jul 29, 2013 at 07:45:09PM +0300, Illia Smyrnov wrote:
> Enable/disable IRQ wake in suspend/resume handlers
> to make the keypad wakeup capable.
>
> Signed-off-by: Illia Smyrnov <illia.smyrnov@ti.com>
> ---
> drivers/input/keyboard/omap4-keypad.c | 43 +++++++++++++++++++++++++++++++++
> 1 file changed, 43 insertions(+)
>
> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
> index 0244262..feab00f 100644
> --- a/drivers/input/keyboard/omap4-keypad.c
> +++ b/drivers/input/keyboard/omap4-keypad.c
> @@ -74,6 +74,7 @@ struct omap4_keypad {
> struct input_dev *input;
>
> void __iomem *base;
> + bool irq_wake_enabled;
this flag is a bit weird... but I can't find a better way to handle this
situation. In one way, you shouldn't prevent system suspend, so you can
error out in case enable_irq_wake() fails, otoh if enable_irq_wake()
fails and you return 0, on resume disable_irq_wake() will throw
unbalanced calls warning. Maybe someone else has a better idea.
> @@ -439,12 +444,50 @@ static const struct of_device_id omap_keypad_dt_match[] = {
> MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
> #endif
>
> +#ifdef CONFIG_PM_SLEEP
> +static int omap4_keypad_suspend(struct device *dev)
> +{
> + struct platform_device *pdev = to_platform_device(dev);
you don't need to access the platform_device...
> + struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
... since this can become:
struct omap4_keypad *keypad_data = dev_get_drvdata(dev);
> + int error;
> +
> + if (device_may_wakeup(&pdev->dev)) {
> + error = enable_irq_wake(keypad_data->irq);
> + if (!error)
> + keypad_data->irq_wake_enabled = true;
> + }
> +
> + return 0;
> +}
> +
> +static int omap4_keypad_resume(struct device *dev)
> +{
> + struct platform_device *pdev = to_platform_device(dev);
> + struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
ditto, use dev_get_drvdata() instead.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 2/3] Input: omap-keypad: errata i689: Correct debounce time
From: Felipe Balbi @ 2013-07-29 18:08 UTC (permalink / raw)
To: Illia Smyrnov
Cc: Dmitry Torokhov, linux-input, linux-kernel, linux-omap,
Felipe Balbi
In-Reply-To: <1375116311-13999-3-git-send-email-illia.smyrnov@ti.com>
[-- Attachment #1: Type: text/plain, Size: 2776 bytes --]
Hi,
On Mon, Jul 29, 2013 at 07:45:10PM +0300, Illia Smyrnov wrote:
> From: Axel Haslam <axelhaslam@ti.com>
>
> Set debounce time value to 12ms to workaround the errata.
>
> ERRATA DESCRIPTION:
> When a key is released for a time shorter than the debounce time,
> in-between 2 key press (KP1 and KP2), the keyboard state machine will go to
> idle mode and will never detect the key release (after KP1,and also after KP2),
> and thus will never generate a new IRQ indicating the key release.
> From the operating system standpoint, only a key press as been detected,
> and the key will keep on being printed on the screen until another or
> the same key is pressed again.When the failing state has been reached,
> the KBD_STATEMACHINE register will show "idle state" and the KBD_FULLCODE
> register won't be empty, this is the signature of the bug.There is no impact
> on the power consumption of the system as the state machine goes to IDLE state.
>
> WORKAROUND:
> First thing is to program the debounce time correctly:
> If X (us) is the maximum time of bounces when a key is pressed or released,
> and Y (us) is the minimum time of a key release that is expected to be detected,
> then the debounce time should be set to a value inbetween X and Y.
>
> In case it is still possible to get shorter than debounce time key-release
> events, then the only solution is to implement a software workaround:
>
> Before printing a second character on the screen, the software must check if
> the keyboard has hit the failing condition (cf signature of the bug above)
> or if the key is still really pressed and then take the appropriate actions.
>
> Silicon revisions impacted: OMAP4430 ES 1.0,2.0,2.1,2.2,2.3
> OMAP4460 ES 1.0,1.1
> OMAP5430 ES 1.0
if only these are affected, should you have revision check ? Also we
don't support OMAP5430 ES 1.0. I say this because, IMO, debouncing time
is likely to be board-specific and/or application-specific.
> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
> index feab00f..e8bdc76 100644
> --- a/drivers/input/keyboard/omap4-keypad.c
> +++ b/drivers/input/keyboard/omap4-keypad.c
> @@ -62,8 +62,10 @@
>
> /* OMAP4 values */
> #define OMAP4_VAL_IRQDISABLE 0x0
> -#define OMAP4_VAL_DEBOUNCINGTIME 0x7
> -#define OMAP4_VAL_PVT 0x7
> +
> +/* Errata i689: set debounce time value to 12ms */
> +#define OMAP4_VAL_DEBOUNCINGTIME 0x2
> +#define OMAP4_VAL_PVT 0x6
to make this easier to understand, you might want to convert this into a
better macro that takes an argument in microseconds and you calculate
the debouncing time which should be written to HW.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 3/3] Input: omap-keypad: Setup irq type from DT
From: Felipe Balbi @ 2013-07-29 18:09 UTC (permalink / raw)
To: Illia Smyrnov
Cc: Dmitry Torokhov, linux-input, linux-kernel, linux-omap,
Felipe Balbi
In-Reply-To: <1375116311-13999-4-git-send-email-illia.smyrnov@ti.com>
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
On Mon, Jul 29, 2013 at 07:45:11PM +0300, Illia Smyrnov wrote:
> OMAP4 is DT only, so read the keypad IRQ type from DT instead hardcoding it
> in driver.
>
> Cc: Felipe Balbi <balbi@ti.com>
> Signed-off-by: Illia Smyrnov <illia.smyrnov@ti.com>
Looks good to my eyes:
Reviewed-by: Felipe Balbi <balbi@ti.com>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 1/3] Input: omap-keypad: Enable wakeup capability for keypad.
From: Dmitry Torokhov @ 2013-07-29 18:59 UTC (permalink / raw)
To: balbi; +Cc: Illia Smyrnov, linux-input, linux-kernel, linux-omap
In-Reply-To: <20130729180441.GF4964@radagast>
On Monday, July 29, 2013 09:04:41 PM Felipe Balbi wrote:
> Hi,
>
> On Mon, Jul 29, 2013 at 07:45:09PM +0300, Illia Smyrnov wrote:
> > Enable/disable IRQ wake in suspend/resume handlers
> > to make the keypad wakeup capable.
> >
> > Signed-off-by: Illia Smyrnov <illia.smyrnov@ti.com>
> > ---
> >
> > drivers/input/keyboard/omap4-keypad.c | 43
> > +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
> >
> > diff --git a/drivers/input/keyboard/omap4-keypad.c
> > b/drivers/input/keyboard/omap4-keypad.c index 0244262..feab00f 100644
> > --- a/drivers/input/keyboard/omap4-keypad.c
> > +++ b/drivers/input/keyboard/omap4-keypad.c
> > @@ -74,6 +74,7 @@ struct omap4_keypad {
> >
> > struct input_dev *input;
> >
> > void __iomem *base;
> >
> > + bool irq_wake_enabled;
>
> this flag is a bit weird... but I can't find a better way to handle this
> situation. In one way, you shouldn't prevent system suspend, so you can
> error out in case enable_irq_wake() fails, otoh if enable_irq_wake()
> fails and you return 0, on resume disable_irq_wake() will throw
> unbalanced calls warning. Maybe someone else has a better idea.
>
> > @@ -439,12 +444,50 @@ static const struct of_device_id
> > omap_keypad_dt_match[] = {>
> > MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
> > #endif
> >
> > +#ifdef CONFIG_PM_SLEEP
> > +static int omap4_keypad_suspend(struct device *dev)
> > +{
> > + struct platform_device *pdev = to_platform_device(dev);
>
> you don't need to access the platform_device...
>
> > + struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
>
> ... since this can become:
>
> struct omap4_keypad *keypad_data = dev_get_drvdata(dev);
No, please use correct accessors for the objects. Platform drivers deal
with platform devices and I prefer using platform_get_drvdata() on them.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH v3 1/3] Input: omap-keypad: Enable wakeup capability for keypad.
From: Felipe Balbi @ 2013-07-29 19:13 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: balbi, Illia Smyrnov, linux-input, linux-kernel, linux-omap,
Greg KH
In-Reply-To: <7605900.g1IUvSbegi@dtor-d630.eng.vmware.com>
[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]
Hi,
On Mon, Jul 29, 2013 at 11:59:45AM -0700, Dmitry Torokhov wrote:
> > > @@ -439,12 +444,50 @@ static const struct of_device_id
> > > omap_keypad_dt_match[] = {>
> > > MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
> > > #endif
> > >
> > > +#ifdef CONFIG_PM_SLEEP
> > > +static int omap4_keypad_suspend(struct device *dev)
> > > +{
> > > + struct platform_device *pdev = to_platform_device(dev);
> >
> > you don't need to access the platform_device...
> >
> > > + struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
> >
> > ... since this can become:
> >
> > struct omap4_keypad *keypad_data = dev_get_drvdata(dev);
>
> No, please use correct accessors for the objects. Platform drivers deal
> with platform devices and I prefer using platform_get_drvdata() on them.
The argument to this function is a struct device, you prefer to do some
pointer math to find the containing pdev, then deref that back to dev,
then to struct device_private and further to driver_data ?
Sounds like a waste of time IMHO. You already have the device pointer
anyway, why would you go through the trouble of calculating the
offsets for the containing struct platform_device ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 1/3] Input: omap-keypad: Enable wakeup capability for keypad.
From: Dmitry Torokhov @ 2013-07-29 19:59 UTC (permalink / raw)
To: balbi; +Cc: Illia Smyrnov, linux-input, linux-kernel, linux-omap, Greg KH
In-Reply-To: <20130729191324.GA5767@radagast>
On Monday, July 29, 2013 10:13:24 PM Felipe Balbi wrote:
> Hi,
>
> On Mon, Jul 29, 2013 at 11:59:45AM -0700, Dmitry Torokhov wrote:
> > > > @@ -439,12 +444,50 @@ static const struct of_device_id
> > > > omap_keypad_dt_match[] = {>
> > > >
> > > > MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
> > > > #endif
> > > >
> > > > +#ifdef CONFIG_PM_SLEEP
> > > > +static int omap4_keypad_suspend(struct device *dev)
> > > > +{
> > > > + struct platform_device *pdev = to_platform_device(dev);
> > >
> > > you don't need to access the platform_device...
> > >
> > > > + struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
> > >
> > > ... since this can become:
> > > struct omap4_keypad *keypad_data = dev_get_drvdata(dev);
> >
> > No, please use correct accessors for the objects. Platform drivers deal
> > with platform devices and I prefer using platform_get_drvdata() on them.
>
> The argument to this function is a struct device, you prefer to do some
> pointer math to find the containing pdev, then deref that back to dev,
> then to struct device_private and further to driver_data ?
>
> Sounds like a waste of time IMHO. You already have the device pointer
> anyway, why would you go through the trouble of calculating the
> offsets for the containing struct platform_device ?
This assumes knowledge of dev_get_drvdata() implementation and assumption
that it will stay the same. Unless I hear from device core guys that
<bus>_{get|set}_drvdata() methods are obsolete and will be eventually
removed I will require proper accessors being used.
Thanks!
--
Dmitry
^ permalink raw reply
* Re: [PATCH v3 1/3] Input: omap-keypad: Enable wakeup capability for keypad.
From: Felipe Balbi @ 2013-07-29 20:36 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: balbi, Illia Smyrnov, linux-input, linux-kernel, linux-omap,
Greg KH
In-Reply-To: <2416808.ThTjdiEasK@dtor-d630.eng.vmware.com>
[-- Attachment #1: Type: text/plain, Size: 2087 bytes --]
Hi,
On Mon, Jul 29, 2013 at 12:59:23PM -0700, Dmitry Torokhov wrote:
> > > > > @@ -439,12 +444,50 @@ static const struct of_device_id
> > > > > omap_keypad_dt_match[] = {>
> > > > >
> > > > > MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
> > > > > #endif
> > > > >
> > > > > +#ifdef CONFIG_PM_SLEEP
> > > > > +static int omap4_keypad_suspend(struct device *dev)
> > > > > +{
> > > > > + struct platform_device *pdev = to_platform_device(dev);
> > > >
> > > > you don't need to access the platform_device...
> > > >
> > > > > + struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
> > > >
> > > > ... since this can become:
> > > > struct omap4_keypad *keypad_data = dev_get_drvdata(dev);
> > >
> > > No, please use correct accessors for the objects. Platform drivers deal
> > > with platform devices and I prefer using platform_get_drvdata() on them.
> >
> > The argument to this function is a struct device, you prefer to do some
> > pointer math to find the containing pdev, then deref that back to dev,
> > then to struct device_private and further to driver_data ?
> >
> > Sounds like a waste of time IMHO. You already have the device pointer
> > anyway, why would you go through the trouble of calculating the
> > offsets for the containing struct platform_device ?
>
> This assumes knowledge of dev_get_drvdata() implementation and assumption
> that it will stay the same. Unless I hear from device core guys that
> <bus>_{get|set}_drvdata() methods are obsolete and will be eventually
> removed I will require proper accessors being used.
they're not obsolete and will never be removed. They're nothing but
helpers though. Instead of calling:
dev_set_drvdata(&pdev->dev);
you call:
platform_set_drvdata(pdev);
same is valid for every single bus, but in the end they all just wrap a
call dev_{set,get}_drvdata() internally. If you already have a struct
device pointer as argument, why waste cycles doing pointer math just to
go back to the same struct device pointer on the next call ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 1/3] Input: omap-keypad: Enable wakeup capability for keypad.
From: Dmitry Torokhov @ 2013-07-29 20:40 UTC (permalink / raw)
To: balbi; +Cc: Illia Smyrnov, linux-input, linux-kernel, linux-omap, Greg KH
In-Reply-To: <20130729203605.GB6547@radagast>
On Monday, July 29, 2013 11:36:05 PM Felipe Balbi wrote:
> Hi,
>
> On Mon, Jul 29, 2013 at 12:59:23PM -0700, Dmitry Torokhov wrote:
> > > > > > @@ -439,12 +444,50 @@ static const struct of_device_id
> > > > > > omap_keypad_dt_match[] = {>
> > > > > >
> > > > > > MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
> > > > > > #endif
> > > > > >
> > > > > > +#ifdef CONFIG_PM_SLEEP
> > > > > > +static int omap4_keypad_suspend(struct device *dev)
> > > > > > +{
> > > > > > + struct platform_device *pdev = to_platform_device(dev);
> > > > >
> > > > > you don't need to access the platform_device...
> > > > >
> > > > > > + struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
> > > > >
> > > > > ... since this can become:
> > > > > struct omap4_keypad *keypad_data = dev_get_drvdata(dev);
> > > >
> > > > No, please use correct accessors for the objects. Platform drivers
> > > > deal
> > > > with platform devices and I prefer using platform_get_drvdata() on
> > > > them.
> > >
> > > The argument to this function is a struct device, you prefer to do some
> > > pointer math to find the containing pdev, then deref that back to dev,
> > > then to struct device_private and further to driver_data ?
> > >
> > > Sounds like a waste of time IMHO. You already have the device pointer
> > > anyway, why would you go through the trouble of calculating the
> > > offsets for the containing struct platform_device ?
> >
> > This assumes knowledge of dev_get_drvdata() implementation and assumption
> > that it will stay the same. Unless I hear from device core guys that
> > <bus>_{get|set}_drvdata() methods are obsolete and will be eventually
> > removed I will require proper accessors being used.
>
> they're not obsolete and will never be removed. They're nothing but
> helpers though. Instead of calling:
>
> dev_set_drvdata(&pdev->dev);
>
> you call:
>
> platform_set_drvdata(pdev);
>
> same is valid for every single bus, but in the end they all just wrap a
> call dev_{set,get}_drvdata() internally. If you already have a struct
> device pointer as argument, why waste cycles doing pointer math just to
> go back to the same struct device pointer on the next call ?
Because I do not want to rely on the fact that what my driver set up
with platform_set_drvdata(pdev, XXX) is the same as what dev_get_drvdata()
will return *in the current implementation*. Software layers and all
that...
--
Dmitry
^ permalink raw reply
* Re: [PATCH v6] Input: sysrq - DT binding for key sequence
From: Grant Likely @ 2013-07-30 4:09 UTC (permalink / raw)
To: Mathieu Poirier
Cc: Rob Herring, Dmitry Torokhov, devicetree@vger.kernel.org,
John Stultz, linux-input@vger.kernel.org, kernel-team
In-Reply-To: <1375115638-21236-1-git-send-email-mathieu.poirier@linaro.org>
On Mon, Jul 29, 2013 at 10:33 AM, <mathieu.poirier@linaro.org> wrote:
> From: "Mathieu J. Poirier" <mathieu.poirier@linaro.org>
>
> Adding a simple device tree binding for the specification of key sequences.
> Definition of the keys found in the sequence are located in
> 'include/uapi/linux/input.h'.
>
> For the sysrq driver, holding the sequence of keys down for a specific amount of time
> will reset the system.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
g.
> ---
> changes for v6:
> - Made binding description more specific. 'sysrq-reset-seq's definition
> was enhanced and the case where 'timeout-ms' is omitted clearly
> explained.
> ---
> .../devicetree/bindings/input/input-reset.txt | 34 ++++++++++++++++++++
> drivers/tty/sysrq.c | 37 ++++++++++++++++++++++
> 2 files changed, 71 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/input-reset.txt
>
> diff --git a/Documentation/devicetree/bindings/input/input-reset.txt b/Documentation/devicetree/bindings/input/input-reset.txt
> new file mode 100644
> index 0000000..13421a9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/input-reset.txt
> @@ -0,0 +1,34 @@
> +Input: sysrq reset sequence
> +
> +A simple binding to represent a set of keys as described in
> +include/uapi/linux/input.h. This is to communicate a
> +sequence of keys to the sysrq driver. Upon holding the keys
> +for a specified amount of time (if specified) the system is
> +sync'ed and reset.
> +
> +Key sequences are global to the system but all the keys in a
> +set must be coming from the same input device.
> +
> +The /chosen node should contain a 'linux,sysrq-reset-seq' child
> +node to define a set of keys.
> +
> +Required property:
> +sysrq-reset-seq: array of Linux keycodes, one keycode per cell.
> +
> +Optional property:
> +timeout-ms: duration keys must be pressed together in milliseconds
> +before generating a sysrq. If omitted the system is rebooted
> +immediately when a valid sequence has beend recognized.
> +
> +Example:
> +
> + chosen {
> + linux,sysrq-reset-seq {
> + keyset = <0x03
> + 0x04
> + 0x0a>;
> + timeout-ms = <3000>;
> + };
> + };
> +
> +Would represent KEY_2, KEY_3 and KEY_9.
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> index d5cc3ac..b04a24d 100644
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -45,6 +45,7 @@
> #include <linux/moduleparam.h>
> #include <linux/jiffies.h>
> #include <linux/syscalls.h>
> +#include <linux/of.h>
>
> #include <asm/ptrace.h>
> #include <asm/irq_regs.h>
> @@ -681,6 +682,34 @@ static void sysrq_detect_reset_sequence(struct sysrq_state *state,
> }
> }
>
> +static void sysrq_of_get_keyreset_config(void)
> +{
> + u32 key;
> + struct device_node *np;
> + struct property *prop;
> + const __be32 *p;
> +
> + np = of_find_node_by_path("/chosen/linux,sysrq-reset-seq");
> + if (!np) {
> + pr_debug("No sysrq node found");
> + return;
> + }
> +
> + /* reset in case a __weak definition was present */
> + sysrq_reset_seq_len = 0;
> +
> + of_property_for_each_u32(np, "keyset", prop, p, key) {
> + if ((key == KEY_RESERVED || key > KEY_MAX) ||
> + (sysrq_reset_seq_len == SYSRQ_KEY_RESET_MAX))
> + break;
> +
> + sysrq_reset_seq[sysrq_reset_seq_len++] = (unsigned short)key;
> + }
> +
> + /* get reset timeout if any */
> + of_property_read_u32(np, "timeout-ms", &sysrq_reset_downtime_ms);
> +}
> +
> static void sysrq_reinject_alt_sysrq(struct work_struct *work)
> {
> struct sysrq_state *sysrq =
> @@ -914,6 +943,7 @@ static inline void sysrq_register_handler(void)
> int error;
> int i;
>
> + /* first check if a __weak interface was instantiated */
> for (i = 0; i < ARRAY_SIZE(sysrq_reset_seq); i++) {
> key = platform_sysrq_reset_seq[i];
> if (key == KEY_RESERVED || key > KEY_MAX)
> @@ -922,6 +952,13 @@ static inline void sysrq_register_handler(void)
> sysrq_reset_seq[sysrq_reset_seq_len++] = key;
> }
>
> + /*
> + * DT configuration takes precedence over anything
> + * that would have been defined via the __weak
> + * interface
> + */
> + sysrq_of_get_keyreset_config();
> +
> error = input_register_handler(&sysrq_handler);
> if (error)
> pr_err("Failed to register input handler, error %d", error);
> --
> 1.8.1.2
>
^ permalink raw reply
* Re: [PATCH 3/5] input.h: add keycodes for Fn Lock
From: Dmitry Torokhov @ 2013-07-30 7:14 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-input
In-Reply-To: <20130729070346.0cad1ace@samsung.com>
On Mon, Jul 29, 2013 at 07:03:46AM -0300, Mauro Carvalho Chehab wrote:
> Hi Dmitry,
>
> Em Sun, 28 Jul 2013 21:53:58 -0700
> Dmitry Torokhov <dmitry.torokhov@gmail.com> escreveu:
>
> > Hi Mauro,
> >
> > On Mon, Jul 29, 2013 at 12:59:37AM -0300, Mauro Carvalho Chehab wrote:
> > > Samsung notebooks have a FN LOCK key. It works like CAPS LOCK or NUM
> > > LOCK keys.
> > >
> > > When FN LOCK key is pressed, any further press to a key with a blue label
> > > on it (Fn keys) will produce the alternate code.
> > >
> > > Another press makes the keyboard to return to its normal state.
> > >
> > > On the notebooks where such feature were found, a FN LOCK on event
> > > produces scancode 0xa8, and a FN LOCK off event produces scancode 0xa9.
> > >
> > > Yet, it is better to reserve some space at the keymap to allow some
> > > different implementation of this feature where the same keycode might
> > > be used.
> > >
> > > Also, as this is actually a switch, add a switch indicator to report
> > > when this switch is set/reset.
> > >
> > > Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
> > > ---
> > > include/uapi/linux/input.h | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
> > > index d584047..4622c34 100644
> > > --- a/include/uapi/linux/input.h
> > > +++ b/include/uapi/linux/input.h
> > > @@ -716,6 +716,10 @@ struct input_keymap_entry {
> > > #define BTN_DPAD_LEFT 0x222
> > > #define BTN_DPAD_RIGHT 0x223
> > >
> > > +#define KEY_FNLOCK_TOGGLE 0x224 /* Request switch Fn on or off */
> > > +#define KEY_FNLOCK_ON 0x225
> > > +#define KEY_FNLOCK_OFF 0x226
> > > +
> > > #define BTN_TRIGGER_HAPPY 0x2c0
> > > #define BTN_TRIGGER_HAPPY1 0x2c0
> > > #define BTN_TRIGGER_HAPPY2 0x2c1
> > > @@ -853,6 +857,7 @@ struct input_keymap_entry {
> > > #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */
> > > #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */
> > > #define SW_LINEIN_INSERT 0x0d /* set = inserted */
> > > +#define SW_FNLOCK 0x0e /* set = Fn locked */
> >
> > I am not sure if we need both the keys and the switch, so I would
> > probably simply go with the keys, and not bother with switch. Then we do
> > not need to touch the atkbd driver at all and rely on udev to set up the
> > keymap and force release keys.
>
> The hole idea of doing those patches is to have an userspace tool that will
> be able to show software LEDs, like mate-applet-lockeys, that will query
> the input driver to know the current status. So, the better is to keep
> control of it as soon as kernel starts controlling the Keyboard, as,
> otherwise, the software LED indicators may be wrong.
>
> If you think that having both keycodes and a switch is an overkill, then
> the better is to just keep the switch.
Yes, we should have either the keys or the switch.
I am a bit concerned with the behavior of this FN key and whether the state
can be reported reliably. Have you tested the behavior of keyboard when you
press the FN key before atkbd driver had a chance to bind to it? What
about suspending with FN engaged and then resuming? Suspend-to-disk
behavior?
Thanks.
--
Dmitry
^ permalink raw reply
* [PATCH 21/35] Input: joysticks: use dev_get_platdata()
From: Jingoo Han @ 2013-07-30 8:13 UTC (permalink / raw)
To: 'Dmitry Torokhov'
Cc: 'Dmitry Torokhov', linux-input, 'Jingoo Han'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/input/joystick/as5011.c | 2 +-
drivers/input/joystick/maplecontrol.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c
index 121cd63..13eba2a 100644
--- a/drivers/input/joystick/as5011.c
+++ b/drivers/input/joystick/as5011.c
@@ -234,7 +234,7 @@ static int as5011_probe(struct i2c_client *client,
int irq;
int error;
- plat_data = client->dev.platform_data;
+ plat_data = dev_get_platdata(&client->dev);
if (!plat_data)
return -EINVAL;
diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c
index 59c10ec..8aa6e4c 100644
--- a/drivers/input/joystick/maplecontrol.c
+++ b/drivers/input/joystick/maplecontrol.c
@@ -61,7 +61,7 @@ static void dc_pad_callback(struct mapleq *mq)
static int dc_pad_open(struct input_dev *dev)
{
- struct dc_pad *pad = dev->dev.platform_data;
+ struct dc_pad *pad = dev_get_platdata(&dev->dev);
maple_getcond_callback(pad->mdev, dc_pad_callback, HZ/20,
MAPLE_FUNC_CONTROLLER);
@@ -71,7 +71,7 @@ static int dc_pad_open(struct input_dev *dev)
static void dc_pad_close(struct input_dev *dev)
{
- struct dc_pad *pad = dev->dev.platform_data;
+ struct dc_pad *pad = dev_get_platdata(&dev->dev);
maple_getcond_callback(pad->mdev, dc_pad_callback, 0,
MAPLE_FUNC_CONTROLLER);
--
1.7.10.4
^ permalink raw reply related
* [PATCH 22/35] Input: keyboard: use dev_get_platdata()
From: Jingoo Han @ 2013-07-30 8:14 UTC (permalink / raw)
To: 'Dmitry Torokhov'
Cc: 'Dmitry Torokhov', linux-input, 'Jingoo Han'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/input/keyboard/adp5520-keys.c | 2 +-
drivers/input/keyboard/adp5588-keys.c | 10 ++++++----
drivers/input/keyboard/adp5589-keys.c | 8 ++++----
drivers/input/keyboard/bf54x-keys.c | 4 ++--
drivers/input/keyboard/davinci_keyscan.c | 2 +-
drivers/input/keyboard/ep93xx_keypad.c | 2 +-
drivers/input/keyboard/imx_keypad.c | 3 ++-
drivers/input/keyboard/lm8323.c | 2 +-
drivers/input/keyboard/lm8333.c | 3 ++-
drivers/input/keyboard/max7359_keypad.c | 3 ++-
drivers/input/keyboard/mcs_touchkey.c | 2 +-
drivers/input/keyboard/mpr121_touchkey.c | 3 ++-
drivers/input/keyboard/nomadik-ske-keypad.c | 3 ++-
drivers/input/keyboard/omap-keypad.c | 2 +-
drivers/input/keyboard/pxa930_rotary.c | 3 ++-
drivers/input/keyboard/samsung-keypad.c | 2 +-
drivers/input/keyboard/sh_keysc.c | 4 ++--
drivers/input/keyboard/tca6416-keypad.c | 2 +-
drivers/input/keyboard/tnetv107x-keypad.c | 2 +-
drivers/input/keyboard/twl4030_keypad.c | 2 +-
drivers/input/keyboard/w90p910_keypad.c | 2 +-
21 files changed, 37 insertions(+), 29 deletions(-)
diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c
index ef26b17..0dc1151 100644
--- a/drivers/input/keyboard/adp5520-keys.c
+++ b/drivers/input/keyboard/adp5520-keys.c
@@ -71,7 +71,7 @@ static int adp5520_keys_notifier(struct notifier_block *nb,
static int adp5520_keys_probe(struct platform_device *pdev)
{
- struct adp5520_keys_platform_data *pdata = pdev->dev.platform_data;
+ struct adp5520_keys_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct input_dev *input;
struct adp5520_keys *dev;
int ret, i;
diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c
index dbd2047..e3874d3 100644
--- a/drivers/input/keyboard/adp5588-keys.c
+++ b/drivers/input/keyboard/adp5588-keys.c
@@ -173,7 +173,7 @@ static int adp5588_build_gpiomap(struct adp5588_kpad *kpad,
static int adp5588_gpio_add(struct adp5588_kpad *kpad)
{
struct device *dev = &kpad->client->dev;
- const struct adp5588_kpad_platform_data *pdata = dev->platform_data;
+ const struct adp5588_kpad_platform_data *pdata = dev_get_platdata(dev);
const struct adp5588_gpio_platform_data *gpio_data = pdata->gpio_data;
int i, error;
@@ -227,7 +227,7 @@ static int adp5588_gpio_add(struct adp5588_kpad *kpad)
static void adp5588_gpio_remove(struct adp5588_kpad *kpad)
{
struct device *dev = &kpad->client->dev;
- const struct adp5588_kpad_platform_data *pdata = dev->platform_data;
+ const struct adp5588_kpad_platform_data *pdata = dev_get_platdata(dev);
const struct adp5588_gpio_platform_data *gpio_data = pdata->gpio_data;
int error;
@@ -321,7 +321,8 @@ static irqreturn_t adp5588_irq(int irq, void *handle)
static int adp5588_setup(struct i2c_client *client)
{
- const struct adp5588_kpad_platform_data *pdata = client->dev.platform_data;
+ const struct adp5588_kpad_platform_data *pdata =
+ dev_get_platdata(&client->dev);
const struct adp5588_gpio_platform_data *gpio_data = pdata->gpio_data;
int i, ret;
unsigned char evt_mode1 = 0, evt_mode2 = 0, evt_mode3 = 0;
@@ -424,7 +425,8 @@ static int adp5588_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct adp5588_kpad *kpad;
- const struct adp5588_kpad_platform_data *pdata = client->dev.platform_data;
+ const struct adp5588_kpad_platform_data *pdata =
+ dev_get_platdata(&client->dev);
struct input_dev *input;
unsigned int revid;
int ret, i;
diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
index 67d12b3..e43efa0 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -499,7 +499,7 @@ static int adp5589_build_gpiomap(struct adp5589_kpad *kpad,
static int adp5589_gpio_add(struct adp5589_kpad *kpad)
{
struct device *dev = &kpad->client->dev;
- const struct adp5589_kpad_platform_data *pdata = dev->platform_data;
+ const struct adp5589_kpad_platform_data *pdata = dev_get_platdata(dev);
const struct adp5589_gpio_platform_data *gpio_data = pdata->gpio_data;
int i, error;
@@ -553,7 +553,7 @@ static int adp5589_gpio_add(struct adp5589_kpad *kpad)
static void adp5589_gpio_remove(struct adp5589_kpad *kpad)
{
struct device *dev = &kpad->client->dev;
- const struct adp5589_kpad_platform_data *pdata = dev->platform_data;
+ const struct adp5589_kpad_platform_data *pdata = dev_get_platdata(dev);
const struct adp5589_gpio_platform_data *gpio_data = pdata->gpio_data;
int error;
@@ -658,7 +658,7 @@ static int adp5589_setup(struct adp5589_kpad *kpad)
{
struct i2c_client *client = kpad->client;
const struct adp5589_kpad_platform_data *pdata =
- client->dev.platform_data;
+ dev_get_platdata(&client->dev);
u8 (*reg) (u8) = kpad->var->reg;
unsigned char evt_mode1 = 0, evt_mode2 = 0, evt_mode3 = 0;
unsigned char pull_mask = 0;
@@ -864,7 +864,7 @@ static int adp5589_probe(struct i2c_client *client,
{
struct adp5589_kpad *kpad;
const struct adp5589_kpad_platform_data *pdata =
- client->dev.platform_data;
+ dev_get_platdata(&client->dev);
struct input_dev *input;
unsigned int revid;
int ret, i;
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c
index fc88fb4..16fa340 100644
--- a/drivers/input/keyboard/bf54x-keys.c
+++ b/drivers/input/keyboard/bf54x-keys.c
@@ -180,7 +180,7 @@ static irqreturn_t bfin_kpad_isr(int irq, void *dev_id)
static int bfin_kpad_probe(struct platform_device *pdev)
{
struct bf54x_kpad *bf54x_kpad;
- struct bfin_kpad_platform_data *pdata = pdev->dev.platform_data;
+ struct bfin_kpad_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct input_dev *input;
int i, error;
@@ -332,7 +332,7 @@ out:
static int bfin_kpad_remove(struct platform_device *pdev)
{
- struct bfin_kpad_platform_data *pdata = pdev->dev.platform_data;
+ struct bfin_kpad_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev);
del_timer_sync(&bf54x_kpad->timer);
diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c
index d15977a..1559dc1 100644
--- a/drivers/input/keyboard/davinci_keyscan.c
+++ b/drivers/input/keyboard/davinci_keyscan.c
@@ -172,7 +172,7 @@ static int __init davinci_ks_probe(struct platform_device *pdev)
struct input_dev *key_dev;
struct resource *res, *mem;
struct device *dev = &pdev->dev;
- struct davinci_ks_platform_data *pdata = pdev->dev.platform_data;
+ struct davinci_ks_platform_data *pdata = dev_get_platdata(&pdev->dev);
int error, i;
if (pdata->device_enable) {
diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
index 47206bd..e598762 100644
--- a/drivers/input/keyboard/ep93xx_keypad.c
+++ b/drivers/input/keyboard/ep93xx_keypad.c
@@ -244,7 +244,7 @@ static int ep93xx_keypad_probe(struct platform_device *pdev)
if (!keypad)
return -ENOMEM;
- keypad->pdata = pdev->dev.platform_data;
+ keypad->pdata = dev_get_platdata(&pdev->dev);
if (!keypad->pdata) {
err = -EINVAL;
goto failed_free;
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
index 03c8cc5..68596ab 100644
--- a/drivers/input/keyboard/imx_keypad.c
+++ b/drivers/input/keyboard/imx_keypad.c
@@ -425,7 +425,8 @@ MODULE_DEVICE_TABLE(of, imx_keypad_of_match);
static int imx_keypad_probe(struct platform_device *pdev)
{
- const struct matrix_keymap_data *keymap_data = pdev->dev.platform_data;
+ const struct matrix_keymap_data *keymap_data =
+ dev_get_platdata(&pdev->dev);
struct imx_keypad *keypad;
struct input_dev *input_dev;
struct resource *res;
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c
index 0de23f4..0b42118 100644
--- a/drivers/input/keyboard/lm8323.c
+++ b/drivers/input/keyboard/lm8323.c
@@ -627,7 +627,7 @@ static DEVICE_ATTR(disable_kp, 0644, lm8323_show_disable, lm8323_set_disable);
static int lm8323_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- struct lm8323_platform_data *pdata = client->dev.platform_data;
+ struct lm8323_platform_data *pdata = dev_get_platdata(&client->dev);
struct input_dev *idev;
struct lm8323_chip *lm;
int pwm;
diff --git a/drivers/input/keyboard/lm8333.c b/drivers/input/keyboard/lm8333.c
index 5a8ca35..9081cbe 100644
--- a/drivers/input/keyboard/lm8333.c
+++ b/drivers/input/keyboard/lm8333.c
@@ -131,7 +131,8 @@ static irqreturn_t lm8333_irq_thread(int irq, void *data)
static int lm8333_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- const struct lm8333_platform_data *pdata = client->dev.platform_data;
+ const struct lm8333_platform_data *pdata =
+ dev_get_platdata(&client->dev);
struct lm8333 *lm8333;
struct input_dev *input;
int err, active_time;
diff --git a/drivers/input/keyboard/max7359_keypad.c b/drivers/input/keyboard/max7359_keypad.c
index 7c7af2b..20fa5ca 100644
--- a/drivers/input/keyboard/max7359_keypad.c
+++ b/drivers/input/keyboard/max7359_keypad.c
@@ -182,7 +182,8 @@ static void max7359_initialize(struct i2c_client *client)
static int max7359_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- const struct matrix_keymap_data *keymap_data = client->dev.platform_data;
+ const struct matrix_keymap_data *keymap_data =
+ dev_get_platdata(&client->dev);
struct max7359_keypad *keypad;
struct input_dev *input_dev;
int ret;
diff --git a/drivers/input/keyboard/mcs_touchkey.c b/drivers/input/keyboard/mcs_touchkey.c
index 7c236f9..5ec77523 100644
--- a/drivers/input/keyboard/mcs_touchkey.c
+++ b/drivers/input/keyboard/mcs_touchkey.c
@@ -108,7 +108,7 @@ static int mcs_touchkey_probe(struct i2c_client *client,
int error;
int i;
- pdata = client->dev.platform_data;
+ pdata = dev_get_platdata(&client->dev);
if (!pdata) {
dev_err(&client->dev, "no platform data defined\n");
return -EINVAL;
diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c
index f7f3e9a..98b8467 100644
--- a/drivers/input/keyboard/mpr121_touchkey.c
+++ b/drivers/input/keyboard/mpr121_touchkey.c
@@ -188,7 +188,8 @@ err_i2c_write:
static int mpr_touchkey_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- const struct mpr121_platform_data *pdata = client->dev.platform_data;
+ const struct mpr121_platform_data *pdata =
+ dev_get_platdata(&client->dev);
struct mpr121_touchkey *mpr121;
struct input_dev *input_dev;
int error;
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c
index c7d505c..63332e2 100644
--- a/drivers/input/keyboard/nomadik-ske-keypad.c
+++ b/drivers/input/keyboard/nomadik-ske-keypad.c
@@ -222,7 +222,8 @@ static irqreturn_t ske_keypad_irq(int irq, void *dev_id)
static int __init ske_keypad_probe(struct platform_device *pdev)
{
- const struct ske_keypad_platform_data *plat = pdev->dev.platform_data;
+ const struct ske_keypad_platform_data *plat =
+ dev_get_platdata(&pdev->dev);
struct ske_keypad *keypad;
struct input_dev *input;
struct resource *res;
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index d0d5226..e80bb97 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -248,7 +248,7 @@ static int omap_kp_probe(struct platform_device *pdev)
{
struct omap_kp *omap_kp;
struct input_dev *input_dev;
- struct omap_kp_platform_data *pdata = pdev->dev.platform_data;
+ struct omap_kp_platform_data *pdata = dev_get_platdata(&pdev->dev);
int i, col_idx, row_idx, ret;
unsigned int row_shift, keycodemax;
diff --git a/drivers/input/keyboard/pxa930_rotary.c b/drivers/input/keyboard/pxa930_rotary.c
index 248cdcf..367b03a 100644
--- a/drivers/input/keyboard/pxa930_rotary.c
+++ b/drivers/input/keyboard/pxa930_rotary.c
@@ -84,7 +84,8 @@ static void pxa930_rotary_close(struct input_dev *dev)
static int pxa930_rotary_probe(struct platform_device *pdev)
{
- struct pxa930_rotary_platform_data *pdata = pdev->dev.platform_data;
+ struct pxa930_rotary_platform_data *pdata =
+ dev_get_platdata(&pdev->dev);
struct pxa930_rotary *r;
struct input_dev *input_dev;
struct resource *res;
diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
index ac43a48..9ac8a1e 100644
--- a/drivers/input/keyboard/samsung-keypad.c
+++ b/drivers/input/keyboard/samsung-keypad.c
@@ -321,7 +321,7 @@ static int samsung_keypad_probe(struct platform_device *pdev)
if (pdev->dev.of_node)
pdata = samsung_keypad_parse_dt(&pdev->dev);
else
- pdata = pdev->dev.platform_data;
+ pdata = dev_get_platdata(&pdev->dev);
if (!pdata) {
dev_err(&pdev->dev, "no platform data defined\n");
return -EINVAL;
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c
index fe0e498..d65a98b 100644
--- a/drivers/input/keyboard/sh_keysc.c
+++ b/drivers/input/keyboard/sh_keysc.c
@@ -171,7 +171,7 @@ static int sh_keysc_probe(struct platform_device *pdev)
int i;
int irq, error;
- if (!pdev->dev.platform_data) {
+ if (!dev_get_platdata(&pdev->dev)) {
dev_err(&pdev->dev, "no platform data defined\n");
error = -EINVAL;
goto err0;
@@ -198,7 +198,7 @@ static int sh_keysc_probe(struct platform_device *pdev)
}
platform_set_drvdata(pdev, priv);
- memcpy(&priv->pdata, pdev->dev.platform_data, sizeof(priv->pdata));
+ memcpy(&priv->pdata, dev_get_platdata(&pdev->dev), sizeof(priv->pdata));
pdata = &priv->pdata;
priv->iomem_base = ioremap_nocache(res->start, resource_size(res));
diff --git a/drivers/input/keyboard/tca6416-keypad.c b/drivers/input/keyboard/tca6416-keypad.c
index bfc832c..dc983ab 100644
--- a/drivers/input/keyboard/tca6416-keypad.c
+++ b/drivers/input/keyboard/tca6416-keypad.c
@@ -213,7 +213,7 @@ static int tca6416_keypad_probe(struct i2c_client *client,
return -ENODEV;
}
- pdata = client->dev.platform_data;
+ pdata = dev_get_platdata(&client->dev);
if (!pdata) {
dev_dbg(&client->dev, "no platform data\n");
return -EINVAL;
diff --git a/drivers/input/keyboard/tnetv107x-keypad.c b/drivers/input/keyboard/tnetv107x-keypad.c
index 5f7b427..9a3887a 100644
--- a/drivers/input/keyboard/tnetv107x-keypad.c
+++ b/drivers/input/keyboard/tnetv107x-keypad.c
@@ -162,7 +162,7 @@ static int keypad_probe(struct platform_device *pdev)
int error = 0, sz, row_shift;
u32 rev = 0;
- pdata = pdev->dev.platform_data;
+ pdata = dev_get_platdata(&pdev->dev);
if (!pdata) {
dev_err(dev, "cannot find device data\n");
return -EINVAL;
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c
index d2d178c..8bc2879 100644
--- a/drivers/input/keyboard/twl4030_keypad.c
+++ b/drivers/input/keyboard/twl4030_keypad.c
@@ -330,7 +330,7 @@ static int twl4030_kp_program(struct twl4030_keypad *kp)
*/
static int twl4030_kp_probe(struct platform_device *pdev)
{
- struct twl4030_keypad_data *pdata = pdev->dev.platform_data;
+ struct twl4030_keypad_data *pdata = dev_get_platdata(&pdev->dev);
const struct matrix_keymap_data *keymap_data;
struct twl4030_keypad *kp;
struct input_dev *input;
diff --git a/drivers/input/keyboard/w90p910_keypad.c b/drivers/input/keyboard/w90p910_keypad.c
index 7b03916..e03614f 100644
--- a/drivers/input/keyboard/w90p910_keypad.c
+++ b/drivers/input/keyboard/w90p910_keypad.c
@@ -121,7 +121,7 @@ static void w90p910_keypad_close(struct input_dev *dev)
static int w90p910_keypad_probe(struct platform_device *pdev)
{
const struct w90p910_keypad_platform_data *pdata =
- pdev->dev.platform_data;
+ dev_get_platdata(&pdev->dev);
const struct matrix_keymap_data *keymap_data;
struct w90p910_keypad *keypad;
struct input_dev *input_dev;
--
1.7.10.4
^ permalink raw reply related
* [PATCH 23/35] Input: misc: use dev_get_platdata()
From: Jingoo Han @ 2013-07-30 8:14 UTC (permalink / raw)
To: 'Dmitry Torokhov'
Cc: 'Dmitry Torokhov', linux-input, 'Jingoo Han'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/input/misc/ad714x.c | 4 ++--
drivers/input/misc/adxl34x.c | 2 +-
drivers/input/misc/bfin_rotary.c | 2 +-
drivers/input/misc/bma150.c | 3 ++-
drivers/input/misc/cma3000_d0x.c | 2 +-
drivers/input/misc/gp2ap002a00f.c | 2 +-
drivers/input/misc/gpio_tilt_polled.c | 3 ++-
drivers/input/misc/kxtj9.c | 3 ++-
drivers/input/misc/pwm-beeper.c | 2 +-
drivers/input/misc/twl4030-vibra.c | 2 +-
drivers/input/misc/twl6040-vibra.c | 2 +-
11 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c
index 2e5d5e1..6deecdd 100644
--- a/drivers/input/misc/ad714x.c
+++ b/drivers/input/misc/ad714x.c
@@ -969,7 +969,7 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
int error;
struct input_dev *input[MAX_DEVICE_NUM];
- struct ad714x_platform_data *plat_data = dev->platform_data;
+ struct ad714x_platform_data *plat_data = dev_get_platdata(dev);
struct ad714x_chip *ad714x;
void *drv_mem;
unsigned long irqflags;
@@ -986,7 +986,7 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
goto err_out;
}
- if (dev->platform_data == NULL) {
+ if (dev_get_platdata(dev) == NULL) {
dev_err(dev, "platform data for ad714x doesn't exist\n");
error = -EINVAL;
goto err_out;
diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c
index 0735de3..d204997 100644
--- a/drivers/input/misc/adxl34x.c
+++ b/drivers/input/misc/adxl34x.c
@@ -714,7 +714,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,
ac->fifo_delay = fifo_delay_default;
- pdata = dev->platform_data;
+ pdata = dev_get_platdata(dev);
if (!pdata) {
dev_dbg(dev,
"No platform data: Using default initialization\n");
diff --git a/drivers/input/misc/bfin_rotary.c b/drivers/input/misc/bfin_rotary.c
index cd139cb..7703447 100644
--- a/drivers/input/misc/bfin_rotary.c
+++ b/drivers/input/misc/bfin_rotary.c
@@ -92,7 +92,7 @@ static irqreturn_t bfin_rotary_isr(int irq, void *dev_id)
static int bfin_rotary_probe(struct platform_device *pdev)
{
- struct bfin_rotary_platform_data *pdata = pdev->dev.platform_data;
+ struct bfin_rotary_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct bfin_rot *rotary;
struct input_dev *input;
int error;
diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c
index 865c2f9..52d3a9b 100644
--- a/drivers/input/misc/bma150.c
+++ b/drivers/input/misc/bma150.c
@@ -526,7 +526,8 @@ static int bma150_register_polled_device(struct bma150_data *bma150)
static int bma150_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- const struct bma150_platform_data *pdata = client->dev.platform_data;
+ const struct bma150_platform_data *pdata =
+ dev_get_platdata(&client->dev);
const struct bma150_cfg *cfg;
struct bma150_data *bma150;
int chip_id;
diff --git a/drivers/input/misc/cma3000_d0x.c b/drivers/input/misc/cma3000_d0x.c
index df9b756..c7d0074 100644
--- a/drivers/input/misc/cma3000_d0x.c
+++ b/drivers/input/misc/cma3000_d0x.c
@@ -284,7 +284,7 @@ EXPORT_SYMBOL(cma3000_resume);
struct cma3000_accl_data *cma3000_init(struct device *dev, int irq,
const struct cma3000_bus_ops *bops)
{
- const struct cma3000_platform_data *pdata = dev->platform_data;
+ const struct cma3000_platform_data *pdata = dev_get_platdata(dev);
struct cma3000_accl_data *data;
struct input_dev *input_dev;
int rev;
diff --git a/drivers/input/misc/gp2ap002a00f.c b/drivers/input/misc/gp2ap002a00f.c
index fe30bd0..de21e31 100644
--- a/drivers/input/misc/gp2ap002a00f.c
+++ b/drivers/input/misc/gp2ap002a00f.c
@@ -125,7 +125,7 @@ static int gp2a_initialize(struct gp2a_data *dt)
static int gp2a_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- const struct gp2a_platform_data *pdata = client->dev.platform_data;
+ const struct gp2a_platform_data *pdata = dev_get_platdata(&client->dev);
struct gp2a_data *dt;
int error;
diff --git a/drivers/input/misc/gpio_tilt_polled.c b/drivers/input/misc/gpio_tilt_polled.c
index 714c683..38b3c11 100644
--- a/drivers/input/misc/gpio_tilt_polled.c
+++ b/drivers/input/misc/gpio_tilt_polled.c
@@ -98,7 +98,8 @@ static void gpio_tilt_polled_close(struct input_polled_dev *dev)
static int gpio_tilt_polled_probe(struct platform_device *pdev)
{
- const struct gpio_tilt_platform_data *pdata = pdev->dev.platform_data;
+ const struct gpio_tilt_platform_data *pdata =
+ dev_get_platdata(&pdev->dev);
struct device *dev = &pdev->dev;
struct gpio_tilt_polled_dev *tdev;
struct input_polled_dev *poll_dev;
diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c
index a993b67..d708478 100644
--- a/drivers/input/misc/kxtj9.c
+++ b/drivers/input/misc/kxtj9.c
@@ -509,7 +509,8 @@ out:
static int kxtj9_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- const struct kxtj9_platform_data *pdata = client->dev.platform_data;
+ const struct kxtj9_platform_data *pdata =
+ dev_get_platdata(&client->dev);
struct kxtj9_data *tj9;
int err;
diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c
index a37f0c9..7d5666d 100644
--- a/drivers/input/misc/pwm-beeper.c
+++ b/drivers/input/misc/pwm-beeper.c
@@ -67,7 +67,7 @@ static int pwm_beeper_event(struct input_dev *input,
static int pwm_beeper_probe(struct platform_device *pdev)
{
- unsigned long pwm_id = (unsigned long)pdev->dev.platform_data;
+ unsigned long pwm_id = (unsigned long)dev_get_platdata(&pdev->dev);
struct pwm_beeper *beeper;
int error;
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
index 68a5f33..d993775 100644
--- a/drivers/input/misc/twl4030-vibra.c
+++ b/drivers/input/misc/twl4030-vibra.c
@@ -193,7 +193,7 @@ static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
static int twl4030_vibra_probe(struct platform_device *pdev)
{
- struct twl4030_vibra_data *pdata = pdev->dev.platform_data;
+ struct twl4030_vibra_data *pdata = dev_get_platdata(&pdev->dev);
struct device_node *twl4030_core_node = pdev->dev.parent->of_node;
struct vibra_info *info;
int ret;
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
index 0c2dfc8..c2f9bf5 100644
--- a/drivers/input/misc/twl6040-vibra.c
+++ b/drivers/input/misc/twl6040-vibra.c
@@ -257,7 +257,7 @@ static SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, twl6040_vibra_suspend, NULL);
static int twl6040_vibra_probe(struct platform_device *pdev)
{
- struct twl6040_vibra_data *pdata = pdev->dev.platform_data;
+ struct twl6040_vibra_data *pdata = dev_get_platdata(&pdev->dev);
struct device *twl6040_core_dev = pdev->dev.parent;
struct device_node *twl6040_core_node = NULL;
struct vibra_info *info;
--
1.7.10.4
^ permalink raw reply related
* [PATCH 24/35] Input: mouse: use dev_get_platdata()
From: Jingoo Han @ 2013-07-30 8:15 UTC (permalink / raw)
To: 'Dmitry Torokhov'
Cc: 'Dmitry Torokhov', linux-input, 'Jingoo Han'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/input/mouse/gpio_mouse.c | 2 +-
drivers/input/mouse/pxa930_trkball.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c
index 6b44413..6810a46 100644
--- a/drivers/input/mouse/gpio_mouse.c
+++ b/drivers/input/mouse/gpio_mouse.c
@@ -48,7 +48,7 @@ static void gpio_mouse_scan(struct input_polled_dev *dev)
static int gpio_mouse_probe(struct platform_device *pdev)
{
- struct gpio_mouse_platform_data *pdata = pdev->dev.platform_data;
+ struct gpio_mouse_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct input_polled_dev *input_poll;
struct input_dev *input;
int pin, i;
diff --git a/drivers/input/mouse/pxa930_trkball.c b/drivers/input/mouse/pxa930_trkball.c
index 0ecb9e7..d20d2ae 100644
--- a/drivers/input/mouse/pxa930_trkball.c
+++ b/drivers/input/mouse/pxa930_trkball.c
@@ -166,7 +166,7 @@ static int pxa930_trkball_probe(struct platform_device *pdev)
if (!trkball)
return -ENOMEM;
- trkball->pdata = pdev->dev.platform_data;
+ trkball->pdata = dev_get_platdata(&pdev->dev);
if (!trkball->pdata) {
dev_err(&pdev->dev, "no platform data defined\n");
error = -EINVAL;
--
1.7.10.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox