Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756665AbdDPT1z (ORCPT ); Sun, 16 Apr 2017 15:27:55 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34339 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756597AbdDPT1w (ORCPT ); Sun, 16 Apr 2017 15:27:52 -0400 To: Heikki Krogerus Cc: Guenter Roeck , Felipe Balbi , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org From: Mats Karrman Subject: usb: typec: Missing link for altmode active store Message-ID: <6d138cdd-de75-c58b-623f-1296039a2585@gmail.com> Date: Sun, 16 Apr 2017 21:28:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 649 Lines: 18 Hello Heikki, I'm working with the new typec class code and have run into a problem. The struct typec_capability defines a callback function as: int (*activate_mode)(const struct typec_capability *, int mode, int activate); From the capability I can get to the corresponding port/plug/partner private data and to the svid's registered for that device. The mode argument tells me which of the modes registered for a svid that is to be (de)activated. However, as far as I can tell there is no way for activate_mode() to find out which svid is in question without an additional argument, e.g. "u16 svid". Please correct me if I'm wrong. BR, Mats