Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp384894rwb; Thu, 1 Dec 2022 03:32:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf5TzaNoryvbcIm5jAzDFymW+io7qLlu+IHTjsTimYB+WwJDGqZyKbrocRaHM7tTwSQIA9Zh X-Received: by 2002:a05:6402:4515:b0:461:cf2b:627b with SMTP id ez21-20020a056402451500b00461cf2b627bmr2050887edb.73.1669894345630; Thu, 01 Dec 2022 03:32:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669894345; cv=none; d=google.com; s=arc-20160816; b=ISxRYI33F8RIMAZBbi5MYLeXIZZd3QYRLJHBuufKdJlpVgZeDlOp7/zsXWEqMa3+PF Gl6O+7GFqosuHSE3PAlhAuVEPJJbNMF8HGEkBsr1dyxjE8/jXViQZDxn1FIE7UA2nle9 YJlq97Y+m9wraRweOJ23cVYmQ+tdNiiwCWIuikF1fuiEq6jKj3N8pT6tBW2gAEmRc0hp WVyBBe2RL+dGJiyZZZ9E82qyR90DJ8gg84u7Ep87WX0zQvNvvC4lBXPqGSMyrAP9iu3r XctyzfpzIDgltOrkQ2QjRgBKNYd90mThse9SUb3qAqbOzdPCTJO+3EnVmPdc+5wLYJAh 7bNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=XwrQbOBiKU75Cv/78jGn299AlgNFY94s/4aL2Jtvkug=; b=k5E9wYS4xE3paBhnBGPewJyywHVdAqB4mp1SDgtAvWyOs+RFzdCYqBBLZHX3kSM9Ge XnbkprZqiXEnT91F4xZll33V8H3pgsMyX8rDNGd0TGm/LFp4YNmO2JQwht8sETwGyHeG w5p31+oeS7C9ehMpnIUl1uZRJTmXTjqc2JiBF+shX/6Eh3IDg73pgnwZpm5RKqOiHuvT sW1ZNdXKzZZti7kORcbaICp+gJy5HTsnTbeb+GjFakr6J7P+EXH5r0GZNO9m/K6GW3XK 3MWB6Zyg1ZXXRTNk324+3UxDrYGQNmQu1AQxDIsKClb8pT7fnOZFStm7JsbdxXdAzxfT TVFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U2APtYn8; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a17-20020a17090682d100b007ae26c33a6fsi2623236ejy.685.2022.12.01.03.32.03; Thu, 01 Dec 2022 03:32:25 -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=@linaro.org header.s=google header.b=U2APtYn8; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230471AbiLAKdv (ORCPT + 82 others); Thu, 1 Dec 2022 05:33:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229916AbiLAKdW (ORCPT ); Thu, 1 Dec 2022 05:33:22 -0500 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1274257B5F for ; Thu, 1 Dec 2022 02:33:04 -0800 (PST) Received: by mail-lj1-x230.google.com with SMTP id q7so1364512ljp.9 for ; Thu, 01 Dec 2022 02:33:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=XwrQbOBiKU75Cv/78jGn299AlgNFY94s/4aL2Jtvkug=; b=U2APtYn8ADfJPtXk2bBZ5QmzwpCuGGm0/sHSwMgkMZ8K1wnozc+9t4sJxA6mcz7fdk LVh8POmMC5P6w/O/nSl1+2J5iZOWSAaT29DCXdfhTLapHWmBO0gDwMwxtnYWvQideWqn NWTHIwNQHyZQQxrdxXKva0i1Br+OPhz1u5pfjPgyZLftALrVzuvA5yWuFcJmfhkdB80c 08Va70e3GGxA2DIpKEnLhObXCiZk0e1R3sR1U3LFM378eyMgTlEcb3YYGQQ6OtkBkz8o aAgcEpgVoZCS4fL5lb6U6xnmYwUnbB50riHTvUWcyb5iEMv929kNm0pVz9i7Zm/DKCHS AZ8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XwrQbOBiKU75Cv/78jGn299AlgNFY94s/4aL2Jtvkug=; b=xdAS/uo6D7TeTSTLRnGMaQWkRJ7LSxGNJRsK5Sff9a8z6S9riKcNtwjZ/NUELkvAKr iu4wn9TiqC88YXMoBZaOVGiZOjbIwI1398MvKkX294rdoF12pYymGO/SJHo0gwp23c4g BZKSiF1DxrX+0Pjcf2rkpCcWpmrzn/hr+GtJylQECybo6o4tM6qfqO1OmSofDlGTBwLX sCdGZ72H/GA7nb1LlJltyIm7gO/zYmEijOc9aPMxVvX66wPKiz2xVTuNu3Ji4HHhdsRU srLGeIXPx2Acv45DNARxYMsbcSfLe036HVWHpn+FC845Z9i3SBlhYalZYxVpTZI8yn4L T/Gw== X-Gm-Message-State: ANoB5plIogHZtGh0Xx0e3G+y12CFblfSHe/JzWXmrEf15Zle51I2B5kd lJNJ8a8hdZqfYXdBCTm9ccqC6Q== X-Received: by 2002:a2e:a263:0:b0:276:be89:5616 with SMTP id k3-20020a2ea263000000b00276be895616mr13844272ljm.347.1669890782423; Thu, 01 Dec 2022 02:33:02 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id p21-20020a2eba15000000b002796fb63dbdsm356393lja.13.2022.12.01.02.33.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Dec 2022 02:33:02 -0800 (PST) Message-ID: Date: Thu, 1 Dec 2022 11:33:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [RFC PATCH v1 2/2] usb: host: add xhci-exynos to support Exynos SOCs Content-Language: en-US To: Arnd Bergmann , Greg Kroah-Hartman , Daehwan Jung Cc: Rob Herring , Krzysztof Kozlowski , Alim Akhtar , Mathias Nyman , 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 References: <1669860811-171746-1-git-send-email-dh10.jung@samsung.com> <1669860811-171746-3-git-send-email-dh10.jung@samsung.com> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 On 01/12/2022 10:01, Arnd Bergmann wrote: > On Thu, Dec 1, 2022, at 09:06, 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? > > Agreed, having another layer here (hcd -> xhci -> xhcd_platform -> > xhcd_exynos) would fit perfectly well into how other SoC specific > drivers are abstracted. This could potentially also help reduce > the amount of code duplication between other soc specific variants > (mtk, tegra, mvebu, ...) that are all platform drivers but don't > share code with xhci-plat.c. > > Alternatively, it seems that all of the xhci-exynos support could > just be part of the generic xhci-platform driver: as far as I can > tell, none of the added code is exynos specific at all, instead it > is a generic xhci that is using the wakeup_source framework. There is nothing here Exynos SoC related, it's only for the purpose of using wakelocks. We do not use wakelocks in other drivers, so I wonder what makes this one so special... It does not look like generic approach to the problem (which is BTW not really described in commit). Best regards, Krzysztof