€•>Œ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-lp5521”Œ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-lp5521”Œ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-lp5521”Œ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-lp5521”Œ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-lp5521”Œ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-lp5521”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒKernel driver for lp5521”h]”hŒKernel driver for lp5521”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒ>/var/lib/git/docbuild/linux/Documentation/leds/leds-lp5521.rst”h KubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ-National Semiconductor LP5521 led driver chip”h]”hŒ paragraph”“”)”}”(hhÀh]”hŒ-National Semiconductor LP5521 led driver chip”…””}”(hhÄhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khh¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hh¹hžhhŸh¶h Nubh½)”}”(hŒ5Datasheet: http://www.national.com/pf/LP/LP5521.html ”h]”hÃ)”}”(hŒ4Datasheet: http://www.national.com/pf/LP/LP5521.html”h]”(hŒ Datasheet: ”…””}”(hhÛhžhhŸNh NubhŒ reference”“”)”}”(hŒ)http://www.national.com/pf/LP/LP5521.html”h]”hŒ)http://www.national.com/pf/LP/LP5521.html”…””}”(hhåhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”hçuh1hãhhÛubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khh×ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hh¹hžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1h·hŸh¶h Khh£hžhubhÃ)”}”(hŒ5Authors: Mathias Nyman, Yuri Zaporozhets, Samu Onkalo”h]”hŒ5Authors: Mathias Nyman, Yuri Zaporozhets, Samu Onkalo”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khh£hžhubhÃ)”}”(hŒ1Contact: Samu Onkalo (samu.p.onkalo-at-nokia.com)”h]”hŒ1Contact: Samu Onkalo (samu.p.onkalo-at-nokia.com)”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K hh£hžhubh¢)”}”(hhh]”(h§)”}”(hŒ Description”h]”hŒ Description”…””}”(hj'hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj$hžhhŸh¶h K ubhÃ)”}”(hŒ§LP5521 can drive up to 3 channels. Leds can be controlled directly via the led class control interface. Channels have generic names: lp5521:channelx, where x is 0 .. 2”h]”hŒ§LP5521 can drive up to 3 channels. Leds can be controlled directly via the led class control interface. Channels have generic names: lp5521:channelx, where x is 0 .. 2”…””}”(hj5hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khj$hžhubhÃ)”}”(hŒ”All three channels can be also controlled using the engine micro programs. More details of the instructions can be found from the public data sheet.”h]”hŒ”All three channels can be also controlled using the engine micro programs. More details of the instructions can be found from the public data sheet.”…””}”(hjChžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khj$hžhubhÃ)”}”(hŒpLP5521 has the internal program memory for running various LED patterns. There are two ways to run LED patterns.”h]”hŒpLP5521 has the internal program memory for running various LED patterns. There are two ways to run LED patterns.”…””}”(hjQhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khj$hžhubhŒenumerated_list”“”)”}”(hhh]”h½)”}”(hŒÍLegacy interface - enginex_mode and enginex_load Control interface for the engines: x is 1 .. 3 enginex_mode: disabled, load, run enginex_load: store program (visible only in engine load mode) ”h]”(hÃ)”}”(hŒSLegacy interface - enginex_mode and enginex_load Control interface for the engines:”h]”hŒSLegacy interface - enginex_mode and enginex_load Control interface for the engines:”…””}”(hjhhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KhjdubhÃ)”}”(hŒ x is 1 .. 3”h]”hŒ x is 1 .. 3”…””}”(hjvhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KhjdubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒ!enginex_mode: disabled, load, run”h]”(hŒterm”“”)”}”(hŒ enginex_mode:”h]”hŒ enginex_mode:”…””}”(hj‘hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h Khj‹ubhŒ definition”“”)”}”(hhh]”hÃ)”}”(hŒdisabled, load, run”h]”hŒdisabled, load, run”…””}”(hj¤hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khj¡ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸhj‹ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j‰hŸh¶h Khj†ubjŠ)”}”(hŒ?enginex_load: store program (visible only in engine load mode) ”h]”(j)”}”(hŒ enginex_load:”h]”hŒ enginex_load:”…””}”(hjÂhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h K!hj¾ubj )”}”(hhh]”hÃ)”}”(hŒ0store program (visible only in engine load mode)”h]”hŒ0store program (visible only in engine load mode)”…””}”(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†ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j„hjdubeh}”(h]”h ]”h"]”h$]”h&]”uh1h¼hjahžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ)”uh1j_hj$hžhhŸh¶h KubhŒ block_quote”“”)”}”(hX Example (start to blink the channel 2 led):: cd /sys/class/leds/lp5521:channel2/device echo "load" > engine3_mode echo "037f4d0003ff6000" > engine3_load echo "run" > engine3_mode To stop the engine:: echo "disabled" > engine3_mode ”h]”(hÃ)”}”(hŒ,Example (start to blink the channel 2 led)::”h]”hŒ+Example (start to blink the channel 2 led):”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K#hjubhŒ literal_block”“”)”}”(hŒ‡cd /sys/class/leds/lp5521:channel2/device echo "load" > engine3_mode echo "037f4d0003ff6000" > engine3_load echo "run" > engine3_mode”h]”hŒ‡cd /sys/class/leds/lp5521:channel2/device echo "load" > engine3_mode echo "037f4d0003ff6000" > engine3_load echo "run" > engine3_mode”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jhŸh¶h K%hjubhÃ)”}”(hŒTo stop the engine::”h]”hŒTo stop the engine:”…””}”(hj*hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K*hjubj)”}”(hŒecho "disabled" > engine3_mode”h]”hŒecho "disabled" > engine3_mode”…””}”hj8sbah}”(h]”h ]”h"]”h$]”h&]”j(j)uh1jhŸh¶h K,hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h K#hj$hžhubj`)”}”(hhh]”h½)”}”(hŒ-Firmware interface - LP55xx common interface ”h]”hÃ)”}”(hŒ,Firmware interface - LP55xx common interface”h]”hŒ,Firmware interface - LP55xx common interface”…””}”(hjShžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K.hjOubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hjLhžhhŸh¶h Nubah}”(h]”h ]”h"]”h$]”h&]”jÿjjhjjŒstart”Kuh1j_hj$hžhhŸh¶h K.ubhÃ)”}”(hŒFFor the details, please refer to 'firmware' section in leds-lp55xx.txt”h]”hŒJFor the details, please refer to ‘firmware’ section in leds-lp55xx.txt”…””}”(hjnhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K0hj$hžhubhÃ)”}”(hŒ sysfs contains a selftest entry.”h]”hŒ sysfs contains a selftest entry.”…””}”(hj|hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K2hj$hžhubhÃ)”}”(hŒmThe test communicates with the chip and checks that the clock mode is automatically set to the requested one.”h]”hŒmThe test communicates with the chip and checks that the clock mode is automatically set to the requested one.”…””}”(hjŠhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K4hj$hžhubhÃ)”}”(hŒ.Each channel has its own led current settings.”h]”hŒ.Each channel has its own led current settings.”…””}”(hj˜hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K7hj$hžhubh¸)”}”(hhh]”(h½)”}”(hŒ0/sys/class/leds/lp5521:channel0/led_current - RW”h]”hÃ)”}”(hj«h]”hŒ0/sys/class/leds/lp5521:channel0/led_current - RW”…””}”(hj­hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K9hj©ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hj¦hžhhŸh¶h Nubh½)”}”(hŒ1/sys/class/leds/lp5521:channel0/max_current - RO ”h]”hÃ)”}”(hŒ0/sys/class/leds/lp5521:channel0/max_current - RO”h]”hŒ0/sys/class/leds/lp5521:channel0/max_current - RO”…””}”(hjÄhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K:hjÀubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hj¦hžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”jŒ-”uh1h·hŸh¶h K9hj$hžhubhÃ)”}”(hŒ"Format: 10x mA i.e 10 means 1.0 mA”h]”hŒ"Format: 10x mA i.e 10 means 1.0 mA”…””}”(hjßhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khj$hžhubj)”}”(hXDstatic struct lp55xx_led_config lp5521_led_config[] = { { .name = "red", .chan_nr = 0, .led_current = 50, .max_current = 130, }, { .name = "green", .chan_nr = 1, .led_current = 0, .max_current = 130, }, { .name = "blue", .chan_nr = 2, .led_current = 0, .max_current = 130, } }; static int lp5521_setup(void) { /* setup HW resources */ } static void lp5521_release(void) { /* Release HW resources */ } static void lp5521_enable(bool state) { /* Control of chip enable signal */ } static struct lp55xx_platform_data lp5521_platform_data = { .led_config = lp5521_led_config, .num_channels = ARRAY_SIZE(lp5521_led_config), .clock_mode = LP55XX_CLOCK_EXT, .setup_resources = lp5521_setup, .release_resources = lp5521_release, .enable = lp5521_enable, };”h]”hXDstatic struct lp55xx_led_config lp5521_led_config[] = { { .name = "red", .chan_nr = 0, .led_current = 50, .max_current = 130, }, { .name = "green", .chan_nr = 1, .led_current = 0, .max_current = 130, }, { .name = "blue", .chan_nr = 2, .led_current = 0, .max_current = 130, } }; static int lp5521_setup(void) { /* setup HW resources */ } static void lp5521_release(void) { /* Release HW resources */ } static void lp5521_enable(bool state) { /* Control of chip enable signal */ } static struct lp55xx_platform_data lp5521_platform_data = { .led_config = lp5521_led_config, .num_channels = ARRAY_SIZE(lp5521_led_config), .clock_mode = LP55XX_CLOCK_EXT, .setup_resources = lp5521_setup, .release_resources = lp5521_release, .enable = lp5521_enable, };”…””}”hjûsbah}”(h]”h ]”h"]”h$]”h&]”j(j)uh1jhŸh¶h K@hj$hžhubj…)”}”(hhh]”jŠ)”}”(hŒíNote: chan_nr can have values between 0 and 2. The name of each channel can be configurable. If the name field is not defined, the default name will be set to 'xxxx:channelN' (XXXX : pdata->label or i2c client name, N : channel number) ”h]”(j)”}”(hŒNote:”h]”hŒNote:”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h Kphj ubj )”}”(hhh]”hÃ)”}”(hŒåchan_nr can have values between 0 and 2. The name of each channel can be configurable. If the name field is not defined, the default name will be set to 'xxxx:channelN' (XXXX : pdata->label or i2c client name, N : channel number)”h]”hŒéchan_nr can have values between 0 and 2. The name of each channel can be configurable. If the name field is not defined, the default name will be set to ‘xxxx:channelN’ (XXXX : pdata->label or i2c client name, N : channel number)”…””}”(hj!hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Klhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j‰hŸh¶h Kphj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj$hžhhŸh¶h NubhÃ)”}”(hŒmIf the current is set to 0 in the platform data, that channel is disabled and it is not visible in the sysfs.”h]”hŒmIf the current is set to 0 in the platform data, that channel is disabled and it is not visible in the sysfs.”…””}”(hjAhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Krhj$hžhubeh}”(h]”Œ description”ah ]”h"]”Œ description”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K ubeh}”(h]”Œkernel-driver-for-lp5521”ah ]”h"]”Œkernel driver for lp5521”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\jYjTjQuŒ nametypes”}”(j\‰jT‰uh}”(jYh£jQj$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”]”hŒsystem_message”“”)”}”(hhh]”hÃ)”}”(hŒ:Enumerated list start value not ordinal-1: "2" (ordinal 2)”h]”hŒ>Enumerated list start value not ordinal-1: “2†(ordinal 2)”…””}”(hjéhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhjæubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”h¶Œline”Kuh1jähj$hžhhŸh¶h K.ubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.