[U-Boot] [PATCH v2] i2c: muxes: pca954x: Add support for GPIO reset line
Simon Glass
sjg at chromium.org
Tue Sep 12 12:30:47 UTC 2017
On 11 September 2017 at 12:19, Moritz Fischer <moritz.fischer at ettus.com> wrote:
> This commit adds support for GPIO reset lines matching the
> common linux "reset-gpios" devicetree binding.
>
> Signed-off-by: Moritz Fischer <moritz.fischer at ettus.com>
> ---
>
> Changes from v1:
> - Simon's feedback on ifdef vs IS_ENABLED()
>
> ---
> drivers/i2c/muxes/pca954x.c | 42 +++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 41 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
> index 383f72f552..7dee12166d 100644
> --- a/drivers/i2c/muxes/pca954x.c
> +++ b/drivers/i2c/muxes/pca954x.c
> @@ -1,5 +1,6 @@
> /*
> * Copyright (C) 2015 - 2016 Xilinx, Inc.
> + * Copyright (C) 2017 National Instruments Corp
> * Written by Michal Simek
> *
> * SPDX-License-Identifier: GPL-2.0+
> @@ -9,7 +10,8 @@
> #include <dm.h>
> #include <errno.h>
> #include <i2c.h>
> -#include <asm/gpio.h>
> +
> +#include <asm-generic/gpio.h>
>
> DECLARE_GLOBAL_DATA_PTR;
>
> @@ -30,6 +32,9 @@ struct chip_desc {
> struct pca954x_priv {
> u32 addr; /* I2C mux address */
> u32 width; /* I2C mux width - number of busses */
> +#ifdef CONFIG_DM_GPIO
> + struct gpio_desc gpio_mux_reset;
> +#endif /* CONFIG_DM_GPIO */
You should drop the #ifdef here.
Otherwise:
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list