lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100805210705.GA20063@core.coreip.homeip.net>
Date:	Thu, 5 Aug 2010 14:07:06 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Trilok Soni <tsoni@...eaurora.org>
Cc:	Kevin McNeely <kev@...ress.com>,
	David Brown <davidb@...eaurora.org>,
	Fred <fwk@...ntu.linuxcertified.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Eric Miao <eric.y.miao@...il.com>,
	Ben Dooks <ben-linux@...ff.org>,
	Simtec Linux Team <linux@...tec.co.uk>,
	Todd Fischer <todd.fischer@...gerun.com>,
	Arnaud Patard <arnaud.patard@...-net.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Henrik Rydberg <rydberg@...omail.se>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] i2c: cyttsp i2c and spi touchscreen driver init submit

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