linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT 00/10] pinctrl: samsung: Remove ugly hack for sharing eint_wakeup_mask
@ 2018-07-19 16:00 Krzysztof Kozlowski
  2018-07-19 16:00 ` [RFT 01/10] pinctrl: samsung: Define suspend and resume callbacks for all banks and SoCs Krzysztof Kozlowski
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2018-07-19 16:00 UTC (permalink / raw)
  To: Tomasz Figa, Krzysztof Kozlowski, Sylwester Nawrocki,
	Linus Walleij, Rob Herring, Mark Rutland, Kukjin Kim,
	Russell King, Arnd Bergmann, Alim Akhtar, Pankaj Dubey,
	Marek Szyprowski, Paweł Chmiel, linux-arm-kernel,
	linux-samsung-soc, linux-gpio, devicetree, linux-kernel

Hi All,

Tests
=====
This is both request for comments and requests for tests. Only basic
tests were done, including suspend to RAM on Odroid U3 (Exynos4412)
with max7768 RTC wakeup. Please kindly test it with devices capable of
suspending and resuming. I am mostly thinking about S5Pv210-based (Aria),
Trats, Trats2 and TM2 (Exynos5433). Existing platforms should not be
broken however changing external interrupt wakeup mask was not done
on Exynos5433.


Description
===========
The Exynos/S5Pv210 machine suspend code needs to write the external
interrupt mask during suspend.  The mask is controlled by pin controller
driver: the exynos_wkup_irq_set_wake() in IRQ chip for these wakeup
interrupts.

Therefore pinctrl driver code exposed an exynos_get_eint_wake_mask()
function which was later used as an extern in machine code.

This is quite ugly way of combining driver and machine code,
not portable triggering Sparse and GCC warnings.


This might break suspend capability S5Pv210 on with older DTBs (thus
breaks DTB compatibility), however:
1. just "might" because in case of using older DTB, the wakeup mask
   will not be changed during suspend and default reset value (all
   interrupts non-masked) should work,
2. mainline support for S5Pv210 with DTB is limited and suspend
   to RAM already might be broken.


Dependencies
============
1. The first seven patches should be taken through one tree,
   preferably samsung-pinctrl,
2. The DTS patch (7/10) for S5Pv210 should go into next cycle,
3. The remaining patches (8-10) should go after all previous,
   so probably another release cycle.


Best regards,
Krzysztof


Krzysztof Kozlowski (10):
  pinctrl: samsung: Define suspend and resume callbacks for all banks
    and SoCs
  pinctrl: samsung: Document suspend and resume members
  pinctrl: samsung: Document hidden requirement about one external
    wakeup
  pinctrl: samsung: Add dedicated compatible for S5Pv210 wakeup
    interrupts
  ARM: exynos: Define EINT_WAKEUP_MASK registers for S5Pv210 and
    Exynos5433
  pinctrl: samsung: Write external interrupt mask
  ARM: dts: s5pv210: Switch to S5Pv210 specific pinctrl wakeup
    compatible
  ARM: s5pv210: Remove legacy setting of external wakeup interrupts
  ARM: exynos: Remove legacy setting of external wakeup interrupts
  pinctrl: samsung: Remove legacy API for handling external wakeup
    interrupts mask

 .../bindings/pinctrl/samsung-pinctrl.txt           | 11 ++-
 arch/arm/boot/dts/s5pv210.dtsi                     |  2 +-
 arch/arm/mach-exynos/common.h                      |  2 -
 arch/arm/mach-exynos/suspend.c                     | 16 +++--
 arch/arm/mach-s5pv210/common.h                     |  1 -
 arch/arm/mach-s5pv210/pm.c                         | 16 +++--
 drivers/pinctrl/samsung/pinctrl-exynos-arm.c       | 16 +++++
 drivers/pinctrl/samsung/pinctrl-exynos.c           | 78 +++++++++++++++++++---
 drivers/pinctrl/samsung/pinctrl-samsung.h          | 11 +++
 include/linux/soc/samsung/exynos-regs-pmu.h        |  8 ++-
 10 files changed, 136 insertions(+), 25 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-07-21  2:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19 16:00 [RFT 00/10] pinctrl: samsung: Remove ugly hack for sharing eint_wakeup_mask Krzysztof Kozlowski
2018-07-19 16:00 ` [RFT 01/10] pinctrl: samsung: Define suspend and resume callbacks for all banks and SoCs Krzysztof Kozlowski
2018-07-19 16:00 ` [RFT 02/10] pinctrl: samsung: Document suspend and resume members Krzysztof Kozlowski
2018-07-19 16:00 ` [RFT 03/10] pinctrl: samsung: Document hidden requirement about one external wakeup Krzysztof Kozlowski
2018-07-19 16:00 ` [RFT 04/10] pinctrl: samsung: Add dedicated compatible for S5Pv210 wakeup interrupts Krzysztof Kozlowski
2018-07-19 16:00 ` [RFT 05/10] ARM: exynos: Define EINT_WAKEUP_MASK registers for S5Pv210 and Exynos5433 Krzysztof Kozlowski
2018-07-19 16:00 ` [RFT 06/10] pinctrl: samsung: Write external interrupt mask Krzysztof Kozlowski
2018-07-19 16:00 ` [RFT 07/10] ARM: dts: s5pv210: Switch to S5Pv210 specific pinctrl wakeup compatible Krzysztof Kozlowski
2018-07-19 16:00 ` [RFT 08/10] ARM: s5pv210: Remove legacy setting of external wakeup interrupts Krzysztof Kozlowski
2018-07-19 16:00 ` [RFT 09/10] ARM: exynos: " Krzysztof Kozlowski
2018-07-19 16:00 ` [RFT 10/10] pinctrl: samsung: Remove legacy API for handling external wakeup interrupts mask Krzysztof Kozlowski
2018-07-21  2:37 ` [RFT 00/10] pinctrl: samsung: Remove ugly hack for sharing eint_wakeup_mask Tomasz Figa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).