€•5Œ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 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.”…””}”(hjhžhhŸNh Nubah}”(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 multi_index file is an array that contains the string list of the colors as they are defined in each multi_* array file.”…””}”(hjhžhhŸNh Nubah}”(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 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.”…””}”(hj-hžhhŸNh Nubah}”(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”…””}”(hjFhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjChžhhŸh³h K!ubhÛ)”}”(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”…””}”(hjThžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K"hjChžhubeh}”(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”…””}”(hjmhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjjhž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*hjjhžhubhÛ)”}”(hŒ /sys/class/leds/multicolor:status/multi_intensity”h]”hŒCecho 43 226 138 > /sys/class/leds/multicolor:status/multi_intensity”…””}”(hj³hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K8hjjhžhubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒ*red - intensity = 138 max_brightness = 255”h]”(hŒterm”“”)”}”(hŒred -”h]”hŒred -”…””}”(hjÎhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhŸh³h K;hjÈubhŒ definition”“”)”}”(hhh]”hÛ)”}”(hŒ$intensity = 138 max_brightness = 255”h]”hŒ$intensity = 138 max_brightness = 255”…””}”(hjáhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K;hjÞubah}”(h]”h ]”h"]”h$]”h&]”uh1jÜhjÈubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÆhŸh³h K;hjÃubjÇ)”}”(hŒ+green - intensity = 43 max_brightness = 255”h]”(jÍ)”}”(hŒgreen -”h]”hŒgreen -”…””}”(hjÿhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhŸh³h K>hjûubjÝ)”}”(hhh]”hÛ)”}”(hŒ#intensity = 43 max_brightness = 255”h]”hŒ#intensity = 43 max_brightness = 255”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K>hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÜhjûubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÆhŸh³h K>hjÃhžhubjÇ)”}”(hŒ,blue - intensity = 226 max_brightness = 255 ”h]”(jÍ)”}”(hŒblue -”h]”hŒblue -”…””}”(hj.hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhŸh³h KBhj*ubjÝ)”}”(hhh]”hÛ)”}”(hŒ$intensity = 226 max_brightness = 255”h]”hŒ$intensity = 226 max_brightness = 255”…””}”(hj?hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KAhj<ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÜhj*ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÆhŸh³h KBhjÃhžhubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÁhjjhžhhŸh³h NubhÛ)”}”(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.”…””}”(hj_hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KDhjjhžhubhÛ)”}”(hŒpcat /sys/class/leds/multicolor:status/max_brightness 255 echo 128 > /sys/class/leds/multicolor:status/brightness”h]”hŒpcat /sys/class/leds/multicolor:status/max_brightness 255 echo 128 > /sys/class/leds/multicolor:status/brightness”…””}”(hjmhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KJhjjhžhubhÛ)”}”(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”…””}”(hj{hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KNhjjhžhubhÛ)”}”(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.”…””}”(hj‰hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KRhjjhžhubhÛ)”}”(hŒ4cat /sys/class/leds/multicolor:status/brightness 128”h]”hŒ4cat /sys/class/leds/multicolor:status/brightness 128”…””}”(hj—hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KUhjjhžhubeh}”(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=jgjdjªj§uŒ nametypes”}”(j²‰hï‰j@‰jg‰jª‰uh}”(j¯h¶hìhÉj=hòjdjCj§jjuŒ 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.