gpio-keys on barebox 2015.11

Sascha Hauer s.hauer at pengutronix.de
Tue Apr 18 23:42:24 PDT 2017


On Wed, Apr 12, 2017 at 05:35:46PM +0200, Zdenek Svachula wrote:
> Hi all,
> 
> I'm working with barebox 2015.11 phy4 (from phytex.de) I try add to dts
>         gpio_keys {
>                 compatible = "gpio-keys";
>                 #address-cells = <1>;
>                 #size-cells = <0>;
>                 autorepeat;
>                 up {
>                                 label = "GPIO Key up";
>                                 linux,code = <103>;
>                                 gpios = <&gpio2 24 1>;
>                 };
>                 enter {
>                                 label = "GPIO Key ENTER";
>                                 linux,code = <28>;
>                                 gpios = <&gpio5 8 1>;
>                 };
> 
> 
>         };
> 
> to allow boot selection boot menu via 2 gpio button  I also enable
> GPIO-buttons in menuconfig but it seem not workin.
> 
> Can you please me point to some method how to debug if gpio polling
> works or if dts is for barebox wrong.

Generally the above looks ok and should work like this. Try 'devinfo'
command and identify the gpio-keys device (usually named gpio-keys.<x>).
Use 'devinfo gpio-keys.<x>' to find out if there is a driver attached to
this device. If there isn't, do you find something about gpio-keys in
the boot log?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list