Thread (31 messages) 31 messages, 5 authors, 2019-02-13

Re: [PATCH v3 10/11] input: max77650: add onkey support

From: Pavel Machek <hidden>
Date: 2019-02-12 13:47:30
Also in: linux-devicetree, linux-gpio, linux-leds, linux-pm, lkml

On Tue 2019-02-12 14:29:49, Bartosz Golaszewski wrote:
wt., 12 lut 2019 o 13:17 Pavel Machek [off-list ref] napisał(a):
quoted
Hi!
quoted
+     error = device_property_read_string(dev,
+                                         "maxim,onkey-mode", &mode_prop);
+     if (error)
+             mode_prop = "push";
+
+     if (strcmp(mode_prop, "push") == 0)
+             mode = MAX77650_ONKEY_MODE_PUSH;
+     else if (strcmp(mode_prop, "slide") == 0)
+             mode = MAX77650_ONKEY_MODE_SLIDE;
+     else
+             return -EINVAL;
...
quoted
+     onkey->input->name = "max77650_onkey";
+     onkey->input->phys = "max77650_onkey/input0";
+     onkey->input->id.bustype = BUS_I2C;
+     input_set_capability(onkey->input, EV_KEY, onkey->code);
Is EV_KEY correct for mode==slide?
Others are not really documented. Does EV_SW stand for switch event?
In that case it would probably be better.
I believe so.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help