All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Allwinner A83T R_LRADC support
@ 2017-06-24  2:45 ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-24  2:45 UTC (permalink / raw)
  To: maxime.ripard, wens, robh, mark.rutland
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-sunxi, Ziping Chen

From: Ziping Chen <techping.chan@gmail.com>

Hi,

This is the remaining parts of my A83T R_LRADC support series

Allwinner A83T SoC has a low res adc like the one in Allwinner
A10 SoC.

Add support for it. 

Changes for v3:
- Fix some issuses raised by Maxime.
- Added Rob's ACK.

Changes for v2:
- Add an A83T specific compatible.

Ziping Chen (3):
  input: sun4i-a10-lradc-keys: Add support for A83T
  dt-bindings: input: Add R_LRADC support for A83T
  ARM: dts: sunxi: Add R_LRADC support for A83T

 .../devicetree/bindings/input/sun4i-lradc-keys.txt |  6 ++--
 arch/arm/boot/dts/sun8i-a83t.dtsi                  |  7 ++++
 drivers/input/keyboard/sun4i-lradc-keys.c          | 38 +++++++++++++++++++---
 3 files changed, 45 insertions(+), 6 deletions(-)

-- 
2.11.0

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

* [PATCH v3 0/3] Allwinner A83T R_LRADC support
@ 2017-06-24  2:45 ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-24  2:45 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8, wens-jdAy2FN1RRM,
	robh-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Ziping Chen

From: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Hi,

This is the remaining parts of my A83T R_LRADC support series

Allwinner A83T SoC has a low res adc like the one in Allwinner
A10 SoC.

Add support for it. 

Changes for v3:
- Fix some issuses raised by Maxime.
- Added Rob's ACK.

Changes for v2:
- Add an A83T specific compatible.

Ziping Chen (3):
  input: sun4i-a10-lradc-keys: Add support for A83T
  dt-bindings: input: Add R_LRADC support for A83T
  ARM: dts: sunxi: Add R_LRADC support for A83T

 .../devicetree/bindings/input/sun4i-lradc-keys.txt |  6 ++--
 arch/arm/boot/dts/sun8i-a83t.dtsi                  |  7 ++++
 drivers/input/keyboard/sun4i-lradc-keys.c          | 38 +++++++++++++++++++---
 3 files changed, 45 insertions(+), 6 deletions(-)

-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 1/3] input: sun4i-a10-lradc-keys: Add support for A83T
  2017-06-24  2:45 ` Ziping Chen
  (?)
@ 2017-06-24  2:45 ` Ziping Chen
  2017-06-26 17:13     ` Maxime Ripard
  -1 siblings, 1 reply; 44+ messages in thread
From: Ziping Chen @ 2017-06-24  2:45 UTC (permalink / raw)
  To: maxime.ripard, wens, robh, mark.rutland
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-sunxi, Ziping Chen

From: Ziping Chen <techping.chan@gmail.com>

Allwinner A83T SoC has a low res adc like the one
in Allwinner A10 SoC, however, the A10 SoC's vref
of lradc internally is divided by 2/3 and the A83T
SoC's vref of lradc internally is divided by 3/4,
thus add a hardware variant for it to be compatible
with various devices.

Signed-off-by: Ziping Chen <techping.chan@gmail.com>
---
 drivers/input/keyboard/sun4i-lradc-keys.c | 38 +++++++++++++++++++++++++++----
 1 file changed, 34 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c
index a37c172452e6..bfd2038a9047 100644
--- a/drivers/input/keyboard/sun4i-lradc-keys.c
+++ b/drivers/input/keyboard/sun4i-lradc-keys.c
@@ -46,6 +46,7 @@
 #define CONTINUE_TIME_SEL(x)	((x) << 16) /* 4 bits */
 #define KEY_MODE_SEL(x)		((x) << 12) /* 2 bits */
 #define LEVELA_B_CNT(x)		((x) << 8)  /* 4 bits */
+#define HOLD_KEY_EN(x)		((x) << 7)
 #define HOLD_EN(x)		((x) << 6)
 #define LEVELB_VOL(x)		((x) << 4)  /* 2 bits */
 #define SAMPLE_RATE(x)		((x) << 2)  /* 2 bits */
@@ -63,6 +64,25 @@
 #define	CHAN0_KEYDOWN_IRQ	BIT(1)
 #define CHAN0_DATA_IRQ		BIT(0)
 
+/* struct lradc_variant - Describe sun4i-a10-lradc-keys hardware variant
+ * @divisor_numerator:		The numerator of lradc Vref internally divisor
+ * @divisor_denominator:	The denominator of lradc Vref internally divisor
+ */
+struct lradc_variant {
+	u8 divisor_numerator;
+	u8 divisor_denominator;
+};
+
+static const struct lradc_variant lradc_variant_a10 = {
+	.divisor_numerator = 2,
+	.divisor_denominator = 3
+};
+
+static const struct lradc_variant r_lradc_variant_a83t = {
+	.divisor_numerator = 3,
+	.divisor_denominator = 4
+};
+
 struct sun4i_lradc_keymap {
 	u32 voltage;
 	u32 keycode;
@@ -74,6 +94,7 @@ struct sun4i_lradc_data {
 	void __iomem *base;
 	struct regulator *vref_supply;
 	struct sun4i_lradc_keymap *chan0_map;
+	const struct lradc_variant *variant;
 	u32 chan0_map_count;
 	u32 chan0_keycode;
 	u32 vref;
@@ -128,9 +149,9 @@ static int sun4i_lradc_open(struct input_dev *dev)
 	if (error)
 		return error;
 
-	/* lradc Vref internally is divided by 2/3 */
-	lradc->vref = regulator_get_voltage(lradc->vref_supply) * 2 / 3;
-
+	lradc->vref = regulator_get_voltage(lradc->vref_supply) *
+		      lradc->variant->divisor_numerator /
+		      lradc->variant->divisor_denominator;
 	/*
 	 * Set sample time to 4 ms / 250 Hz. Wait 2 * 4 ms for key to
 	 * stabilize on press, wait (1 + 1) * 4 ms for key release
@@ -222,6 +243,12 @@ static int sun4i_lradc_probe(struct platform_device *pdev)
 	if (error)
 		return error;
 
+	lradc->variant = of_device_get_match_data(&pdev->dev);
+	if (!lradc->variant) {
+		dev_err(&pdev->dev, "Missing sun4i-a10-lradc-keys variant\n");
+		return -EINVAL;
+	}
+
 	lradc->vref_supply = devm_regulator_get(dev, "vref");
 	if (IS_ERR(lradc->vref_supply))
 		return PTR_ERR(lradc->vref_supply);
@@ -265,7 +292,10 @@ static int sun4i_lradc_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id sun4i_lradc_of_match[] = {
-	{ .compatible = "allwinner,sun4i-a10-lradc-keys", },
+	{ .compatible = "allwinner,sun4i-a10-lradc-keys",
+		.data = &lradc_variant_a10 },
+	{ .compatible = "allwinner,sun8i-a83t-r-lradc-keys",
+		.data = &r_lradc_variant_a83t },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sun4i_lradc_of_match);
-- 
2.11.0

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

* [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
  2017-06-24  2:45 ` Ziping Chen
  (?)
  (?)
@ 2017-06-24  2:45 ` Ziping Chen
  2017-06-26 17:15     ` Maxime Ripard
  -1 siblings, 1 reply; 44+ messages in thread
From: Ziping Chen @ 2017-06-24  2:45 UTC (permalink / raw)
  To: maxime.ripard, wens, robh, mark.rutland
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-sunxi, Ziping Chen

From: Ziping Chen <techping.chan@gmail.com>

Allwinner A83T SoC has a low res adc like the one
in Allwinner A10 SoC.

Add binding for it.

Signed-off-by: Ziping Chen <techping.chan@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
index 4357e498ef04..525d85e3043f 100644
--- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
+++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
@@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
 ------------------------------------------------
 
 Required properties:
- - compatible: "allwinner,sun4i-a10-lradc-keys"
+ - compatible: should be one of the following string:
+		"allwinner,sun4i-a10-lradc-keys"
+		"allwinner,sun8i-a83t-r-lradc-keys"
  - reg: mmio address range of the chip
  - interrupts: interrupt to which the chip is connected
  - vref-supply: powersupply for the lradc reference voltage
 
-Each key is represented as a sub-node of "allwinner,sun4i-a10-lradc-keys":
+Each key is represented as a sub-node of the compatible mentioned above:
 
 Required subnode-properties:
 	- label: Descriptive name of the key.
