Hi > > I been thinking about this. Perhaps it's better that we don't read any > properties in these helpers. These helpers become more useful that way, and > we can use the in other places as well if needed. > > So my proposal is that the callers of these functions are responsible of reading > the property values. Here we just convert the strings to > values: > > int typec_find_preferred_role(const char *name) { > return match_string(typec_roles, ARRAY_SIZE(typec_roles), name); } > EXPORT_SYMBOL_GPL(typec_find_preferred_role); > > int typec_find_power_role(const char *name) { > return match_string(typec_port_types, ARRAY_SIZE(typec_data_types), > name); > } > EXPORT_SYMBOL_GPL(typec_find_data_role); > > int typec_find_data_role(const char *name) { > return match_string(typec_data_types, ARRAY_SIZE(typec_data_types), > name); > } > EXPORT_SYMBOL_GPL(typec_find_data_role); > A better idea for basic typec class, thanks, I will change to be this proposal in v4. Jun > > Thanks, > > -- > heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html