[PATCH 2/3] bus: omap_l3_noc: add missed callbacks for suspend-to-disk

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Add missed callbacks needed for proper supporting of suspend-to-disk by using recently introduced macro SET_NOIRQ_SYSTEM_SLEEP_PM_OPS. Cc: Tony Lindgren t...@atomide.com Cc: Nishanth Menon n...@ti.com Cc: Kevin Hilman khil...@linaro.org Cc:

[PATCH 3/3] ARM: omap-device: use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Use recently introduced macro SET_NOIRQ_SYSTEM_SLEEP_PM_OPS to set up PM callbacks. This also fixes missed assignment of .poweroff_noirq() callback. Cc: Tony Lindgren t...@atomide.com Cc: Nishanth Menon n...@ti.com Cc: Kevin Hilman

[PATCH 1/3] PM / Sleep: Add macro to define common noirq system PM callbacks

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org The same approach is used as for the existing SET_SYSTEM_SLEEP_PM_OPS, but for noirq callbacks. New SET_NOIRQ_SYSTEM_SLEEP_PM_OPS, defined for CONFIG_PM_SLEEP, will point -suspend_noirq, -freeze_noirq and -poweroff_noirq to the same function.

[PATCH 0/3] Introduce SET_NOIRQ_SYSTEM_SLEEP_PM_OPS and use it

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org While working on suspend-to-disk functionality on TI dra7-evm (DRA7xx SoC) i've found that the most common problem I have to dial with is absence of corresponding PM callbacks in drivers and, in particular, noirq callbacks. So, I've fixed one

[PATCH] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore

2015-04-23 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org The PM_RESTORE_PREPARE is not handled now in mmc_pm_notify(), as result mmc_rescan() could be scheduled and executed at late hibernation restore stages when MMC device is suspended already - which, in turn, will lead to system crash on TI

[PATCH v2 0/8] gpio: omap: cleanup: get rid of system GPIO - GPIO offset converseations

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Now in TI OMAP GPIO driver there are a lot of places where System GPIO number calculated and then converted to GPIO offset. What is worse is that in many place such conversation performed twice or even three times. But actually, we don't need

[PATCH v2 1/8] gpio: omap: convert omap_gpio_is_input() to use gpio offset

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Convert omap_gpio_is_input() to use GPIO offset instead of mask and, in such way, make code simpler and remove few lines of code. Tested-by: Tony Lindgren t...@atomide.com Tested-by: Aaro Koskinen aaro.koski...@iki.fi Acked-by: Santosh

[PATCH v2 6/8] gpio: omap: get rid of GPIO_BIT() macro

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Now OMAP GPIO driver prepared for GPIO_BIT() macro removing. Do it ;) Tested-by: Tony Lindgren t...@atomide.com Tested-by: Aaro Koskinen aaro.koski...@iki.fi Acked-by: Santosh Shilimkar ssant...@kernel.org Acked-by: Javier Martinez Canillas

[PATCH v2 8/8] gpio: omap: get rid of GPIO_INDEX() macro

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Now OMAP GPIO driver prepared for GPIO_INDEX() macro removing. Do It ;) Tested-by: Tony Lindgren t...@atomide.com Tested-by: Aaro Koskinen aaro.koski...@iki.fi Acked-by: Santosh Shilimkar ssant...@kernel.org Acked-by: Javier Martinez Canillas

[PATCH v2 2/8] gpio: omap: simplify omap_set_gpio_dataout_x()

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Both functions omap_set_gpio_dataout_reg() and omap_set_gpio_dataout_mask() accept GPIO offset as 'gpio' input parameter, so rename it to 'offset' and drop usage of GPIO_BIT() macro. Tested-by: Tony Lindgren t...@atomide.com Tested-by: Aaro

[PATCH v2 4/8] gpio: omap: drop 'gpio' param from omap_gpio_init_irq()

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org The 'gpio' parameter isn't needed any more as it duplicates 'offset' parameter, so drop it. Tested-by: Tony Lindgren t...@atomide.com Tested-by: Aaro Koskinen aaro.koski...@iki.fi Acked-by: Santosh Shilimkar ssant...@kernel.org Acked-by:

[PATCH v2 3/8] gpio: omap: convert debounce functions switch to use gpio offset

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Convert debounce functions to use GPIO offset instead of system GPIO numbers. This allows to drop unneeded conversations between system GPIO - GPIO offset which are done in many places and many times. It is safe to do now because: - gpiolib

[PATCH v2 7/8] gpio: omap: get rid of omap_irq_to_gpio()

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Now OMAP GPIO driver prepared for omap_irq_to_gpio() removing. Do it ;) Tested-by: Tony Lindgren t...@atomide.com Tested-by: Aaro Koskinen aaro.koski...@iki.fi Acked-by: Santosh Shilimkar ssant...@kernel.org Acked-by: Javier Martinez Canillas

[PATCH v2 5/8] gpio: omap: convert gpio irq functions to use GPIO offset

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Convert GPIO IRQ functions to use GPIO offset instead of system GPIO numbers. This allows to drop unneeded conversations between system GPIO - GPIO offset which are done in many places and many times. It is safe to do now because: - gpiolib

[PATCH 6/8] gpio: omap: get rid of GPIO_BIT() macro

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Now OMAP GPIO driver prepared for GPIO_BIT() macro removing. Do it ;) Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org --- drivers/gpio/gpio-omap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH 0/8] gpio: omap: cleanup: get rid of system GPIO - GPIO offset converseations

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Now in TI OMAP GPIO driver there are a lot of places where System GPIO number calculated and then converted to GPIO offset. What is worse is that in many place such conversation performed twice or even three times. But actually, we don't need

