* EDB93xx SPI peripheral handling
  *************************************************************************/
 static struct cs4271_platform_data edb93xx_cs4271_data = {
-       .gpio_nreset    = -EINVAL,      /* filled in later */
+       /* Intentionally left blank */
 };
 
 static struct spi_board_info edb93xx_spi_board_info[] __initdata = {
        /* Intentionally left blank */
 };
 
+static struct gpiod_lookup_table edb93xx_cs4272_edb9301_gpio_table = {
+       .dev_id = "spi0.0", /* CS0 on SPI0 */
+       .table = {
+               GPIO_LOOKUP("A", 1, "reset", GPIO_ACTIVE_LOW),
+               { },
+       },
+};
+
+static struct gpiod_lookup_table edb93xx_cs4272_edb9302_gpio_table = {
+       .dev_id = "spi0.0", /* CS0 on SPI0 */
+       .table = {
+               GPIO_LOOKUP("H", 2, "reset", GPIO_ACTIVE_LOW),
+               { },
+       },
+};
+
+static struct gpiod_lookup_table edb93xx_cs4272_edb9315_gpio_table = {
+       .dev_id = "spi0.0", /* CS0 on SPI0 */
+       .table = {
+               GPIO_LOOKUP("B", 6, "reset", GPIO_ACTIVE_LOW),
+               { },
+       },
+};
+
 static void __init edb93xx_register_spi(void)
 {
        if (machine_is_edb9301() || machine_is_edb9302())
-               edb93xx_cs4271_data.gpio_nreset = EP93XX_GPIO_LINE_EGPIO1;
+               gpiod_add_lookup_table(&edb93xx_cs4272_edb9301_gpio_table);
        else if (machine_is_edb9302a() || machine_is_edb9307a())
-               edb93xx_cs4271_data.gpio_nreset = EP93XX_GPIO_LINE_H(2);
+               gpiod_add_lookup_table(&edb93xx_cs4272_edb9302_gpio_table);
        else if (machine_is_edb9315a())
-               edb93xx_cs4271_data.gpio_nreset = EP93XX_GPIO_LINE_EGPIO14;
+               gpiod_add_lookup_table(&edb93xx_cs4272_edb9315_gpio_table);
 
        gpiod_add_lookup_table(&edb93xx_spi_cs_gpio_table);
        ep93xx_register_spi(&edb93xx_spi_info, edb93xx_spi_board_info,
 
  * SPI CS4271 Audio Codec
  *************************************************************************/
 static struct cs4271_platform_data vision_cs4271_data = {
-       .gpio_nreset    = EP93XX_GPIO_LINE_H(2),
+       /* Intentionally left blank */
 };
 
 /*************************************************************************
        },
 };
 
+static struct gpiod_lookup_table vision_spi_cs4271_gpio_table = {
+       .dev_id = "spi0.0", /* cs4271 @ CS0 */
+       .table = {
+               /* RESET */
+               GPIO_LOOKUP_IDX("H", 2, NULL, 0, GPIO_ACTIVE_LOW),
+               { },
+       },
+};
+
 static struct gpiod_lookup_table vision_spi_cs_gpio_table = {
        .dev_id = "spi0",
        .table = {
 
        ep93xx_register_i2c(vision_i2c_info,
                                ARRAY_SIZE(vision_i2c_info));
+       gpiod_add_lookup_table(&vision_spi_cs4271_gpio_table);
        gpiod_add_lookup_table(&vision_spi_mmc_gpio_table);
        gpiod_add_lookup_table(&vision_spi_cs_gpio_table);
        ep93xx_register_spi(&vision_spi_master, vision_spi_board_info,
 
 #define __CS4271_H
 
 struct cs4271_platform_data {
-       int gpio_nreset;        /* GPIO driving Reset pin, if any */
        bool amutec_eq_bmutec;  /* flag to enable AMUTEC=BMUTEC */
 
        /*
 
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/regulator/consumer.h>
 #include <sound/pcm.h>
 #include <sound/soc.h>
        /* Current sample rate for de-emphasis control */
        int                             rate;
        /* GPIO driving Reset pin, if any */
-       int                             gpio_nreset;
-       /* GPIO that disable serial bus, if any */
-       int                             gpio_disable;
+       struct gpio_desc                *reset;
        /* enable soft reset workaround */
        bool                            enable_soft_reset;
        struct regulator_bulk_data      supplies[ARRAY_SIZE(supply_names)];
 {
        struct cs4271_private *cs4271 = snd_soc_component_get_drvdata(component);
 
-       if (gpio_is_valid(cs4271->gpio_nreset)) {
-               gpio_direction_output(cs4271->gpio_nreset, 0);
-               mdelay(1);
-               gpio_set_value(cs4271->gpio_nreset, 1);
-               mdelay(1);
-       }
+       gpiod_direction_output(cs4271->reset, 1);
+       mdelay(1);
+       gpiod_set_value(cs4271->reset, 0);
+       mdelay(1);
 
        return 0;
 }
 {
        struct cs4271_private *cs4271 = snd_soc_component_get_drvdata(component);
 
-       if (gpio_is_valid(cs4271->gpio_nreset))
-               /* Set codec to the reset state */
-               gpio_set_value(cs4271->gpio_nreset, 0);
+       /* Set codec to the reset state */
+       gpiod_set_value(cs4271->reset, 1);
 
        regcache_mark_dirty(cs4271->regmap);
        regulator_bulk_disable(ARRAY_SIZE(cs4271->supplies), cs4271->supplies);
 static int cs4271_common_probe(struct device *dev,
                               struct cs4271_private **c)
 {
-       struct cs4271_platform_data *cs4271plat = dev->platform_data;
        struct cs4271_private *cs4271;
        int i, ret;
 
        if (!cs4271)
                return -ENOMEM;
 
-       cs4271->gpio_nreset = of_get_named_gpio(dev->of_node, "reset-gpio", 0);
-
-       if (cs4271plat)
-               cs4271->gpio_nreset = cs4271plat->gpio_nreset;
-
-       if (gpio_is_valid(cs4271->gpio_nreset)) {
-               ret = devm_gpio_request(dev, cs4271->gpio_nreset,
-                                       "CS4271 Reset");
-               if (ret < 0)
-                       return ret;
-       }
+       cs4271->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_ASIS);
+       if (IS_ERR(cs4271->reset))
+               return dev_err_probe(dev, PTR_ERR(cs4271->reset),
+                                    "error retrieveing RESET GPIO\n");
+       gpiod_set_consumer_name(cs4271->reset, "CS4271 Reset");
 
        for (i = 0; i < ARRAY_SIZE(supply_names); i++)
                cs4271->supplies[i].supply = supply_names[i];