linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
Cc: alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com,
	lrg@slimlogic.co.uk, mchehab@redhat.com, hverkuil@xs4all.nl,
	linux-media@vger.kernel.org
Subject: Re: [PATCH v19 1/3] MFD: WL1273 FM Radio: MFD driver for the FM radio.
Date: Mon, 28 Feb 2011 01:11:51 +0100	[thread overview]
Message-ID: <20110228001150.GA2749@sortiz-mobl> (raw)
In-Reply-To: <1297757626-3281-2-git-send-email-matti.j.aaltonen@nokia.com>

Hi Matti

On Tue, Feb 15, 2011 at 10:13:44AM +0200, Matti J. Aaltonen wrote:
> This is the core of the WL1273 FM radio driver, it connects
> the two child modules. The two child drivers are
> drivers/media/radio/radio-wl1273.c and sound/soc/codecs/wl1273.c.
> 
> The radio-wl1273 driver implements the V4L2 interface and communicates
> with the device. The ALSA codec offers digital audio, without it only
> analog audio is available.
The driver looks fine, but for Mauro to take this one you'd have to provide a
diff against the already existing wl1273-core.

I have some minor comments:

> diff --git a/drivers/mfd/wl1273-core.c b/drivers/mfd/wl1273-core.c
> new file mode 100644
> index 0000000..66e0ac9
> --- /dev/null
> +++ b/drivers/mfd/wl1273-core.c
> @@ -0,0 +1,295 @@
> +/*
> + * MFD driver for wl1273 FM radio and audio codec submodules.
> + *
> + * Copyright (C) 2010 Nokia Corporation
2011.


> +/**
> + * wl1273_fm_set_volume() -	Set volume.
> + * @core:			A pointer to the device struct.
> + * @volume:			The new volume value.
> + */
> +static int wl1273_fm_set_volume(struct wl1273_core *core, unsigned int volume)
> +{
> +	u16 val;
> +	int r;
> +
> +	if (volume > WL1273_MAX_VOLUME)
> +		return -EINVAL;
> +
> +	if (core->volume == volume)
> +		return 0;
> +
> +	val = volume;
> +	r = wl1273_fm_read_reg(core, WL1273_VOLUME_SET, &val);
> +	if (r)
> +		return r;
> +
> +	core->volume = volume;
> +	return 0;
> +}
I'm confused with this one: Isn't WL1273_VOLUME_SET a command ? Also, how can
reading from it set the volume ?


> +static int wl1273_core_remove(struct i2c_client *client)
> +{
> +	struct wl1273_core *core = i2c_get_clientdata(client);
> +
> +	dev_dbg(&client->dev, "%s\n", __func__);
> +
> +	mfd_remove_devices(&client->dev);
> +	i2c_set_clientdata(client, NULL)
Not needed.

> +err:
> +	i2c_set_clientdata(client, NULL);
Ditto.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

  parent reply	other threads:[~2011-02-28  0:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15  8:13 [PATCH v19 0/3] TI Wl1273 FM radio driver Matti J. Aaltonen
2011-02-15  8:13 ` [PATCH v19 1/3] MFD: WL1273 FM Radio: MFD driver for the FM radio Matti J. Aaltonen
2011-02-15  8:13   ` [PATCH v19 2/3] V4L2: WL1273 FM Radio: TI WL1273 FM radio driver Matti J. Aaltonen
2011-02-15  8:13     ` [PATCH v19 3/3] ASoC: WL1273 FM radio: Access I2C IO functions through pointers Matti J. Aaltonen
2011-02-16  2:02       ` Mark Brown
2011-02-28  0:11   ` Samuel Ortiz [this message]
2011-02-15 19:59 ` [PATCH v19 0/3] TI Wl1273 FM radio driver Mauro Carvalho Chehab
2011-02-28  0:13   ` 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=20110228001150.GA2749@sortiz-mobl \
    --to=sameo@linux.intel.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=mchehab@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).