/* Configure the specified MCU pin. Returns 0 on success, -EINVAL otherwise.  */
int lpc18xx_pin_config(int group, int pin, u32 regval)
/* Configure the specified MCU pin. Returns 0 on success, -EINVAL otherwise.  */
int lpc18xx_pin_config(int group, int pin, u32 regval)
{
	int rv;
	rv = lpc18xx_validate_pin(group, pin);
	if (! rv) {
		writel(0, &LPC18XX_PIN(group, pin));
		writel(regval, &LPC18XX_PIN(group, pin));
	}
	return rv;
}