From: Hans-Christian Egtvedt <hcegtvedt@norway.atmel.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@atrey.karlin.mff.cuni.cz
Subject: Re: [PATCH 1/1] gpio_mouse driver
Date: Wed, 30 May 2007 08:23:18 +0200 [thread overview]
Message-ID: <1180506198.32245.59.camel@localhost.localdomain> (raw)
In-Reply-To: <d120d5000705290836o49bc207bqb3d9dfebc34ac752@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]
On Tue, 2007-05-29 at 11:36 -0400, Dmitry Torokhov wrote:
> Hi,
>
> On 5/29/07, Hans-Christian Egtvedt <hcegtvedt@norway.atmel.com> wrote:
> > This patch adds support for simulating a mouse using GPIO lines.
> >
> > The driver needs a platform_data struct to be defined and registered with the
> > appropriate platform_device.
> >
> > The driver has been tested on AT32AP7000 microprocessor using the ATSTK1000
> > development board.
> >
>
> It looks sane although I would recommend switching to input-polldev
> when implementing a polled input device.
Oh, I was not aware about this, it seems like just the thing I need.
Could it be scheduled for after the official kernel has this included?
AFAICT it will be released with 2.6.22?
I have attached a new patch with some minor modifications.
> > +
> > + input->name = pdev->name;
> > + input->cdev.dev = &pdev->dev;
>
> Please use input->dev.parent = &pdev->dev. Input devices are being
> moved from class_device to struct device.
This is not present in 2.6.21.1, could I schedule it for the next update
of the driver as above?
> > + input->private = pdata;
> > +
> > + /*
> > + * Revisit: is bustype, vendor, product and version needed to
> > + * input->id? And if they should be present, what values should they
> > + * have?
> > + */
>
> BUS_HOST seems to be most suitable here. The rest may stay 0.
Thanks, applied.
> > +
> > + /* private */
> > + struct timer_list timer;
> > +};
>
> I don't think it is a good idea to have timer structure in platform
> data which should really be constant. Timer shoudl be part of the
> stucture created when driver binds to a device. I can see you may not
> want to introduce extra complexity in the driver; however if you use
> input-polldev it will handle timer for you.
I was a bit unsure about this before submitting. I have moved the
timer_list into a struct in the driver and added the usual
kmalloc/kfree.
--
Best regards
Hans-Christian Egtvedt
[-- Attachment #2: 0001-gpio_mouse-driver.txt --]
[-- Type: application/mbox, Size: 11812 bytes --]
next prev parent reply other threads:[~2007-05-30 6:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-29 13:07 [PATCH 1/1] gpio_mouse driver Hans-Christian Egtvedt
2007-05-29 15:36 ` Dmitry Torokhov
2007-05-30 6:23 ` Hans-Christian Egtvedt [this message]
2007-05-30 8:00 ` Hans-Christian Egtvedt
2007-05-30 12:30 ` Dmitry Torokhov
2007-05-30 12:38 ` Hans-Christian Egtvedt
2007-05-30 12:52 ` Dmitry Torokhov
-- strict thread matches above, loose matches on Subject: below --
2007-05-29 12:29 Hans-Christian Egtvedt
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=1180506198.32245.59.camel@localhost.localdomain \
--to=hcegtvedt@norway.atmel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
/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).