Skip to content

Commit 37f3965

Browse files
zonquegregkh
authored andcommitted
sc16is7xx: Always use falling edge IRQ
The driver currently only uses IRQF_TRIGGER_FALLING if the probing happened without a device-tree setup. The device however will always generate falling edges on its IRQ line, so let's use that flag in all cases. Signed-off-by: Daniel Mack <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4dd31f1 commit 37f3965

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

drivers/tty/serial/sc16is7xx.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ static int sc16is7xx_gpio_direction_output(struct gpio_chip *chip,
11761176

11771177
static int sc16is7xx_probe(struct device *dev,
11781178
const struct sc16is7xx_devtype *devtype,
1179-
struct regmap *regmap, int irq, unsigned long flags)
1179+
struct regmap *regmap, int irq)
11801180
{
11811181
struct sched_param sched_param = { .sched_priority = MAX_RT_PRIO / 2 };
11821182
unsigned long freq = 0, *pfreq = dev_get_platdata(dev);
@@ -1304,7 +1304,7 @@ static int sc16is7xx_probe(struct device *dev,
13041304

13051305
/* Setup interrupt */
13061306
ret = devm_request_irq(dev, irq, sc16is7xx_irq,
1307-
flags, dev_name(dev), s);
1307+
IRQF_TRIGGER_FALLING, dev_name(dev), s);
13081308
if (!ret)
13091309
return 0;
13101310

@@ -1378,7 +1378,6 @@ static struct regmap_config regcfg = {
13781378
static int sc16is7xx_spi_probe(struct spi_device *spi)
13791379
{
13801380
const struct sc16is7xx_devtype *devtype;
1381-
unsigned long flags = 0;
13821381
struct regmap *regmap;
13831382
int ret;
13841383

@@ -1399,14 +1398,13 @@ static int sc16is7xx_spi_probe(struct spi_device *spi)
13991398
const struct spi_device_id *id_entry = spi_get_device_id(spi);
14001399

14011400
devtype = (struct sc16is7xx_devtype *)id_entry->driver_data;
1402-
flags = IRQF_TRIGGER_FALLING;
14031401
}
14041402

14051403
regcfg.max_register = (0xf << SC16IS7XX_REG_SHIFT) |
14061404
(devtype->nr_uart - 1);
14071405
regmap = devm_regmap_init_spi(spi, &regcfg);
14081406

1409-
return sc16is7xx_probe(&spi->dev, devtype, regmap, spi->irq, flags);
1407+
return sc16is7xx_probe(&spi->dev, devtype, regmap, spi->irq);
14101408
}
14111409

14121410
static int sc16is7xx_spi_remove(struct spi_device *spi)
@@ -1445,7 +1443,6 @@ static int sc16is7xx_i2c_probe(struct i2c_client *i2c,
14451443
const struct i2c_device_id *id)
14461444
{
14471445
const struct sc16is7xx_devtype *devtype;
1448-
unsigned long flags = 0;
14491446
struct regmap *regmap;
14501447

14511448
if (i2c->dev.of_node) {
@@ -1454,14 +1451,13 @@ static int sc16is7xx_i2c_probe(struct i2c_client *i2c,
14541451
return -ENODEV;
14551452
} else {
14561453
devtype = (struct sc16is7xx_devtype *)id->driver_data;
1457-
flags = IRQF_TRIGGER_FALLING;
14581454
}
14591455

14601456
regcfg.max_register = (0xf << SC16IS7XX_REG_SHIFT) |
14611457
(devtype->nr_uart - 1);
14621458
regmap = devm_regmap_init_i2c(i2c, &regcfg);
14631459

1464-
return sc16is7xx_probe(&i2c->dev, devtype, regmap, i2c->irq, flags);
1460+
return sc16is7xx_probe(&i2c->dev, devtype, regmap, i2c->irq);
14651461
}
14661462

14671463
static int sc16is7xx_i2c_remove(struct i2c_client *client)

0 commit comments

Comments
 (0)