Hardcode IC irq type to IRQF_TRIGGER_FALLING for both platform and OF cases. According to the datasheet IC irq line is active low, reflect this fact in the driver. If sc16is7xx device is described in devicetree, the change fixes the following problem and makes the driver working correctly: root@devkit3250:~# stty -F /dev/ttySC1 115200 INFO: rcu_preempt self-detected stall on CPU 0: (2100 ticks this GP) idle=a79/140000000000002/0 softirq=1759/1759 fqs=0 (t=2100 jiffies g=910 c=909 q=2) rcu_preempt kthread starved for 2100 jiffies! g910 c909 f0x0 s3 ->state=0x1 Task dump for CPU 0: stty R running 0 698 696 0x00000002 ...... Signed-off-by: Vladimir Zapolskiy <vz@xxxxxxxxx> --- Alexander, the problem was copy-pasted from max310x driver, see commit 58afc90977 Probably you may want to fix it there as well. drivers/tty/serial/sc16is7xx.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 72ffd0d..8f20546 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1132,7 +1132,7 @@ static int sc16is7xx_gpio_direction_output(struct gpio_chip *chip, static int sc16is7xx_probe(struct device *dev, const struct sc16is7xx_devtype *devtype, - struct regmap *regmap, int irq, unsigned long flags) + struct regmap *regmap, int irq) { struct sched_param sched_param = { .sched_priority = MAX_RT_PRIO / 2 }; unsigned long freq, *pfreq = dev_get_platdata(dev); @@ -1230,7 +1230,8 @@ static int sc16is7xx_probe(struct device *dev, /* Setup interrupt */ ret = devm_request_irq(dev, irq, sc16is7xx_irq, - IRQF_ONESHOT | flags, dev_name(dev), s); + IRQF_ONESHOT | IRQF_TRIGGER_FALLING, + dev_name(dev), s); if (!ret) return 0; @@ -1304,7 +1305,6 @@ static struct regmap_config regcfg = { static int sc16is7xx_spi_probe(struct spi_device *spi) { const struct sc16is7xx_devtype *devtype; - unsigned long flags = 0; struct regmap *regmap; int ret; @@ -1326,14 +1326,13 @@ static int sc16is7xx_spi_probe(struct spi_device *spi) const struct spi_device_id *id_entry = spi_get_device_id(spi); devtype = (struct sc16is7xx_devtype *)id_entry->driver_data; - flags = IRQF_TRIGGER_FALLING; } regcfg.max_register = (0xf << SC16IS7XX_REG_SHIFT) | (devtype->nr_uart - 1); regmap = devm_regmap_init_spi(spi, ®cfg); - return sc16is7xx_probe(&spi->dev, devtype, regmap, spi->irq, flags); + return sc16is7xx_probe(&spi->dev, devtype, regmap, spi->irq); } static int sc16is7xx_spi_remove(struct spi_device *spi) @@ -1373,7 +1372,6 @@ static int sc16is7xx_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { const struct sc16is7xx_devtype *devtype; - unsigned long flags = 0; struct regmap *regmap; if (i2c->dev.of_node) { @@ -1383,14 +1381,13 @@ static int sc16is7xx_i2c_probe(struct i2c_client *i2c, devtype = (struct sc16is7xx_devtype *)of_id->data; } else { devtype = (struct sc16is7xx_devtype *)id->driver_data; - flags = IRQF_TRIGGER_FALLING; } regcfg.max_register = (0xf << SC16IS7XX_REG_SHIFT) | (devtype->nr_uart - 1); regmap = devm_regmap_init_i2c(i2c, ®cfg); - return sc16is7xx_probe(&i2c->dev, devtype, regmap, i2c->irq, flags); + return sc16is7xx_probe(&i2c->dev, devtype, regmap, i2c->irq); } static int sc16is7xx_i2c_remove(struct i2c_client *client) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html