From patchwork Tue Oct 1 18:29:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11169415 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CDF8614DB for ; Tue, 1 Oct 2019 18:30:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B5846215EA for ; Tue, 1 Oct 2019 18:30:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5846215EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5AEBB6E878; Tue, 1 Oct 2019 18:30:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by gabe.freedesktop.org (Postfix) with ESMTPS id 598456E878 for ; Tue, 1 Oct 2019 18:29:40 +0000 (UTC) Received: by mail-pl1-x644.google.com with SMTP id k7so5912063pll.1 for ; Tue, 01 Oct 2019 11:29:40 -0700 (PDT) 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; bh=xnyZjNCbO2ap2oxzis7QRBMw3/itYSPcHMr8ypFsW4s=; b=LqyF3k/ZKAON3WmqII4sih2tyfEpv6WiaHfuSnEXE+rnFXGEgGt/+zs3MCRLCn1wj5 RxLlmsdYGtTocqay+fe6wTe4vPzIU1Bz8F2nXvYYuS88xUre4hrL2gFCJ2GJr+aLaJOg i3l7wYrbHmnaIenQoTUJwK6uTQ4VBd4IgKPlsQD6klSFuEIkfmS/CRPgCYlf/UBcF/5l TUpGgcQeFZ1pfnkY/BfPB+jmt/4W0PjxeCrmaRdpwvr3t5HLuXpOkUz6T5/B9w1LOL6L eXSZa8c1D5mZREdLmOIyvy4/ofhlebiNBQP6vPKebcfNwvj6YUdyMOc8cJBG71zEhfc1 77yQ== X-Gm-Message-State: APjAAAVGP4HQu2OIn5swRpvbECeK7CVttb1wnEqR+8tMi+NWm4vywCSe j/4Kxol3MPYaUSYAexalePkOMw== X-Google-Smtp-Source: APXvYqyRbXISq3SO34OqGRk8drfBkKPU3mD55VSiIQPo3ZwrS0eL4A9EHXkMC5c+SdGyZCp4LNxRBQ== X-Received: by 2002:a17:902:a413:: with SMTP id p19mr25389237plq.210.1569954579845; Tue, 01 Oct 2019 11:29:39 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id e10sm18189221pfh.77.2019.10.01.11.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2019 11:29:39 -0700 (PDT) From: John Stultz To: lkml Subject: [PATCH] drm: lima: Add support for multiple reset lines Date: Tue, 1 Oct 2019 18:29:27 +0000 Message-Id: <20191001182927.70448-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=xnyZjNCbO2ap2oxzis7QRBMw3/itYSPcHMr8ypFsW4s=; b=EDl7kJK+Gu6PPzl7r1r30j5jzkLc7XveE/hrfDIc7KKwn7fy7suEKGSogHMdKjOd00 yzcV94dCp+XLbLJis3rCbnPcYAS711/Ww8/+QjGhEg0kSJZ5iz/d5tdK6bX9JBBoUX9O yc4DDEUpP8g1EQg/LtRUKyG10i2hRG9v/Ap4b2HKb+/JnAuNq0Mk+/OYuuTIes0uU1Lf rEtVzLU3kBNTfc4URdkmz5wkQd50NZqtmJVf0z6lIEhKfOQV5WM9QmYblnsbcJfLVIH1 SIa1r+a+Ujn/fcA1PgwtC/5T80nlbwOZi0CVKOBHlBjdcJJFRGu7rPo84QIE0r31U2Gx mS0Q== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lima@lists.freedesktop.org, David Airlie , dri-devel@lists.freedesktop.org, Peter Griffin , Qiang Yu MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Peter Griffin Some SoCs like HiKey have 2 reset lines, so update to use the devm_reset_control_array_* variant of the API so that multiple resets can be specified in DT. Cc: Qiang Yu Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: lima@lists.freedesktop.org Signed-off-by: Peter Griffin Signed-off-by: John Stultz Reviewed-by: Qiang Yu --- drivers/gpu/drm/lima/lima_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/lima/lima_device.c b/drivers/gpu/drm/lima/lima_device.c index d86b8d81a483..e3e0ca11382e 100644 --- a/drivers/gpu/drm/lima/lima_device.c +++ b/drivers/gpu/drm/lima/lima_device.c @@ -105,7 +105,8 @@ static int lima_clk_init(struct lima_device *dev) if (err) goto error_out0; - dev->reset = devm_reset_control_get_optional(dev->dev, NULL); + dev->reset = devm_reset_control_array_get_optional_shared(dev->dev); + if (IS_ERR(dev->reset)) { err = PTR_ERR(dev->reset); if (err != -EPROBE_DEFER)