diff mbox

[13/18] ARM: ux500: Add ux500 PCM to DB8500 Device Tree

Message ID 1343393162-11938-14-git-send-email-lee.jones@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Lee Jones July 27, 2012, 12:45 p.m. UTC
Nothing special here. We're only providing a compatible string
to ensure the driver is probed using a Device Tree boot.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/db8500.dtsi |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Mark Brown July 29, 2012, 8:50 p.m. UTC | #1
On Fri, Jul 27, 2012 at 01:45:57PM +0100, Lee Jones wrote:
> Nothing special here. We're only providing a compatible string
> to ensure the driver is probed using a Device Tree boot.

> +		pcm: ux500-pcm {
> +			compatible = "stericsson,ux500-pcm";
> +		};
> +

One of two things is wrong here.  Either you've not provided any
information about the hardware so the driver won't be able to work out
what to talk to or you've not provided any data so you're registering a
purely virtual Linux-internal device via the device tree.

Once more, the idea here is to describe the hardware not to dump Linux's
internal data structures into the device tree.
Lee Jones July 30, 2012, 7:32 a.m. UTC | #2
On 29/07/12 21:50, Mark Brown wrote:
> On Fri, Jul 27, 2012 at 01:45:57PM +0100, Lee Jones wrote:
>> Nothing special here. We're only providing a compatible string
>> to ensure the driver is probed using a Device Tree boot.
>
>> +		pcm: ux500-pcm {
>> +			compatible = "stericsson,ux500-pcm";
>> +		};
>> +
>
> One of two things is wrong here.  Either you've not provided any
> information about the hardware so the driver won't be able to work out
> what to talk to or you've not provided any data so you're registering a
> purely virtual Linux-internal device via the device tree.
>
> Once more, the idea here is to describe the hardware not to dump Linux's
> internal data structures into the device tree.

We use it register the driver for probe()ing. In the same way we do for 
the PMU and Regulators. All three of which actually belong to a 
different hardware block. Do you know of a better way to register those 
devices?
Mark Brown July 30, 2012, 1:40 p.m. UTC | #3
On Mon, Jul 30, 2012 at 08:32:43AM +0100, Lee Jones wrote:
> On 29/07/12 21:50, Mark Brown wrote:
> >On Fri, Jul 27, 2012 at 01:45:57PM +0100, Lee Jones wrote:

> >>+		pcm: ux500-pcm {
> >>+			compatible = "stericsson,ux500-pcm";
> >>+		};
> >>+

> >One of two things is wrong here.  Either you've not provided any
> >information about the hardware so the driver won't be able to work out
> >what to talk to or you've not provided any data so you're registering a
> >purely virtual Linux-internal device via the device tree.

> >Once more, the idea here is to describe the hardware not to dump Linux's
> >internal data structures into the device tree.

> We use it register the driver for probe()ing. In the same way we do
> for the PMU and Regulators. All three of which actually belong to a
> different hardware block. Do you know of a better way to register
> those devices?

You've not identified which of the two cases above we're in...  assuming
it's a virtal device look at how the DT bindings for the other platforms
are doing things.
Lee Jones July 30, 2012, 2:26 p.m. UTC | #4
On 30/07/12 14:40, Mark Brown wrote:
> On Mon, Jul 30, 2012 at 08:32:43AM +0100, Lee Jones wrote:
>> On 29/07/12 21:50, Mark Brown wrote:
>>> On Fri, Jul 27, 2012 at 01:45:57PM +0100, Lee Jones wrote:
>
>>>> +		pcm: ux500-pcm {
>>>> +			compatible = "stericsson,ux500-pcm";
>>>> +		};
>>>> +
>
>>> One of two things is wrong here.  Either you've not provided any
>>> information about the hardware so the driver won't be able to work out
>>> what to talk to or you've not provided any data so you're registering a
>>> purely virtual Linux-internal device via the device tree.
>
>>> Once more, the idea here is to describe the hardware not to dump Linux's
>>> internal data structures into the device tree.
>
>> We use it register the driver for probe()ing. In the same way we do
>> for the PMU and Regulators. All three of which actually belong to a
>> different hardware block. Do you know of a better way to register
>> those devices?
>
> You've not identified which of the two cases above we're in...  assuming
> it's a virtal device look at how the DT bindings for the other platforms
> are doing things.

I thought it would have been obvious by my response. The PMU seems to be 
a virtual device with no registers or IRQs.

I've found a DT which seems to do it in the same way as I do 
'arch/powerpc/boot/dts/p1022ds.dts', but some others call PCM 
registration from the CPU-side DAI probe(). Would that be your preference?
Mark Brown July 30, 2012, 3:02 p.m. UTC | #5
On Mon, Jul 30, 2012 at 03:26:58PM +0100, Lee Jones wrote:
> On 30/07/12 14:40, Mark Brown wrote:

> >>We use it register the driver for probe()ing. In the same way we do
> >>for the PMU and Regulators. All three of which actually belong to a
> >>different hardware block. Do you know of a better way to register
> >>those devices?

> >You've not identified which of the two cases above we're in...  assuming
> >it's a virtal device look at how the DT bindings for the other platforms
> >are doing things.

> I thought it would have been obvious by my response. The PMU seems
> to be a virtual device with no registers or IRQs.

That's not at all obvious, no.

> I've found a DT which seems to do it in the same way as I do
> 'arch/powerpc/boot/dts/p1022ds.dts', but some others call PCM
> registration from the CPU-side DAI probe(). Would that be your
> preference?

Yes, do what the other drivers are doing
diff mbox

Patch

diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi
index a3bee0a..a3fb05f 100644
--- a/arch/arm/boot/dts/db8500.dtsi
+++ b/arch/arm/boot/dts/db8500.dtsi
@@ -591,6 +591,10 @@ 
 			status = "disabled";
 		};
 
+		pcm: ux500-pcm {
+			compatible = "stericsson,ux500-pcm";
+		};
+
 		external-bus@50000000 {
 			compatible = "simple-bus";
 			reg = <0x50000000 0x4000000>;