From: Tom Rini Date: Mon, 28 Jul 2014 16:36:16 -0400 Subject: [U-Boot] [PATCH v5 10/11] exynos: gpio: Convert to driver model In-Reply-To: <1406549499-19696-11-git-send-email-sjg@chromium.org> References: <1406549499-19696-1-git-send-email-sjg@chromium.org> <1406549499-19696-11-git-send-email-sjg@chromium.org> Message-ID: <20140728203616.GH1847@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jul 28, 2014 at 06:11:37AM -0600, Simon Glass wrote: > Convert the exynos GPIO driver to driver model. This implements the generic > GPIO interface but not the extra Exynos-specific functions. OK, so same comment as about the serial conversion. And, I hear you about there being big changes, but I think this illustrates best why we need to keep function ordering the same: [snip] > @@ -132,35 +57,34 @@ static void s5p_gpio_cfg_pin(struct s5p_gpio_bank *bank, int gpio, int cfg) > writel(value, &bank->con); > } > > -static void s5p_gpio_set_value(struct s5p_gpio_bank *bank, int gpio, int en) > +#ifndef CONFIG_SPL_BUILD > +static int s5p_gpio_get_cfg_pin(struct s5p_gpio_bank *bank, int gpio) > { > unsigned int value; > > - value = readl(&bank->dat); > - value &= ~DAT_MASK(gpio); > - if (en) > - value |= DAT_SET(gpio); > - writel(value, &bank->dat); > + value = readl(&bank->con); > + value &= CON_MASK(gpio); > + return CON_SFR_UNSHIFT(value, gpio); > } [snip] > -static unsigned int s5p_gpio_get_value(struct s5p_gpio_bank *bank, int gpio) > +static void s5p_gpio_set_value(struct s5p_gpio_bank *bank, int gpio, int en) > { > unsigned int value; > > value = readl(&bank->dat); > - return !!(value & DAT_MASK(gpio)); > + value &= ~DAT_MASK(gpio); > + if (en) > + value |= DAT_SET(gpio); > + writel(value, &bank->dat); > } We've moved the function around, the signature changed but the guts didn't at all? -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: