Hi, On Sat, Mar 14, 2020 at 11:42 AM Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx> wrote: [snip] > > > > Changes in v4: > > * Make use of 'devm_gpiod_get_index_optional' instead of 'devm_gpiod_get_index'. > > * Use 'dev_err' instead of 'dev_notice' and return ERR_PTR if > > 'devm_gpiod_get_index_optional' fails. > > * Rename pers dealy macro to PERST_DELAY_MS. > > * Add new patch 6 which removes function 'mt7621_reset_port' not needed anymore. > > It seems this series work but due to an unknow bug set / clear gpio > registers are not properly working. > So maybe this patch is also necessary: > https://github.com/openwrt/openwrt/pull/2798/commits/823d41e28b4e15734560508b29df726b16c51dab An update on this. It seems gpio-mmio driver upstream is broken for this arch because bgpio_dir_out sets pin value before specifying pin mode and set/clear register only works when pin is at output mode. The following patches have been sent to linux-gpio mail list by Chuanhong Guo: https://marc.info/?l=linux-gpio&m=158427446906895&w=2 This issue does not affect this pcie driver. Best regards, Sergio Paracuellos > > Should this patch be also properly added to the tree? Added Linus > Walleij and René van Dorst in order to get feedback about this issue. > > I also add all the thread to get openwrt working with 5.4 in where > this patches and the gpio one have been added (just in case is > interesting for anyone): > https://github.com/openwrt/openwrt/pull/2798 > > Best regards, > Sergio Paracuellos > > > > Changes in v3: > > * Avoid to fail if gpio descriptor fails on get. > > * re-do PATCH 1 commit message. > > * Take into account gpio low polarity on request and assert and deassert. > > * Review error path of driver to properly release gpio's resources. > > > > Changes in v2: > > * restore configuration for pers mode to GPIO. > > * Avoid to read FTS_NUM register in reset state. > > * Release gpio's patch added > > > > Best regards, > > Sergio Paracuellos > > > > > > Sergio Paracuellos (6): > > staging: mt7621-pci: use gpios for properly reset > > staging: mt7621-pci: change value for 'PERST_DELAY_MS' > > staging: mt7621-dts: make use of 'reset-gpios' property for pci > > staging: mt7621-pci: bindings: update doc accordly to last changes > > staging: mt7621-pci: release gpios after pci initialization > > staging: mt7621-pci: delete no more needed 'mt7621_reset_port' > > > > drivers/staging/mt7621-dts/mt7621.dtsi | 11 +- > > .../mt7621-pci/mediatek,mt7621-pci.txt | 7 +- > > drivers/staging/mt7621-pci/pci-mt7621.c | 122 ++++++++++-------- > > 3 files changed, 82 insertions(+), 58 deletions(-) > > > > -- > > 2.25.1 > > _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel