Re: WL1273 FM Radio driver...

2011-02-09 Thread Matti J. Aaltonen
On Mon, 2011-02-07 at 14:00 -0200, ext Mauro Carvalho Chehab wrote:
 Em 07-02-2011 12:17, Matti J. Aaltonen escreveu:
  On Mon, 2011-02-07 at 13:52 +, ext Mark Brown wrote:
  On Mon, Feb 07, 2011 at 11:48:17AM -0200, Mauro Carvalho Chehab wrote:
  Em 07-02-2011 11:10, Mark Brown escreveu:
 
  There is an audio driver for this chip and it is using those functions.
 
  Where are the other drivers that depend on it?
 
  Nothing's been merged yet to my knowledge, Matti can comment on any
  incoming boards which will use it (rx51?).
  
  Yes, nothing's been merged yet. There are only dependencies between the
  parts of this driver... I cannot comment on upcoming boards, I just hope
  we could agree on a sensible structure for this thing.
 
 We don't need any brand names or specific details, but it would be good to 
 have an overview, in general lines, about the architecture, in order to help 
 you to map how this would fit. In particular, the architecturre of 
 things that are tightly coupled and can't be splitted by some bus abstraction.

I understand what you are saying but obviously I cannot think like a
sub-system maintainer:-) What I see here is a piece of hardware with
lots of capabilities: FM RX and TX with analog and digital audio, I2C
and UART control... 

I would have thought that the goal is to make a driver that's as
general as possible and to make it possible to use the chip in all
kinds of architectures and scenarios.

But we have been using the driver in principle in its current form. But
if the interface to the users has to be split in a different way, I
don't see that as a major problem. But on the other hand I can't see the
ASoC / V4L2 division going away completely. The users won't probably
care if we have MFD or not.

Cheers,
Matti

 Mauro.


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Matti J. Aaltonen
Hello.

Mark Brown wrote:
 On Wed, Feb 02, 2011 at 01:35:01PM -0200, Mauro 
 Carvalho Chehab wrote:

 [Reflowed into 80 columns.]
 My concerns is that the V4L2-specific part of the code should be at
 drivers/media.  I prefer that the specific MFD I/O part to be at
 drivers/mfd, just like the other drivers.

 Currently that's not the case - the I/O functionality is not in any
 meaningful sense included in the MFD, it's provided by the V4L portion.

I've been away for two and a half weeks so I haven't been able to
comment...

But before I start to make changes, I'd still like to ask for a comment
on my original plan, which was to have the I/O functions in the MFD
driver and also have there things like interrupt handling etc.

My vision was that the MFD part would have the application logic and the
child drivers would be just true interfaces to the core functionality,
because I kind of saw the children to be of equal importance and because
the codec and the v4l2 driver share some controls like for example the
volume control. 

If you'd care to take a look an earlier version of the MFD driver here:

http://article.gmane.org/gmane.linux.drivers.video-input-infrastructure/23602/match=aaltonen

So the question is if I put only the I/O stuff into the MFD driver or
can I have the other application logic there as well?

Thanks,
Matti





--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Mark Brown
On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:

 the MFD part (for example, 
 wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data). 
 The logic that are related to control the radio (wl1273_fm_set_audio,  
 wl1273_fm_set_volume,
 etc) are not related to access the device via the MFD bus. They should be at
 the media part of the driver, where they belong.

Those functions are being used by the audio driver.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Mauro Carvalho Chehab
Em 07-02-2011 10:02, Mark Brown escreveu:
 On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
 
 the MFD part (for example, 
 wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data). 
 The logic that are related to control the radio (wl1273_fm_set_audio,  
 wl1273_fm_set_volume,
 etc) are not related to access the device via the MFD bus. They should be at
 the media part of the driver, where they belong.
 
 Those functions are being used by the audio driver.

Not sure if I understood your comments. Several media drivers have alsa drivers:
saa7134, em28xx, cx231xx, etc. The audio drivers for them are also under 
/drivers/media, as it is not easy to de-couple audio and video/radio part
on those devices. For bttv and some USB boards (that use snd-usb-audio), the 
audio
part is at /sound, as the audio part on them are independent and don't need to
share anything, as audio is provided by a completely independent group of
registers.

