/* * 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) { /* * Clear the register, in case some bits were set by firmware, * and then write the new value */ writel(0, &LPC18XX_PIN(group, pin)); writel(regval, &LPC18XX_PIN(group, pin)); } return rv; }
LPC18XX_PIN_P(e,14), LPC18XX_PIN_P(e,15), LPC18XX_PIN_P(f,0), LPC18XX_PIN_P(f,1), LPC18XX_PIN_P(f,2), LPC18XX_PIN_P(f,3), LPC18XX_PIN_P(f,4), LPC18XX_PIN_P(f,5), LPC18XX_PIN_P(f,6), LPC18XX_PIN_P(f,7), LPC18XX_PIN_P(f,8), LPC18XX_PIN_P(f,9), LPC18XX_PIN_P(f,10), LPC18XX_PIN_P(f,11), LPC18XX_PIN(clk0, PIN_CLK0), LPC18XX_PIN(clk1, PIN_CLK1), LPC18XX_PIN(clk2, PIN_CLK2), LPC18XX_PIN(clk3, PIN_CLK3), LPC18XX_PIN(usb1_dm, PIN_USB1_DM), LPC18XX_PIN(usb1_dp, PIN_USB1_DP), LPC18XX_PIN(i2c0_scl, PIN_I2C0_SCL), LPC18XX_PIN(i2c0_sda, PIN_I2C0_SDA), }; static int lpc18xx_pconf_get_usb1(enum pin_config_param param, int *arg, u32 reg) { /* TODO */ return -ENOTSUPP; }