Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp943107pxb; Fri, 28 Jan 2022 13:49:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxk3zdWlX3VCGblpMxtGjLw/pfmFcPj6kCN7b4nsieOb45uitqnUmrtdpI6Tfky5IHAFkrw X-Received: by 2002:a63:2158:: with SMTP id s24mr8156953pgm.190.1643406580861; Fri, 28 Jan 2022 13:49:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643406580; cv=none; d=google.com; s=arc-20160816; b=e9XX1FWx9EeOxh8Aa2qEF1iYocY41thS7XXq6VdVDuhDauVLActChBI5B4/wfoNnPv y4fXNDkK3ABtHKaz63DRd8AfeqHFJr95GhKmqd5T80PDm5cqJ1G2PNblmaSpVdP3j+3s VLGwsHcww+EXV96BllAlW4WEFH8GyIggCj4KzH8A2364GSKVJw9nAZHDAawtU8T+ouc0 jLwJ6LzV1ZqE2+tJoY5QbSZHto/7koaRpRYkCPPZ6YKck/oKSnp86ncWklZwPATE0juc 7uZE2S/Wn5C1M+cX7to9mXNF0/gxDEBXHWwC6TsBBxzFQPnp/UeD9lux1HZY5COKarXM fteg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=xb5S7h5vEH4j6PLl8gEHgLg2lQPOtkXdbOkCBe3z7nE=; b=L3MW/BCw2uAdblA3kddwQIpS+qfjE2jDGg3eWqTWCM+OYlb+BJAPPPlcK7vVQiuxPk Iwk4Hw/JASZYDfiJ6B5qUvRh/c0dbH40OgD7OzyL+Il7ddBqMDxeL97EtOh6zSXdFjZW d47xfqlXjnrmE+iKullRirGr+Wr5vYZJ8MjllqywteEt9krNTI1VG6baahNK6qRjYV1s zzRgaGfnxItxnpAxXAqBZOmkwXHYmsKZAoF4je52Sp9AvJfQoyf6V5PcaWwgmgV+XdBq 0KfegoJpR+L/ed0vPxTexUtpx1noJe3+pRBpuUol07G/GmvuEJi58/nuuP2gxckTSzAq Ih8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=WV5hov4c; 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=fail (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 j28si6332086pgb.379.2022.01.28.13.49.29; Fri, 28 Jan 2022 13:49:40 -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=fail header.i=@gmail.com header.s=20210112 header.b=WV5hov4c; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231793AbiA0XOp (ORCPT + 99 others); Thu, 27 Jan 2022 18:14:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236221AbiA0XOo (ORCPT ); Thu, 27 Jan 2022 18:14:44 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21790C061714; Thu, 27 Jan 2022 15:14:44 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id o12so9631187eju.13; Thu, 27 Jan 2022 15:14:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xb5S7h5vEH4j6PLl8gEHgLg2lQPOtkXdbOkCBe3z7nE=; b=WV5hov4cWwF7URU6ARLMnwqHJrAkYrwQulOpSzevNnVIx8qMnd65H5gBuDOsX3eZgT GTiAeadJVJpWE4j0tE9TE7MGfeg96mBjyGrZOpKChPeS3S0oYlC26Bo4fN2J+6YgWynp PYtG09/yLwEgurtI+v76y5a97vmf6Ah/ch45cBi4pPdVeW1Vu7ns36mZuXnx9fVQflvK pwBm/5hlXjyFsmhmFXhJ15nj6h6dIUjoB2BRLwycrwoYfx0VRV3fCKmw19FRbnF0W7fl xbHYk9cVX6T8cstPhpXo+XsvbuQRigHwrTJ7BfQpFoLglqQ7y/H+G8tPcRIjZzk+p/mG rMkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xb5S7h5vEH4j6PLl8gEHgLg2lQPOtkXdbOkCBe3z7nE=; b=bV5wiJa0y6RofauAdmuVXxYdgkGXhQCN62HS/R9ur3vJjxQyjeC5G/segaRNXy96lc sg9Exl82IIXyYq1rHu9LkCqrq56VrUVsqJLa24iJggtpza7iizwsi8FdgCNC1mzBhDVA dwVlol6cBzCxiC6WcuAKL+kWATO7UIXpECfMnWdXy2nUJkFbErh431IfUwbKuhyW1eSz 6Lw5p0Lmecc9tAFlNdHpdWX93jy3I7lPa89v9/YyHLuIk0TjN+0mqbHV//flzhBjaA9L j2HeHLhxL6ICqDjirRuoMNsKEDuIoY2BM/ny9eiKEA7CakkN5iPDjNVsjdrWLRcGh67n edbg== X-Gm-Message-State: AOAM531rYOH10rk4k3kHO9Rqy5x1vHjNBbj1DNF2cznoFBgXI95a5YVs BqV3aQ8qT107sfUayeK8zY8= X-Received: by 2002:a17:907:3d9e:: with SMTP id he30mr4672928ejc.625.1643325282682; Thu, 27 Jan 2022 15:14:42 -0800 (PST) Received: from tom-desktop.station (host-87-19-2-173.retail.telecomitalia.it. [87.19.2.173]) by smtp.gmail.com with ESMTPSA id p23sm11867904edx.86.2022.01.27.15.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 15:14:42 -0800 (PST) From: Tommaso Merciai Cc: tomm.merciai@gmail.com, linuxfancy@googlegroups.com, Richard Leitner , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] usb: usb251xb: add boost-up property support Date: Fri, 28 Jan 2022 00:14:37 +0100 Message-Id: <20220127231437.10893-1-tomm.merciai@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Changes since v1: - Fix patch as suggested by RLeitner drivers/usb/misc/usb251xb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index 507deef1f709..b60ab148e6ac 100644 --- a/drivers/usb/misc/usb251xb.c +++ b/drivers/usb/misc/usb251xb.c @@ -543,6 +543,8 @@ 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; + of_property_read_u8(np, "boost-up", &hub->boost_up)) + cproperty_char = of_get_property(np, "manufacturer", NULL); strlcpy(str, cproperty_char ? : USB251XB_DEF_MANUFACTURER_STRING, sizeof(str)); @@ -584,7 +586,6 @@ static int usb251xb_get_ofdata(struct usb251xb *hub, * may be as soon as needed. */ hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE; - hub->boost_up = USB251XB_DEF_BOOST_UP; hub->boost_57 = USB251XB_DEF_BOOST_57; hub->boost_14 = USB251XB_DEF_BOOST_14; hub->port_map12 = USB251XB_DEF_PORT_MAP_12; -- 2.25.1