-- 
2.11.0

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

* [PATCH v3 3/3] ARM: dts: sunxi: Add R_LRADC support for A83T
  2017-06-24  2:45 ` Ziping Chen
                   ` (2 preceding siblings ...)
  (?)
@ 2017-06-24  2:45 ` Ziping Chen
  -1 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-24  2:45 UTC (permalink / raw)
  To: maxime.ripard, wens, robh, mark.rutland
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-sunxi, Ziping Chen

From: Ziping Chen <techping.chan@gmail.com>

Allwinner A83T SoC has a low res adc like the one
in Allwinner A10 SoC. Now the driver has been
modified to support it.

Add support for it.

Signed-off-by: Ziping Chen <techping.chan@gmail.com>
---
 arch/arm/boot/dts/sun8i-a83t.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
index 8923ba625b76..ccee83cc0610 100644
--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
@@ -301,5 +301,12 @@
 			interrupt-controller;
 			#interrupt-cells = <3>;
 		};
+
+		r_lradc: lradc@01f03c00 {
+			compatible = "allwinner,sun8i-a83t-r-lradc-keys";
+			reg = <0x01f03c00 0x100>;
+			interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
 	};
 };
-- 
2.11.0

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

* Re: [PATCH v3 1/3] input: sun4i-a10-lradc-keys: Add support for A83T
@ 2017-06-26 17:13     ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-26 17:13 UTC (permalink / raw)
  To: Ziping Chen
  Cc: wens, robh, mark.rutland, devicetree, linux-arm-kernel,
	linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

On Sat, Jun 24, 2017 at 10:45:13AM +0800, Ziping Chen wrote:
> From: Ziping Chen <techping.chan@gmail.com>
> 
> Allwinner A83T SoC has a low res adc like the one
> in Allwinner A10 SoC, however, the A10 SoC's vref
> of lradc internally is divided by 2/3 and the A83T
> SoC's vref of lradc internally is divided by 3/4,
> thus add a hardware variant for it to be compatible
> with various devices.
> 
> Signed-off-by: Ziping Chen <techping.chan@gmail.com>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH v3 1/3] input: sun4i-a10-lradc-keys: Add support for A83T
@ 2017-06-26 17:13     ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-26 17:13 UTC (permalink / raw)
  To: Ziping Chen
  Cc: wens-jdAy2FN1RRM, robh-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

On Sat, Jun 24, 2017 at 10:45:13AM +0800, Ziping Chen wrote:
> From: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> Allwinner A83T SoC has a low res adc like the one
> in Allwinner A10 SoC, however, the A10 SoC's vref
> of lradc internally is divided by 2/3 and the A83T
> SoC's vref of lradc internally is divided by 3/4,
> thus add a hardware variant for it to be compatible
> with various devices.
> 
> Signed-off-by: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* [PATCH v3 1/3] input: sun4i-a10-lradc-keys: Add support for A83T
@ 2017-06-26 17:13     ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-26 17:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jun 24, 2017 at 10:45:13AM +0800, Ziping Chen wrote:
> From: Ziping Chen <techping.chan@gmail.com>
> 
> Allwinner A83T SoC has a low res adc like the one
> in Allwinner A10 SoC, however, the A10 SoC's vref
> of lradc internally is divided by 2/3 and the A83T
> SoC's vref of lradc internally is divided by 3/4,
> thus add a hardware variant for it to be compatible
> with various devices.
> 
> Signed-off-by: Ziping Chen <techping.chan@gmail.com>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170626/bc41849d/attachment.sig>

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

* Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-26 17:15     ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-26 17:15 UTC (permalink / raw)
  To: Ziping Chen
  Cc: wens, robh, mark.rutland, devicetree, linux-arm-kernel,
	linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]

Hi,

On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
> From: Ziping Chen <techping.chan@gmail.com>
> 
> Allwinner A83T SoC has a low res adc like the one
> in Allwinner A10 SoC.
> 
> Add binding for it.
> 
> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
> Acked-by: Rob Herring <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> index 4357e498ef04..525d85e3043f 100644
> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>  ------------------------------------------------
>  
>  Required properties:
> - - compatible: "allwinner,sun4i-a10-lradc-keys"
> + - compatible: should be one of the following string:
> +		"allwinner,sun4i-a10-lradc-keys"
> +		"allwinner,sun8i-a83t-r-lradc-keys"

This doesn't really have anything related to keys, and can be used
purely as an ADC.

I know this is the compatible that was used for the A10, but I'd
rather drop the keys for the the new compatible.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-26 17:15     ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-26 17:15 UTC (permalink / raw)
  To: Ziping Chen
  Cc: wens-jdAy2FN1RRM, robh-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1553 bytes --]

Hi,

On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
> From: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> Allwinner A83T SoC has a low res adc like the one
> in Allwinner A10 SoC.
> 
> Add binding for it.
> 
> Signed-off-by: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> index 4357e498ef04..525d85e3043f 100644
> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>  ------------------------------------------------
>  
>  Required properties:
> - - compatible: "allwinner,sun4i-a10-lradc-keys"
> + - compatible: should be one of the following string:
> +		"allwinner,sun4i-a10-lradc-keys"
> +		"allwinner,sun8i-a83t-r-lradc-keys"

This doesn't really have anything related to keys, and can be used
purely as an ADC.

I know this is the compatible that was used for the A10, but I'd
rather drop the keys for the the new compatible.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-26 17:15     ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-26 17:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
> From: Ziping Chen <techping.chan@gmail.com>
> 
> Allwinner A83T SoC has a low res adc like the one
> in Allwinner A10 SoC.
> 
> Add binding for it.
> 
> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
> Acked-by: Rob Herring <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> index 4357e498ef04..525d85e3043f 100644
> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>  ------------------------------------------------
>  
>  Required properties:
> - - compatible: "allwinner,sun4i-a10-lradc-keys"
> + - compatible: should be one of the following string:
> +		"allwinner,sun4i-a10-lradc-keys"
> +		"allwinner,sun8i-a83t-r-lradc-keys"

This doesn't really have anything related to keys, and can be used
purely as an ADC.

I know this is the compatible that was used for the A10, but I'd
rather drop the keys for the the new compatible.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170626/6c5d9364/attachment.sig>

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

* Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 15:18       ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-27 15:18 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, mark.rutland, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> Hi,
>
> On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
>> From: Ziping Chen <techping.chan@gmail.com>
>>
>> Allwinner A83T SoC has a low res adc like the one
>> in Allwinner A10 SoC.
>>
>> Add binding for it.
>>
>> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
>> Acked-by: Rob Herring <robh@kernel.org>
>> ---
>>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> index 4357e498ef04..525d85e3043f 100644
>> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>>  ------------------------------------------------
>>
>>  Required properties:
>> - - compatible: "allwinner,sun4i-a10-lradc-keys"
>> + - compatible: should be one of the following string:
>> +             "allwinner,sun4i-a10-lradc-keys"
>> +             "allwinner,sun8i-a83t-r-lradc-keys"
>
> This doesn't really have anything related to keys, and can be used
> purely as an ADC.
>
> I know this is the compatible that was used for the A10, but I'd
> rather drop the keys for the the new compatible.
>

Hi,
LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
Manual V1.0), thus LRADC is related to keys.

Without keys there is another driver named sun4i-gpadc-iio which is
located at driver/iio/adc/sun4i-gpadc-iio.c

Is my understanding right?

> Thanks!
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 15:18       ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-27 15:18 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, mark.rutland-5wv7dgnIgG8,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>:
> Hi,
>
> On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
>> From: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>
>> Allwinner A83T SoC has a low res adc like the one
>> in Allwinner A10 SoC.
>>
>> Add binding for it.
>>
>> Signed-off-by: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>> ---
>>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> index 4357e498ef04..525d85e3043f 100644
>> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>>  ------------------------------------------------
>>
>>  Required properties:
>> - - compatible: "allwinner,sun4i-a10-lradc-keys"
>> + - compatible: should be one of the following string:
>> +             "allwinner,sun4i-a10-lradc-keys"
>> +             "allwinner,sun8i-a83t-r-lradc-keys"
>
> This doesn't really have anything related to keys, and can be used
> purely as an ADC.
>
> I know this is the compatible that was used for the A10, but I'd
> rather drop the keys for the the new compatible.
>

Hi,
LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
Manual V1.0), thus LRADC is related to keys.

Without keys there is another driver named sun4i-gpadc-iio which is
located at driver/iio/adc/sun4i-gpadc-iio.c

Is my understanding right?

> Thanks!
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 15:18       ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-27 15:18 UTC (permalink / raw)
  To: linux-arm-kernel

2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> Hi,
>
> On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
>> From: Ziping Chen <techping.chan@gmail.com>
>>
>> Allwinner A83T SoC has a low res adc like the one
>> in Allwinner A10 SoC.
>>
>> Add binding for it.
>>
>> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
>> Acked-by: Rob Herring <robh@kernel.org>
>> ---
>>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> index 4357e498ef04..525d85e3043f 100644
>> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>>  ------------------------------------------------
>>
>>  Required properties:
>> - - compatible: "allwinner,sun4i-a10-lradc-keys"
>> + - compatible: should be one of the following string:
>> +             "allwinner,sun4i-a10-lradc-keys"
>> +             "allwinner,sun8i-a83t-r-lradc-keys"
>
> This doesn't really have anything related to keys, and can be used
> purely as an ADC.
>
> I know this is the compatible that was used for the A10, but I'd
> rather drop the keys for the the new compatible.
>

Hi,
LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
Manual V1.0), thus LRADC is related to keys.

Without keys there is another driver named sun4i-gpadc-iio which is
located at driver/iio/adc/sun4i-gpadc-iio.c

Is my understanding right?

> Thanks!
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* Re: [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 15:29         ` icenowy-h8G6r0blFSE
  0 siblings, 0 replies; 44+ messages in thread
