linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Hennerich,
	Michael"
	<Michael.Hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
Cc: uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org,
	Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2] Input: ad7879: support auxiliary GPIOs via gpiolib
Date: Wed, 13 Jan 2010 22:24:31 -0800	[thread overview]
Message-ID: <20100114062430.GA26078@core.coreip.homeip.net> (raw)
In-Reply-To: <8A42379416420646B9BFAC9682273B6D0F0DF094-pcKY8lWzTjquVPpjEGsWsTcYPEmu4y7e@public.gmane.org>

On Wed, Jan 13, 2010 at 09:46:42AM +0000, Hennerich, Michael wrote:
> >From: Dmitry Torokhov [mailto:dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
> >
> >Hi Mike,
> >
> >On Tue, Jan 12, 2010 at 04:04:57PM -0500, Mike Frysinger wrote:
> >> +
> >> +		err = gpiochip_add(&ts->gc);
> >> +		if (err)
> >> +			dev_err(&bus->dev, "failed to register gpio
> %d\n",
> >> +				ts->gc.base);
> >> +	}
> >
> >So if it fails here...
> >
> >> +	struct ad7879_platform_data *pdata = bus->dev.platform_data;
> >> +	if (pdata->gpio_export) {
> >> +		if (gpiochip_remove(&ts->gc))
> >> +			dev_err(&bus->dev, "failed to remove gpio %d\n",
> >> +				ts->gc.base);
> >
> >... how valid is it to remove it here?
> 
> Right - I should use a flag to sense whether the gpiochip was added or
> not.

Another option would be to simply abort loading the driver, I don't have
a strong preference.

> 
> >
> >Also, could you stub out
> >ad7879_gptiochip_export/ad7879_gptiochip_unexport
> >in case of !CONFIG_GPIOLIB?
> 
> Can you explain - where do you see those?
> 

Sorry for not being clear. I was proposing to move the gpio export code
into new functions (and those were suggested name) and stub them out in
case gpiolib is configured out.

-- 
Dmitry

  parent reply	other threads:[~2010-01-14  6:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07  7:18 [PATCH] Input: ad7879: support auxiliary GPIOs via gpiolib Mike Frysinger
2010-01-07  7:31 ` Dmitry Torokhov
2010-01-07 16:16   ` [Uclinux-dist-devel] " Robin Getz
2010-01-07 16:46     ` Mike Frysinger
2010-01-07 17:07       ` Dmitry Torokhov
2010-01-07 17:43         ` Robin Getz
2010-01-10  7:48           ` Dmitry Torokhov
2010-01-12 13:57             ` Hennerich, Michael
2010-01-12 21:04   ` [PATCH v2] " Mike Frysinger
2010-01-13  2:54     ` Dmitry Torokhov
2010-01-13  9:46       ` Hennerich, Michael
     [not found]         ` <8A42379416420646B9BFAC9682273B6D0F0DF094-pcKY8lWzTjquVPpjEGsWsTcYPEmu4y7e@public.gmane.org>
2010-01-14  6:24           ` Dmitry Torokhov [this message]
2010-01-17 15:36       ` [PATCH v3] " Mike Frysinger
2010-01-18  6:35         ` Dmitry Torokhov
2010-01-18  6:48           ` [Uclinux-dist-devel] " Mike Frysinger

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=20100114062430.GA26078@core.coreip.homeip.net \
    --to=dmitry.torokhov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Michael.Hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org \
    --cc=vapier-aBrp7R+bbdUdnm+yROfE0A@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).