linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier.adi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Dmitry Torokhov
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org,
	Michael Hennerich
	<michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] input/joystick: new AD7142 driver
Date: Tue, 14 Jul 2009 18:56:45 -0400	[thread overview]
Message-ID: <8bd0f97a0907141556j59a7143fwfd6211a9d52d826@mail.gmail.com> (raw)
In-Reply-To: <20090714180309.GC14661-wUGeVx6es1+Q2O5dskk9LyLysJ1jNyTM@public.gmane.org>

On Tue, Jul 14, 2009 at 14:03, Dmitry Torokhov wrote:
> On Tue, Jul 14, 2009 at 01:33:46PM -0400, Mike Frysinger wrote:
>> +static int ad7142_probe(struct i2c_client *client,
>> +                                     const struct i2c_device_id *id)
>
> __devinit

fixed

>> +             rc = request_irq(client->irq, ad7142_interrupt,
>> +                             IRQF_TRIGGER_LOW, "ad7142_joystick", data);
>
> Let's use threaded IRQs, they are so nice for devices like this one.

i'll open a tracker item for someone to look at this ... Bryan has left our team

>> +             disable_irq_nosync(client->irq);
>
> Why nosync here?

no idea -- changed to normal version

>> +     /* Allocate and register AD7142 input device */
>> +     data->input = input_allocate_device();
>> +     if (!data->input) {
>> +             dev_err(&client->dev, "Can't allocate input device\n");
>> +             rc = -ENOMEM;
>> +             goto fail_allocate;
>> +     }
>
> Allocate the device before you request IRQ.. Even if you disabled it
> there is still a window where it can be raised without input device
> allocated.

fixed ... sure would be nice to have a IRQF_xxx flag to request an IRQ
in the disabled state

>> +     input->evbit[0] = BIT_MASK(EV_KEY);
>> +     input->keybit[BIT_WORD(BTN_BASE)] = BIT_MASK(BTN_BASE) |
>> +                                             BIT_MASK(BTN_BASE2) |
>> +                                             BIT_MASK(BTN_BASE3) |
>> +                                             BIT_MASK(BTN_BASE4);
>> +     input->keybit[BIT_WORD(KEY_UP)] |=  BIT_MASK(KEY_UP) |
>> +                                             BIT_MASK(KEY_DOWN) |
>> +                                             BIT_MASK(KEY_LEFT) |
>> +                                             BIT_MASK(KEY_RIGHT);
>> +
>
> I am really not sure why you call it a joystick since it does not report
> relative axes... Let's put it in misc and just another button device.

if the hardware doesnt actually support relative events, sure ...
otherwise we'll add support for it

>> +static int __exit ad7142_remove(struct i2c_client *client)
>
> __devexit()

fixed

>> +     .remove = __exit_p(ad7142_remove),
>
> __devexit_p()

fixed

> Any PM support?

guess we'll add it
-mike

_______________________________________________
Uclinux-dist-devel mailing list
Uclinux-dist-devel@blackfin.uclinux.org
https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel

  parent reply	other threads:[~2009-07-14 22:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 17:33 [PATCH 1/2] input/joystick: new AD7142 driver Mike Frysinger
2009-07-14 17:33 ` [PATCH 2/2] input/joystick: new Blackfin rotary input driver Mike Frysinger
2009-07-23  4:43   ` Dmitry Torokhov
2009-07-23  6:46     ` [Uclinux-dist-devel] " Mike Frysinger
2009-07-23  7:25       ` Dmitry Torokhov
2009-07-23  7:46         ` Mike Frysinger
2009-07-23  8:13           ` Dmitry Torokhov
2009-07-14 18:03 ` [PATCH 1/2] input/joystick: new AD7142 driver Dmitry Torokhov
     [not found]   ` <20090714180309.GC14661-wUGeVx6es1+Q2O5dskk9LyLysJ1jNyTM@public.gmane.org>
2009-07-14 22:56     ` Mike Frysinger [this message]
2009-07-15 15:50     ` Mike Frysinger
2009-07-15  3:42   ` [Uclinux-dist-devel] [PATCH 1/2] input/joystick: new AD7142driver Robin Getz
2009-07-15 10:01   ` Song, Barry
2009-07-15 15:29     ` Dmitry Torokhov

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=8bd0f97a0907141556j59a7143fwfd6211a9d52d826@mail.gmail.com \
    --to=vapier.adi-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
    --cc=uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org \
    /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).