linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Daniel Drake <dsd@laptop.org>
Cc: linux-input@vger.kernel.org, pgf@laptop.org,
	devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH v3] Add OLPC AP-SP input driver
Date: Fri, 28 Jun 2013 11:20:00 -0700	[thread overview]
Message-ID: <20130628182000.GA21589@core.coreip.homeip.net> (raw)
In-Reply-To: <20130628171958.CC031FAAD5@dev.laptop.org>

Hi Daniel,

On Fri, Jun 28, 2013 at 01:19:58PM -0400, Daniel Drake wrote:
> +static int olpc_apsp_open(struct serio *port)
> +{
> +	struct olpc_apsp *priv = port->port_data;
> +	unsigned int tmp;
> +
> +	if (priv->open_count++ == 0) {
> +		/* Enable interrupt 0 by clearing its bit */
> +		tmp = readl(priv->base + PJ_INTERRUPT_MASK);
> +		writel(tmp & ~INT_0, priv->base + PJ_INTERRUPT_MASK);
> +	}
> +
> +	return 0;
> +}
> +
> +static void olpc_apsp_close(struct serio *port)
> +{
> +	struct olpc_apsp *priv = port->port_data;
> +	unsigned int tmp;
> +
> +	if (--priv->open_count == 0) {

Both need locking. It looks like you need the song and dance similar to
what i8042 has to do with it's multiplexed ports. Or ps2mult.c...

-- 
Dmitry

  reply	other threads:[~2013-06-28 18:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 17:19 [PATCH v3] Add OLPC AP-SP input driver Daniel Drake
2013-06-28 18:20 ` Dmitry Torokhov [this message]
2013-06-28 19:15   ` Daniel Drake
2013-06-28 20:32     ` 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=20130628182000.GA21589@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dsd@laptop.org \
    --cc=linux-input@vger.kernel.org \
    --cc=pgf@laptop.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).