€•ì>Œ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ŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/pt_BR/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)”…””}”(hj*h²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ºhj8h²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”…””}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÖh³hÊh´Khj8h²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.”…””}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÖh³hÊh´Khj8h²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.”…””}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÖh³hÊh´Khj8h²hubhŒenumerated_list”“”)”}”(hhh]”hÑ)”}”(hŒÌsysfs 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ŒRsysfs interface - enginex_mode and enginex_load Control interface for the engines:”h]”hŒRsysfs interface - enginex_mode and enginex_load Control interface for the engines:”…””}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÖh³hÊh´Khjxubh×)”}”(hŒ x is 1 .. 3”h]”hŒ x is 1 .. 3”…””}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÖh³hÊh´KhjxubhŒ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&]”uh1j£h³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&]”uh1jh³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&]”uh1j£h³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&]”uh1jh³hÊh´K!hjšubeh}”(h]”h ]”h"]”h$]”h&]”uh1j˜hjxubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÐhjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ)”uh1jshj8h²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):”…””}”(hjh²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”…””}”hj.sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j,h³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”…””}”hjLsbah}”(h]”h ]”h"]”h$]”h&]”j<j=uh1j,h³hÊh´K,hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´K#hj8h²hubjt)”}”(hhh]”hÑ)”}”(hŒ-Firmware interface - LP55xx common interface ”h]”h×)”}”(hŒ,Firmware interface - LP55xx common interface”h]”hŒ,Firmware interface - LP55xx common interface”…””}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÖh³hÊh´K.hjcubah}”(h]”h ]”h"]”h$]”h&]”uh1hÐhj`h²hh³hÊh´Nubah}”(h]”h ]”h"]”h$]”h&]”jjjhjjŒstart”Kuh1jshj8h²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”…””}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÖh³hÊh´K0hj8h²hubh×)”}”(hŒ sysfs contains a selftest entry.”h]”hŒ sysfs contains a selftest entry.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÖh³hÊh´K2hj8h²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´K4hj8h²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´K7hj8h²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´K9hj8h²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´Khj8h²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, };”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j<j=uh1j,h³hÊh´K@hj8h²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:”…””}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j£h³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)”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÖh³hÊh´Klhj2ubah}”(h]”h ]”h"]”h$]”h&]”uh1j³hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´Kphjubah}”(h]”h ]”h"]”h$]”h&]”uh1j˜hj8h²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.”…””}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÖh³hÊh´Krhj8h²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”}”(jpjmjhjeuŒ nametypes”}”(jp‰jh‰uh}”(jmh·jej8uŒ 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øhj8h²hh³hÊh´K.ubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.