linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Trilok Soni <tsoni@codeaurora.org>
Cc: Kevin McNeely <kev@cypress.com>,
	David Brown <davidb@codeaurora.org>,
	Fred <fwk@ubuntu.linuxcertified.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Eric Miao <eric.y.miao@gmail.com>,
	Ben Dooks <ben-linux@fluff.org>,
	Simtec Linux Team <linux@simtec.co.uk>,
	Todd Fischer <todd.fischer@ridgerun.com>,
	Arnaud Patard <arnaud.patard@rtp-net.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Henrik Rydberg <rydberg@euromail.se>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: cyttsp i2c and spi touchscreen driver init submit
Date: Thu, 5 Aug 2010 14:07:06 -0700	[thread overview]
Message-ID: <20100805210705.GA20063@core.coreip.homeip.net> (raw)
In-Reply-To: <4C5B22F8.1030204@codeaurora.org>

On Fri, Aug 06, 2010 at 02:15:44AM +0530, Trilok Soni wrote:
> > +
> > +/* ************************************************************************
> > + * The cyttsp_xy_worker function reads the XY coordinates and sends them to
> > + * the input layer.  It is scheduled from the interrupt (or timer).
> > + * *************************************************************************/
> > +void handle_single_touch(struct cyttsp_xydata *xy, struct cyttsp_track_data *t,
> > +			 struct cyttsp *ts)
> > +{
> 
> functions should be "static". I would leave a decision to Dmitry if he wants the driver
> to support old single touch protocol hacked up with HAT_xx bits so that driver can support
> two touches with the old single touch protocol itself. 

The ABS_HAT* bits should go away. They were gross abuse even when we did
not have MT protocol and shoudl not be used at all now that we do have
it. I will be cleaning up older drivers (like Elantech) to get rid of
them.

Multitouch devices shouls support either A or B MT protocol. SInce this
device seems to be supporting tracking in hardware it shoudl simply
adhere to protocol B to limit kernel->userspace traffict and be done
with it.

...

> > +
> > +/* schedulable worker entry for timer polling method */
> > +void cyttsp_xy_worker_(struct work_struct *work)
> > +{
> > +	struct cyttsp *ts = container_of(work, struct cyttsp, work);
> > +	cyttsp_xy_worker(ts);
> > +}
> 
> I would really prefer that you remove the polling method from this code as it will simplify
> a code lot. We can delete the whole workqueue because as you will be using request_threaded_irq(...),
> you will not need any workqueue.
> 
 
Seconded. Polling is hardly useful on real production setup as it will
drain battery in no time.

> > +
> > +static int cyttsp_i2c_init(void)
> > +{
> 
> Please add __init like
> 
> static int __init cyttsp_i2c_init(void)
> 
> > +	int retval;
> > +	retval = i2c_add_driver(&cyttsp_i2c_driver);
> > +	printk(KERN_INFO "%s: Cypress TrueTouch(R) Standard Product I2C "
> > +		"Touchscreen Driver (Built %s @ %s) returned %d\n",
> > +		 __func__, __DATE__, __TIME__, retval);
> > +

And lose printk as well. The boot is exremely noisy as it is...

	return i2c_add_driver(&cyttsp_i2c_driver);

is all that is needed.

-- 
Dmitry

  reply	other threads:[~2010-08-05 21:07 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Kevin McNeely <kev@cypress.com>
2010-07-12 20:56 ` [PATCH] i2c: cyttsp i2c touchscreen driver init submit Kevin McNeely
2010-07-13  2:34   ` Christoph Fritz
2010-08-04 16:30     ` Kevin McNeely
2010-07-13  6:48   ` Henrik Rydberg
2010-08-04 16:38     ` Kevin McNeely
2010-07-13  7:31   ` Trilok Soni
2010-07-13  7:55     ` Dmitry Torokhov
2010-07-13  8:42       ` Trilok Soni
2010-07-22 10:33         ` Trilok Soni
2010-07-27 15:20           ` Kevin McNeely
2010-08-04 17:27       ` Kevin McNeely
2010-07-19  9:28     ` Jean Delvare
2010-08-04 17:22     ` Kevin McNeely
2010-08-05 18:12 ` [PATCH] i2c: cyttsp i2c and spi " Kevin McNeely
2010-08-05 20:45   ` Trilok Soni
2010-08-05 21:07     ` Dmitry Torokhov [this message]
2010-08-07  0:39       ` Kevin McNeely
2010-08-07  0:52     ` Kevin McNeely
2010-08-05 23:06   ` Henrik Rydberg
2010-08-07  0:32     ` Kevin McNeely
2010-08-07  0:49       ` Henrik Rydberg
2010-08-10  0:51         ` Kevin McNeely
2010-08-06  9:06   ` Trilok Soni
2010-08-10  0:49     ` Kevin McNeely
2010-11-09 18:25 ` [PATCH] touchscreen: Cypress TTSP G3 MTDEV Core Driver Kevin McNeely
2010-11-15 16:46   ` Henrik Rydberg
2010-11-19 17:39     ` Kevin McNeely
2010-12-01  7:22       ` Trilok Soni
2010-12-01 14:38         ` Henrik Rydberg
2010-12-01 23:59           ` Kevin McNeely
2010-12-02  0:01             ` Henrik Rydberg
2010-12-02  0:34   ` Dmitry Torokhov
2010-11-09 18:25 ` [PATCH] i2c: Cypress TTSP G3 MTDEV I2C Device Driver Kevin McNeely
2010-11-09 18:25 ` [PATCH] spi: Cypress TTSP G3 MTDEV SPI " Kevin McNeely
2010-12-04  2:06 ` [v2] touchscreen Cypress TTSP G3 MTDEV Core Driver Kevin McNeely
2010-12-05  9:11   ` Henrik Rydberg
2010-12-04  2:06 ` [v2] 2/3 i2c: Cypress TTSP G3 MTDEV I2C Device Driver Kevin McNeely
2010-12-04  2:06 ` [v2] 3/3 spi: Cypress TTSP G3 MTDEV SPI " Kevin McNeely
2010-12-29 19:17 ` [v3 1/3] 1/3 Touchscreen: Cypress TTSP G3 MTDEV Core Driver Kevin McNeely
2010-12-30  6:04   ` Shubhrajyoti Datta
2011-01-05  0:45     ` Kevin McNeely
2010-12-31 11:53   ` Henrik Rydberg
2010-12-31 12:55     ` Trilok Soni
2010-12-31 13:58       ` Henrik Rydberg
2011-01-03  9:44         ` Trilok Soni
2011-01-03 17:03     ` Kevin McNeely
2011-01-03 18:45       ` Henrik Rydberg
2011-01-03 20:50         ` Kevin McNeely
2011-01-04  1:50   ` Hong Liu
2011-01-05  0:38     ` Kevin McNeely
2010-12-29 19:17 ` [v3 2/3] 2/3 i2c: Cypress TTSP G3 MTDEV I2C Device Driver Kevin McNeely
2011-01-04  1:45   ` Hong Liu
2011-01-05  0:37     ` Kevin McNeely
2010-12-29 19:17 ` [v3 3/3] 3/3 spi: Cypress TTSP G3 MTDEV SPI " Kevin McNeely
2011-01-05  0:54 ` [v4 1/3] 1/3 Touchscreen: Cypress TTSP G3 Core Driver Kevin McNeely
2011-01-05  8:59   ` Henrik Rydberg
2011-01-05 17:07     ` Kevin McNeely
2011-01-05 17:34       ` Henrik Rydberg
2011-01-10 19:27         ` Kevin McNeely
2011-01-10 21:11           ` Dmitry Torokhov
2011-01-10 21:17             ` Kevin McNeely
2011-02-24 18:31         ` Kevin McNeely
2011-02-27 12:34           ` Henrik Rydberg
2011-01-05  0:54 ` [v4 2/3] 2/3 i2c: Cypress TTSP G3 I2C Device Driver Kevin McNeely
2011-01-05  0:54 ` [v4 3/3] 3/3 spi: Cypress TTSP G3 SPI " Kevin McNeely
2011-01-12 18:45   ` Dmitry Torokhov
2011-01-12 19:02     ` Kevin McNeely
2011-01-20 11:10       ` Trilok Soni
2011-01-21  9:27         ` Dmitry Torokhov
2011-01-21 22:14           ` Kevin McNeely

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=20100805210705.GA20063@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=arnaud.patard@rtp-net.org \
    --cc=ben-linux@fluff.org \
    --cc=davidb@codeaurora.org \
    --cc=eric.y.miao@gmail.com \
    --cc=fwk@ubuntu.linuxcertified.com \
    --cc=kev@cypress.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@simtec.co.uk \
    --cc=rydberg@euromail.se \
    --cc=s.hauer@pengutronix.de \
    --cc=sameo@linux.intel.com \
    --cc=todd.fischer@ridgerun.com \
    --cc=tsoni@codeaurora.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).