From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Benjamin Tissoires <btissoir@redhat.com>,
Peter Hutterer <peter.hutterer@redhat.com>,
linux-input@vger.kernel.org
Subject: Re: [PATCH 2/4] serio: Add pnp_id to struct serio
Date: Sun, 13 Apr 2014 01:22:46 -0700 [thread overview]
Message-ID: <20140413082246.GC7267@core.coreip.homeip.net> (raw)
In-Reply-To: <53465049.1070305@redhat.com>
On Thu, Apr 10, 2014 at 10:03:21AM +0200, Hans de Goede wrote:
> Hi,
>
> On 04/09/2014 08:06 PM, Dmitry Torokhov wrote:
> > Hi Hans,
> >
> > On Wed, Apr 09, 2014 at 04:02:59PM +0200, Hans de Goede wrote:
> >> Serio device drivers need access to the pnp_id of the serio port, windows
> >> drivers bind by the pnp-id and some drivers need to know the exact pnp-id
> >> used so they know exactly with which hardware model / revision they are
> >> dealing with.
> >>
> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >> ---
> >> include/linux/serio.h | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/include/linux/serio.h b/include/linux/serio.h
> >> index 9f779c7..6532440 100644
> >> --- a/include/linux/serio.h
> >> +++ b/include/linux/serio.h
> >> @@ -16,6 +16,7 @@
> >> #include <linux/mutex.h>
> >> #include <linux/device.h>
> >> #include <linux/mod_devicetable.h>
> >> +#include <linux/pnp.h>
> >> #include <uapi/linux/serio.h>
> >>
> >> struct serio {
> >> @@ -28,6 +29,7 @@ struct serio {
> >> bool manual_bind;
> >>
> >> struct serio_device_id id;
> >> + struct pnp_id *pnp_id;
> >
> > Why do we need this if we are already adding generic 'firmware_id'
> > attribute?
>
> In patch 4/4 we do pnp-id matching in synaptics.c to set the new
> INPUT_PROP_TOPBUTTONPAD property on relevant touchpads. Since the kernel
> has a special pnp_id type + pnp_id matching code, the correct thing to
> do is to use that for in kernel pnp-id matching, which means that we
> need to propagate the pnp-id to the serio drivers.
I disagree that it is good enough reason for putting platform-specific
data in a generic structure. If you really want to use generic PNP
matching code you can just convert firmware_id back to pnp_id in
Synaptics driver.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2014-04-13 8:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-09 14:02 [PATCH 1/4] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property Hans de Goede
2014-04-09 14:02 ` [PATCH 2/4] serio: Add pnp_id to struct serio Hans de Goede
2014-04-09 18:06 ` Dmitry Torokhov
2014-04-10 8:03 ` Hans de Goede
2014-04-13 8:22 ` Dmitry Torokhov [this message]
2014-04-09 14:03 ` [PATCH 3/4] input/serio/8042_pnp: set serio->pnp_id for pnp instantiated 8042 ports Hans de Goede
2014-04-09 14:03 ` [PATCH 4/4] synaptices: Report INPUT_PROP_TOPBUTTONPAD property for touchpads with top buttonareas 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=20140413082246.GC7267@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=btissoir@redhat.com \
--cc=hdegoede@redhat.com \
--cc=linux-input@vger.kernel.org \
--cc=peter.hutterer@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).