/* Change the direction of a GPIO pin to output and set the level on this pin.  */
static int lpc178x_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int level)
/* Change the direction of a GPIO pin to output and set the level on this pin.  */
static int lpc178x_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int level)
{
	LPC178X_GPIO(LPC178X_GPIO_GETPORT(gpio))->fiodir |=
		(1 << LPC178X_GPIO_GETPIN(gpio));
	lpc178x_gpio_set_value(chip, gpio, level);
	return 0;
}