All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] iio: magn: DT bindings for AK8974
@ 2016-07-24  7:51 ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-07-24  7:51 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: Linus Walleij, devicetree-u79uwXL29TY76Z2rM5mHXA, Samu Onkalo,
	Sebastian Reichel

This adds device tree bindings for the AK8974 magnetometer, similar
to those for the AK8975.

Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Samu Onkalo <samu.onkalo-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
ChangeLog v3->v4:
- Add support for an optional mounting matrix
ChangeLog v2->v3:
- No changes, just reposting to keep together with the series
ChangeLog v1->v2:
- No changes, just reposting to keep together with the series
---
 .../bindings/iio/magnetometer/ak8974.txt           | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt

diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
new file mode 100644
index 000000000000..77d5aba1bd8c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
@@ -0,0 +1,29 @@
+* Asahi Kasei AK8974 magnetometer sensor
+
+Required properties:
+
+- compatible : should be "asahi-kasei,ak8974"
+- reg : the I2C address of the magnetometer
+
+Optional properties:
+
+- avdd-supply: regulator supply for the analog voltage
+  (see regulator/regulator.txt)
+- dvdd-supply: regulator supply for the digital voltage
+  (see regulator/regulator.txt)
+- interrupts: data ready (DRDY) and interrupt (INT1) lines
+  from the chip, the DRDY interrupt must be placed first.
+  The interrupts can be triggered on rising or falling
+  edges alike.
+- mount-matrix: an optional 3x3 mounting rotation matrix
+
+Example:
+
+ak8974@0f {
+	compatible = "asahi-kasei,ak8974";
+	reg = <0x0f>;
+	avdd-supply = <&foo_reg>;
+	dvdd-supply = <&bar_reg>;
+	interrupts = <0 IRQ_TYPE_EDGE_RISING>,
+		     <1 IRQ_TYPE_EDGE_RISING>;
+};
-- 
2.7.4

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

* [PATCH 1/2] iio: magn: DT bindings for AK8974
@ 2016-07-24  7:51 ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-07-24  7:51 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio
  Cc: Linus Walleij, devicetree, Samu Onkalo, Sebastian Reichel

This adds device tree bindings for the AK8974 magnetometer, similar
to those for the AK8975.

Cc: devicetree@vger.kernel.org
Cc: Samu Onkalo <samu.onkalo@intel.com>
Cc: Sebastian Reichel <sre@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v3->v4:
- Add support for an optional mounting matrix
ChangeLog v2->v3:
- No changes, just reposting to keep together with the series
ChangeLog v1->v2:
- No changes, just reposting to keep together with the series
---
 .../bindings/iio/magnetometer/ak8974.txt           | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt

diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
new file mode 100644
index 000000000000..77d5aba1bd8c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
@@ -0,0 +1,29 @@
+* Asahi Kasei AK8974 magnetometer sensor
+
+Required properties:
+
+- compatible : should be "asahi-kasei,ak8974"
+- reg : the I2C address of the magnetometer
+
+Optional properties:
+
+- avdd-supply: regulator supply for the analog voltage
+  (see regulator/regulator.txt)
+- dvdd-supply: regulator supply for the digital voltage
+  (see regulator/regulator.txt)
+- interrupts: data ready (DRDY) and interrupt (INT1) lines
+  from the chip, the DRDY interrupt must be placed first.
+  The interrupts can be triggered on rising or falling
+  edges alike.
+- mount-matrix: an optional 3x3 mounting rotation matrix
+
+Example:
+
+ak8974@0f {
+	compatible = "asahi-kasei,ak8974";
+	reg = <0x0f>;
+	avdd-supply = <&foo_reg>;
+	dvdd-supply = <&bar_reg>;
+	interrupts = <0 IRQ_TYPE_EDGE_RISING>,
+		     <1 IRQ_TYPE_EDGE_RISING>;
+};
-- 
2.7.4

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

* Re: [PATCH 1/2] iio: magn: DT bindings for AK8974
  2016-07-24  7:51 ` Linus Walleij
@ 2016-07-24  9:58     ` Jonathan Cameron
  -1 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2016-07-24  9:58 UTC (permalink / raw)
  To: Linus Walleij, linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Samu Onkalo, Sebastian Reichel

On 24/07/16 08:51, Linus Walleij wrote:
> This adds device tree bindings for the AK8974 magnetometer, similar
> to those for the AK8975.
> 
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Samu Onkalo <samu.onkalo-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Cc: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Applied to the togreg branch of iio.git

Thanks,

Jonathan
> ---
> ChangeLog v3->v4:
> - Add support for an optional mounting matrix
> ChangeLog v2->v3:
> - No changes, just reposting to keep together with the series
> ChangeLog v1->v2:
> - No changes, just reposting to keep together with the series
> ---
>  .../bindings/iio/magnetometer/ak8974.txt           | 29 ++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> new file mode 100644
> index 000000000000..77d5aba1bd8c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> @@ -0,0 +1,29 @@
> +* Asahi Kasei AK8974 magnetometer sensor
> +
> +Required properties:
> +
> +- compatible : should be "asahi-kasei,ak8974"
> +- reg : the I2C address of the magnetometer
> +
> +Optional properties:
> +
> +- avdd-supply: regulator supply for the analog voltage
> +  (see regulator/regulator.txt)
> +- dvdd-supply: regulator supply for the digital voltage
> +  (see regulator/regulator.txt)
> +- interrupts: data ready (DRDY) and interrupt (INT1) lines
> +  from the chip, the DRDY interrupt must be placed first.
> +  The interrupts can be triggered on rising or falling
> +  edges alike.
> +- mount-matrix: an optional 3x3 mounting rotation matrix
> +
> +Example:
> +
> +ak8974@0f {
> +	compatible = "asahi-kasei,ak8974";
> +	reg = <0x0f>;
> +	avdd-supply = <&foo_reg>;
> +	dvdd-supply = <&bar_reg>;
> +	interrupts = <0 IRQ_TYPE_EDGE_RISING>,
> +		     <1 IRQ_TYPE_EDGE_RISING>;
> +};
> 

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

* Re: [PATCH 1/2] iio: magn: DT bindings for AK8974
@ 2016-07-24  9:58     ` Jonathan Cameron
  0 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2016-07-24  9:58 UTC (permalink / raw)
  To: Linus Walleij, linux-iio; +Cc: devicetree, Samu Onkalo, Sebastian Reichel

On 24/07/16 08:51, Linus Walleij wrote:
> This adds device tree bindings for the AK8974 magnetometer, similar
> to those for the AK8975.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Samu Onkalo <samu.onkalo@intel.com>
> Cc: Sebastian Reichel <sre@kernel.org>
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Applied to the togreg branch of iio.git

Thanks,

Jonathan
> ---
> ChangeLog v3->v4:
> - Add support for an optional mounting matrix
> ChangeLog v2->v3:
> - No changes, just reposting to keep together with the series
> ChangeLog v1->v2:
> - No changes, just reposting to keep together with the series
> ---
>  .../bindings/iio/magnetometer/ak8974.txt           | 29 ++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> new file mode 100644
> index 000000000000..77d5aba1bd8c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> @@ -0,0 +1,29 @@
> +* Asahi Kasei AK8974 magnetometer sensor
> +
> +Required properties:
> +
> +- compatible : should be "asahi-kasei,ak8974"
> +- reg : the I2C address of the magnetometer
> +
> +Optional properties:
> +
> +- avdd-supply: regulator supply for the analog voltage
> +  (see regulator/regulator.txt)
> +- dvdd-supply: regulator supply for the digital voltage
> +  (see regulator/regulator.txt)
> +- interrupts: data ready (DRDY) and interrupt (INT1) lines
> +  from the chip, the DRDY interrupt must be placed first.
> +  The interrupts can be triggered on rising or falling
> +  edges alike.
> +- mount-matrix: an optional 3x3 mounting rotation matrix
> +
> +Example:
> +
> +ak8974@0f {
> +	compatible = "asahi-kasei,ak8974";
> +	reg = <0x0f>;
> +	avdd-supply = <&foo_reg>;
> +	dvdd-supply = <&bar_reg>;
> +	interrupts = <0 IRQ_TYPE_EDGE_RISING>,
> +		     <1 IRQ_TYPE_EDGE_RISING>;
> +};
> 


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

* [PATCH 1/2] iio: magn: DT bindings for AK8974
@ 2016-07-12 15:07 ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-07-12 15:07 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: Linus Walleij, devicetree-u79uwXL29TY76Z2rM5mHXA, Samu Onkalo

This adds device tree bindings for the AK8974 magnetometer, similar
to those for the AK8975.

Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Samu Onkalo <samu.onkalo-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
ChangeLog v2->v3:
- No changes, just reposting to keep together with the series
ChangeLog v1->v2:
- No changes, just reposting to keep together with the series
---
 .../bindings/iio/magnetometer/ak8974.txt           | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt

diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
new file mode 100644
index 000000000000..967f8e9b9319
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
@@ -0,0 +1,28 @@
+* Asahi Kasei AK8974 magnetometer sensor
+
+Required properties:
+
+- compatible : should be "asahi-kasei,ak8974"
+- reg : the I2C address of the magnetometer
+
+Optional properties:
+
+- avdd-supply: regulator supply for the analog voltage
+  (see regulator/regulator.txt)
+- dvdd-supply: regulator supply for the digital voltage
+  (see regulator/regulator.txt)
+- interrupts: data ready (DRDY) and interrupt (INT1) lines
+  from the chip, the DRDY interrupt must be placed first.
+  The interrupts can be triggered on rising or falling
+  edges alike.
+
+Example:
+
+ak8974@0f {
+	compatible = "asahi-kasei,ak8974";
+	reg = <0x0f>;
+	avdd-supply = <&foo_reg>;
+	dvdd-supply = <&bar_reg>;
+	interrupts = <0 IRQ_TYPE_EDGE_RISING>,
+		     <1 IRQ_TYPE_EDGE_RISING>;
+};
-- 
2.7.4

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

* [PATCH 1/2] iio: magn: DT bindings for AK8974
@ 2016-07-12 15:07 ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-07-12 15:07 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio; +Cc: Linus Walleij, devicetree, Samu Onkalo

This adds device tree bindings for the AK8974 magnetometer, similar
to those for the AK8975.

Cc: devicetree@vger.kernel.org
Cc: Samu Onkalo <samu.onkalo@intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v2->v3:
- No changes, just reposting to keep together with the series
ChangeLog v1->v2:
- No changes, just reposting to keep together with the series
---
 .../bindings/iio/magnetometer/ak8974.txt           | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt

diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
new file mode 100644
index 000000000000..967f8e9b9319
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
@@ -0,0 +1,28 @@
+* Asahi Kasei AK8974 magnetometer sensor
+
+Required properties:
+
+- compatible : should be "asahi-kasei,ak8974"
+- reg : the I2C address of the magnetometer
+
+Optional properties:
+
+- avdd-supply: regulator supply for the analog voltage
+  (see regulator/regulator.txt)
+- dvdd-supply: regulator supply for the digital voltage
+  (see regulator/regulator.txt)
+- interrupts: data ready (DRDY) and interrupt (INT1) lines
+  from the chip, the DRDY interrupt must be placed first.
+  The interrupts can be triggered on rising or falling
+  edges alike.
+
+Example:
+
+ak8974@0f {
+	compatible = "asahi-kasei,ak8974";
+	reg = <0x0f>;
+	avdd-supply = <&foo_reg>;
+	dvdd-supply = <&bar_reg>;
+	interrupts = <0 IRQ_TYPE_EDGE_RISING>,
+		     <1 IRQ_TYPE_EDGE_RISING>;
+};
-- 
2.7.4


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

* Re: [PATCH 1/2] iio: magn: DT bindings for AK8974
  2016-06-24 17:19     ` Rob Herring
@ 2016-06-24 20:48       ` Linus Walleij
  -1 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-06-24 20:48 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jonathan Cameron, linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Samu Onkalo

On Fri, Jun 24, 2016 at 7:19 PM, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Wed, Jun 22, 2016 at 05:11:16PM +0200, Linus Walleij wrote:
>> This adds device tree bindings for the AK8974 magnetometer, similar
>> to those for the AK8975.
>
> Seems like they should be shared, but there don't appear to be any
> datasheets for 8974 to really tell. Really only matters if the
> programming models are similar.

I have schematics of the component mounted, so I know what the
pins are named. Apart from that only the opaque driver from Samu.
(Found his new mail and mailed him, also requested the datasheet
from AKM, no response so far.)

>> +- avdd-supply: regulator supply for the analog voltage
>> +  (see regulator/regulator.txt)
>> +- dvdd-supply: regulator supply for the digital voltage
>> +  (see regulator/regulator.txt)
>
> This is probably more correct than single vdd-supply for 8975 which in
> fact has 2 supplies.

Yes. But they did change the names. AK8974 is avdd and dvdd
whereas AK8975 has vdd (same as avdd) and vid (same as dvdd).
I have no idea why this arbitrary naming is happening :/

>> +- interrupts: data ready (DRDY) and interrupt (INT1) lines
>> +  from the chip, the DRDY interrupt must be placed first.
>> +  The interrupts can be triggered on rising or falling
>> +  edges alike.
>
> The ak8975 probably should be an interrupt instead of gpio, too...

Yes. Or well. "data ready" is usually used as interrupt but to the
circuit designers it's just a signal which tells when the state machine
has finished.

Yours,
Linus Walleij

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

* Re: [PATCH 1/2] iio: magn: DT bindings for AK8974
@ 2016-06-24 20:48       ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-06-24 20:48 UTC (permalink / raw)
  To: Rob Herring; +Cc: Jonathan Cameron, linux-iio, devicetree, Samu Onkalo

On Fri, Jun 24, 2016 at 7:19 PM, Rob Herring <robh@kernel.org> wrote:
> On Wed, Jun 22, 2016 at 05:11:16PM +0200, Linus Walleij wrote:
>> This adds device tree bindings for the AK8974 magnetometer, similar
>> to those for the AK8975.
>
> Seems like they should be shared, but there don't appear to be any
> datasheets for 8974 to really tell. Really only matters if the
> programming models are similar.

I have schematics of the component mounted, so I know what the
pins are named. Apart from that only the opaque driver from Samu.
(Found his new mail and mailed him, also requested the datasheet
from AKM, no response so far.)

>> +- avdd-supply: regulator supply for the analog voltage
>> +  (see regulator/regulator.txt)
>> +- dvdd-supply: regulator supply for the digital voltage
>> +  (see regulator/regulator.txt)
>
> This is probably more correct than single vdd-supply for 8975 which in
> fact has 2 supplies.

Yes. But they did change the names. AK8974 is avdd and dvdd
whereas AK8975 has vdd (same as avdd) and vid (same as dvdd).
I have no idea why this arbitrary naming is happening :/

>> +- interrupts: data ready (DRDY) and interrupt (INT1) lines
>> +  from the chip, the DRDY interrupt must be placed first.
>> +  The interrupts can be triggered on rising or falling
>> +  edges alike.
>
> The ak8975 probably should be an interrupt instead of gpio, too...

Yes. Or well. "data ready" is usually used as interrupt but to the
circuit designers it's just a signal which tells when the state machine
has finished.

Yours,
Linus Walleij

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

* Re: [PATCH 1/2] iio: magn: DT bindings for AK8974
  2016-06-22 15:11 ` Linus Walleij
