Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp4075774pxm; Tue, 1 Mar 2022 10:43:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrop3cDn6FzV0GyPpioH0a6loXhL3it34cUjkvwVTRL8LHijlqSKXOc7Zcg3A/iqlZ3cjL X-Received: by 2002:aa7:ca04:0:b0:410:92a6:1a9e with SMTP id y4-20020aa7ca04000000b0041092a61a9emr25661468eds.411.1646160200410; Tue, 01 Mar 2022 10:43:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646160200; cv=none; d=google.com; s=arc-20160816; b=03iwYQHVjyp1LGBh/GHbKbuz0nEXztQtH6ueCgGd7eyBP4GSeP8pen2JhitvzjYCKg Mv9jM2KWDd7n+EBmoYa/xKyRsuyfnOwTTqXZp2wN8wN0DYQEtGD33Mj1bt5S2LDakjZ2 BLnRMab30HLKyD8ZZO+JEeetmjJGp+27zNgkzY8TgkX5/majrEHFTuLA1eEPQRc/fRqX dCfSs+alKXIwyFor3SOoiYqXc7qGwbyQMiwtleCLoC99BGStUEOesmF9OoqwpHGdKXmJ tuTRqun3HGHHuhBVuhYCl8gzrotj1ZDqdKINQeD7YdstmBO0NAQ4YBZrRhbZULAI//Ci 3hvQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=peE7sO9c9bIwrLDEH+P5tPx9gsKQOC+ku7JdeqViooo=; b=OETqsD4fssuQvMB7bV0N6hnG+ISvxpBxZ6vSNXMIUXo3ErUa9VuE+YRN6kFElpXzPU aTxIMzAvHzdNFGzpzgJWRnBljdP4j5JIdAKmHKza+LHNvUTtM7wxhRO95tbrEa5fVIUg FnVNTByoDBcRSxWmuJMK/QQnHz9l93b1AjlDphthFkeQo/9on92xvsFb9TZG4T7S+rtY uL2f9hE/K5rGhjitsK0eaG6mmf+89QLgkIMgWzKXdWjmjcXsxNO59+nVY3aBYQV96qFl dx1iYAYYsSark7Q5gxcqGBXOJchKeuftvSo5zSi9SzSE42X1oHEfXAux7tOpI5ClhdHa R1Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KoTASANr; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v4-20020a1709060b4400b006cfd27c3c0fsi8262598ejg.747.2022.03.01.10.42.53; Tue, 01 Mar 2022 10:43:20 -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=@chromium.org header.s=google header.b=KoTASANr; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235735AbiCAQeI (ORCPT + 99 others); Tue, 1 Mar 2022 11:34:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236007AbiCAQeG (ORCPT ); Tue, 1 Mar 2022 11:34:06 -0500 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 471725FF31 for ; Tue, 1 Mar 2022 08:33:25 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id x18so14710845pfh.5 for ; Tue, 01 Mar 2022 08:33:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=peE7sO9c9bIwrLDEH+P5tPx9gsKQOC+ku7JdeqViooo=; b=KoTASANrVf5duaFDYBHbeH/9TtHaMvz7i+kkj9juAMUtoR1T5pwMEm3RCMva1Azq0V Csx3NzdZZZ/vw0LO/tP1TSd8FA8E1Ss55qaXRBI2my9o1cGn10jS9dADrlWZ0ES9Vjp3 1wOZJhSniaiD7fRGtnW9d/jgK9KKMD5YIiq0M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=peE7sO9c9bIwrLDEH+P5tPx9gsKQOC+ku7JdeqViooo=; b=KLfjFIS5nBkk0uhVWora+sp5e9ipI/lKhpypbFRmMu/kLKNNJ6GP1BcdfxlRWTZsEb EvmTtexH2X8by3rkMoKvo4P00oY33oK69xUwu8ZeQnKcXcR7HV9Pq42hbjLEA4eEuSAW DXBCEbztCkFsnUyZy6oeV8QqIpwDjtfXeXX2WofOvxs5bSUwUhmXaA//3v4B8UTe9/v6 C6WwS7nfiS5oha1ETxmEvZUBmXwKtFGz12w+3oYNaaA0B1CazuwnyHtKhje+WQeBiwfQ WntqZN0c/3wtD7VZzF8hZsxao/L2AwSBuvlN9uZ00ivmQkixSrDxa817ru6G9T9e7VgM bsgA== X-Gm-Message-State: AOAM530U2C9K8gWkjjqrXdqVD+1RFZxWUK63Yd2uHgOPGybFs8jbQ4se Zi+b7XQ6W8UAUwmFGE81dIO6zQ== X-Received: by 2002:a63:d47:0:b0:373:598c:e0aa with SMTP id 7-20020a630d47000000b00373598ce0aamr22407736pgn.243.1646152404787; Tue, 01 Mar 2022 08:33:24 -0800 (PST) Received: from localhost ([2620:15c:202:201:77d:b927:44d6:c9f5]) by smtp.gmail.com with UTF8SMTPSA id y12-20020a056a00190c00b004f39e28fb87sm18721077pfi.98.2022.03.01.08.33.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Mar 2022 08:33:24 -0800 (PST) Date: Tue, 1 Mar 2022 08:33:22 -0800 From: "mka@chromium.org" To: "Linyu Yuan (QUIC)" Cc: "gregkh@linuxfoundation.org" , "Tao Wang (Consultant) (QUIC)" , "balbi@kernel.org" , "devicetree@vger.kernel.org" , "dianders@chromium.org" , "frowand.list@gmail.com" , "hadess@hadess.net" , "krzk@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , "mathias.nyman@intel.com" , "michal.simek@xilinx.com" , "peter.chen@kernel.org" , "ravisadineni@chromium.org" , "robh+dt@kernel.org" , "rogerq@kernel.org" , "stern@rowland.harvard.edu" , "swboyd@chromium.org" Subject: Re: =?utf-8?B?5Zue5aSNOiDlm57lpI0=?= =?utf-8?Q?=3A?= Re: [PATCH v20 3/5] usb: misc: Add onboard_usb_hub driver Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Tue, Mar 01, 2022 at 02:30:00AM +0000, Linyu Yuan (QUIC) wrote: > > From: mka@chromium.org > > Sent: Tuesday, March 1, 2022 2:29 AM > > To: Linyu Yuan (QUIC) > > Cc: gregkh@linuxfoundation.org; Tao Wang (Consultant) (QUIC) > > ; balbi@kernel.org; devicetree@vger.kernel.org; > > dianders@chromium.org; frowand.list@gmail.com; hadess@hadess.net; > > krzk@kernel.org; linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org; > > mathias.nyman@intel.com; michal.simek@xilinx.com; > > peter.chen@kernel.org; ravisadineni@chromium.org; robh+dt@kernel.org; > > rogerq@kernel.org; stern@rowland.harvard.edu; swboyd@chromium.org > > Subject: Re: 回复: 回复: Re: [PATCH v20 3/5] usb: misc: Add > > onboard_usb_hub driver > > > > > > > > Hi Greg and mka, > > > > > > Let's make it clear that we are talking about once this driver is approved > > into usb tree, > > > If we use different USB HUB which have VID/PID not defined in this driver, > > > We need to update this driver. > > > > > > But if we defined VID/PID in device tree(for a specific board, manufacture > > should know VID/PID from HUB it used), > > > dynamic parsed by the driver, then we don't need to change this driver > > (increase VID/PID table). > > > > As per my earlier reply, the kernel/USB core uses the VID:PID reported > > by the USB device, the compatible string in the device tree is purely > > informational. That's not something that could be changed by this > > driver. > I can't fully understand this comment, could you please share step if we want to add a new HUB support, what should we do ? nothing ? Add the VID:PID and compatible strings to onboard_usb_hub.c, analogous to those for the RTS5411 and RTS5414. More work will be needed if the hub needs a special power up or power down sequence (multiple regulators, GPIOs, ...) > If do nothing, can we remove id_table from onboard_hub_usbdev_driver ? > > > > And even if the VID:PID from the device tree was used: how is the > > kernel supposed to know that the onboard_hub driver should be > > probed for a given VID:PID from the device tree, without listing > > the VID:PID (or compatible string) in the driver (which is what > > you seem to seek to avoid)? > In my opinion, if it need update VID/PID table in this driver to support a new HUB, > we can parse VID/PID from device tree and create dynamic VID/PID entry to id_table of onboard_hub_usbdev_driver. > > Hope you can understand what I said. Not really. I doubt that what you are suggesting would work. The easiest thing to convince people would probably be to send a patch (based on this one) with a working implementation of your idea.