Skip to contentSkip to conversation

WL1273 FM Radio driver...

DISCUSSION Matti J. Aaltonen 4 participants 6 messages Jan 18, 2011 – Feb 3, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

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.

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.

Thanks,
Matti

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw
Quoted 6 lines · Matti J. Aaltonen

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.

Quoted 8 lines

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?

#2 lore raw
In reply to Matti J. Aaltonen

Hi Matti,

Quoted 8 lines · Matti J. Aaltonen

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.

Quoted 5 lines

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.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
#3 lore raw

Em 30-01-2011 21:23, Samuel Ortiz escreveu:

Quoted 11 lines

Hi Matti,

Quoted 8 lines · Matti J. Aaltonen

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.

Quoted 7 lines
Quoted 5 lines

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

#4 lore raw

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

[Reflowed into 80 columns.]

Quoted 3 lines

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.

#5 lore raw
In reply to Mauro Carvalho Chehab

Hi Mauro,

Quoted 17 lines · Mauro Carvalho Chehab

Em 30-01-2011 21:23, Samuel Ortiz escreveu:

Quoted 16 lines

Hi Matti,

Quoted 13 lines · Matti J. Aaltonen

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.

Quoted 6 lines
Quoted 2 lines

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.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/