[U-Boot] [PATCH] post: add gpio hotkey support

Mike Frysinger vapier at gentoo.org
Wed May 11 16:54:49 CEST 2011


On Wednesday, May 11, 2011 07:42:09 Sergei Shtylyov wrote:
> On 10-05-2011 21:01, Mike Frysinger wrote:
> > @@ -68,6 +72,23 @@ int post_init_f (void)
> >   int __post_hotkeys_pressed(void)
> >   {
> > +#ifdef CONFIG_SYS_POST_HOTKEYS_GPIO
> > +	int ret;
> > +	unsigned gpio = CONFIG_SYS_POST_HOTKEYS_GPIO;
> > +
> > +	ret = gpio_request(gpio, "hotkeys");
> > +	if (ret) {
> > +		printf("POST: gpio hotkey request failed\n");
> > +		return 0;
> > +	}
> > +
> > +	gpio_direction_input(gpio);
> > +	ret = gpio_get_value(gpio);
> > +	gpio_free(gpio);
> > +
> > +	return ret;
> > +#endif
> 
>     You surely meant #else here?
> 
> > +
> > 
> >   	return 0;	/* No hotkeys supported */

not really what i was going for.  it's fine either way though.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110511/56d7dffd/attachment.pgp 


More information about the U-Boot mailing list