mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
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 <dmurphy@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
e3b3292215
commit
be1d28424a
1 changed files with 1 additions and 10 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue