From 086d306e1f3574d055df43de7384189ef31f03e6 Mon Sep 17 00:00:00 2001 From: Robert Marklund Date: Wed, 28 Sep 2011 09:48:38 +0200 Subject: hwmon: Make all ux500 mach build at once Alter the hwmon driver so we can build both the MACH_U5500 and the U8500 at the same time. Change-Id: I2ff9665427c1c33181552e7e51074c5eca3f1473 Signed-off-by: Robert Marklund --- drivers/hwmon/ab5500.c | 3 ++- drivers/hwmon/ab8500.c | 3 ++- drivers/hwmon/abx500.c | 7 ++++++- drivers/hwmon/abx500.h | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'drivers/hwmon') diff --git a/drivers/hwmon/ab5500.c b/drivers/hwmon/ab5500.c index 7352e07ffde..0122f315ac6 100644 --- a/drivers/hwmon/ab5500.c +++ b/drivers/hwmon/ab5500.c @@ -25,6 +25,7 @@ #include #include #include "abx500.h" +#include /* AB5500 driver monitors GPADC - XTAL_TEMP, PCB_TEMP, * BTEMP_BALL, BAT_CTRL and DIE_TEMP @@ -159,7 +160,7 @@ static int ab5500_temp_irq_handler(int irq, struct abx500_temp *data) return 0; } -int __init abx500_hwmon_init(struct abx500_temp *data) +int __init ab5500_hwmon_init(struct abx500_temp *data) { int err; diff --git a/drivers/hwmon/ab8500.c b/drivers/hwmon/ab8500.c index 00647240137..8204af594a9 100644 --- a/drivers/hwmon/ab8500.c +++ b/drivers/hwmon/ab8500.c @@ -25,6 +25,7 @@ #include #include #include "abx500.h" +#include #define DEFAULT_POWER_OFF_DELAY 10000 @@ -136,7 +137,7 @@ static int ab8500_temp_irq_handler(int irq, struct abx500_temp *data) return 0; } -int __init abx500_hwmon_init(struct abx500_temp *data) +int __init ab8500_hwmon_init(struct abx500_temp *data) { data->ab8500_gpadc = ab8500_gpadc_get(); if (IS_ERR(data->ab8500_gpadc)) diff --git a/drivers/hwmon/abx500.c b/drivers/hwmon/abx500.c index b26a13e8438..de4e6280b4b 100644 --- a/drivers/hwmon/abx500.c +++ b/drivers/hwmon/abx500.c @@ -36,6 +36,8 @@ #include #include #include +#include + #include "abx500.h" #define DEFAULT_MONITOR_DELAY 1000 @@ -610,7 +612,10 @@ static int __devinit abx500_temp_probe(struct platform_device *pdev) mutex_init(&data->lock); /* Chip specific initialization */ - err = abx500_hwmon_init(data); + if (!machine_is_u5500()) + err = ab8500_hwmon_init(data); + else + err = ab5500_hwmon_init(data); if (err < 0) { dev_err(&pdev->dev, "abx500 init failed"); goto exit; diff --git a/drivers/hwmon/abx500.h b/drivers/hwmon/abx500.h index 65a9a8238ba..9fe28dac28f 100644 --- a/drivers/hwmon/abx500.h +++ b/drivers/hwmon/abx500.h @@ -89,6 +89,7 @@ struct abx500_temp { int monitored_sensors; }; -int abx500_hwmon_init(struct abx500_temp *data) __init; +int ab8500_hwmon_init(struct abx500_temp *data) __init; +int ab5500_hwmon_init(struct abx500_temp *data) __init; #endif /* _ABX500_H */ -- cgit v1.2.3