1*4882a593SmuzhiyunCapella Microsystems CM3605 2*4882a593SmuzhiyunAmbient Light and Short Distance Proximity Sensor 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunThe CM3605 is an entirely analog part which however require quite a bit of 5*4882a593Smuzhiyunsoftware logic to interface a host operating system. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThis ALS and proximity sensor was one of the very first deployed in mobile 8*4882a593Smuzhiyunhandsets, notably it is used in the very first Nexus One Android phone from 9*4882a593Smuzhiyun2010. 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunRequired properties: 12*4882a593Smuzhiyun- compatible: must be: "capella,cm3605" 13*4882a593Smuzhiyun- aset-gpios: GPIO line controlling the ASET line (drive low 14*4882a593Smuzhiyun to activate the ALS, should be flagged GPIO_ACTIVE_LOW) 15*4882a593Smuzhiyun- interrupts: the IRQ line (such as a GPIO) that is connected to 16*4882a593Smuzhiyun the POUT (proximity sensor out) line. The edge detection must 17*4882a593Smuzhiyun be set to IRQ_TYPE_EDGE_BOTH so as to detect movements toward 18*4882a593Smuzhiyun and away from the proximity sensor. 19*4882a593Smuzhiyun- io-channels: the ADC channel used for converting the voltage from 20*4882a593Smuzhiyun AOUT to a digital representation. 21*4882a593Smuzhiyun- io-channel-names: must be "aout" 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunOptional properties: 24*4882a593Smuzhiyun- vdd-supply: regulator supplying VDD power to the component. 25*4882a593Smuzhiyun- capella,aset-resistance-ohms: the sensitivity calibration resistance, 26*4882a593Smuzhiyun in Ohms. Valid values are: 50000, 100000, 300000 and 600000, 27*4882a593Smuzhiyun as these are the resistance values that we are supplied with 28*4882a593Smuzhiyun calibration curves for. If not supplied, 100 kOhm will be assumed 29*4882a593Smuzhiyun but it is strongly recommended to supply this. 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunExample: 32*4882a593Smuzhiyun 33*4882a593Smuzhiyuncm3605 { 34*4882a593Smuzhiyun compatible = "capella,cm3605"; 35*4882a593Smuzhiyun vdd-supply = <&foo_reg>; 36*4882a593Smuzhiyun aset-gpios = <&foo_gpio 1 GPIO_ACTIVE_LOW>; 37*4882a593Smuzhiyun capella,aset-resistance-ohms = <100000>; 38*4882a593Smuzhiyun interrupts = <1 IRQ_TYPE_EDGE_BOTH>; 39*4882a593Smuzhiyun io-channels = <&adc 0x01>; 40*4882a593Smuzhiyun io-channel-names = "aout"; 41*4882a593Smuzhiyun}; 42