[PATCH 0/9] Final batch of clean-ups bound for v3.6

STALE5173d

52 messages, 7 authors, 2012-07-16 · open the first message on its own page

[PATCH 0/9] Final batch of clean-ups bound for v3.6

From: Lee Jones <hidden>
Date: 2012-07-05 13:06:37

In this patch-set we provide the last batch of clean-ups related 
to the Device Tree enablement of Snowball and other DB8500 based
chipsets. Most of these clean-ups are nice and  easy 
simplifications of code, or recommendations from particular 
Mainline Maintainers.

 .../devicetree/bindings/gpio/gpio-nmk.txt          |    2 +-
 arch/arm/boot/dts/db8500.dtsi                      |   18 +-
 arch/arm/mach-ux500/board-mop500-regulators.c      |  176 --------------------
 arch/arm/mach-ux500/board-mop500-regulators.h      |    2 -
 arch/arm/mach-ux500/board-mop500.c                 |   20 +--
 arch/arm/mach-ux500/cpu-db8500.c                   |   13 +-
 drivers/input/misc/ab8500-ponkey.c                 |    2 +
 drivers/pinctrl/pinctrl-nomadik.c                  |    4 +-
 include/linux/mfd/abx500/ab8500.h                  |    3 -
 9 files changed, 18 insertions(+), 222 deletions(-)

[PATCH 1/9] pinctrl: pinctrl-nomadik: Fix possible memory leak

From: Lee Jones <hidden>
Date: 2012-07-05 13:06:41

If the Nomadik Pin Control driver is continuously bound and unbound
from the same device a number of times the kzalloc() will leak
memory. Replacing it with devm_kzalloc() will ensure memory is
freed automatically in the event of failure and unbinding.

Signed-off-by: Lee Jones <redacted>
---
 drivers/pinctrl/pinctrl-nomadik.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index 3e7e47d..af0389f 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -1194,7 +1194,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
 	}
 
 	if (np) {
-		pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
+		pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), GFP_KERNEL);
 		if (!pdata)
 			return -ENOMEM;
 
-- 
1.7.9.5

[PATCH 4/9] ARM: ux500: Ensure vendor specific properties have the vendor's identifier

From: Lee Jones <hidden>
Date: 2012-07-05 13:06:45

Any non-standard property should contain the vendor's identifier which
should be perpended onto the property name followed by a comma. This
aids in name-space collision prevention.

Signed-off-by: Lee Jones <redacted>
---
 arch/arm/boot/dts/db8500.dtsi |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi
index d89b88d..7279165 100644
--- a/arch/arm/boot/dts/db8500.dtsi
+++ b/arch/arm/boot/dts/db8500.dtsi
@@ -60,7 +60,7 @@
 			interrupts = <0 119 0x4>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
-			supports-sleepmode;
+			st,supports-sleepmode;
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-bank = <0>;
@@ -73,7 +73,7 @@
 			interrupts = <0 120 0x4>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
-			supports-sleepmode;
+			st,supports-sleepmode;
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-bank = <1>;
@@ -86,7 +86,7 @@
 			interrupts = <0 121 0x4>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
-			supports-sleepmode;
+			st,supports-sleepmode;
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-bank = <2>;
@@ -99,7 +99,7 @@
 			interrupts = <0 122 0x4>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
-			supports-sleepmode;
+			st,supports-sleepmode;
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-bank = <3>;
@@ -112,7 +112,7 @@
 			interrupts = <0 123 0x4>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
-			supports-sleepmode;
+			st,supports-sleepmode;
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-bank = <4>;
@@ -125,7 +125,7 @@
 			interrupts = <0 124 0x4>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
-			supports-sleepmode;
+			st,supports-sleepmode;
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-bank = <5>;
@@ -138,7 +138,7 @@
 			interrupts = <0 125 0x4>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
-			supports-sleepmode;
+			st,supports-sleepmode;
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-bank = <6>;
@@ -151,7 +151,7 @@
 			interrupts = <0 126 0x4>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
-			supports-sleepmode;
+			st,supports-sleepmode;
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-bank = <7>;
@@ -164,7 +164,7 @@
 			interrupts = <0 127 0x4>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
-			supports-sleepmode;
+			st,supports-sleepmode;
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-bank = <8>;
-- 
1.7.9.5

[PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-05 13:06:49

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
---
 drivers/input/misc/ab8500-ponkey.c |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..ae4b683 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -82,6 +82,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 
 	input_set_capability(input, EV_KEY, KEY_POWER);
 
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbf);
 	error = request_any_context_irq(ponkey->irq_dbf, ab8500_ponkey_handler,
 					0, "ab8500-ponkey-dbf", ponkey);
 	if (error < 0) {
@@ -90,6 +91,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 		goto err_free_mem;
 	}
 
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbr);
 	error = request_any_context_irq(ponkey->irq_dbr, ab8500_ponkey_handler,
 					0, "ab8500-ponkey-dbr", ponkey);
 	if (error < 0) {
-- 
1.7.9.5

[PATCH 9/9] ARM: ux500: Over-ride the DT device naming scheme for pinctrl

From: Lee Jones <hidden>
Date: 2012-07-05 13:06:54

When pin control mapping tables are written the registered device
name is supplied for use in name-based searches within the pinctrl
driver. In the case of the DB8500 the string "pinctrl-db8500" is
used. However, when we register the driver with Device Tree, its
naming convention uses something that looks more like "pinctrl.2".

To work around the device naming inconsistencies between devices
registered via platform code and the ones registered by Device
Tree, we use AUXDATA to over-ride the Device Tree naming scheme.

Signed-off-by: Lee Jones <redacted>
---
 arch/arm/mach-ux500/board-mop500.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index c12cd97..eb9198e 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -769,6 +769,7 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL),
 	OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
 	OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
+	OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL),
 	{},
 };
 
-- 
1.7.9.5

[PATCH 8/9] ARM: ux500: Clean-up temporary Device Tree enablement helpers

From: Lee Jones <hidden>
Date: 2012-07-05 13:07:47

Here we remove some of the extra overhead we introduced to make
DT:ing the Snowball platform easier. Unfortunately we can't
remove everything. We are forced to leave cpufreq and DMA behind
until they have been successfully Device Tree enabled.

Signed-off-by: Lee Jones <redacted>
---
 arch/arm/mach-ux500/cpu-db8500.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index c8dd94f..d7a28c0 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -137,10 +137,6 @@ static struct platform_device *platform_devs[] __initdata = {
 	&db8500_prcmu_device,
 };
 
