linux/drivers/hwmon/s3c-hwmon.c
<<
>>
Prefs
   1/* linux/drivers/hwmon/s3c-hwmon.c
   2 *
   3 * Copyright (C) 2005, 2008, 2009 Simtec Electronics
   4 *      http://armlinux.simtec.co.uk/
   5 *      Ben Dooks <ben@simtec.co.uk>
   6 *
   7 * S3C24XX/S3C64XX ADC hwmon support
   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 * This program is distributed in the hope that it will be useful,
  14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16 * GNU General Public License for more details.
  17 *
  18 * You should have received a copy of the GNU General Public License
  19 * along with this program; if not, write to the Free Software
  20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  21*/
  22
  23#include <linux/module.h>
  24#include <linux/slab.h>
  25#include <linux/delay.h>
  26#include <linux/io.h>
  27#include <linux/init.h>
  28#include <linux/err.h>
  29#include <linux/clk.h>
  30#include <linux/interrupt.h>
  31#include <linux/platform_device.h>
  32
  33#include <linux/hwmon.h>
  34#include <linux/hwmon-sysfs.h>
  35
  36#include <plat/adc.h>
  37#include <plat/hwmon.h>

  v2.6n>
uctan class="lcode=e="_2.6.1_attr 
uctan class="lcode=ee Gorss="fre_attr * Th
plat/hwmon.h> uctan class="lcode=ee Gorss="fre_attr * Th
plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> 35 16 * 7uctae="_2.6.1 -ment"> * S3cli 7 in claclass * 18<@lock: Access locks prserialis PART con Genera License for more details. 19<@cli 7: TRT cli 7 wmmengish" ; wiass="ce 20<@2.6.1_s=": TRT > * S3s="fre wmmcreatedLicense for more details. 11<@attr: TRT >oldls.U GenART channel attr * Th License for more details. 12*/ uctan class="lcode=e="_2.6.1
uctan class="lcode=m Thx
plat/hwmon.h> uctan class="lcode=e="_dc._cli 7
plat/hwmon.h> uctan class="lcode=s="fre
plat/hwmon.h> 35 uctan class="lcode=e="_2.6.1_attr
plat/hwmon.h> plat/hwmon.h> 35 1> * 12ae="_2.6.1_read_ch -mread alookup from algi ANYdc. channelLicense for more details. 13<@s=": TRT s="freficense for more details. 14<@2.6.1: Our .c">eficense for more details. 15<@channel: TRT channel we'remreading fromficense for more details. 6 * 7 * 18pleTh mentwmmtimeTHOUawaiting s="cent"cores prgeS3C64XX ADC hwmon support 19 20>*/ intan class="lcode=e="_2.6.1_read_ch
uctan class="lcode=s="fre
*/ uctan class="lcode=e="_2.6.1
*/ plat/hwmon.h> 35 plat/hwmon.h> */ plat/hwmon.h> 35 ng">"reading channel %d\n"plat/hwmon.h> 35 plat/hwmon.h> plat/hwmon.h> 35 plat/hwmon.h> plat/hwmon.h> 35 35 19> * 20 11<@s=": TRT s="fre distrART attr * Th bepan ss pLicense for more details. 12a@attr: TRT attr * Th being readLicense for more details. 13<@buf: TRT _resul bufferLicense for more details. 14icense for more details. 15 16 7 18>*/ n class="lcode=esize_7
uctan class="lcode=s="fre
*/ uctan class="lcode=s="fre_attr * Th
*/ uctan class="lcode=e="_2.6.1
plat/hwmon.h> uctan class="lcode=ee Gorss="fre_attr * Th
plat/hwmon.h> plat/hwmon.h> 35 plat/hwmon.h> 35 ng">"%d\n"plat/hwmon.h> plat/hwmon.h> 35 35 n class="lcode=SENSOR_DEVICE_ATTR
35 35 plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> 22 t">uctan class="lcode=attr * Th
plat/hwmon.h> 35 t">uctan class="lcode=attr * Th_groax_ldiv id="e/plaattr * Th_groaxs="l n class="lcode=e="_2.6.1_attrgroax_ldiv id="e/plae="_2.6.1_attrgroaxs="l =a{imtec Electronics plat/hwmon.h> v12.6n> n class="lcode=inef="drdiv id="e/plainef="s="l intan class="lcode=e="_2.6.1_add_raw
uctan class="lcode=s="fre
35 plat/hwmon.h> plat/hwmon.h> 35 n class="lcode=inef="drdiv id="e/plainef="s="l voidan class="lcode=e="_2.6.1_remove_raw
uctan class="lcode=s="fre
35 plat/hwmon.h> plat/hwmon.h> v14.6n> 35 n class="lcode=inef="drdiv id="e/plainef="s="l intan class="lcode=e="_2.6.1_add_raw
uctan class="lcode=s="fre
plat/hwmon.h> n class="lcode=inef="drdiv id="e/plainef="s="l voidan class="lcode=e="_2.6.1_remove_raw
uctan class="lcode=s="fre
plat/hwmon.h> 35 19 CONFIG_SENSORS_S3C_RAWa>>*/ 35 16 * 7 * 18<@s=": TRT s="fre distrART attr * Th bepan ss pLicense for more details. 19<@attr: TRT attr * Th being readLicense for more details. 20<@buf: TRT _resul bufferLicense for more details. 1 * 12aRead alookup from ART ent"and scaleribubeforp methoding ibu progr * 13 * 14 15>*/ n class="lcode=esize_7
uctan class="lcode=s="fre
uctan class="lcode=s="fre_attr * Th
*/ uctan class="lcode=ee Gorss="fre_attr * Th
plat/hwmon.h> uctan class="lcode=e="_2.6.1
plat/hwmon.h> uctan class="lcode=e="_2.6.1_pdata
plat/hwmon.h> uctan class="lcode=e="_2.6.1_chcfg
plat/hwmon.h> plat/hwmon.h> 35 plat/hwmon.h> 35 plat/hwmon.h> */ plat/hwmon.h> 35 plat/hwmon.h> plat/hwmon.h> 35 ng">"%d\n"plat/hwmon.h> plat/hwmon.h> 35 18 * 19 20<@s=": TRT s="fre distrART attr * Th bepan ss pLicense for more details. 11<@attr: TRT attr * Th being readLicense for more details. 12a@buf: TRT _resul bufferLicense for more details. 13icense for more details. 14 Rethod=ART .h"elriv."uld algi ANYchannels=pan class="comment"> * 15>*/ n class="lcode=esize_7
uctan class="lcode=s="fre
uctan class="lcode=s="fre_attr * Th
*/ uctan class="lcode=ee Gorss="fre_attr * Th
plat/hwmon.h> uctan class="lcode=e="_2.6.1_pdata
plat/hwmon.h> uctan class="lcode=e="_2.6.1_chcfg
plat/hwmon.h> 35 plat/hwmon.h> 35 ng">"%s\n"plat/hwmon.h> plat/hwmon.h> 19> * 20 * S3attr * Th Gengi ANYchannelLicense for more details. 11<@s=": TRT s="fre doncreate ART attr * Th f="icense for more details. 12a@cfg: TRT channel configurclass 13<@channel: TRT ent"channel number donprocess"icense for more details. 14icense for more details. 15 * S3 rom ART specifiedicense for more details. 16 7 18icense for more details. 19 20 * 11 12>*/ intan class="lcode=e="_2.6.1_create_attr
uctan class="lcode=s="fre
uctan class="lcode=e="_2.6.1_chcfg
uctan class="lcode=e="_2.6.1_attr
*/ uctan class="lcode=ee Gorss="fre_attr * Th
plat/hwmon.h> plat/hwmon.h> 35 ng">"in%d_input"plat/hwmon.h> 22 plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> 35 plat/hwmon.h> ng">"failed3doncreate input attr * Th\n"plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> 35 19 id haommhasYou" id, add al.h"elr>>*/ v24.6n> ng">"in%d_.h"el"plat/hwmon.h> 35 plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> 35 plat/hwmon.h> plat/hwmon.h> ng">"failed3doncreate .h"elrattr * Th\n"plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> 35 plat/hwmon.h> plat/hwmon.h> 35 voidan class="lcode=e="_2.6.1_remove_attr
uctan class="lcode=s="fre
v26.6n> uctan class="lcode=e="_2.6.1_attr
*/ plat/hwmon.cs plat/hwmon.cs plat/hwmon.h> 35 15> * 16 7<@s=": TRT s="fre being probedLicense for more details. 18>*/ intan class="lcode=_ss="fni7
uctan class="lcode=e.h" class="fre
35 uctan class="lcode=e="_2.6.1_pdata
plat/hwmon.h> uctan class="lcode=e="_2.6.1
plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> 35 ng">"noplat/hwmon.cs plat/hwmon.h> plat/hwmon.h> 35 uctan class="lcode=e="_2.6.1
plat/hwmon.cs ng">"noplat/hwmon.cs plat/hwmon.h> plat/hwmon.h> plat/hwmon.h> plat/hwmon.cs plat/hwmon.cs 35 19 Rngish" wass="ce.r>>*/ 22 plat/hwmon.cs ng">"cannotmengish" adc\n"plat/hwmon.cs plat/hwmon.cs plat/hwmon.h> 19 add attr * Ths Genou adc s="fres.r>>*/ 35 plat/hwmon.cs plat/hwmon.cs plat/hwmon.h> 35 19 rngish" wass="ce>*/ plat/hwmon.h> plat/hwmon.cs ng">"errGenregish" ing wass=> * S\n"plat/hwmon.cs plat/hwmon.cs plat/hwmon.h> plat/hwmon.h> 35 uctan class="lcode=e="_2.6.1_chcfg