)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1001975,"name":"Steve Marple","email":"stevemarple@googlemail.com","username":"stevemarple"},"change_message_id":"d80a66a6818d70c0a6f9df53c9957715b821ea1e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"4347474e_6a50b085","updated":"2022-05-02 13:36:39.000000000","message":"Amended as requested.","commit_id":"0462999bcd7d716e46742a33bc6cd133913b5dcd"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"8d10f29662789ea990f231181d746b88ed226da3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"be8d2b82_6dc0e839","updated":"2022-05-02 12:41:14.000000000","message":"Super cool! This is in my TODO list since ages and I never got time to write it.\nThere is only one minor issue with space, otherwise fine for me.\nThanks!","commit_id":"0462999bcd7d716e46742a33bc6cd133913b5dcd"},{"author":{"_account_id":1001975,"name":"Steve Marple","email":"stevemarple@googlemail.com","username":"stevemarple"},"change_message_id":"5670c5d281c3011413169de9cc3f1f16bf2dc492","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a59c8bb9_366895fd","updated":"2022-05-03 21:36:20.000000000","message":"Please see the comment for a response to your driver ideas.","commit_id":"0eb93355203742269f55833104826ac2afa2fb00"}],"doc/openocd.texi":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"8d10f29662789ea990f231181d746b88ed226da3","unresolved":true,"context_lines":[{"line_number":3344,"context_line":"@command{linuxgpiod jtag_nums}."},{"line_number":3345,"context_line":"@end deffn"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"@deffn {Config Command} {linuxgpiod tdo_num}[@var{chip}]  @var{tdo}"},{"line_number":3348,"context_line":"Set TDO GPIO number, and optionally TDO chip number. Must be specified to enable"},{"line_number":3349,"context_line":"JTAG transport. Can also be specified using the configuration command"},{"line_number":3350,"context_line":"@command{linuxgpiod jtag_nums}."}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"c8f600fa_fe551281","line":3347,"updated":"2022-05-02 12:41:14.000000000","message":"please add a space separator between command name and first argument.\nThere are two space chars between the arguments, one can be dropped","commit_id":"0462999bcd7d716e46742a33bc6cd133913b5dcd"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6b7671d2e3691c86b8969fc983b6acac5a297bb5","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"@command{linuxgpiod jtag_nums}."},{"line_number":3345,"context_line":"@end deffn"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"@deffn {Config Command} {linuxgpiod tdo_num}[@var{chip}]  @var{tdo}"},{"line_number":3348,"context_line":"Set TDO GPIO number, and optionally TDO chip number. Must be specified to enable"},{"line_number":3349,"context_line":"JTAG transport. Can also be specified using the configuration command"},{"line_number":3350,"context_line":"@command{linuxgpiod jtag_nums}."}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"be188c8f_31209f08","line":3347,"in_reply_to":"129e9a7c_9f83d9a5","updated":"2022-05-03 22:35:18.000000000","message":"The driver am335xgpio is already ok for me. I will wait 2 weeks before merging it, just in case someone has any extra remark. Don\u0027t worry about that, it\u0027s independent from this discussion. Same for this patch.\n\nBefore going deep inside coding, would be good to have a proposal for the config command; something that looks suitable for the devices so far.\nPosting a proposal on the devel mailing list would be fine, but a WIP patch is probably more easy to understand and the discussion would be kept in gerrit with the patch history.\nIt could be an initial patch just for the command proposal of a single GPIO, similar to https://review.openocd.org/6647/\nNo need to handle all the GPIOs during the WIP, otherwise you will have to change the code of every GPIO at each review; just a waste of time.\nOnce command looks ok, second step: show that it works on the drivers, using the data from the new command. Possibly one patch per driver.\nFinal step, extending the patches to handle consistently all the GPIOs.\n\nOne command proposal could be:\nadapter gpio (srst|trst|tdi|...) [number] [-chip chip_number] [-active-high|-active-low] [-push-pull|-open-drain|-open-source] [-speed value] [-init-state (0|1|high-z|input)] ...\nWith the options that are cumulative and can be overwritten, so a sequence of commands can independently set one option at a time for the same GPIO.\n\nI think that either SRST or LED are suitable to be \"the single\" GPIO initially used within the WIP. They are used independently from the other GPIOs and the code that uses them is well confined.\nIt\u0027s something that can be easily tested.\n\nIf you have different ideas, feel free to proceed as you prefer. Coding always follows personal organization and style. What I wrote above is probably how I would start, without knowing where I will land to.","commit_id":"0462999bcd7d716e46742a33bc6cd133913b5dcd"},{"author":{"_account_id":1001975,"name":"Steve Marple","email":"stevemarple@googlemail.com","username":"stevemarple"},"change_message_id":"5670c5d281c3011413169de9cc3f1f16bf2dc492","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"@command{linuxgpiod jtag_nums}."},{"line_number":3345,"context_line":"@end deffn"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"@deffn {Config Command} {linuxgpiod tdo_num}[@var{chip}]  @var{tdo}"},{"line_number":3348,"context_line":"Set TDO GPIO number, and optionally TDO chip number. Must be specified to enable"},{"line_number":3349,"context_line":"JTAG transport. Can also be specified using the configuration command"},{"line_number":3350,"context_line":"@command{linuxgpiod jtag_nums}."}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"129e9a7c_9f83d9a5","line":3347,"in_reply_to":"5f49e4c5_dc571c09","updated":"2022-05-03 21:36:20.000000000","message":"That all makes sense, it is clear there is code duplication in the bit-banging drivers. With a more central location features such as active logic state (polarity) for SWDIO buffer and LED could be handled independently of the driver. Your list covers everything I can think of. As far as I know only the linuxgpiod driver uses gpiochip numbers, (though the am335xgpio driver does internally). \nThe ft232r and imx_gpio drivers could follow the same scheme but I\u0027m not familiar enough with the ftdi driver and at first glance the GPIO configuration looks quite different.\n\nWhat is the correct forum for these discussions? Should I try by submitting a patch and take it from there? My concern with having this discussion is that it may delay the am335xgpio driver from being accepted.","commit_id":"0462999bcd7d716e46742a33bc6cd133913b5dcd"},{"author":{"_account_id":1001975,"name":"Steve Marple","email":"stevemarple@googlemail.com","username":"stevemarple"},"change_message_id":"d80a66a6818d70c0a6f9df53c9957715b821ea1e","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"@command{linuxgpiod jtag_nums}."},{"line_number":3345,"context_line":"@end deffn"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"@deffn {Config Command} {linuxgpiod tdo_num}[@var{chip}]  @var{tdo}"},{"line_number":3348,"context_line":"Set TDO GPIO number, and optionally TDO chip number. Must be specified to enable"},{"line_number":3349,"context_line":"JTAG transport. Can also be specified using the configuration command"},{"line_number":3350,"context_line":"@command{linuxgpiod jtag_nums}."}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"f71cea45_404d1748","line":3347,"in_reply_to":"c8f600fa_fe551281","updated":"2022-05-02 13:36:39.000000000","message":"Glad this is useful! I\u0027m hoping to see feature-parity between the bcm2835gpio, linuxgpiod and am335xgpio drivers, with them all supporting an activity LED, SWDIO buffer, correctly handling push-pull and open-drain resets, correctly restoring GPIOs (including initial state for outputs), and command driver documentation. I\u0027ll keep chipping away and submitting patches.","commit_id":"0462999bcd7d716e46742a33bc6cd133913b5dcd"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"5cf9c8df064594cd851b6aa7cc8aa57a6b9f6e49","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"@command{linuxgpiod jtag_nums}."},{"line_number":3345,"context_line":"@end deffn"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"@deffn {Config Command} {linuxgpiod tdo_num}[@var{chip}]  @var{tdo}"},{"line_number":3348,"context_line":"Set TDO GPIO number, and optionally TDO chip number. Must be specified to enable"},{"line_number":3349,"context_line":"JTAG transport. Can also be specified using the configuration command"},{"line_number":3350,"context_line":"@command{linuxgpiod jtag_nums}."}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"5f49e4c5_dc571c09","line":3347,"in_reply_to":"f71cea45_404d1748","updated":"2022-05-02 14:23:56.000000000","message":"Steve, if you are interested in investing time on this topic, let me share my idea.\nI have already replaced per-driver commands \"serial\" and \"location\" with global \"adapter XXX\" commands. See, part of the same series:\nhttps://review.openocd.org/6647/\nhttps://review.openocd.org/6640/\nMy target is to centralize also the commands for:\n- USB VID and PID;\n- GPIO numbers \u0026 friends (port/chip, polarity, ...) for bitbanging;\n- network host and port or UNIX socket name for connection to a server;\n- anything else?\nThe targets are reducing the code to maintain, uniforming the commands, thus simplifying the documentation.\n\nThis patch from you is really welcome because documents existing commands, but an effort to rationalize the GPIO definition across the drivers would be much more valuable, and not only in terms of having the same functionalities.\n\nBeside bcm2835gpio, linuxgpiod and am335xgpio drivers, there is also ftdi that specifies a \"kind of\" GPIO pinout. To be studied if it can be part of the same rework.","commit_id":"0462999bcd7d716e46742a33bc6cd133913b5dcd"}]}
