From patchwork Tue Jun 29 12:10:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hennerich, Michael" X-Patchwork-Id: 108576 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5TDIm4B012137 for ; Tue, 29 Jun 2010 13:20:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755537Ab0F2MKn (ORCPT ); Tue, 29 Jun 2010 08:10:43 -0400 Received: from nwd2mail10.analog.com ([137.71.25.55]:5977 "EHLO nwd2mail10.analog.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755913Ab0F2MKm (ORCPT ); Tue, 29 Jun 2010 08:10:42 -0400 X-IronPort-AV: E=Sophos;i="4.53,505,1272859200"; d="scan'208";a="18180622" Received: from nwd2hubcas2.ad.analog.com ([10.64.73.30]) by nwd2mail10.analog.com with ESMTP; 29 Jun 2010 08:10:41 -0400 Received: from limkHubCAS2.ad.analog.com (10.32.51.141) by NWD2HUBCAS2.ad.analog.com (10.64.73.30) with Microsoft SMTP Server (TLS) id 8.1.358.0; Tue, 29 Jun 2010 08:10:41 -0400 Received: from LIMKCMBX1.ad.analog.com ([169.254.1.88]) by limkHubCAS2.ad.analog.com ([10.32.51.141]) with mapi; Tue, 29 Jun 2010 13:10:39 +0100 From: "Hennerich, Michael" To: Dmitry Torokhov , Mike Frysinger CC: "linux-input@vger.kernel.org" , "uclinux-dist-devel@blackfin.uclinux.org" Date: Tue, 29 Jun 2010 13:10:38 +0100 Subject: RE: [PATCH 0/4] Current ad7879 patches Thread-Topic: [PATCH 0/4] Current ad7879 patches Thread-Index: AcsUP4c0JrX+lRjMS+mxeZ3kJCASwwDOsOGg Message-ID: <544AC56F16B56944AEC3BD4E3D5917712E66DFF408@LIMKCMBX1.ad.analog.com> References: <20100625081847.8617.31150.stgit@localhost.localdomain> In-Reply-To: <20100625081847.8617.31150.stgit@localhost.localdomain> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 29 Jun 2010 13:20:44 +0000 (UTC) diff --git a/drivers/input/touchscreen/ad7879-i2c.c b/drivers/input/touchscreen/ad7879-i2c.c index 79e3857..d82a38e 100644 --- a/drivers/input/touchscreen/ad7879-i2c.c +++ b/drivers/input/touchscreen/ad7879-i2c.c @@ -87,7 +87,7 @@ static int __devinit ad7879_i2c_probe(struct i2c_client *client, return -EIO; } - ts = ad7879_probe(&client->dev, client->irq, AD7879_DEVID, + ts = ad7879_probe(&client->dev, AD7879_DEVID, client->irq, &ad7879_i2c_bus_ops); if (IS_ERR(ts)) return PTR_ERR(ts); diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c index 6e32f3a..9fa8e5d 100644 --- a/drivers/input/touchscreen/ad7879-spi.c +++ b/drivers/input/touchscreen/ad7879-spi.c @@ -141,7 +141,7 @@ static int __devinit ad7879_spi_probe(struct spi_device *spi) return -EINVAL; } - ts = ad7879_probe(&spi->dev, spi->irq, AD7879_DEVID, &ad7879_spi_bus_ops); + ts = ad7879_probe(&spi->dev, AD7879_DEVID, spi->irq, &ad7879_spi_bus_ops); if (IS_ERR(ts)) return PTR_ERR(ts); diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c index 4e2c1b7..1ac0713 100644 --- a/drivers/input/touchscreen/ad7879.c +++ b/drivers/input/touchscreen/ad7879.c @@ -315,7 +315,7 @@ static ssize_t ad7879_disable_store(struct device *dev, if (error) return error; - ad7879_toggle(ts, val); + ad7879_toggle(ts, !val); return count; } @@ -557,6 +557,8 @@ struct ad7879 *ad7879_probe(struct device *dev, u8 devid, unsigned int irq, goto err_free_mem; } + disable_irq(ts->irq); /* request_irq returns with irqs enabled */ + err = sysfs_create_group(&dev->kobj, &ad7879_attr_group); if (err) goto err_free_irq; @@ -565,6 +567,8 @@ struct ad7879 *ad7879_probe(struct device *dev, u8 devid, unsigned int irq, if (err) goto err_remove_attr; + input_set_drvdata(input_dev, ts); + err = input_register_device(input_dev); if (err) goto err_remove_gpio;