I suggest to use the same logic for wl1273.

Cheers,
Mauro.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Mark Brown
On Mon, Feb 07, 2011 at 10:48:03AM -0200, Mauro Carvalho Chehab wrote:
 Em 07-02-2011 10:02, Mark Brown escreveu:
  On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:

  the MFD part (for example, 
  wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data). 
  The logic that are related to control the radio (wl1273_fm_set_audio,  
  wl1273_fm_set_volume,
  etc) are not related to access the device via the MFD bus. They should be 
  at
  the media part of the driver, where they belong.

  Those functions are being used by the audio driver.

 Not sure if I understood your comments. Several media drivers have alsa 
 drivers:

There is an audio driver for this chip and it is using those functions.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Matti J. Aaltonen
On Mon, 2011-02-07 at 10:48 -0200, ext Mauro Carvalho Chehab wrote:
 Em 07-02-2011 10:02, Mark Brown escreveu:
  On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
  
  the MFD part (for example, 
  wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data). 
  The logic that are related to control the radio (wl1273_fm_set_audio,  
  wl1273_fm_set_volume,
  etc) are not related to access the device via the MFD bus. They should be 
  at
  the media part of the driver, where they belong.
  
  Those functions are being used by the audio driver.
 
 Not sure if I understood your comments. Several media drivers have alsa 
 drivers:
 saa7134, em28xx, cx231xx, etc. The audio drivers for them are also under 
 /drivers/media, as it is not easy to de-couple audio and video/radio part
 on those devices. For bttv and some USB boards (that use snd-usb-audio), the 
 audio
 part is at /sound, as the audio part on them are independent and don't need to
 share anything, as audio is provided by a completely independent group of
 registers.
 
 I suggest to use the same logic for wl1273.

So you are suggesting a more or less complete rewrite, so that I'd
create a directory like media/radio/wl1273 and then place there all of
the driver files: wl1273-radio.c, wl1273-alsa.c and maybe wl1273-core.c?

Cheers,
Matti

 
 Cheers,
 Mauro.
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Mark Brown
On Mon, Feb 07, 2011 at 03:27:12PM +0200, Matti J. Aaltonen wrote:

 So you are suggesting a more or less complete rewrite, so that I'd
 create a directory like media/radio/wl1273 and then place there all of
 the driver files: wl1273-radio.c, wl1273-alsa.c and maybe wl1273-core.c?

Don't move the ASoC driver out of the ASoC code, it's a complete pain
for maintaining it and only makes the problems with having to build v4l
worse.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Mauro Carvalho Chehab
Em 07-02-2011 11:10, Mark Brown escreveu:
 On Mon, Feb 07, 2011 at 10:48:03AM -0200, Mauro Carvalho Chehab wrote:
 Em 07-02-2011 10:02, Mark Brown escreveu:
 On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
 
 the MFD part (for example, 
 wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data). 
 The logic that are related to control the radio (wl1273_fm_set_audio,  
 wl1273_fm_set_volume,
 etc) are not related to access the device via the MFD bus. They should be 
 at
 the media part of the driver, where they belong.
 
 Those functions are being used by the audio driver.
 
 Not sure if I understood your comments. Several media drivers have alsa 
 drivers:
 
 There is an audio driver for this chip and it is using those functions.

Where are the other drivers that depend on it?

Mauro

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Mark Brown
On Mon, Feb 07, 2011 at 11:48:17AM -0200, Mauro Carvalho Chehab wrote:
 Em 07-02-2011 11:10, Mark Brown escreveu:

  There is an audio driver for this chip and it is using those functions.

 Where are the other drivers that depend on it?

Nothing's been merged yet to my knowledge, Matti can comment on any
incoming boards which will use it (rx51?).