-static struct platform_device *of_platform_devs[] __initdata = {
-	&u8500_dma40_device,
-};
-
 static resource_size_t __initdata db8500_gpio_base[] = {
 	U8500_GPIOBANK0_BASE,
 	U8500_GPIOBANK1_BASE,
@@ -232,7 +228,6 @@ struct device * __init u8500_init_devices(void)
 struct device * __init u8500_of_init_devices(void)
 {
 	struct device *parent;
-	int i;
 
 	parent = db8500_soc_device_init();
 
@@ -241,8 +236,7 @@ struct device * __init u8500_of_init_devices(void)
 	platform_device_register_data(parent,
 		"cpufreq-u8500", -1, NULL, 0);
 
-	for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++)
-		of_platform_devs[i]->dev.parent = parent;
+	u8500_dma40_device.dev.parent = parent;
 
 	/*
 	 * Devices to be DT:ed:
@@ -250,7 +244,7 @@ struct device * __init u8500_of_init_devices(void)
 	 *   db8500_pmu_device   = done
 	 *   db8500_prcmu_device = done
 	 */
-	platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs));
+	platform_device_register(&u8500_dma40_device);
 
 	return parent;
 }
-- 
1.7.9.5

[PATCH 6/9] ARM: ux500: Remove PMU platform registration when booting with DT

From: Lee Jones <hidden>
Date: 2012-07-05 13:07:49

PMU registration is successfully completed by Device Tree now, so
there is no longer a requirement to register it from platform code.
This patch removes platform registration during a DT boot.

Signed-off-by: Lee Jones <redacted>
---
 arch/arm/mach-ux500/cpu-db8500.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index a12bd9e..c8dd94f 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -139,7 +139,6 @@ static struct platform_device *platform_devs[] __initdata = {
 
 static struct platform_device *of_platform_devs[] __initdata = {
 	&u8500_dma40_device,
-	&db8500_pmu_device,
 };
 
 static resource_size_t __initdata db8500_gpio_base[] = {
@@ -248,7 +247,7 @@ struct device * __init u8500_of_init_devices(void)
 	/*
 	 * Devices to be DT:ed:
 	 *   u8500_dma40_device  = todo
-	 *   db8500_pmu_device   = todo
+	 *   db8500_pmu_device   = done
 	 *   db8500_prcmu_device = done
 	 */
 	platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs));
-- 
1.7.9.5

[PATCH 5/9] ARM: ux500: Remove temporary snowball_of_platform_devs enablement structure

From: Lee Jones <hidden>
Date: 2012-07-05 13:08:22

All Device Tree enablement for Snowball's Platform  devices; LEDs, Keys,
Ethernet and all associated AB8500 Multi-Functional Devices are now
complete, so here we remove any trace of adding those devices when Device
Tree is enabled.

Signed-off-by: Lee Jones <redacted>
---
 arch/arm/mach-ux500/board-mop500.c |   17 -----------------
 1 file changed, 17 deletions(-)
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 3b76115..c12cd97 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -745,10 +745,6 @@ MACHINE_END
 
 #ifdef CONFIG_MACH_UX500_DT
 
-static struct platform_device *snowball_of_platform_devs[] __initdata = {
-	&snowball_key_dev,
-};
-
 struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
 	/* Requires DMA and call-back bindings. */
 	OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
@@ -802,8 +798,6 @@ static void __init u8500_init_machine(void)
 
 	for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
 		mop500_platform_devs[i]->dev.parent = parent;
-	for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
-		snowball_platform_devs[i]->dev.parent = parent;
 
 	/* automatically probe child nodes of db8500 device */
 	of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent);
@@ -822,17 +816,6 @@ static void __init u8500_init_machine(void)
 
 		mop500_uib_init();
 
