€•E5Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ./translations/zh_CN/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/zh_TW/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/it_IT/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/ja_JP/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/ko_KR/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/sp_SP/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒH/var/lib/git/docbuild/linux/Documentation/leds/leds-class-multicolor.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ#Multicolor LED handling under Linux”h]”hŒ#Multicolor LED handling under Linux”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ Description”h]”hŒ Description”…””}”(hhÌhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhÉhžhhŸh³h KubhŒ paragraph”“”)”}”(hŒìThe multicolor class groups monochrome LEDs and allows controlling two aspects of the final combined color: hue and lightness. The former is controlled via the multi_intensity array file and the latter is controlled via brightness file.”h]”hŒìThe multicolor class groups monochrome LEDs and allows controlling two aspects of the final combined color: hue and lightness. The former is controlled via the multi_intensity array file and the latter is controlled via brightness file.”…””}”(hhÜhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K hhÉhžhubeh}”(h]”Œ description”ah ]”h"]”Œ description”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒMulticolor Class Control”h]”hŒMulticolor Class Control”…””}”(hhõhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhòhžhhŸh³h KubhÛ)”}”(hXThe multicolor class presents files that groups the colors as indexes in an array. These files are children under the LED parent node created by the led_class framework. The led_class framework is documented in led-class.rst within this documentation directory.”h]”hXThe multicolor class presents files that groups the colors as indexes in an array. These files are children under the LED parent node created by the led_class framework. The led_class framework is documented in led-class.rst within this documentation directory.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhhòhžhubhÛ)”}”(hŒ»Each colored LED will be indexed under the ``multi_*`` files. The order of the colors will be arbitrary. The ``multi_index`` file can be read to determine the color name to indexed value.”h]”(hŒ+Each colored LED will be indexed under the ”…””}”(hjhžhhŸNh NubhŒliteral”“”)”}”(hŒ ``multi_*``”h]”hŒmulti_*”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubhŒ7 files. The order of the colors will be arbitrary. The ”…””}”(hjhžhhŸNh Nubj)”}”(hŒ``multi_index``”h]”hŒ multi_index”…””}”(hj-hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubhŒ? file can be read to determine the color name to indexed value.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhhòhžhubhÛ)”}”(hŒ„The ``multi_index`` file is an array that contains the string list of the colors as they are defined in each ``multi_*`` array file.”h]”(hŒThe ”…””}”(hjEhžhhŸNh Nubj)”}”(hŒ``multi_index``”h]”hŒ multi_index”…””}”(hjMhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjEubhŒZ file is an array that contains the string list of the colors as they are defined in each ”…””}”(hjEhžhhŸNh Nubj)”}”(hŒ ``multi_*``”h]”hŒmulti_*”…””}”(hj_hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjEubhŒ array file.”…””}”(hjEhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhhòhžhubhÛ)”}”(hŒÎThe ``multi_intensity`` is an array that can be read or written to for the individual color intensities. All elements within this array must be written in order for the color LED intensities to be updated.”h]”(hŒThe ”…””}”(hjwhžhhŸNh Nubj)”}”(hŒ``multi_intensity``”h]”hŒmulti_intensity”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjwubhŒ· is an array that can be read or written to for the individual color intensities. All elements within this array must be written in order for the color LED intensities to be updated.”…””}”(hjwhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h Khhòhžhubeh}”(h]”Œmulticolor-class-control”ah ]”h"]”Œmulticolor class control”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒDirectory Layout Example”h]”hŒDirectory Layout Example”…””}”(hj¢hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjŸhžhhŸh³h K!ubhŒ literal_block”“”)”}”(hXHroot:/sys/class/leds/multicolor:status# ls -lR -rw-r--r-- 1 root root 4096 Oct 19 16:16 brightness -r--r--r-- 1 root root 4096 Oct 19 16:16 max_brightness -r--r--r-- 1 root root 4096 Oct 19 16:16 multi_index -rw-r--r-- 1 root root 4096 Oct 19 16:16 multi_intensity”h]”hXHroot:/sys/class/leds/multicolor:status# ls -lR -rw-r--r-- 1 root root 4096 Oct 19 16:16 brightness -r--r--r-- 1 root root 4096 Oct 19 16:16 max_brightness -r--r--r-- 1 root root 4096 Oct 19 16:16 multi_index -rw-r--r-- 1 root root 4096 Oct 19 16:16 multi_intensity”…””}”hj²sbah}”(h]”h ]”h"]”h$]”h&]”h±h²Œforce”‰Œlanguage”Œconsole”Œhighlight_args”}”uh1j°hŸh³h K"hjŸhžhubh¢)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”h±h²uh1h¡hjŸhžhhŸh³h K*ubeh}”(h]”Œdirectory-layout-example”ah ]”h"]”Œdirectory layout example”ah$]”h&]”uh1h´hh¶hžhhŸh³h K!ubhµ)”}”(hhh]”(hº)”}”(hŒ#Multicolor Class Brightness Control”h]”hŒ#Multicolor Class Brightness Control”…””}”(hjÙhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjÖhžhhŸh³h K-ubhÛ)”}”(hŒ­The brightness level for each LED is calculated based on the color LED intensity setting divided by the global max_brightness setting multiplied by the requested brightness.”h]”hŒ­The brightness level for each LED is calculated based on the color LED intensity setting divided by the global max_brightness setting multiplied by the requested brightness.”…””}”(hjçhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K.hjÖhžhubhÛ)”}”(hŒ@``led_brightness = brightness * multi_intensity/max_brightness``”h]”j)”}”(hj÷h]”hŒ /sys/class/leds/multicolor:status/multi_intensity red - intensity = 138 max_brightness = 255 green - intensity = 43 max_brightness = 255 blue - intensity = 226 max_brightness = 255”h]”hX%# cat /sys/class/leds/multicolor:status/multi_index green blue red # echo 43 226 138 > /sys/class/leds/multicolor:status/multi_intensity red - intensity = 138 max_brightness = 255 green - intensity = 43 max_brightness = 255 blue - intensity = 226 max_brightness = 255”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”h±h²jÀ‰jÁŒconsole”jÃ}”uh1j°hŸh³h K9hjÖhžhubh¢)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”h±h²uh1h¡hjÖhžhhŸh³h KJubhÛ)”}”(hXPThe user can control the brightness of that multicolor LED group by writing the global 'brightness' control. Assuming a max_brightness of 255 the user may want to dim the LED color group to half. The user would write a value of 128 to the global brightness file then the values written to each LED will be adjusted base on this value.”h]”hXTThe user can control the brightness of that multicolor LED group by writing the global ‘brightness’ control. Assuming a max_brightness of 255 the user may want to dim the LED color group to half. The user would write a value of 128 to the global brightness file then the values written to each LED will be adjusted base on this value.”…””}”(hj3hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KLhjÖhžhubj±)”}”(hŒt# cat /sys/class/leds/multicolor:status/max_brightness 255 # echo 128 > /sys/class/leds/multicolor:status/brightness”h]”hŒt# cat /sys/class/leds/multicolor:status/max_brightness 255 # echo 128 > /sys/class/leds/multicolor:status/brightness”…””}”hjAsbah}”(h]”h ]”h"]”h$]”h&]”h±h²jÀ‰jÁŒconsole”jÃ}”uh1j°hŸh³h KRhjÖhžhubh¢)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”h±h²uh1h¡hjÖhžhhŸh³h KXubj±)”}”(hŒzadjusted_red_value = 128 * 138/255 = 69 adjusted_green_value = 128 * 43/255 = 21 adjusted_blue_value = 128 * 226/255 = 113”h]”hŒzadjusted_red_value = 128 * 138/255 = 69 adjusted_green_value = 128 * 43/255 = 21 adjusted_blue_value = 128 * 226/255 = 113”…””}”hjZsbah}”(h]”h ]”h"]”h$]”h&]”h±h²jÀ‰jÁŒnone”jÃ}”uh1j°hŸh³h KZhjÖhžhubh¢)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”h±h²uh1h¡hjÖhžhhŸh³h K`ubhÛ)”}”(hŒcReading the global brightness file will return the current brightness value of the color LED group.”h]”hŒcReading the global brightness file will return the current brightness value of the color LED group.”…””}”(hjshžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KbhjÖhžhubj±)”}”(hŒ6# cat /sys/class/leds/multicolor:status/brightness 128”h]”hŒ6# cat /sys/class/leds/multicolor:status/brightness 128”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”h±h²jÀ‰jÁŒconsole”jÃ}”uh1j°hŸh³h KehjÖhžhubh¢)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”h±h²uh1h¡hjÖhžhhŸh³h Kjubeh}”(h]”Œ#multicolor-class-brightness-control”ah ]”h"]”Œ#multicolor class brightness control”ah$]”h&]”uh1h´hh¶hžhhŸh³h K-ubeh}”(h]”Œ#multicolor-led-handling-under-linux”ah ]”h"]”Œ#multicolor led handling under linux”ah$]”h&]”uh1h´hhhžhhŸh³h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h³uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¹NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jÍŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h³Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j§j¤hïhìjœj™jÓjÐjŸjœuŒ nametypes”}”(j§‰hï‰jœ‰jÓ‰jŸ‰uh}”(j¤h¶hìhÉj™hòjÐjŸjœjÖuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.