Note that due to the decomposed nature of embedded audio hardware the
audio part of the chip needs to be represended within the audio
subsystem even if the control were all in the media side - this isn't an
isolated bit of hardware on an expansion card, it's fairly tightly
coupled into the rest of the system.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Matti J. Aaltonen
On Mon, 2011-02-07 at 11:48 -0200, ext Mauro Carvalho Chehab wrote:
 Em 07-02-2011 11:10, Mark Brown escreveu:
  On Mon, Feb 07, 2011 at 10:48:03AM -0200, Mauro Carvalho Chehab wrote:
  Em 07-02-2011 10:02, Mark Brown escreveu:
  On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:
  
  the MFD part (for example, 
  wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data). 
  The logic that are related to control the radio (wl1273_fm_set_audio,  
  wl1273_fm_set_volume,
  etc) are not related to access the device via the MFD bus. They should 
  be at
  the media part of the driver, where they belong.
  
  Those functions are being used by the audio driver.
  
  Not sure if I understood your comments. Several media drivers have alsa 
  drivers:
  
  There is an audio driver for this chip and it is using those functions.
 
 Where are the other drivers that depend on it?

There's the MFD driver driver/mfd/wl1273-core.c, which is to offer the
(I2C) I/O functions to the child drivers:
drivers/media/radio/radio-wl1273.c and sound/soc/codecs/wl1273.c.

Both children depend on the MFD driver for I/O and the codec also
depends on the presence of the radio-wl1273 driver because without the
v4l2 part nothing can be done...

Matti

 
 Mauro
 


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Matti J. Aaltonen
On Mon, 2011-02-07 at 13:52 +, ext Mark Brown wrote:
 On Mon, Feb 07, 2011 at 11:48:17AM -0200, Mauro Carvalho Chehab wrote:
  Em 07-02-2011 11:10, Mark Brown escreveu:
 
   There is an audio driver for this chip and it is using those functions.
 
  Where are the other drivers that depend on it?
 
 Nothing's been merged yet to my knowledge, Matti can comment on any
 incoming boards which will use it (rx51?).

Yes, nothing's been merged yet. There are only dependencies between the
parts of this driver... I cannot comment on upcoming boards, I just hope
we could agree on a sensible structure for this thing.

Matti.




--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Mauro Carvalho Chehab
Em 07-02-2011 12:09, Matti J. Aaltonen escreveu:
 On Mon, 2011-02-07 at 11:48 -0200, ext Mauro Carvalho Chehab wrote:
 Em 07-02-2011 11:10, Mark Brown escreveu:
 On Mon, Feb 07, 2011 at 10:48:03AM -0200, Mauro Carvalho Chehab wrote:
 Em 07-02-2011 10:02, Mark Brown escreveu:
 On Mon, Feb 07, 2011 at 10:00:16AM -0200, Mauro Carvalho Chehab wrote:

 the MFD part (for example, 
 wl1273_fm_read_reg/wl1273_fm_write_cmd/wl1273_fm_write_data). 
 The logic that are related to control the radio (wl1273_fm_set_audio,  
 wl1273_fm_set_volume,
 etc) are not related to access the device via the MFD bus. They should 
 be at
 the media part of the driver, where they belong.

 Those functions are being used by the audio driver.

 Not sure if I understood your comments. Several media drivers have alsa 
 drivers:

 There is an audio driver for this chip and it is using those functions.

 Where are the other drivers that depend on it?
 
 There's the MFD driver driver/mfd/wl1273-core.c, which is to offer the
 (I2C) I/O functions to the child drivers:
 drivers/media/radio/radio-wl1273.c and sound/soc/codecs/wl1273.c.
 
 Both children depend on the MFD driver for I/O and the codec also
 depends on the presence of the radio-wl1273 driver because without the
 v4l2 part nothing can be done...

I think that the better would be to move the audio part 
(sound/soc/codecs/wl1273.c)
as drivers/media/radio/wl1273/wl1273-alsa.c. Is there any problem on moving it, 
or
the alsa driver is also tightly coupled on the rest of the sound/soc stuff?

I remember that, in the past, there were someone that proposed to move /sound 
into
/media/sound, and move some common stuff between them into /media/common.

