Skip to content

Commit

Permalink
mfd: max8997: Enale irq-wakeup unconditionally
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Szyprowski authored and Lee Jones committed Oct 23, 2018
1 parent 8e27a56 commit efddff2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions drivers/mfd/max8997.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,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;
}

Expand Down Expand Up @@ -232,7 +226,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;

Expand Down
1 change: 0 additions & 1 deletion include/linux/mfd/max8997.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ struct max8997_led_platform_data {
struct max8997_platform_data {
/* IRQ */
int ono;
int wakeup;

/* ---- PMIC ---- */
struct max8997_regulator_data *regulators;
Expand Down

0 comments on commit efddff2

Please sign in to comment.