|  | 
| 6 | 6 | { | 
| 7 | 7 |   options.hardware = { | 
| 8 | 8 |     raspberry-pi."4".dwc2 = { | 
| 9 |  | -      enable = lib.mkEnableOption '' | 
| 10 |  | -        Enable the UDC controller to support USB OTG gadget functions. | 
|  | 9 | +      enable = lib.mkOption { | 
|  | 10 | +        type = lib.types.bool; | 
|  | 11 | +        default = false; | 
|  | 12 | +        example = true; | 
|  | 13 | +        description = '' | 
|  | 14 | +          Enable the UDC controller to support USB OTG gadget functions. | 
| 11 | 15 | 
 | 
| 12 |  | -        In order to verify that this works, connect the Raspberry Pi with | 
| 13 |  | -        another computer via the USB C cable, and then do one of: | 
|  | 16 | +          In order to verify that this works, connect the Raspberry Pi with | 
|  | 17 | +          another computer via the USB C cable, and then do one of: | 
| 14 | 18 | 
 | 
| 15 |  | -        - `modprobe g_serial` | 
| 16 |  | -        - `modprobe g_mass_storage file=/path/to/some/iso-file.iso` | 
|  | 19 | +          - `modprobe g_serial` | 
|  | 20 | +          - `modprobe g_mass_storage file=/path/to/some/iso-file.iso` | 
| 17 | 21 | 
 | 
| 18 |  | -        On the Raspberry Pi, `dmesg` should then show success-indicating output | 
| 19 |  | -        that is related to the dwc2 and g_serial/g_mass_storage modules. | 
| 20 |  | -        On the other computer, a serial/mass-storage device should pop up in | 
| 21 |  | -        the system logs. | 
|  | 22 | +          On the Raspberry Pi, `dmesg` should then show success-indicating output | 
|  | 23 | +          that is related to the dwc2 and g_serial/g_mass_storage modules. | 
|  | 24 | +          On the other computer, a serial/mass-storage device should pop up in | 
|  | 25 | +          the system logs. | 
| 22 | 26 | 
 | 
| 23 |  | -        For more information about what gadget functions exist along with handy | 
| 24 |  | -        guides on how to test them, please refer to: | 
| 25 |  | -        https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt | 
| 26 |  | -      ''; | 
|  | 27 | +          For more information about what gadget functions exist along with handy | 
|  | 28 | +          guides on how to test them, please refer to: | 
|  | 29 | +          https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt | 
|  | 30 | +        ''; | 
|  | 31 | +      }; | 
| 27 | 32 |       dr_mode = lib.mkOption { | 
| 28 | 33 |         type = lib.types.enum [ | 
| 29 | 34 |           "host" | 
|  | 
0 commit comments