diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-05-19 09:04:05 (GMT) |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-19 09:04:05 (GMT) |
commit | f447ea4b1c90fe94f0627d7a6655a402100f8ca5 (patch) | |
tree | 980d128c2c68c8c5cd949ae082b11a4540194b95 /arch/arm/plat-samsung/dev-hwmon.c | |
parent | c733a7179cacdf77be9c1eeef02d6e0833919d89 (diff) | |
parent | 6cd82ffe0cd3836b32b29bd1436e5fd551957d54 (diff) | |
download | linux-fsl-qoriq-f447ea4b1c90fe94f0627d7a6655a402100f8ca5.tar.xz |
ARM: Merge for-2635/samsung-hwmon
Merge branch 'for-2635/samsung-hwmon' into for-linus/samsung2
Diffstat (limited to 'arch/arm/plat-samsung/dev-hwmon.c')
-rw-r--r-- | arch/arm/plat-samsung/dev-hwmon.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/dev-hwmon.c b/arch/arm/plat-samsung/dev-hwmon.c new file mode 100644 index 0000000..b3ffb95 --- /dev/null +++ b/arch/arm/plat-samsung/dev-hwmon.c @@ -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; +} |