Btw, there are(where?) some problems between -alsa and -media subsystems: 
basically, 
the audio core needs to be initialized before the drivers. However, this 
sometimes
don't happen (I can't remember the exact situation - perhaps builtin 
compilations?),
but we ended by needing to explicitly delaying the init of some drivers with:
late_initcall(saa7134_alsa_init); 
To avoid some OOPS conditions.

 
 Matti
 

 Mauro

 
 

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Mauro Carvalho Chehab
Em 07-02-2011 12:17, Matti J. Aaltonen escreveu:
 On Mon, 2011-02-07 at 13:52 +, ext Mark Brown wrote:
 On Mon, Feb 07, 2011 at 11:48:17AM -0200, Mauro Carvalho Chehab wrote:
 Em 07-02-2011 11:10, Mark Brown escreveu:

 There is an audio driver for this chip and it is using those functions.

 Where are the other drivers that depend on it?

 Nothing's been merged yet to my knowledge, Matti can comment on any
 incoming boards which will use it (rx51?).
 
 Yes, nothing's been merged yet. There are only dependencies between the
 parts of this driver... I cannot comment on upcoming boards, I just hope
 we could agree on a sensible structure for this thing.

We don't need any brand names or specific details, but it would be good to 
have an overview, in general lines, about the architecture, in order to help 
you to map how this would fit. In particular, the architecturre of 
things that are tightly coupled and can't be splitted by some bus abstraction.

Mauro.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-07 Thread Mark Brown
On Mon, Feb 07, 2011 at 01:57:10PM -0200, Mauro Carvalho Chehab wrote:
 Em 07-02-2011 12:09, Matti J. Aaltonen escreveu:

  Both children depend on the MFD driver for I/O and the codec also
  depends on the presence of the radio-wl1273 driver because without the
  v4l2 part nothing can be done...

 I think that the better would be to move the audio part 
 (sound/soc/codecs/wl1273.c)
 as drivers/media/radio/wl1273/wl1273-alsa.c. Is there any problem on moving 
 it, or
 the alsa driver is also tightly coupled on the rest of the sound/soc stuff?

As I said in my previous e-mail it's tightly coupled.

 I remember that, in the past, there were someone that proposed to move /sound 
 into
 /media/sound, and move some common stuff between them into /media/common.

This is the first embedded audio driver that's had interface with media
stuff, the driver situation for embedded audio is very different to that
for PCs.  Embedded audio subsystems are tightly coupled integrations of
many different devices, the sound card userspace sees is produced by
coordinating the actions of several different drivers.

 Btw, there are(where?) some problems between -alsa and -media subsystems: 
 basically, 
 the audio core needs to be initialized before the drivers. However, this 
 sometimes
 don't happen (I can't remember the exact situation - perhaps builtin 
 compilations?),
 but we ended by needing to explicitly delaying the init of some drivers with:
   late_initcall(saa7134_alsa_init); 
 To avoid some OOPS conditions.

This isn't a problem for embedded audio, instantiation of the cards is
deferred until all the components for the card have registered with the
core so nothing will happen until dependencies are satisfied, though it
is a problem with the wl1273 driver as it currently stands due to the
lack of a functional MFD.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-02 Thread Mauro Carvalho Chehab
Em 30-01-2011 21:23, Samuel Ortiz escreveu:
 Hi Matti,
 
 On Tue, Jan 18, 2011 at 05:04:23PM +0200, Matti J. Aaltonen wrote:
 Hello

 I have been trying to get the WL1273 FM radio driver into the kernel for
 some time. It has been kind of difficult, one of the reasons is that I
 didn't realize I should have tried to involve all relevant maintainers
 to the discussion form the beginning (AsoC, Media and MFD). At Mark's
 suggestion I'm trying to reopen the discussion now.

 The driver consists of an MFD core and two child drivers (the audio
 codec and the V4L2 driver). And the question is mainly about the role of
 the MFD driver: the original design had the IO functions in the core.
 Currently the core is practically empty mainly because Mauro very
 strongly wanted to have “everything” in the V4L2 driver.
 What was Mauro main concerns with having the IO part in the core ?
 A lot of MFD drivers are going that path already.

My concerns is that the V4L2-specific part of the code should be at 
drivers/media.
I prefer that the specific MFD I/O part to be at drivers/mfd, just like
the other drivers.

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-02 Thread Mark Brown
On Wed, Feb 02, 2011 at 01:35:01PM -0200, Mauro Carvalho Chehab wrote:

