All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: matti.j.aaltonen@nokia.com
Cc: alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com,
	lrg@slimlogic.co.uk, hverkuil@xs4all.nl, sameo@linux.intel.com,
	linux-media@vger.kernel.org
Subject: Re: WL1273 FM Radio driver...
Date: Mon, 07 Feb 2011 10:00:16 -0200	[thread overview]
Message-ID: <4D4FDED0.7070008@redhat.com> (raw)
In-Reply-To: <1297075922.15320.31.camel@masi.mnp.nokia.com>

Em 07-02-2011 08:52, Matti J. Aaltonen escreveu:
> 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?

Matti,

Things that are required in order to access the device via MFD should be at
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.

One example that you could as reference for the mfd/media is the Timeberdale driver. 
The MFD-specific part is at:
	drivers/mfd/timberdale.c

The media part is at:
	drivers/media/video/timblogiw.c

All you'll see at the MFD part is the logic to access the MFD bus and a description
of the devices that will be coupled into it (in this case, it is a multi-function
board). In other words, I/O control and the needed glue to access the I2C devices.
All logic required to control the media driver is at timblogiw.c.

I hope that helps.

Thanks,
Mauro

  reply	other threads:[~2011-02-07 12:00 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 10:52 WL1273 FM Radio driver Matti J. Aaltonen
2011-02-07 12:00 ` Mauro Carvalho Chehab [this message]
2011-02-07 12:02   ` Mark Brown
2011-02-07 12:48     ` Mauro Carvalho Chehab
2011-02-07 13:10       ` Mark Brown
2011-02-07 13:48         ` Mauro Carvalho Chehab
2011-02-07 13:52           ` Mark Brown
2011-02-07 14:17             ` Matti J. Aaltonen
2011-02-07 14:17               ` Matti J. Aaltonen
2011-02-07 16:00               ` Mauro Carvalho Chehab
2011-02-08  9:15                 ` [alsa-devel] " Peter Ujfalusi
2011-02-08  9:15                   ` Peter Ujfalusi
2011-02-08 10:09                   ` [alsa-devel] " Bensaid, Selma
2011-02-08 11:02                     ` Peter Ujfalusi
2011-02-08 11:02                       ` Peter Ujfalusi
2011-02-08 13:47                       ` [alsa-devel] " Bensaid, Selma
2011-02-09  7:14                         ` Matti J. Aaltonen
2011-02-09  7:14                           ` Matti J. Aaltonen
2011-02-09  7:22                       ` [alsa-devel] " Matti J. Aaltonen
2011-02-09  7:22                         ` Matti J. Aaltonen
2011-02-10  9:35                         ` [alsa-devel] " Bensaid, Selma
2011-02-10  9:35                           ` Bensaid, Selma
2011-02-10 10:03                           ` [alsa-devel] " Matti J. Aaltonen
2011-02-10 10:03                             ` Matti J. Aaltonen
2011-02-10 11:02                             ` [alsa-devel] " Mark Brown
2011-02-10 12:10                               ` Matti J. Aaltonen
2011-02-10 12:10                                 ` Matti J. Aaltonen
2011-02-10 12:28                                 ` [alsa-devel] " Mark Brown
2011-02-10 12:28                                   ` Mark Brown
2011-02-10 12:57                                   ` [alsa-devel] " Matti J. Aaltonen
2011-02-10 12:57                                     ` Matti J. Aaltonen
2011-02-10 13:23                                     ` [alsa-devel] " Mark Brown
2011-02-09  7:27                   ` Matti J. Aaltonen
2011-02-09  7:27                     ` Matti J. Aaltonen
2011-02-09  8:47                 ` Matti J. Aaltonen
2011-02-09  8:47                   ` Matti J. Aaltonen
2011-02-07 14:09           ` Matti J. Aaltonen
2011-02-07 14:09             ` Matti J. Aaltonen
2011-02-07 15:57             ` Mauro Carvalho Chehab
2011-02-07 16:01               ` Mark Brown
2011-02-07 13:27       ` Matti J. Aaltonen
2011-02-07 13:27         ` Matti J. Aaltonen
2011-02-07 13:28         ` Mark Brown
2011-02-07 13:34           ` Matti J. Aaltonen
2011-02-07 13:34             ` Matti J. Aaltonen
  -- strict thread matches above, loose matches on Subject: below --
2011-01-18 15:04 Matti J. Aaltonen
2011-01-18 15:04 ` Matti J. Aaltonen
2011-01-19 10:18 ` Mark Brown
2011-01-30 23:23 ` Samuel Ortiz
2011-02-02 15:35   ` Mauro Carvalho Chehab
2011-02-02 15:51     ` Mark Brown
2011-02-03  0:37     ` Samuel Ortiz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D4FDED0.7070008@redhat.com \
    --to=mchehab@redhat.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=matti.j.aaltonen@nokia.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.