iio: remove gpio interrupt probing from drivers that use a single interrupt
Commit 845c877009
("i2c / ACPI: Assign IRQ for devices that have
GpioInt automatically") automatically assigns the first ACPI GPIO
interrupt in client->irq, so we can remove the probing code from
drivers that use only one interrupt.
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Цей коміт міститься в:

зафіксовано
Jonathan Cameron

джерело
6839c1b070
коміт
0f0796509c
@@ -50,7 +50,6 @@
|
||||
#define STK8312_ALL_CHANNEL_SIZE 3
|
||||
|
||||
#define STK8312_DRIVER_NAME "stk8312"
|
||||
#define STK8312_GPIO "stk8312_gpio"
|
||||
#define STK8312_IRQ_NAME "stk8312_event"
|
||||
|
||||
/*
|
||||
@@ -504,30 +503,6 @@ static const struct iio_buffer_setup_ops stk8312_buffer_setup_ops = {
|
||||
.postdisable = stk8312_buffer_postdisable,
|
||||
};
|
||||
|
||||
static int stk8312_gpio_probe(struct i2c_client *client)
|
||||
{
|
||||
struct device *dev;
|
||||
struct gpio_desc *gpio;
|
||||
int ret;
|
||||
|
||||
if (!client)
|
||||
return -EINVAL;
|
||||
|
||||
dev = &client->dev;
|
||||
|
||||
/* data ready gpio interrupt pin */
|
||||
gpio = devm_gpiod_get_index(dev, STK8312_GPIO, 0, GPIOD_IN);
|
||||
if (IS_ERR(gpio)) {
|
||||
dev_err(dev, "acpi gpio get index failed\n");
|
||||
return PTR_ERR(gpio);
|
||||
}
|
||||
|
||||
ret = gpiod_to_irq(gpio);
|
||||
dev_dbg(dev, "GPIO resource, no:%d irq:%d\n", desc_to_gpio(gpio), ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int stk8312_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
@@ -569,9 +544,6 @@ static int stk8312_probe(struct i2c_client *client,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (client->irq < 0)
|
||||
client->irq = stk8312_gpio_probe(client);
|
||||
|
||||
if (client->irq > 0) {
|
||||
ret = devm_request_threaded_irq(&client->dev, client->irq,
|
||||
stk8312_data_rdy_trig_poll,
|
||||
|
Посилання в новій задачі
Заблокувати користувача