[Reflowed into 80 columns.]
 My concerns is that the V4L2-specific part of the code should be at
 drivers/media.  I prefer that the specific MFD I/O part to be at
 drivers/mfd, just like the other drivers.

Currently that's not the case - the I/O functionality is not in any
meaningful sense included in the MFD, it's provided by the V4L portion.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-02-02 Thread Samuel Ortiz
Hi Mauro,

On Wed, Feb 02, 2011 at 01:35:01PM -0200, Mauro Carvalho Chehab wrote:
 Em 30-01-2011 21:23, Samuel Ortiz escreveu:
  Hi Matti,
  
  On Tue, Jan 18, 2011 at 05:04:23PM +0200, Matti J. Aaltonen wrote:
  Hello
 
  I have been trying to get the WL1273 FM radio driver into the kernel for
  some time. It has been kind of difficult, one of the reasons is that I
  didn't realize I should have tried to involve all relevant maintainers
  to the discussion form the beginning (AsoC, Media and MFD). At Mark's
  suggestion I'm trying to reopen the discussion now.
 
  The driver consists of an MFD core and two child drivers (the audio
  codec and the V4L2 driver). And the question is mainly about the role of
  the MFD driver: the original design had the IO functions in the core.
  Currently the core is practically empty mainly because Mauro very
  strongly wanted to have “everything” in the V4L2 driver.
  What was Mauro main concerns with having the IO part in the core ?
  A lot of MFD drivers are going that path already.
 
 My concerns is that the V4L2-specific part of the code should be at 
 drivers/media.
 I prefer that the specific MFD I/O part to be at drivers/mfd, just like
 the other drivers.
Agreed, but it seems that's not the case currently. Would you be ok with Matti
refactoring those 2 drivers a bit so that the actual core I/O parts should be
handled by the MFD driver ?

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-01-30 Thread Samuel Ortiz
Hi Matti,

On Tue, Jan 18, 2011 at 05:04:23PM +0200, Matti J. Aaltonen wrote:
 Hello
 
 I have been trying to get the WL1273 FM radio driver into the kernel for
 some time. It has been kind of difficult, one of the reasons is that I
 didn't realize I should have tried to involve all relevant maintainers
 to the discussion form the beginning (AsoC, Media and MFD). At Mark's
 suggestion I'm trying to reopen the discussion now.
 
 The driver consists of an MFD core and two child drivers (the audio
 codec and the V4L2 driver). And the question is mainly about the role of
 the MFD driver: the original design had the IO functions in the core.
 Currently the core is practically empty mainly because Mauro very
 strongly wanted to have “everything” in the V4L2 driver.
What was Mauro main concerns with having the IO part in the core ?
A lot of MFD drivers are going that path already.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: WL1273 FM Radio driver...

2011-01-19 Thread Mark Brown
On Tue, Jan 18, 2011 at 05:04:23PM +0200, Matti J. Aaltonen wrote:

 The driver consists of an MFD core and two child drivers (the audio
 codec and the V4L2 driver). And the question is mainly about the role of
 the MFD driver: the original design had the IO functions in the core.
 Currently the core is practically empty mainly because Mauro very
 strongly wanted to have “everything” in the V4L2 driver.

 I liked the original design because it didn't have the bug that the
 current MFD has: the codec can be initialized before the V4L2 part sets
 the IO function pointers. Having in principle equally capable interface
 drivers is symmetrical and esthetically pleasing:-) Also somebody could
 easily leave out the existing interfaces and create a completely new one
 based for example to sysfs or something... Having the IO in the core
 would also conveniently hide the physical communication layer and make
 it easy to change I2C to UART, which is also supported by the chip.

The above pattern with the core taking responsibility for register I/O
is used by all the other MFD drivers in part because it's much less
fragile against initialisation ordering issues.  It ensures that before
any subdevices can instantiate and try to do register I/O all the
infrastructure required to do that is present.  Is there any great
reason for following a different pattern, and if we are going to do so
how do we deal with the init ordering?
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html