From: icenowy @ 2017-06-27 15:29 UTC (permalink / raw)
  To: techping.chan
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, mark.rutland,
	devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

在 2017-06-27 23:18,Ziping Chen 写道:
> 2017-06-27 1:15 GMT+08:00 Maxime Ripard 
> <maxime.ripard@free-electrons.com>:
>> Hi,
>> 
>> On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
>>> From: Ziping Chen <techping.chan@gmail.com>
>>> 
>>> Allwinner A83T SoC has a low res adc like the one
>>> in Allwinner A10 SoC.
>>> 
>>> Add binding for it.
>>> 
>>> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
>>> Acked-by: Rob Herring <robh@kernel.org>
>>> ---
>>>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 
>>> ++++--
>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>> 
>>> diff --git 
>>> a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt 
>>> b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>>> index 4357e498ef04..525d85e3043f 100644
>>> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>>> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>>> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>>>  ------------------------------------------------
>>> 
>>>  Required properties:
>>> - - compatible: "allwinner,sun4i-a10-lradc-keys"
>>> + - compatible: should be one of the following string:
>>> +             "allwinner,sun4i-a10-lradc-keys"
>>> +             "allwinner,sun8i-a83t-r-lradc-keys"
>> 
>> This doesn't really have anything related to keys, and can be used
>> purely as an ADC.
>> 
>> I know this is the compatible that was used for the A10, but I'd
>> rather drop the keys for the the new compatible.
>> 
> 
> Hi,
> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
> Manual V1.0), thus LRADC is related to keys.
> 
> Without keys there is another driver named sun4i-gpadc-iio which is
> located at driver/iio/adc/sun4i-gpadc-iio.c

Nope. The general purpose LRADC driver still doesn't land in mainline,
and this driver is for the GPADC related to thermal and resistive
touch screen.

However, the LRADC is possible to be used in general purpose, and
more and more boards are wiring the LRADC pin as a pin on the pinout
(e.g. Pine64 and Lichee Pi Zero) and it may be useful.

And the hardware is not bound to keys -- it's only the Allwinner
reference design which bind the LRADC to keys. Device vendors can
change it if needed.

So it's suggested to have a binding without "-keys".

Maxime, here's another problem: if we have already a GP LRADC driver,
how can we tell the kernel to use it as IIO ADC rather than keys?
Should we introduce a new property for this once ready?

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

* Re: Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 15:29         ` icenowy-h8G6r0blFSE
  0 siblings, 0 replies; 44+ messages in thread
From: icenowy-h8G6r0blFSE @ 2017-06-27 15:29 UTC (permalink / raw)
  To: techping.chan-Re5JQEeQqe8AvxtiuMwx3w
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring,
	mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

在 2017-06-27 23:18,Ziping Chen 写道:
> 2017-06-27 1:15 GMT+08:00 Maxime Ripard 
> <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>:
>> Hi,
>> 
>> On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
>>> From: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> 
>>> Allwinner A83T SoC has a low res adc like the one
>>> in Allwinner A10 SoC.
>>> 
>>> Add binding for it.
>>> 
>>> Signed-off-by: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>>> ---
>>>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 
>>> ++++--
>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>> 
>>> diff --git 
>>> a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt 
>>> b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>>> index 4357e498ef04..525d85e3043f 100644
>>> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>>> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>>> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>>>  ------------------------------------------------
>>> 
>>>  Required properties:
>>> - - compatible: "allwinner,sun4i-a10-lradc-keys"
>>> + - compatible: should be one of the following string:
>>> +             "allwinner,sun4i-a10-lradc-keys"
>>> +             "allwinner,sun8i-a83t-r-lradc-keys"
>> 
>> This doesn't really have anything related to keys, and can be used
>> purely as an ADC.
>> 
>> I know this is the compatible that was used for the A10, but I'd
>> rather drop the keys for the the new compatible.
>> 
> 
> Hi,
> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
> Manual V1.0), thus LRADC is related to keys.
> 
> Without keys there is another driver named sun4i-gpadc-iio which is
> located at driver/iio/adc/sun4i-gpadc-iio.c

Nope. The general purpose LRADC driver still doesn't land in mainline,
and this driver is for the GPADC related to thermal and resistive
touch screen.

However, the LRADC is possible to be used in general purpose, and
more and more boards are wiring the LRADC pin as a pin on the pinout
(e.g. Pine64 and Lichee Pi Zero) and it may be useful.

And the hardware is not bound to keys -- it's only the Allwinner
reference design which bind the LRADC to keys. Device vendors can
change it if needed.

So it's suggested to have a binding without "-keys".

Maxime, here's another problem: if we have already a GP LRADC driver,
how can we tell the kernel to use it as IIO ADC rather than keys?
Should we introduce a new property for this once ready?

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

* [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 15:29         ` icenowy-h8G6r0blFSE
  0 siblings, 0 replies; 44+ messages in thread
From: icenowy at aosc.io @ 2017-06-27 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

? 2017-06-27 23:18?Ziping Chen ???
> 2017-06-27 1:15 GMT+08:00 Maxime Ripard 
> <maxime.ripard@free-electrons.com>:
>> Hi,
>> 
>> On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
>>> From: Ziping Chen <techping.chan@gmail.com>
>>> 
>>> Allwinner A83T SoC has a low res adc like the one
>>> in Allwinner A10 SoC.
>>> 
>>> Add binding for it.
>>> 
>>> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
>>> Acked-by: Rob Herring <robh@kernel.org>
>>> ---
>>>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 
>>> ++++--
>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>> 
>>> diff --git 
>>> a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt 
>>> b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>>> index 4357e498ef04..525d85e3043f 100644
>>> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>>> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>>> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>>>  ------------------------------------------------
>>> 
>>>  Required properties:
>>> - - compatible: "allwinner,sun4i-a10-lradc-keys"
>>> + - compatible: should be one of the following string:
>>> +             "allwinner,sun4i-a10-lradc-keys"
>>> +             "allwinner,sun8i-a83t-r-lradc-keys"
>> 
>> This doesn't really have anything related to keys, and can be used
>> purely as an ADC.
>> 
>> I know this is the compatible that was used for the A10, but I'd
>> rather drop the keys for the the new compatible.
>> 
> 
> Hi,
> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
> Manual V1.0), thus LRADC is related to keys.
> 
> Without keys there is another driver named sun4i-gpadc-iio which is
> located at driver/iio/adc/sun4i-gpadc-iio.c

Nope. The general purpose LRADC driver still doesn't land in mainline,
and this driver is for the GPADC related to thermal and resistive
touch screen.

However, the LRADC is possible to be used in general purpose, and
more and more boards are wiring the LRADC pin as a pin on the pinout
(e.g. Pine64 and Lichee Pi Zero) and it may be useful.

And the hardware is not bound to keys -- it's only the Allwinner
reference design which bind the LRADC to keys. Device vendors can
change it if needed.

So it's suggested to have a binding without "-keys".

Maxime, here's another problem: if we have already a GP LRADC driver,
how can we tell the kernel to use it as IIO ADC rather than keys?
Should we introduce a new property for this once ready?

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

* Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 17:31         ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-27 17:31 UTC (permalink / raw)
  To: Ziping Chen
  Cc: Chen-Yu Tsai, Rob Herring, mark.rutland, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 2013 bytes --]

