add support for omap wake-up interrupts via pinctrl-single
Subsystems (5)
Tony Lindgren
maintainercover add support for omap wake-up interrupts via pinctrl-single
Hi all,
Here's a respin of the pinctrl-single related patches to use chained irq as suggested by Linus W earlier. This series does not try to provide any generic automated solution yet, but works by doing a request_irq() for the wake-up pin, so it should be flexible enough for both manual control and automated solution.
This series removes the last nasty blocker for making omap3 to be device tree only without causing nasty PM regressions.
Assuming Linus W acks the drivers/pinctrl parts, I can provide those three patches in a separate immutable branch against v3.12-rc3 for Linus W to pull so I can merge them in too.
This series is based on my earlier series "[PATCH 0/4] Clean up legacy platform data handling for omaps for v3.13" as it has a dependency for the pdata quirks for passing the auxdata to the driver.
Regards,
Tony
---
Tony Lindgren (6):
ARM: dts: Fix pinctrl mask for omap3
ARM: OMAP2+: Add support for auxdata
pinctrl: single: Prepare for supporting SoC specific features
pinctrl: single: Add support for wake-up interrupts
pinctrl: single: Add support for auxdata
ARM: OMAP: Move DT wake-up event handling over to use pinctrl-single-omap
.../devicetree/bindings/pinctrl/pinctrl-single.txt | 11 + arch/arm/boot/dts/omap3.dtsi | 8 arch/arm/boot/dts/omap4.dtsi | 4 arch/arm/mach-omap2/board-generic.c | 5 arch/arm/mach-omap2/common.h | 3 arch/arm/mach-omap2/mux.c | 8 arch/arm/mach-omap2/mux.h | 4 arch/arm/mach-omap2/pdata-quirks.c | 29 +- arch/arm/mach-omap2/prm3xxx.h | 8 arch/arm/mach-omap2/prm44xx_54xx.h | 8 arch/arm/mach-omap2/prm_common.c | 11 + drivers/pinctrl/pinctrl-single.c | 386 ++++++++++++++++++++ include/dt-bindings/pinctrl/omap.h | 4 include/linux/platform_data/pinctrl-single.h | 12 + 14 files changed, 474 insertions(+), 27 deletions(-) create mode 100644 include/linux/platform_data/pinctrl-single.h
Signature · 1 line
Signature
Tony Lindgren
maintainerPATCH 1/6 ARM: dts: Fix pinctrl mask for omap3
The wake-up interrupt bit is available on omap3/4/5 processors unlike what we claim. Without fixing it we cannot use it on omap3 and the system configured for wake-up events will just hang on wake-up.
--- arch/arm/boot/dts/omap3.dtsi | 4 ++-- arch/arm/mach-omap2/mux.h | 4 +--- include/dt-bindings/pinctrl/omap.h | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-)
arch/arm/boot/dts/omap3.dtsi +2 -2
@@ -108,7 +108,7 @@ #address-cells = <1>; #size-cells = <0>; pinctrl-single,register-width = <16>; - pinctrl-single,function-mask = <0x7f1f>; + pinctrl-single,function-mask = <0xff1f>; }; omap3_pmx_wkup: pinmux at 0x48002a00 {
@@ -117,7 +117,7 @@ #address-cells = <1>; #size-cells = <0>; pinctrl-single,register-width = <16>; - pinctrl-single,function-mask = <0x7f1f>; + pinctrl-single,function-mask = <0xff1f>; }; gpio1: gpio at 48310000 {
arch/arm/mach-omap2/mux.h +1 -3
@@ -28,7 +28,7 @@#define OMAP_PULL_UP (1 << 4)#define OMAP_ALTELECTRICALSEL (1 << 5) -/* 34xx specific mux bit defines */ +/* omap3/4/5 specific mux bit defines */ #define OMAP_INPUT_EN (1 << 8)#define OMAP_OFF_EN (1 << 9)#define OMAP_OFFOUT_EN (1 << 10)
@@ -36,8 +36,6 @@#define OMAP_OFF_PULL_EN (1 << 12)#define OMAP_OFF_PULL_UP (1 << 13)#define OMAP_WAKEUP_EN (1 << 14) - -/* 44xx specific mux bit defines */ #define OMAP_WAKEUP_EVENT (1 << 15)/* Active pin states */
include/dt-bindings/pinctrl/omap.h +1 -3
@@ -23,7 +23,7 @@#define PULL_UP (1 << 4)#define ALTELECTRICALSEL (1 << 5) -/* 34xx specific mux bit defines */ +/* omap3/4/5 specific mux bit defines */ #define INPUT_EN (1 << 8)#define OFF_EN (1 << 9)#define OFFOUT_EN (1 << 10)
@@ -31,8 +31,6 @@#define OFF_PULL_EN (1 << 12)#define OFF_PULL_UP (1 << 13)#define WAKEUP_EN (1 << 14) - -/* 44xx specific mux bit defines */ #define WAKEUP_EVENT (1 << 15)/* Active pin states */
Tony Lindgren
maintainerPATCH 2/6 ARM: OMAP2+: Add support for auxdata
In reply to Tony LindgrenFor few things we're still going to be needing platform data for device tree based drivers. Let's set up auxdata handling and do it in pdata-quirks.c so we have all the legacy calls in one place.
--- arch/arm/mach-omap2/board-generic.c | 5 +---- arch/arm/mach-omap2/common.h | 3 ++- arch/arm/mach-omap2/pdata-quirks.c | 11 ++++++++++- 3 files changed, 13 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/board-generic.c +1 -4
@@ -35,10 +35,7 @@ static struct of_device_id omap_dt_match_table[] __initdata = {static void __init omap_generic_init (void ) { -omap_sdrc_init (NULL ,NULL ); - -of_platform_populate (NULL , omap_dt_match_table,NULL ,NULL ); -pdata_quirks_init (); +pdata_quirks_init (omap_dt_match_table); }#ifdef CONFIG_SOC_OMAP2420
arch/arm/mach-omap2/common.h +2 -1
@@ -288,7 +288,8 @@ static inline void omap4_cpu_resume(void)#endif -void pdata_quirks_init (void ); +void pdata_quirks_init (struct of_device_id *); +void omap_pcs_legacy_init (int irq,void (*rearm)(void ));struct omap_sdrc_params ; extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
arch/arm/mach-omap2/pdata-quirks.c +10 -1
@@ -11,6 +11,7 @@#include <linux/gpio.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/of_platform.h> #include <linux/wl12xx.h> #include "common.h"
@@ -99,6 +100,10 @@ static void __init omap5_uevm_legacy_init(void) }#endif +struct of_dev_auxdata omap_auxdata_lookup[]__initdata = { + {/* sentinel */ }, +}; + static struct pdata_init pdata_quirks[] __initdata = {#ifdef CONFIG_ARCH_OMAP3 { "nokia,omap3-n9", hsmmc2_internal_input_clk, },
@@ -114,10 +119,14 @@ static struct pdata_init pdata_quirks[] __initdata = { { /* sentinel */ }, }; -void __init pdata_quirks_init (void ) +void __init pdata_quirks_init (struct of_device_id *omap_dt_match_table) {struct pdata_init *quirks = pdata_quirks; +omap_sdrc_init (NULL ,NULL ); +of_platform_populate (NULL , omap_dt_match_table, + omap_auxdata_lookup,NULL ); +while (quirks->compatible) {if (of_machine_is_compatible (quirks->compatible)) {if (quirks->fn)
Tony Lindgren
maintainercover add support for omap wake-up interrupts via pinctrl-single
In reply to Tony LindgrenQuoted 17 lines · Tony Lindgren
Hi all,
Here's a respin of the pinctrl-single related patches to use chained irq as suggested by Linus W earlier. This series does not try to provide any generic automated solution yet, but works by doing a
request_irq()for the wake-up pin, so it should be flexible enough for both manual control and automated solution.This series removes the last nasty blocker for making omap3 to be device tree only without causing nasty PM regressions.
Assuming Linus W acks the
drivers/pinctrlparts, I can provide those three patches in a separate immutable branch against v3.12-rc3 for Linus W to pull so I can merge them in too.
Quoted 4 lines
This series is based on my earlier series "[PATCH 0/4] Clean up legacy platform data handling for omaps for v3.13" as it has a dependency for the pdata quirks for passing the auxdata to the driver.
Sorry I had some typos in my Cc addresses and this series did not get fully sent. Will resend it, sorry for the noise.
Quoted 38 lines
Regards,
Tony
---
Tony Lindgren (6):
ARM: dts: Fix pinctrl mask for omap3
ARM: OMAP2+: Add support for auxdata
pinctrl: single: Prepare for supporting SoC specific features
pinctrl: single: Add support for wake-up interrupts
pinctrl: single: Add support for auxdata
ARM: OMAP: Move DT wake-up event handling over to use pinctrl-single-omap.../devicetree/bindings/pinctrl/pinctrl-single.txt | 11 + arch/arm/boot/dts/omap3.dtsi | 8 arch/arm/boot/dts/omap4.dtsi | 4 arch/arm/mach-omap2/board-generic.c | 5 arch/arm/mach-omap2/common.h | 3 arch/arm/mach-omap2/mux.c | 8 arch/arm/mach-omap2/mux.h | 4 arch/arm/mach-omap2/pdata-quirks.c | 29 +- arch/arm/mach-omap2/prm3xxx.h | 8 arch/arm/mach-omap2/prm44xx_54xx.h | 8 arch/arm/mach-omap2/prm_common.c | 11 + drivers/pinctrl/pinctrl-single.c | 386 ++++++++++++++++++++ include/dt-bindings/pinctrl/omap.h | 4 include/linux/platform_data/pinctrl-single.h | 12 + 14 files changed, 474 insertions(+), 27 deletions(-) create mode 100644 include/linux/platform_data/pinctrl-single.hSignature · 5 lines
Signature -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html