Re: [PATCH v2] Input: ad7879: support auxiliary GPIOs via gpiolib

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

 



On Wed, Jan 13, 2010 at 09:46:42AM +0000, Hennerich, Michael wrote:
> >From: Dmitry Torokhov [mailto:dmitry.torokhov@xxxxxxxxx]
> >
> >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
--
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