-	} else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
-		/*
-		 * Devices to be DT:ed:
-		 *   snowball_led_dev   = done
-		 *   snowball_key_dev   = todo
-		 *   snowball_sbnet_dev = done
-		 *   ab8500_device      = done
-		 */
-		platform_add_devices(snowball_of_platform_devs,
-				ARRAY_SIZE(snowball_of_platform_devs));
-
 	} else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
 		/*
 		 * The HREFv60 board removed a GPIO expander and routed
-- 
1.7.9.5

[PATCH 3/9] ARM: ux500: Remove AB8500 regulator register initialisation information

From: Lee Jones <hidden>
Date: 2012-07-05 13:08:56

There is no need to initialise the AB8500's regulator registers, as
most of this work is already carried out by framework features, so
we can safely remove all traces from platform code.

Signed-off-by: Lee Jones <redacted>
---
 arch/arm/mach-ux500/board-mop500-regulators.c |  176 -------------------------
 arch/arm/mach-ux500/board-mop500-regulators.h |    2 -
 arch/arm/mach-ux500/board-mop500.c            |    2 -
 include/linux/mfd/abx500/ab8500.h             |    3 -
 4 files changed, 183 deletions(-)
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index 52426a4..ff43788 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -106,182 +106,6 @@ static struct regulator_consumer_supply ab8500_vana_consumers[] = {
 	REGULATOR_SUPPLY("vsmps2", "mcde.0"),
 };
 
-/* ab8500 regulator register initialization */
-struct ab8500_regulator_reg_init
-ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
-	/*
-	 * VanaRequestCtrl          = HP/LP depending on VxRequest
-	 * VextSupply1RequestCtrl   = HP/LP depending on VxRequest
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0x00),
-	/*
-	 * VextSupply2RequestCtrl   = HP/LP depending on VxRequest
-	 * VextSupply3RequestCtrl   = HP/LP depending on VxRequest
-	 * Vaux1RequestCtrl         = HP/LP depending on VxRequest
-	 * Vaux2RequestCtrl         = HP/LP depending on VxRequest
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0x00),
-	/*
-	 * Vaux3RequestCtrl         = HP/LP depending on VxRequest
-	 * SwHPReq                  = Control through SWValid disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x00),
-	/*
-	 * VanaSysClkReq1HPValid    = disabled
-	 * Vaux1SysClkReq1HPValid   = disabled
-	 * Vaux2SysClkReq1HPValid   = disabled
-	 * Vaux3SysClkReq1HPValid   = disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0x00),
-	/*
-	 * VextSupply1SysClkReq1HPValid = disabled
-	 * VextSupply2SysClkReq1HPValid = disabled
-	 * VextSupply3SysClkReq1HPValid = SysClkReq1 controlled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x40),
-	/*
-	 * VanaHwHPReq1Valid        = disabled
-	 * Vaux1HwHPreq1Valid       = disabled
-	 * Vaux2HwHPReq1Valid       = disabled
-	 * Vaux3HwHPReqValid        = disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0x00),
-	/*
-	 * VextSupply1HwHPReq1Valid = disabled
-	 * VextSupply2HwHPReq1Valid = disabled
-	 * VextSupply3HwHPReq1Valid = disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x00),
-	/*
-	 * VanaHwHPReq2Valid        = disabled
-	 * Vaux1HwHPReq2Valid       = disabled
-	 * Vaux2HwHPReq2Valid       = disabled
-	 * Vaux3HwHPReq2Valid       = disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0x00),
-	/*
-	 * VextSupply1HwHPReq2Valid = disabled
-	 * VextSupply2HwHPReq2Valid = disabled
-	 * VextSupply3HwHPReq2Valid = HWReq2 controlled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x04),
-	/*
-	 * VanaSwHPReqValid         = disabled
-	 * Vaux1SwHPReqValid        = disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0x00),
-	/*
-	 * Vaux2SwHPReqValid        = disabled
-	 * Vaux3SwHPReqValid        = disabled
-	 * VextSupply1SwHPReqValid  = disabled
-	 * VextSupply2SwHPReqValid  = disabled
-	 * VextSupply3SwHPReqValid  = disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x00),
-	/*
-	 * SysClkReq2Valid1         = SysClkReq2 controlled
-	 * SysClkReq3Valid1         = disabled
-	 * SysClkReq4Valid1         = SysClkReq4 controlled
-	 * SysClkReq5Valid1         = disabled
-	 * SysClkReq6Valid1         = SysClkReq6 controlled
-	 * SysClkReq7Valid1         = disabled
-	 * SysClkReq8Valid1         = disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0x2a),
-	/*
-	 * SysClkReq2Valid2         = disabled
-	 * SysClkReq3Valid2         = disabled
-	 * SysClkReq4Valid2         = disabled
-	 * SysClkReq5Valid2         = disabled
-	 * SysClkReq6Valid2         = SysClkReq6 controlled
-	 * SysClkReq7Valid2         = disabled
-	 * SysClkReq8Valid2         = disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0x20),
-	/*
-	 * VTVoutEna                = disabled
-	 * Vintcore12Ena            = disabled
-	 * Vintcore12Sel            = 1.25 V
-	 * Vintcore12LP             = inactive (HP)
-	 * VTVoutLP                 = inactive (HP)
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0x10),
-	/*
-	 * VaudioEna                = disabled
-	 * VdmicEna                 = disabled
-	 * Vamic1Ena                = disabled
-	 * Vamic2Ena                = disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x00),
-	/*
-	 * Vamic1_dzout             = high-Z when Vamic1 is disabled
-	 * Vamic2_dzout             = high-Z when Vamic2 is disabled
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x00),
-	/*
-	 * VPll                     = Hw controlled
-	 * VanaRegu                 = force off
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x02),
-	/*
-	 * VrefDDREna               = disabled
-	 * VrefDDRSleepMode         = inactive (no pulldown)
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x00),
-	/*
-	 * VextSupply1Regu          = HW control
-	 * VextSupply2Regu          = HW control
-	 * VextSupply3Regu          = HW control
-	 * ExtSupply2Bypass         = ExtSupply12LPn ball is 0 when Ena is 0
-	 * ExtSupply3Bypass         = ExtSupply3LPn ball is 0 when Ena is 0
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0x2a),
-	/*
-	 * Vaux1Regu                = force HP
-	 * Vaux2Regu                = force off
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x01),
-	/*
-	 * Vaux3regu                = force off
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x00),
-	/*
-	 * Vsmps1                   = 1.15V
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x24),
-	/*
-	 * Vaux1Sel                 = 2.5 V
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x08),
-	/*
-	 * Vaux2Sel                 = 2.9 V
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0d),
-	/*
-	 * Vaux3Sel                 = 2.91 V
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07),
-	/*
-	 * VextSupply12LP           = disabled (no LP)
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x00),
-	/*
-	 * Vaux1Disch               = short discharge time
-	 * Vaux2Disch               = short discharge time
-	 * Vaux3Disch               = short discharge time
-	 * Vintcore12Disch          = short discharge time
-	 * VTVoutDisch              = short discharge time
-	 * VaudioDisch              = short discharge time
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0x00),
-	/*
-	 * VanaDisch                = short discharge time
-	 * VdmicPullDownEna         = pulldown disabled when Vdmic is disabled
-	 * VdmicDisch               = short discharge time
-	 */
-	INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x00),
-};
-
 /* AB8500 regulators */
 struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
 	/* supplies to the display/camera */
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h
index 9499215..a795cec 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.h
+++ b/arch/arm/mach-ux500/board-mop500-regulators.h
@@ -14,8 +14,6 @@
 #include <linux/regulator/machine.h>
 #include <linux/regulator/ab8500.h>
 
