€•í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/driver-api/surface_aggregator/overview”Œ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/driver-api/surface_aggregator/overview”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ:/translations/it_IT/driver-api/surface_aggregator/overview”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ:/translations/ja_JP/driver-api/surface_aggregator/overview”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ:/translations/ko_KR/driver-api/surface_aggregator/overview”Œ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/driver-api/surface_aggregator/overview”Œ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ŸŒT/var/lib/git/docbuild/linux/Documentation/driver-api/surface_aggregator/overview.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒOverview”h]”hŒOverview”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ paragraph”“”)”}”(hXKThe Surface/System Aggregator Module (SAM, SSAM) is an (arguably *the*) embedded controller (EC) on Microsoft Surface devices. It has been originally introduced on 4th generation devices (Surface Pro 4, Surface Book 1), but its responsibilities and feature-set have since been expanded significantly with the following generations.”h]”(hŒAThe Surface/System Aggregator Module (SAM, SSAM) is an (arguably ”…””}”(hhËhžhhŸNh NubhŒemphasis”“”)”}”(hŒ*the*”h]”hŒthe”…””}”(hhÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhhËubhX) embedded controller (EC) on Microsoft Surface devices. It has been originally introduced on 4th generation devices (Surface Pro 4, Surface Book 1), but its responsibilities and feature-set have since been expanded significantly with the following generations.”…””}”(hhËhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhµ)”}”(hhh]”(hº)”}”(hŒFeatures and Integration”h]”hŒFeatures and Integration”…””}”(hhðhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhíhžhhŸh³h KubhÊ)”}”(hXÝNot much is currently known about SAM on 4th generation devices (Surface Pro 4, Surface Book 1), due to the use of a different communication interface between host and EC (as detailed below). On 5th (Surface Pro 2017, Surface Book 2, Surface Laptop 1) and later generation devices, SAM is responsible for providing battery information (both current status and static values, such as maximum capacity etc.), as well as an assortment of temperature sensors (e.g. skin temperature) and cooling/performance-mode setting to the host. On the Surface Book 2, specifically, it additionally provides an interface for properly handling clipboard detachment (i.e. separating the display part from the keyboard part of the device), on the Surface Laptop 1 and 2 it is required for keyboard HID input. This HID subsystem has been restructured for 7th generation devices and on those, specifically Surface Laptop 3 and Surface Book 3, is responsible for all major HID input (i.e. keyboard and touchpad).”h]”hXÝNot much is currently known about SAM on 4th generation devices (Surface Pro 4, Surface Book 1), due to the use of a different communication interface between host and EC (as detailed below). On 5th (Surface Pro 2017, Surface Book 2, Surface Laptop 1) and later generation devices, SAM is responsible for providing battery information (both current status and static values, such as maximum capacity etc.), as well as an assortment of temperature sensors (e.g. skin temperature) and cooling/performance-mode setting to the host. On the Surface Book 2, specifically, it additionally provides an interface for properly handling clipboard detachment (i.e. separating the display part from the keyboard part of the device), on the Surface Laptop 1 and 2 it is required for keyboard HID input. This HID subsystem has been restructured for 7th generation devices and on those, specifically Surface Laptop 3 and Surface Book 3, is responsible for all major HID input (i.e. keyboard and touchpad).”…””}”(hhþhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KhhíhžhubhÊ)”}”(hXWhile features have not changed much on a coarse level since the 5th generation, internal interfaces have undergone some rather large changes. On 5th and 6th generation devices, both battery and temperature information is exposed to ACPI via a shim driver (referred to as Surface ACPI Notify, or SAN), translating ACPI generic serial bus write-/read-accesses to SAM requests. On 7th generation devices, this additional layer is gone and these devices require a driver hooking directly into the SAM interface. Equally, on newer generations, less devices are declared in ACPI, making them a bit harder to discover and requiring us to hard-code a sort of device registry. Due to this, a SSAM bus and subsystem with client devices (:c:type:`struct ssam_device `) has been implemented.”h]”(hXØWhile features have not changed much on a coarse level since the 5th generation, internal interfaces have undergone some rather large changes. On 5th and 6th generation devices, both battery and temperature information is exposed to ACPI via a shim driver (referred to as Surface ACPI Notify, or SAN), translating ACPI generic serial bus write-/read-accesses to SAM requests. On 7th generation devices, this additional layer is gone and these devices require a driver hooking directly into the SAM interface. Equally, on newer generations, less devices are declared in ACPI, making them a bit harder to discover and requiring us to hard-code a sort of device registry. Due to this, a SSAM bus and subsystem with client devices (”…””}”(hj hžhhŸNh Nubh)”}”(hŒ*:c:type:`struct ssam_device `”h]”hŒliteral”“”)”}”(hjh]”hŒstruct ssam_device”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(Œxref”Œc”Œc-type”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ&driver-api/surface_aggregator/overview”Œ refdomain”j%Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰Œ reftarget”Œ ssam_device”uh1hhŸh³h K hj ubhŒ) has been implemented.”…””}”(hj hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K hhíhžhubeh}”(h]”Œfeatures-and-integration”ah ]”h"]”Œfeatures and integration”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ Communication”h]”hŒ Communication”…””}”(hjNhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjKhžhhŸh³h K.ubhÊ)”}”(hX!The type of communication interface between host and EC depends on the generation of the Surface device. On 4th generation devices, host and EC communicate via HID, specifically using a HID-over-I2C device, whereas on 5th and later generations, communication takes place via a USART serial device. In accordance to the drivers found on other operating systems, we refer to the serial device and its driver as Surface Serial Hub (SSH). When needed, we differentiate between both types of SAM by referring to them as SAM-over-SSH and SAM-over-HID.”h]”hX!The type of communication interface between host and EC depends on the generation of the Surface device. On 4th generation devices, host and EC communicate via HID, specifically using a HID-over-I2C device, whereas on 5th and later generations, communication takes place via a USART serial device. In accordance to the drivers found on other operating systems, we refer to the serial device and its driver as Surface Serial Hub (SSH). When needed, we differentiate between both types of SAM by referring to them as SAM-over-SSH and SAM-over-HID.”…””}”(hj\hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K0hjKhžhubhÊ)”}”(hX,Currently, this subsystem only supports SAM-over-SSH. The SSH communication interface is described in more detail below. The HID interface has not been reverse engineered yet and it is, at the moment, unclear how many (and which) concepts of the SSH interface detailed below can be transferred to it.”h]”hX,Currently, this subsystem only supports SAM-over-SSH. The SSH communication interface is described in more detail below. The HID interface has not been reverse engineered yet and it is, at the moment, unclear how many (and which) concepts of the SSH interface detailed below can be transferred to it.”…””}”(hjjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K9hjKhžhubhµ)”}”(hhh]”(hº)”}”(hŒSurface Serial Hub”h]”hŒSurface Serial Hub”…””}”(hj{hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjxhžhhŸh³h K@ubhÊ)”}”(hXŒAs already elaborated above, the Surface Serial Hub (SSH) is the communication interface for SAM on 5th- and all later-generation Surface devices. On the highest level, communication can be separated into two main types: Requests, messages sent from host to EC that may trigger a direct response from the EC (explicitly associated with the request), and events (sometimes also referred to as notifications), sent from EC to host without being a direct response to a previous request. We may also refer to requests without response as commands. In general, events need to be enabled via one of multiple dedicated requests before they are sent by the EC.”h]”hXŒAs already elaborated above, the Surface Serial Hub (SSH) is the communication interface for SAM on 5th- and all later-generation Surface devices. On the highest level, communication can be separated into two main types: Requests, messages sent from host to EC that may trigger a direct response from the EC (explicitly associated with the request), and events (sometimes also referred to as notifications), sent from EC to host without being a direct response to a previous request. We may also refer to requests without response as commands. In general, events need to be enabled via one of multiple dedicated requests before they are sent by the EC.”…””}”(hj‰hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KBhjxhžhubhÊ)”}”(hŒÕSee Documentation/driver-api/surface_aggregator/ssh.rst for a more technical protocol documentation and Documentation/driver-api/surface_aggregator/internal.rst for an overview of the internal driver architecture.”h]”hŒÕSee Documentation/driver-api/surface_aggregator/ssh.rst for a more technical protocol documentation and Documentation/driver-api/surface_aggregator/internal.rst for an overview of the internal driver architecture.”…””}”(hj—hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KLhjxhžhubeh}”(h]”Œsurface-serial-hub”ah ]”h"]”Œsurface serial hub”ah$]”h&]”uh1h´hjKhžhhŸh³h K@ubeh}”(h]”Œ communication”ah ]”h"]”Œ communication”ah$]”h&]”uh1h´hh¶hžhhŸh³h K.ubeh}”(h]”Œoverview”ah ]”h"]”Œoverview”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·jHjEj²j¯jªj§uŒ nametypes”}”(jº‰jH‰j²‰jª‰uh}”(j·h¶jEhíj¯jKj§jxuŒ 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.