]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mfd: max8997: Enale irq-wakeup unconditionally
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 5 Sep 2018 11:54:07 +0000 (13:54 +0200)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:20:55 +0000 (14:20 -0300)
BugLink: https://bugs.launchpad.net/bugs/1854975
[ Upstream commit efddff27c886e729a7f84a7205bd84d7d4af7336 ]

IRQ wake up support for MAX8997 driver was initially configured by
respective property in pdata. However, after the driver conversion to
device-tree, setting it was left as 'todo'. Nowadays most of other PMIC MFD
drivers initialized from device-tree assume that they can be an irq wakeup
source, so enable it also for MAX8997. This fixes support for wakeup from
MAX8997 RTC alarm.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/mfd/max8997.c
include/linux/mfd/max8997.h

index 2d6e2c39278626d06bd45ed70e73d1a457a835cc..4a2fc59d59016220dd9b0ac6d05057f1353a94b3 100644 (file)
@@ -155,12 +155,6 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata(
 
        pd->ono = irq_of_parse_and_map(dev->of_node, 1);
 
-       /*
-        * ToDo: the 'wakeup' member in the platform data is more of a linux
-        * specfic information. Hence, there is no binding for that yet and
-        * not parsed here.
-        */
-
        return pd;
 }
 
@@ -248,7 +242,7 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
         */
 
        /* MAX8997 has a power button input. */
-       device_init_wakeup(max8997->dev, pdata->wakeup);
+       device_init_wakeup(max8997->dev, true);
 
        return ret;
 
index cf815577bd6869d004f2e4d74a465500df82c4d9..3ae1fe743bc34b010431b54fdaad009dfba8ebc0 100644 (file)
@@ -178,7 +178,6 @@ struct max8997_led_platform_data {
 struct max8997_platform_data {
        /* IRQ */
        int ono;
-       int wakeup;
 
        /* ---- PMIC ---- */
        struct max8997_regulator_data *regulators;