Page MenuHomeFreeBSD

gpiopps support patch
ClosedPublic

Authored by yamori813_yahoo.co.jp on Feb 24 2017, 7:14 AM.

Details

Summary

This is dev/gpio/gpiopps.c support patch. I added code base on
arm/freescale/imx/imx_gpio.c. I add this to my dts.

pps {
        compatible = "pps-gpio";
        gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
        status = "okay";
        assert-falling-edge;
};

Also add gpiopps device to kernel configuration.

I check use this module. Sorry only Japanes page.

http://akizukidenshi.com/catalog/g/gK-09991/

Test Plan

FON2405(RT3050) with 8M SPI Flash

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

yamori813_yahoo.co.jp retitled this revision from to gpiopps support patch.Feb 24 2017, 7:14 AM
yamori813_yahoo.co.jp updated this object.
yamori813_yahoo.co.jp edited the test plan for this revision. (Show Details)
yamori813_yahoo.co.jp updated this revision to Diff 25648.
mizhka edited edge metadata.Feb 27 2017, 8:36 PM
mizhka accepted this revision.

@sgalabov , could you please have a look? Thanks!

sys/mips/mediatek/mtk_gpio_v1.c
294–297 ↗(On Diff #25648)

sc->pins[i].pin_caps |= GPIO_PIN_INPUT | GPIO_PIN_OUTPUT |

GPIO_PIN_INVIN | GPIO_PIN_INVOUT | 
GPIO_INTR_EDGE_RISING | GPIO_INTR_EDGE_FALLING;
508 ↗(On Diff #25648)

uint32_t?

571–573 ↗(On Diff #25648)

error may be EINVAL. It's better to printf error before lost of context.

This revision is now accepted and ready to land.Feb 27 2017, 8:36 PM
yamori813_yahoo.co.jp updated this revision to Diff 25964.
  • review refict
This revision now requires review to proceed.Mar 4 2017, 4:03 AM

I seem irq is u_int from other code.

This revision was automatically updated to reflect the committed changes.