Re: [PATCH v2 1/4] dt-bindings: input: qcom,pm8921-keypad: convert to YAML format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 7 Dec 2022 at 19:07, Rob Herring <robh@xxxxxxxxxx> wrote:
>
> On Tue, Dec 06, 2022 at 05:20:16AM +0200, Dmitry Baryshkov wrote:
> > 6 декабря 2022 г. 00:04:33 GMT+02:00, Rob Herring <robh@xxxxxxxxxx> пишет:
> > >On Sun, Dec 04, 2022 at 08:15:52AM +0200, Dmitry Baryshkov wrote:
> > >> Convert the bindings for the keypad subdevices of Qualcomm PM8921 and
> > >> PM8058 PMICs from text to YAML format.
> > >>
> > >> While doing the conversion also change linux,keypad-no-autorepeat
> > >> property to linux,input-no-autorepeat. The former property was never
> > >> used by DT and was never handled by the driver.
> > >
> > >Changing from the documented one to one some drivers use. I guess
> > >that's a slight improvement. Please see this discussion[1].
> >
> > Well, the problem is that the documentation is misleading. The driver
> > doesn't handle the documented property, so we should change either
> > the driver, or the docs. Which change is the preferred one?
>
> The preference is autorepeat is not the default and setting
> 'autorepeat' enables it. You can't really change that unless you don't
> really need autorepeat by default. I can't see why it would be
> needed for the power button, but I haven't looked what else you have.

It's not a pon/resin. this is a full-fledged keypad. For example for
apq8060-dragonboard:

linux,keymap = <
        MATRIX_KEY(0, 0, KEY_MENU)
        MATRIX_KEY(0, 2, KEY_1)
        MATRIX_KEY(0, 3, KEY_4)
        MATRIX_KEY(0, 4, KEY_7)
        MATRIX_KEY(1, 0, KEY_UP)
        MATRIX_KEY(1, 1, KEY_LEFT)
        MATRIX_KEY(1, 2, KEY_DOWN)
        MATRIX_KEY(1, 3, KEY_5)
        MATRIX_KEY(1, 3, KEY_8)
        MATRIX_KEY(2, 0, KEY_HOME)
        MATRIX_KEY(2, 1, KEY_REPLY)
        MATRIX_KEY(2, 2, KEY_2)
        MATRIX_KEY(2, 3, KEY_6)
        MATRIX_KEY(3, 0, KEY_VOLUMEUP)
        MATRIX_KEY(3, 1, KEY_RIGHT)
        MATRIX_KEY(3, 2, KEY_3)
        MATRIX_KEY(3, 3, KEY_9)
        MATRIX_KEY(3, 4, KEY_SWITCHVIDEOMODE)
        MATRIX_KEY(4, 0, KEY_VOLUMEDOWN)
        MATRIX_KEY(4, 1, KEY_BACK)
        MATRIX_KEY(4, 2, KEY_CAMERA)
        MATRIX_KEY(4, 3, KEY_KBDILLUMTOGGLE)
                                        >;

> Of all the no autorepeat options, I prefer 'linux,no-autorepeat' as I
> find 'input' or 'keypad' redundant. But Dmitry T. didn't think it should
> be a common property at the time.

We have not used any of the options in the in-kernel DTs. However the
driver for the keypad has supported the 'linux,input-no-autorepeat'
since March 2014. I'm just changing the docs to document the correct
option. I can split the patch into two distinct patches (one for the
bugfix, one for conversion), if you think that it would be better.


-- 
With best wishes
Dmitry




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux