Commit be1d2842 authored by Dan Murphy's avatar Dan Murphy Committed by Marc Kleine-Budde
Browse files

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: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent e3b32922
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -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);