Merge tag 'backlight-for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / gpio / gpio-pcf857x.c
index 169c09a..d168410 100644 (file)
@@ -440,6 +440,14 @@ static int pcf857x_remove(struct i2c_client *client)
        return status;
 }
 
+static void pcf857x_shutdown(struct i2c_client *client)
+{
+       struct pcf857x *gpio = i2c_get_clientdata(client);
+
+       /* Drive all the I/O lines high */
+       gpio->write(gpio->client, BIT(gpio->chip.ngpio) - 1);
+}
+
 static struct i2c_driver pcf857x_driver = {
        .driver = {
                .name   = "pcf857x",
@@ -447,6 +455,7 @@ static struct i2c_driver pcf857x_driver = {
        },
        .probe  = pcf857x_probe,
        .remove = pcf857x_remove,
+       .shutdown = pcf857x_shutdown,
        .id_table = pcf857x_id,
 };