aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs/mach-mx28evk.c
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2011-07-15 16:11:03 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-23 02:56:14 -0400
commite55e48ff6952800a48d4325934f373354cd0c533 (patch)
tree1cafca34e63b3a875cefbbc894cbcc68659793d0 /arch/arm/mach-mxs/mach-mx28evk.c
parentb00d533ebc9e60f63697869e5c2b360ee842ac0a (diff)
arm: mxs: mx28evk: add fixed regulators for audio
Add these fixed regulators to enable basic audio-support until full regulator support is done. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mxs/mach-mx28evk.c')
-rw-r--r--arch/arm/mach-mxs/mach-mx28evk.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index 521c4d5fd90f..8e810a548036 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -19,6 +19,8 @@
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/i2c.h> 21#include <linux/i2c.h>
22#include <linux/regulator/machine.h>
23#include <linux/regulator/fixed.h>
22 24
23#include <asm/mach-types.h> 25#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 26#include <asm/mach/arch.h>
@@ -377,6 +379,44 @@ static struct i2c_board_info mxs_i2c0_board_info[] __initdata = {
377 }, 379 },
378}; 380};
379 381
382#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
383static struct regulator_consumer_supply mx28evk_audio_consumer_supplies[] = {
384 REGULATOR_SUPPLY("VDDA", "0-000a"),
385 REGULATOR_SUPPLY("VDDIO", "0-000a"),
386};
387
388static struct regulator_init_data mx28evk_vdd_reg_init_data = {
389 .constraints = {
390 .name = "3V3",
391 .always_on = 1,
392 },
393 .consumer_supplies = mx28evk_audio_consumer_supplies,
394 .num_consumer_supplies = ARRAY_SIZE(mx28evk_audio_consumer_supplies),
395};
396
397static struct fixed_voltage_config mx28evk_vdd_pdata = {
398 .supply_name = "board-3V3",
399 .microvolts = 3300000,
400 .gpio = -EINVAL,
401 .enabled_at_boot = 1,
402 .init_data = &mx28evk_vdd_reg_init_data,
403};
404static struct platform_device mx28evk_voltage_regulator = {
405 .name = "reg-fixed-voltage",
406 .id = -1,
407 .num_resources = 0,
408 .dev = {
409 .platform_data = &mx28evk_vdd_pdata,
410 },
411};
412static void __init mx28evk_add_regulators(void)
413{
414 platform_device_register(&mx28evk_voltage_regulator);
415}
416#else
417static void __init mx28evk_add_regulators(void) {}
418#endif
419
380static void __init mx28evk_init(void) 420static void __init mx28evk_init(void)
381{ 421{
382 int ret; 422 int ret;
@@ -424,6 +464,8 @@ static void __init mx28evk_init(void)
424 i2c_register_board_info(0, mxs_i2c0_board_info, 464 i2c_register_board_info(0, mxs_i2c0_board_info,
425 ARRAY_SIZE(mxs_i2c0_board_info)); 465 ARRAY_SIZE(mxs_i2c0_board_info));
426 466
467 mx28evk_add_regulators();
468
427 mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0, 469 mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0,
428 NULL, 0); 470 NULL, 0);
429 471