From patchwork Tue Mar 4 17:32:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 25713 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2BDB520540 for ; Tue, 4 Mar 2014 17:35:49 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id oz11sf13013248veb.1 for ; Tue, 04 Mar 2014 09:35:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=lZLhmoVuxAJej+jBIrS7tVen+1ei2fSmewEEqdBVwg0=; b=jApygGjkU71FH4fseTmJ3dK66bfsvwChR/rAxcCLHbP8XOT2JwCG51ejaB2iauYpOh hSUkeX3VtQuKm55R+Qd7xI9eg6k7DGs+xdYVLC9pfOJC82etHA+Sm85PhEGZYhGrbqUv R3w+yZ6vOVghfzT5nrxlyCAjf5F7bJ/PFKC1wff44RIO2Bla5K5Xd8zzW6MPM+VvTREB Qc7dXZ3TBXxfFpnmzEPHEzEgEkhV5roWxPh80A+6fZ3EHy+0+n5HC72s7ATlkWKWKXPy NVpZcU5s54jZXdYnB0u3NGKonAsmegOLDa6ggej0e3Qxg5EKQXdrX1G1sxoixprRliqO dU3A== X-Gm-Message-State: ALoCoQlpjjTrI/Y3DhDjJV7BnOPaCYsov4CuxPakTDDJlt4WPyEDhtBukXxt5udaciAP7Jb6KDHw X-Received: by 10.58.46.204 with SMTP id x12mr386103vem.19.1393954548824; Tue, 04 Mar 2014 09:35:48 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.169 with SMTP id j38ls2647096qgd.10.gmail; Tue, 04 Mar 2014 09:35:48 -0800 (PST) X-Received: by 10.220.247.68 with SMTP id mb4mr428777vcb.37.1393954548667; Tue, 04 Mar 2014 09:35:48 -0800 (PST) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id fi2si4770965vdb.49.2014.03.04.09.35.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 09:35:48 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id lf12so4669009vcb.31 for ; Tue, 04 Mar 2014 09:35:48 -0800 (PST) X-Received: by 10.220.106.7 with SMTP id v7mr499394vco.46.1393954548551; Tue, 04 Mar 2014 09:35:48 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.130.193 with SMTP id u1csp143046vcs; Tue, 4 Mar 2014 09:35:48 -0800 (PST) X-Received: by 10.66.146.229 with SMTP id tf5mr1028970pab.50.1393954547724; Tue, 04 Mar 2014 09:35:47 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7si14929365pav.246.2014.03.04.09.35.47; Tue, 04 Mar 2014 09:35:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754551AbaCDRfh (ORCPT + 3 others); Tue, 4 Mar 2014 12:35:37 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:49239 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753025AbaCDRfI (ORCPT ); Tue, 4 Mar 2014 12:35:08 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s24HYLEa004089; Tue, 4 Mar 2014 11:34:21 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s24HYKDF029340; Tue, 4 Mar 2014 11:34:21 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Tue, 4 Mar 2014 11:34:20 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s24HYJht026568; Tue, 4 Mar 2014 11:34:20 -0600 From: Felipe Balbi To: Linux USB Mailing List CC: , , , , , , , , , , Felipe Balbi Subject: [PATCH 3/4] usb: musb: gadget: switch over to endpoint feature flags Date: Tue, 4 Mar 2014 11:32:45 -0600 Message-ID: <1393954366-22987-3-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393954366-22987-1-git-send-email-balbi@ti.com> References: <1393954366-22987-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , switch over to endpoint feature flags so we can drop naming conventions. Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_gadget.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index d4aa779..f121097 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1727,14 +1727,23 @@ init_peripheral_ep(struct musb *musb, struct musb_ep *ep, u8 epnum, int is_in) ep->end_point.name = ep->name; INIT_LIST_HEAD(&ep->end_point.ep_list); if (!epnum) { + ep->end_point.has_dir_in = true; + ep->end_point.has_dir_out = true; + ep->end_point.has_control = true; usb_ep_set_maxpacket_limit(&ep->end_point, 64); ep->end_point.ops = &musb_g_ep0_ops; musb->g.ep0 = &ep->end_point; } else { - if (is_in) + if (is_in) { + ep->end_point.has_dir_in = true; usb_ep_set_maxpacket_limit(&ep->end_point, hw_ep->max_packet_sz_tx); - else + } else { + ep->end_point.has_dir_out = true; usb_ep_set_maxpacket_limit(&ep->end_point, hw_ep->max_packet_sz_rx); + } + ep->end_point.has_bulk = true; + ep->end_point.has_interrupt = true; + ep->end_point.has_isochronous = true; ep->end_point.ops = &musb_ep_ops; list_add_tail(&ep->end_point.ep_list, &musb->g.ep_list); }