From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartosz Golaszewski Subject: Re: [PATCH v3 10/11] input: max77650: add onkey support Date: Tue, 12 Feb 2019 14:29:49 +0100 Message-ID: References: <20190201094736.32057-1-brgl@bgdev.pl> <20190201094736.32057-11-brgl@bgdev.pl> <20190212121745.GE25613@amd> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20190212121745.GE25613@amd> Sender: linux-kernel-owner@vger.kernel.org To: Pavel Machek Cc: Rob Herring , Mark Rutland , Linus Walleij , Dmitry Torokhov , Jacek Anaszewski , Lee Jones , Sebastian Reichel , Liam Girdwood , Greg Kroah-Hartman , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , devicetree , Linux Input , Linux LED Subsystem , Linux PM list , Bartosz Golaszewski List-Id: devicetree@vger.kernel.org wt., 12 lut 2019 o 13:17 Pavel Machek napisa=C5=82(a): > > Hi! > > > + error =3D device_property_read_string(dev, > > + "maxim,onkey-mode", &mode_pro= p); > > + if (error) > > + mode_prop =3D "push"; > > + > > + if (strcmp(mode_prop, "push") =3D=3D 0) > > + mode =3D MAX77650_ONKEY_MODE_PUSH; > > + else if (strcmp(mode_prop, "slide") =3D=3D 0) > > + mode =3D MAX77650_ONKEY_MODE_SLIDE; > > + else > > + return -EINVAL; > ... > > + onkey->input->name =3D "max77650_onkey"; > > + onkey->input->phys =3D "max77650_onkey/input0"; > > + onkey->input->id.bustype =3D BUS_I2C; > > + input_set_capability(onkey->input, EV_KEY, onkey->code); > > Is EV_KEY correct for mode=3D=3Dslide? > Others are not really documented. Does EV_SW stand for switch event? In that case it would probably be better. Bart