device: Add functions to read/write raw configuration data.