Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: sec: Enable wakeup from suspend via devicetree property

Set device wakeup capability from devicetree property (done by drivers
core), instead of always setting it to 0 (because value in platform data
is not assigned).

This should not have visible effect on actual resuming from suspend
because the child device - S5M RTC driver - is responsible for waking
up and sets device wakeup unconditionally.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Krzysztof Kozlowski and committed by
Lee Jones
2056f024 c1d3ab31

-11
-8
drivers/mfd/sec-core.c
··· 298 298 if (!pd) 299 299 return ERR_PTR(-ENOMEM); 300 300 301 - /* 302 - * ToDo: the 'wakeup' member in the platform data is more of a linux 303 - * specfic information. Hence, there is no binding for that yet and 304 - * not parsed here. 305 - */ 306 - 307 301 pd->manual_poweroff = of_property_read_bool(dev->of_node, 308 302 "samsung,s2mps11-acokb-ground"); 309 303 pd->disable_wrstbi = of_property_read_bool(dev->of_node, ··· 331 337 } 332 338 333 339 sec_pmic->device_type = (unsigned long)of_device_get_match_data(sec_pmic->dev); 334 - sec_pmic->wakeup = pdata->wakeup; 335 340 sec_pmic->pdata = pdata; 336 341 337 342 switch (sec_pmic->device_type) { ··· 422 429 if (ret) 423 430 return ret; 424 431 425 - device_init_wakeup(sec_pmic->dev, sec_pmic->wakeup); 426 432 sec_pmic_configure(sec_pmic); 427 433 sec_pmic_dump_rev(sec_pmic); 428 434
-3
include/linux/mfd/samsung/core.h
··· 69 69 unsigned long device_type; 70 70 int irq; 71 71 struct regmap_irq_chip_data *irq_data; 72 - 73 - bool wakeup; 74 72 }; 75 73 76 74 int sec_irq_init(struct sec_pmic_dev *sec_pmic); ··· 80 82 struct sec_opmode_data *opmode; 81 83 int num_regulators; 82 84 83 - bool wakeup; 84 85 bool buck_voltage_lock; 85 86 86 87 int buck_gpios[3];