Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5568883rwb; Mon, 5 Dec 2022 00:32:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf7c+/g5ksC06oj7/UdHxVWCIbJVV2AGNKAjNoJRUYVP2B14jOfLIgYCLThZ4heg1Wk50RVE X-Received: by 2002:a63:4804:0:b0:464:8d6:8dc7 with SMTP id v4-20020a634804000000b0046408d68dc7mr55846876pga.594.1670229179683; Mon, 05 Dec 2022 00:32:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670229179; cv=none; d=google.com; s=arc-20160816; b=wPARBb3o9Q9DC8tq5RthYB+GhOldaJeGkgBF7YhF0yaNb1fKyuOntOtAbPLx7vxrXZ 7NnQ/XTkgilmZcjqk6LjCh3g48OheShr8rQ+g6SLZSkchXBXoPlkqcIeFI4HDrosdZfz M1OuR/QShiTi60rekC2KO6ryDZ0jKNKh4YSxo0JRVVvOIqUYMBlzeaMExlqvbJdq2wwl o5aBqWHEmxItWB4d5FL5hquWczA8vdW7BFNzNGaG0S9SpwSVN+EAVgiwk5CMaFUET996 kmplsnmObPA48KFtCrSoRBOcrX7qKuPopl4j6kpf/woGzgtQipVg9dS91TSA13YKqCXk xc+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UuGwGgF4dZW1pYwRXdKuCw9VB6ObKugMUzxBeCrzhFI=; b=sczGu0W0C2gTasEyyJZqtyBy4UA6XMhtvy+WrEHnAhZjtmoYtCuHagEecUR2TuiwEj 9orjijOjr7KMz7zj+kMXKK9LgKPwhlYibWlBSOrdZj+L9sDboVqNR2bUdTUwzWMdZuTC LoJ1xr12t6uMGQJYoHb5vF6I8CnOxao5Z8MhD5DXx6Z/y7EDGMhXrSsSAbDREDZtH2ES mJNTBf3o3SwFh6KksEpYCPxtayl4FKfTRkIwLfKkGqgPZdSjG+TGbw5nRD5Gm0Ns+/Xe MqJKeh8yFwRlwX+rnp7KQ9o0WtAES6oZhCtxhYkb8z477kvyO3FDJAK1AAUfw74DNNPB NgYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e4KwMkaa; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020a170902bd8500b001866341b823si12805225pls.322.2022.12.05.00.32.49; Mon, 05 Dec 2022 00:32:59 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=e4KwMkaa; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231972AbiLEIVO (ORCPT + 82 others); Mon, 5 Dec 2022 03:21:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231564AbiLEIVL (ORCPT ); Mon, 5 Dec 2022 03:21:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D85CB15A1B; Mon, 5 Dec 2022 00:21:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 93818B80D6E; Mon, 5 Dec 2022 08:21:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A39CFC433D6; Mon, 5 Dec 2022 08:21:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1670228467; bh=6bUk7Vf1YChgzBZzifSrrRpGQ7Qo/DtcZjbeaisDxs8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e4KwMkaaJQu3Nk7MP1VIsHN0NLaXpWEkKLmZvR6XIB2yXQ/WR7qg8hk8b10NUSlRf Q3Ei6K2BqYL2/AawbTaE05zVagDFrY17U8E/AAEKUKWOFtS76xcxCfG211ZFn0JSt2 gzTBMfdPRNGY86Q0vy2FYG7QFpyigbc41bbKKnJE= Date: Mon, 5 Dec 2022 09:21:03 +0100 From: Greg Kroah-Hartman To: Jung Daehwan Cc: Rob Herring , Krzysztof Kozlowski , Alim Akhtar , Mathias Nyman , Arnd Bergmann , Linus Walleij , Colin Ian King , Artur Bujdoso , Juergen Gross , Tomer Maimon , "open list:USB SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES" , "open list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES" , open list , sc.suh@samsung.com, taehyun.cho@samsung.com, jh0801.jung@samsung.com, eomji.oh@samsung.com Subject: Re: [RFC PATCH v1 2/2] usb: host: add xhci-exynos to support Exynos SOCs Message-ID: References: <1669860811-171746-1-git-send-email-dh10.jung@samsung.com> <1669860811-171746-3-git-send-email-dh10.jung@samsung.com> <20221205033034.GE54922@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221205033034.GE54922@ubuntu> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 On Mon, Dec 05, 2022 at 12:30:34PM +0900, Jung Daehwan wrote: > On Thu, Dec 01, 2022 at 09:06:55AM +0100, Greg Kroah-Hartman wrote: > > On Thu, Dec 01, 2022 at 11:13:31AM +0900, Daehwan Jung wrote: > > > This driver works with xhci platform driver. It needs to override > > > functions of xhci_plat_hc_driver. Wakelocks are used for sleep/wakeup > > > scenario of system. > > > > So this means that no other platform xhci driver can be supported in the > > same system at the same time. > > > > Which kind of makes sense as that's not anything a normal system would > > have, BUT it feels very odd. This whole idea of "override the platform > > driver" feels fragile, why not make these just real platform drivers and > > have the xhci platform code be a library that the other ones can use? > > That way you have more control overall, right? > > > > thanks, > > > > greg k-h > > > > Currently It seems there are 2 ways to excute own function. > 1. xhci_plat_priv > -> This is hard to use it if the driver invokes xhci platform driver from > dwc3_host_init(usb/dwc/host.c). I can't pass driver data during probe. > 2. xhci_driver_overrides > -> This is only useful if I has own xhci driver. > > That's why I wanted to extend overriding concept of xhci platform driver. > If some code is better to be directly in xhci platform driver than xhci-exynos, > I will modify it. Again, please restructure this so that there is no need to "override" anything and instead, you use the xhci-platform code from your driver instead. thanks, greg k-h