All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Marek Vasut <marek.vasut@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] WM8750: Convert to new API
Date: Fri, 26 Mar 2010 10:39:37 +0000	[thread overview]
Message-ID: <20100326103936.GA18685@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1269570193-8151-1-git-send-email-marek.vasut@gmail.com>

On Fri, Mar 26, 2010 at 03:23:13AM +0100, Marek Vasut wrote:

> Register the WM8750 as a SPI or I2C device. This patch mostly shuffles code
> around. Hugely inspired by WM8753 which was already converted.

Looks good - a few smallish points below, but basically it's OK.  Thanks
for sorting out git send-email, it really is much easier to work with.

It'd be best to also do the register cache thing like Liam said.  Some
other stuff...

> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
>  sound/soc/codecs/wm8750.c |  411 +++++++++++++++++++++++++--------------------

You also need to push out registration of the WM8750 out into the
machine drivers using it (spitz and jive).  Look at how the transition
was done for wm8731 for an example.

> -#define WM8750_VERSION "0.12"

This is already done in for-2.6.35 - in general you should always try to
make sure your patches apply against -next (which for ASoC has the
current for-2.6.xx branch in it).

> @@ -688,6 +734,11 @@ static int wm8750_resume(struct platform_device *pdev)
>  	for (i = 0; i < ARRAY_SIZE(wm8750_reg); i++) {
>  		if (i == WM8750_RESET)
>  			continue;
> +
> +		/* No point in writing hardware default values back */
> +		if (cache[i] == wm8750_reg[i])
> +			continue;
> +
>  		data[0] = (i << 1) | ((cache[i] >> 8) & 0x0001);
>  		data[1] = cache[i] & 0x00ff;
>  		codec->hw_write(codec->control_data, data, 2);

This should be done separately since while it's useful it's not really
related to the rest of your change.  This is something that frequently
comes up with your patches.  The general idea here is that each patch
should do exactly one thing which is fully described in the changelog.
This makes each individual patch simpler, making review easier (since
it's much clearer what each individual line in the diff is supposed to
do) and makes trawling the source with things like git bisect or git
annotate more useful for similar reasons.

> +/*
> + * This function forces any delayed work to be queued and run.
> + */
> +static int run_delayed_work(struct delayed_work *dwork)
> +{
> +	int ret;

This is also gone in current for-2.6.35, it shouldn't be so important
any more with current ASoC.

  parent reply	other threads:[~2010-03-26 10:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26  2:23 [PATCH] WM8750: Convert to new API Marek Vasut
2010-03-26 10:08 ` Liam Girdwood
2010-03-26 10:39 ` Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-03-26 14:19 Marek Vasut
2010-03-26 16:37 ` Liam Girdwood
2010-03-29 12:48 ` Mark Brown
2010-03-29 21:16   ` Marek Vasut
2010-03-30  9:40     ` Mark Brown
2010-04-04 23:45       ` Marek Vasut
2010-04-05 13:41 [PATCH 2/3] WM8750: Fix SPITZ machine Mark Brown
2010-04-08 14:51 ` [PATCH] WM8750: Convert to new API Marek Vasut
2010-04-08 14:51   ` Marek Vasut
2010-04-08 14:58   ` Mark Brown
2010-04-08 14:58     ` Mark Brown
2010-04-08 14:59 Marek Vasut
2010-04-08 14:59 ` Marek Vasut
2010-04-08 15:05 ` Mark Brown
2010-04-08 18:48 Marek Vasut
2010-04-08 18:48 ` Marek Vasut
2010-04-09 11:50 ` Liam Girdwood
2010-04-09 12:00 ` Mark Brown
2010-04-09 12:00   ` Mark Brown

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=20100326103936.GA18685@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=marek.vasut@gmail.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.