1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright 2005 Simtec Electronics 4 * Ben Dooks <[email protected]> 5 * http://armlinux.simtec.co.uk/ 6 * 7 * S3C - HWMon interface for ADC 8 */ 9 10 #ifndef __HWMON_S3C_H__ 11 #define __HWMON_S3C_H__ 12 13 /** 14 * s3c_hwmon_chcfg - channel configuration 15 * @name: The name to give this channel. 16 * @mult: Multiply the ADC value read by this. 17 * @div: Divide the value from the ADC by this. 18 * 19 * The value read from the ADC is converted to a value that 20 * hwmon expects (mV) by result = (value_read * @mult) / @div. 21 */ 22 struct s3c_hwmon_chcfg { 23 const char *name; 24 unsigned int mult; 25 unsigned int div; 26 }; 27 28 /** 29 * s3c_hwmon_pdata - HWMON platform data 30 * @in: One configuration for each possible channel used. 31 */ 32 struct s3c_hwmon_pdata { 33 struct s3c_hwmon_chcfg *in[8]; 34 }; 35 36 #endif /* __HWMON_S3C_H__ */ 37