-extern struct ab8500_regulator_reg_init
-ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS];
 extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS];
 extern struct regulator_init_data tps61052_regulator;
 
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index ac762bd..3b76115 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -203,8 +203,6 @@ static struct platform_device snowball_sbnet_dev = {
 
 static struct ab8500_platform_data ab8500_platdata = {
 	.irq_base	= MOP500_AB8500_IRQ_BASE,
-	.regulator_reg_init = ab8500_regulator_reg_init,
-	.num_regulator_reg_init	= ARRAY_SIZE(ab8500_regulator_reg_init),
 	.regulator	= ab8500_regulators,
 	.num_regulator	= ARRAY_SIZE(ab8500_regulators),
 	.gpio		= &ab8500_gpio_pdata,
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 3764cb6..259adca 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -266,7 +266,6 @@ struct ab8500 {
 	const int *irq_reg_offset;
 };
 
-struct regulator_reg_init;
 struct regulator_init_data;
 struct ab8500_gpio_platform_data;
 struct ab8500_codec_platform_data;
@@ -283,8 +282,6 @@ struct ab8500_codec_platform_data;
 struct ab8500_platform_data {
 	int irq_base;
 	void (*init) (struct ab8500 *);
-	int num_regulator_reg_init;
-	struct ab8500_regulator_reg_init *regulator_reg_init;
 	int num_regulator;
 	struct regulator_init_data *regulator;
 	struct ab8500_gpio_platform_data *gpio;
-- 
1.7.9.5

[PATCH 2/9] pinctrl: pinctrl-nomadik: Append sleepmode property with vendor specific prefixes

From: Lee Jones <hidden>
Date: 2012-07-05 13:10:00

Any non-standard property should contain the vendor's identifier which
should be perpended onto the property name followed by a comma. This
aids in name-space collision prevention. This patch ensures the
sleepmode property adheres to the rules.

Signed-off-by: Lee Jones <redacted>
---
 .../devicetree/bindings/gpio/gpio-nmk.txt          |    2 +-
 drivers/pinctrl/pinctrl-nomadik.c                  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/gpio/gpio-nmk.txt b/Documentation/devicetree/bindings/gpio/gpio-nmk.txt
index ee87467..8315ac7 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-nmk.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-nmk.txt
@@ -26,6 +26,6 @@ Example:
                         #gpio-cells = <2>;
                         gpio-controller;
                         interrupt-controller;
-                        supports-sleepmode;
+                        st,supports-sleepmode;
                         gpio-bank = <1>;
                 };
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index af0389f..520aa23 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -1198,7 +1198,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
 		if (!pdata)
 			return -ENOMEM;
 
-		if (of_get_property(np, "supports-sleepmode", NULL))
+		if (of_get_property(np, "st,supports-sleepmode", NULL))
 			pdata->supports_sleepmode = true;
 
 		if (of_property_read_u32(np, "gpio-bank", &dev->id)) {
-- 
1.7.9.5

Re: [PATCH 3/9] ARM: ux500: Remove AB8500 regulator register initialisation information

From: Arnd Bergmann <arnd@arndb.de>
Date: 2012-07-05 13:51:24

On Thursday 05 July 2012, Lee Jones wrote:
There is no need to initialise the AB8500's regulator registers, as
most of this work is already carried out by framework features, so
we can safely remove all traces from platform code.

Signed-off-by: Lee Jones <redacted>
It makes sense, but this patch is basically a revert of dfa3a824d
"mach-ux500: provide ab8500 init vector" from Bengt Jonsson, so
it would be nice to get an Ack from him.

	Arnd

Re: [PATCH 3/9] ARM: ux500: Remove AB8500 regulator register initialisation information

From: Lee Jones <hidden>
Date: 2012-07-05 13:55:40

On 05/07/12 14:51, Arnd Bergmann wrote:
On Thursday 05 July 2012, Lee Jones wrote:
quoted
There is no need to initialise the AB8500's regulator registers, as
most of this work is already carried out by framework features, so
we can safely remove all traces from platform code.

Signed-off-by: Lee Jones <redacted>
It makes sense, but this patch is basically a revert of dfa3a824d
"mach-ux500: provide ab8500 init vector" from Bengt Jonsson, so
it would be nice to get an Ack from him.
Good idea.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Re: [PATCH 3/9] ARM: ux500: Remove AB8500 regulator register initialisation information

From: Linus Walleij <hidden>
Date: 2012-07-05 21:22:03

On 07/05/2012 03:51 PM, Arnd Bergmann wrote:
On Thursday 05 July 2012, Lee Jones wrote:
quoted
There is no need to initialise the AB8500's regulator registers, as
most of this work is already carried out by framework features, so
we can safely remove all traces from platform code.

Signed-off-by: Lee Jones<redacted>
It makes sense, but this patch is basically a revert of dfa3a824d
"mach-ux500: provide ab8500 init vector" from Bengt Jonsson, so
it would be nice to get an Ack from him.
Bengt is on leave but I CC some other guys...

Yours,
Linus Walleij

Re: [PATCH 3/9] ARM: ux500: Remove AB8500 regulator register initialisation information

From: Linus Walleij <hidden>
Date: 2012-07-06 06:55:52

On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones [off-list ref] wrote:
There is no need to initialise the AB8500's regulator registers, as
most of this work is already carried out by framework features, so
we can safely remove all traces from platform code.

Signed-off-by: Lee Jones <redacted>
NACK, sorry.

These registers are used to set up sleep states for the regulators,
e.g that some regulators will turn off when the system go to sleep.

If you delete this code it's no longer possible to make the system
powerefficient, power consumption increases so it causes a
regression.

The proper thing to do is to take the AB8500 datasheet, go in and
read what these registers actually do, and provide the same
features through the framework, if just poking the registers
is deemed non-elegant (I see the point in that).

This is the AB8500 datasheet:
http://www.stericsson.com/developers/CD00291561_UM1031_AB8500_user_manual-rev5_CTDS_public.pdf

So please refactor this, don't just delete, that's destroying a lot
of useful stuff.

Yours,
Linus Walleij

Re: [PATCH 1/9] pinctrl: pinctrl-nomadik: Fix possible memory leak

From: Linus Walleij <hidden>
Date: 2012-07-06 07:03:40

On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones [off-list ref] wrote:
If the Nomadik Pin Control driver is continuously bound and unbound
from the same device a number of times the kzalloc() will leak
memory. Replacing it with devm_kzalloc() will ensure memory is
freed automatically in the event of failure and unbinding.

Signed-off-by: Lee Jones <redacted>
A patch like this but more all-encompassing was already sent out
by me some days ago:
http://marc.info/?l=linux-kernel&m=134139303405730&w=2

Please test that one and see if it solves your problem.

Yours,
Linus Walleij

Re: [PATCH 2/9] pinctrl: pinctrl-nomadik: Append sleepmode property with vendor specific prefixes

From: Linus Walleij <hidden>
Date: 2012-07-06 07:04:46

On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones [off-list ref] wrote:
Any non-standard property should contain the vendor's identifier which
should be perpended onto the property name followed by a comma. This
aids in name-space collision prevention. This patch ensures the
sleepmode property adheres to the rules.

Signed-off-by: Lee Jones <redacted>
OK, Acked-by: Linus Walleij [off-list ref]

Yours,
Linus Walleij

Re: [PATCH 4/9] ARM: ux500: Ensure vendor specific properties have the vendor's identifier

From: Linus Walleij <hidden>
Date: 2012-07-06 07:10:12

On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones [off-list ref] wrote:
Any non-standard property should contain the vendor's identifier which
should be perpended onto the property name followed by a comma. This
aids in name-space collision prevention.

Signed-off-by: Lee Jones <redacted>
Acked-by: Linus Walleij <redacted>

Yours,
Linus Walleij

Re: [PATCH 5/9] ARM: ux500: Remove temporary snowball_of_platform_devs enablement structure

From: Linus Walleij <hidden>
Date: 2012-07-06 07:11:01

On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones [off-list ref] wrote:
All Device Tree enablement for Snowball's Platform  devices; LEDs, Keys,
Ethernet and all associated AB8500 Multi-Functional Devices are now
complete, so here we remove any trace of adding those devices when Device
Tree is enabled.

Signed-off-by: Lee Jones <redacted>
Sweet!
Acked-by: Linus Walleij <redacted>

Yours,
Linus Walleij

Re: [PATCH 6/9] ARM: ux500: Remove PMU platform registration when booting with DT

From: Linus Walleij <hidden>
Date: 2012-07-06 07:11:35

On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones [off-list ref] wrote:
PMU registration is successfully completed by Device Tree now, so
there is no longer a requirement to register it from platform code.
This patch removes platform registration during a DT boot.

Signed-off-by: Lee Jones <redacted>
Acked-by: Linus Walleij <redacted>

Yours,
Linus Walleij

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Linus Walleij <hidden>
Date: 2012-07-06 07:18:12

On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones [off-list ref] wrote:
Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
Acked-by: Linus Walleij <redacted>

Lee I think the in-kernel charging drivers in drivers/power/ab8500_* are
also using the IRQs, have you checked that these also do the right
thing? (I realize they may be hard to test, but atleast make an effort).

Please coordinate with Rajanikanth who is working on DT:ing
these drivers.

Yours,
Linus Walleij

Re: [PATCH 3/9] ARM: ux500: Remove AB8500 regulator register initialisation information

From: Lee Jones <hidden>
Date: 2012-07-06 07:45:43

On 06/07/12 07:55, Linus Walleij wrote:
On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones [off-list ref] wrote:
quoted
There is no need to initialise the AB8500's regulator registers, as
most of this work is already carried out by framework features, so
we can safely remove all traces from platform code.

Signed-off-by: Lee Jones <redacted>
NACK, sorry.

These registers are used to set up sleep states for the regulators,
e.g that some regulators will turn off when the system go to sleep.

If you delete this code it's no longer possible to make the system
powerefficient, power consumption increases so it causes a
regression.

The proper thing to do is to take the AB8500 datasheet, go in and
read what these registers actually do, and provide the same
features through the framework, if just poking the registers
is deemed non-elegant (I see the point in that).

This is the AB8500 datasheet:
http://www.stericsson.com/developers/CD00291561_UM1031_AB8500_user_manual-rev5_CTDS_public.pdf

So please refactor this, don't just delete, that's destroying a lot
of useful stuff.
Sounds reasonable. I won't be doing the refactoring, as I'm moving onto 
something else from Monday. Unless of course I find myself with lots of 
spare time *chuckles*.

Mark,

Please take a note of this and also do not apply the regulator driver 
counterpart of the patch-set (it was one of the ones you Reviewed-by in 
the previous batch).

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Re: [PATCH 8/9] ARM: ux500: Clean-up temporary Device Tree enablement helpers

From: Linus Walleij <hidden>
Date: 2012-07-06 07:48:12

On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones [off-list ref] wrote:
Here we remove some of the extra overhead we introduced to make
DT:ing the Snowball platform easier. Unfortunately we can't
remove everything. We are forced to leave cpufreq and DMA behind
until they have been successfully Device Tree enabled.

Signed-off-by: Lee Jones <redacted>
The patch is straight-forward but the commit message is confusing.

This just simplifies the code, the last two sentences about leaving
cpufreq and DMA behind you can put in your weekly report or
something :-)

Yours,
Linus Walleij

[PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-06 07:52:49

Sorry Dmitry, looks like I missed you off of the CC list on this one.

Here it is again:

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
---
 drivers/input/misc/ab8500-ponkey.c |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..ae4b683 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -82,6 +82,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
  	input_set_capability(input, EV_KEY, KEY_POWER);
 +	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbf);
 	error = request_any_context_irq(ponkey->irq_dbf, ab8500_ponkey_handler,
 					0, "ab8500-ponkey-dbf", ponkey);
 	if (error < 0) {
@@ -90,6 +91,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 		goto err_free_mem;
 	}
 +	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbr);
 	error = request_any_context_irq(ponkey->irq_dbr, ab8500_ponkey_handler,
 					0, "ab8500-ponkey-dbr", ponkey);
 	if (error < 0) {
-- 
1.7.9.5

Re: [PATCH 9/9] ARM: ux500: Over-ride the DT device naming scheme for pinctrl

From: Linus Walleij <hidden>
Date: 2012-07-06 07:53:54

On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones [off-list ref] wrote:
When pin control mapping tables are written the registered device
name is supplied for use in name-based searches within the pinctrl
driver. In the case of the DB8500 the string "pinctrl-db8500" is
used. However, when we register the driver with Device Tree, its
naming convention uses something that looks more like "pinctrl.2".

To work around the device naming inconsistencies between devices
registered via platform code and the ones registered by Device
Tree, we use AUXDATA to over-ride the Device Tree naming scheme.

Signed-off-by: Lee Jones <redacted>
Acked-by: Linus Walleij <redacted>

But I guess it won't work without the patch that Rob is herding.
So maybe that patch should go in with this one.

Yours,
Linus Walleij

Re: [PATCH 8/9] ARM: ux500: Clean-up temporary Device Tree enablement helpers

From: Lee Jones <hidden>
Date: 2012-07-06 09:30:26

Hi Linus,

Is this a NAK, or did you just miss it?

On 05/07/12 14:06, Lee Jones wrote:
quoted hunk
Here we remove some of the extra overhead we introduced to make
DT:ing the Snowball platform easier. Unfortunately we can't
remove everything. We are forced to leave cpufreq and DMA behind
until they have been successfully Device Tree enabled.

Signed-off-by: Lee Jones <redacted>
---
  arch/arm/mach-ux500/cpu-db8500.c |   10 ++--------
  1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index c8dd94f..d7a28c0 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -137,10 +137,6 @@ static struct platform_device *platform_devs[] __initdata = {
  	&db8500_prcmu_device,
  };

-static struct platform_device *of_platform_devs[] __initdata = {
-	&u8500_dma40_device,
-};
-
  static resource_size_t __initdata db8500_gpio_base[] = {
  	U8500_GPIOBANK0_BASE,
  	U8500_GPIOBANK1_BASE,
@@ -232,7 +228,6 @@ struct device * __init u8500_init_devices(void)
  struct device * __init u8500_of_init_devices(void)
  {
  	struct device *parent;
-	int i;

  	parent = db8500_soc_device_init();
@@ -241,8 +236,7 @@ struct device * __init u8500_of_init_devices(void)
  	platform_device_register_data(parent,
  		"cpufreq-u8500", -1, NULL, 0);

-	for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++)
-		of_platform_devs[i]->dev.parent = parent;
+	u8500_dma40_device.dev.parent = parent;

  	/*
  	 * Devices to be DT:ed:
@@ -250,7 +244,7 @@ struct device * __init u8500_of_init_devices(void)
  	 *   db8500_pmu_device   = done
  	 *   db8500_prcmu_device = done
  	 */
-	platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs));
+	platform_device_register(&u8500_dma40_device);

  	return parent;
  }

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Re: [PATCH 3/9] ARM: ux500: Remove AB8500 regulator register initialisation information

