Re: [PATCH 3/4] ratp: implement support for GPIO commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 21, 2018 at 05:20:00PM +0200, Aleksander Morgado wrote:
> Introduce three new RATP commands that allow getting and setting GPIO
> values as well as configuring the direction of the GPIO pins.
>

Same here as with the i2c bus/address thing. Being to able to use names for
the GPIOs would be a good thing.


> +#include <common.h>
> +#include <ratp_bb.h>
> +#include <malloc.h>
> +#include <environment.h>
> +#include <gpio.h>
> +#include <errno.h>
> +
> +struct ratp_bb_gpio_get_value_request {
> +	struct ratp_bb header;
> +	uint32_t       gpio;
> +} __attribute__((packed));

Nitpick: I prefer not to align the variable names in struct definitions.
If the next element with a longer type is added then you can only give
up the alignment or patch unrelated lines (which is bad because 'git
blame' gives no useful output for the changed lines)

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 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux