From patchwork Thu Nov 28 05:09:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 180374 Delivered-To: patches@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7062989ilf; Wed, 27 Nov 2019 21:10:11 -0800 (PST) X-Received: by 2002:a17:902:7892:: with SMTP id q18mr8046989pll.171.1574917811219; Wed, 27 Nov 2019 21:10:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574917811; cv=none; d=google.com; s=arc-20160816; b=CdGSoh3p9Ev6p2Sc1ZcTxYO2uFKrt5Az3VBBtx5EJRbPCS8+OQA0UBH9D/k59Q2Qla QZFefUbnVXC25d+FOxyQd39U94rs0j0EN3W1KNdg+W5LAlsDy4Na3p6R7pNtxBsLbx5R 6ayKIlKNoyhE4YB/CuddtvObEp75zPAUsAVySJwMqCij3W6jvYJ1HJNtOi5o3NtghebW EeHqLRguhN3PfsGqks57GPbxWXDVCeza04rp4ngghQVWPLM3M8itatqhBRSnUUWR7iLz q47/gTEe7ajadlQmF0K0l04tZyTwExLJ2sF3CmEpLrpHZJ264qFB739bfe8MSf59VPTO ZQlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QO/lP+KDcMBuBF0dCbiBImn3ahE7Jw+zkWapBF57MgQ=; b=S49OTHvcEmRlmRujIwo+PsGQgrtoGZZTl14vV6nNMlAQI635wYk3+qaniU8EwqaTt0 UOb1rxD2mAq0pisRvKs679We3fuR7Nusa/NzD1hXbInbSpCTIsnXKF3hXJRyXOKHWfYR SdUep30q00s2ouq2lmq13VxpJHGipy25wpmGYBoFL5Yqk2xjVggXyPFOdNNS3JUrWM1L WTPJo1vcvx3V8WEs/prk8RPzhpMVvETEKESGsVqvZ+F5G63boeHlHiFimazlQa0BVq5m nDCuWo80VF/t/xzp3j8KIUBWycMcm+rW1hvP2/UKTG+MdIx5zMHGuDUvApdc3nItAJBE Y/cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jS4vAou0; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id j10sor12073819pfn.2.2019.11.27.21.10.11 for (Google Transport Security); Wed, 27 Nov 2019 21:10:11 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jS4vAou0; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QO/lP+KDcMBuBF0dCbiBImn3ahE7Jw+zkWapBF57MgQ=; b=jS4vAou0Kr4VlWLGW46xQ2mOeWEBO9xSfclqVZzZY6prqeXpGcE4q3l3Xx5PLk79oZ yt8FdpGPdNdZ2G8OZY9ofcFQ6RHGR/f2dmna1niRT8P5LRmymIw7yNiS+X9eeNUaSlKM 2+Gs+JwPGWvX/7EfC2IcTHHOGHpS+4ftgU3cqPhiiDhxJSkfTu79VkQa1UQCn5whtfc+ WdfrCLD+xeu9oUM2RU6+TnqnRiKNvRf/UlbT/bVixd63o8ou4RXmjFL54TiWbfOqRbP0 3zICwN84cBLfHoYmUrXv9WU5uVkpPXB1CcpQ3HCpuvkP5D8mwXDwQ75SxOO+wqV2yqcB tXjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QO/lP+KDcMBuBF0dCbiBImn3ahE7Jw+zkWapBF57MgQ=; b=CFSVTPQ10j+WNt3bm971SLdq3A41cQFVNPk/hePuydHN/yoskhU1D5Q3yLj8ESjdCK qki4Cs0SEyGbr3JOz4A/xaJZdNA7C9QJFKfoKta2XExjpAeu2l5hE3EybBdz5ZeR+zHi Gb+Gae81mZFjVp73v5yrW5H6Dja/hepYdQ9KsoL+3wvwi7ecrG35+HHKVYmBWXDnSACT kZFvHVCWut1UK9rqFZBhR3mz2kOpxTIWpAoJpaKxaBs43Q1jl6duHmbZLbdtFr8K27YJ iDNJVG20FMBpq6Hw3/Aq4ynHTyx9Ty3sBS4jd1xp8AnpNL66rG/SzBXy7lCgszJRMWf8 Fmuw== X-Gm-Message-State: APjAAAU+hK986GsGrsZpuGs2T4j80zIApTl3i2eUCfvf5WIrx3wuCHZM 5hPtomas7sdW7na86VURyH8jDCVq X-Google-Smtp-Source: APXvYqxGPRbiVlZZUV1rk9y+AqcuPPIRI6ejj7HTdsPF3VM9U1EQBetfUhFQXHuhzrFwXyT1lX4LXQ== X-Received: by 2002:a62:1488:: with SMTP id 130mr3242980pfu.238.1574917810740; Wed, 27 Nov 2019 21:10:10 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id j20sm17799838pff.182.2019.11.27.21.10.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 21:10:10 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , Greg Kroah-Hartman , Rob Herring , Mark Rutland , ShuFan Lee , Heikki Krogerus , Suzuki K Poulose , Chunfeng Yun , Yu Chen , Felipe Balbi , Hans de Goede , Andy Shevchenko , Jun Li , Valentin Schneider , Jack Pham , linux-usb@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v6 6/8] usb: dwc3: Rework resets initialization to be more flexible Date: Thu, 28 Nov 2019 05:09:59 +0000 Message-Id: <20191128051001.18995-7-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128051001.18995-1-john.stultz@linaro.org> References: <20191128051001.18995-1-john.stultz@linaro.org> The dwc3 core binding specifies one reset. However some variants of the hardware may have more. Previously this was handled by using the dwc3-of-simple glue driver, but that resulted in a proliferation of bindings for for every variant, when the only difference was the clocks and resets lists. So this patch reworks the reading of the resets to fetch all the resets specified in the dts together. This patch was recommended by Rob Herring as an alternative to creating multiple bindings for each variant of hardware. Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland CC: ShuFan Lee Cc: Heikki Krogerus Cc: Suzuki K Poulose Cc: Chunfeng Yun Cc: Yu Chen Cc: Felipe Balbi Cc: Hans de Goede Cc: Andy Shevchenko Cc: Jun Li Cc: Valentin Schneider Cc: Jack Pham Cc: linux-usb@vger.kernel.org Cc: devicetree@vger.kernel.org Suggested-by: Rob Herring Signed-off-by: John Stultz Change-Id: I4a26492f19e857f3f9f29bcdab81458016f70977 --- v3: Rework dwc3 core rather then adding another dwc-of-simple binding. v6: Re-introduce this patch, on Rob's suggestion --- drivers/usb/dwc3/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index c6316d4b7593..19504b907476 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1462,7 +1462,7 @@ static int dwc3_probe(struct platform_device *pdev) dwc3_get_properties(dwc); - dwc->reset = devm_reset_control_get_optional_shared(dev, NULL); + dwc->reset = devm_reset_control_array_get(dev, true, true); if (IS_ERR(dwc->reset)) return PTR_ERR(dwc->reset);