From: Mark Brown <hidden>
Date: 2012-07-06 11:23:25

On Fri, Jul 06, 2012 at 08:45:35AM +0100, Lee Jones wrote:
Please take a note of this and also do not apply the regulator
driver counterpart of the patch-set (it was one of the ones you
Reviewed-by in the previous batch).
I've no idea what patches you're talking about, sorry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120706/1e5f3355/attachment.sig>

Re: [PATCH 3/9] ARM: ux500: Remove AB8500 regulator register initialisation information

From: Lee Jones <hidden>
Date: 2012-07-06 11:52:45

On 06/07/12 12:23, Mark Brown wrote:
On Fri, Jul 06, 2012 at 08:45:35AM +0100, Lee Jones wrote:
quoted
Please take a note of this and also do not apply the regulator
driver counterpart of the patch-set (it was one of the ones you
Reviewed-by in the previous batch).
I've no idea what patches you're talking about, sorry.
Regarding patch:
[PATCH 08/15] regulator: Stop initialising AB8500's registers during bring-up
On 20/06/12 14:19, Lee Jones wrote:> On 20/06/12 14:08, Mark Brown wrote:
quoted
On Wed, Jun 20, 2012 at 01:56:44PM +0100, Lee Jones wrote:
quoted
There is no need to initialise the AB8500's regulator registers, as
most of this work is already carried out by framework features.
Does this have any dependency on the rest of the series?
Unfortunately yes.

