John Crispin wrote: > On 06/04/13 18:47, Tobias Diedrich wrote: > >+ > >+ gpio-leds { > >+ compatible = "gpio-leds"; > >+ // Used to enable power-over-ethernet passthrough from port0 to > >port1. > >+ // Disable passthrough by default to prevent accidental > >equipment damage. > >+ poe { > >+ label = "freestation:poe:passthrough"; > >+ gpios =<&gpio0 11 1>; > >+ }; > >+ // The following leds are defined in the ArcOS firmware, but > >reportedly > >+ // not present in the Freestation5 device. > > Hi, > > this should be done with an of_gpio_export node > -> > https://dev.openwrt.org/browser/trunk/target/linux/ramips/dts/DIR-645.dts#L134
There's a bug in the gpio-export code. :) But I'm rewriting it to use the following syntax: gpio-export,name = "mario"; gpio-export,flags = "out_init_high", "active_low", "changeable"; gpio-export,gpios = <&gpio0 11 1>; Which will support the following flags (had to add GPIOF_ACTIVE_LOW): static struct of_gpio_flag of_gpio_flags[] = { { "in", GPIOF_DIR_IN }, { "out_init_low", GPIOF_OUT_INIT_LOW }, { "out_init_high", GPIOF_OUT_INIT_HIGH }, { "open_drain", GPIOF_OPEN_DRAIN }, { "open_source", GPIOF_OPEN_SOURCE }, { "active_low", GPIOF_ACTIVE_LOW }, { "changeable", GPIOF_EXPORT_CHANGEABLE }, { /* sentinel */ } }; -- Tobias PGP: http://8ef7ddba.uguu.de _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel