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 A002BC433F5 for ; Tue, 1 Mar 2022 16:33:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236227AbiCAQeI (ORCPT ); Tue, 1 Mar 2022 11:34:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234481AbiCAQeH (ORCPT ); Tue, 1 Mar 2022 11:34:07 -0500 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A2B45FF32 for ; Tue, 1 Mar 2022 08:33:25 -0800 (PST) Received: by mail-pg1-x535.google.com with SMTP id 195so14796354pgc.6 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=XTjNZHQ8kF4t4AoRUm2xMakGiZ60nU5ZbVqNwbqhEFb7Qe9tMILRWtpFqiHoDX/XLO OEvW1ffrhCa9zcU8aulNT4F1gVDjSXysy/WAIujSXKgtCBWwW03bvfj87LvtlgLI6Emx cBmuKKcnAP0dsrXSfFGtjxAkd8y8VpH0wm6MvdC7VBsS1DyR8PsoYez58XPADZIw5Hbl kj1ZUkhQI0s+9RqYdOtYFWasJoK5/FyPxC/QeJaDqlNlVZrSryHfaCZ8jrQsH6uXJqza SN3xIGvCS0cCszfblAgulGweuw3OzXxTfV6GImUOoxdHc8ScXyPG6KmiASxu3DTyDKDH 0KIA== X-Gm-Message-State: AOAM530FINXrotAn/nAuPt2dsqRyOGInQb42hvkAotHzhg8Sy0/lBz95 EPIQwQaPI0yquF/HtwEd0/wmtg== X-Google-Smtp-Source: ABdhPJzOsZaPH+JussBROy3HgQg618t7zVhdAt+Gn2HqVPRz1lT34TD61D6g5HEnQnaGXPoKXcyJdw== 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: Precedence: bulk List-ID: X-Mailing-List: devicetree@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.