It needs the "ARM: ux500:" stuff to go in first.
Then you added your Reviewed-by: until the ux500 stuff goes in.

However, the ux500 patch has been NACKed, so please don't take the aforementioned patch in either.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515 
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Re: [PATCH 3/9] ARM: ux500: Remove AB8500 regulator register initialisation information

From: Mark Brown <hidden>
Date: 2012-07-06 12:34:45

On Fri, Jul 06, 2012 at 12:52:35PM +0100, Lee Jones wrote:
Then you added your Reviewed-by: until the ux500 stuff goes in.
However, the ux500 patch has been NACKed, so please don't take the aforementioned patch in either.
No problem, if I punted on it like that I'll have deleted the mail and
so wouldn't have applied it anyway unless you resent it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120706/3c448997/attachment.sig>

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2012-07-06 17:40:07

Hi Lee,

On Fri, Jul 06, 2012 at 08:52:43AM +0100, Lee Jones wrote:
quoted hunk
Sorry Dmitry, looks like I missed you off of the CC list on this one.

Here it is again:

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
---
drivers/input/misc/ab8500-ponkey.c |    2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..ae4b683 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -82,6 +82,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 	input_set_capability(input, EV_KEY, KEY_POWER);
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbf);
	error = request_any_context_irq(ponkey->irq_dbf, ab8500_ponkey_handler,
					0, "ab8500-ponkey-dbf", ponkey);
	if (error < 0) {
@@ -90,6 +91,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
		goto err_free_mem;
	}
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbr);
I do not think this is right - you are storing irq_dbr in irq_dbf. Also,
I think you want to do this earlier, like this:

-	ponkey->irq_dbf = irq_dbf;
-	ponkey->irq_dbr = irq_dbr;
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
+	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);

Thanks.

-- 
Dmitry

[PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-06 17:51:21

So I am. Great spot Dmitry.

I'll fix and resubmit next week.

Sent from my mobile Linux device.
On Jul 6, 2012 6:40 PM, "Dmitry Torokhov" [off-list ref] wrote:
Hi Lee,

On Fri, Jul 06, 2012 at 08:52:43AM +0100, Lee Jones wrote:
quoted
Sorry Dmitry, looks like I missed you off of the CC list on this one.

Here it is again:

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
---
drivers/input/misc/ab8500-ponkey.c |    2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/misc/ab8500-ponkey.c
b/drivers/input/misc/ab8500-ponkey.c
quoted
index 5ceb23e..ae4b683 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -82,6 +82,7 @@ static int __devinit ab8500_ponkey_probe(struct
platform_device *pdev)
quoted
      input_set_capability(input, EV_KEY, KEY_POWER);
+     ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbf);
      error = request_any_context_irq(ponkey->irq_dbf,
ab8500_ponkey_handler,
quoted
                                      0, "ab8500-ponkey-dbf", ponkey);
      if (error < 0) {
@@ -90,6 +91,7 @@ static int __devinit ab8500_ponkey_probe(struct
platform_device *pdev)
quoted
              goto err_free_mem;
      }
+     ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbr);
I do not think this is right - you are storing irq_dbr in irq_dbf. Also,
I think you want to do this earlier, like this:

-       ponkey->irq_dbf = irq_dbf;
-       ponkey->irq_dbr = irq_dbr;
+       ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
+       ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);

Thanks.

--
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120706/7dcf77ff/attachment-0001.html>

Re: [PATCH 8/9] ARM: ux500: Clean-up temporary Device Tree enablement helpers

From: Linus Walleij <hidden>
Date: 2012-07-08 19:11:57

On Fri, Jul 6, 2012 at 10:33 AM, Lee Jones [off-list ref] wrote:
Is this a NAK, or did you just miss it?
I have replied to this patch that I want the commit message changed,
didn't you get it?

I'll forward.

Linus

Re: [PATCH 8/9] ARM: ux500: Clean-up temporary Device Tree enablement helpers

From: Lee Jones <hidden>
Date: 2012-07-09 18:50:54

Better?
From 9ef8a52c00dedbd63b6eecc086f8bd688d2cb66a Mon Sep 17 00:00:00 2001
From: Lee Jones <redacted>
Date: Wed, 27 Jun 2012 08:42:08 +0100
Subject: [PATCH 1/1] ARM: ux500: Clean-up temporary Device Tree enablement
 helpers

Here we remove some of the extra overhead we introduced to make
DT:ing the Snowball platform easier.

Signed-off-by: Lee Jones <redacted>
---
 arch/arm/mach-ux500/cpu-db8500.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index db3c52d..38b7f9c 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -138,10 +138,6 @@ static struct platform_device *platform_devs[] __initdata = {
 	&db8500_prcmu_device,
 };
 
-static struct platform_device *of_platform_devs[] __initdata = {
-	&u8500_dma40_device,
-};
-
 static resource_size_t __initdata db8500_gpio_base[] = {
 	U8500_GPIOBANK0_BASE,
 	U8500_GPIOBANK1_BASE,
@@ -235,7 +231,6 @@ struct device * __init u8500_init_devices(struct ab8500_platform_data *ab8500)
 struct device * __init u8500_of_init_devices(void)
 {
 	struct device *parent;
-	int i;
 
 	parent = db8500_soc_device_init();
 
@@ -244,8 +239,7 @@ struct device * __init u8500_of_init_devices(void)
 	platform_device_register_data(parent,
 		"cpufreq-u8500", -1, NULL, 0);
 
-	for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++)
-		of_platform_devs[i]->dev.parent = parent;
+	u8500_dma40_device.dev.parent = parent;
 
 	/*
 	 * Devices to be DT:ed:
@@ -253,7 +247,7 @@ struct device * __init u8500_of_init_devices(void)
 	 *   db8500_pmu_device   = done
 	 *   db8500_prcmu_device = done
 	 */
-	platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs));
+	platform_device_register(&u8500_dma40_device);
 
 	return parent;
 }
