From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 804D6C4708D for ; Mon, 5 Dec 2022 08:21:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231936AbiLEIVP (ORCPT ); Mon, 5 Dec 2022 03:21:15 -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> 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C2ADC4321E for ; Mon, 5 Dec 2022 08:22:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P9tLB+7aSIikxnwT8OXfK8PUcc40XVe1Q0s59gu+jMs=; b=CHsTVVIkYqxTwl dTV2TTnjUrRk6Zyk/of3SnF0Gr/wQnJZ7CQfEW+mzuFBIh5MeU5vMjeh2d5pYbmCLpTwvX6Nz/qHW /dhH2OAVI5bfdmr2fbrlN6hG5TnjEa53uqhxKfhDbZ4PeU5HJYReWPyz4BdKHAjqfUp5gMU+FeAqy 1scb8+P1Yv1BSye1GiKJT766ZP5FcD6EPldidhslsZTkUDe7egNw3vIMK7JFvfI0+H+F7dDZZ2fSq NT+TR7moLhmEE31DxBJWFCTXMMqFI/riapiABzQMBUJz0f9y1Fek/wYQbaRe+o+YjqnlxYBB26kP3 kbLAVW9riJ6DhCuCXA0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p26iw-00G8F8-Lb; Mon, 05 Dec 2022 08:21:14 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p26is-00G8CC-NL for linux-arm-kernel@lists.infradead.org; Mon, 05 Dec 2022 08:21:12 +0000 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 9E590B80D81; 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-Disposition: inline In-Reply-To: <20221205033034.GE54922@ubuntu> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221205_002110_954117_949846F0 X-CRM114-Status: GOOD ( 25.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel