Skip to content

pinctrl: samsung: Remove ugly hack for sharing eint_wakeup_mask

Krzysztof Kozlowski linux-arm-kernel linux-devicetree linux-gpio linux-samsung-soc lkml 2 versions – Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 6 repliesApplied
  2. v110 patches 1 replySuperseded

Changes in v2 from the cover letter

================
1. Add Tomasz's ack.
2. Reword description in patch 6/10.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/10pinctrl: samsung: Define suspend and resume callbacks for all banks and SoCsdrivers/pinctrl/samsung/pinctrl-exynos-arm.c+16 -01 reply
2/10pinctrl: samsung: Document suspend and resume membersdrivers/pinctrl/samsung/pinctrl-samsung.h+8 -00 replies
3/10pinctrl: samsung: Document hidden requirement about one external wakeupDocumentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt+7 -21 reply
4/10pinctrl: samsung: Add dedicated compatible for S5Pv210 wakeup interruptsDocumentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt drivers/pinctrl/samsung/pinctrl-exynos.c+20 -01 reply
5/10ARM: exynos: Define EINT_WAKEUP_MASK registers for S5Pv210 and Exynos5433arch/arm/mach-exynos/suspend.c include/linux/soc/samsung/exynos-regs-pmu.h+6 -20 replies
6/10pinctrl: samsung: Write external wakeup interrupt maskdrivers/pinctrl/samsung/pinctrl-exynos.c drivers/pinctrl/samsung/pinctrl-samsung.h include/linux/soc/samsung/exynos-regs-pmu.h+54 -11 reply
7/10ARM: dts: s5pv210: Switch to S5Pv210 specific pinctrl wakeup compatiblearch/arm/boot/dts/s5pv210.dtsi+1 -10 replies
8/10ARM: s5pv210: Remove legacy setting of external wakeup interruptsarch/arm/mach-s5pv210/common.h arch/arm/mach-s5pv210/pm.c+12 -50 replies
9/10ARM: exynos: Remove legacy setting of external wakeup interruptsarch/arm/mach-exynos/common.h arch/arm/mach-exynos/suspend.c+12 -60 replies
10/10pinctrl: samsung: Remove legacy API for handling external wakeup interrupts maskdrivers/pinctrl/samsung/pinctrl-exynos.c+2 -100 replies

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchTomasz FigaMarek SzyprowskiRob Herring
SeriesT-b
1/10A-b
2/10A-b
3/10A-b R-b
4/10A-b A-b
5/10A-b
6/10A-b
7/10A-b
8/10A-b
9/10A-b
10/10A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [RFT v2 00/10] pinctrl: samsung: Remove ugly hack for sharing eint_wakeup_mask

Hi All,

Changes since v1
================
1. Add Tomasz's ack.
2. Reword description in patch 6/10.

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 wakeup 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(-)
Signature · 1 line
2.14.1