You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Driver sc16is7xx is not enabling IRQ in sc16is752 chip? #3231
Close within 30 daysIssue will be closed within 30 days unless requested to stay openWaiting for external inputWaiting for a comment from the originator of the issue, or a collaborator.
I'm trying to use sc16is752 chip connected to spi1 (and INT to gpio24) and it looks like chip does not generate IRQ when it receives some data.
I have checked this with logic analyzer. SC16IS752 INT pin is always HIGH (pulled up to Vdd by 1kOhm resistor).
I'm using screen /dev/ttySC0 9600 to check if port works. It does not receive data until I "manually" generate falling edge on gpio24 (by shorting it to GND for a moment). When I do that - looks like whole buffer is being read, so interrupt mechanism is working fine.
I also tried to disconnect INT pin from Raspberry to be sure, that Raspberry is not holding this pin in HIGH state somehow.
I saw driver source here: sc16is7xx.c line 1042, it looks that it should enable interrupts in chip, but it doesn't.
I'm using RPi CM3 module (with "Waveshare Compute Module IO Board Plus" development board) and custom board with SC16IS752, RS485 transceivers and a lot of not related stuff.
System
# cat /etc/rpi-issue
Raspberry Pi reference 2019-04-08
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, e910bf55ac92e27c6e77043e8995bcb5e0a2d742, stage2
# vcgencmd version
Aug 15 2019 12:06:42
Copyright (c) 2012 Broadcom
version 0e6daa5106dd4164474616408e0dc24f997ffcf3 (clean) (release) (start)
# uname -a
Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
Are we supposed to know/assume/guess that pin 6 on CON28 is wired to GPIO24? Many people are using this device, so I'd be very surprised if the IRQ function doesn't work.
Well, it looks like that I had some other issue with device tree or drivers.
After few tries with diffrent GPIO mappings I managed to get it work.
I also discovered, that IRQ functionality is not used by UART driver when it receives data. On logic analyzer I see that linux driver continuously checks if there is some data in buffer. I guess that IRQ is used for sc16is752 GPIO input state changes, but I'm not using these GPIOs.
I'm not completely satisfied how this driver or sc16is752 device or maybe just my configuration works, because SPI bus is continuously busy, but IT WORKS.
Close within 30 daysIssue will be closed within 30 days unless requested to stay openWaiting for external inputWaiting for a comment from the originator of the issue, or a collaborator.
Activity
pelwell commentedon Sep 25, 2019
Are we supposed to know/assume/guess that pin 6 on CON28 is wired to GPIO24? Many people are using this device, so I'd be very surprised if the IRQ function doesn't work.
JamesH65 commentedon Dec 20, 2019
@kaamil1984 Is this issue still present?
kaamil1984 commentedon Dec 27, 2019
Well, it looks like that I had some other issue with device tree or drivers.
After few tries with diffrent GPIO mappings I managed to get it work.
I also discovered, that IRQ functionality is not used by UART driver when it receives data. On logic analyzer I see that linux driver continuously checks if there is some data in buffer. I guess that IRQ is used for sc16is752 GPIO input state changes, but I'm not using these GPIOs.
I'm not completely satisfied how this driver or sc16is752 device or maybe just my configuration works, because SPI bus is continuously busy, but IT WORKS.
net: pktgen: fix code style (WARNING: Prefer strscpy over strcpy)