Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3704697ioa; Tue, 26 Apr 2022 08:36:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7gV8yezcm6W3EFgk14XbWH9QV6BC/XwfaGJuVBHeZplmJsc/GimfbzenpmAKsMl8BYYzL X-Received: by 2002:a17:907:3d01:b0:6e0:c63b:1992 with SMTP id gm1-20020a1709073d0100b006e0c63b1992mr22342339ejc.422.1650987404174; Tue, 26 Apr 2022 08:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650987404; cv=none; d=google.com; s=arc-20160816; b=sZKgo/n9coiDSNH4x0/6gq6wtLz9iAdzGh/l31W4DdINavKtn/VYnXdjfYGFyUHa4K jmY0aSKAWv95f88XvVNjsCNbaZ9+wr4r3gxbCAEDceCwTFIohYugWdYUUEEa5egGZ9Nm igRaqhrCf9tAdSmLMcfhPAfSqjTZW6bO0Y0xa96YIWrOhMY5c6byuCaquOk0OU+aXTKO XyBzeWkuUYiAr/UYmN3SFpKA4HbjH3GX5avRejUYCFut/+e1x058pY9F5LiJl9eskrCU vq40zjxvcxBQpLizpXWHfy/jgg8FHK18cNFsKQo3e+tcn3rJJW6o5Jlvy0k5xOgvX62e UKfA== 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=E9R23DAe1jJ/y4QYxJ8o32xCpnMFRt1+5PhLzGs6fDE=; b=EgOMHPKxMwvGZ8LZFaWv7Bbbz2jOOeMQ1oOhpMdaJ4G6NKja4GhP0zROrFWIYGulec VqkC98feQpgkgoc7bnSkpHNZUbDFg+qCwfISE7545xCd3A7eUtQwak40RDxHTdeU8HA6 Sb3ze4Gyr3AsD+KNWRlyF+hEjrRMFf5sn/jr5AXKb8aLTB6LofEjqsje5KiVPJHM54dF EryDjLWyCGNlxvNkW6NAgMqSZl2bCAjANeXbmuCu42E0CA8OG4achxBtUCfSmKYeYpko X3Onv3QmagbditOGYpZ5Oksc/CKSZ/HfJVvE09D1A+WjT/Y+o1CE8Xzhod39w2U2lpv4 IcIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mpYG+yn1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v13-20020a056402174d00b00425ed30f8fdsi4339022edx.234.2022.04.26.08.36.20; Tue, 26 Apr 2022 08:36:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mpYG+yn1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245409AbiDZKCY (ORCPT + 99 others); Tue, 26 Apr 2022 06:02:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347976AbiDZKBh (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 3638F32057 for ; Tue, 26 Apr 2022 02:20:28 -0700 (PDT) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220426092027epoutp04ef16ecef39198fd08b3814500f35d36e~pZ8NXSvmi0276902769epoutp04Z for ; Tue, 26 Apr 2022 09:20:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220426092027epoutp04ef16ecef39198fd08b3814500f35d36e~pZ8NXSvmi0276902769epoutp04Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1650964827; bh=E9R23DAe1jJ/y4QYxJ8o32xCpnMFRt1+5PhLzGs6fDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mpYG+yn1iGM839G8R+WDip2gPg459hhhorKwV+yjOZjGBrJhW8ZT6TOAN8JIW2xo5 gtikY9c1VVccbY+A5VdWSI8jY6vfHXL4qxF23WpBGP63ObDWbXYiMqrvgnsUfWBlHZ YaRJkNzz9o5a58vRQZhvta5zutGjezPz1oIF9rrs= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20220426092026epcas2p4ceb674ff1a822d94998c6027eb6a1452~pZ8M0t7LD2651026510epcas2p4U; Tue, 26 Apr 2022 09:20:26 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.36.102]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4KnbvV5FtFz4x9Pw; Tue, 26 Apr 2022 09:20:22 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 4F.30.09764.659B7626; Tue, 26 Apr 2022 18:20:22 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20220426092022epcas2p2da47c0c20feba6c96037e125289475f9~pZ8I3rmK42824028240epcas2p26; 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 20220426092022epsmtrp26bfca5b948cda1b1ea502c6b75730361~pZ8I2zjo01198711987epsmtrp2B; Tue, 26 Apr 2022 09:20:22 +0000 (GMT) X-AuditID: b6c32a46-f8bff70000002624-e5-6267b956dce8 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 36.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 20220426092022epsmtip267f5b1767f4ea10aac4e0f5c6baf0836~pZ8Iu8jeM2696726967epsmtip2_; 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 3/5] usb: host: xhci-plat: support override of hc driver Date: Tue, 26 Apr 2022 18:18:46 +0900 Message-Id: <1650964728-175347-4-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+NgFvrOKsWRmVeSWpSXmKPExsWy7bCmqW7YzvQkg3vbtCzuLJjGZPHkyCJ2 i+bF69ksrv95z2jR/vwCm8XGtz+YLC7vmsNmsWhZK7NF86YprBYz1ypbdN29wejA7TGroZfN 43JfL5PHgk2lHov3vGTy2D93DbtH35ZVjB6fN8kFsEdl22SkJqakFimk5iXnp2TmpdsqeQfH O8ebmhkY6hpaWpgrKeQl5qbaKrn4BOi6ZeYAnaikUJaYUwoUCkgsLlbSt7Mpyi8tSVXIyC8u sVVKLUjJKTAv0CtOzC0uzUvXy0stsTI0MDAyBSpMyM5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1ypbdN29wejA7TGroZfN 43JfL5PHgk2lHov3vGTy2D93DbtH35ZVjB6fN8kFsEdx2aSk5mSWpRbp2yVwZazvP8xYcJ27 4tzTbrYGxrlcXYycHBICJhIPOpYzdjFycQgJ7GaUaHt9nxEiISmxdO4NdghbWOJ+yxFWiKJv jBLrZ/9l7mLk4GAT0JL4vhCsXkQgTmLF5T0sIDazwBsmiau7k0BsYQFvif71Pawg5SwCqhJr J3mChHkF3CSmHDvOAjFeTuLmuU5mEJtTwF3iRc8isLVCQDWTV1xnmsDIt4CRYRWjZGpBcW56 brFhgWFearlecWJucWleul5yfu4mRnCoamnuYNy+6oPeIUYmDsZDjBIczEoivFNV05KEeFMS K6tSi/Lji0pzUosPMUpzsCiJ817oOhkvJJCeWJKanZpakFoEk2Xi4JRqYEqW4A6cvK/ipbZ4 /9TuvKMB8UveON8WuysSaL9Bd5VL/nFefus/vd0PvXe31K9Xadve7cfqLPI76uGFFd2OCbMX rd0/996TC3uF3Zqb9jBvK3Surd7W+nzTDecbbdUnvxy4osOo5nUyYv7rnXbRaratfC28ExIP 25jf42it05lYEfmKq++N2dLz0gp1ByyY+Iu6YyS/bzyg4XG4XsRA4O7cCbujimsucc5N6c4T 4OncnbV9pUaFGFvjUitJpz2ma3qnKesmyocYXdPMe975Pastnr9f79k7nn/+lZ98fjA7u+eu Xrug5qfAAmfeV+1Hjrxt/7f3bu/S2i/yD21WfElYJKqx0oSzeHJOtu90JZbijERDLeai4kQA FTyvYcQCAAA= X-CMS-MailID: 20220426092022epcas2p2da47c0c20feba6c96037e125289475f9 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: 20220426092022epcas2p2da47c0c20feba6c96037e125289475f9 References: <1650964728-175347-1-git-send-email-dh10.jung@samsung.com> X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 It helps xhci-plat driver increase usability. Vendors could use functions in xhci-plat mostly and use some overrides to do what they wants without modifying xhci-plat driver. Signed-off-by: Daehwan Jung --- drivers/usb/host/xhci-plat.c | 6 ++++++ drivers/usb/host/xhci-plat.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index a5881ff945a6..6efa3169bf69 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -173,6 +173,12 @@ static const struct of_device_id usb_xhci_of_match[] = { MODULE_DEVICE_TABLE(of, usb_xhci_of_match); #endif +void xhci_plat_override_driver(const struct xhci_driver_overrides *xhci_vendor_overrides) +{ + xhci_init_driver(&xhci_plat_hc_driver, xhci_vendor_overrides); +} +EXPORT_SYMBOL(xhci_plat_override_driver); + static struct xhci_plat_priv_overwrite xhci_plat_vendor_overwrite; int xhci_plat_register_vendor_ops(struct xhci_vendor_ops *vendor_ops) diff --git a/drivers/usb/host/xhci-plat.h b/drivers/usb/host/xhci-plat.h index 8c204f3234d8..455e0018d5e6 100644 --- a/drivers/usb/host/xhci-plat.h +++ b/drivers/usb/host/xhci-plat.h @@ -28,5 +28,6 @@ struct xhci_plat_priv_overwrite { }; int xhci_plat_register_vendor_ops(struct xhci_vendor_ops *vendor_ops); +void xhci_plat_override_driver(const struct xhci_driver_overrides *xhci_vendor_overrides); #endif /* _XHCI_PLAT_H */ -- 2.31.1