All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
@ 2014-02-14 21:58 ` Stephen Warren
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Warren @ 2014-02-14 21:58 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, J Keerthy, Ian Lartey,
	Stefan Agner, josephl-DDmLM1+adcrQT0dZR+AlfA,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA, Stephen Warren

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Some boards or SoCs have an inverter between the PMIC IRQ output pin and
the IRQ controller input signal.

The IRQ specifier in DT is meant to represent the IRQ flags at the input
to the IRQ controller.

The Palmas HW's IRQ output has configurable polarity. The driver
currently selects the output polarity by querying the input polarity at
the IRQ controller. This works fine if the IRQ signal is routed directly
from the PMIC to the IRQ controller with no intervening logic. However,
if the signal is inverted between the two, this automatic polarity
selection gets the wrong answer.

Add an additional optional DT and platform data parameter which indicates
that such an inversion occurs. If this option is enabled, the Palmas
driver will configure its IRQ output to the opposite polarity of the IRQ
controller's input.

An alternative would have been to add a new non-optional DT parameter to
indicate the exact desired output polarity. However, this would have been
an incompatible change to the DT binding.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
If this patch could be applied to its own branch (w/ signed tag) in the
MFD tree, that would great; then I can pull patch 1/2 into the Tegra tree
so that I can apply patch 2/2 to the Tegra tree. Thanks.
---
 Documentation/devicetree/bindings/mfd/palmas.txt | 6 ++++++
 drivers/mfd/palmas.c                             | 4 ++++
 include/linux/mfd/palmas.h                       | 1 +
 3 files changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/palmas.txt b/Documentation/devicetree/bindings/mfd/palmas.txt
index e5f0f8303461..76ec509d5f87 100644
--- a/Documentation/devicetree/bindings/mfd/palmas.txt
+++ b/Documentation/devicetree/bindings/mfd/palmas.txt
@@ -18,6 +18,12 @@ Required properties:
   ti,tps659038
 and also the generic series names
   ti,palmas
+- interrupts : Should contain a single entry for the IRQ output.
+- ti,irq-externally-inverted : If missing, the polarity of the Palmas IRQ
+  output should be set to the opposite of the polarity indicated by the IRQ
+  specifier in the interrupts property. If absent, the polarity should be
+  configured to match. This allows the representation of an inverter between
+  the Palmas IRQ output and the interrupt parent's IRQ input.
 - interrupt-controller : palmas has its own internal IRQs
 - #interrupt-cells : should be set to 2 for IRQ number and flags
   The first cell is the IRQ number.
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index d280d789e55a..f4ea932adf8d 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -293,6 +293,8 @@ static int palmas_set_pdata_irq_flag(struct i2c_client *i2c,
 	}
 
 	pdata->irq_flags = irqd_get_trigger_type(irq_data);
+	pdata->irq_external_inversion = of_property_read_bool(i2c->dev.of_node,
+						"ti,irq-externally-inverted");
 	dev_info(&i2c->dev, "Irq flag is 0x%08x\n", pdata->irq_flags);
 	return 0;
 }
@@ -447,6 +449,8 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
 		reg = PALMAS_POLARITY_CTRL_INT_POLARITY;
 	else
 		reg = 0;
+	if (pdata->irq_external_inversion)
+		reg ^= PALMAS_POLARITY_CTRL_INT_POLARITY;
 	ret = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
 			PALMAS_POLARITY_CTRL, PALMAS_POLARITY_CTRL_INT_POLARITY,
 			reg);
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 9974e387e483..2fdf08c50a48 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -292,6 +292,7 @@ struct palmas_clk_platform_data {
 
 struct palmas_platform_data {
 	int irq_flags;
+	bool irq_external_inversion;
 	int gpio_base;
 
 	/* bit value to be loaded to the POWER_CTRL register */
-- 
1.8.1.5

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

* [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
@ 2014-02-14 21:58 ` Stephen Warren
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Warren @ 2014-02-14 21:58 UTC (permalink / raw)
  To: linux-arm-kernel

From: Stephen Warren <swarren@nvidia.com>

Some boards or SoCs have an inverter between the PMIC IRQ output pin and
the IRQ controller input signal.

The IRQ specifier in DT is meant to represent the IRQ flags at the input
to the IRQ controller.

The Palmas HW's IRQ output has configurable polarity. The driver
currently selects the output polarity by querying the input polarity at
the IRQ controller. This works fine if the IRQ signal is routed directly
from the PMIC to the IRQ controller with no intervening logic. However,
if the signal is inverted between the two, this automatic polarity
selection gets the wrong answer.