-- 
1.7.9.5

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-09 18:53:08

From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
---
 drivers/input/misc/ab8500-ponkey.c |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..08d42d1 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -82,6 +82,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 
 	input_set_capability(input, EV_KEY, KEY_POWER);
 
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbf);
 	error = request_any_context_irq(ponkey->irq_dbf, ab8500_ponkey_handler,
 					0, "ab8500-ponkey-dbf", ponkey);
 	if (error < 0) {
@@ -90,6 +91,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 		goto err_free_mem;
 	}
 
+	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, ponkey->irq_dbr);
 	error = request_any_context_irq(ponkey->irq_dbr, ab8500_ponkey_handler,
 					0, "ab8500-ponkey-dbr", ponkey);
 	if (error < 0) {
-- 
1.7.9.5

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2012-07-09 20:14:29

On Mon, Jul 09, 2012 at 08:53:01PM +0200, Lee Jones wrote:
quoted hunk
From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
---
 drivers/input/misc/ab8500-ponkey.c |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..08d42d1 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -82,6 +82,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 
 	input_set_capability(input, EV_KEY, KEY_POWER);
 
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbf);
*sigh*

Can we please do the assignment earlier? Look, we have a few lines
above:

	ponkey->idev = input;
	ponkey->ab8500 = ab8500;
	ponkey->irq_dbf = irq_dbf;
	ponkey->irq_dbr = irq_dbr;

Why do you keep these assignments and then override them with
translations? Why don't you do

	ponkey->idev = input;
	ponkey->ab8500 = ab8500;
	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);

to begin with?

Thanks.

-- 
Dmitry

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-09 20:34:43

Why do you keep these assignments and then override them with
translations? Why don't you do

	ponkey->idev = input;
	ponkey->ab8500 = ab8500;
	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);

to begin with?
Ah, I see what you mean now.

Sorry, just glossed over your first email.

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-09 20:35:54

From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
---
 drivers/input/misc/ab8500-ponkey.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..8d24189 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -74,8 +74,8 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 
 	ponkey->idev = input;
 	ponkey->ab8500 = ab8500;
-	ponkey->irq_dbf = irq_dbf;
-	ponkey->irq_dbr = irq_dbr;
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbf);
+	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, ponkey->irq_dbr);
 
 	input->name = "AB8500 POn(PowerOn) Key";
 	input->dev.parent = &pdev->dev;
-- 
1.7.9.5

Re: [PATCH 8/9] ARM: ux500: Clean-up temporary Device Tree enablement helpers

From: Linus Walleij <hidden>
Date: 2012-07-09 20:36:19

On Mon, Jul 9, 2012 at 8:50 PM, Lee Jones [off-list ref] wrote:
Better?
Yep!
From 9ef8a52c00dedbd63b6eecc086f8bd688d2cb66a Mon Sep 17 00:00:00 2001
From: Lee Jones <redacted>
Date: Wed, 27 Jun 2012 08:42:08 +0100
Subject: [PATCH 1/1] ARM: ux500: Clean-up temporary Device Tree enablement
 helpers

Here we remove some of the extra overhead we introduced to make
DT:ing the Snowball platform easier.

Signed-off-by: Lee Jones <redacted>
Acked-by: Linus Walleij <redacted>

Yours,
Linus Walleij

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Linus Walleij <hidden>
Date: 2012-07-09 20:37:27

On Mon, Jul 9, 2012 at 10:35 PM, Lee Jones [off-list ref] wrote:
From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
Acked-by: Linus Walleij <redacted>

Yours,
Linus Walleij

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-09 20:42:43

On 09/07/12 22:37, Linus Walleij wrote:
On Mon, Jul 9, 2012 at 10:35 PM, Lee Jones [off-list ref] wrote:
quoted
From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
Acked-by: Linus Walleij <redacted>
I've just sent a new one following Dmitry's suggestion.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2012-07-09 20:46:28

On Mon, Jul 09, 2012 at 10:35:48PM +0200, Lee Jones wrote:
quoted hunk
From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
---
 drivers/input/misc/ab8500-ponkey.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..8d24189 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -74,8 +74,8 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 
 	ponkey->idev = input;
 	ponkey->ab8500 = ab8500;
-	ponkey->irq_dbf = irq_dbf;
-	ponkey->irq_dbr = irq_dbr;
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbf);
+	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, ponkey->irq_dbr);
                                                      ^^^^^^^^^^^^^^^

These are zeroes now. Man, you are killing me...

-- 
Dmitry

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-09 20:56:55

On 09/07/12 22:46, Dmitry Torokhov wrote:
On Mon, Jul 09, 2012 at 10:35:48PM +0200, Lee Jones wrote:
quoted
From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
---
  drivers/input/misc/ab8500-ponkey.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..8d24189 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -74,8 +74,8 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)

  	ponkey->idev = input;
  	ponkey->ab8500 = ab8500;
-	ponkey->irq_dbf = irq_dbf;
-	ponkey->irq_dbr = irq_dbr;
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbf);
+	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, ponkey->irq_dbr);
                                                       ^^^^^^^^^^^^^^^

These are zeroes now. Man, you are killing me...
I've been traveling all day and my brain is dead.

Hopefully you have a sense of humor. :)

Give me two mins.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-09 20:59:49

Sorry for the cock-up(s).

From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
---
 drivers/input/misc/ab8500-ponkey.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..f6764af 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -74,8 +74,8 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 
 	ponkey->idev = input;
 	ponkey->ab8500 = ab8500;
-	ponkey->irq_dbf = irq_dbf;
-	ponkey->irq_dbr = irq_dbr;
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
+	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
 
 	input->name = "AB8500 POn(PowerOn) Key";
 	input->dev.parent = &pdev->dev;
-- 
1.7.9.5

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Linus Walleij <hidden>
Date: 2012-07-09 21:03:44

On Mon, Jul 9, 2012 at 10:59 PM, Lee Jones [off-list ref] wrote:
Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
Now since I was fooled by the last patch, thinking you had tested it before
submitting (obviously not) - please send a test log of some
cat /dev/input/event* for this one before I ACK it this time.

Yours,
Linus Walleij

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-09 21:21:41

