Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4784935iob; Mon, 9 May 2022 01:19:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNBMJEKhC6xHeRHIzjBmDzEXsIT/3cMxaLloRW0fW4S8U9DUtvb3YYMKWdgoNWZp6eU2/w X-Received: by 2002:a63:8ac7:0:b0:3aa:fa62:5a28 with SMTP id y190-20020a638ac7000000b003aafa625a28mr12497227pgd.400.1652084370484; Mon, 09 May 2022 01:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652084370; cv=none; d=google.com; s=arc-20160816; b=yPx+ZpWo8avnRgeucnf2ubUz605v7JvaUcVP2p8drwgHjgeqGx1Suduss2pAWvEJ0E dbawOsaOOkXnQ5PXxJO0gLgLaq8KLKSjl7eP7bXLD4LBciowUpBxrsjNAiX/SoNxRZXN qUChMq7AoK6+1hxXGAnQOaeLGrvC/8RKvIFdRyh4I4xVKEqPSLGQuIqxNFarIUj9jnAA Sbax2nd3YgsFoGIjizA5YOPuIg0Drq72Kle7ITF5233anZRr3XCgp7LtV1Qkzv47MYQ9 naNl1lj9Rwb+HxHh8vUgmN+U2U1rnDAbVkft1e9qBPV0pwBR0Jy6FQKfXaq/yj/QbzCX nIVw== 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=boZqsu5x83x4yZ3yCA0TfzOorlYh1KIsxJqlRVWoJB4=; b=fAap2uXJTwF4v2U708wT4+5MeDEWoikKr0mQ2kdiSb6E02Ik9oBfRQ1G5V2j4mJjjW L7JABwXr2Ych1uVKnnSMAeAfVwys0GnlK/cY3thD8BRwA4D4y8nvCpi46bjFDNU9Tuol 23+QSl1jums5/O8YSySFPW3NOcEjPq6AtHUpBworkjCf6hKpxgB3O42nj1TxxkW9fLOI iNaxt/4tmHxxm2TX49ZVpKiTXc1czCas+YC1rp9U3qsvW+Np4zHc85HRovCrpTh3BJqQ fD9TrzmeTesn9ElpUj3bxLT1NYYquGZ9HsOumBSudr4ZxIXNCTgJK7/lT/58p8d5G9nO 1ynw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=le7o0FoH; 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 j5-20020a170902da8500b0015cfe719880si13310468plx.292.2022.05.09.01.19.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 01:19:30 -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=le7o0FoH; 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 F04831A7D29; Mon, 9 May 2022 01:07:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356463AbiEFGhc (ORCPT + 99 others); Fri, 6 May 2022 02:37:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352104AbiEFGh0 (ORCPT ); Fri, 6 May 2022 02:37:26 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A66765D31 for ; Thu, 5 May 2022 23:33:44 -0700 (PDT) Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20220506063342epoutp0384c22ed333d5e19a38d8a7b840276ba1~scHeb_yF80874608746epoutp03D for ; Fri, 6 May 2022 06:33:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20220506063342epoutp0384c22ed333d5e19a38d8a7b840276ba1~scHeb_yF80874608746epoutp03D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1651818822; bh=boZqsu5x83x4yZ3yCA0TfzOorlYh1KIsxJqlRVWoJB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=le7o0FoHyUHtbdvAS7zuFeeqsNyeTa9NjE066mGsvEFFNu/WPAXebr3hLE+vjPskr wpphZBaVNr2ddlTkDo0ZSpQteWCYwRe8pvJ/hzlmvb9lZs8ukd+QBVr0L1gAhzv4gL GWuGMYWxjcXVqJ43gLfEOx67qt4YmlN20/zX6URY= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20220506063341epcas2p350432dd532c831e3b10dcc8cbaeb61ba~scHd0fdPb0340303403epcas2p3A; Fri, 6 May 2022 06:33:41 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.101]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4KvgkX1Zgbz4x9Q0; Fri, 6 May 2022 06:33:40 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 47.23.09694.441C4726; Fri, 6 May 2022 15:33:40 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20220506063339epcas2p1b94e823ab8b7974ac88fec9ea9c17109~scHbtJqjd2814728147epcas2p1B; Fri, 6 May 2022 06:33:39 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220506063339epsmtrp2d04be5075eb7648780f76c29e97a3dec~scHbrbqOL0488604886epsmtrp2G; Fri, 6 May 2022 06:33:39 +0000 (GMT) X-AuditID: b6c32a48-47fff700000025de-c3-6274c144b08e Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 01.ED.08924.341C4726; Fri, 6 May 2022 15:33:39 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [10.229.95.128]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220506063339epsmtip289f88b7ce43971313c3e51b3a8fdee9a~scHbalUYJ0767807678epsmtip2K; Fri, 6 May 2022 06:33:39 +0000 (GMT) From: Daehwan Jung To: Felipe Balbi , Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar , Mathias Nyman , Lukas Bulwahn , Tony Lindgren , Juergen Gross , Arnd Bergmann , Matthias Kaehlcke Cc: linux-kernel@vger.kernel.org (open list), linux-usb@vger.kernel.org (open list:DESIGNWARE USB3 DRD IP DRIVER), linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES), linux-samsung-soc@vger.kernel.org (open list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES), sc.suh@samsung.com, taehyun.cho@samsung.com, jh0801.jung@samsung.com, eomji.oh@samsung.com, Daehwan Jung Subject: [PATCH v5 4/6] usb: host: add some to xhci overrides for xhci-exynos Date: Fri, 6 May 2022 15:31:17 +0900 Message-Id: <1651818679-10594-5-git-send-email-dh10.jung@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1651818679-10594-1-git-send-email-dh10.jung@samsung.com> X-Br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kLZH77Lih+c8svuZpoXNMpucfWexWK1Z6iHdv 0reiumnC+asu7SkVMdx7OGza8auP170sv1pgJRNmWrHllfG04v8fgqJ89Nbcv5v59M/h+0Fv zddvfSj6L+QkY2/8TMMNS9u95+sLXI5TPFwZ7VD97fGm6cmTMjRXJ65uWzu5smzSzXk2bcvu uyRk8Gv5WWxKPDkht7OvOj5VfecF/pW9boKaaTcPzgsXvVGamrV89URRBpZWE6dQlv9C2ksa 2D4qsRRnJBpqMRcVJwIABvTKHAQDAAA= X-CMS-MailID: 20220506063339epcas2p1b94e823ab8b7974ac88fec9ea9c17109 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: 20220506063339epcas2p1b94e823ab8b7974ac88fec9ea9c17109 References: <1651818679-10594-1-git-send-email-dh10.jung@samsung.com> X-Spam-Status: No, score=-2.6 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,T_SCC_BODY_TEXT_LINE 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 | 3 +++ 2 files changed, 9 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 5d356f40c2b9..ab74b24a13b3 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 -- 2.31.1