On Tue, Jun 27, 2017 at 11:18:17PM +0800, Ziping Chen wrote:
> 2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> > Hi,
> >
> > On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
> >> From: Ziping Chen <techping.chan@gmail.com>
> >>
> >> Allwinner A83T SoC has a low res adc like the one
> >> in Allwinner A10 SoC.
> >>
> >> Add binding for it.
> >>
> >> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
> >> Acked-by: Rob Herring <robh@kernel.org>
> >> ---
> >>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> index 4357e498ef04..525d85e3043f 100644
> >> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
> >>  ------------------------------------------------
> >>
> >>  Required properties:
> >> - - compatible: "allwinner,sun4i-a10-lradc-keys"
> >> + - compatible: should be one of the following string:
> >> +             "allwinner,sun4i-a10-lradc-keys"
> >> +             "allwinner,sun8i-a83t-r-lradc-keys"
> >
> > This doesn't really have anything related to keys, and can be used
> > purely as an ADC.
> >
> > I know this is the compatible that was used for the A10, but I'd
> > rather drop the keys for the the new compatible.
> >
> 
> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
> Manual V1.0), thus LRADC is related to keys.

It's still called LRADC on the A83T, so we'll use that name. If we
ever need another compatible for the R40, then yes, keyadc would make
sense in that case.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 17:31         ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-27 17:31 UTC (permalink / raw)
  To: Ziping Chen
  Cc: Chen-Yu Tsai, Rob Herring, mark.rutland-5wv7dgnIgG8,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2133 bytes --]

On Tue, Jun 27, 2017 at 11:18:17PM +0800, Ziping Chen wrote:
> 2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>:
> > Hi,
> >
> > On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
> >> From: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >>
> >> Allwinner A83T SoC has a low res adc like the one
> >> in Allwinner A10 SoC.
> >>
> >> Add binding for it.
> >>
> >> Signed-off-by: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> >> ---
> >>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> index 4357e498ef04..525d85e3043f 100644
> >> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
> >>  ------------------------------------------------
> >>
> >>  Required properties:
> >> - - compatible: "allwinner,sun4i-a10-lradc-keys"
> >> + - compatible: should be one of the following string:
> >> +             "allwinner,sun4i-a10-lradc-keys"
> >> +             "allwinner,sun8i-a83t-r-lradc-keys"
> >
> > This doesn't really have anything related to keys, and can be used
> > purely as an ADC.
> >
> > I know this is the compatible that was used for the A10, but I'd
> > rather drop the keys for the the new compatible.
> >
> 
> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
> Manual V1.0), thus LRADC is related to keys.

It's still called LRADC on the A83T, so we'll use that name. If we
ever need another compatible for the R40, then yes, keyadc would make
sense in that case.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 17:31         ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-27 17:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 27, 2017 at 11:18:17PM +0800, Ziping Chen wrote:
> 2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> > Hi,
> >
> > On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
> >> From: Ziping Chen <techping.chan@gmail.com>
> >>
> >> Allwinner A83T SoC has a low res adc like the one
> >> in Allwinner A10 SoC.
> >>
> >> Add binding for it.
> >>
> >> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
> >> Acked-by: Rob Herring <robh@kernel.org>
> >> ---
> >>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> index 4357e498ef04..525d85e3043f 100644
> >> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
> >>  ------------------------------------------------
> >>
> >>  Required properties:
> >> - - compatible: "allwinner,sun4i-a10-lradc-keys"
> >> + - compatible: should be one of the following string:
> >> +             "allwinner,sun4i-a10-lradc-keys"
> >> +             "allwinner,sun8i-a83t-r-lradc-keys"
> >
> > This doesn't really have anything related to keys, and can be used
> > purely as an ADC.
> >
> > I know this is the compatible that was used for the A10, but I'd
> > rather drop the keys for the the new compatible.
> >
> 
> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
> Manual V1.0), thus LRADC is related to keys.

It's still called LRADC on the A83T, so we'll use that name. If we
ever need another compatible for the R40, then yes, keyadc would make
sense in that case.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170627/5159b6b8/attachment.sig>

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

