From: Mark Brown on 14 Jun 2010 08:00 On Mon, Jun 14, 2010 at 12:32:36PM +0200, Luotao Fu wrote: > +static void stmpe811_mask_work(struct work_struct *work) > +{ > + struct stmpe811 *stm = container_of(work, struct stmpe811, mask_work); > + > + stmpe811_reg_write(stm, STMPE811_REG_INT_EN, stm->int_en_mask); > + > + mutex_unlock(&stm->irq_mask_lock); > +} Why are you doing this in a workqueue? You shouldn't need to do this - you should implement the bus_lock() and bus_unlock() callbacks instead. > + ret = request_threaded_irq(client->irq, NULL, stmpe811_irq, > + pdata->irq_flags, "stmpe811", stm); > + if (ret) { > + dev_err(&client->dev, "failed to request IRQ: %d\n", ret); > + goto err_free; > + } I suspect you should be unconditionally putting IRQF_ONESHOT here since the threaded IRQ requires it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Luotao Fu on 14 Jun 2010 08:10 Hi Mark, thanks for the review. On Mon, Jun 14, 2010 at 12:50:32PM +0100, Mark Brown wrote: > On Mon, Jun 14, 2010 at 12:32:36PM +0200, Luotao Fu wrote: > > > +static void stmpe811_mask_work(struct work_struct *work) > > +{ > > + struct stmpe811 *stm = container_of(work, struct stmpe811, mask_work); > > + > > + stmpe811_reg_write(stm, STMPE811_REG_INT_EN, stm->int_en_mask); > > + > > + mutex_unlock(&stm->irq_mask_lock); > > +} > > Why are you doing this in a workqueue? You shouldn't need to do this - > you should implement the bus_lock() and bus_unlock() callbacks instead. Right, will replace the stuff with bus_lock/unlock > > > + ret = request_threaded_irq(client->irq, NULL, stmpe811_irq, > > + pdata->irq_flags, "stmpe811", stm); > > + if (ret) { > > + dev_err(&client->dev, "failed to request IRQ: %d\n", ret); > > + goto err_free; > > + } > > I suspect you should be unconditionally putting IRQF_ONESHOT here since > the threaded IRQ requires it. oh, oversaw this one, will fix. Thanks regards 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 |
From: Mark Brown on 15 Jun 2010 11:00 On Tue, Jun 15, 2010 at 11:00:44AM +0200, Luotao Fu wrote: > STMPE811 is a multifunction device, which contains a GPIO controller, a > Touchscreen controller, an ADC and a temperature sensor. This patch adds a core > driver for this device. The driver provides core functionalities like accessing > the registers and management of subdevices. The device supports communication > through SPI and I2C interface. Currently we only support I2C. > > Signed-off-by: Luotao Fu <l.fu(a)pengutronix.de> > Acked-by: Jonathan Cameron<jic23(a)cam.ac.uk> Looks good. Reviewed-by: Mark Brown <broonie(a)opensource.wolfsonmicro.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
First
|
Prev
|
Pages: 1 2 Prev: [PATCH] smb380: accelerometer driver Next: input: STMPE811 touch controller support |