lkml.org 
[lkml]   [2009]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/5] MFD: twl4030-codec: APLL_INFREQ handling in the MFD driver
On Mon, Nov 02, 2009 at 02:34:53PM +0200, Peter Ujfalusi wrote:
> Move the APLL_CTL register configuration to the twl4030-codec
> MFD driver.
> Provide also a function for childs to query the audio_mclk
> frequency.

This all looks good to me, some nitpicks below.

> +unsigned int twl4030_codec_get_mclk(void)
> +{
> + struct twl4030_codec *codec = platform_get_drvdata(twl4030_codec_dev);
> +
> + return codec->audio_mclk;
> +}
> +EXPORT_SYMBOL_GPL(twl4030_codec_get_mclk);

As I said in my followup to patch 5 this feels like it should have a
parameter to specify the twl4030 though in practical systems it won't
matter.

> + if (!(pdata->audio_mclk == 19200000 ||
> + pdata->audio_mclk == 26000000 ||
> + pdata->audio_mclk == 38400000)) {
> + dev_err(&pdev->dev, "Invalid audio_mclk\n");
> + return -EINVAL;
> + }

Might flow more naturally with a switch statement?


\
 
 \ /
  Last update: 2009-11-02 18:33    [W:0.084 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site