Hi Abhishek, I'm sorry to keep you waiting. > You have me convinced on the "failing loudly" part but I'm still > confused about the "how". > > Making sure we always check versions to access the bits makes me think > we need wrappers on casting to the rightly versioned connector status. > Should we be versioning access for everything that's not in UCSI 1.2 > then? > > Example: > > struct ucsi_connector_status_raw { > u8 bytes[19]; > }; > > struct ucsi_connector_status_v1 { > ... > }; > > struct ucsi_connector_status_v2 { > ... > }; > > struct ucsi_connector_status_v1* get_connector_status_v1(struct > ucsi_connector *con) { > return (struct ucsi_connector_status_v1 *)con->raw_status; > } > > struct ucsi_connector_status_v2* get_connector_status_v2(struct > ucsi_connector *con) { > return con->ucsi->version >= UCSI_VERSION_2_0 ? (struct > ucsi_connector_status_v2 *)&con->raw_status : NULL; > } > > /* Read all bits supported by the current version. */ > int ucsi_read_connector_status(struct ucsi_connector *con, struct > ucsi_connector_status_raw *raw_conn_status); I'll take a look at this next week. Right now I have to focus on other tasks. Br, -- heikki