From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752491AbcF1N3H (ORCPT ); Tue, 28 Jun 2016 09:29:07 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:60562 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752368AbcF1N3F (ORCPT ); Tue, 28 Jun 2016 09:29:05 -0400 Subject: Re: [PATCHv3 1/2] usb: USB Type-C connector class To: Heikki Krogerus References: <1466520711-125758-1-git-send-email-heikki.krogerus@linux.intel.com> <1466520711-125758-2-git-send-email-heikki.krogerus@linux.intel.com> <20160627095120.GC20801@kuha.fi.intel.com> <20160627121321.GD20801@kuha.fi.intel.com> <57712CA2.1020408@roeck-us.net> <20160628131241.GB3378@kuha.fi.intel.com> Cc: Rajaram R , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Oliver Neukum From: Guenter Roeck Message-ID: <57727B89.7040802@roeck-us.net> Date: Tue, 28 Jun 2016 06:28:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160628131241.GB3378@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 On 06/28/2016 06:12 AM, Heikki Krogerus wrote: > On Mon, Jun 27, 2016 at 06:39:46AM -0700, Guenter Roeck wrote: >> On 06/27/2016 05:13 AM, Heikki Krogerus wrote: >>> Hi, >>> >>> On Mon, Jun 27, 2016 at 03:51:08PM +0530, Rajaram R wrote: >>>> May be I am missing user or usage of the driver.. I see this driver is >>>> providing limited information of the Type-C connectors or the port >>>> partner >>> >>> Yes, this interface can't provide directly information received from >>> PD commands like Discover Identity. We will have to present the >>> partners even when USB PD is not supported and in a consistent >>> fashion. Some details will be available in any case indirectly. Like >>> if there are modes, there will be devices presenting them, and the >>> product type in case of partners will be the partner type. >>> >>> But there are a couple of attributes I have been thinking about adding >>> for the partners: >>> >>> supported_data_roles >>> supports_usb_power_delivery >>> >>> The supported data roles would respond bits 30 and 31 of the ID Header >>> VDO. But when the partner does not support USB PD, we will have to >>> report "unknown" in it. >>> >> >> Or make the attribute invisible in that case. > > Well, why not. I did not like the idea of hiding an attribute > previously. I preferred to have an attribute always available, unless > there was a single and clear way to determine the cases where any of > the attributes for example with our partners would be visible or not.. > But who cares. > It would be visible if supports_usb_power_delivery is true. Doesn't that match your requirements ? >>> Oliver, Guenter! How do you guys feel about those? Is there any use >>> for them? >>> >> Definitely good for debugging and informational. On the top of my head, >> I don't immediately see what a user would do with it, though, but then >> it would not hurt either to have the information. >> >> I keep wondering if it would make sense to directly expose the ID header >> VDO, similar to the alternate mode VDOs, in the partner node. > > Yes, it makes sense. I'll add an attribute for that. > > But since you proposed hiding the attributes, I'll add an attribute > "supports_usb_power_deliver" in any case, and make the vdo attribute > visible only if it returs 1. I'll also make the "accessory" attribute > visible only in case the partner type is accessory. > Ok with me. Thanks, Guenter