On 09/07/12 23:03, Linus Walleij wrote:
On Mon, Jul 9, 2012 at 10:59 PM, Lee Jones [off-list ref] wrote:
quoted
Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
Now since I was fooled by the last patch, thinking you had tested it before
submitting (obviously not) - please send a test log of some
cat /dev/input/event* for this one before I ACK it this time.
I did test it, but must have only looked at the one IRQ incrementing.

I can provide a log tomorrow if it makes you feel better. :)

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2012-07-10 06:18:06

On Mon, Jul 09, 2012 at 10:59:43PM +0200, Lee Jones wrote:
Sorry for the cock-up(s).

From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

I think it would be best if this got merged through whatever tree that
was used to introduce ab8500_irq_get_virq(); otherwise it will have to
wait till I resync with mainline sometime in the middle of the next
release cycle.

Thanks.
quoted hunk
---
 drivers/input/misc/ab8500-ponkey.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..f6764af 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -74,8 +74,8 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 
 	ponkey->idev = input;
 	ponkey->ab8500 = ab8500;
-	ponkey->irq_dbf = irq_dbf;
-	ponkey->irq_dbr = irq_dbr;
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
+	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
 
 	input->name = "AB8500 POn(PowerOn) Key";
 	input->dev.parent = &pdev->dev;
-- 
1.7.9.5

-- 
Dmitry

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-10 06:22:40

On 10/07/12 08:17, Dmitry Torokhov wrote:
On Mon, Jul 09, 2012 at 10:59:43PM +0200, Lee Jones wrote:
quoted
Sorry for the cock-up(s).

From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Signed-off-by: Lee Jones <redacted>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

I think it would be best if this got merged through whatever tree that
was used to introduce ab8500_irq_get_virq(); otherwise it will have to
wait till I resync with mainline sometime in the middle of the next
release cycle.

Thanks.
No problem. I'll send it though ARM-SoC.
quoted
---
  drivers/input/misc/ab8500-ponkey.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 5ceb23e..f6764af 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -74,8 +74,8 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)

  	ponkey->idev = input;
  	ponkey->ab8500 = ab8500;
-	ponkey->irq_dbf = irq_dbf;
-	ponkey->irq_dbr = irq_dbr;
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
+	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);

  	input->name = "AB8500 POn(PowerOn) Key";
  	input->dev.parent = &pdev->dev;
--
1.7.9.5


-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Linus Walleij <hidden>
Date: 2012-07-10 21:08:41

On Mon, Jul 9, 2012 at 11:21 PM, Lee Jones [off-list ref] wrote:
On 09/07/12 23:03, Linus Walleij wrote:
quoted
Now since I was fooled by the last patch, thinking you had tested it
before
submitting (obviously not) - please send a test log of some
cat /dev/input/event* for this one before I ACK it this time.
(Hm, sorry for grumpy mode...)
I did test it, but must have only looked at the one IRQ incrementing.
That's not enough, cat /dev/input/event/* whatever event node is used
by the ponkey, press it and verify you get some garbage (=events)
in the console.

Yours,
Linus Walleij

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Mark Brown <hidden>
Date: 2012-07-12 16:37:57

On Tue, Jul 10, 2012 at 11:08:39PM +0200, Linus Walleij wrote:
On Mon, Jul 9, 2012 at 11:21 PM, Lee Jones [off-list ref] wrote:
quoted
I did test it, but must have only looked at the one IRQ incrementing.
That's not enough, cat /dev/input/event/* whatever event node is used
by the ponkey, press it and verify you get some garbage (=events)
in the console.
There's the evtest debug program which is very handy for testing input
API stuff (Google should throw up copies, it's just a .c file).

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-13 13:43:45

On 10/07/12 22:08, Linus Walleij wrote:
On Mon, Jul 9, 2012 at 11:21 PM, Lee Jones [off-list ref] wrote:
quoted
On 09/07/12 23:03, Linus Walleij wrote:
quoted
quoted
Now since I was fooled by the last patch, thinking you had tested it
before
submitting (obviously not) - please send a test log of some
cat /dev/input/event* for this one before I ACK it this time.
(Hm, sorry for grumpy mode...)
quoted
I did test it, but must have only looked at the one IRQ incrementing.
That's not enough, cat /dev/input/event/* whatever event node is used
by the ponkey, press it and verify you get some garbage (=events)
in the console.
Yes, garbage seen, works fine.

Also:
# cat /proc/interrupts
           CPU0       CPU1
  6:          0          0    ab8500  ab8500-ponkey-dbf
  7:          0          0    ab8500  ab8500-ponkey-dbr
Press, release, press, release:
# cat /proc/interrupts
           CPU0       CPU1
  6:          0          2    ab8500  ab8500-ponkey-dbf
  7:          0          2    ab8500  ab8500-ponkey-dbr
-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Linus Walleij <hidden>
Date: 2012-07-14 21:36:19

On Fri, Jul 13, 2012 at 3:43 PM, Lee Jones [off-list ref] wrote:
On 10/07/12 22:08, Linus Walleij wrote:
quoted
That's not enough, cat /dev/input/event/* whatever event node is used
by the ponkey, press it and verify you get some garbage (=events)
in the console.
Yes, garbage seen, works fine.
OK!
Acked-by: on whatever Dmitry Acked.

Yours,
Linus Walleij

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Lee Jones <hidden>
Date: 2012-07-16 07:35:45

I think it would be best if this got merged through whatever tree that
was used to introduce ab8500_irq_get_virq(); otherwise it will have to
wait till I resync with mainline sometime in the middle of the next
release cycle.
I agree. Sam that's you, patch below. :)

From: Lee Jones <redacted>
Date: Tue, 26 Jun 2012 10:46:50 +0100
Subject: [PATCH 1/1] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Linus Walleij <redacted>
Signed-off-by: Lee Jones <redacted>
---
 drivers/input/misc/ab8500-ponkey.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 350fd0c..1a1d974 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -73,8 +73,8 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 
 	ponkey->idev = input;
 	ponkey->ab8500 = ab8500;
-	ponkey->irq_dbf = irq_dbf;
-	ponkey->irq_dbr = irq_dbr;
+	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
+	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
 
 	input->name = "AB8500 POn(PowerOn) Key";
 	input->dev.parent = &pdev->dev;
-- 
1.7.9.5

Re: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping

From: Samuel Ortiz <hidden>
Date: 2012-07-16 13:57:31

Hi Lee,

On Mon, Jul 16, 2012 at 08:35:37AM +0100, Lee Jones wrote:
quoted
I think it would be best if this got merged through whatever tree that
was used to introduce ab8500_irq_get_virq(); otherwise it will have to
wait till I resync with mainline sometime in the middle of the next
release cycle.
I agree. Sam that's you, patch below. :)
Applied, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help