aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2440/mach-osiris.c
diff options
context:
space:
mode:
authorBen Dooks <ben@simtec.co.uk>2009-11-13 17:34:21 -0500
committerBen Dooks <ben-linux@fluff.org>2009-11-30 20:33:49 -0500
commit4fa084af28ca905e91895ae237e6cc4a31d2ff4d (patch)
treec300b5de76d942d835f0b2e7ccffa07541b1a63c /arch/arm/mach-s3c2440/mach-osiris.c
parent4d3a3469dbabbcff4dab225bc3be0b247b36401c (diff)
ARM: OSIRIS: DVS (Dynamic Voltage Scaling) supoort.
Add a driver to provide DVS for the Simtec Osiris module to reduce the power consumption whilst idling. The DVS driver alters the voltage supplied to the ARM core depending on the frequency it is running at. The driver itself does not do any of the frequency alteration, which is left up to the cpufreq driver. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2440/mach-osiris.c')
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index 2105a41281a4..8af9e9a104a5 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -23,6 +23,8 @@
23#include <linux/i2c.h> 23#include <linux/i2c.h>
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <linux/i2c/tps65010.h>
27
26#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 29#include <asm/mach/map.h>
28#include <asm/mach/irq.h> 30#include <asm/mach/irq.h>
@@ -326,12 +328,44 @@ static struct sys_device osiris_pm_sysdev = {
326 .cls = &osiris_pm_sysclass, 328 .cls = &osiris_pm_sysclass,
327}; 329};
328 330
331/* Link for DVS driver to TPS65011 */
332
333static void osiris_tps_release(struct device *dev)
334{
335 /* static device, do not need to release anything */
336}
337
338static struct platform_device osiris_tps_device = {
339 .name = "osiris-dvs",
340 .id = -1,
341 .dev.release = osiris_tps_release,
342};
343
344static int osiris_tps_setup(struct i2c_client *client, void *context)
345{
346 osiris_tps_device.dev.parent = &client->dev;
347 return platform_device_register(&osiris_tps_device);
348}
349
350static int osiris_tps_remove(struct i2c_client *client, void *context)
351{
352 platform_device_unregister(&osiris_tps_device);
353 return 0;
354}
355
356static struct tps65010_board osiris_tps_board = {
357 .base = -1, /* GPIO can go anywhere at the moment */
358 .setup = osiris_tps_setup,
359 .teardown = osiris_tps_remove,
360};
361
329/* I2C devices fitted. */ 362/* I2C devices fitted. */
330 363
331static struct i2c_board_info osiris_i2c_devs[] __initdata = { 364static struct i2c_board_info osiris_i2c_devs[] __initdata = {
332 { 365 {
333 I2C_BOARD_INFO("tps65011", 0x48), 366 I2C_BOARD_INFO("tps65011", 0x48),
334 .irq = IRQ_EINT20, 367 .irq = IRQ_EINT20,
368 .platform_data = &osiris_tps_board,
335 }, 369 },
336}; 370};
337 371