From: Dan Murphy Date: Fri, 23 Aug 2019 17:50:57 +0000 (-0500) Subject: can: tcan4x5x: Remove data-ready gpio interrupt X-Git-Tag: v5.4-rc1~131^2~81^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be1d28424adca74d7b2a3970b8fec6c9786a6b5e;p=platform%2Fkernel%2Flinux-rpi.git can: tcan4x5x: Remove data-ready gpio interrupt Remove the data-ready gpio interrupt handling and use the spi->irq that is created based on the interrupt DT property. Signed-off-by: Dan Murphy Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c index a697996d..bb41e8d 100644 --- a/drivers/net/can/m_can/tcan4x5x.c +++ b/drivers/net/can/m_can/tcan4x5x.c @@ -117,7 +117,6 @@ struct tcan4x5x_priv { struct m_can_classdev *mcan_dev; struct gpio_desc *reset_gpio; - struct gpio_desc *interrupt_gpio; struct gpio_desc *device_wake_gpio; struct gpio_desc *device_state_gpio; struct regulator *power; @@ -356,13 +355,6 @@ static int tcan4x5x_parse_config(struct m_can_classdev *cdev) { struct tcan4x5x_priv *tcan4x5x = cdev->device_data; - tcan4x5x->interrupt_gpio = devm_gpiod_get(cdev->dev, "data-ready", - GPIOD_IN); - if (IS_ERR(tcan4x5x->interrupt_gpio)) { - dev_err(cdev->dev, "data-ready gpio not defined\n"); - return -EINVAL; - } - tcan4x5x->device_wake_gpio = devm_gpiod_get(cdev->dev, "device-wake", GPIOD_OUT_HIGH); if (IS_ERR(tcan4x5x->device_wake_gpio)) { @@ -381,8 +373,6 @@ static int tcan4x5x_parse_config(struct m_can_classdev *cdev) if (IS_ERR(tcan4x5x->device_state_gpio)) tcan4x5x->device_state_gpio = NULL; - cdev->net->irq = gpiod_to_irq(tcan4x5x->interrupt_gpio); - tcan4x5x->power = devm_regulator_get_optional(cdev->dev, "vsup"); if (PTR_ERR(tcan4x5x->power) == -EPROBE_DEFER) @@ -447,6 +437,7 @@ static int tcan4x5x_can_probe(struct spi_device *spi) mcan_class->is_peripheral = true; mcan_class->bit_timing = &tcan4x5x_bittiming_const; mcan_class->data_timing = &tcan4x5x_data_bittiming_const; + mcan_class->net->irq = spi->irq; spi_set_drvdata(spi, priv);