Re: [PATCH 1/1] input,serio: support for GRLIB APBPS2 PS/2 Keyboard/Mouse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 21, 2013 at 10:49:41AM +0100, Daniel Hellstrom wrote:
> On 02/20/2013 07:43 PM, Dmitry Torokhov wrote:
> >Hi Daniel,
> >
> >On Wed, Feb 20, 2013 at 03:41:33PM +0100, Daniel Hellstrom wrote:
> >>+static void apbps2_close(struct serio *io)
> >>+{
> >>+	struct apbps2_priv *priv = io->port_data;
> >>+
> >>+	/* stop interrupts at PS/2 HW level */
> >>+	APBPS2_WRITE(&priv->regs->ctrl, 0);
> >>+
> >>+	/* unregister PS/2 interrupt handler */
> >>+	devm_free_irq(&io->dev, priv->irq, priv);
> >What is the benefit (except for wasting memory) of using
> >devm_request_irq()/devm_free_irq() in this fashion?
> None.
> 
> >
> >By the way, I would prefer if request IRQ was done in probe and freeing
> >in remove. I know that many existing serio drivers do it in open/close,
> >but this is not correct. We shoudl make sure all resources are available
> >beforehand.

> This has been done to avoid spending time in the APBPS2 ISR when the
> PS/2 interface is not used, and the interrupt is shared with another
> hardware.

Thankfully your device seems to be able shut off interrupts at the
controller level, so this should not be an issue.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux