All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/6] ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node
@ 2015-01-06 19:42 Geert Uytterhoeven
  2015-01-06 19:51 ` Sergei Shtylyov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2015-01-06 19:42 UTC (permalink / raw)
  To: linux-sh

Add a DT node for the AK8975 magnetometer sensor, which is connected to
i2c0.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Specify the device interrupt to avoid polling for end of conversion.

While at it rename the DT node to compass@c to describe the device's
function instead of its model.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
index 02fc265332e8fb84..beabc3fd013b9ff0 100644
--- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
+++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
@@ -189,6 +189,13 @@
 &i2c0 {
 	status = "okay";
 
+	compass@c {
+		compatible = "asahi-kasei,ak8975";
+		reg = <0x0c>;
+		interrupt-parent = <&irqpin3>;
+		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
+	};
+
 	ak4648: codec@12 {
 		compatible = "asahi-kasei,ak4648";
 		reg = <0x12>;
-- 
1.9.1


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

* Re: [PATCH 3/6] ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node
  2015-01-06 19:42 [PATCH 3/6] ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node Geert Uytterhoeven
@ 2015-01-06 19:51 ` Sergei Shtylyov
  2015-01-06 19:53 ` Geert Uytterhoeven
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2015-01-06 19:51 UTC (permalink / raw)
  To: linux-sh

Hello.

On 01/06/2015 10:42 PM, Geert Uytterhoeven wrote:

> Add a DT node for the AK8975 magnetometer sensor, which is connected to
> i2c0.

> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

> Specify the device interrupt to avoid polling for end of conversion.

> While at it rename the DT node to compass@c to describe the device's
> function instead of its model.

> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

    You signed off on the patch twice?

> ---
>   arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
> index 02fc265332e8fb84..beabc3fd013b9ff0 100644
> --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
> +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
> @@ -189,6 +189,13 @@
>   &i2c0 {
>   	status = "okay";
>
> +	compass@c {
> +		compatible = "asahi-kasei,ak8975";
> +		reg = <0x0c>;

    Just 0xc?

WBR, Sergei


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

* Re: [PATCH 3/6] ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node
  2015-01-06 19:42 [PATCH 3/6] ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node Geert Uytterhoeven
  2015-01-06 19:51 ` Sergei Shtylyov
@ 2015-01-06 19:53 ` Geert Uytterhoeven
  2015-01-06 19:59 ` Sergei Shtylyov
  2015-01-06 20:07 ` Geert Uytterhoeven
  3 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2015-01-06 19:53 UTC (permalink / raw)
  To: linux-sh

Hi Sergei,

On Tue, Jan 6, 2015 at 8:51 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> On 01/06/2015 10:42 PM, Geert Uytterhoeven wrote:
>> Add a DT node for the AK8975 magnetometer sensor, which is connected to
>> i2c0.
>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
>> Specify the device interrupt to avoid polling for end of conversion.
>
>> While at it rename the DT node to compass@c to describe the device's
>> function instead of its model.
>
>> Signed-off-by: Laurent Pinchart
>> <laurent.pinchart+renesas@ideasonboard.com>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
>
>    You signed off on the patch twice?

Yep. I don't know a better way to squash other people's updates into
an earlier commit.

>> ---
>>   arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>> b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>> index 02fc265332e8fb84..beabc3fd013b9ff0 100644
>> --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>> +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>> @@ -189,6 +189,13 @@
>>   &i2c0 {
>>         status = "okay";
>>
>> +       compass@c {
>> +               compatible = "asahi-kasei,ak8975";
>> +               reg = <0x0c>;
>
>    Just 0xc?

Yep. This is an i2c bus.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 3/6] ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node
  2015-01-06 19:42 [PATCH 3/6] ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node Geert Uytterhoeven
  2015-01-06 19:51 ` Sergei Shtylyov
  2015-01-06 19:53 ` Geert Uytterhoeven
@ 2015-01-06 19:59 ` Sergei Shtylyov
  2015-01-06 20:07 ` Geert Uytterhoeven
  3 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2015-01-06 19:59 UTC (permalink / raw)
  To: linux-sh

On 01/06/2015 10:53 PM, Geert Uytterhoeven wrote:

>>> Add a DT node for the AK8975 magnetometer sensor, which is connected to
>>> i2c0.

>>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

>>> Specify the device interrupt to avoid polling for end of conversion.

>>> While at it rename the DT node to compass@c to describe the device's
>>> function instead of its model.

>>> Signed-off-by: Laurent Pinchart
>>> <laurent.pinchart+renesas@ideasonboard.com>
>>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

>>     You signed off on the patch twice?

> Yep. I don't know a better way to squash other people's updates into
> an earlier commit.

    Hmm... it's still not clear to me whose changes are where. Whose patch 
that was originally?

[...]

>>> diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>>> b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>>> index 02fc265332e8fb84..beabc3fd013b9ff0 100644
>>> --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>>> +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>>> @@ -189,6 +189,13 @@
>>>    &i2c0 {
>>>          status = "okay";
>>>
>>> +       compass@c {
>>> +               compatible = "asahi-kasei,ak8975";
>>> +               reg = <0x0c>;

>>     Just 0xc?

> Yep. This is an i2c bus.

    Yeah, I do understand. I was suggesting to remove '0' after 'x'.

> Gr{oetje,eeting}s,
>                          Geert

WBR, Sergei


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

* Re: [PATCH 3/6] ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node
  2015-01-06 19:42 [PATCH 3/6] ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2015-01-06 19:59 ` Sergei Shtylyov
@ 2015-01-06 20:07 ` Geert Uytterhoeven
  3 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2015-01-06 20:07 UTC (permalink / raw)
  To: linux-sh

On Tue, Jan 6, 2015 at 8:59 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> On 01/06/2015 10:53 PM, Geert Uytterhoeven wrote:
>
>>>> Add a DT node for the AK8975 magnetometer sensor, which is connected to
>>>> i2c0.
>
>>>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Part 1 ends here.

>>>> Specify the device interrupt to avoid polling for end of conversion.
>
>>>> While at it rename the DT node to compass@c to describe the device's
>>>> function instead of its model.
>
>>>> Signed-off-by: Laurent Pinchart
>>>> <laurent.pinchart+renesas@ideasonboard.com>
>>>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Part 2 ends here.

>>>     You signed off on the patch twice?
>
>> Yep. I don't know a better way to squash other people's updates into
>> an earlier commit.
>
>    Hmm... it's still not clear to me whose changes are where. Whose patch
> that was originally?

See above.

> diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>>>> b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>>>> index 02fc265332e8fb84..beabc3fd013b9ff0 100644
>>>> --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>>>> +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
>>>> @@ -189,6 +189,13 @@
>>>>    &i2c0 {
>>>>          status = "okay";
>>>>
>>>> +       compass@c {
>>>> +               compatible = "asahi-kasei,ak8975";
>>>> +               reg = <0x0c>;
>
>>>     Just 0xc?
>
>> Yep. This is an i2c bus.
>
>    Yeah, I do understand. I was suggesting to remove '0' after 'x'.

Oh, I missed what you meant.

I2c addresses are 7 bit, so always using a full byte sounds natural to me.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2015-01-06 20:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-06 19:42 [PATCH 3/6] ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node Geert Uytterhoeven
2015-01-06 19:51 ` Sergei Shtylyov
2015-01-06 19:53 ` Geert Uytterhoeven
2015-01-06 19:59 ` Sergei Shtylyov
2015-01-06 20:07 ` Geert Uytterhoeven

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.