All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Jonghwa Lee <jonghwa3.lee@samsung.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	Kyungmin Park <kyungmin.park@samsung.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Mike Turquette <mturquette@ti.com>,
	Xiaoguang Chen <chenxg@marvell.com>
Subject: Re: [PATCH 2/2] devfreq: exynos4: Support initialization of freq_table and max_state of devfreq's profile.
Date: Fri, 24 Aug 2012 00:22:04 +0200	[thread overview]
Message-ID: <201208240022.04846.rjw@sisk.pl> (raw)
In-Reply-To: <1345099767-13467-3-git-send-email-jonghwa3.lee@samsung.com>

On Thursday, August 16, 2012, Jonghwa Lee wrote:
> This patch initializes freq_table and max_state of devfreq's profile.
> They will be used for creating transition table.
> 
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>

Does that depend on [1/2]?

Rafael


> ---
>  drivers/devfreq/exynos4_bus.c |   30 +++++++++++++++++++++++++++++-
>  1 files changed, 29 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
> index 88ddc77..9c08855 100644
> --- a/drivers/devfreq/exynos4_bus.c
> +++ b/drivers/devfreq/exynos4_bus.c
> @@ -985,7 +985,8 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
>  	struct busfreq_data *data;
>  	struct opp *opp;
>  	struct device *dev = &pdev->dev;
> -	int err = 0;
> +	int err = 0, i;
> +	unsigned int *freq_table;
>  
>  	data = kzalloc(sizeof(struct busfreq_data), GFP_KERNEL);
>  	if (data == NULL) {
> @@ -1042,6 +1043,33 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, data);
>  
> +	switch (data->type) {
> +	case TYPE_BUSF_EXYNOS4210:
> +		freq_table = devm_kzalloc(&pdev->dev, sizeof(unsigned int) * EX4210_LV_NUM,
> +					GFP_KERNEL);
> +
> +		for (i = 0; i < EX4210_LV_NUM; i++)
> +			freq_table[i] = exynos4210_busclk_table[i].clk;
> +
> +		exynos4_devfreq_profile.max_state = EX4210_LV_NUM;
> +		break;
> +	case TYPE_BUSF_EXYNOS4x12:
> +		freq_table = devm_kzalloc(&pdev->dev, sizeof(unsigned int) * EX4x12_LV_NUM,
> +					GFP_KERNEL);
> +
> +		for (i = 0; i < EX4x12_LV_NUM; i++)
> +			freq_table[i] = exynos4x12_mifclk_table[i].clk;
> +
> +		exynos4_devfreq_profile.max_state = EX4x12_LV_NUM;
> +		break;
> +	default:
> +		dev_err(dev, "Cannot determine the device id %d\n", data->type);
> +		err = -EINVAL;
> +		goto err_opp_add;
> +	}
> +
> +	exynos4_devfreq_profile.freq_table = freq_table;
> +
>  	busfreq_mon_reset(data);
>  
>  	data->devfreq = devfreq_add_device(dev, &exynos4_devfreq_profile,
> 


  reply	other threads:[~2012-08-23 22:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16  6:49 [PATCH 0/2] devfreq: Add sysfs node for representing frequency transition information Jonghwa Lee
2012-08-16  6:49 ` [PATCH 1/2] " Jonghwa Lee
2012-08-23 22:21   ` Rafael J. Wysocki
2012-08-24  1:23     ` jonghwa3.lee
2012-08-16  6:49 ` [PATCH 2/2] devfreq: exynos4: Support initialization of freq_table and max_state of devfreq's profile Jonghwa Lee
2012-08-23 22:22   ` Rafael J. Wysocki [this message]
2012-08-24  1:28     ` jonghwa3.lee
  -- strict thread matches above, loose matches on Subject: below --
2012-08-23 10:44 MyungJoo Ham

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=201208240022.04846.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=chenxg@marvell.com \
    --cc=jonghwa3.lee@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mturquette@ti.com \
    --cc=myungjoo.ham@samsung.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.