All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hennerich, Michael" <Michael.Hennerich@analog.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Mike Frysinger <vapier@gentoo.org>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"uclinux-dist-devel@blackfin.uclinux.org"
	<uclinux-dist-devel@blackfin.uclinux.org>
Subject: RE: [PATCH 0/4] Current ad7879 patches
Date: Tue, 29 Jun 2010 13:10:38 +0100	[thread overview]
Message-ID: <544AC56F16B56944AEC3BD4E3D5917712E66DFF408@LIMKCMBX1.ad.analog.com> (raw)
In-Reply-To: <20100625081847.8617.31150.stgit@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 3418 bytes --]

Dmitry Torokhov wrote on 2010-06-25:
> Mike, Michael,
>
> I was looking through outstanding patches to ad7879 and here they are.
> Since I made some changes to the patches you wrote and there also some
> new code and I do not have the hardware I'd appreciate if you could
> try them out so they can be applied.
>
> Thank you.
>

Hi Dmitry,

I tested your ad7879 patch set -
A few issues see patch below.

-Fix ad7879_probe() parameter passing.
-Add missing input_set_drvdata()
-Avoid unbalanced irq enable warning: disable_irq() after request.
-Fix sysfs disable hook logic: the file is called disable so don't treat it as enable.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>

 drivers/input/touchscreen/ad7879-i2c.c |    2 +-
 drivers/input/touchscreen/ad7879-spi.c |    2 +-
 drivers/input/touchscreen/ad7879.c     |    6 +++++-
 3 files changed, 7 insertions(+), 3 deletions(-)

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;



Greetings,
Michael

Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 4036 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif



[-- Attachment #2: ad7879.patch --]
[-- Type: application/octet-stream, Size: 2147 bytes --]

 drivers/input/touchscreen/ad7879-i2c.c |    2 +-
 drivers/input/touchscreen/ad7879-spi.c |    2 +-
 drivers/input/touchscreen/ad7879.c     |    6 +++++-
 3 files changed, 7 insertions(+), 3 deletions(-)

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;

  parent reply	other threads:[~2010-06-29 12:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25  8:22 [PATCH 0/4] Current ad7879 patches Dmitry Torokhov
2010-06-25  8:22 ` [PATCH 1/4] Input: ad7879 - use threaded IRQ Dmitry Torokhov
2010-06-25  8:22 ` [PATCH 2/4] Input: ad7879 - split bus logic out Dmitry Torokhov
2010-06-29  6:08   ` Mike Frysinger
2010-06-25  8:22 ` [PATCH 3/4] Input: ad7879 - add open and close methods Dmitry Torokhov
2010-06-25  8:22 ` [PATCH 4/4] Input: ad7879 - use i2c_smbus_read_i2c_block_data() to lower overhead Dmitry Torokhov
2010-06-29 12:10 ` Hennerich, Michael [this message]
2010-06-30  8:03   ` [PATCH 0/4] Current ad7879 patches Dmitry Torokhov
2010-06-30  8:40     ` Hennerich, Michael
2010-06-30  9:07       ` 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=544AC56F16B56944AEC3BD4E3D5917712E66DFF408@LIMKCMBX1.ad.analog.com \
    --to=michael.hennerich@analog.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier@gentoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.