Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9616894rwd; Wed, 21 Jun 2023 09:32:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CXJ2DClrbf/QP8FticQQOhAXp1kR6OxKvGU1TRVxYwe7iAtyXX4OxakFIlb9+SR1YzU98 X-Received: by 2002:a54:4e1c:0:b0:39e:a95e:4920 with SMTP id a28-20020a544e1c000000b0039ea95e4920mr15180540oiy.45.1687365160556; Wed, 21 Jun 2023 09:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687365160; cv=none; d=google.com; s=arc-20160816; b=p69fw3ZqPdsVKvjPh8dDEh5kkHAzN/mDxZ7B3jyx3vw+LUqX0Tuuz6gEHQGkoseQqq QXK6QOuc2uG7He9MSNwc0Xx/8tQftWbiZ8mDKcfROqqoTg+APCmkpq5JFWONIFBo/98x 2cFvd7Pbv7APTSM1oZw9Qx4ziZOWaBUbor1CaPTLmBJxw/0L47R0Vimj6TEaCxroH3O8 YRfVdHxr51C990qmq3LgR8rK7k86zb0pD+3BjQtfZ7gE4l1CBrV3p0UHn+AcAh/Geh5n 1a3qLMmn5HIZhZBjwwmEbP8WZ5mkRYJbs348LaYHfucFGRrMe+ON6JE6W1Dx7+w20WvY CsgA== 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=j710YW8hs424tLDbRm5iuI6kZxKuzFnW4e7nXasl48Q=; b=QmeuNCkGx4WVJNx/z5KSM9uBBuCBfRWxAD3gHYvrN/W1XuaniSpYEbpBoqNhCrFCWn MygismcSwwncTrefQqyu21RKZY0u6kUsugUQA8ZVpNzPj4TvG9uKQTv4F0sGcVxTgnlS P2Czy7tMbA0tm0qrTFreAo9vG0fEPDZ8duf0Le7GWtXC9Wc0ok2uU2KEFmDcR3vyUpq+ PdE/5C//d/4wMyF5I+vCtd0BKacpQRJo7JukBy034pyRr8nOc4QRuWbRemIOm0eq9Cqk 1l0PDhaBxsKZ4yP0GcHMjBzh2/tXQRDz6cIUbTNk2uZcc16wDxjffzGSAj7A84TRMpPA xnTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="z/FRk07H"; 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 t70-20020a637849000000b0053f0cdab820si481408pgc.259.2023.06.21.09.32.28; Wed, 21 Jun 2023 09:32:40 -0700 (PDT) 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="z/FRk07H"; 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 S232226AbjFUQHo (ORCPT + 99 others); Wed, 21 Jun 2023 12:07:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbjFUQHn (ORCPT ); Wed, 21 Jun 2023 12:07:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5818419B; Wed, 21 Jun 2023 09:07:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E15FA615D8; Wed, 21 Jun 2023 16:07:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B970CC433C8; Wed, 21 Jun 2023 16:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687363661; bh=kHkwj8+VKWeZek1KqV5byWtG03YfCvl+MT6bpPneKUw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=z/FRk07HtpZIEXt8FOhzXDe3nRItPMQhFw9qo9ausXJJSDFyQo3J0sRFgNhop0hj6 /8gMKeUnz3VtiBYM3dpLeSuiFg3Z4Ya1/ukjfOzqSpRhbiNyUm1LDkCfvyEHZaUBNd 1j3HFDw8S8hw3kjtC/474Zqu4lFWQL7BYUw1ST4U= Date: Wed, 21 Jun 2023 18:06:42 +0200 From: Greg Kroah-Hartman To: Benjamin Bara Cc: Matthias Kaehlcke , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Benjamin Bara , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v3 1/3] usb: misc: onboard-hub: support multiple power supplies Message-ID: <2023062102-booth-glorify-2b09@gregkh> References: <20230620-hx3-v3-0-2acbc03ca949@skidata.com> <20230620-hx3-v3-1-2acbc03ca949@skidata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230620-hx3-v3-1-2acbc03ca949@skidata.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, Jun 21, 2023 at 05:58:30PM +0200, Benjamin Bara wrote: > From: Benjamin Bara > > As some of the onboard hubs require multiple power supplies, provide the > environment to support them. > > Signed-off-by: Benjamin Bara > --- > v3: > - fix nits mentioned in v2 > > v2: > - replace (err != 0) with (err) > --- > drivers/usb/misc/onboard_usb_hub.c | 39 ++++++++++++++++++++++++++++++-------- > drivers/usb/misc/onboard_usb_hub.h | 1 + > 2 files changed, 32 insertions(+), 8 deletions(-) > > diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c > index 12fc6eb67c3b..a56e712d3a45 100644 > --- a/drivers/usb/misc/onboard_usb_hub.c > +++ b/drivers/usb/misc/onboard_usb_hub.c > @@ -27,6 +27,13 @@ > > #include "onboard_usb_hub.h" > > +#define MAX_SUPPLIES 2 Why 2? > + > +static const char * const supply_names[] = { > + "vdd", > + "vdd2", > +}; Do those names have anything to do with the number above? If so, please document it! > struct onboard_hub_pdata { > unsigned long reset_us; /* reset pulse width in us */ > + unsigned int num_supplies; /* number of supplies: 0 considered as 1 */ I can not understand that comment at all :(