On 10.12.2024 16:18:07, Stefano Offredi wrote: > > > Even with those lines of code, If I print spi->irq before the call > > > to request_threaded_irq() it keeps different error codes > > > values (-19, -22, depending on whether I set the gpio controller > > > values in ACPI table). > > > > Just to clarify: from the Linux point of view "rx-int" is a GPIO, not an > > interrupt. It's connected to the "nINT1/GPIO1" pin of the mcp251xfd and > > this is optional. The IRQ which is available under spi->irq is connected > > to the "nINT" pin of the mcp251xfd. > > > > > Even If I remove in ACPI table all the gpio references listed > > > here below: > > > > > > - GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullDefault... > > > - Package () {"rx-int-gpios", Package () { ^CAN0, 0, 0, 0 } } > > > > > > the spi->irq keeps error value -2. > > > > I suggest to first remove all "rx-int" related stuff from your ACPI > > table and concentrate that "spi->irq" has a proper value. > > > > The relevant code is in acpi_status acpi_register_spi_device(): > > > > | https://elixir.bootlin.com/linux/v5.15/source/drivers/spi/spi.c#L2294 > > > > Ok thanks I will investigate on it. > > Just to be sure, will the driver, if rx-int and interrupt logic is not "rx-int" is not used as an interrupt source. To keep things simple forget about "rx-int" for now. > used, perform a polling on the spi bus to check for messages incoming > on the can controller? No - polling is not implemented and makes IMHO no sense, as it's quite some overhead. > So I should see in this operating mode > continuous spi communication on the bus, right? If there's no traffic on the bus, you should only see very little SPI communication. Just a read of the timestamp every 30s or so. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung Nürnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature