1 /* linux/arch/arm/plat-s3c/include/plat/hwmon.h
3 * Copyright 2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
7 * S3C - HWMon interface for ADC
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #ifndef __ASM_ARCH_ADC_HWMON_H
15 #define __ASM_ARCH_ADC_HWMON_H __FILE__
18 * s3c_hwmon_chcfg - channel configuration
19 * @name: The name to give this channel.
20 * @mult: Multiply the ADC value read by this.
21 * @div: Divide the value from the ADC by this.
23 * The value read from the ADC is converted to a value that
24 * hwmon expects (mV) by result = (value_read * @mult) / @div.
26 struct s3c_hwmon_chcfg
{
33 * s3c_hwmon_pdata - HWMON platform data
34 * @in: One configuration for each possible channel used.
36 struct s3c_hwmon_pdata
{
37 struct s3c_hwmon_chcfg
*in
[8];
41 * s3c_hwmon_set_platdata - Set platform data for S3C HWMON device
42 * @pd: Platform data to register to device.
44 * Register the given platform data for use with the S3C HWMON device.
45 * The call will copy the platform data, so the board definitions can
46 * make the structure itself __initdata.
48 extern void __init
s3c_hwmon_set_platdata(struct s3c_hwmon_pdata
*pd
);
50 #endif /* __ASM_ARCH_ADC_HWMON_H */