€•­:Œ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/w1/slaves/w1_ds2438”Œ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/w1/slaves/w1_ds2438”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/it_IT/w1/slaves/w1_ds2438”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/ja_JP/w1/slaves/w1_ds2438”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/ko_KR/w1/slaves/w1_ds2438”Œ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/w1/slaves/w1_ds2438”Œ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 w1_ds2438”h]”hŒKernel driver w1_ds2438”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒA/var/lib/git/docbuild/linux/Documentation/w1/slaves/w1_ds2438.rst”h KubhŒ paragraph”“”)”}”(hŒSupported chips:”h]”hŒSupported chips:”…””}”(hh¹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubhŒ block_quote”“”)”}”(hŒ%* Maxim DS2438 Smart Battery Monitor ”h]”hŒ bullet_list”“”)”}”(hhh]”hŒ list_item”“”)”}”(hŒ#Maxim DS2438 Smart Battery Monitor ”h]”h¸)”}”(hŒ"Maxim DS2438 Smart Battery Monitor”h]”hŒ"Maxim DS2438 Smart Battery Monitor”…””}”(hhØhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KhhÔubah}”(h]”h ]”h"]”h$]”h&]”uh1hÒhhÏubah}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1hÍhŸh¶h KhhÉubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhŸh¶h Khh£hžhubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒosupported family codes: ================ ==== W1_FAMILY_DS2438 0x26 ================ ==== ”h]”(hŒterm”“”)”}”(hŒsupported family codes:”h]”hŒsupported family codes:”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h K hjubhŒ definition”“”)”}”(hhh]”hŒtable”“”)”}”(hhh]”hŒtgroup”“”)”}”(hhh]”(hŒcolspec”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j$hj!ubj%)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j$hj!ubhŒtbody”“”)”}”(hhh]”hŒrow”“”)”}”(hhh]”(hŒentry”“”)”}”(hhh]”h¸)”}”(hŒW1_FAMILY_DS2438”h]”hŒW1_FAMILY_DS2438”…””}”(hjIhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hjFubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhjAubjE)”}”(hhh]”h¸)”}”(hŒ0x26”h]”hŒ0x26”…””}”(hj`hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hj]ubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhjAubeh}”(h]”h ]”h"]”h$]”h&]”uh1j?hj<ubah}”(h]”h ]”h"]”h$]”h&]”uh1j:hj!ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1jhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÿhŸh¶h K hhüubah}”(h]”h ]”h"]”h$]”h&]”uh1húhh£hžhhŸh¶h Nubh¸)”}”(hŒ-Author: Mariusz Bialonczyk ”h]”(hŒAuthor: Mariusz Bialonczyk <”…””}”(hjŸhžhhŸNh NubhŒ reference”“”)”}”(hŒmanio@skyboo.net”h]”hŒmanio@skyboo.net”…””}”(hj©hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:manio@skyboo.net”uh1j§hjŸubhŒ>”…””}”(hjŸhžhhŸNh Nubeh}”(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 Kubh¸)”}”(hXYThe DS2438 chip provides several functions that are desirable to carry in a battery pack. It also has a 40 bytes of nonvolatile EEPROM. Because the ability of temperature, current and voltage measurement, the chip is also often used in weather stations and applications such as: rain gauge, wind speed/direction measuring, humidity sensing, etc.”h]”hXYThe DS2438 chip provides several functions that are desirable to carry in a battery pack. It also has a 40 bytes of nonvolatile EEPROM. Because the ability of temperature, current and voltage measurement, the chip is also often used in weather stations and applications such as: rain gauge, wind speed/direction measuring, humidity sensing, etc.”…””}”(hjÔhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KhjÃhžhubh¸)”}”(hŒqCurrent support is provided through the following sysfs files (all files except "iad" and "offset" are readonly):”h]”hŒyCurrent support is provided through the following sysfs files (all files except “iad†and “offset†are readonly):”…””}”(hjâhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KhjÃhžhubeh}”(h]”Œ description”ah ]”h"]”Œ description”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ"iad"”h]”hŒ “iad—…””}”(hjûhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjøhžhhŸh¶h Kubh¸)”}”(hX%This file controls the 'Current A/D Control Bit' (IAD) in the Status/Configuration Register. Writing a zero value will clear the IAD bit and disables the current measurements. Writing value "1" is setting the IAD bit (enables the measurements). The IAD bit is enabled by default in the DS2438.”h]”hX-This file controls the ‘Current A/D Control Bit’ (IAD) in the Status/Configuration Register. Writing a zero value will clear the IAD bit and disables the current measurements. Writing value “1†is setting the IAD bit (enables the measurements). The IAD bit is enabled by default in the DS2438.”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khjøhžhubh¸)”}”(hŒ•When writing to sysfs file bits 2-7 are ignored, so it's safe to write ASCII. An I/O error is returned when there is a problem setting the new value.”h]”hŒ—When writing to sysfs file bits 2-7 are ignored, so it’s safe to write ASCII. An I/O error is returned when there is a problem setting the new value.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K$hjøhžhubeh}”(h]”Œiad”ah ]”h"]”Œ"iad"”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ"page0"”h]”hŒ “page0—…””}”(hj0hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj-hžhhŸh¶h K(ubh¸)”}”(hXLThis file provides full 8 bytes of the chip Page 0 (00h). This page contains the most frequently accessed information of the DS2438. Internally when this file is read, the additional CRC byte is also obtained from the slave device. If it is correct, the 8 bytes page data are passed to userspace, otherwise an I/O error is returned.”h]”hXLThis file provides full 8 bytes of the chip Page 0 (00h). This page contains the most frequently accessed information of the DS2438. Internally when this file is read, the additional CRC byte is also obtained from the slave device. If it is correct, the 8 bytes page data are passed to userspace, otherwise an I/O error is returned.”…””}”(hj>hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K)hj-hžhubeh}”(h]”Œpage0”ah ]”h"]”Œ"page0"”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K(ubh¢)”}”(hhh]”(h§)”}”(hŒ"page1"”h]”hŒ “page1—…””}”(hjWhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjThžhhŸh¶h K0ubh¸)”}”(hXWThis file provides full 8 bytes of the chip Page 1 (01h). This page contains the ICA, elapsed time meter and current offset data of the DS2438. Internally when this file is read, the additional CRC byte is also obtained from the slave device. If it is correct, the 8 bytes page data are passed to userspace, otherwise an I/O error is returned.”h]”hXWThis file provides full 8 bytes of the chip Page 1 (01h). This page contains the ICA, elapsed time meter and current offset data of the DS2438. Internally when this file is read, the additional CRC byte is also obtained from the slave device. If it is correct, the 8 bytes page data are passed to userspace, otherwise an I/O error is returned.”…””}”(hjehžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K1hjThžhubeh}”(h]”Œpage1”ah ]”h"]”Œ"page1"”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K0ubh¢)”}”(hhh]”(h§)”}”(hŒ"offset"”h]”hŒ “offset—…””}”(hj~hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj{hžhhŸh¶h K8ubh¸)”}”(hXbThis file controls the 2-byte Offset Register of the chip. Writing a 2-byte value will change the Offset Register, which changes the current measurement done by the chip. Changing this register to the two's complement of the current register while forcing zero current through the load will calibrate the chip, canceling offset errors in the current ADC.”h]”hXdThis file controls the 2-byte Offset Register of the chip. Writing a 2-byte value will change the Offset Register, which changes the current measurement done by the chip. Changing this register to the two’s complement of the current register while forcing zero current through the load will calibrate the chip, canceling offset errors in the current ADC.”…””}”(hjŒhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K9hj{hžhubeh}”(h]”Œoffset”ah ]”h"]”Œ"offset"”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K8ubh¢)”}”(hhh]”(h§)”}”(hŒ "temperature"”h]”hŒ“temperature—…””}”(hj¥hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj¢hžhhŸh¶h KAubh¸)”}”(hŒÈOpening and reading this file initiates the CONVERT_T (temperature conversion) command of the chip, afterwards the temperature is read from the device registers and provided as an ASCII decimal value.”h]”hŒÈOpening and reading this file initiates the CONVERT_T (temperature conversion) command of the chip, afterwards the temperature is read from the device registers and provided as an ASCII decimal value.”…””}”(hj³hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KBhj¢hžhubh¸)”}”(hŒdImportant: The returned value has to be divided by 256 to get a real temperature in degrees Celsius.”h]”hŒdImportant: The returned value has to be divided by 256 to get a real temperature in degrees Celsius.”…””}”(hjÁhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KFhj¢hžhubeh}”(h]”Œ temperature”ah ]”h"]”Œ "temperature"”ah$]”h&]”uh1h¡hh£hžhhŸh¶h KAubh¢)”}”(hhh]”(h§)”}”(hŒ "vad", "vdd"”h]”hŒ“vadâ€, “vdd—…””}”(hjÚhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj×hžhhŸh¶h KJubh¸)”}”(hŒ_Opening and reading this file initiates the CONVERT_V (voltage conversion) command of the chip.”h]”hŒ_Opening and reading this file initiates the CONVERT_V (voltage conversion) command of the chip.”…””}”(hjèhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KKhj×hžhubh¸)”}”(hŒMDepending on a sysfs filename a different input for the A/D will be selected:”h]”hŒMDepending on a sysfs filename a different input for the A/D will be selected:”…””}”(hjöhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KNhj×hžhubhû)”}”(hhh]”(j)”}”(hŒ$vad: general purpose A/D input (VAD)”h]”(j)”}”(hŒvad:”h]”hŒvad:”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h KPhjubj)”}”(hhh]”h¸)”}”(hŒgeneral purpose A/D input (VAD)”h]”hŒgeneral purpose A/D input (VAD)”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KQhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÿhŸh¶h KPhjubj)”}”(hŒvdd: battery input (VDD) ”h]”(j)”}”(hŒvdd:”h]”hŒvdd:”…””}”(hj:hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h KShj6ubj)”}”(hhh]”h¸)”}”(hŒbattery input (VDD)”h]”hŒbattery input (VDD)”…””}”(hjKhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KShjHubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj6ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÿhŸh¶h KShjhžhubeh}”(h]”h ]”h"]”h$]”h&]”uh1húhj×hžhhŸh¶h Nubh¸)”}”(hŒ}After the voltage conversion the value is returned as decimal ASCII. Note: To get a volts the value has to be divided by 100.”h]”hŒ}After the voltage conversion the value is returned as decimal ASCII. Note: To get a volts the value has to be divided by 100.”…””}”(hjkhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KUhj×hžhubeh}”(h]”Œvad-vdd”ah ]”h"]”Œ "vad", "vdd"”ah$]”h&]”uh1h¡hh£hžhhŸh¶h KJubeh}”(h]”Œkernel-driver-w1-ds2438”ah ]”h"]”Œkernel driver w1_ds2438”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”jDŒ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ƒjõjòj*j'jQjNjxjujŸjœjÔjÑj~j{uŒ nametypes”}”(j†‰jõ‰j*‰jQ‰jx‰jŸ‰jÔ‰j~‰uh}”(jƒh£jòjÃj'jøjNj-jujTjœj{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.