-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM: SAMSUNG: Move HWMON from plat-s3c24xx to plat-samsung
Move HWMON platform definition from plat-s3c24xx to plat-samsung and adjust mach-bast to use the new s3c_hwmon_set_platdata(). This allows usage of dev-hwmon by other Samsung SoCs. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
- Loading branch information
Maurus Cuelenaere
authored and
Ben Dooks
committed
May 12, 2010
1 parent
7ebd467
commit 6cd82ff
Showing
7 changed files
with
60 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* linux/arch/arm/plat-samsung/dev-hwmon.c | ||
* | ||
* Copyright 2008 Simtec Electronics | ||
* Ben Dooks <ben@simtec.co.uk> | ||
* http://armlinux.simtec.co.uk/ | ||
* | ||
* Adapted for HWMON by Maurus Cuelenaere | ||
* | ||
* Samsung series device definition for HWMON | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/platform_device.h> | ||
|
||
#include <plat/devs.h> | ||
#include <plat/hwmon.h> | ||
|
||
struct platform_device s3c_device_hwmon = { | ||
.name = "s3c-hwmon", | ||
.id = -1, | ||
.dev.parent = &s3c_device_adc.dev, | ||
}; | ||
|
||
void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd) | ||
{ | ||
struct s3c_hwmon_pdata *npd; | ||
|
||
if (!pd) { | ||
printk(KERN_ERR "%s: no platform data\n", __func__); | ||
return; | ||
} | ||
|
||
npd = kmemdup(pd, sizeof(struct s3c_hwmon_pdata), GFP_KERNEL); | ||
if (!npd) | ||
printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
|
||
s3c_device_hwmon.dev.platform_data = npd; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters