\sphinx.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/bh1770glcmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/misc-devices/bh1770glcmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/misc-devices/bh1770glcmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/misc-devices/bh1770glcmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/misc-devices/bh1770glcmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/misc-devices/bh1770glcmodnameN 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:spacepreserveuh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/misc-devices/bh1770glc.rsthKubhsection)}(hhh](htitle)}(hKernel driver bh1770glch]hKernel driver bh1770glc}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hSupported chips:h]hSupported chips:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh bullet_list)}(hhh](h list_item)}(hROHM BH1770GLCh]h)}(hhh]hROHM BH1770GLC}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hOSRAM SFH7770 h]h)}(h OSRAM SFH7770h]h OSRAM SFH7770}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhK hhhhubh)}(h Data sheet: Not freely availableh]h Data sheet: Not freely available}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(h-Author: Samu Onkalo h](hAuthor: Samu Onkalo <}(hj%hhhNhNubh reference)}(hsamu.p.onkalo@nokia.comh]hsamu.p.onkalo@nokia.com}(hj/hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:samu.p.onkalo@nokia.comuh1j-hj%ubh>}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Descriptionh]h Description}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhhhhhKubh)}(hX'BH1770GLC and SFH7770 are combined ambient light and proximity sensors. ALS and proximity parts operates on their own, but they shares common I2C interface and interrupt logic. In principle they can run on their own, but ALS side results are used to estimate reliability of the proximity sensor.h]hX'BH1770GLC and SFH7770 are combined ambient light and proximity sensors. ALS and proximity parts operates on their own, but they shares common I2C interface and interrupt logic. In principle they can run on their own, but ALS side results are used to estimate reliability of the proximity sensor.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIhhubh)}(hoALS produces 16 bit lux values. The chip contains interrupt logic to produce low and high threshold interrupts.h]hoALS produces 16 bit lux values. The chip contains interrupt logic to produce low and high threshold interrupts.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIhhubh)}(hXEProximity part contains IR-led driver up to 3 IR leds. The chip measures amount of reflected IR light and produces proximity result. Resolution is 8 bit. Driver supports only one channel. Driver uses ALS results to estimate reliability of the proximity results. Thus ALS is always running while proximity detection is needed.h]hXEProximity part contains IR-led driver up to 3 IR leds. The chip measures amount of reflected IR light and produces proximity result. Resolution is 8 bit. Driver supports only one channel. Driver uses ALS results to estimate reliability of the proximity results. Thus ALS is always running while proximity detection is needed.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIhhubh)}(hXDriver uses threshold interrupts to avoid need for polling the values. Proximity low interrupt doesn't exists in the chip. This is simulated by using a delayed work. As long as there is proximity threshold above interrupts the delayed work is pushed forward. So, when proximity level goes below the threshold value, there is no interrupt and the delayed work will finally run. This is handled as no proximity indication.h]hXDriver uses threshold interrupts to avoid need for polling the values. Proximity low interrupt doesn’t exists in the chip. This is simulated by using a delayed work. As long as there is proximity threshold above interrupts the delayed work is pushed forward. So, when proximity level goes below the threshold value, there is no interrupt and the delayed work will finally run. This is handled as no proximity indication.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjIhhubh)}(hIChip state is controlled via runtime pm framework when enabled in config.h]hIChip state is controlled via runtime pm framework when enabled in config.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjIhhubh)}(hXCalibscale factor is used to hide differences between the chips. By default value set to neutral state meaning factor of 1.00. To get proper values, calibrated source of light is needed as a reference. Calibscale factor is set so that measurement produces about the expected lux value.h]hXCalibscale factor is used to hide differences between the chips. By default value set to neutral state meaning factor of 1.00. To get proper values, calibrated source of light is needed as a reference. Calibscale factor is set so that measurement produces about the expected lux value.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjIhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hSYSFSh]hSYSFS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK1ubhdefinition_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)}(hrpower_state RW - enable / disable chip Uses counting logic - 1 enables the chip - 0 disables the chip h](j)}(h power_stateh]h power_state}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK