Wsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget)/translations/zh_CN/misc-devices/apds990xmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/zh_TW/misc-devices/apds990xmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/it_IT/misc-devices/apds990xmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ja_JP/misc-devices/apds990xmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ko_KR/misc-devices/apds990xmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/sp_SP/misc-devices/apds990xmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhC/var/lib/git/docbuild/linux/Documentation/misc-devices/apds990x.rsthKubhsection)}(hhh](htitle)}(hKernel driver apds990xh]hKernel driver apds990x}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hSupported chips: Avago APDS990Xh]hSupported chips: Avago APDS990X}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h Data sheet: Not freely availableh]h Data sheet: Not freely available}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(h-Author: Samu Onkalo h](hAuthor: Samu Onkalo <}(hhhhhNhNubh reference)}(hsamu.p.onkalo@nokia.comh]hsamu.p.onkalo@nokia.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:samu.p.onkalo@nokia.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hAPDS990x is a combined ambient light and proximity sensor. ALS and proximity functionality are highly connected. ALS measurement path must be running while the proximity functionality is enabled.h]hAPDS990x is a combined ambient light and proximity sensor. ALS and proximity functionality are highly connected. ALS measurement path must be running while the proximity functionality is enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hXALS produces raw measurement values for two channels: Clear channel (infrared + visible light) and IR only. However, threshold comparisons happen using clear channel only. Lux value and the threshold level on the HW might vary quite much depending the spectrum of the light source.h]hXALS produces raw measurement values for two channels: Clear channel (infrared + visible light) and IR only. However, threshold comparisons happen using clear channel only. Lux value and the threshold level on the HW might vary quite much depending the spectrum of the light source.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hX\Driver makes necessary conversions to both directions so that user handles only lux values. Lux value is calculated using information from the both channels. HW threshold level is calculated from the given lux value to match with current type of the lightning. Sometimes inaccuracy of the estimations lead to false interrupt, but that doesn't harm.h]hX^Driver makes necessary conversions to both directions so that user handles only lux values. Lux value is calculated using information from the both channels. HW threshold level is calculated from the given lux value to match with current type of the lightning. Sometimes inaccuracy of the estimations lead to false interrupt, but that doesn’t harm.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hALS contains 4 different gain steps. Driver automatically selects suitable gain step. After each measurement, reliability of the results is estimated and new measurement is triggered if necessary.h]hALS contains 4 different gain steps. Driver automatically selects suitable gain step. After each measurement, reliability of the results is estimated and new measurement is triggered if necessary.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hj hhubh)}(hPlatform data can provide tuned values to the conversion formulas if values are known. Otherwise plain sensor default values are used.h]hPlatform data can provide tuned values to the conversion formulas if values are known. Otherwise plain sensor default values are used.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hj hhubh)}(hsProximity side is little bit simpler. There is no need for complex conversions. It produces directly usable values.h]hsProximity side is little bit simpler. There is no need for complex conversions. It produces directly usable values.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hj hhubh)}(hDriver controls chip operational state using pm_runtime framework. Voltage regulators are controlled based on chip operational state.h]hDriver controls chip operational state using pm_runtime framework. Voltage regulators are controlled based on chip operational state.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hj hhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hSYSFSh]hSYSFS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK0ubhdefinition_list)}(hhh](hdefinition_list_item)}(h2chip_id RO - shows detected chip type and version h](hterm)}(hchip_idh]hchip_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK4hjubh definition)}(hhh]h)}(h)RO - shows detected chip type and versionh]h)RO - shows detected chip type and version}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK4hjubj)}(hmpower_state RW - enable / disable chip. Uses counting logic 1 enables the chip 0 disables the chiph](j)}(h power_stateh]h power_state}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK9hjubj)}(hhh](h)}(h/RW - enable / disable chip. Uses counting logich]h/RW - enable / disable chip. Uses counting logic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubh block_quote)}(h&1 enables the chip 0 disables the chiph]h)}(h&1 enables the chip 0 disables the chiph]h&1 enables the chip 0 disables the chip}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjubah}(h]h ]h"]h$]h&]uh1jhhhK9hjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK9hjhhubj)}(h]lux0_input RO - measured lux value sysfs_notify called when threshold interrupt occurs h](j)}(h lux0_inputh]h lux0_input}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK>hjubj)}(hhh](h)}(hRO - measured lux valueh]hRO - measured lux value}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj=ubah}(h]h ]h"]h$]h&]uh1jhhhK>hj,ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK>hjhhubj)}(hlux0_sensor_range RO - lux0_input max value. Actually never reaches since sensor tends to saturate much before that. Real max value varies depending on the light spectrum etc. h](j)}(hlux0_sensor_rangeh]hlux0_sensor_range}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKEhjaubj)}(hhh](h)}(hRO - lux0_input max value.h]hRO - lux0_input max value.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhjsubj)}(hActually never reaches since sensor tends to saturate much before that. Real max value varies depending on the light spectrum etc. h]h)}(hActually never reaches since sensor tends to saturate much before that. Real max value varies depending on the light spectrum etc.h]hActually never reaches since sensor tends to saturate much before that. Real max value varies depending on the light spectrum etc.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKChjubah}(h]h ]h"]h$]h&]uh1jhhhKChjsubeh}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhhhKEhjhhubj)}(h&lux0_rate RW - measurement rate in Hz h](j)}(h lux0_rateh]h lux0_rate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKHhjubj)}(hhh]h)}(hRW - measurement rate in Hzh]hRW - measurement rate in Hz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKHhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKHhjhhubj)}(h1lux0_rate_avail RO - supported measurement rates h](j)}(hlux0_rate_availh]hlux0_rate_avail}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKKhjubj)}(hhh]h)}(h RO - supported measurement ratesh]h RO - supported measurement rates}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKKhjhhubj)}(hlux0_calibscale RW - calibration value. Set to neutral value by default. Output results are multiplied with calibscale / calibscale_default value. h](j)}(hlux0_calibscaleh]hlux0_calibscale}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKRhjubj)}(hhh](h)}(hRW - calibration value.h]hRW - calibration value.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubj)}(hkSet to neutral value by default. Output results are multiplied with calibscale / calibscale_default value. h]h)}(hjSet to neutral value by default. Output results are multiplied with calibscale / calibscale_default value.h]hjSet to neutral value by default. Output results are multiplied with calibscale / calibscale_default value.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhj)ubah}(h]h ]h"]h$]h&]uh1jhhhKPhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKRhjhhubj)}(h7lux0_calibscale_default RO - neutral calibration value h](j)}(hlux0_calibscale_defaulth]hlux0_calibscale_default}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKUhjMubj)}(hhh]h)}(hRO - neutral calibration valueh]hRO - neutral calibration value}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhj_ubah}(h]h ]h"]h$]h&]uh1jhjMubeh}(h]h ]h"]h$]h&]uh1jhhhKUhjhhubj)}(hlux0_thresh_above_value RW - HI level threshold value. All results above the value trigs an interrupt. 65535 (i.e. sensor_range) disables the above interrupt. h](j)}(hlux0_thresh_above_valueh]hlux0_thresh_above_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK\hj|ubj)}(hhh](h)}(hRW - HI level threshold value.h]hRW - HI level threshold value.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhjubj)}(hhAll results above the value trigs an interrupt. 65535 (i.e. sensor_range) disables the above interrupt. h]h)}(hgAll results above the value trigs an interrupt. 65535 (i.e. sensor_range) disables the above interrupt.h]hgAll results above the value trigs an interrupt. 65535 (i.e. sensor_range) disables the above interrupt.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjubah}(h]h ]h"]h$]h&]uh1jhhhKZhjubeh}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jhhhK\hjhhubj)}(hlux0_thresh_below_value RW - LO level threshold value. All results below the value trigs an interrupt. 0 disables the below interrupt. h](j)}(hlux0_thresh_below_valueh]hlux0_thresh_below_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKbhjubj)}(hhh](h)}(hRW - LO level threshold value.h]hRW - LO level threshold value.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hjubj)}(hPAll results below the value trigs an interrupt. 0 disables the below interrupt. h]h)}(hOAll results below the value trigs an interrupt. 0 disables the below interrupt.h]hOAll results below the value trigs an interrupt. 0 disables the below interrupt.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahjubah}(h]h ]h"]h$]h&]uh1jhhhKahjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKbhjhhubj)}(hbprox0_raw RO - measured proximity value sysfs_notify called when threshold interrupt occurs h](j)}(h prox0_rawh]h prox0_raw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKghj ubj)}(hhh](h)}(hRO - measured proximity valueh]hRO - measured proximity value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjubj)}(h4sysfs_notify called when threshold interrupt occurs h]h)}(h3sysfs_notify called when threshold interrupt occursh]h3sysfs_notify called when threshold interrupt occurs}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghj-ubah}(h]h ]h"]h$]h&]uh1jhhhKghjubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKghjhhubj)}(h3prox0_sensor_range RO - prox0_raw max value (1023) h](j)}(hprox0_sensor_rangeh]hprox0_sensor_range}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKjhjQubj)}(hhh]h)}(hRO - prox0_raw max value (1023)h]hRO - prox0_raw max value (1023)}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjcubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhhhKjhjhhubj)}(hprox0_raw_en RW - enable / disable proximity - uses counting logic - 1 enables the proximity - 0 disables the proximity h](j)}(h prox0_raw_enh]h prox0_raw_en}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKphjubj)}(hhh](h)}(h5RW - enable / disable proximity - uses counting logich]h5RW - enable / disable proximity - uses counting logic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubj)}(h5- 1 enables the proximity - 0 disables the proximity h]h bullet_list)}(hhh](h list_item)}(h1 enables the proximityh]h)}(hjh]h1 enables the proximity}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h0 disables the proximity h]h)}(h0 disables the proximityh]h0 disables the proximity}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhKohjubah}(h]h ]h"]h$]h&]uh1jhhhKohjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKphjhhubj)}(hXprox0_reporting_mode RW - trigger / periodic. In "trigger" mode the driver tells two possible values: 0 or prox0_sensor_range value. 0 means no proximity, 1023 means proximity. This causes minimal number of interrupts. In "periodic" mode the driver reports all values above prox0_thresh_above. This causes more interrupts, but it can give _rough_ estimate about the distance. h](j)}(hprox0_reporting_modeh]hprox0_reporting_mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKzhjubj)}(hhh](h)}(hRW - trigger / periodic.h]hRW - trigger / periodic.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshj ubj)}(hXJIn "trigger" mode the driver tells two possible values: 0 or prox0_sensor_range value. 0 means no proximity, 1023 means proximity. This causes minimal number of interrupts. In "periodic" mode the driver reports all values above prox0_thresh_above. This causes more interrupts, but it can give _rough_ estimate about the distance. h]h)}(hXIIn "trigger" mode the driver tells two possible values: 0 or prox0_sensor_range value. 0 means no proximity, 1023 means proximity. This causes minimal number of interrupts. In "periodic" mode the driver reports all values above prox0_thresh_above. This causes more interrupts, but it can give _rough_ estimate about the distance.h]hXQIn “trigger” mode the driver tells two possible values: 0 or prox0_sensor_range value. 0 means no proximity, 1023 means proximity. This causes minimal number of interrupts. In “periodic” mode the driver reports all values above prox0_thresh_above. This causes more interrupts, but it can give _rough_ estimate about the distance.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjubah}(h]h ]h"]h$]h&]uh1jhhhKuhj ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKzhjhhubj)}(h\prox0_reporting_mode_avail RO - accepted values to prox0_reporting_mode (trigger, periodic) h](j)}(hprox0_reporting_mode_availh]hprox0_reporting_mode_avail}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK}hj>ubj)}(hhh]h)}(h@RO - accepted values to prox0_reporting_mode (trigger, periodic)h]h@RO - accepted values to prox0_reporting_mode (trigger, periodic)}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK}hjPubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhhhK}hjhhubj)}(hKprox0_thresh_above_value RW - threshold level which trigs proximity events.h](j)}(hprox0_thresh_above_valueh]hprox0_thresh_above_value}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjmubj)}(hhh]h)}(h2RW - threshold level which trigs proximity events.h]h2RW - threshold level which trigs proximity events.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjmubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]sysfsah ]h"]sysfsah$]h&]uh1hhhhhhhhK0ubeh}(h]kernel-driver-apds990xah ]h"]kernel driver apds990xah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjjju nametypes}(jjjuh}(jhjj jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.