Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4420291ioa; Wed, 27 Apr 2022 03:34:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhFy/byz3r3oT+o/1V907nEi5svY2S8320TeT7Ly0DWakjKjE/3/QuyWOYeDPTRDL1svmd X-Received: by 2002:a17:903:2012:b0:15d:2c7b:696a with SMTP id s18-20020a170903201200b0015d2c7b696amr10798292pla.41.1651055641742; Wed, 27 Apr 2022 03:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651055641; cv=none; d=google.com; s=arc-20160816; b=Ti6N/jwbKBf4FA5s2FCfmLtzS2alI7A4LNrDI+qkDLuI5ScDEFsTPft6p1suvkmGc3 ssjNTqJSPeWpYAOjDSWKsk77M98BEbWlKq9ZOleSmpZDOE0Vuc2SVCi7xYr0fyOTwpHV Y6LmL/v+5ThMroPh/cQD36+Gv294lUkF7bDkaDPyvTI3dEo5pGsxi9fdkecODeZDz2xI UYBi/mlqfVlY57s7SqWaha9bbi63nISn5Kttl/TCM+nKE4awp+riU+23IZmpth/RJ4jo ARNi7Fvqo4r3S3IOqeDn12MQ1fmWaxHfMFUQ1A1LnhZqsheg+N24Se5WbSbMv+LO8kHn 5O4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=gtJAxLOQgrMmX0jWzFakONkF7P6sHoAQWH61J9RzsI8=; b=jqXnY61ByQSShfsBHIjB23fQ+Wcxt6oN105aAQ9c3dULj0dg2JglrVusf7O/jq8Q3H NhAhENtdhCOJRGDcPwoIgjKUce20dgAEeBLHEHLm+tra3DjjFoLZJMqtoKUhpKu7ZZFc hLTTzSKTZavZ3VN/HTK6AhiaQ6vCs8Gk7GPRIztJ87sZIEtkRwZUcGvUTTwKHJ74WksK 7ITZ3IA9coYm9Aw7k/RElllPk/p0FPLzIthr99sU6PeYJW2500WIjMDG3uRuW3KPv4HC RKjQvDV/zLFHINe16MSAFVonUyfCOwtEKMs5YduNH/WrgzkZTO8wzTXGSImHsSj7fLFh jpYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=bgu5Bgf4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id mu1-20020a17090b388100b001d25dfb9c5dsi1527963pjb.173.2022.04.27.03.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=bgu5Bgf4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A69573BA9AF; Wed, 27 Apr 2022 02:46:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343658AbiDZKCU (ORCPT + 99 others); Tue, 26 Apr 2022 06:02:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346935AbiDZKBh (ORCPT ); Tue, 26 Apr 2022 06:01:37 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36916326D5 for ; Tue, 26 Apr 2022 02:20:28 -0700 (PDT) Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220426092025epoutp04b5d7c001761d0c060e66574503ba36cf~pZ8MG7o9G0515205152epoutp043 for ; Tue, 26 Apr 2022 09:20:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220426092025epoutp04b5d7c001761d0c060e66574503ba36cf~pZ8MG7o9G0515205152epoutp043 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1650964825; bh=gtJAxLOQgrMmX0jWzFakONkF7P6sHoAQWH61J9RzsI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bgu5Bgf4OyBF4N0aJBlcQfpYZiB0YEXsu9hVZwunyIvZc0i+E3Zx/r1RqK5VmoMNa jeVIqiLrRGJftWceNMStCc1Yk6zkTsl8eizQe2f2U/KVvvtpcfKf/u3egblj0jM8Ak HLtsUM+BttcvHf/i2QCSjd1vFpCuDthllX8Qx5mU= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20220426092025epcas2p3d14f3e24838f8a8d88c8bf0acfe656df~pZ8Lg1Q3S0586405864epcas2p3D; Tue, 26 Apr 2022 09:20:25 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.36.89]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4KnbvW100Sz4x9Q1; Tue, 26 Apr 2022 09:20:23 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id B7.27.10028.659B7626; Tue, 26 Apr 2022 18:20:23 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20220426092022epcas2p2c016c83b21e41c7bcd4bdfbb95e464c0~pZ8JPwIwa1542715427epcas2p2g; Tue, 26 Apr 2022 09:20:22 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220426092022epsmtrp2b8129b54ca939ed0c966fdb4b2b8809f~pZ8JOcLlR1198711987epsmtrp2E; Tue, 26 Apr 2022 09:20:22 +0000 (GMT) X-AuditID: b6c32a47-589ff7000000272c-61-6267b956c9f2 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 3A.63.08853.659B7626; Tue, 26 Apr 2022 18:20:22 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [10.229.95.128]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220426092022epsmtip2bc7ea80debbb111994c4354b8e3a6851~pZ8JFUHWS2696726967epsmtip2A; Tue, 26 Apr 2022 09:20:22 +0000 (GMT) From: Daehwan Jung To: Mathias Nyman , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org (open list:USB XHCI DRIVER), linux-kernel@vger.kernel.org (open list), Howard Yen , Jack Pham , Puma Hsu , "J . Avila" , Daehwan Jung , sc.suh@samsung.com, Krzysztof Kozlowski Subject: [PATCH v4 4/5] usb: host: add some to xhci overrides for xhci-exynos Date: Tue, 26 Apr 2022 18:18:47 +0900 Message-Id: <1650964728-175347-5-git-send-email-dh10.jung@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1650964728-175347-1-git-send-email-dh10.jung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBKsWRmVeSWpSXmKPExsWy7bCmmW74zvQkg4O7mCzuLJjGZPHkyCJ2 i+bF69ksrv95z2jR/vwCm8XGtz+YLC7vmsNmsWhZK7NF86YprBYz1ypbdN29wejA7TGroZfN 43JfL5PHgk2lHov3v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rXc 97KxptKTJo/lfyeKulz4efQp68L5b/cosRRnJBpqMRcVJwIA8rkpfAsEAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrALMWRmVeSWpSXmKPExsWy7bCSvG7YzvQkg4nnlS3uLJjGZPHkyCJ2 i+bF69ksrv95z2jR/vwCm8XGtz+YLC7vmsNmsWhZK7NF86YprBYz1ypbdN29wejA7TGroZfN 43JfL5PHgk2lHov3vGTy2D93DbtH35ZVjB6fN8kFsEdx2aSk5mSWpRbp2yVwZTx/0cpecFew 4vicXawNjP/5uhg5OSQETCTunnjLAmILCexmlJj+pAAiLimxdO4NdghbWOJ+yxHWLkYuoJpv jBIvv58BSnBwsAloSXxfyAhSIyIQJ7Hi8h6wOcwCb5gkru5OArGFBXwl/pzazApSziKgKvFt pS1ImFfATWLGjEdsEOPlJG6e62QGsTkF3CVe9CxihzjHTWLyiutMExj5FjAyrGKUTC0ozk3P LTYsMMxLLdcrTswtLs1L10vOz93ECA5ULc0djNtXfdA7xMjEwXiIUYKDWUmEd6pqWpIQb0pi ZVVqUX58UWlOavEhRmkOFiVx3gtdJ+OFBNITS1KzU1MLUotgskwcnFINTFHv25MMz6+4M11f Iv47U3f2KblPwo3uL+d29RlZ2ib0nznVtHC7+k/e8G0pHy6bHuaqUBa2MHjGeahCzk2UO/bS qwIt/6PscpNKul8yKZ/cFyx97tD8bZwxhu0rlyx/qPKJ9yWbzjX5x8fLftt8Vb+ZJhj0TG3v Sa6TRvxMjw5P37J1JuOCeu7eu1+L/9bpTPnTsvjtD79NlzhfTV8scOrc4s2bLfYxyxz68Mwk 6K//pbmT2w+65AsVJhqv6Zrd1cNhkL4s74tixFmui1YvT3080v7liMOPl9lCoaxusfYCge+Z V6xtsEm6mBW0Osdk15uyOxabAs7rZWVuEM8OW+nfPSuZ5ewZv+DfZzfMKlZiKc5INNRiLipO BADwruL+wwIAAA== X-CMS-MailID: 20220426092022epcas2p2c016c83b21e41c7bcd4bdfbb95e464c0 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220426092022epcas2p2c016c83b21e41c7bcd4bdfbb95e464c0 References: <1650964728-175347-1-git-send-email-dh10.jung@samsung.com> X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Co-processor needs some information about connected usb device. It's proper to pass information after usb device gets address when getting "Set Address" command. It supports vendors to implement it using xhci overrides. There're several power scenarios depending on vendors. It gives vendors flexibilty to meet their power requirement. They can override suspend and resume of root hub. Signed-off-by: Daehwan Jung --- drivers/usb/host/xhci.c | 6 ++++++ drivers/usb/host/xhci.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 5ccf1bbe8732..8b3df1302650 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -5555,6 +5555,12 @@ void xhci_init_driver(struct hc_driver *drv, drv->check_bandwidth = over->check_bandwidth; if (over->reset_bandwidth) drv->reset_bandwidth = over->reset_bandwidth; + if (over->address_device) + drv->address_device = over->address_device; + if (over->bus_suspend) + drv->bus_suspend = over->bus_suspend; + if (over->bus_resume) + drv->bus_resume = over->bus_resume; } } EXPORT_SYMBOL_GPL(xhci_init_driver); diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 3a414a2f41f0..5bc621e77762 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1947,6 +1947,9 @@ struct xhci_driver_overrides { struct usb_host_endpoint *ep); int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); + int (*address_device)(struct usb_hcd *hcd, struct usb_device *udev); + int (*bus_suspend)(struct usb_hcd *hcd); + int (*bus_resume)(struct usb_hcd *hcd); }; #define XHCI_CFC_DELAY 10 @@ -2103,6 +2106,7 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep); int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); +int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev); int xhci_disable_slot(struct xhci_hcd *xhci, u32 slot_id); int xhci_ext_cap_init(struct xhci_hcd *xhci); -- 2.31.1