lkml.org 
[lkml]   [2019]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 10/11] input: max77650: add onkey support
Hi!

> + 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;
...
> + 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?


--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-02-12 13:18    [W:0.138 / U:0.268 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site