* Re: [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 17:36           ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-27 17:36 UTC (permalink / raw)
  To: icenowy
  Cc: techping.chan, Chen-Yu Tsai, Rob Herring, mark.rutland,
	devicetree, linux-arm-kernel, linux-kernel, linux-sunxi,
	Alexandre Belloni

[-- Attachment #1: Type: text/plain, Size: 873 bytes --]

Hi,

On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy@aosc.io wrote:
> Maxime, here's another problem: if we have already a GP LRADC driver,
> how can we tell the kernel to use it as IIO ADC rather than keys?

The GPADC IIO driver is not for the LRADC driver, but the GPADC /
temperature sensor.

We used to have an LRADC IIO driver in the CHIP BSP written by Alex
(in CC):
https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27

But he never mainlined it.

> Should we introduce a new property for this once ready?

We need to keep the current binding. We can just check for the
presence or not of child nodes to see if it has some keys, and we'd
need an IIO-to-input driver that is yet to be written.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 17:36           ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-27 17:36 UTC (permalink / raw)
  To: icenowy-h8G6r0blFSE
  Cc: techping.chan-Re5JQEeQqe8AvxtiuMwx3w, Chen-Yu Tsai, Rob Herring,
	mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Alexandre Belloni

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

Hi,

On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy-h8G6r0blFSE@public.gmane.org wrote:
> Maxime, here's another problem: if we have already a GP LRADC driver,
> how can we tell the kernel to use it as IIO ADC rather than keys?

The GPADC IIO driver is not for the LRADC driver, but the GPADC /
temperature sensor.

We used to have an LRADC IIO driver in the CHIP BSP written by Alex
(in CC):
https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27

But he never mainlined it.

> Should we introduce a new property for this once ready?

We need to keep the current binding. We can just check for the
presence or not of child nodes to see if it has some keys, and we'd
need an IIO-to-input driver that is yet to be written.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 17:36           ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-27 17:36 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy at aosc.io wrote:
> Maxime, here's another problem: if we have already a GP LRADC driver,
> how can we tell the kernel to use it as IIO ADC rather than keys?

The GPADC IIO driver is not for the LRADC driver, but the GPADC /
temperature sensor.

We used to have an LRADC IIO driver in the CHIP BSP written by Alex
(in CC):
https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27

But he never mainlined it.

> Should we introduce a new property for this once ready?

We need to keep the current binding. We can just check for the
presence or not of child nodes to see if it has some keys, and we'd
need an IIO-to-input driver that is yet to be written.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170627/a9ba0799/attachment.sig>

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

* Re: [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
  2017-06-27 17:36           ` Maxime Ripard
  (?)
@ 2017-06-27 18:15             ` Alexandre Belloni
  -1 siblings, 0 replies; 44+ messages in thread
From: Alexandre Belloni @ 2017-06-27 18:15 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: icenowy, techping.chan, Chen-Yu Tsai, Rob Herring, mark.rutland,
	devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

On 27/06/2017 at 19:36:31 +0200, Maxime Ripard wrote:
> Hi,
> 
> On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy@aosc.io wrote:
> > Maxime, here's another problem: if we have already a GP LRADC driver,
> > how can we tell the kernel to use it as IIO ADC rather than keys?
> 
> The GPADC IIO driver is not for the LRADC driver, but the GPADC /
> temperature sensor.
> 
> We used to have an LRADC IIO driver in the CHIP BSP written by Alex
> (in CC):
> https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
> 
> But he never mainlined it.
> 
> > Should we introduce a new property for this once ready?
> 
> We need to keep the current binding. We can just check for the
> presence or not of child nodes to see if it has some keys, and we'd
> need an IIO-to-input driver that is yet to be written.
> 

The whole submission is here and can already replace the existing driver
but it will be polling instead of using interrupts:

http://lists.infradead.org/pipermail/linux-arm-kernel/2016-July/440734.html

It is not upstream because it seems the full replacement was required at
once instead of doing it incrementally and there was (is) no API for
in-kernel events consumers.

Also, the DT ABI stuff would have to be solved.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* Re: [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 18:15             ` Alexandre Belloni
  0 siblings, 0 replies; 44+ messages in thread
From: Alexandre Belloni @ 2017-06-27 18:15 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: icenowy-h8G6r0blFSE, techping.chan-Re5JQEeQqe8AvxtiuMwx3w,
	Chen-Yu Tsai, Rob Herring, mark.rutland-5wv7dgnIgG8,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

On 27/06/2017 at 19:36:31 +0200, Maxime Ripard wrote:
> Hi,
> 
> On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy-h8G6r0blFSE@public.gmane.org wrote:
> > Maxime, here's another problem: if we have already a GP LRADC driver,
> > how can we tell the kernel to use it as IIO ADC rather than keys?
> 
> The GPADC IIO driver is not for the LRADC driver, but the GPADC /
> temperature sensor.
> 
> We used to have an LRADC IIO driver in the CHIP BSP written by Alex
> (in CC):
> https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
> 
> But he never mainlined it.
> 
> > Should we introduce a new property for this once ready?
> 
> We need to keep the current binding. We can just check for the
> presence or not of child nodes to see if it has some keys, and we'd
> need an IIO-to-input driver that is yet to be written.
> 

The whole submission is here and can already replace the existing driver
but it will be polling instead of using interrupts:

http://lists.infradead.org/pipermail/linux-arm-kernel/2016-July/440734.html

It is not upstream because it seems the full replacement was required at
once instead of doing it incrementally and there was (is) no API for
in-kernel events consumers.

Also, the DT ABI stuff would have to be solved.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-27 18:15             ` Alexandre Belloni
  0 siblings, 0 replies; 44+ messages in thread
From: Alexandre Belloni @ 2017-06-27 18:15 UTC (permalink / raw)
  To: linux-arm-kernel

On 27/06/2017 at 19:36:31 +0200, Maxime Ripard wrote:
> Hi,
> 
> On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy at aosc.io wrote:
> > Maxime, here's another problem: if we have already a GP LRADC driver,
> > how can we tell the kernel to use it as IIO ADC rather than keys?
> 
> The GPADC IIO driver is not for the LRADC driver, but the GPADC /
> temperature sensor.
> 
> We used to have an LRADC IIO driver in the CHIP BSP written by Alex
> (in CC):
> https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
> 
> But he never mainlined it.
> 
> > Should we introduce a new property for this once ready?
> 
> We need to keep the current binding. We can just check for the
> presence or not of child nodes to see if it has some keys, and we'd
> need an IIO-to-input driver that is yet to be written.
> 

The whole submission is here and can already replace the existing driver
but it will be polling instead of using interrupts:

http://lists.infradead.org/pipermail/linux-arm-kernel/2016-July/440734.html

It is not upstream because it seems the full replacement was required at
once instead of doing it incrementally and there was (is) no API for
in-kernel events consumers.

Also, the DT ABI stuff would have to be solved.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
  2017-06-27 17:31         ` Maxime Ripard
  (?)
@ 2017-06-29  4:35           ` Ziping Chen
  -1 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-29  4:35 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, mark.rutland, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

2017-06-28 1:31 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> On Tue, Jun 27, 2017 at 11:18:17PM +0800, Ziping Chen wrote:
>> 2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
>> > Hi,
>> >
>> > On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
>> >> From: Ziping Chen <techping.chan@gmail.com>
>> >>
>> >> Allwinner A83T SoC has a low res adc like the one
>> >> in Allwinner A10 SoC.
>> >>
>> >> Add binding for it.
>> >>
>> >> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
>> >> Acked-by: Rob Herring <robh@kernel.org>
>> >> ---
>> >>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
>> >>  1 file changed, 4 insertions(+), 2 deletions(-)
>> >>
>> >> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> >> index 4357e498ef04..525d85e3043f 100644
>> >> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> >> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> >> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>> >>  ------------------------------------------------
>> >>
>> >>  Required properties:
>> >> - - compatible: "allwinner,sun4i-a10-lradc-keys"
>> >> + - compatible: should be one of the following string:
>> >> +             "allwinner,sun4i-a10-lradc-keys"
>> >> +             "allwinner,sun8i-a83t-r-lradc-keys"
>> >
>> > This doesn't really have anything related to keys, and can be used
>> > purely as an ADC.
>> >
>> > I know this is the compatible that was used for the A10, but I'd
>> > rather drop the keys for the the new compatible.
>> >
>>
>> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
>> Manual V1.0), thus LRADC is related to keys.
>
> It's still called LRADC on the A83T, so we'll use that name. If we
> ever need another compatible for the R40, then yes, keyadc would make
> sense in that case.

Hi,

So... whether to use "sun4i-lradc" to replace "sun4i-lradc-keys"?

I think it should be separated, one is the input subsystem, the other
is the iio subsystem.

>
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29  4:35           ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-29  4:35 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, mark.rutland-5wv7dgnIgG8,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

2017-06-28 1:31 GMT+08:00 Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>:
> On Tue, Jun 27, 2017 at 11:18:17PM +0800, Ziping Chen wrote:
>> 2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>:
>> > Hi,
>> >
>> > On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
>> >> From: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> >>
>> >> Allwinner A83T SoC has a low res adc like the one
>> >> in Allwinner A10 SoC.
>> >>
>> >> Add binding for it.
>> >>
>> >> Signed-off-by: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> >> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>> >> ---
>> >>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
>> >>  1 file changed, 4 insertions(+), 2 deletions(-)
>> >>
>> >> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> >> index 4357e498ef04..525d85e3043f 100644
>> >> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> >> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> >> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>> >>  ------------------------------------------------
>> >>
>> >>  Required properties:
>> >> - - compatible: "allwinner,sun4i-a10-lradc-keys"
>> >> + - compatible: should be one of the following string:
>> >> +             "allwinner,sun4i-a10-lradc-keys"
>> >> +             "allwinner,sun8i-a83t-r-lradc-keys"
>> >
>> > This doesn't really have anything related to keys, and can be used
>> > purely as an ADC.
>> >
>> > I know this is the compatible that was used for the A10, but I'd
>> > rather drop the keys for the the new compatible.
>> >
>>
>> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
>> Manual V1.0), thus LRADC is related to keys.
>
> It's still called LRADC on the A83T, so we'll use that name. If we
> ever need another compatible for the R40, then yes, keyadc would make
> sense in that case.

Hi,

So... whether to use "sun4i-lradc" to replace "sun4i-lradc-keys"?

I think it should be separated, one is the input subsystem, the other
is the iio subsystem.

>
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29  4:35           ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-29  4:35 UTC (permalink / raw)
  To: linux-arm-kernel

2017-06-28 1:31 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> On Tue, Jun 27, 2017 at 11:18:17PM +0800, Ziping Chen wrote:
>> 2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
>> > Hi,
>> >
>> > On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
>> >> From: Ziping Chen <techping.chan@gmail.com>
>> >>
>> >> Allwinner A83T SoC has a low res adc like the one
>> >> in Allwinner A10 SoC.
>> >>
>> >> Add binding for it.
>> >>
>> >> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
>> >> Acked-by: Rob Herring <robh@kernel.org>
>> >> ---
>> >>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
>> >>  1 file changed, 4 insertions(+), 2 deletions(-)
>> >>
>> >> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> >> index 4357e498ef04..525d85e3043f 100644
>> >> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> >> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
>> >> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
>> >>  ------------------------------------------------
>> >>
>> >>  Required properties:
>> >> - - compatible: "allwinner,sun4i-a10-lradc-keys"
>> >> + - compatible: should be one of the following string:
>> >> +             "allwinner,sun4i-a10-lradc-keys"
>> >> +             "allwinner,sun8i-a83t-r-lradc-keys"
>> >
>> > This doesn't really have anything related to keys, and can be used
>> > purely as an ADC.
>> >
>> > I know this is the compatible that was used for the A10, but I'd
>> > rather drop the keys for the the new compatible.
>> >
>>
>> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
>> Manual V1.0), thus LRADC is related to keys.
>
> It's still called LRADC on the A83T, so we'll use that name. If we
> ever need another compatible for the R40, then yes, keyadc would make
> sense in that case.

Hi,

So... whether to use "sun4i-lradc" to replace "sun4i-lradc-keys"?

I think it should be separated, one is the input subsystem, the other
is the iio subsystem.

>
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* Re: [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
  2017-06-27 17:36           ` Maxime Ripard
  (?)
@ 2017-06-29  4:45             ` Ziping Chen
  -1 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-29  4:45 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: icenowy, Chen-Yu Tsai, Rob Herring, mark.rutland, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi, Alexandre Belloni

2017-06-28 1:36 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> Hi,
>
> On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy@aosc.io wrote:
>> Maxime, here's another problem: if we have already a GP LRADC driver,
>> how can we tell the kernel to use it as IIO ADC rather than keys?
>
> The GPADC IIO driver is not for the LRADC driver, but the GPADC /
> temperature sensor.
>
> We used to have an LRADC IIO driver in the CHIP BSP written by Alex
> (in CC):
> https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
>
> But he never mainlined it.
>
>> Should we introduce a new property for this once ready?
>
> We need to keep the current binding. We can just check for the
> presence or not of child nodes to see if it has some keys, and we'd
> need an IIO-to-input driver that is yet to be written.
>

Yes, then we need an iio-to-input driver...
So...whether the driver(a83t lradc keys) can be applied now,
or we should wait for the iio-to-input driver.

Thanks
Ziping

> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* Re: Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29  4:45             ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-29  4:45 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: icenowy-h8G6r0blFSE, Chen-Yu Tsai, Rob Herring,
	mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Alexandre Belloni

2017-06-28 1:36 GMT+08:00 Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>:
> Hi,
>
> On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy-h8G6r0blFSE@public.gmane.org wrote:
>> Maxime, here's another problem: if we have already a GP LRADC driver,
>> how can we tell the kernel to use it as IIO ADC rather than keys?
>
> The GPADC IIO driver is not for the LRADC driver, but the GPADC /
> temperature sensor.
>
> We used to have an LRADC IIO driver in the CHIP BSP written by Alex
> (in CC):
> https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
>
> But he never mainlined it.
>
>> Should we introduce a new property for this once ready?
>
> We need to keep the current binding. We can just check for the
> presence or not of child nodes to see if it has some keys, and we'd
> need an IIO-to-input driver that is yet to be written.
>

Yes, then we need an iio-to-input driver...
So...whether the driver(a83t lradc keys) can be applied now,
or we should wait for the iio-to-input driver.

Thanks
Ziping

> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29  4:45             ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-29  4:45 UTC (permalink / raw)
  To: linux-arm-kernel

2017-06-28 1:36 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> Hi,
>
> On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy at aosc.io wrote:
>> Maxime, here's another problem: if we have already a GP LRADC driver,
>> how can we tell the kernel to use it as IIO ADC rather than keys?
>
> The GPADC IIO driver is not for the LRADC driver, but the GPADC /
> temperature sensor.
>
> We used to have an LRADC IIO driver in the CHIP BSP written by Alex
> (in CC):
> https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
>
> But he never mainlined it.
>
>> Should we introduce a new property for this once ready?
>
> We need to keep the current binding. We can just check for the
> presence or not of child nodes to see if it has some keys, and we'd
> need an IIO-to-input driver that is yet to be written.
>

Yes, then we need an iio-to-input driver...
So...whether the driver(a83t lradc keys) can be applied now,
or we should wait for the iio-to-input driver.

Thanks
Ziping

> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29  7:52             ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-29  7:52 UTC (permalink / raw)
  To: Ziping Chen
  Cc: Chen-Yu Tsai, Rob Herring, mark.rutland, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 2634 bytes --]

Hi,

On Thu, Jun 29, 2017 at 12:35:30PM +0800, Ziping Chen wrote:
> 2017-06-28 1:31 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> > On Tue, Jun 27, 2017 at 11:18:17PM +0800, Ziping Chen wrote:
> >> 2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> >> > Hi,
> >> >
> >> > On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
> >> >> From: Ziping Chen <techping.chan@gmail.com>
> >> >>
> >> >> Allwinner A83T SoC has a low res adc like the one
> >> >> in Allwinner A10 SoC.
> >> >>
> >> >> Add binding for it.
> >> >>
> >> >> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
> >> >> Acked-by: Rob Herring <robh@kernel.org>
> >> >> ---
> >> >>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
> >> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >> >>
> >> >> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> >> index 4357e498ef04..525d85e3043f 100644
> >> >> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> >> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> >> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
> >> >>  ------------------------------------------------
> >> >>
> >> >>  Required properties:
> >> >> - - compatible: "allwinner,sun4i-a10-lradc-keys"
> >> >> + - compatible: should be one of the following string:
> >> >> +             "allwinner,sun4i-a10-lradc-keys"
> >> >> +             "allwinner,sun8i-a83t-r-lradc-keys"
> >> >
> >> > This doesn't really have anything related to keys, and can be used
> >> > purely as an ADC.
> >> >
> >> > I know this is the compatible that was used for the A10, but I'd
> >> > rather drop the keys for the the new compatible.
> >> >
> >>
> >> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
> >> Manual V1.0), thus LRADC is related to keys.
> >
> > It's still called LRADC on the A83T, so we'll use that name. If we
> > ever need another compatible for the R40, then yes, keyadc would make
> > sense in that case.
> 
> Hi,
> 
> So... whether to use "sun4i-lradc" to replace "sun4i-lradc-keys"?
> 
> I think it should be separated, one is the input subsystem, the other
> is the iio subsystem.

I was just talking about your compatible here, and was basically
suggesting to do sed 's/sun8i-a83t-r-lradc-keys/sun8i-a83t-r-lradc/',
that's all.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29  7:52             ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-29  7:52 UTC (permalink / raw)
  To: Ziping Chen
  Cc: Chen-Yu Tsai, Rob Herring, mark.rutland-5wv7dgnIgG8,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2754 bytes --]

Hi,

On Thu, Jun 29, 2017 at 12:35:30PM +0800, Ziping Chen wrote:
> 2017-06-28 1:31 GMT+08:00 Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>:
> > On Tue, Jun 27, 2017 at 11:18:17PM +0800, Ziping Chen wrote:
> >> 2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> >> > Hi,
> >> >
> >> > On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
> >> >> From: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> >>
> >> >> Allwinner A83T SoC has a low res adc like the one
> >> >> in Allwinner A10 SoC.
> >> >>
> >> >> Add binding for it.
> >> >>
> >> >> Signed-off-by: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> >> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> >> >> ---
> >> >>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
> >> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >> >>
> >> >> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> >> index 4357e498ef04..525d85e3043f 100644
> >> >> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> >> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> >> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
> >> >>  ------------------------------------------------
> >> >>
> >> >>  Required properties:
> >> >> - - compatible: "allwinner,sun4i-a10-lradc-keys"
> >> >> + - compatible: should be one of the following string:
> >> >> +             "allwinner,sun4i-a10-lradc-keys"
> >> >> +             "allwinner,sun8i-a83t-r-lradc-keys"
> >> >
> >> > This doesn't really have anything related to keys, and can be used
> >> > purely as an ADC.
> >> >
> >> > I know this is the compatible that was used for the A10, but I'd
> >> > rather drop the keys for the the new compatible.
> >> >
> >>
> >> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
> >> Manual V1.0), thus LRADC is related to keys.
> >
> > It's still called LRADC on the A83T, so we'll use that name. If we
> > ever need another compatible for the R40, then yes, keyadc would make
> > sense in that case.
> 
> Hi,
> 
> So... whether to use "sun4i-lradc" to replace "sun4i-lradc-keys"?
> 
> I think it should be separated, one is the input subsystem, the other
> is the iio subsystem.

I was just talking about your compatible here, and was basically
suggesting to do sed 's/sun8i-a83t-r-lradc-keys/sun8i-a83t-r-lradc/',
that's all.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29  7:52             ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-29  7:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Thu, Jun 29, 2017 at 12:35:30PM +0800, Ziping Chen wrote:
> 2017-06-28 1:31 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> > On Tue, Jun 27, 2017 at 11:18:17PM +0800, Ziping Chen wrote:
> >> 2017-06-27 1:15 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> >> > Hi,
> >> >
> >> > On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote:
> >> >> From: Ziping Chen <techping.chan@gmail.com>
> >> >>
> >> >> Allwinner A83T SoC has a low res adc like the one
> >> >> in Allwinner A10 SoC.
> >> >>
> >> >> Add binding for it.
> >> >>
> >> >> Signed-off-by: Ziping Chen <techping.chan@gmail.com>
> >> >> Acked-by: Rob Herring <robh@kernel.org>
> >> >> ---
> >> >>  Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 6 ++++--
> >> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >> >>
> >> >> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> >> index 4357e498ef04..525d85e3043f 100644
> >> >> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> >> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> >> >> @@ -2,12 +2,14 @@ Allwinner sun4i low res adc attached tablet keys
> >> >>  ------------------------------------------------
> >> >>
> >> >>  Required properties:
> >> >> - - compatible: "allwinner,sun4i-a10-lradc-keys"
> >> >> + - compatible: should be one of the following string:
> >> >> +             "allwinner,sun4i-a10-lradc-keys"
> >> >> +             "allwinner,sun8i-a83t-r-lradc-keys"
> >> >
> >> > This doesn't really have anything related to keys, and can be used
> >> > purely as an ADC.
> >> >
> >> > I know this is the compatible that was used for the A10, but I'd
> >> > rather drop the keys for the the new compatible.
> >> >
> >>
> >> LRADC is named KEYADC in some other SoCs' User Manual(such as R40 User
> >> Manual V1.0), thus LRADC is related to keys.
> >
> > It's still called LRADC on the A83T, so we'll use that name. If we
> > ever need another compatible for the R40, then yes, keyadc would make
> > sense in that case.
> 
> Hi,
> 
> So... whether to use "sun4i-lradc" to replace "sun4i-lradc-keys"?
> 
> I think it should be separated, one is the input subsystem, the other
> is the iio subsystem.

