pub struct Attributes {
pub machine: Option<CString>,
pub family: Option<CString>,
pub revision: Option<CString>,
pub serial_number: Option<CString>,
pub soc_id: Option<CString>,
}Expand description
Attributes for a SoC device.
These are both exported to userspace under /sys/devices/socX and provided to other drivers to
match against via soc_device_match (not yet available in Rust) to enable quirks or
device-specific support where necessary.
All fields are freeform - they have no specific formatting, just defined meanings.
For example, the machine field could be “DB8500” or
“Qualcomm Technologies, Inc. SM8560 HDK”, but regardless it should identify a board or product.
Fields§
§machine: Option<CString>Should generally be a board ID or product ID. Examples include DB8500 (ST-Ericsson) or “Qualcomm Technologies, inc. SM8560 HDK”.
If this field is not populated, the SoC infrastructure will try to populate it from
/model in the device tree.
family: Option<CString>The broader class this SoC belongs to. Examples include ux500 (for DB8500) or Snapdragon (for SM8650).
On chips with ARM firmware supporting SMCCC v1.2+, this may be a JEDEC JEP106 manufacturer identification.
revision: Option<CString>The manufacturing revision of the part. Frequently this is MAJOR.MINOR, but not always.
serial_number: Option<CString>Serial Number - uniquely identifies a specific SoC. If present, should be unique (buying a replacement part should change it if present). This field cannot be matched on and is solely present to export through /sys.
soc_id: Option<CString>SoC ID - identifies a specific SoC kind in question, sometimes more specifically than
machine if the same SoC is used in multiple products. Some devices use this to specify a
SoC name, e.g. “I.MX??”, and others just print an ID number (e.g. Tegra and Qualcomm).
On chips with ARM firmware supporting SMCCC v1.2+, this may be a JEDEC JEP106 manufacturer identification (the family value) followed by a colon and then a 4-digit ID value.
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
slot. Read more