~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/mfd/pcf50633/adc.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  * adc.h  -- Driver for NXP PCF50633 ADC
  4  *
  5  * (C) 2006-2008 by Openmoko, Inc.
  6  * All rights reserved.
  7  */
  8 
  9 #ifndef __LINUX_MFD_PCF50633_ADC_H
 10 #define __LINUX_MFD_PCF50633_ADC_H
 11 
 12 #include <linux/mfd/pcf50633/core.h>
 13 #include <linux/platform_device.h>
 14 
 15 /* ADC Registers */
 16 #define PCF50633_REG_ADCC3              0x52
 17 #define PCF50633_REG_ADCC2              0x53
 18 #define PCF50633_REG_ADCC1              0x54
 19 #define PCF50633_REG_ADCS1              0x55
 20 #define PCF50633_REG_ADCS2              0x56
 21 #define PCF50633_REG_ADCS3              0x57
 22 
 23 #define PCF50633_ADCC1_ADCSTART         0x01
 24 #define PCF50633_ADCC1_RES_8BIT         0x02
 25 #define PCF50633_ADCC1_RES_10BIT        0x00
 26 #define PCF50633_ADCC1_AVERAGE_NO       0x00
 27 #define PCF50633_ADCC1_AVERAGE_4        0x04
 28 #define PCF50633_ADCC1_AVERAGE_8        0x08
 29 #define PCF50633_ADCC1_AVERAGE_16       0x0c
 30 #define PCF50633_ADCC1_MUX_BATSNS_RES   0x00
 31 #define PCF50633_ADCC1_MUX_BATSNS_SUBTR 0x10
 32 #define PCF50633_ADCC1_MUX_ADCIN2_RES   0x20
 33 #define PCF50633_ADCC1_MUX_ADCIN2_SUBTR 0x30
 34 #define PCF50633_ADCC1_MUX_BATTEMP      0x60
 35 #define PCF50633_ADCC1_MUX_ADCIN1       0x70
 36 #define PCF50633_ADCC1_AVERAGE_MASK     0x0c
 37 #define PCF50633_ADCC1_ADCMUX_MASK      0xf0
 38 
 39 #define PCF50633_ADCC2_RATIO_NONE       0x00
 40 #define PCF50633_ADCC2_RATIO_BATTEMP    0x01
 41 #define PCF50633_ADCC2_RATIO_ADCIN1     0x02
 42 #define PCF50633_ADCC2_RATIO_BOTH       0x03
 43 #define PCF50633_ADCC2_RATIOSETTL_100US 0x04
 44 
 45 #define PCF50633_ADCC3_ACCSW_EN         0x01
 46 #define PCF50633_ADCC3_NTCSW_EN         0x04
 47 #define PCF50633_ADCC3_RES_DIV_TWO      0x10
 48 #define PCF50633_ADCC3_RES_DIV_THREE    0x00
 49 
 50 #define PCF50633_ADCS3_REF_NTCSW        0x00
 51 #define PCF50633_ADCS3_REF_ACCSW        0x10
 52 #define PCF50633_ADCS3_REF_2V0          0x20
 53 #define PCF50633_ADCS3_REF_VISA         0x30
 54 #define PCF50633_ADCS3_REF_2V0_2        0x70
 55 #define PCF50633_ADCS3_ADCRDY           0x80
 56 
 57 #define PCF50633_ADCS3_ADCDAT1L_MASK    0x03
 58 #define PCF50633_ADCS3_ADCDAT2L_MASK    0x0c
 59 #define PCF50633_ADCS3_ADCDAT2L_SHIFT   2
 60 #define PCF50633_ASCS3_REF_MASK         0x70
 61 
 62 extern int
 63 pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
 64                 void (*callback)(struct pcf50633 *, void *, int),
 65                 void *callback_param);
 66 extern int
 67 pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg);
 68 
 69 #endif /* __LINUX_PCF50633_ADC_H */
 70 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php