summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ina209.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-08-28 11:22:28 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-09 01:44:41 +0200
commitd2f31f1da54f83c4eb2738402284c49cd51798d1 (patch)
tree91b299799d8b0293c0e37a39b4280d315e7f1a16 /drivers/hwmon/ina209.c
parentfbd48ca5911b3cd70da57c3313d13004e40aea54 (diff)
downloadblackbird-op-linux-d2f31f1da54f83c4eb2738402284c49cd51798d1.tar.gz
blackbird-op-linux-d2f31f1da54f83c4eb2738402284c49cd51798d1.zip
cpufreq: cpu0: Move per-cluster initialization code to ->init()
Currently this driver only support platforms on which all CPUs share clock & voltage lines and there is requirement to support platforms which have separate clock & voltage lines for CPUs, like Qualcomm's Krait and ARM's big LITTLE. Each group of CPUs sharing clock/voltage lines are represented by 'struct cpufreq_policy' in cpufreq framework. And core calls ->init() once for each policy. Currently we do all initialization/allocation from probe() which wouldn't work for above scenario. To make it work for these platforms, the first step is to move all initialization/allocation to ->init() and add ->exit() to do the reverse of it. Also, remove all global variables and allocate space for them at runtime. This patch creates 'struct private_data' for keeping all such information and a pointer to that would be stored in policy->driver_data. The changed probe() routine now tries to see if regulator/clocks are available or we need to defer probe. In case they are available, it registers cpufreq driver. Otherwise, returns with -EPROBE_DEFER. We still *don't* support platforms with separate clock/voltage lines for CPUs. This would be done in a separate patch later. Tested-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/hwmon/ina209.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud