From: Jiri Slaby <jirislaby@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Subject: Re: [PATCH 2/2] Input: add wm97xx accelerated driver for AVR32 AT32AP700X microprocessors
Date: Mon, 02 Mar 2009 15:34:43 +0100 [thread overview]
Message-ID: <49ABEE83.904@gmail.com> (raw)
In-Reply-To: <1236000228-13025-2-git-send-email-broonie@opensource.wolfsonmicro.com>
> --- /dev/null
> +++ b/drivers/input/touchscreen/at32-wm97xx.c
> +static void at32_wm97xx_pen_timer(unsigned long data)
Wouldn't be delayed_work more appropriate (and convenient) here?
> +{
> + struct at32_wm97xx *at32_wm97xx = (struct at32_wm97xx *)data;
> + struct wm97xx *wm = at32_wm97xx->wm;
> + int pen_down = gpio_get_value(at32_wm97xx->gpio_pen);
> +
> + if (pen_down != 0) {
> + mod_timer(&at32_wm97xx->pen_timer, jiffies
> + + msecs_to_jiffies(1));
> + } else {
> + input_report_abs(wm->input_dev, ABS_PRESSURE, 0);
> + input_sync(wm->input_dev);
> + }
> +}
> +static int __init at32_wm97xx_probe(struct platform_device *pdev)
> +{
[...]
> + at32_wm97xx->regs = (void *)AT32_WM97XX_AC97C_IOMEM;
(void __iomem *)?
Did you feed it through sparse?
> + ret = request_irq(at32_wm97xx->ac97c_irq,
> + at32_wm97xx_channel_b_interrupt,
> + IRQF_SHARED, "at32-wm97xx-ch-b", at32_wm97xx);
[...]
> + return wm97xx_register_mach_ops(wm,&at32_mach_ops);
In case it fails, irq remains set up.
> +#ifdef CONFIG_PM
> +static int at32_wm97xx_suspend(struct platform_device *pdev, pm_message_t msg)
> +{
> + struct at32_wm97xx *at32_wm97xx = platform_get_drvdata(pdev);
> +
> + ac97c_writel(at32_wm97xx, IDR, AC97C_INT_CBEVT);
> + disable_irq(at32_wm97xx->gpio_irq);
Here, you should call disable_irq_sync() (that's what I meant by _sync
in the last post).
next prev parent reply other threads:[~2009-03-02 14:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 13:23 [PATCH 1/2] Input: Accelerated touchscreen support for Marvell Zylonite Mark Brown
2009-03-02 13:23 ` [PATCH 2/2] Input: add wm97xx accelerated driver for AVR32 AT32AP700X microprocessors Mark Brown
2009-03-02 14:34 ` Jiri Slaby [this message]
2009-03-02 22:33 ` Jiri Slaby
2009-03-02 23:02 ` Mark Brown
2009-03-03 9:13 ` Dmitry Torokhov
2009-03-03 10:35 ` Mark Brown
2009-03-02 13:44 ` [PATCH 1/2] Input: Accelerated touchscreen support for Marvell Zylonite Jiri Slaby
2009-03-02 14:00 ` Mark Brown
2009-03-02 14:15 ` Jiri Slaby
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=49ABEE83.904@gmail.com \
--to=jirislaby@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hcegtvedt@atmel.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).