@ 2016-06-24 17:19     ` Rob Herring
  -1 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2016-06-24 17:19 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Jonathan Cameron, linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Samu Onkalo

On Wed, Jun 22, 2016 at 05:11:16PM +0200, Linus Walleij wrote:
> This adds device tree bindings for the AK8974 magnetometer, similar
> to those for the AK8975.

Seems like they should be shared, but there don't appear to be any 
datasheets for 8974 to really tell. Really only matters if the 
programming models are similar.

> 
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Samu Onkalo <samu.p.onkalo-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>  .../bindings/iio/magnetometer/ak8974.txt           | 28 ++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> new file mode 100644
> index 000000000000..967f8e9b9319
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> @@ -0,0 +1,28 @@
> +* Asahi Kasei AK8974 magnetometer sensor
> +
> +Required properties:
> +
> +- compatible : should be "asahi-kasei,ak8974"
> +- reg : the I2C address of the magnetometer
> +
> +Optional properties:
> +
> +- avdd-supply: regulator supply for the analog voltage
> +  (see regulator/regulator.txt)
> +- dvdd-supply: regulator supply for the digital voltage
> +  (see regulator/regulator.txt)

This is probably more correct than single vdd-supply for 8975 which in 
fact has 2 supplies.

> +- interrupts: data ready (DRDY) and interrupt (INT1) lines
> +  from the chip, the DRDY interrupt must be placed first.
> +  The interrupts can be triggered on rising or falling
> +  edges alike.

The ak8975 probably should be an interrupt instead of gpio, too...

> +
> +Example:
> +
> +ak8974@0f {
> +	compatible = "asahi-kasei,ak8974";
> +	reg = <0x0f>;
> +	avdd-supply = <&foo_reg>;
> +	dvdd-supply = <&bar_reg>;
> +	interrupts = <0 IRQ_TYPE_EDGE_RISING>,
> +		     <1 IRQ_TYPE_EDGE_RISING>;
> +};
> -- 
> 2.4.11
> 
> --
> 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
--
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] 12+ messages in thread

* Re: [PATCH 1/2] iio: magn: DT bindings for AK8974
@ 2016-06-24 17:19     ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2016-06-24 17:19 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Jonathan Cameron, linux-iio, devicetree, Samu Onkalo

On Wed, Jun 22, 2016 at 05:11:16PM +0200, Linus Walleij wrote:
> This adds device tree bindings for the AK8974 magnetometer, similar
> to those for the AK8975.

Seems like they should be shared, but there don't appear to be any 
datasheets for 8974 to really tell. Really only matters if the 
programming models are similar.

> 
> Cc: devicetree@vger.kernel.org
> Cc: Samu Onkalo <samu.p.onkalo@nokia.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  .../bindings/iio/magnetometer/ak8974.txt           | 28 ++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> new file mode 100644
> index 000000000000..967f8e9b9319
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
> @@ -0,0 +1,28 @@
> +* Asahi Kasei AK8974 magnetometer sensor
> +
> +Required properties:
> +
> +- compatible : should be "asahi-kasei,ak8974"
> +- reg : the I2C address of the magnetometer
> +
> +Optional properties:
> +
> +- avdd-supply: regulator supply for the analog voltage
> +  (see regulator/regulator.txt)
> +- dvdd-supply: regulator supply for the digital voltage
> +  (see regulator/regulator.txt)

This is probably more correct than single vdd-supply for 8975 which in 
fact has 2 supplies.

> +- interrupts: data ready (DRDY) and interrupt (INT1) lines
> +  from the chip, the DRDY interrupt must be placed first.
> +  The interrupts can be triggered on rising or falling
> +  edges alike.

The ak8975 probably should be an interrupt instead of gpio, too...

> +
> +Example:
> +
> +ak8974@0f {
> +	compatible = "asahi-kasei,ak8974";
> +	reg = <0x0f>;
> +	avdd-supply = <&foo_reg>;
> +	dvdd-supply = <&bar_reg>;
> +	interrupts = <0 IRQ_TYPE_EDGE_RISING>,
> +		     <1 IRQ_TYPE_EDGE_RISING>;
> +};
> -- 
> 2.4.11
> 
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/2] iio: magn: DT bindings for AK8974
@ 2016-06-22 15:11 ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-06-22 15:11 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: Linus Walleij, devicetree-u79uwXL29TY76Z2rM5mHXA, Samu Onkalo

This adds device tree bindings for the AK8974 magnetometer, similar
to those for the AK8975.

Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Samu Onkalo <samu.p.onkalo-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 .../bindings/iio/magnetometer/ak8974.txt           | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt

diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
new file mode 100644
index 000000000000..967f8e9b9319
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
@@ -0,0 +1,28 @@
+* Asahi Kasei AK8974 magnetometer sensor
+
+Required properties:
+
+- compatible : should be "asahi-kasei,ak8974"
+- reg : the I2C address of the magnetometer
+
+Optional properties:
+
+- avdd-supply: regulator supply for the analog voltage
+  (see regulator/regulator.txt)
+- dvdd-supply: regulator supply for the digital voltage
+  (see regulator/regulator.txt)
+- interrupts: data ready (DRDY) and interrupt (INT1) lines
+  from the chip, the DRDY interrupt must be placed first.
+  The interrupts can be triggered on rising or falling
+  edges alike.
+
+Example:
+
+ak8974@0f {
+	compatible = "asahi-kasei,ak8974";
+	reg = <0x0f>;
+	avdd-supply = <&foo_reg>;
+	dvdd-supply = <&bar_reg>;
+	interrupts = <0 IRQ_TYPE_EDGE_RISING>,
+		     <1 IRQ_TYPE_EDGE_RISING>;
+};
-- 
2.4.11

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

* [PATCH 1/2] iio: magn: DT bindings for AK8974
@ 2016-06-22 15:11 ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-06-22 15:11 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio; +Cc: Linus Walleij, devicetree, Samu Onkalo

This adds device tree bindings for the AK8974 magnetometer, similar
to those for the AK8975.

Cc: devicetree@vger.kernel.org
Cc: Samu Onkalo <samu.p.onkalo@nokia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 .../bindings/iio/magnetometer/ak8974.txt           | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt

diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
new file mode 100644
index 000000000000..967f8e9b9319
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt
@@ -0,0 +1,28 @@
+* Asahi Kasei AK8974 magnetometer sensor
+
+Required properties:
+
+- compatible : should be "asahi-kasei,ak8974"
+- reg : the I2C address of the magnetometer
+
+Optional properties:
+
+- avdd-supply: regulator supply for the analog voltage
+  (see regulator/regulator.txt)
+- dvdd-supply: regulator supply for the digital voltage
+  (see regulator/regulator.txt)
+- interrupts: data ready (DRDY) and interrupt (INT1) lines
+  from the chip, the DRDY interrupt must be placed first.
+  The interrupts can be triggered on rising or falling
+  edges alike.
+
+Example:
+
+ak8974@0f {
+	compatible = "asahi-kasei,ak8974";
+	reg = <0x0f>;
+	avdd-supply = <&foo_reg>;
+	dvdd-supply = <&bar_reg>;
+	interrupts = <0 IRQ_TYPE_EDGE_RISING>,
+		     <1 IRQ_TYPE_EDGE_RISING>;
+};
-- 
2.4.11


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

end of thread, other threads:[~2016-07-24  9:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-24  7:51 [PATCH 1/2] iio: magn: DT bindings for AK8974 Linus Walleij
2016-07-24  7:51 ` Linus Walleij
     [not found] ` <1469346695-15302-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-07-24  9:58   ` Jonathan Cameron
2016-07-24  9:58     ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2016-07-12 15:07 Linus Walleij
2016-07-12 15:07 ` Linus Walleij
2016-06-22 15:11 Linus Walleij
2016-06-22 15:11 ` Linus Walleij
     [not found] ` <1466608276-10401-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-06-24 17:19   ` Rob Herring
2016-06-24 17:19     ` Rob Herring
2016-06-24 20:48     ` Linus Walleij
2016-06-24 20:48       ` Linus Walleij

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.