From patchwork Wed Oct 16 03:33:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 176407 Delivered-To: patches@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6783707ill; Tue, 15 Oct 2019 20:33:53 -0700 (PDT) X-Received: by 2002:a17:90a:9f81:: with SMTP id o1mr2264344pjp.60.1571196833059; Tue, 15 Oct 2019 20:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571196833; cv=none; d=google.com; s=arc-20160816; b=fZS5jTNxxOOLVpdtD8Qqr3424c49458nZrRd/WchTW8QQY7+UoJ351GmR/WqpaEVDx rJ3P7aIvxMak7s0Pj46GP0VjEF8lAIrDKfcEW/uftz031ZTqlYl2cX3DXxjxbTtZB/Hw W9M/18XgAlbq3cYINdalpTBZ+0DySX9bISHBYJYc1bagykwcwbX3ZRAlimdHR/Pf1CoX PLGourmCGq1Bhblr6HmYDGX1oMMyCocjRMONdtWzZOp+TARFqYuhdB4qZcBXYbzvw7CI 6WWGPWJsT8nE6RmNyQbKSgX4wq+JQASHP86xnfKvrowmILuHxsjuNof66pIakIk0hmoj mMgA== 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=XYmCRZgf8b2IcaP7U8709/cAdbizYn9CNcdmOHw1lAQ=; b=EmaJgyudkzUdkgBrkqujiwP5kvn75BqtC+z0gcYzX1RIVqTlGbhDVM6qQuBqurL8U/ gBRzPOvNk38+AOCvx2yBUeQUlZXSR6AFCWotN+uIwTQ+6X/UhcZ5QEuAQiNsbuHa6SmW OGMmXXhg88SlFd0utzBqV39tm0B8ibrdYoss74qHX+LcUtKdFHmINDlWiEOhzmAIVbeU JtSHSSGKuV7B1rqrHjE/JXc0EwZYoqCc6fKvhqTDx150w9OLaLqQVp6bI3tw2zNMQI/B LzF0pS9RIS2TFKi+JHsQ3EpbOeetqmSUDpc2gAw2Cwcsm8D96ATsvMgpq1BQThGab4VK YJAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M+j3OSTd; 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 z9sor29984681pln.70.2019.10.15.20.33.52 for (Google Transport Security); Tue, 15 Oct 2019 20:33:53 -0700 (PDT) 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=M+j3OSTd; 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=XYmCRZgf8b2IcaP7U8709/cAdbizYn9CNcdmOHw1lAQ=; b=M+j3OSTd6OWlEcLeVpxIyqrceKfn8UXv80YolW6qvBqb5QXn0w1KjA3liz7wZvvEPE 2jK1cjfZbCKO8KDuKnvDQSgiagX/xGJbc7M3TJeUvCEhRvnvCmaM3oJ+CzoqDax+5nDM QhYddsNAxjU+dLqhpM1jwvYZ8hXoy1hMpKir6wed8XX+ayBTHSnLwfyIamo33p9a1xp2 PAFkXAZ1JRCrng+9VkPVr1NmtmNHaKLd8mlCKTBqHOgBYVb6XVr8pEhba5xWk52mw9+8 cSsq/uXaMZ29Xuo+Uq8QcmxDRCg2hc4P7CPQKjNqb4foAoUmOCclW3wtYJbBM6L5tf0X OSTA== 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=XYmCRZgf8b2IcaP7U8709/cAdbizYn9CNcdmOHw1lAQ=; b=jqcV36lnWajBVdku7qkBn/2eBebLZ670UbibdHqcQ5wWoRvWKamhITxcFD9/SbK1aU Q/HcCjEEyMPhlC/tRhWpLuj9q0u0xY57YvRnqsF97q9GeTCKjCPRMul0iEBAPZ7RGRRC DnDBmLJ1qbAtt1LjN3jwAtKMEDRpXFjV3kXVTytkH/BhzUatIdmEgW5maQsqX4qB+TMU mqXdwBjKtfOq5rlIiQ1cnGZJ1tDzGWm4q1HoGCF1zTN6O8jDcShvxgFPHj4tr98MuZli YkTAzpf23dcv4eYxxm/X6JXCzbzKHVvy+nONjWxafg+n6awoH/6WkCHYLTo+qgM+dmla lumA== X-Gm-Message-State: APjAAAV097WwRK9DgiKVh2TOxQR/LYMV7iyJMbDxIASsO44uZ++2QKTS I6zt3aw46tte8KygiIDtNE5km6vA X-Google-Smtp-Source: APXvYqwtJMHOOIbFTp5wm3D/o0iQ0CChhCx+w+5i1GrQwEE/EFW7imOCSKYWaKsUoO/zz8QDQxMKfA== X-Received: by 2002:a17:902:a605:: with SMTP id u5mr37825346plq.140.1571196832574; Tue, 15 Oct 2019 20:33:52 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id l23sm748356pjy.12.2019.10.15.20.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 20:33:51 -0700 (PDT) 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: [RFC][PATCH v3 06/11] usb: dwc3: Rework resets initialization to be more flexible Date: Wed, 16 Oct 2019 03:33:35 +0000 Message-Id: <20191016033340.1288-7-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191016033340.1288-1-john.stultz@linaro.org> References: <20191016033340.1288-1-john.stultz@linaro.org> The dwc3 core binding specifies one reset. However some variants of the hardware my not have more. So this patch reworks the reading of the resets to fetch all the resets specified in the dts together. This patch was reccomended by Rob Herring as an alternative to creating multiple bindings for each variant of hardware when the only unique bits were clocks and resets. 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 --- v3: Rework dwc3 core rather then adding another dwc-of-simple binding. --- 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 4d4f1836b62c..ef52ffa5d6cb 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1442,7 +1442,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);