aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBen Dooks <ben@simtec.co.uk>2009-07-18 05:12:26 -0400
committerBen Dooks <ben-linux@fluff.org>2009-07-18 05:15:53 -0400
commit885f9ebe7554628967b6e93b284dd3021e1bb280 (patch)
tree4b5c86522619d9ed2930e172b40b4dd8f1b5b604 /arch
parentc197cec5fae7968a7154ee999f0a1b07938d1528 (diff)
ARM: BAST: Add hwmon device information
Add platform device information for the ADC channels to be exported via HWMON. This exports all the ADCs not being used for the touchscreen interface. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index ce3baba2cd7f..06670bb89cab 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -45,6 +45,7 @@
45#include <mach/regs-mem.h> 45#include <mach/regs-mem.h>
46#include <mach/regs-lcd.h> 46#include <mach/regs-lcd.h>
47 47
48#include <plat/hwmon.h>
48#include <plat/nand.h> 49#include <plat/nand.h>
49#include <plat/iic.h> 50#include <plat/iic.h>
50#include <mach/fb.h> 51#include <mach/fb.h>
@@ -547,7 +548,35 @@ static struct i2c_board_info bast_i2c_devs[] __initdata = {
547 }, 548 },
548}; 549};
549 550
551static struct s3c_hwmon_pdata bast_hwmon_info = {
552 /* LCD contrast (0-6.6V) */
553 .in[0] = &(struct s3c_hwmon_chcfg) {
554 .name = "lcd-contrast",
555 .mult = 3300,
556 .div = 512,
557 },
558 /* LED current feedback */
559 .in[1] = &(struct s3c_hwmon_chcfg) {
560 .name = "led-feedback",
561 .mult = 3300,
562 .div = 1024,
563 },
564 /* LCD feedback (0-6.6V) */
565 .in[2] = &(struct s3c_hwmon_chcfg) {
566 .name = "lcd-feedback",
567 .mult = 3300,
568 .div = 512,
569 },
570 /* Vcore (1.8-2.0V), Vref 3.3V */
571 .in[3] = &(struct s3c_hwmon_chcfg) {
572 .name = "vcore",
573 .mult = 3300,
574 .div = 1024,
575 },
576};
577
550/* Standard BAST devices */ 578/* Standard BAST devices */
579// cat /sys/devices/platform/s3c24xx-adc/s3c-hwmon/in_0
551 580
552static struct platform_device *bast_devices[] __initdata = { 581static struct platform_device *bast_devices[] __initdata = {
553 &s3c_device_usb, 582 &s3c_device_usb,
@@ -556,6 +585,8 @@ static struct platform_device *bast_devices[] __initdata = {
556 &s3c_device_i2c0, 585 &s3c_device_i2c0,
557 &s3c_device_rtc, 586 &s3c_device_rtc,
558 &s3c_device_nand, 587 &s3c_device_nand,
588 &s3c_device_adc,
589 &s3c_device_hwmon,
559 &bast_device_dm9k, 590 &bast_device_dm9k,
560 &bast_device_asix, 591 &bast_device_asix,
561 &bast_device_axpp, 592 &bast_device_axpp,
@@ -588,6 +619,7 @@ static void __init bast_map_io(void)
588 s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); 619 s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks));
589 620
590 s3c_device_nand.dev.platform_data = &bast_nand_info; 621 s3c_device_nand.dev.platform_data = &bast_nand_info;
622 s3c_device_hwmon.dev.platform_data = &bast_hwmon_info;
591 623
592 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); 624 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
593 s3c24xx_init_clocks(0); 625 s3c24xx_init_clocks(0);