Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-10 Thread Arnd Bergmann
On Friday 09 September 2011, Russell King - ARM Linux wrote: That's just twisted and utterly insane - adding more code for precisely zero benefit what so ever. Think about it - the device tree is already creating platform devices for entries in the device tree file. What's the point of

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-10 Thread Mark Brown
On Sat, Sep 10, 2011 at 10:37:15PM +0200, Arnd Bergmann wrote: On Friday 09 September 2011, Russell King - ARM Linux wrote: That's just twisted and utterly insane - adding more code for precisely zero benefit what so ever. Think about it - the device tree is already creating platform

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-09 Thread Jassi Brar
On 9 September 2011 05:29, Mark Brown broo...@opensource.wolfsonmicro.com wrote: Jassi's suggestion was that we should have some magic to automatically generate defaults for the relevant device registrations to sidestep these issues. Perhaps there is some misunderstanding no witchcraft is

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-09 Thread Russell King - ARM Linux
On Thu, Sep 08, 2011 at 04:59:04PM -0700, Mark Brown wrote: On Fri, Sep 09, 2011 at 12:01:02AM +0100, Russell King - ARM Linux wrote: On Thu, Sep 08, 2011 at 03:47:31PM -0700, Mark Brown wrote: What will happen for device tree is that there will be a device in the device tree for the

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-09 Thread Mark Brown
On Fri, Sep 09, 2011 at 10:41:56AM +0100, Russell King - ARM Linux wrote: On Thu, Sep 08, 2011 at 04:59:04PM -0700, Mark Brown wrote: The problem is that someone has to manually go and add the device to every board that needs one and people find that tedious and slightly inelegant

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-09 Thread Russell King - ARM Linux
On Fri, Sep 09, 2011 at 09:11:52AM -0700, Mark Brown wrote: On Fri, Sep 09, 2011 at 10:41:56AM +0100, Russell King - ARM Linux wrote: On Thu, Sep 08, 2011 at 04:59:04PM -0700, Mark Brown wrote: The problem is that someone has to manually go and add the device to every board that needs

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-09 Thread Mark Brown
On Fri, Sep 09, 2011 at 08:01:35PM +0100, Russell King - ARM Linux wrote: Well, with DT, there won't be any 'board type' anymore. There won't be any 'machine_is_xxx()' to sort it out anymore. Using DT, all that will be history - it's all got to be sorted out by either devices or device

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-09 Thread Russell King - ARM Linux
On Fri, Sep 09, 2011 at 12:30:11PM -0700, Mark Brown wrote: On Fri, Sep 09, 2011 at 08:01:35PM +0100, Russell King - ARM Linux wrote: Well, with DT, there won't be any 'board type' anymore. There won't be any 'machine_is_xxx()' to sort it out anymore. Using DT, all that will be history

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-08 Thread Russell King - ARM Linux
On Thu, Sep 08, 2011 at 03:29:11PM -0700, Mark Brown wrote: On Thu, 2011-09-08 at 22:28 +0200, Arnd Bergmann wrote: On Thursday 08 September 2011 20:05:48 Mans Rullgard wrote: I had the same thought, but I couldn't find a suitable string anywhere. Are you suggesting an

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-08 Thread Russell King - ARM Linux
On Thu, Sep 08, 2011 at 03:47:31PM -0700, Mark Brown wrote: On Thu, Sep 08, 2011 at 11:37:20PM +0100, Russell King - ARM Linux wrote: With DT of course, all devices get instantiated from the device tree, so there should not be any more platform specific chunks of code in these locations

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-08 Thread Mark Brown
On Thu, Sep 08, 2011 at 11:37:20PM +0100, Russell King - ARM Linux wrote: With DT of course, all devices get instantiated from the device tree, so there should not be any more platform specific chunks of code in these locations (ha, it couldn't be solved with platform data so I suspect it

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-08 Thread Mark Brown
On Thu, 2011-09-08 at 22:28 +0200, Arnd Bergmann wrote: On Thursday 08 September 2011 20:05:48 Mans Rullgard wrote: I had the same thought, but I couldn't find a suitable string anywhere. Are you suggesting an if(machine_is_foo()) cascade in omap_init_audio()? I'll be the first to agree

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-08 Thread Mark Brown
On Thu, Sep 08, 2011 at 11:47:16PM +0530, Jassi Brar wrote: Can't we do by having omap_init_audio() in arch/arm/mach-omap2/devices.c generate a platform device of name depending upon machine_is_* ? That's not a bad idea. If we were going to do that it shouldn't be OMAP specific, any platform

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-08 Thread Arnd Bergmann
On Thursday 08 September 2011 20:05:48 Mans Rullgard wrote: Can't we do by having omap_init_audio() in arch/arm/mach-omap2/devices.c generate a platform device of name depending upon machine_is_* ? I had the same thought, but I couldn't find a suitable string anywhere. Are you suggesting

[PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-08 Thread Mans Rullgard
This converts the per-board modules to platform drivers for a device created by in main platform setup. These drivers call snd_soc_register_card() directly instead of going via a soc-audio device and the corresponding driver in soc-core. Signed-off-by: Mans Rullgard mans.rullg...@linaro.org ---

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-08 Thread Mans Rullgard
On 8 September 2011 20:17, Jassi Brar jaswinder.si...@linaro.org wrote: On 9 September 2011 00:35, Mans Rullgard mans.rullg...@linaro.org wrote: On 8 September 2011 19:17, Jassi Brar jassisinghb...@gmail.com wrote: On Thu, Sep 8, 2011 at 11:04 PM, Mans Rullgard mans.rullg...@linaro.org wrote:

Re: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers

2011-09-08 Thread Mark Brown
On Fri, Sep 09, 2011 at 12:01:02AM +0100, Russell King - ARM Linux wrote: On Thu, Sep 08, 2011 at 03:47:31PM -0700, Mark Brown wrote: What will happen for device tree is that there will be a device in the device tree for the ASoC board. Sounds like you just solved the machine_is_xxx()