/* Configure the specified GPIO pin. Returns 0 on success, -EINVAL otherwise.  */
int lpc178x_gpio_config(const struct lpc178x_gpio_dsc *dsc, u32 regval)
/* Configure the specified GPIO pin. Returns 0 on success, -EINVAL otherwise.  */
int lpc178x_gpio_config(const struct lpc178x_gpio_dsc *dsc, u32 regval)
{
	int rv;
	rv = lpc178x_validate_gpio(dsc);
	if (rv == 0)
		LPC178X_IOCON(dsc->port, dsc->pin) = regval;
	return rv;
}