From patchwork Tue Feb 25 17:53:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 183874 Delivered-To: patches@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp2041659ile; Tue, 25 Feb 2020 09:54:08 -0800 (PST) X-Received: by 2002:a63:c846:: with SMTP id l6mr58724816pgi.144.1582653248727; Tue, 25 Feb 2020 09:54:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582653248; cv=none; d=google.com; s=arc-20160816; b=ImSZnYHpIm2z472S8GR8QcBxj0ViOtMvk8PYoISyfuiid1nV9XNmgi2sOOXiuUuosT vsWPsqqxGxDCR0AkpbqiQZl0bg9DfcuQxvo7Hc6kNZ5WKUrmwNE5tCzOT9CtmZyhwfw/ i8JA9MfZs8bOxEIhl7ICjWvHBAkUeu+eV9hGhSkqMlrYh9UgRO0hU6NS34vWWu3UtD/B a+iZnMj2yF9XH7QTwDMvdr/BPdeHLRD+gc0RZ3XRJ1+IJ9GTQvg2WyO393hQWCnAPS5Q buvAkbpkmLM0aBKQG4/ewhkkrfu/IR2+X20RTEK3KQrRvbXVdMB9ZSCiIoqoTZoB2Me9 W0IQ== 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=EGHWPlxApQjuktMa4xDP9Q063H+hJfu1b6AJ+NVENyk=; b=vjSelN2pgczFdhHexhb7icOiI9o70faemQhNyudDdHnMAUjPsxwPfQNymTK67HBn1M bB2GjWO58hvxXP3bVZCoCVpDHc334KXSam4ygEf4fKa3sRC4cN9Sm7SqCEuj9dJV6oqm X1R0PFB6fwIhN/TUOLbe071DIJQfViWWJUzFlEYRC/l6xUL+1LK/J69YgDy9QnZhdaWd DzVSlYEVgZDpuDwD/fA9BBF+0PDDh4rEGPTwOyxgsADEJ+IGZzVHvkjIznVmot9Rl4nj FIGjCuSv4zXED3nm88OxmdPpwL25Tqh7kdPj1PA9ZZA1ZfBeGYbT9SWHcMYpdeWVdIyA VLyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mopFLxsW; 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 i11sor18340551pgh.78.2020.02.25.09.54.08 for (Google Transport Security); Tue, 25 Feb 2020 09:54:08 -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=mopFLxsW; 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=EGHWPlxApQjuktMa4xDP9Q063H+hJfu1b6AJ+NVENyk=; b=mopFLxsWbeU0/yL28BByX3Qmrqu4/lNA+fcgdrQ0c38OZPHrInJHNTj2WYC/ILCWI3 rXsIHYNPOo1xWFMGo7b/0CEJyDfVXjQ/OF3IJs1bd8q8HuaPPs18JlBn3fRBNx7jqN5f fC8vxPOg23B/AWvtJ+Qf4eNAws51cK2BgiyA2EA5uI5P3NgCw0Wv9hQUdeTRc3PUrZ0V hRk0YjbtV5tCBvV82AvEH/9gQey8wstJTVxNI3gzLRzj7PSSlwWMWxLKk9pa39J5/c6r JpjLoP7WYSaFE7JvzH24FqeckT308GZ6KURzKIQEE9oy3BJrKRDDhYmWeLqZFBVK+T/2 mbng== 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=EGHWPlxApQjuktMa4xDP9Q063H+hJfu1b6AJ+NVENyk=; b=FYb2IVQWxs2/sWnH8N0MsavC71qSu7QPAmGEnM2TceSnkVgnEuW8W9tA9qsRlzCENe dxDqC+YTzwQis/MCTw4BFebV9kKIeCtKJDPhIkXO63yiVXfuWVwyhHVEiv93K56Bt9OR JaXHya8SQjfsP/AIOfQ/IXqLI0cr+BbxUUsmyVu0TzSjM0/9gmVE+5cG44pzFk/0XSRY ZM3U444XHtgzPQtC0gGtpMkM6/gP+FwEGRihApBmmmKPv8zihSHPQ0Nraxl5ZVirVMtM w2lMCO7tiuOIoeVV1V27AQFMxilEYOaAYpAH1kQAEXLcKFE2m4f+4YhnkmotyYNs5wRB faRQ== X-Gm-Message-State: APjAAAUv9RIYCv+v8p74KMV8sR13992uJEkiyjCRY9mWMtBm8FlLzbBb N+k6/Vswrd0h3d5wi/lafY9BByGd X-Google-Smtp-Source: APXvYqzHMYAmH1VGS/4L4IKuT3hh7pV1x1nh2bDeq23It8zTwLG0Ky2zYk/YSXEkpzQl6uUTVp43bQ== X-Received: by 2002:a63:2b0a:: with SMTP id r10mr12434661pgr.213.1582653248359; Tue, 25 Feb 2020 09:54:08 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id v8sm18013291pgt.52.2020.02.25.09.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 09:54:07 -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 , Guillaume Gardet , Jack Pham , linux-usb@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v8 6/6] usb: dwc3: Rework resets initialization to be more flexible Date: Tue, 25 Feb 2020 17:53:04 +0000 Message-Id: <20200225175304.36406-7-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225175304.36406-1-john.stultz@linaro.org> References: <20200225175304.36406-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: Guillaume Gardet Cc: Jack Pham Cc: linux-usb@vger.kernel.org Cc: devicetree@vger.kernel.org Suggested-by: Rob Herring Signed-off-by: John Stultz --- 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 ba21af5c1204..2afcc04da338 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1465,7 +1465,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);