Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4980028pxb; Wed, 26 Jan 2022 02:01:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQkJ9A3MP6GbIRO+YK+oRRo1tbFBmzorzxShs1w49Z2eOYi2R1HebWB+uZeW3TPkrWzgjx X-Received: by 2002:a63:e70b:: with SMTP id b11mr18599852pgi.203.1643191290150; Wed, 26 Jan 2022 02:01:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643191290; cv=none; d=google.com; s=arc-20160816; b=s3w+LmokAFBiDROKGUz0U7uvvUBHPsKpKUK5KMhNDMJoXITdFAVjZJSHLTZ1+e/Uaq GwION/DiwdPgpl7b/1mfeqDKwHqMUo9lRvll9P6As+PiLl7qyUhEGzZFRa4uBjvbpjEv jeiTxpSMyo7YZDT1LSUEiHOXIttv1/4EJrme24ybb7ZZWQ+mST+k8EwjcBTMA15aojvz bxl5ej4u/hJX6IvcupD6lr62qzPJiYSiSECM4LTZ1tspdvx/Vrfm4StD/xZB2RIS+kkZ 13fETcwmbephpW5rhtXmdKvpMGapNpnkXMIFRhl/2/UcG15eVZ0uaqY3IDlz0zAWyeoa D/gQ== 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=ZfqL9mj2KCJbt88XzmWNl7ImpBHRr6UqUYUR2d96obI=; b=09ScpQfA6Mcm4RGiIRgjhdMQd21IjiUME8LGcts1y3KMoVT9+VrxjPPFZtGyhOzWZI 2cVqempqYIr77OeyUxG9qv/Wk8mNg14pZH9s7Xcqh+/+0jk9H6rHPA3pPIO+PXSkSkPi /GgLoBdG4d5+hPCR3wUGkjNHNCiBSgX0aWhk14Lv/4v//I6gMoOtXR82g4j+X0WLbat/ lNDyD2F1Nntsdgc2xMQ9tk+5amrdn9tKwFnyfe3EnBqLLNzEfY/ke+ILhKy6PEO9cFvF Nfe3/wKN+2quKmdWmkjgo2LoUx6WVtrxP7K/GN+TR4SQRH2taIOtSz443hZaRk5mJfNn oKdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WhblZBYW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rm8si2785404pjb.132.2022.01.26.02.01.16; Wed, 26 Jan 2022 02:01:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WhblZBYW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233299AbiAYVmv (ORCPT + 99 others); Tue, 25 Jan 2022 16:42:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231500AbiAYVmu (ORCPT ); Tue, 25 Jan 2022 16:42:50 -0500 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FE90C06173B; Tue, 25 Jan 2022 13:42:50 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id j23so60604003edp.5; Tue, 25 Jan 2022 13:42:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZfqL9mj2KCJbt88XzmWNl7ImpBHRr6UqUYUR2d96obI=; b=WhblZBYWEuHBiEdSzlkyeVNyauyH8c+tQWFhAdJl8nHQWD6u1YPolul4bbvkG5duVd ZEkk/zMHHxWVpH0oIQa8zXN1rlJK/qd2Cs2ygT4HZYj3tvfCShvceqg4lu+2r9MHcmgl O7ep1ntgVTjn5aVLkmiLVaoS52fK+19BBwltKPH513ITUESyMRJ28ciX50xH+HE3jreK g8uIgvsv70ByH/6MlIr4zPDc1A0sg7Oyjf2M9tGe7k5H7Lgghh/WFntPUv5G+QrFXgsD j/3RjKGxwGZDDcYL0B5w3gGSTCkuLD0bMWBZgbXJ/+zIYRCWAT37gnYXdaPjVIxTkzXP Op0Q== 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:in-reply-to; bh=ZfqL9mj2KCJbt88XzmWNl7ImpBHRr6UqUYUR2d96obI=; b=y480uXmm/an4ke890xsYQ+76GDJxgXBG4HlRc0loyqjtNhYshkBcdJGhNdwhAKfeR9 V+IoSXTBoG7/1kyqauz2k27RQVXQxMJ+W3IrW7aqxUbEeNz//mZLPh1avvz05x+n8zqi mYKMVccOee/MFouKpvqZDu73Obzuds5u4vVXxlBc6TRGw+6GXyjm1W9H9tQEnYywODcV 43CSoQtq2evMr7R/puTwQ3i7m00RRxsl+6A8NWvHsrKPMVrQIIUnEU9hX0/eq4FIgR+F Yjfn2XWM4CJ7vm5AwOwk8xCxVHbNqOCMHPlBwF0q1kKPRrJkv01MytJ0Babgn5jaUvbn 4gng== X-Gm-Message-State: AOAM53115PMDcvoJ+pRbmZ+p0fjl6NOBuXqylL8L/x9xjzKWIXxpZBEJ hoLmWlYtI+Xuf+aJ0ISHEdE= X-Received: by 2002:aa7:c7c6:: with SMTP id o6mr22525003eds.32.1643146968986; Tue, 25 Jan 2022 13:42:48 -0800 (PST) Received: from tom-ThinkPad-T470p (net-93-71-218-227.cust.vodafonedsl.it. [93.71.218.227]) by smtp.gmail.com with ESMTPSA id a20sm8813711edb.12.2022.01.25.13.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 13:42:48 -0800 (PST) Date: Tue, 25 Jan 2022 22:42:45 +0100 From: Tommaso Merciai To: Richard Leitner - SKIDATA Cc: "linuxfancy@googlegroups.com" , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "richard.leitner@linux.dev" Subject: Re: [PATCH] usb: usb251xb: add boost-up property support Message-ID: <20220125214245.GA4196@tom-ThinkPad-T470p> References: <20220121232612.7283-1-tomm.merciai@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 24, 2022 at 07:03:57AM +0000, Richard Leitner - SKIDATA wrote: > Hi Tommaso, > > thanks for implementing the boost up register. > > On Sat, Jan 22, 2022 at 12:26:12AM +0100, Tommaso Merciai wrote: > > Add u8 property to support boost-up register of usb251xb hub. > > boost-up property control USB electrical drive strenght > > This register can be set: > > > > - Normal mode -> 0x00 > > - Low -> 0x01 > > - Medium -> 0x10 > > - High -> 0x11 > > > > (Normal Default) > > > > References: > > - http://www.mouser.com/catalog/specsheets/2514.pdf p29 > > > > Signed-off-by: Tommaso Merciai > > --- > > drivers/usb/misc/usb251xb.c | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c > > index 507deef1f709..74fd8ac0c303 100644 > > --- a/drivers/usb/misc/usb251xb.c > > +++ b/drivers/usb/misc/usb251xb.c > > @@ -402,6 +402,7 @@ static int usb251xb_get_ofdata(struct usb251xb *hub, > > struct device_node *np = dev->of_node; > > int len, err; > > u32 property_u32 = 0; > > + u8 property_u8 = 0; > > const char *cproperty_char; > > char str[USB251XB_STRING_BUFSIZE / 2]; > > > > @@ -543,6 +544,12 @@ static int usb251xb_get_ofdata(struct usb251xb *hub, > > if (of_property_read_u16_array(np, "language-id", &hub->lang_id, 1)) > > hub->lang_id = USB251XB_DEF_LANGUAGE_ID; > > > > + if (!of_property_read_u8(np, "boost-up", &property_u8)){ > > + hub->boost_up = property_u8; > > IMHO we don't need the property_u8 var here as you could pass > &hub->boost_up directly to of_property_read_u8() ? Hi Richard, Thanks for your reply. You mean like: if (!of_property_read_u8(np, "boost-up", &hub->boost_up)) Let me know. I'll fix that in v2. Thanks, Tommaso > > regards;rl