Msphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget$/translations/zh_CN/leds/leds-lp5523modnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/zh_TW/leds/leds-lp5523modnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/it_IT/leds/leds-lp5523modnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ja_JP/leds/leds-lp5523modnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ko_KR/leds/leds-lp5523modnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/sp_SP/leds/leds-lp5523modnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hKernel driver for lp5523h]hKernel driver for lp5523}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh>/var/lib/git/docbuild/linux/Documentation/leds/leds-lp5523.rsthKubh bullet_list)}(hhh](h list_item)}(h-National Semiconductor LP5523 led driver chiph]h paragraph)}(hhh]h-National Semiconductor LP5523 led driver chip}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(h5Datasheet: http://www.national.com/pf/LP/LP5523.html h]h)}(h4Datasheet: http://www.national.com/pf/LP/LP5523.htmlh](h Datasheet: }(hhhhhNhNubh reference)}(h)http://www.national.com/pf/LP/LP5523.htmlh]h)http://www.national.com/pf/LP/LP5523.html}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurihuh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1hhhhKhhhhubh)}(hgAuthors: Mathias Nyman, Yuri Zaporozhets, Samu Onkalo Contact: Samu Onkalo (samu.p.onkalo-at-nokia.com)h]hgAuthors: Mathias Nyman, Yuri Zaporozhets, Samu Onkalo Contact: Samu Onkalo (samu.p.onkalo-at-nokia.com)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK ubh)}(hLP5523 can drive up to 9 channels. Leds can be controlled directly via the led class control interface. The name of each channel is configurable in the platform data - name and label. There are three options to make the channel name.h]hLP5523 can drive up to 9 channels. Leds can be controlled directly via the led class control interface. The name of each channel is configurable in the platform data - name and label. There are three options to make the channel name.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjhhubhenumerated_list)}(hhh]h)}(h'Define the 'name' in the platform data h]h)}(h&Define the 'name' in the platform datah]h*Define the ‘name’ in the platform data}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj:ubah}(h]h ]h"]h$]h&]uh1hhj7hhhhhNubah}(h]h ]h"]h$]h&]enumtype loweralphaprefixhsuffix)uh1j5hjhhhhhKubh)}(h=To make specific channel name, then use 'name' platform data.h]hATo make specific channel name, then use ‘name’ platform data.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](h)}(h-/sys/class/leds/R1 (name: 'R1')h]h)}(hjph]h1/sys/class/leds/R1 (name: ‘R1’)}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjnubah}(h]h ]h"]h$]h&]uh1hhjkhhhhhNubh)}(h./sys/class/leds/B1 (name: 'B1') h]h)}(h-/sys/class/leds/B1 (name: 'B1')h]h1/sys/class/leds/B1 (name: ‘B1’)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjkhhhhhNubeh}(h]h ]h"]h$]h&]j-uh1hhhhKhjhhubj6)}(hhh]h)}(h%Use the 'label' with no 'name' field h]h)}(h$Use the 'label' with no 'name' fieldh]h,Use the ‘label’ with no ‘name’ field}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubah}(h]h ]h"]h$]h&]jXjYjZhj[j\startKuh1j5hjhhhhhKubh)}(hvFor one device name with channel number, then use 'label'. - /sys/class/leds/RGB:channelN (label: 'RGB', N: 0 ~ 8)h]h~For one device name with channel number, then use ‘label’. - /sys/class/leds/RGB:channelN (label: ‘RGB’, N: 0 ~ 8)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj6)}(hhh]h)}(hDefault h]h)}(hDefaulth]hDefault}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubah}(h]h ]h"]h$]h&]jXjYjZhj[j\jKuh1j5hjhhhhhKubh)}(hcIf both fields are NULL, 'lp5523' is used by default. - /sys/class/leds/lp5523:channelN (N: 0 ~ 8)h]hgIf both fields are NULL, ‘lp5523’ is used by default. - /sys/class/leds/lp5523:channelN (N: 0 ~ 8)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjhhubh)}(hpLP5523 has the internal program memory for running various LED patterns. There are two ways to run LED patterns.h]hpLP5523 has the internal program memory for running various LED patterns. There are two ways to run LED patterns.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjhhubj6)}(hhh]h)}(h?Legacy interface - enginex_mode, enginex_load and enginex_leds h]h)}(h>Legacy interface - enginex_mode, enginex_load and enginex_ledsh]h>Legacy interface - enginex_mode, enginex_load and enginex_leds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubah}(h]h ]h"]h$]h&]jXarabicjZhj[j\uh1j5hjhhhhhK&ubh block_quote)}(hXControl interface for the engines: x is 1 .. 3 enginex_mode: disabled, load, run enginex_load: microcode load enginex_leds: led mux control :: cd /sys/class/leds/lp5523:channel2/device echo "load" > engine3_mode echo "9d80400004ff05ff437f0000" > engine3_load echo "111111111" > engine3_leds echo "run" > engine3_mode To stop the engine:: echo "disabled" > engine3_mode h](h)}(h"Control interface for the engines:h]h"Control interface for the engines:}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hj5ubh)}(h x is 1 .. 3h]h x is 1 .. 3}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hj5ubhdefinition_list)}(hhh](hdefinition_list_item)}(h!enginex_mode: disabled, load, runh](hterm)}(h enginex_mode:h]h enginex_mode:}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hhhK,hj\ubh definition)}(hhh]h)}(hdisabled, load, runh]hdisabled, load, run}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjrubah}(h]h ]h"]h$]h&]uh1jphj\ubeh}(h]h ]h"]h$]h&]uh1jZhhhK,hjWubj[)}(henginex_load: microcode loadh](ja)}(h enginex_load:h]h enginex_load:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hhhK.hjubjq)}(hhh]h)}(hmicrocode loadh]hmicrocode load}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jZhhhK.hjWubj[)}(henginex_leds: led mux control h](ja)}(h enginex_leds:h]h enginex_leds:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hhhK1hjubjq)}(hhh]h)}(hled mux controlh]hled mux control}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jZhhhK1hjWubeh}(h]h ]h"]h$]h&]uh1jUhj5ubh literal_block)}(hcd /sys/class/leds/lp5523:channel2/device echo "load" > engine3_mode echo "9d80400004ff05ff437f0000" > engine3_load echo "111111111" > engine3_leds echo "run" > engine3_modeh]hcd /sys/class/leds/lp5523:channel2/device echo "load" > engine3_mode echo "9d80400004ff05ff437f0000" > engine3_load echo "111111111" > engine3_leds echo "run" > engine3_mode}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK5hj5ubh)}(hTo stop the engine::h]hTo stop the engine:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hj5ubj)}(hecho "disabled" > engine3_modeh]hecho "disabled" > engine3_mode}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK=hj5ubeh}(h]h ]h"]h$]h&]uh1j3hhhK(hjhhubj6)}(hhh]h)}(h-Firmware interface - LP55xx common interface h]h)}(h,Firmware interface - LP55xx common interfaceh]h,Firmware interface - LP55xx common interface}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hj*ubah}(h]h ]h"]h$]h&]uh1hhj'hhhhhNubah}(h]h ]h"]h$]h&]jXj2jZhj[j\jKuh1j5hjhhhhhK?ubh)}(hFFor the details, please refer to 'firmware' section in leds-lp55xx.txth]hJFor the details, please refer to ‘firmware’ section in leds-lp55xx.txt}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhjhhubh)}(hLP5523 has three master faders. If a channel is mapped to one of the master faders, its output is dimmed based on the value of the master fader.h]hLP5523 has three master faders. If a channel is mapped to one of the master faders, its output is dimmed based on the value of the master fader.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKChjhhubh)}(h For example::h]h For example:}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjhhubj)}(h$echo "123000123" > master_fader_ledsh]h$echo "123000123" > master_fader_leds}hjrsbah}(h]h ]h"]h$]h&]jjuh1jhhhKIhjhhubh)}(h.creates the following channel-fader mappings::h]h-creates the following channel-fader mappings:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjhhubj)}(hVchannel 0,6 to master_fader1 channel 1,7 to master_fader2 channel 2,8 to master_fader3h]hVchannel 0,6 to master_fader1 channel 1,7 to master_fader2 channel 2,8 to master_fader3}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKMhjhhubh)}(h9Then, to have 25% of the original output on channel 0,6::h]h8Then, to have 25% of the original output on channel 0,6:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjhhubj)}(hecho 64 > master_fader1h]hecho 64 > master_fader1}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKShjhhubh)}(h@To have 0% of the original output (i.e. no output) channel 1,7::h]h?To have 0% of the original output (i.e. no output) channel 1,7:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjhhubj)}(hecho 0 > master_fader2h]hecho 0 > master_fader2}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKWhjhhubh)}(hFTo have 100% of the original output (i.e. no dimming) on channel 2,8::h]hETo have 100% of the original output (i.e. no dimming) on channel 2,8:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjhhubj)}(hecho 255 > master_fader3h]hecho 255 > master_fader3}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK[hjhhubh)}(h$To clear all master fader controls::h]h#To clear all master fader controls:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjhhubj)}(h$echo "000000000" > master_fader_ledsh]h$echo "000000000" > master_fader_leds}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK_hjhhubh)}(h8Selftest uses always the current from the platform data.h]h8Selftest uses always the current from the platform data.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahjhhubh)}(hEach channel contains led current settings. - /sys/class/leds/lp5523:channel2/led_current - RW - /sys/class/leds/lp5523:channel2/max_current - ROh]hEach channel contains led current settings. - /sys/class/leds/lp5523:channel2/led_current - RW - /sys/class/leds/lp5523:channel2/max_current - RO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjhhubh)}(h"Format: 10x mA i.e 10 means 1.0 mAh]h"Format: 10x mA i.e 10 means 1.0 mA}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjhhubh)}(hExample platform data::h]hExample platform data:}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjhhubj)}(hXstatic struct lp55xx_led_config lp5523_led_config[] = { { .name = "D1", .chan_nr = 0, .led_current = 50, .max_current = 130, }, ... { .chan_nr = 8, .led_current = 50, .max_current = 130, } }; static int lp5523_setup(void) { /* Setup HW resources */ } static void lp5523_release(void) { /* Release HW resources */ } static void lp5523_enable(bool state) { /* Control chip enable signal */ } static struct lp55xx_platform_data lp5523_platform_data = { .led_config = lp5523_led_config, .num_channels = ARRAY_SIZE(lp5523_led_config), .clock_mode = LP55XX_CLOCK_EXT, .setup_resources = lp5523_setup, .release_resources = lp5523_release, .enable = lp5523_enable, };h]hXstatic struct lp55xx_led_config lp5523_led_config[] = { { .name = "D1", .chan_nr = 0, .led_current = 50, .max_current = 130, }, ... { .chan_nr = 8, .led_current = 50, .max_current = 130, } }; static int lp5523_setup(void) { /* Setup HW resources */ } static void lp5523_release(void) { /* Release HW resources */ } static void lp5523_enable(bool state) { /* Control chip enable signal */ } static struct lp55xx_platform_data lp5523_platform_data = { .led_config = lp5523_led_config, .num_channels = ARRAY_SIZE(lp5523_led_config), .clock_mode = LP55XX_CLOCK_EXT, .setup_resources = lp5523_setup, .release_resources = lp5523_release, .enable = lp5523_enable, };}hjDsbah}(h]h ]h"]h$]h&]jjuh1jhhhKkhjhhubjV)}(hhh]j[)}(h-Note chan_nr can have values between 0 and 8.h](ja)}(hNoteh]hNote}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hhhKhjUubjq)}(hhh]h)}(h(chan_nr can have values between 0 and 8.h]h(chan_nr can have values between 0 and 8.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjgubah}(h]h ]h"]h$]h&]uh1jphjUubeh}(h]h ]h"]h$]h&]uh1jZhhhKhjRubah}(h]h ]h"]h$]h&]uh1jUhjhhhhhNubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK ubeh}(h]kernel-driver-for-lp5523ah ]h"]kernel driver for lp5523ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjju nametypes}(jjuh}(jhjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages](hsystem_message)}(hhh]h)}(h:Enumerated list start value not ordinal-1: "b" (ordinal 2)h]h>Enumerated list start value not ordinal-1: “b” (ordinal 2)}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jhjhhhhhKubj )}(hhh]h)}(h:Enumerated list start value not ordinal-1: "c" (ordinal 3)h]h>Enumerated list start value not ordinal-1: “c” (ordinal 3)}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=ubah}(h]h ]h"]h$]h&]levelKtypej:sourcehlineKuh1jhjhhhhhKubj )}(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[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXubah}(h]h ]h"]h$]h&]levelKtypej:sourcehlineKuh1jhjhhhhhK?ubetransform_messages] transformerN include_log] decorationNhhub.