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: <20100611113811.GB4078@pengutronix.de>
Date:	Fri, 11 Jun 2010 13:38:11 +0200
From:	Luotao Fu <l.fu@...gutronix.de>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Luotao Fu <l.fu@...gutronix.de>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] mfd: add STMPE811 core support

Hi,

On Fri, Jun 11, 2010 at 12:13:26PM +0100, Mark Brown wrote:
> On Fri, Jun 11, 2010 at 12:13:13PM +0200, Luotao Fu wrote:
> 
> > +	for_each_set_bit(bit, (unsigned long *)&int_stat, STMPE811_NUM_IRQ) {
> > +		handler = stm->irqhandler[bit];
> > +		data = stm->irqdata[bit];
> > +		if (handler) {
> 
> You should be using genirq here - just call handle_nested_irq() if the
> IRQ is asserted and let genirq manage the handler for you.
> 

ah OK, I did think about using nested irq, was however too lazy to find
out how it works. ;-). Will fix in V2.

> > +static irqreturn_t stmpe811_irq(int irq, void *data)
> > +{
> > +	struct stmpe811 *stm = data;
> > +
> > +	get_device(stm->dev);
> > +	disable_irq_nosync(stm->irq);
> > +	queue_work(stm->work_queue, &stm->irq_work);
> > +
> > +	return IRQ_HANDLED;
> > +}
> 
> You should use request_threaded_irq() for the main IRQ - it will take
> care of all this for you.
> 
> 
> > +static struct i2c_device_id stmpe811_id_table[] = {
> > +	{"stmpe811", 0x88},
> 
> Any reason for the 0x88 - you don't seem to use it anywhere?
> 

doh, this is bogus. will fix in the next round.

> > +int stmpe811_register_irq(struct stmpe811 *stm, int irq,
> > +			  irq_handler_t handler, void *data);
> > +int stmpe811_free_irq(struct stmpe811 *stm, int irq);
> 
> If you use genirq these can be dropped - this will also mean that
> existing generic drivers using the standard GPIO and IRQ frameworks will
> be able to use the chip without modification.

all right.

Thanks

cheers
Luotao Fu
-- 
Pengutronix e.K.                           | Dipl.-Ing. Luotao Fu        |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