Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753268AbcKNOem (ORCPT ); Mon, 14 Nov 2016 09:34:42 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:49645 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752522AbcKNOek (ORCPT ); Mon, 14 Nov 2016 09:34:40 -0500 Subject: Re: [PATHCv10 1/2] usb: USB Type-C connector class To: Heikki Krogerus , Greg KH References: <20160919111657.22127-1-heikki.krogerus@linux.intel.com> <20160919111657.22127-2-heikki.krogerus@linux.intel.com> <20161114095148.GA10306@kroah.com> <20161114123235.GD22706@kuha.fi.intel.com> Cc: Oliver Neukum , Felipe Balbi , Bin Gao , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org From: Guenter Roeck Message-ID: <97125354-6634-9d2b-983b-83f73faf1078@roeck-us.net> Date: Mon, 14 Nov 2016 06:34:37 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20161114123235.GD22706@kuha.fi.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1398 Lines: 43 On 11/14/2016 04:32 AM, Heikki Krogerus wrote: > 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 >>> Tested-by: Guenter Roeck >>> Signed-off-by: Heikki Krogerus [ ... ] >>> + >>> +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? > I'll also have to make sure that the Android folks don't use it. Guenter