1 /* linux/arch/arm/plat-s3c/include/plat/hwmon.h 2 * 3 * Copyright 2005 Simtec Electronics 4 * Ben Dooks <ben@simtec.co.uk> 5 * http://armlinux.simtec.co.uk/ 6 * 7 * S3C - HWMon interface for ADC 8 * 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. 12 */ 13 14 #ifndef __ASM_ARCH_ADC_HWMON_H 15 #define __ASM_ARCH_ADC_HWMON_H __FILE__ 16 17 /** 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. 22 * 23 * The value read from the ADC is converted to a value that 24 * hwmon expects (mV) by result = (value_read * @mult) / @div. 25 */ 26 struct s3c_hwmon_chcfg { 27 const char *name; 28 unsigned int mult; 29 unsigned int div; 30 }; 31 32 /** 33 * s3c_hwmon_pdata - HWMON platform data 34 * @in: One configuration for each possible channel used. 35 */ 36 struct s3c_hwmon_pdata { 37 struct s3c_hwmon_chcfg *in[8]; 38 }; 39 40 /** 41 * s3c_hwmon_set_platdata - Set platform data for S3C HWMON device 42 * @pd: Platform data to register to device. 43 * 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. 47 */ 48 extern void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd); 49 50 #endif /* __ASM_ARCH_ADC_HWMON_H */ 51 52