Staging: iio: adt7316: Add all irq related code in adt7316_irq_setup()
authorShreeya Patel <shreeya.patel23498@gmail.com>
Thu, 13 Dec 2018 19:43:35 +0000 (01:13 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 16 Dec 2018 14:05:56 +0000 (14:05 +0000)
commit7f6b6d553df71431e61dfd2691a184fc7538dbfc
tree0e4547f6d6ad40c0b71b4a2935ad37750b2b114d
parent1533e45748783ca971639b1b661509314a13ff8c
Staging: iio: adt7316: Add all irq related code in adt7316_irq_setup()

ADT7316 driver no more uses platform data and hence use device tree
data instead of platform data for assigning irq_type field and
implement this in adt7316_irq_setup function.
Switch case figures out the type of irq and if it's the default case
then assign the default value to the irq_type i.e.
irq_type = IRQF_TRIGGER_LOW
Move devm_request_threaded_irq() and assignment of chip->config1
into the adt7316_setup_irq() to unclutter the code in probe function.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/addac/adt7316.c