Add an additional optional DT and platform data parameter which indicates
that such an inversion occurs. If this option is enabled, the Palmas
driver will configure its IRQ output to the opposite polarity of the IRQ
controller's input.

An alternative would have been to add a new non-optional DT parameter to
indicate the exact desired output polarity. However, this would have been
an incompatible change to the DT binding.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
If this patch could be applied to its own branch (w/ signed tag) in the
MFD tree, that would great; then I can pull patch 1/2 into the Tegra tree
so that I can apply patch 2/2 to the Tegra tree. Thanks.
---
 Documentation/devicetree/bindings/mfd/palmas.txt | 6 ++++++
 drivers/mfd/palmas.c                             | 4 ++++
 include/linux/mfd/palmas.h                       | 1 +
 3 files changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/palmas.txt b/Documentation/devicetree/bindings/mfd/palmas.txt
index e5f0f8303461..76ec509d5f87 100644
--- a/Documentation/devicetree/bindings/mfd/palmas.txt
+++ b/Documentation/devicetree/bindings/mfd/palmas.txt
@@ -18,6 +18,12 @@ Required properties:
   ti,tps659038
 and also the generic series names
   ti,palmas
+- interrupts : Should contain a single entry for the IRQ output.
+- ti,irq-externally-inverted : If missing, the polarity of the Palmas IRQ
+  output should be set to the opposite of the polarity indicated by the IRQ
+  specifier in the interrupts property. If absent, the polarity should be
+  configured to match. This allows the representation of an inverter between
+  the Palmas IRQ output and the interrupt parent's IRQ input.
 - interrupt-controller : palmas has its own internal IRQs
 - #interrupt-cells : should be set to 2 for IRQ number and flags
   The first cell is the IRQ number.
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index d280d789e55a..f4ea932adf8d 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -293,6 +293,8 @@ static int palmas_set_pdata_irq_flag(struct i2c_client *i2c,
 	}
 
 	pdata->irq_flags = irqd_get_trigger_type(irq_data);
+	pdata->irq_external_inversion = of_property_read_bool(i2c->dev.of_node,
+						"ti,irq-externally-inverted");
 	dev_info(&i2c->dev, "Irq flag is 0x%08x\n", pdata->irq_flags);
 	return 0;
 }
@@ -447,6 +449,8 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
 		reg = PALMAS_POLARITY_CTRL_INT_POLARITY;
 	else
 		reg = 0;