I was just talking about your compatible here, and was basically
suggesting to do sed 's/sun8i-a83t-r-lradc-keys/sun8i-a83t-r-lradc/',
that's all.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170629/e3d33653/attachment.sig>

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

* Re: [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29  7:53               ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-29  7:53 UTC (permalink / raw)
  To: Ziping Chen
  Cc: icenowy, Chen-Yu Tsai, Rob Herring, mark.rutland, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi, Alexandre Belloni

[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]

On Thu, Jun 29, 2017 at 12:45:51PM +0800, Ziping Chen wrote:
> 2017-06-28 1:36 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> > Hi,
> >
> > On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy@aosc.io wrote:
> >> Maxime, here's another problem: if we have already a GP LRADC driver,
> >> how can we tell the kernel to use it as IIO ADC rather than keys?
> >
> > The GPADC IIO driver is not for the LRADC driver, but the GPADC /
> > temperature sensor.
> >
> > We used to have an LRADC IIO driver in the CHIP BSP written by Alex
> > (in CC):
> > https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
> >
> > But he never mainlined it.
> >
> >> Should we introduce a new property for this once ready?
> >
> > We need to keep the current binding. We can just check for the
> > presence or not of child nodes to see if it has some keys, and we'd
> > need an IIO-to-input driver that is yet to be written.
> >
> 
> Yes, then we need an iio-to-input driver...
> So...whether the driver(a83t lradc keys) can be applied now,
> or we should wait for the iio-to-input driver.

This is a long term discussion, it shouldn't hold the patches you
sent.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29  7:53               ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-29  7:53 UTC (permalink / raw)
  To: Ziping Chen
  Cc: icenowy-h8G6r0blFSE, Chen-Yu Tsai, Rob Herring,
	mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Alexandre Belloni

[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]

On Thu, Jun 29, 2017 at 12:45:51PM +0800, Ziping Chen wrote:
> 2017-06-28 1:36 GMT+08:00 Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>:
> > Hi,
> >
> > On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy-h8G6r0blFSE@public.gmane.org wrote:
> >> Maxime, here's another problem: if we have already a GP LRADC driver,
> >> how can we tell the kernel to use it as IIO ADC rather than keys?
> >
> > The GPADC IIO driver is not for the LRADC driver, but the GPADC /
> > temperature sensor.
> >
> > We used to have an LRADC IIO driver in the CHIP BSP written by Alex
> > (in CC):
> > https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
> >
> > But he never mainlined it.
> >
> >> Should we introduce a new property for this once ready?
> >
> > We need to keep the current binding. We can just check for the
> > presence or not of child nodes to see if it has some keys, and we'd
> > need an IIO-to-input driver that is yet to be written.
> >
> 
> Yes, then we need an iio-to-input driver...
> So...whether the driver(a83t lradc keys) can be applied now,
> or we should wait for the iio-to-input driver.

This is a long term discussion, it shouldn't hold the patches you
sent.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29  7:53               ` Maxime Ripard
  0 siblings, 0 replies; 44+ messages in thread
From: Maxime Ripard @ 2017-06-29  7:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 29, 2017 at 12:45:51PM +0800, Ziping Chen wrote:
> 2017-06-28 1:36 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> > Hi,
> >
> > On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy at aosc.io wrote:
> >> Maxime, here's another problem: if we have already a GP LRADC driver,
> >> how can we tell the kernel to use it as IIO ADC rather than keys?
> >
> > The GPADC IIO driver is not for the LRADC driver, but the GPADC /
> > temperature sensor.
> >
> > We used to have an LRADC IIO driver in the CHIP BSP written by Alex
> > (in CC):
> > https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
> >
> > But he never mainlined it.
> >
> >> Should we introduce a new property for this once ready?
> >
> > We need to keep the current binding. We can just check for the
> > presence or not of child nodes to see if it has some keys, and we'd
> > need an IIO-to-input driver that is yet to be written.
> >
> 
> Yes, then we need an iio-to-input driver...
> So...whether the driver(a83t lradc keys) can be applied now,
> or we should wait for the iio-to-input driver.

This is a long term discussion, it shouldn't hold the patches you
sent.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170629/25ed6f56/attachment.sig>

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

* Re: [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
  2017-06-29  7:53               ` Maxime Ripard
  (?)
@ 2017-06-29 12:19                 ` Ziping Chen
  -1 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-29 12:19 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: icenowy, Chen-Yu Tsai, Rob Herring, mark.rutland, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi, Alexandre Belloni

2017-06-29 15:53 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> On Thu, Jun 29, 2017 at 12:45:51PM +0800, Ziping Chen wrote:
>> 2017-06-28 1:36 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
>> > Hi,
>> >
>> > On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy@aosc.io wrote:
>> >> Maxime, here's another problem: if we have already a GP LRADC driver,
>> >> how can we tell the kernel to use it as IIO ADC rather than keys?
>> >
>> > The GPADC IIO driver is not for the LRADC driver, but the GPADC /
>> > temperature sensor.
>> >
>> > We used to have an LRADC IIO driver in the CHIP BSP written by Alex
>> > (in CC):
>> > https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
>> >
>> > But he never mainlined it.
>> >
>> >> Should we introduce a new property for this once ready?
>> >
>> > We need to keep the current binding. We can just check for the
>> > presence or not of child nodes to see if it has some keys, and we'd
>> > need an IIO-to-input driver that is yet to be written.
>> >
>>
>> Yes, then we need an iio-to-input driver...
>> So...whether the driver(a83t lradc keys) can be applied now,
>> or we should wait for the iio-to-input driver.
>
> This is a long term discussion, it shouldn't hold the patches you
> sent.

OK, I get it.

And I will think about how to implement the iio-to-input driver.

Thanks,
Ziping

>
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* Re: Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29 12:19                 ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-29 12:19 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: icenowy-h8G6r0blFSE, Chen-Yu Tsai, Rob Herring,
	mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Alexandre Belloni

2017-06-29 15:53 GMT+08:00 Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>:
> On Thu, Jun 29, 2017 at 12:45:51PM +0800, Ziping Chen wrote:
>> 2017-06-28 1:36 GMT+08:00 Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>:
>> > Hi,
>> >
>> > On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy-h8G6r0blFSE@public.gmane.org wrote:
>> >> Maxime, here's another problem: if we have already a GP LRADC driver,
>> >> how can we tell the kernel to use it as IIO ADC rather than keys?
>> >
>> > The GPADC IIO driver is not for the LRADC driver, but the GPADC /
>> > temperature sensor.
>> >
>> > We used to have an LRADC IIO driver in the CHIP BSP written by Alex
>> > (in CC):
>> > https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
>> >
>> > But he never mainlined it.
>> >
>> >> Should we introduce a new property for this once ready?
>> >
>> > We need to keep the current binding. We can just check for the
>> > presence or not of child nodes to see if it has some keys, and we'd
>> > need an IIO-to-input driver that is yet to be written.
>> >
>>
>> Yes, then we need an iio-to-input driver...
>> So...whether the driver(a83t lradc keys) can be applied now,
>> or we should wait for the iio-to-input driver.
>
> This is a long term discussion, it shouldn't hold the patches you
> sent.

OK, I get it.

And I will think about how to implement the iio-to-input driver.

Thanks,
Ziping

>
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T
@ 2017-06-29 12:19                 ` Ziping Chen
  0 siblings, 0 replies; 44+ messages in thread
From: Ziping Chen @ 2017-06-29 12:19 UTC (permalink / raw)
  To: linux-arm-kernel

2017-06-29 15:53 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> On Thu, Jun 29, 2017 at 12:45:51PM +0800, Ziping Chen wrote:
>> 2017-06-28 1:36 GMT+08:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
>> > Hi,
>> >
>> > On Tue, Jun 27, 2017 at 11:29:10PM +0800, icenowy at aosc.io wrote:
>> >> Maxime, here's another problem: if we have already a GP LRADC driver,
>> >> how can we tell the kernel to use it as IIO ADC rather than keys?
>> >
>> > The GPADC IIO driver is not for the LRADC driver, but the GPADC /
>> > temperature sensor.
>> >
>> > We used to have an LRADC IIO driver in the CHIP BSP written by Alex
>> > (in CC):
>> > https://github.com/NextThingCo/CHIP-linux/commit/8675b761c54be73dc7cc0113209f02e10cc63a27
>> >
>> > But he never mainlined it.
>> >
>> >> Should we introduce a new property for this once ready?
>> >
>> > We need to keep the current binding. We can just check for the
>> > presence or not of child nodes to see if it has some keys, and we'd
>> > need an IIO-to-input driver that is yet to be written.
>> >
>>
>> Yes, then we need an iio-to-input driver...
>> So...whether the driver(a83t lradc keys) can be applied now,
>> or we should wait for the iio-to-input driver.
>
> This is a long term discussion, it shouldn't hold the patches you
> sent.

OK, I get it.

And I will think about how to implement the iio-to-input driver.

Thanks,
Ziping

>
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* Re: [linux-sunxi] Re: [PATCH v3 1/3] input: sun4i-a10-lradc-keys: Add support for A83T
@ 2019-03-26 20:26       ` 'Ondřej Jirman' via linux-sunxi
  0 siblings, 0 replies; 44+ messages in thread
From: Ondřej Jirman @ 2019-03-26 20:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Ziping Chen, wens, robh, mark.rutland, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

Hello,

On Mon, Jun 26, 2017 at 07:13:42PM +0200, Maxime Ripard wrote:
> On Sat, Jun 24, 2017 at 10:45:13AM +0800, Ziping Chen wrote:
> > From: Ziping Chen <techping.chan@gmail.com>
> > 
> > Allwinner A83T SoC has a low res adc like the one
> > in Allwinner A10 SoC, however, the A10 SoC's vref
> > of lradc internally is divided by 2/3 and the A83T
> > SoC's vref of lradc internally is divided by 3/4,
> > thus add a hardware variant for it to be compatible
> > with various devices.
> > 
> > Signed-off-by: Ziping Chen <techping.chan@gmail.com>
> 
> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Can we move on with this patch series? It's a few years and it doesn't seem that
there is any interest/progress with lradc iio based driver, and merging this
wouldn't block that effort anyway (as suggested in other replies).

I can re-send the series with the changed compatible name, and add a mainline
user of this driver (A83T based TBS-A711 tablet).

Any objections?

regards,
	o.

> Thanks!
> Maxime
> 
> -- 
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
> 
> -- 
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



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

* Re: Re: [PATCH v3 1/3] input: sun4i-a10-lradc-keys: Add support for A83T
@ 2019-03-26 20:26       ` 'Ondřej Jirman' via linux-sunxi
  0 siblings, 0 replies; 44+ messages in thread
From: 'Ondřej Jirman' via linux-sunxi @ 2019-03-26 20:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Ziping Chen, wens-jdAy2FN1RRM, robh-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hello,

On Mon, Jun 26, 2017 at 07:13:42PM +0200, Maxime Ripard wrote:
> On Sat, Jun 24, 2017 at 10:45:13AM +0800, Ziping Chen wrote:
> > From: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > 
> > Allwinner A83T SoC has a low res adc like the one
> > in Allwinner A10 SoC, however, the A10 SoC's vref
> > of lradc internally is divided by 2/3 and the A83T
> > SoC's vref of lradc internally is divided by 3/4,
> > thus add a hardware variant for it to be compatible
> > with various devices.
> > 
> > Signed-off-by: Ziping Chen <techping.chan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Can we move on with this patch series? It's a few years and it doesn't seem that
there is any interest/progress with lradc iio based driver, and merging this
wouldn't block that effort anyway (as suggested in other replies).

I can re-send the series with the changed compatible name, and add a mainline
user of this driver (A83T based TBS-A711 tablet).

Any objections?

regards,
	o.

> Thanks!
> Maxime
> 
> -- 
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
> 
> -- 
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit https://groups.google.com/d/optout.

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

* Re: [linux-sunxi] Re: [PATCH v3 1/3] input: sun4i-a10-lradc-keys: Add support for A83T
@ 2019-03-26 20:26       ` 'Ondřej Jirman' via linux-sunxi
  0 siblings, 0 replies; 44+ messages in thread
From: Ondřej Jirman @ 2019-03-26 20:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: mark.rutland, robh, devicetree, linux-sunxi, wens, linux-kernel,
	Ziping Chen, linux-arm-kernel

Hello,

On Mon, Jun 26, 2017 at 07:13:42PM +0200, Maxime Ripard wrote:
> On Sat, Jun 24, 2017 at 10:45:13AM +0800, Ziping Chen wrote:
> > From: Ziping Chen <techping.chan@gmail.com>
> > 
> > Allwinner A83T SoC has a low res adc like the one
> > in Allwinner A10 SoC, however, the A10 SoC's vref
> > of lradc internally is divided by 2/3 and the A83T
> > SoC's vref of lradc internally is divided by 3/4,
> > thus add a hardware variant for it to be compatible
> > with various devices.
> > 
> > Signed-off-by: Ziping Chen <techping.chan@gmail.com>
> 
> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Can we move on with this patch series? It's a few years and it doesn't seem that
there is any interest/progress with lradc iio based driver, and merging this
wouldn't block that effort anyway (as suggested in other replies).

I can re-send the series with the changed compatible name, and add a mainline
user of this driver (A83T based TBS-A711 tablet).

Any objections?

regards,
	o.

> Thanks!
> Maxime
> 
> -- 
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
> 
> -- 
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-03-26 20:32 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-24  2:45 [PATCH v3 0/3] Allwinner A83T R_LRADC support Ziping Chen
2017-06-24  2:45 ` Ziping Chen
2017-06-24  2:45 ` [PATCH v3 1/3] input: sun4i-a10-lradc-keys: Add support for A83T Ziping Chen
2017-06-26 17:13   ` Maxime Ripard
2017-06-26 17:13     ` Maxime Ripard
2017-06-26 17:13     ` Maxime Ripard
2019-03-26 20:26     ` [linux-sunxi] " Ondřej Jirman
2019-03-26 20:26       ` Ondřej Jirman
2019-03-26 20:26       ` 'Ondřej Jirman' via linux-sunxi
2017-06-24  2:45 ` [PATCH v3 2/3] dt-bindings: input: Add R_LRADC " Ziping Chen
2017-06-26 17:15   ` Maxime Ripard
2017-06-26 17:15     ` Maxime Ripard
2017-06-26 17:15     ` Maxime Ripard
2017-06-27 15:18     ` Ziping Chen
2017-06-27 15:18       ` Ziping Chen
2017-06-27 15:18       ` Ziping Chen
2017-06-27 15:29       ` [linux-sunxi] " icenowy
2017-06-27 15:29         ` icenowy at aosc.io
2017-06-27 15:29         ` icenowy-h8G6r0blFSE
2017-06-27 17:36         ` [linux-sunxi] " Maxime Ripard
2017-06-27 17:36           ` Maxime Ripard
2017-06-27 17:36           ` Maxime Ripard
2017-06-27 18:15           ` [linux-sunxi] " Alexandre Belloni
2017-06-27 18:15             ` Alexandre Belloni
2017-06-27 18:15             ` Alexandre Belloni
2017-06-29  4:45           ` Ziping Chen
2017-06-29  4:45             ` Ziping Chen
2017-06-29  4:45             ` Ziping Chen
2017-06-29  7:53             ` [linux-sunxi] " Maxime Ripard
2017-06-29  7:53               ` Maxime Ripard
2017-06-29  7:53               ` Maxime Ripard
2017-06-29 12:19               ` Ziping Chen
2017-06-29 12:19                 ` Ziping Chen
2017-06-29 12:19                 ` Ziping Chen
2017-06-27 17:31       ` Maxime Ripard
2017-06-27 17:31         ` Maxime Ripard
2017-06-27 17:31         ` Maxime Ripard
2017-06-29  4:35         ` Ziping Chen
2017-06-29  4:35           ` Ziping Chen
2017-06-29  4:35           ` Ziping Chen
2017-06-29  7:52           ` Maxime Ripard
2017-06-29  7:52             ` Maxime Ripard
2017-06-29  7:52             ` Maxime Ripard
2017-06-24  2:45 ` [PATCH v3 3/3] ARM: dts: sunxi: " Ziping Chen

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.