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

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

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

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko 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 always passes GPIO offset to G

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

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

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

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko 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 --- drivers/gpio/gpio-omap.c | 10 +- 1 file c

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

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

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

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

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

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko 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 to do that at all, because - g

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

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko 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 always passes GPIO offset to G

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

2015-03-19 Thread grygorii.strashko
From: Grygorii Strashko 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 --- drivers/gpio/gpio-omap.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a

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

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko Now OMAP GPIO driver prepared for GPIO_INDEX() macro removing. Do It ;) Tested-by: Tony Lindgren Tested-by: Aaro Koskinen Acked-by: Santosh Shilimkar Acked-by: Javier Martinez Canillas Signed-off-by: Grygorii Strashko --- drivers/gpio/gpio-omap.c | 9 - 1 fi

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

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko The 'gpio' parameter isn't needed any more as it duplicates 'offset' parameter, so drop it. Tested-by: Tony Lindgren Tested-by: Aaro Koskinen Acked-by: Santosh Shilimkar Acked-by: Javier Martinez Canillas Signed-off-by: Grygorii Strashko --- drivers/gpio/gpio-omap.c

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

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko Now OMAP GPIO driver prepared for omap_irq_to_gpio() removing. Do it ;) Tested-by: Tony Lindgren Tested-by: Aaro Koskinen Acked-by: Santosh Shilimkar Acked-by: Javier Martinez Canillas Signed-off-by: Grygorii Strashko --- drivers/gpio/gpio-omap.c | 17 +-

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

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko 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 always passes GPIO offset to G

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

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko 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 Tested-by: Aaro Koskinen Acked-by: Santosh Shilimkar Acked-by

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

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko Now OMAP GPIO driver prepared for GPIO_BIT() macro removing. Do it ;) Tested-by: Tony Lindgren Tested-by: Aaro Koskinen Acked-by: Santosh Shilimkar Acked-by: Javier Martinez Canillas Signed-off-by: Grygorii Strashko --- drivers/gpio/gpio-omap.c | 1 - 1 file changed

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

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko 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 Tested-by: Aaro Koskinen Acked-by: Santosh Shilimkar Acked-by: Javier Martinez Canillas Signed-off-by: Grygorii S

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

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko 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 to do that at all, because - g

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

2015-03-23 Thread grygorii.strashko
From: Grygorii Strashko 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 always passes GPIO offset to G

[PATCH v4 0/3] i2c: davinci improvements and fixes

2015-04-06 Thread grygorii.strashko
From: Grygorii Strashko This series converts driver to use I2C bus recovery infrastructure and adds Davinci I2C bus recovery mechanizm based on using ICPFUNC registers. These patches are combination of two patches from Ben Gardiner [1] and Mike Looijmans [2] which i've reworked to use I2C bus rec

[PATCH v4 2/3] i2c: davinci: use bus recovery infrastructure

2015-04-06 Thread grygorii.strashko
From: Grygorii Strashko This patch converts Davinci I2C driver to use I2C bus recovery infrastructure, introduced by commit 5f9296ba21b3 ("i2c: Add bus recovery infrastructure"). The i2c_bus_recovery_info is configured for Davinci I2C adapter only in case scl_pin is provided in platform data. A

[PATCH v4 3/3] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2015-04-06 Thread grygorii.strashko
From: Grygorii Strashko Having a board where the I2C bus locks up occasionally made it clear that the bus recovery in the i2c-davinci driver will only work on some boards, because on regular boards, this will only toggle GPIO lines that aren't muxed to the actual pins. The I2C controller on SoCs

[PATCH v4 1/3] i2c: recovery: change input parameter to i2c_adapter for prepare/unprepare_recovery

2015-04-06 Thread grygorii.strashko
From: Grygorii Strashko This patch changes type of input parameter for .prepare/unprepare_recovery() callbacks from struct i2c_bus_recovery_info * to struct i2c_adapter *. This allows to simplify implementation of these callbacks and avoid type conversations from i2c_bus_recovery_info to i2c_adap

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

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko 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 Cc: Nishanth Menon Cc: Kevin Hilman Cc: Santosh Shilimkar Signed-off-by: Grygorii Strashko --- drivers/bus/omap_l

[PATCH 0/3] Introduce SET_NOIRQ_SYSTEM_SLEEP_PM_OPS and use it

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko 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 driver first commit 6248015d68

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

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko 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 Cc: Nishanth Menon Cc: Kevin Hilman Cc: Santosh Shilimkar Signed-off-by: Grygorii Strashko --- arch

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

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko 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. Vice versa happens for ->r

[PATCH] gpiolib: debugfs: display gpios requested as irq only

2015-05-15 Thread grygorii.strashko
From: Grygorii Strashko Now GPIOs, wich are requested as IRQ only, will not be displayed through GPIO debugfs. For example: # cat /proc/interrupts CPU0 CPU1 ... 209: 0 0 4805d000.gpio 11 Edge 0-0021 # cat /debug/gpio ... GPIOs 160-191, platform/4805d0

[PATCH] gpio: syscon: reduce message level when direction reg offset not in dt

2015-03-24 Thread grygorii.strashko
From: Grygorii Strashko Now GPIO syscon driver produces bunch of warnings during the boot of Kesytone 2 SoCs: gpio-syscon soc:keystone_dsp_gpio@02620240: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio@2620244: can't read the dir register offset! This message unintentiona

[PATCH v2] leds: fix hibernation on arm when gpio-led used with CPU led trigger

2015-02-05 Thread grygorii.strashko
From: Grygorii Strashko Setting a dev_pm_ops suspend/resume pair of callbacks but not a set of hibernation callbacks means those pm functions will not be called upon hibernation - that leads to system crash on ARM during freezing if gpio-led is used in combination with CPU led trigger. It may hap

[PATCH] leds: add hibernation callbacks

2015-02-02 Thread grygorii.strashko
From: Grygorii Strashko Setting a dev_pm_ops suspend/resume pair of callbacks but not a set of hibernation callbacks means those pm functions will not be called upon hibernation - that leads to system crash on ARM during freezing if gpio-led is used in combination with CPU led trigger. It may hap

[PATCH] hwmon: tmp102: add hibernation callbacks

2015-02-02 Thread grygorii.strashko
From: Grygorii Strashko 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. Signed-off-by: Grygorii Str

[PATCH v2] hwmon: tmp102: add hibernation callbacks

2015-02-03 Thread grygorii.strashko
From: Grygorii Strashko 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 and move mp102_suspend/tmp102