All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-sunxi <linux-sunxi@googlegroups.com>
Subject: Re: [PATCH 2/4] devicetree: bindings: Add header file with evdev type and abs/rel code defines
Date: Thu, 10 Sep 2015 17:48:26 -0500	[thread overview]
Message-ID: <55F208BA.5030507@kernel.org> (raw)
In-Reply-To: <55F1D0E2.6010805@redhat.com>

+Ian

On 09/10/2015 01:50 PM, Hans de Goede wrote:
> Hi,
> 
> On 10-09-15 20:42, Dmitry Torokhov wrote:
>> On Thu, Sep 10, 2015 at 11:40 AM, Hans de Goede <hdegoede@redhat.com>
>> wrote:
>>> Hi,
>>>
>>>
>>> On 10-09-15 20:34, Dmitry Torokhov wrote:
>>>>
>>>> On Thu, Sep 10, 2015 at 10:25 AM, Rob Herring <robh@kernel.org> wrote:
>>>>>
>>>>> On 09/09/2015 04:11 AM, Hans de Goede wrote:
>>>>>>
>>>>>> This header provides evdev constants for linux,code, and
>>>>>> linux,input-*
>>>>>> properties.
>>>>>>
>>>>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>>>>> ---
>>>>>>    include/dt-bindings/input/evdev.h | 76
>>>>>> +++++++++++++++++++++++++++++++++++++++
>>>>>
>>>>>
>>>>> This looks fine, but please just add to input/input.h.

[...]

>>>> Actually I'd rather we removed include/dt-bindings/input/input.h and
>>>> instead used the header file from uapi. As it is now we already
>>>> duplicating definitions and the copy in dt-bindings is missing several
>>>> key codes. Until we split DT bindings form the kernel code I'd rather
>>>> have definitions in one place.

We do already have split binding tree. It is generated from the kernel
tree ATM. Adding Ian for any comments.

>>> AFAIK we cannot do that as the uapi header also contains things like:
>>>
>>> struct input_event {
>>>          struct timeval time;
>>>          __u16 type;
>>>          __u16 code;
>>>          __s32 value;
>>> };
>>>
>>> Which is not valid device tree syntax.
>>>
>>> If you want this we need to split the uapi headers in one with only
>>> defines and one with all the rest.
>>
>> That would be fine by me. event-codes.h?
> 
> Since this will live in the generic include/linux namespace (for userspace)
> maybe input-event-codes ?
> 
> Rob are you ok with including uapi headers from dts files if those uapi
> headers are guaranteed to have only #define-s in them?

No. If you can do it as a symlink or some limited way, I'd be fine with
that. I don't want to see wholesale addition of uapi headers though.

Rob


WARNING: multiple messages have this Message-ID (diff)
From: robh@kernel.org (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] devicetree: bindings: Add header file with evdev type and abs/rel code defines
Date: Thu, 10 Sep 2015 17:48:26 -0500	[thread overview]
Message-ID: <55F208BA.5030507@kernel.org> (raw)
In-Reply-To: <55F1D0E2.6010805@redhat.com>

+Ian

On 09/10/2015 01:50 PM, Hans de Goede wrote:
> Hi,
> 
> On 10-09-15 20:42, Dmitry Torokhov wrote:
>> On Thu, Sep 10, 2015 at 11:40 AM, Hans de Goede <hdegoede@redhat.com>
>> wrote:
>>> Hi,
>>>
>>>
>>> On 10-09-15 20:34, Dmitry Torokhov wrote:
>>>>
>>>> On Thu, Sep 10, 2015 at 10:25 AM, Rob Herring <robh@kernel.org> wrote:
>>>>>
>>>>> On 09/09/2015 04:11 AM, Hans de Goede wrote:
>>>>>>
>>>>>> This header provides evdev constants for linux,code, and
>>>>>> linux,input-*
>>>>>> properties.
>>>>>>
>>>>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>>>>> ---
>>>>>>    include/dt-bindings/input/evdev.h | 76
>>>>>> +++++++++++++++++++++++++++++++++++++++
>>>>>
>>>>>
>>>>> This looks fine, but please just add to input/input.h.

[...]

>>>> Actually I'd rather we removed include/dt-bindings/input/input.h and
>>>> instead used the header file from uapi. As it is now we already
>>>> duplicating definitions and the copy in dt-bindings is missing several
>>>> key codes. Until we split DT bindings form the kernel code I'd rather
>>>> have definitions in one place.

We do already have split binding tree. It is generated from the kernel
tree ATM. Adding Ian for any comments.

>>> AFAIK we cannot do that as the uapi header also contains things like:
>>>
>>> struct input_event {
>>>          struct timeval time;
>>>          __u16 type;
>>>          __u16 code;
>>>          __s32 value;
>>> };
>>>
>>> Which is not valid device tree syntax.
>>>
>>> If you want this we need to split the uapi headers in one with only
>>> defines and one with all the rest.
>>
>> That would be fine by me. event-codes.h?
> 
> Since this will live in the generic include/linux namespace (for userspace)
> maybe input-event-codes ?
> 
> Rob are you ok with including uapi headers from dts files if those uapi
> headers are guaranteed to have only #define-s in them?

No. If you can do it as a symlink or some limited way, I'd be fine with
that. I don't want to see wholesale addition of uapi headers though.

Rob

  reply	other threads:[~2015-09-10 22:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09  9:11 [PATCH 1/4] devicetree: bindings: Update gpio-keys-polled with support for abs/rel axis Hans de Goede
2015-09-09  9:11 ` Hans de Goede
2015-09-09  9:11 ` [PATCH 2/4] devicetree: bindings: Add header file with evdev type and abs/rel code defines Hans de Goede
2015-09-09  9:11   ` Hans de Goede
     [not found]   ` <1441789886-5868-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-10 17:25     ` Rob Herring
2015-09-10 17:25       ` Rob Herring
2015-09-10 18:34       ` Dmitry Torokhov
2015-09-10 18:34         ` Dmitry Torokhov
     [not found]         ` <CAKdAkRRFcn5+SXNfU4J+v4tcFyA1mZR1hMhT2y3QJeQJ1tTDYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-10 18:40           ` Hans de Goede
2015-09-10 18:40             ` Hans de Goede
     [not found]             ` <55F1CE8B.5050302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-10 18:42               ` Dmitry Torokhov
2015-09-10 18:42                 ` Dmitry Torokhov
2015-09-10 18:50                 ` Hans de Goede
2015-09-10 18:50                   ` Hans de Goede
2015-09-10 22:48                   ` Rob Herring [this message]
2015-09-10 22:48                     ` Rob Herring
     [not found]                     ` <55F208BA.5030507-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-09-12 18:04                       ` Dmitry Torokhov
2015-09-12 18:04                         ` Dmitry Torokhov
     [not found] ` <1441789886-5868-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-09  9:11   ` [PATCH 3/4] input: gpio_keys_polled: input_sync once after polling all the buttons Hans de Goede
2015-09-09  9:11     ` Hans de Goede
2015-09-10 17:45   ` [PATCH 1/4] devicetree: bindings: Update gpio-keys-polled with support for abs/rel axis Rob Herring
2015-09-10 17:45     ` Rob Herring
2015-09-09  9:11 ` [PATCH 4/4] ARM: dts: sun4i: inet9f-rev03: Add support for game buttons / joysticks Hans de Goede
2015-09-09  9:11   ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F208BA.5030507@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.