)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1001975,"name":"Steve Marple","email":"stevemarple@googlemail.com","username":"stevemarple"},"change_message_id":"a02efd6af53174324f81b56666576b3ed2a9484c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"baf12763_bbb2fc5b","updated":"2022-08-18 09:14:07.000000000","message":"Thanks.","commit_id":"a53e0322538b056b892d1905795c45a485817339"},{"author":{"_account_id":1001975,"name":"Steve Marple","email":"stevemarple@googlemail.com","username":"stevemarple"},"change_message_id":"14d6316402553285c2efd1b69ace517a24c5c3ad","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"0db49869_76c4c45a","updated":"2022-08-18 11:10:44.000000000","message":"I\u0027ll fix this later, should be straightforward.","commit_id":"042ebcddc9467b65af2ffed646edbd1c313f0238"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2589deb65e766982353106294755203a46c5e808","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"5449c400_37c5b464","updated":"2023-05-10 15:34:00.000000000","message":"what happened with this patch?\nfrom Patchset 7 there is no more content in the C file","commit_id":"a2328e9ebea87f59f5d7848a05168eda48678fe7"}],"src/jtag/drivers/bcm2835gpio.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"fbf9de097f905205e169f2b4131b4ec6c004b63e","unresolved":true,"context_lines":[{"line_number":46,"context_line":"#define GPIO_GPHEN0 (*(pio_base+25)) /* high detect enable 0 */"},{"line_number":47,"context_line":"#define GPIO_GPLEN0 (*(pio_base+28)) /* low detect enable 0 */"},{"line_number":48,"context_line":"#define GPIO_GPAREN0 (*(pio_base+31)) /* asynchronous rising-edge detection (0) */"},{"line_number":49,"context_line":"#define GPIO_GPAFEN0 (*(pio_base+34)) /* asynchronous falling-edge detection (0) */"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"/* There are various options for sensing: level detection, edge detection, and"},{"line_number":52,"context_line":" * asynchronous edge detection. Try asynchronous detection since it should catch"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"9819a19c_5e2e9919","line":49,"updated":"2022-08-17 17:22:20.000000000","message":"can you please point to some documentation about these registers?","commit_id":"a53e0322538b056b892d1905795c45a485817339"},{"author":{"_account_id":1001975,"name":"Steve Marple","email":"stevemarple@googlemail.com","username":"stevemarple"},"change_message_id":"a02efd6af53174324f81b56666576b3ed2a9484c","unresolved":false,"context_lines":[{"line_number":46,"context_line":"#define GPIO_GPHEN0 (*(pio_base+25)) /* high detect enable 0 */"},{"line_number":47,"context_line":"#define GPIO_GPLEN0 (*(pio_base+28)) /* low detect enable 0 */"},{"line_number":48,"context_line":"#define GPIO_GPAREN0 (*(pio_base+31)) /* asynchronous rising-edge detection (0) */"},{"line_number":49,"context_line":"#define GPIO_GPAFEN0 (*(pio_base+34)) /* asynchronous falling-edge detection (0) */"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"/* There are various options for sensing: level detection, edge detection, and"},{"line_number":52,"context_line":" * asynchronous edge detection. Try asynchronous detection since it should catch"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"f5ec8fe0_e3a11e26","line":49,"in_reply_to":"9819a19c_5e2e9919","updated":"2022-08-18 09:14:07.000000000","message":"Register addresses are taken from \"BCM2835 ARM Peripherals\", Chapter 6 General Purpose I/O (GPIO). Available from https://datasheets.raspberrypi.com/. \n\nAlso added as a comment in the code.","commit_id":"a53e0322538b056b892d1905795c45a485817339"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"fbf9de097f905205e169f2b4131b4ec6c004b63e","unresolved":true,"context_lines":[{"line_number":56,"context_line":"#define GPIO_SENSE_LOW GPIO_GPAFEN0"},{"line_number":57,"context_line":"#define GPIO_SENSE_HIGH GPIO_GPAREN0"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"static int dev_mem_fd; static volatile uint32_t *pio_base \u003d MAP_FAILED; static"},{"line_number":60,"context_line":"volatile uint32_t *pads_base \u003d MAP_FAILED;"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"/* Transition delay coefficients */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"96642119_32a440d4","line":59,"updated":"2022-08-17 17:22:20.000000000","message":"split this, one per line, as it was before","commit_id":"a53e0322538b056b892d1905795c45a485817339"},{"author":{"_account_id":1001975,"name":"Steve Marple","email":"stevemarple@googlemail.com","username":"stevemarple"},"change_message_id":"a02efd6af53174324f81b56666576b3ed2a9484c","unresolved":false,"context_lines":[{"line_number":56,"context_line":"#define GPIO_SENSE_LOW GPIO_GPAFEN0"},{"line_number":57,"context_line":"#define GPIO_SENSE_HIGH GPIO_GPAREN0"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"static int dev_mem_fd; static volatile uint32_t *pio_base \u003d MAP_FAILED; static"},{"line_number":60,"context_line":"volatile uint32_t *pads_base \u003d MAP_FAILED;"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"/* Transition delay coefficients */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"421db15f_b11ccf3a","line":59,"in_reply_to":"96642119_32a440d4","updated":"2022-08-18 09:14:07.000000000","message":"Done","commit_id":"a53e0322538b056b892d1905795c45a485817339"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"fbf9de097f905205e169f2b4131b4ec6c004b63e","unresolved":true,"context_lines":[{"line_number":190,"context_line":"\t\t * (almost certainly Linux) that can result in Linux hanging. The"},{"line_number":191,"context_line":"\t\t * solution is to disable interrupts from the GPIO peripheral when"},{"line_number":192,"context_line":"\t\t * sensing srst or power dropout; do so by including"},{"line_number":193,"context_line":"\t\t * \"dtoverlay\u003dgpio-no-irq\" in /boot/config.txt"},{"line_number":194,"context_line":"\t\t */"},{"line_number":195,"context_line":"\t\tuint32_t mask \u003d (1 \u003c\u003c adapter_gpio_config[idx].gpio_num); /* Clear all"},{"line_number":196,"context_line":"\t\tedge and level detection for this GPIO. */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"d3605f77_c8dfc8ac","line":193,"updated":"2022-08-17 17:22:20.000000000","message":"Do you have any way to check it at runtime and print a warning?\nLooking for something in /proc/device-tree/ (or in /sys/firmware/devicetree/base/ ) ?","commit_id":"a53e0322538b056b892d1905795c45a485817339"},{"author":{"_account_id":1001975,"name":"Steve Marple","email":"stevemarple@googlemail.com","username":"stevemarple"},"change_message_id":"a02efd6af53174324f81b56666576b3ed2a9484c","unresolved":true,"context_lines":[{"line_number":190,"context_line":"\t\t * (almost certainly Linux) that can result in Linux hanging. The"},{"line_number":191,"context_line":"\t\t * solution is to disable interrupts from the GPIO peripheral when"},{"line_number":192,"context_line":"\t\t * sensing srst or power dropout; do so by including"},{"line_number":193,"context_line":"\t\t * \"dtoverlay\u003dgpio-no-irq\" in /boot/config.txt"},{"line_number":194,"context_line":"\t\t */"},{"line_number":195,"context_line":"\t\tuint32_t mask \u003d (1 \u003c\u003c adapter_gpio_config[idx].gpio_num); /* Clear all"},{"line_number":196,"context_line":"\t\tedge and level detection for this GPIO. */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"db8cad2d_e5d46978","line":193,"in_reply_to":"d3605f77_c8dfc8ac","updated":"2022-08-18 09:14:07.000000000","message":"I\u0027m glad you raised this because it worries me alot. I had already looked in those locations to see if it was possible to check the overlay status but so far I have not been able to find anything useful. \n\nDo you have any suggestions on how to proceed? I considered adding a custom command that had to be set to enable sensing. (My thinking here is that with the \"adapter gpio\" commands it is now possible to share some config between the linuxgpiod and bcm2835 drivers; having the sense inputs active on bcm2835 may not safe as unlike with linuxgpiod.)","commit_id":"a53e0322538b056b892d1905795c45a485817339"},{"author":{"_account_id":1001975,"name":"Steve Marple","email":"stevemarple@googlemail.com","username":"stevemarple"},"change_message_id":"14d6316402553285c2efd1b69ace517a24c5c3ad","unresolved":false,"context_lines":[{"line_number":190,"context_line":"\t\t * (almost certainly Linux) that can result in Linux hanging. The"},{"line_number":191,"context_line":"\t\t * solution is to disable interrupts from the GPIO peripheral when"},{"line_number":192,"context_line":"\t\t * sensing srst or power dropout; do so by including"},{"line_number":193,"context_line":"\t\t * \"dtoverlay\u003dgpio-no-irq\" in /boot/config.txt"},{"line_number":194,"context_line":"\t\t */"},{"line_number":195,"context_line":"\t\tuint32_t mask \u003d (1 \u003c\u003c adapter_gpio_config[idx].gpio_num); /* Clear all"},{"line_number":196,"context_line":"\t\tedge and level detection for this GPIO. */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"d6242e7e_ab89fb87","line":193,"in_reply_to":"db8cad2d_e5d46978","updated":"2022-08-18 11:10:44.000000000","message":"I found it. When interrupts are off /sys/firmware/devicetree/base/soc/gpio@7e200000/interrupts is empty. When they are enabled it is 16 bytes in size (RPi2) or 24 bytes (RPi4).\nI\u0027ll push a patch with this check enabled.","commit_id":"a53e0322538b056b892d1905795c45a485817339"}]}
