#include <linux/platform_device.h>
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
+#include <linux/gpio/machine.h>
 #include <linux/dmi.h>
 
 #include <asm/geode.h>
 static struct gpio_led geos_leds[] = {
        {
                .name = "geos:1",
-               .gpio = 6,
                .default_trigger = "default-on",
-               .active_low = 1,
        },
        {
                .name = "geos:2",
-               .gpio = 25,
                .default_trigger = "default-off",
-               .active_low = 1,
        },
        {
                .name = "geos:3",
-               .gpio = 27,
                .default_trigger = "default-off",
-               .active_low = 1,
        },
 };
 
        .leds = geos_leds,
 };
 
+static struct gpiod_lookup_table geos_leds_gpio_table = {
+       .dev_id = "leds-gpio",
+       .table = {
+               /* The Geode GPIOs should be on the CS5535 companion chip */
+               GPIO_LOOKUP_IDX("cs5535-gpio", 6, NULL, 0, GPIO_ACTIVE_LOW),
+               GPIO_LOOKUP_IDX("cs5535-gpio", 25, NULL, 1, GPIO_ACTIVE_LOW),
+               GPIO_LOOKUP_IDX("cs5535-gpio", 27, NULL, 2, GPIO_ACTIVE_LOW),
+               { }
+       },
+};
+
 static struct platform_device geos_leds_dev = {
        .name = "leds-gpio",
        .id = -1,
 static void __init register_geos(void)
 {
        /* Setup LED control through leds-gpio driver */
+       gpiod_add_lookup_table(&geos_leds_gpio_table);
        platform_add_devices(geos_devs, ARRAY_SIZE(geos_devs));
 }