Hi Greg,
On Mon, Nov 14, 2016 at 10:51:48AM +0100, Greg KH wrote:
On Mon, Sep 19, 2016 at 02:16:56PM +0300, Heikki Krogerus wrote:
The purpose of USB Type-C connector class is to provide
unified interface for the user space to get the status and
basic information about USB Type-C connectors on a system,
control over data role swapping, and when the port supports
USB Power Delivery, also control over power role swapping
and Alternate Modes.
Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
+
+int typec_connect(struct typec_port *port, struct typec_connection *con)
+{
+ int ret;
+
+ if (!con->partner && !con->cable)
+ return -EINVAL;
+
+ port->connected = 1;
+ port->data_role = con->data_role;
+ port->pwr_role = con->pwr_role;
+ port->vconn_role = con->vconn_role;
+ port->pwr_opmode = con->pwr_opmode;
+
+ kobject_uevent(&port->dev.kobj, KOBJ_CHANGE);
This worries me. Who is listening for it? What will you do with it?
Shouldn't you just poll on an attribute file instead?
Oliver! Did you need this or can we remove it?