+	if (pdata->irq_external_inversion)
+		reg ^= PALMAS_POLARITY_CTRL_INT_POLARITY;
 	ret = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
 			PALMAS_POLARITY_CTRL, PALMAS_POLARITY_CTRL_INT_POLARITY,
 			reg);
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 9974e387e483..2fdf08c50a48 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -292,6 +292,7 @@ struct palmas_clk_platform_data {
 
 struct palmas_platform_data {
 	int irq_flags;
+	bool irq_external_inversion;
 	int gpio_base;
 
 	/* bit value to be loaded to the POWER_CTRL register */
-- 
1.8.1.5

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

* [PATCH 2/2] ARM: tegra: fix Dalmore PMIC IRQ polarity
  2014-02-14 21:58 ` Stephen Warren
@ 2014-02-14 21:58     ` Stephen Warren
  -1 siblings, 0 replies; 16+ messages in thread
From: Stephen Warren @ 2014-02-14 21:58 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, J Keerthy, Ian Lartey,
	Stefan Agner, josephl-DDmLM1+adcrQT0dZR+AlfA,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA, Stephen Warren

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

The Tegra PMC's resume-from-sleep logic wants an active-low IRQ input
from the PMIC. However, the PMIC IRQ is also routed to the GIC, which
only supports active high IRQs (or rising edge). Hence, the signal must
be inverted in the PMC before being routed to the GIC. This implies that
the PMC DT property nvidia,invert-interrupt must be set, and it is.

The PMIC's DT interrupts property must represent the IRQ level at the
GIC, since that is the PMIC's parent IRQ controller. Fix the PMIC's
interrupts property to correctly describe the GIC input polarity.

However, the PMIC IRQ output's polarity is programmable in HW, and by
default follows the parent IRQ controller's input polarity. We need to
have an active-low output due to the inversion inside the Tegra PMC.
Hence, add the ti,irq-externally-inverted property to the PMIC.

Reported-by: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>
Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/tegra114-dalmore.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index 8de543777882..2977206cafc9 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -893,7 +893,8 @@
 		palmas: tps65913@58 {
 			compatible = "ti,palmas";
 			reg = <0x58>;
-			interrupts = <0 86 IRQ_TYPE_LEVEL_LOW>;
+			interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
+			ti,irq-externally-inverted;
 
 			#interrupt-cells = <2>;
 			interrupt-controller;
-- 
1.8.1.5

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

* [PATCH 2/2] ARM: tegra: fix Dalmore PMIC IRQ polarity
@ 2014-02-14 21:58     ` Stephen Warren
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Warren @ 2014-02-14 21:58 UTC (permalink / raw)
  To: linux-arm-kernel

From: Stephen Warren <swarren@nvidia.com>

The Tegra PMC's resume-from-sleep logic wants an active-low IRQ input
from the PMIC. However, the PMIC IRQ is also routed to the GIC, which
only supports active high IRQs (or rising edge). Hence, the signal must
be inverted in the PMC before being routed to the GIC. This implies that
the PMC DT property nvidia,invert-interrupt must be set, and it is.

The PMIC's DT interrupts property must represent the IRQ level at the
GIC, since that is the PMIC's parent IRQ controller. Fix the PMIC's
interrupts property to correctly describe the GIC input polarity.

However, the PMIC IRQ output's polarity is programmable in HW, and by
default follows the parent IRQ controller's input polarity. We need to
have an active-low output due to the inversion inside the Tegra PMC.
Hence, add the ti,irq-externally-inverted property to the PMIC.

Reported-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/boot/dts/tegra114-dalmore.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index 8de543777882..2977206cafc9 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -893,7 +893,8 @@
 		palmas: tps65913 at 58 {
 			compatible = "ti,palmas";
 			reg = <0x58>;
-			interrupts = <0 86 IRQ_TYPE_LEVEL_LOW>;
+			interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
+			ti,irq-externally-inverted;
 
 			#interrupt-cells = <2>;
 			interrupt-controller;
-- 
1.8.1.5

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

* Re: [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
  2014-02-14 21:58 ` Stephen Warren
@ 2014-02-17  8:31     ` Laxman Dewangan
  -1 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2014-02-17  8:31 UTC (permalink / raw)
  To: Stephen Warren, Samuel Ortiz, Lee Jones
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, J Keerthy, Ian Lartey,
	Stefan Agner, Joseph Lo, Stephen Warren

On Saturday 15 February 2014 03:28 AM, Stephen Warren wrote:
> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> Some boards or SoCs have an inverter between the PMIC IRQ output pin and
> the IRQ controller input signal.
>
> The IRQ specifier in DT is meant to represent the IRQ flags at the input
> to the IRQ controller.
>

Looks good to me.
Acked-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

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

* [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
@ 2014-02-17  8:31     ` Laxman Dewangan
  0 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2014-02-17  8:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 15 February 2014 03:28 AM, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> Some boards or SoCs have an inverter between the PMIC IRQ output pin and
> the IRQ controller input signal.
>
> The IRQ specifier in DT is meant to represent the IRQ flags at the input
> to the IRQ controller.
>

Looks good to me.
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>

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

* Re: [PATCH 2/2] ARM: tegra: fix Dalmore PMIC IRQ polarity
  2014-02-14 21:58     ` Stephen Warren
@ 2014-02-17  8:32         ` Laxman Dewangan
  -1 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2014-02-17  8:32 UTC (permalink / raw)
  To: Stephen Warren, Samuel Ortiz, Lee Jones
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, J Keerthy, Ian Lartey,
	Stefan Agner, Joseph Lo, Stephen Warren

On Saturday 15 February 2014 03:28 AM, Stephen Warren wrote:
> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> The Tegra PMC's resume-from-sleep logic wants an active-low IRQ input
> from the PMIC. However, the PMIC IRQ is also routed to the GIC, which
> only supports active high IRQs (or rising edge). Hence, the signal must
> be inverted in the PMC before being routed to the GIC. This implies that
> the PMC DT property nvidia,invert-interrupt must be set, and it is.
>
> The PMIC's DT interrupts property must represent the IRQ level at the
> GIC, since that is the PMIC's parent IRQ controller. Fix the PMIC's
> interrupts property to correctly describe the GIC input polarity.
>
> However, the PMIC IRQ output's polarity is programmable in HW, and by
> default follows the parent IRQ controller's input polarity. We need to
> have an active-low output due to the inversion inside the Tegra PMC.
> Hence, add the ti,irq-externally-inverted property to the PMIC.
>
Looks good to me.

Acked-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

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

* [PATCH 2/2] ARM: tegra: fix Dalmore PMIC IRQ polarity
@ 2014-02-17  8:32         ` Laxman Dewangan
  0 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2014-02-17  8:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 15 February 2014 03:28 AM, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> The Tegra PMC's resume-from-sleep logic wants an active-low IRQ input
> from the PMIC. However, the PMIC IRQ is also routed to the GIC, which
> only supports active high IRQs (or rising edge). Hence, the signal must
> be inverted in the PMC before being routed to the GIC. This implies that
> the PMC DT property nvidia,invert-interrupt must be set, and it is.
>
> The PMIC's DT interrupts property must represent the IRQ level at the
> GIC, since that is the PMIC's parent IRQ controller. Fix the PMIC's
> interrupts property to correctly describe the GIC input polarity.
>
> However, the PMIC IRQ output's polarity is programmable in HW, and by
> default follows the parent IRQ controller's input polarity. We need to
> have an active-low output due to the inversion inside the Tegra PMC.
> Hence, add the ti,irq-externally-inverted property to the PMIC.
>
Looks good to me.

Acked-by: Laxman Dewangan <ldewangan@nvidia.com>

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

* Re: [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
  2014-02-14 21:58 ` Stephen Warren
@ 2014-02-17  9:26     ` Lee Jones
  -1 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2014-02-17  9:26 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Samuel Ortiz, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, J Keerthy, Ian Lartey,
	Stefan Agner, josephl-DDmLM1+adcrQT0dZR+AlfA,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA, Stephen Warren

> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> Some boards or SoCs have an inverter between the PMIC IRQ output pin and
> the IRQ controller input signal.
> 
> The IRQ specifier in DT is meant to represent the IRQ flags at the input
> to the IRQ controller.
> 
> The Palmas HW's IRQ output has configurable polarity. The driver
> currently selects the output polarity by querying the input polarity at
> the IRQ controller. This works fine if the IRQ signal is routed directly
> from the PMIC to the IRQ controller with no intervening logic. However,
> if the signal is inverted between the two, this automatic polarity
> selection gets the wrong answer.
> 
> Add an additional optional DT and platform data parameter which indicates
> that such an inversion occurs. If this option is enabled, the Palmas
> driver will configure its IRQ output to the opposite polarity of the IRQ
> controller's input.
> 
> An alternative would have been to add a new non-optional DT parameter to
> indicate the exact desired output polarity. However, this would have been
> an incompatible change to the DT binding.
> 
> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> If this patch could be applied to its own branch (w/ signed tag) in the
> MFD tree, that would great; then I can pull patch 1/2 into the Tegra tree
> so that I can apply patch 2/2 to the Tegra tree. Thanks.
> ---
>  Documentation/devicetree/bindings/mfd/palmas.txt | 6 ++++++
>  drivers/mfd/palmas.c                             | 4 ++++
>  include/linux/mfd/palmas.h                       | 1 +
>  3 files changed, 11 insertions(+)

For the core changes:
  Acked-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

NB: The DT guys prefer documentation to be submitted in a separate
patch these days.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
@ 2014-02-17  9:26     ` Lee Jones
  0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2014-02-17  9:26 UTC (permalink / raw)
  To: linux-arm-kernel

> From: Stephen Warren <swarren@nvidia.com>
> 
> Some boards or SoCs have an inverter between the PMIC IRQ output pin and
> the IRQ controller input signal.
> 
> The IRQ specifier in DT is meant to represent the IRQ flags at the input
> to the IRQ controller.
> 
> The Palmas HW's IRQ output has configurable polarity. The driver
> currently selects the output polarity by querying the input polarity at
> the IRQ controller. This works fine if the IRQ signal is routed directly
> from the PMIC to the IRQ controller with no intervening logic. However,
> if the signal is inverted between the two, this automatic polarity
> selection gets the wrong answer.
> 
> Add an additional optional DT and platform data parameter which indicates
> that such an inversion occurs. If this option is enabled, the Palmas
> driver will configure its IRQ output to the opposite polarity of the IRQ
> controller's input.
> 
> An alternative would have been to add a new non-optional DT parameter to
> indicate the exact desired output polarity. However, this would have been
> an incompatible change to the DT binding.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> If this patch could be applied to its own branch (w/ signed tag) in the
> MFD tree, that would great; then I can pull patch 1/2 into the Tegra tree
> so that I can apply patch 2/2 to the Tegra tree. Thanks.
> ---
>  Documentation/devicetree/bindings/mfd/palmas.txt | 6 ++++++
>  drivers/mfd/palmas.c                             | 4 ++++
>  include/linux/mfd/palmas.h                       | 1 +
>  3 files changed, 11 insertions(+)

For the core changes:
  Acked-by: Lee Jones <lee.jones@linaro.org>

NB: The DT guys prefer documentation to be submitted in a separate
patch these days.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
  2014-02-17  9:26     ` Lee Jones
@ 2014-02-18 17:42       ` Stephen Warren
  -1 siblings, 0 replies; 16+ messages in thread
From: Stephen Warren @ 2014-02-18 17:42 UTC (permalink / raw)
  To: Lee Jones
  Cc: Samuel Ortiz, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, J Keerthy, Ian Lartey,
	Stefan Agner, josephl-DDmLM1+adcrQT0dZR+AlfA,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA, Stephen Warren

On 02/17/2014 02:26 AM, Lee Jones wrote:
>> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>
>> Some boards or SoCs have an inverter between the PMIC IRQ output pin and
>> the IRQ controller input signal.
>>
>> The IRQ specifier in DT is meant to represent the IRQ flags at the input
>> to the IRQ controller.
>>
>> The Palmas HW's IRQ output has configurable polarity. The driver
>> currently selects the output polarity by querying the input polarity at
>> the IRQ controller. This works fine if the IRQ signal is routed directly
>> from the PMIC to the IRQ controller with no intervening logic. However,
>> if the signal is inverted between the two, this automatic polarity
>> selection gets the wrong answer.
>>
>> Add an additional optional DT and platform data parameter which indicates
>> that such an inversion occurs. If this option is enabled, the Palmas
>> driver will configure its IRQ output to the opposite polarity of the IRQ
>> controller's input.
>>
>> An alternative would have been to add a new non-optional DT parameter to
>> indicate the exact desired output polarity. However, this would have been
>> an incompatible change to the DT binding.
>>
>> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>> ---
>> If this patch could be applied to its own branch (w/ signed tag) in the
>> MFD tree, that would great; then I can pull patch 1/2 into the Tegra tree
>> so that I can apply patch 2/2 to the Tegra tree. Thanks.
>> ---
>>  Documentation/devicetree/bindings/mfd/palmas.txt | 6 ++++++
>>  drivers/mfd/palmas.c                             | 4 ++++
>>  include/linux/mfd/palmas.h                       | 1 +
>>  3 files changed, 11 insertions(+)
> 
> For the core changes:
>   Acked-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Thanks. Since you ack'd this and are an MFD maintainer, was that an
indication that I should take this patch through the Tegra tree?

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

* [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
@ 2014-02-18 17:42       ` Stephen Warren
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Warren @ 2014-02-18 17:42 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/17/2014 02:26 AM, Lee Jones wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> Some boards or SoCs have an inverter between the PMIC IRQ output pin and
>> the IRQ controller input signal.
>>
>> The IRQ specifier in DT is meant to represent the IRQ flags at the input
>> to the IRQ controller.
>>
>> The Palmas HW's IRQ output has configurable polarity. The driver
>> currently selects the output polarity by querying the input polarity at
>> the IRQ controller. This works fine if the IRQ signal is routed directly
>> from the PMIC to the IRQ controller with no intervening logic. However,
>> if the signal is inverted between the two, this automatic polarity
>> selection gets the wrong answer.
>>
>> Add an additional optional DT and platform data parameter which indicates
>> that such an inversion occurs. If this option is enabled, the Palmas
>> driver will configure its IRQ output to the opposite polarity of the IRQ
>> controller's input.
>>
>> An alternative would have been to add a new non-optional DT parameter to
>> indicate the exact desired output polarity. However, this would have been
>> an incompatible change to the DT binding.
>>
>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>> ---
>> If this patch could be applied to its own branch (w/ signed tag) in the
>> MFD tree, that would great; then I can pull patch 1/2 into the Tegra tree
>> so that I can apply patch 2/2 to the Tegra tree. Thanks.
>> ---
>>  Documentation/devicetree/bindings/mfd/palmas.txt | 6 ++++++
>>  drivers/mfd/palmas.c                             | 4 ++++
>>  include/linux/mfd/palmas.h                       | 1 +
>>  3 files changed, 11 insertions(+)
> 
> For the core changes:
>   Acked-by: Lee Jones <lee.jones@linaro.org>

Thanks. Since you ack'd this and are an MFD maintainer, was that an
indication that I should take this patch through the Tegra tree?

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

* Re: [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
  2014-02-18 17:42       ` Stephen Warren
@ 2014-02-18 18:01           ` Lee Jones
  -1 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2014-02-18 18:01 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Samuel Ortiz, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, J Keerthy, Ian Lartey,
	Stefan Agner, josephl-DDmLM1+adcrQT0dZR+AlfA,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA, Stephen Warren

> >> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> >>
> >> Some boards or SoCs have an inverter between the PMIC IRQ output pin and
> >> the IRQ controller input signal.
> >>
> >> The IRQ specifier in DT is meant to represent the IRQ flags at the input
> >> to the IRQ controller.
> >>
> >> The Palmas HW's IRQ output has configurable polarity. The driver
> >> currently selects the output polarity by querying the input polarity at
> >> the IRQ controller. This works fine if the IRQ signal is routed directly
> >> from the PMIC to the IRQ controller with no intervening logic. However,
> >> if the signal is inverted between the two, this automatic polarity
> >> selection gets the wrong answer.
> >>
> >> Add an additional optional DT and platform data parameter which indicates
> >> that such an inversion occurs. If this option is enabled, the Palmas
> >> driver will configure its IRQ output to the opposite polarity of the IRQ
> >> controller's input.
> >>
> >> An alternative would have been to add a new non-optional DT parameter to
> >> indicate the exact desired output polarity. However, this would have been
> >> an incompatible change to the DT binding.
> >>
> >> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> >> ---
> >> If this patch could be applied to its own branch (w/ signed tag) in the
> >> MFD tree, that would great; then I can pull patch 1/2 into the Tegra tree
> >> so that I can apply patch 2/2 to the Tegra tree. Thanks.
> >> ---
> >>  Documentation/devicetree/bindings/mfd/palmas.txt | 6 ++++++
> >>  drivers/mfd/palmas.c                             | 4 ++++
> >>  include/linux/mfd/palmas.h                       | 1 +
> >>  3 files changed, 11 insertions(+)
> > 
> > For the core changes:
> >   Acked-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> 
> Thanks. Since you ack'd this and are an MFD maintainer, was that an
> indication that I should take this patch through the Tegra tree?

No, it was an indication that we still require more Acks. :)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
@ 2014-02-18 18:01           ` Lee Jones
  0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2014-02-18 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

> >> From: Stephen Warren <swarren@nvidia.com>
> >>
> >> Some boards or SoCs have an inverter between the PMIC IRQ output pin and
> >> the IRQ controller input signal.
> >>
> >> The IRQ specifier in DT is meant to represent the IRQ flags at the input
> >> to the IRQ controller.
> >>
> >> The Palmas HW's IRQ output has configurable polarity. The driver
> >> currently selects the output polarity by querying the input polarity at
> >> the IRQ controller. This works fine if the IRQ signal is routed directly
> >> from the PMIC to the IRQ controller with no intervening logic. However,
> >> if the signal is inverted between the two, this automatic polarity
> >> selection gets the wrong answer.
> >>
> >> Add an additional optional DT and platform data parameter which indicates
> >> that such an inversion occurs. If this option is enabled, the Palmas
> >> driver will configure its IRQ output to the opposite polarity of the IRQ
> >> controller's input.
> >>
> >> An alternative would have been to add a new non-optional DT parameter to
> >> indicate the exact desired output polarity. However, this would have been
> >> an incompatible change to the DT binding.
> >>
> >> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> >> ---
> >> If this patch could be applied to its own branch (w/ signed tag) in the
> >> MFD tree, that would great; then I can pull patch 1/2 into the Tegra tree
> >> so that I can apply patch 2/2 to the Tegra tree. Thanks.
> >> ---
> >>  Documentation/devicetree/bindings/mfd/palmas.txt | 6 ++++++
> >>  drivers/mfd/palmas.c                             | 4 ++++
> >>  include/linux/mfd/palmas.h                       | 1 +
> >>  3 files changed, 11 insertions(+)
> > 
> > For the core changes:
> >   Acked-by: Lee Jones <lee.jones@linaro.org>
> 
> Thanks. Since you ack'd this and are an MFD maintainer, was that an
> indication that I should take this patch through the Tegra tree?

No, it was an indication that we still require more Acks. :)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
  2014-02-14 21:58 ` Stephen Warren
@ 2014-02-25  9:20     ` Lee Jones
  -1 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2014-02-25  9:20 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Samuel Ortiz, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, J Keerthy, Ian Lartey,
	Stefan Agner, josephl-DDmLM1+adcrQT0dZR+AlfA,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA, Stephen Warren

Mark,

> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> Some boards or SoCs have an inverter between the PMIC IRQ output pin and
> the IRQ controller input signal.
> 
> The IRQ specifier in DT is meant to represent the IRQ flags at the input
> to the IRQ controller.
> 
> The Palmas HW's IRQ output has configurable polarity. The driver
> currently selects the output polarity by querying the input polarity at
> the IRQ controller. This works fine if the IRQ signal is routed directly
> from the PMIC to the IRQ controller with no intervening logic. However,
> if the signal is inverted between the two, this automatic polarity
> selection gets the wrong answer.
> 
> Add an additional optional DT and platform data parameter which indicates
> that such an inversion occurs. If this option is enabled, the Palmas
> driver will configure its IRQ output to the opposite polarity of the IRQ
> controller's input.
> 
> An alternative would have been to add a new non-optional DT parameter to
> indicate the exact desired output polarity. However, this would have been
> an incompatible change to the DT binding.
> 
> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> If this patch could be applied to its own branch (w/ signed tag) in the
> MFD tree, that would great; then I can pull patch 1/2 into the Tegra tree
> so that I can apply patch 2/2 to the Tegra tree. Thanks.
> ---
>  Documentation/devicetree/bindings/mfd/palmas.txt | 6 ++++++

Would you care to review this for Stephen please?

>  drivers/mfd/palmas.c                             | 4 ++++
>  include/linux/mfd/palmas.h                       | 1 +
>  3 files changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/palmas.txt b/Documentation/devicetree/bindings/mfd/palmas.txt
> index e5f0f8303461..76ec509d5f87 100644
> --- a/Documentation/devicetree/bindings/mfd/palmas.txt
> +++ b/Documentation/devicetree/bindings/mfd/palmas.txt
> @@ -18,6 +18,12 @@ Required properties:
>    ti,tps659038
>  and also the generic series names
>    ti,palmas
> +- interrupts : Should contain a single entry for the IRQ output.
> +- ti,irq-externally-inverted : If missing, the polarity of the Palmas IRQ
> +  output should be set to the opposite of the polarity indicated by the IRQ
> +  specifier in the interrupts property. If absent, the polarity should be
> +  configured to match. This allows the representation of an inverter between
> +  the Palmas IRQ output and the interrupt parent's IRQ input.
>  - interrupt-controller : palmas has its own internal IRQs
>  - #interrupt-cells : should be set to 2 for IRQ number and flags
>    The first cell is the IRQ number.
> diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
> index d280d789e55a..f4ea932adf8d 100644
> --- a/drivers/mfd/palmas.c
> +++ b/drivers/mfd/palmas.c
> @@ -293,6 +293,8 @@ static int palmas_set_pdata_irq_flag(struct i2c_client *i2c,
>  	}
>  
>  	pdata->irq_flags = irqd_get_trigger_type(irq_data);
> +	pdata->irq_external_inversion = of_property_read_bool(i2c->dev.of_node,
> +						"ti,irq-externally-inverted");
>  	dev_info(&i2c->dev, "Irq flag is 0x%08x\n", pdata->irq_flags);
>  	return 0;
>  }
> @@ -447,6 +449,8 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
>  		reg = PALMAS_POLARITY_CTRL_INT_POLARITY;
>  	else
>  		reg = 0;
> +	if (pdata->irq_external_inversion)
> +		reg ^= PALMAS_POLARITY_CTRL_INT_POLARITY;
>  	ret = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>  			PALMAS_POLARITY_CTRL, PALMAS_POLARITY_CTRL_INT_POLARITY,
>  			reg);
> diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
> index 9974e387e483..2fdf08c50a48 100644
> --- a/include/linux/mfd/palmas.h
> +++ b/include/linux/mfd/palmas.h
> @@ -292,6 +292,7 @@ struct palmas_clk_platform_data {
>  
>  struct palmas_platform_data {
>  	int irq_flags;
> +	bool irq_external_inversion;
>  	int gpio_base;
>  
>  	/* bit value to be loaded to the POWER_CTRL register */

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level
@ 2014-02-25  9:20     ` Lee Jones
  0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2014-02-25  9:20 UTC (permalink / raw)
  To: linux-arm-kernel

Mark,

> From: Stephen Warren <swarren@nvidia.com>
> 
> Some boards or SoCs have an inverter between the PMIC IRQ output pin and
> the IRQ controller input signal.
> 
> The IRQ specifier in DT is meant to represent the IRQ flags at the input
> to the IRQ controller.
> 
> The Palmas HW's IRQ output has configurable polarity. The driver
> currently selects the output polarity by querying the input polarity at
> the IRQ controller. This works fine if the IRQ signal is routed directly
> from the PMIC to the IRQ controller with no intervening logic. However,
> if the signal is inverted between the two, this automatic polarity
> selection gets the wrong answer.
> 
> Add an additional optional DT and platform data parameter which indicates
> that such an inversion occurs. If this option is enabled, the Palmas
> driver will configure its IRQ output to the opposite polarity of the IRQ
> controller's input.
> 
> An alternative would have been to add a new non-optional DT parameter to
> indicate the exact desired output polarity. However, this would have been
> an incompatible change to the DT binding.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> If this patch could be applied to its own branch (w/ signed tag) in the
> MFD tree, that would great; then I can pull patch 1/2 into the Tegra tree
> so that I can apply patch 2/2 to the Tegra tree. Thanks.
> ---
>  Documentation/devicetree/bindings/mfd/palmas.txt | 6 ++++++

Would you care to review this for Stephen please?

>  drivers/mfd/palmas.c                             | 4 ++++
>  include/linux/mfd/palmas.h                       | 1 +
>  3 files changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/palmas.txt b/Documentation/devicetree/bindings/mfd/palmas.txt
> index e5f0f8303461..76ec509d5f87 100644
> --- a/Documentation/devicetree/bindings/mfd/palmas.txt
> +++ b/Documentation/devicetree/bindings/mfd/palmas.txt
> @@ -18,6 +18,12 @@ Required properties:
>    ti,tps659038
>  and also the generic series names
>    ti,palmas
> +- interrupts : Should contain a single entry for the IRQ output.
> +- ti,irq-externally-inverted : If missing, the polarity of the Palmas IRQ
> +  output should be set to the opposite of the polarity indicated by the IRQ
> +  specifier in the interrupts property. If absent, the polarity should be
> +  configured to match. This allows the representation of an inverter between
> +  the Palmas IRQ output and the interrupt parent's IRQ input.
>  - interrupt-controller : palmas has its own internal IRQs
>  - #interrupt-cells : should be set to 2 for IRQ number and flags
>    The first cell is the IRQ number.
> diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
> index d280d789e55a..f4ea932adf8d 100644
> --- a/drivers/mfd/palmas.c
> +++ b/drivers/mfd/palmas.c
> @@ -293,6 +293,8 @@ static int palmas_set_pdata_irq_flag(struct i2c_client *i2c,
>  	}
>  
>  	pdata->irq_flags = irqd_get_trigger_type(irq_data);
> +	pdata->irq_external_inversion = of_property_read_bool(i2c->dev.of_node,
> +						"ti,irq-externally-inverted");
>  	dev_info(&i2c->dev, "Irq flag is 0x%08x\n", pdata->irq_flags);
>  	return 0;
>  }
> @@ -447,6 +449,8 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
>  		reg = PALMAS_POLARITY_CTRL_INT_POLARITY;
>  	else
>  		reg = 0;
> +	if (pdata->irq_external_inversion)
> +		reg ^= PALMAS_POLARITY_CTRL_INT_POLARITY;
>  	ret = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>  			PALMAS_POLARITY_CTRL, PALMAS_POLARITY_CTRL_INT_POLARITY,
>  			reg);
> diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
> index 9974e387e483..2fdf08c50a48 100644
> --- a/include/linux/mfd/palmas.h
> +++ b/include/linux/mfd/palmas.h
> @@ -292,6 +292,7 @@ struct palmas_clk_platform_data {
>  
>  struct palmas_platform_data {
>  	int irq_flags;
> +	bool irq_external_inversion;
>  	int gpio_base;
>  
>  	/* bit value to be loaded to the POWER_CTRL register */

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2014-02-25  9:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14 21:58 [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level Stephen Warren
2014-02-14 21:58 ` Stephen Warren
     [not found] ` <1392415108-4365-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-02-14 21:58   ` [PATCH 2/2] ARM: tegra: fix Dalmore PMIC IRQ polarity Stephen Warren
2014-02-14 21:58     ` Stephen Warren
     [not found]     ` <1392415108-4365-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-02-17  8:32       ` Laxman Dewangan
2014-02-17  8:32         ` Laxman Dewangan
2014-02-17  8:31   ` [PATCH 1/2] mfd: palmas: support IRQ inversion at the board level Laxman Dewangan
2014-02-17  8:31     ` Laxman Dewangan
2014-02-17  9:26   ` Lee Jones
2014-02-17  9:26     ` Lee Jones
2014-02-18 17:42     ` Stephen Warren
2014-02-18 17:42       ` Stephen Warren
     [not found]       ` <53039B6D.8080004-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-02-18 18:01         ` Lee Jones
2014-02-18 18:01           ` Lee Jones
2014-02-25  9:20   ` Lee Jones
2014-02-25  9:20     ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.