[PATCH 3/8] gpio: omap: convert debounce functions switch to use gpio offset

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Convert debounce functions to use GPIO offset instead of system GPIO numbers. This allows to drop unneeded conversations between system GPIO - GPIO offset which are done in many places and many times. It is safe to do now because: - gpiolib

[PATCH 5/8] gpio: omap: convert gpio irq functions to use GPIO offset

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Convert GPIO IRQ functions to use GPIO offset instead of system GPIO numbers. This allows to drop unneeded conversations between system GPIO - GPIO offset which are done in many places and many times. It is safe to do now because: - gpiolib

[RFT OMAP1 PATCH 7/8] gpio: omap: get rid of omap_irq_to_gpio()

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Now OMAP GPIO driver prepared for omap_irq_to_gpio() removing. Do it ;) Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org --- drivers/gpio/gpio-omap.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff

[RFT OMAP1 PATCH 8/8] gpio: omap: get rid of GPIO_INDEX() macro

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Now OMAP GPIO driver prepared for GPIO_INDEX() macro removing. Do It ;) Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org --- drivers/gpio/gpio-omap.c | 9 - 1 file changed, 9 deletions(-) diff --git

[PATCH 2/8] gpio: omap: simplify omap_set_gpio_dataout_x()

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Both functions omap_set_gpio_dataout_reg() and omap_set_gpio_dataout_mask() accept GPIO offset as 'gpio' input parameter, so rename it to 'offset' and drop usage of GPIO_BIT() macro. Signed-off-by: Grygorii Strashko

[PATCH 1/8] gpio: omap: convert omap_gpio_is_input() to use gpio offset

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Convert omap_gpio_is_input() to use GPIO offset instead of mask and, in such way, make code simpler and remove few lines of code. Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org --- drivers/gpio/gpio-omap.c | 10 -- 1

[PATCH 4/8] gpio: omap: drop 'gpio' param from omap_gpio_init_irq()

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org The 'gpio' parameter isn't needed any more as it duplicates 'offset' parameter, so drop it. Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org --- drivers/gpio/gpio-omap.c | 12 +--- 1 file changed, 5 insertions(+), 7

[PATCH 1/2] gpio: omap: irq_shutdown: remove unnecessary call of gpiochip_unlock_as_irq

2015-03-06 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org GPIOLib core implemnts irqchip-irq_request/release_resources callbacks internally and these callbacks already contain clalls of gpiochip_lock/unlock_as_irq(). Hence, remove unnecessary call of gpiochip_unlock_as_irq() from

[RFC/RFT PATCH 2/2] gpio: omap: ensure that runtime pm will disable unused gpio banks

2015-03-06 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Now there are two points related to Runtime PM usage: 1) bank state doesn't need to be checked in places where Rintime PM is used, bacause Runtime PM maintains its own usage counter: if (!BANK_USED(bank))

[PATCH 1/2] net: davinci_mdio: add hibernation callbacks

2015-02-27 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Setting a dev_pm_ops suspend_late/resume_early pair but not a set of hibernation functions means those pm functions will not be called upon hibernation. Fix this by using SET_LATE_SYSTEM_SLEEP_PM_OPS, which appropriately assigns the suspend and

[PATCH 2/2] net: ti: cpsw: add hibernation callbacks

2015-02-27 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Setting a dev_pm_ops suspend/resume pair but not a set of hibernation functions means those pm functions will not be called upon hibernation. Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the suspend and hibernation handlers

[PATCH] mmc: omap_hsmmc: add hibernation support

2015-02-27 Thread grygorii.strashko
From: Russ Dill russ.d...@ti.com Setting a dev_pm_ops suspend/resume pair but not a set of hibernation functions means those pm functions will not be called upon hibernation. Fix this by using SET_SYSTEM_SLEEP_PM_OPS, which appropriately assigns the suspend and hibernation handlers and move

[PATCH] ARM: omap-device: add missed callback for suspend-to-disk

2015-02-25 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Add missed callback needed for supporting suspend-to-disk (hibernation) mode. Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org --- arch/arm/mach-omap2/omap_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH] omapdss: extend pm notifier to handle hibernation

2015-02-25 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Add handling of missed events in omap_dss_pm_notif which are needed to support hibernation (suspend to disk). Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org --- drivers/video/fbdev/omap2/dss/core.c | 4 1 file changed, 4

[PATCH] drm/omap: tiler: add hibernation callback

2015-02-25 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Setting a dev_pm_ops resume callback but not a set of hibernation handler means that pm function will not be called upon hibernation. Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the suspend and hibernation handlers and move

[PATCH] thermal: ti-soc-thermal: bandgap: Fix build warning if !CONFIG_PM_SLEEP

2015-02-06 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Fix following build warning if CONFIG_PM_SLEEP is not set: drivers/thermal/ti-soc-thermal/ti-bandgap.c:1478:12: warning: 'ti_bandgap_suspend' defined but not used [-Wunused-function] static int ti_bandgap_suspend(struct device *dev)

[PATCH] ARM: dra7xx: hwmod: drop .modulemode from pcie1/2 hwmods

2015-02-03 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org Now DRA7xx pcie1/2 hwmods define PRCM configuration as following: .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, .rstctrl_offs = DRA7XX_RM_L3INIT_RSTCTRL_OFFSET, .modulemode = MODULEMODE_SWCTRL, which is completely wrong because