You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: top_earlgrey.rs
    path of file: ./repos/tock/chips/earlgrey/src/registers
    
    the code of the file until where you have to start completion: // Licensed under the Apache License, Version 2.0 or the MIT License.
// SPDX-License-Identifier: Apache-2.0 OR MIT
// Copyright lowRISC contributors 2023.

// Built for Earlgrey-M2.5.1-RC1-493-ged
    
    fn try_from(val: u32) -> Result<Self, Self::Error> {
        match val {
            0 => Ok(Self::UsbdevUsbDp),
            1 => Ok(Self::UsbdevUsbDn),
            2 => Ok(Self::SpiHost0Sd0),
            3 => Ok(Self::SpiHost0Sd1),
            4 => Ok(Self::SpiHost0Sd2),
            5 => Ok(Self::SpiHost0Sd3),
            6 => Ok(Self::SpiDeviceSd0),
            7 => Ok(Self::SpiDeviceSd1),
            8 => Ok(Self::SpiDeviceSd2),
            9 => Ok(Self::SpiDeviceSd3),
            10 => Ok(Self::SysrstCtrlAonEcRstL),
            11 => Ok(Self::SysrstCtrlAonFlashWpL),
            12 => Ok(Self::SpiDeviceSck),
            13 => Ok(Self::SpiDeviceCsb),
            14 => Ok(Self::SpiHost0Sck),
            15 => Ok(Self::SpiHost0Csb),
            _ => Err(val),
        }
    }