* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Timur Tabi @ 2008-01-03 17:54 UTC (permalink / raw)
To: Jon Smirl; +Cc: Liam Girdwood, alsa-devel, linuxppc-dev
In-Reply-To: <9e4733910801020734n115888cbt86351f67f2311629@mail.gmail.com>
Jon Smirl wrote:
> On 1/2/08, Timur Tabi <timur@freescale.com> wrote:
>> Jon Smirl wrote:
>>> On 1/1/08, Jon Smirl <jonsmirl@gmail.com> wrote:
>>>> On 12/19/07, Timur Tabi <timur@freescale.com> wrote:
>>>>> + ssi@16000 {
>>>>> + compatible = "fsl,ssi";
>>>>> + cell-index = <0>;
>>>>> + reg = <16000 100>;
>>>>> + interrupt-parent = <&mpic>;
>>>>> + interrupts = <3e 2>;
>>>>> + fsl,mode = "i2s-slave";
>>>>> + codec {
>>>>> + compatible = "cirrus,cs4270";
>>>>> + /* MCLK source is a stand-alone oscillator */
>>>>> + bus-frequency = <bb8000>;
>>>>> + };
>>>>> + };
>>>> Does this need to be bus-frequency? It's always called MCLK in all of
>>>> the literature.
>>>>
>>>> In my case the MCLK comes from a chip on the i2c bus that is
>>>> programmable How would that be encoded?.
>>> Looking at the cs4270 codec driver it is controlled by i2c (supports
>>> SPI too). What happened to the conversation about putting codecs on
>>> the controlling bus and then linking them to the data bus?
>> The current CS4270 driver doesn't support device trees. When I wrote
>> it, the idea of putting I2C info in the device tree was not finalized,
>> and since the driver is supposed to be cross-platform, I decided to do
>> it the old-fashioned way. Before I update the code, however, I'm
>> waiting for:
>>
>> 1) The current code to be accepted into the tree
>> 2) ASoC is updated to V2
>> 3) The current drivers are updated to support ASoC V2.
>
> I've been trying to get the i2c code in for two months. Hopefully it
> will go in soon, no one had made any comments on it recently. Have you
> tried your code with it?
No. I don't like updating my patches with new features while they're
undergoing review. If something is clearly wrong with the patch, then I'll
fix it and resubmit. But I really don't like to support new stuff just
because it's there.
> There is nothing stopping your from putting a node for the CS4270 on
> the i2c bus today. It just won't trigger the loading of the driver.
Yes, the thing that's stopping me is that I don't want to do 20 things at
once. I already have pending patches that I'm trying to get in. Once those
are in, then I will consider additional work.
> Don't we want to follow the device tree policy of putting the device
> on the controlling bus and then link it to the data bus?
Normally, that sounds like a good idea, but the cs4270 is an I2S device first,
and an I2C device second. I need to be able to find that codec from the I2S
node. My I2S driver would not know to scan all I2C devices to find the codec.
> It makes it a little easier but it doesn't fix everything. We need to
> start looking at it since none of the example driver for it are device
> tree based.
I will look at it, *after* my current V1 driver has been applied to the tree.
> It still has problems with wanting 'struct
> platform_device' when we have 'struct of_platform_device' pointers. It
> also doesn't know how to dynamically load codecs based on device
> trees.
I agree that these things need to be fixed. I look forward to thinking about
these problems, *after* my V1 patches have been applied.
> Liam messed up all of my code when he refactored it in late December.
Bummer.
> I've switched over to the current SOC code for the moment. The big
> thing that v2 fixes is that SOC is changed to being a subsystem
> instead of platform driver. Being a subsystem is the correct model.
>
> It would be good if more pieces of v2 get push forward. Then we can
> sort out the device tree issues in it.
I agree.
> Adding the second device tree node doesn't have anything to do with
> ASOC v2. It's specific to powerpc and device trees.
Ok, but making my CS4270 driver device-tree aware is a completely separate
task from what this patchset is addressing.
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Timur Tabi @ 2008-01-03 17:57 UTC (permalink / raw)
To: Jon Smirl; +Cc: linuxppc-dev, alsa-devel
In-Reply-To: <9e4733910801020756p18e12ce8o618b8eae5e7c5a53@mail.gmail.com>
Jon Smirl wrote:
> For this model to work you need to split your driver. fsl-ssi and
> mpc8610_hpcd need to be in two separate drivers.
They are two separate drivers. sound/soc/fsl/fsl_ssi.c and
sound/soc/fsl/mpc8610_hpcd.c
> fsl-ssi is easy
> enough to load since it has a device tree entry.
>
> mpc8610_hpcd is the harder one to load since it doesn't have a device
> tree entry. What you want to do it match on the compatible field of
> the root node.
>
> static struct of_device_id fabric_of_match[] = {
> {
> .compatible = "fsl,MPC8610HPCD",
> },
> {},
> };
>
> But this doesn't work since the root is the device tree isn't passed
> down into the device probe code. (Could this be fixed?)
I don't understand that sentence. Is there a typo?
> Instead we could make the separated mpc8610_hpcd fabric driver attach
> to fsl,ssi.
>
> static struct of_device_id fabric_of_match[] = {
> {
> .compatible = "fsl,ssi",
> },
> {},
> };
>
> Then in it's probe code check for the right platform.
That's what I do. I attach to fsl,ssi, gather the information from the device
tree, and then call a private API to initialize the SSI driver.
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: MPC8260ADS and linux-2.6
From: Scott Wood @ 2008-01-03 17:58 UTC (permalink / raw)
To: suja Baburaj; +Cc: linuxppc-embedded
In-Reply-To: <a3b98ac10801022105w240b0f96race4d3aa84e51f27@mail.gmail.com>
suja Baburaj wrote:
> I have an MPC8260ADS board with (eldk)linux-2.4.25 working fine on it.
> Now i want to try linux-2.6.X on the board.
There's no support for that specific board in mainstream 2.6 yet, but it
should be fairly simple to get it working using the mpc8272ads support
as an example.
-Scott
^ permalink raw reply
* Re: Drivers' probe function calling order
From: Jeff Mock @ 2008-01-03 18:04 UTC (permalink / raw)
To: DI BACCO ANTONIO - technolabs; +Cc: linuxppc-embedded
In-Reply-To: <F1F6EC0C8B75034F9E3A79FC85122E8EC2DE1E@aquib01a>
The only way I've know to do this is to build the drivers as modules and
load them in the desired order from the startup scripts called from init.
If there's a better way I would like to know about it also...
jeff
DI BACCO ANTONIO - technolabs wrote:
> How can I fix the calling order of two monolithic drivers? I have an spi
> driver and a driver for a dataflash, how can I force the system to call
> probe function of the spi driver first?
>
> Bye and thanks.
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Timur Tabi @ 2008-01-03 18:08 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, alsa-devel
In-Reply-To: <fa686aa40801020812o471e18e6u9fe20676d320e958@mail.gmail.com>
Grant Likely wrote:
> Why not be a child of the i2c bus with a phandle to the ssi bus?
Because when I probe the SSI node, I want to know what the attached codec is.
So if anything, I would need a pointer from the SSI bus *to* the respective
child on the I2C bus.
I know little about platform devices/drivers, so I don't know how to use them.
Currently, I have a design flaw in my driver in that if I have two SSIs, and
each one is attached to a CS4270, I don't have any way of making sure that the
right CS4270 is using the right I2C address. I'm guessing that if I switch to
a platform-based model, I can resolve this issue. But for now, the CS4270
doesn't support that, so that patchset I have submitted works with what I
have. After my patchset has been applied, I'll be more than happy to look
into updating the CS4270 (and everything else) to use the platform model for I2C.
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Timur Tabi @ 2008-01-03 18:14 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, alsa-devel
In-Reply-To: <fa686aa40801020828u5103d09cn2aa5eab7dda2fcff@mail.gmail.com>
Grant Likely wrote:
> Does that mean with ASoC V2 you can instantiate it with the board
> specific platform code instead?
I don't know. I haven't really looked at V2 yet. You'll have to ask Liam
Girdwood.
> This is one of the examples of where the compatible properties are
> trying to be far to generic about what they are. How do you define
> what "fsl,ssi" is?
The SSI is a specific Freescale device, so I think it's pretty well defined.
> What happens when Freescale produces another
> peripheral that can do ssi but isn't register level compatible?
It won't be called the SSI. It will be called something else.
> In my opinion, it is far better to be specific in the device tree and
> teach the driver about what versions it is able to bind against. In
> this case, I would use "fsl,mpc8610-ssi" or maybe better yet:
> "fsl,mpc8610-ssi,i2s" (MPC8610 SSI device in I2S mode).
I can work with that, but the SSI could be placed into any future 83xx, 85xx,
or 86xx SOC, and the driver will still work with it as-is.
> I don't like the idea of a separate fsl,mode property to describe the
> behaviour of multifunction peripherals. It makes probing more
> difficult when there is a different driver for each mode.
Can you propose an alternative? The driver needs to know what mode to use
when communicating with its codec. How am I supposed to know if I have an I2S
codec or an AC97 codec?
>> The fabric driver is specific to the board. So you should be using
>> Kconfig to select the fabric driver. There is no node in the device
>> tree for fabric drivers. I thought that was the consensus.
>
> No, the desire is to go multiplatform in ppc. That means you cannot
> use Kconfig to select the correct fabric driver.
I don't see any way of avoiding this with ASoC V1.
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Grant Likely @ 2008-01-03 18:13 UTC (permalink / raw)
To: Timur Tabi; +Cc: Liam Girdwood, alsa-devel, linuxppc-dev
In-Reply-To: <477D2150.4020506@freescale.com>
On 1/3/08, Timur Tabi <timur@freescale.com> wrote:
> Jon Smirl wrote:
> > Don't we want to follow the device tree policy of putting the device
> > on the controlling bus and then link it to the data bus?
>
> Normally, that sounds like a good idea, but the cs4270 is an I2S device first,
> and an I2C device second. I need to be able to find that codec from the I2S
> node. My I2S driver would not know to scan all I2C devices to find the codec.
The device tree is a description of the hardware; not software. It's
not a good idea to break with convention due to current driver
architecture.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [alsa-devel] [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Timur Tabi @ 2008-01-03 18:16 UTC (permalink / raw)
To: Grant Likely, Timur Tabi, linuxppc-dev, alsa-devel
In-Reply-To: <20080102184957.GB2007@sirena.org.uk>
Mark Brown wrote:
> The machine support code (fabric driver in PowerPC terms, I think?)
> tells the core how everything is connected together by registering
> devices representing the links (eg, I2S) between the codecs, CPU and
> other devices. The ASoC core is then responsible for ensuring that all
> the required components are present before it registers with the ALSA
> core.
I'm no expert on this, but I think from the PowerPC point-of-view, the *ideal*
situation would be if the ASoC fabric driver were generic, maybe even part of
ASoC itself, and everything it needed could be obtained from the device tree.
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Timur Tabi @ 2008-01-03 18:16 UTC (permalink / raw)
To: Timur Tabi, Jon Smirl, linuxppc-dev, alsa-devel
In-Reply-To: <20080103044432.GB25357@localhost.localdomain>
David Gibson wrote:
> Instantiating the fabric driver off any node is wrong, precisely
> because it is an abstraction. The fabric driver should be
> instantiated by the platform code.
Can you tell me how to do that?
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Grant Likely @ 2008-01-03 18:17 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev, alsa-devel
In-Reply-To: <477D24AA.4050804@freescale.com>
On 1/3/08, Timur Tabi <timur@freescale.com> wrote:
> Grant Likely wrote:
>
> > Why not be a child of the i2c bus with a phandle to the ssi bus?
>
> Because when I probe the SSI node, I want to know what the attached codec is.
> So if anything, I would need a pointer from the SSI bus *to* the respective
> child on the I2C bus.
That's fine too (it's what is done with Ethernet PHYs). My preference
is the other way around, but it's not a big issue in this case.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* RE: MPC8260ADS and linux-2.6
From: Rune Torgersen @ 2008-01-03 18:18 UTC (permalink / raw)
To: Scott Wood, suja Baburaj; +Cc: linuxppc-embedded
In-Reply-To: <477D2255.3040803@freescale.com>
> From: Scott Wood
> Sent: Thursday, January 03, 2008 11:59 AM
> To: suja Baburaj
> Cc: linuxppc-embedded@ozlabs.org
> Subject: Re: MPC8260ADS and linux-2.6
>=20
> suja Baburaj wrote:
> > I have an MPC8260ADS board with (eldk)linux-2.4.25 working=20
> fine on it.
> > Now i want to try linux-2.6.X on the board.
>=20
> There's no support for that specific board in mainstream 2.6=20
> yet, but it=20
> should be fairly simple to get it working using the=20
> mpc8272ads support=20
> as an example.
There is support, but it is in arch/ppc not arch/powerpc
(PQ2FADS support works for this board in arch/ppc)
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Timur Tabi @ 2008-01-03 18:20 UTC (permalink / raw)
To: Grant Likely; +Cc: Liam Girdwood, alsa-devel, linuxppc-dev
In-Reply-To: <fa686aa40801031013w54b15286u8e6e2561219422f2@mail.gmail.com>
Grant Likely wrote:
> The device tree is a description of the hardware; not software. It's
> not a good idea to break with convention due to current driver
> architecture.
I believe that with ASoC V1, I'm stuck between a rock and a hard place, and so
the only way to make this code work is to bend some rules. Right now, the
CS4270 driver does not support platform drivers or the device tree, so there's
no point in putting a child I2C node for it. As I mentioned in other posts, I
will be more than happy to update the CS4270 driver to support this new
paradigm (which was invented after the CS4270 driver was written) *after* this
current patchset is applied.
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [alsa-devel] [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Timur Tabi @ 2008-01-03 18:23 UTC (permalink / raw)
To: Timur Tabi, Jon Smirl, linuxppc-dev, alsa-devel
In-Reply-To: <20080102172340.GA2007@sirena.org.uk>
Mark Brown wrote:
>> clock1 = <0, bb8000>
>
>> Would that be better?
>
> To cover everything you'd need to be able to specify all the clocking
> parameters, especially a PLL configuration, and also specify more than
> one of each item. Even then you'd still have problems like...
The ASoC V1 API for communicating clock data from the fabric driver to the
codec driver only allows for three parameters.
> According to the documentation in your patch the bus frequency should
> already be optional
My code does not currently support that configuration, and I don't have any
hardware that works that way, so I don't know what it would look like. I'm
just trying to make the driver as flexible as possible, given ASoC V1 constraints.
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [PATCH v2] ucc_uart: add support for Freescale QUICCEngine UART
From: Timur Tabi @ 2008-01-03 18:26 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20080102181226.GA4486@loki.buserror.net>
Scott Wood wrote:
>>>> +static struct of_platform_driver ucc_uart_of_driver = {
>>>> + .owner = THIS_MODULE,
>>>> + .name = "ucc_uart",
>>> Maybe better fsl,ucc_uart?
>
> fsl,qe-uart is defined by Documentation/powerpc/booting-without-of.txt.
Wait, I'm confused. What does the of_platform_driver.name string have to do
with the compatible field in the device tree? Like I said earlier, I'm just
following the example of the other QE device drivers. If you want me to break
that example, I'm going to need an explanation why the other drivers do it wrong.
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Grant Likely @ 2008-01-03 18:25 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev, alsa-devel
In-Reply-To: <477D25F4.6020700@freescale.com>
On 1/3/08, Timur Tabi <timur@freescale.com> wrote:
> Grant Likely wrote:
>
> > Does that mean with ASoC V2 you can instantiate it with the board
> > specific platform code instead?
>
> I don't know. I haven't really looked at V2 yet. You'll have to ask Liam
> Girdwood.
>
> > This is one of the examples of where the compatible properties are
> > trying to be far to generic about what they are. How do you define
> > what "fsl,ssi" is?
>
> The SSI is a specific Freescale device, so I think it's pretty well defined.
>
> > What happens when Freescale produces another
> > peripheral that can do ssi but isn't register level compatible?
>
> It won't be called the SSI. It will be called something else.
Heh, I've seen enough to know that it's virtually impossible for a
company to maintain a consistent naming scheme all the time. Better
to be specific now and add generic names sometime in the future rather
than the other way around.
> > In my opinion, it is far better to be specific in the device tree and
> > teach the driver about what versions it is able to bind against. In
> > this case, I would use "fsl,mpc8610-ssi" or maybe better yet:
> > "fsl,mpc8610-ssi,i2s" (MPC8610 SSI device in I2S mode).
>
> I can work with that, but the SSI could be placed into any future 83xx, 85xx,
> or 86xx SOC, and the driver will still work with it as-is.
The have the device trees claim compatibility with the older
fsl,mpc8610-ssi device specifically. ie: compatible =
"fsl,mpc83<whatever>-ssi,ac97", "fsl,mpc8610-ssi,ac97";
>
> > I don't like the idea of a separate fsl,mode property to describe the
> > behaviour of multifunction peripherals. It makes probing more
> > difficult when there is a different driver for each mode.
>
> Can you propose an alternative? The driver needs to know what mode to use
> when communicating with its codec. How am I supposed to know if I have an I2S
> codec or an AC97 codec?
Make the compatible property tell you! :-) If it's connected to an
I2S codec, then it could be compatible = "fsl,mpc8610-ssi,i2s". Or
for AC7, compatible = "fsl,mpc8610-ssi,ac97"
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH v2] ucc_uart: add support for Freescale QUICCEngine UART
From: Scott Wood @ 2008-01-03 18:26 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <477D28D3.3000102@freescale.com>
Timur Tabi wrote:
> Scott Wood wrote:
>
>>>>> +static struct of_platform_driver ucc_uart_of_driver = {
>>>>> + .owner = THIS_MODULE,
>>>>> + .name = "ucc_uart",
>>>> Maybe better fsl,ucc_uart?
>>
>> fsl,qe-uart is defined by Documentation/powerpc/booting-without-of.txt.
>
> Wait, I'm confused. What does the of_platform_driver.name string have
> to do with the compatible field in the device tree?
Bah. Details.
/me resolves to read the context next time.
-Scott
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Timur Tabi @ 2008-01-03 18:28 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, alsa-devel
In-Reply-To: <fa686aa40801031025r10c31ce6x203755fe532f0c88@mail.gmail.com>
Grant Likely wrote:
> Make the compatible property tell you! :-) If it's connected to an
> I2S codec, then it could be compatible = "fsl,mpc8610-ssi,i2s". Or
> for AC7, compatible = "fsl,mpc8610-ssi,ac97"
That won't work. There are too many variations. I think a separate property
just makes more sense. Frankly, I don't see what's wrong with it.
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Grant Likely @ 2008-01-03 18:32 UTC (permalink / raw)
To: Timur Tabi; +Cc: Liam Girdwood, alsa-devel, linuxppc-dev
In-Reply-To: <477D276B.2060300@freescale.com>
On 1/3/08, Timur Tabi <timur@freescale.com> wrote:
> Grant Likely wrote:
>
> > The device tree is a description of the hardware; not software. It's
> > not a good idea to break with convention due to current driver
> > architecture.
>
> I believe that with ASoC V1, I'm stuck between a rock and a hard place, and so
> the only way to make this code work is to bend some rules. Right now, the
> CS4270 driver does not support platform drivers or the device tree, so there's
> no point in putting a child I2C node for it. As I mentioned in other posts, I
> will be more than happy to update the CS4270 driver to support this new
> paradigm (which was invented after the CS4270 driver was written) *after* this
> current patchset is applied.
If you need to bend rules, then do it in a place where it won't bite
us in the butt down the road. (ie. not with the device tree). Do
hacky stuff in the platform code if you need to because it can be
changed easily down the road.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Grant Likely @ 2008-01-03 18:38 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev, alsa-devel
In-Reply-To: <477D296A.6040202@freescale.com>
On 1/3/08, Timur Tabi <timur@freescale.com> wrote:
> Grant Likely wrote:
>
> > Make the compatible property tell you! :-) If it's connected to an
> > I2S codec, then it could be compatible = "fsl,mpc8610-ssi,i2s". Or
> > for AC7, compatible = "fsl,mpc8610-ssi,ac97"
>
> That won't work. There are too many variations. I think a separate property
> just makes more sense. Frankly, I don't see what's wrong with it.
Sure it will, that's exactly what I'm doing with the 5200, but I won't
argue the point. My *opinion* is that using compatible is a more
elegant approach for this type of multifunction device, but using a
mode property is neither wrong or bad.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Scott Wood @ 2008-01-03 18:54 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, alsa-devel, Timur Tabi
In-Reply-To: <fa686aa40801031017n42f6fbf1nb2da5097ef13cf3c@mail.gmail.com>
Grant Likely wrote:
> On 1/3/08, Timur Tabi <timur@freescale.com> wrote:
>> Grant Likely wrote:
>>
>>> Why not be a child of the i2c bus with a phandle to the ssi bus?
>> Because when I probe the SSI node, I want to know what the attached codec is.
>> So if anything, I would need a pointer from the SSI bus *to* the respective
>> child on the I2C bus.
>
> That's fine too (it's what is done with Ethernet PHYs). My preference
> is the other way around, but it's not a big issue in this case.
I'd just link in both directions, and let software follow it in
whichever direction it prefers.
-Scott
^ permalink raw reply
* Re: Reading a config file in a driver ....
From: Carlos Munoz @ 2008-01-03 18:43 UTC (permalink / raw)
To: Misbah khan; +Cc: linuxppc-embedded
In-Reply-To: <20080103163019.GA4223@lixom.net>
Olof Johansson wrote:
> On Wed, Jan 02, 2008 at 09:03:20PM -0800, Misbah khan wrote:
>
>> Hi all ....
>>
>> I am writing a LCD driver in which the default configuration for LCD would
>> be loded at the Init . This default configuration if keep in the driver then
>> for a change in default configuration we need to compile the driver which we
>> never want . Hence we want a .config file in /etc/lcd.config dir which could
>> be changed and the next boot will take this configuration as the default
>> configuration.
>>
>> I need to know How to read from the config file in the driver form the dir
>> /etc/lcd.config. The driver would be installed at boot up
>>
>
> The driver/kernel shouldn't read the file directly, if anything you
> should have a userspace tool that reads it and adjusts the driver via
> sysfs or similar. That tool can be run from some of the init scripts,
> or from the ramdisk in case you want to do it early.
>
What I've done in the past is to use module_param() to define variables
that get set when the module is loaded. Then all you need to do is edit
the /etc/modules file and change the parameter value. However, this
technique is only efficient if only a few parameters will ever change.
If you need to change more than a few parameters, Olof's suggestion
would be preferred.
Carlos
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Grant Likely @ 2008-01-03 19:13 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, alsa-devel, Timur Tabi
In-Reply-To: <477D2F52.7090306@freescale.com>
On 1/3/08, Scott Wood <scottwood@freescale.com> wrote:
> Grant Likely wrote:
> > On 1/3/08, Timur Tabi <timur@freescale.com> wrote:
> >> Grant Likely wrote:
> >>
> >>> Why not be a child of the i2c bus with a phandle to the ssi bus?
> >> Because when I probe the SSI node, I want to know what the attached codec is.
> >> So if anything, I would need a pointer from the SSI bus *to* the respective
> >> child on the I2C bus.
> >
> > That's fine too (it's what is done with Ethernet PHYs). My preference
> > is the other way around, but it's not a big issue in this case.
>
> I'd just link in both directions, and let software follow it in
> whichever direction it prefers.
Gah! Don't do that! Then you need to maintain both directions in the
dts file. Software is good at generating reverse mappings. Don't put
that burden on the dts author. (the software principle of defining
things in one place only applies here)
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC
From: Scott Wood @ 2008-01-03 19:18 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, alsa-devel, Timur Tabi
In-Reply-To: <fa686aa40801031113od68e2a3m6cb60b8fa6f26c17@mail.gmail.com>
Grant Likely wrote:
> On 1/3/08, Scott Wood <scottwood@freescale.com> wrote:
>> I'd just link in both directions, and let software follow it in
>> whichever direction it prefers.
>
> Gah! Don't do that! Then you need to maintain both directions in the
> dts file. Software is good at generating reverse mappings.
Software is, however, lousy at correctly wading through
poorly-structured data (which device trees are full of) to figure out
how to locate the link it wants to follow backwards.
-Scott
^ permalink raw reply
* Re: Drivers' probe function calling order
From: Alessandro Rubini @ 2008-01-03 21:54 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <F1F6EC0C8B75034F9E3A79FC85122E8EC2DE1E@aquib01a>
> how can I force the system to call
> probe function of the spi driver first?
You can declare their init functions at different initcall level. For
example declaring the dataflash one as late_initcall(). Or declare
the spi one as subsys_initcall() -- whatever makes more sense.
There might be cleaner ways according to your setup, but this will
surely work.
/alessandro
^ permalink raw reply
* Re: [PATCH] IB/ehca: Forward event client-reregister-required to registered clients
From: Hoang-Nam Nguyen @ 2008-01-03 22:43 UTC (permalink / raw)
To: Roland Dreier
Cc: fenkes, linux-kernel, linuxppc-dev, Christoph Raisch, general,
stefan.roscher
In-Reply-To: <200712201506.34253.hnguyen@linux.vnet.ibm.com>
Hi Roland,
Just want to make sure you've seen this patch and if it looks ok for you.
Thanks
Nam
On Thursday 20 December 2007 15:06, Hoang-Nam Nguyen wrote:
> This patch allows ehca to forward event client-reregister-required to
> registered clients. Such one event is generated by the switch eg. after
> its reboot.
>
> Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
> ---
> drivers/infiniband/hw/ehca/ehca_irq.c | 12 ++++++++++++
> 1 files changed, 12 insertions(+), 0 deletions(-)
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox