lkml.org 
[lkml]   [2014]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpufreq: create another field .flags in cpufreq_frequency_table
Hi Viresh,

> diff --git a/drivers/cpufreq/exynos4x12-cpufreq.c
> b/drivers/cpufreq/exynos4x12-cpufreq.c index 7c11ace..8c4c6a5 100644
> --- a/drivers/cpufreq/exynos4x12-cpufreq.c
> +++ b/drivers/cpufreq/exynos4x12-cpufreq.c
> @@ -30,21 +30,21 @@ static unsigned int exynos4x12_volt_table[] = {
> };
>
> static struct cpufreq_frequency_table exynos4x12_freq_table[] = {
> - {CPUFREQ_BOOST_FREQ, 1500 * 1000},
> - {L1, 1400 * 1000},
> - {L2, 1300 * 1000},
> - {L3, 1200 * 1000},
> - {L4, 1100 * 1000},
> - {L5, 1000 * 1000},
> - {L6, 900 * 1000},
> - {L7, 800 * 1000},
> - {L8, 700 * 1000},
> - {L9, 600 * 1000},
> - {L10, 500 * 1000},
> - {L11, 400 * 1000},
> - {L12, 300 * 1000},
> - {L13, 200 * 1000},
> - {0, CPUFREQ_TABLE_END},
> + {CPUFREQ_BOOST_FREQ, 0, 1500 * 1000},
> + {0, L1, 1400 * 1000},
> + {0, L2, 1300 * 1000},
> + {0, L3, 1200 * 1000},
> + {0, L4, 1100 * 1000},
> + {0, L5, 1000 * 1000},
> + {0, L6, 900 * 1000},
> + {0, L7, 800 * 1000},
> + {0, L8, 700 * 1000},
> + {0, L9, 600 * 1000},
> + {0, L10, 500 * 1000},
> + {0, L11, 400 * 1000},
> + {0, L12, 300 * 1000},
> + {0, L13, 200 * 1000},
> + {0, 0, CPUFREQ_TABLE_END},
> };

Looks correct for me.

One little remark - since cpufreq_frequency_tables are defined as
static it seems like we don't need to explicitly specify the 0, for
flags field.

Something like {, L13, 200 * 1000}, shall be enough.

> +/* Special Values of .flags field */
> +#define CPUFREQ_BOOST_FREQ 0x1

Maybe (1 << 0) to explicitly show that those are flags.

>
> struct cpufreq_frequency_table {
> + unsigned int flags;
> unsigned int driver_data; /* driver specific data, not

The driver_data shall be changed to int. However I suppose that it will
be done at separate patch.

> used by core */ unsigned int frequency; /* kHz - doesn't need to
> be in ascending
> * order */

--
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group


\
 
 \ /
  Last update: 2014-03-28 12:01    [W:0.117 / U:7.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site