From patchwork Mon Jun 15 07:14:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 187925 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp2501106ilo; Mon, 15 Jun 2020 00:15:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxtbs/CdqcCu6Fa6uD/VLw07fiICWWUc0aGyLXKzitjfQYp+uSPQ5quiKHeSpOgGVQE/Or X-Received: by 2002:a50:ec0f:: with SMTP id g15mr23104076edr.359.1592205322017; Mon, 15 Jun 2020 00:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592205322; cv=none; d=google.com; s=arc-20160816; b=bGQEnKPxzVMVYIYfFPUPyIRXUhfgLkUalUKfVI6pgJpkkJsUtv5lGRtecbgG0O+d1z WQkiN1IdglKfSNT5wESh/ikJXAsUJRw02qYn9GhSjHKXgwxuXO6qOsuBDtmcUsMxTM9n xoa3HU47WuUCbI50yo5iUBWFJnfu5dfXfjDaXjuXQaWav51IAkd3Q51RmYGWDXGnCc2m UTMRB0MgrK6+A+VZc+TesZuCbi3+jUAJ8zr2yV4G2x6lE0e1znG28N0dFIHNQdniGYBX XHMIgc/TXjPiZsTnJBTeOcbuGOUTDqBMx8Rp6RPdobX1yWnxGFdEBWNfbL6hbbNEge4W JiAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=4Pjny+KuuRnsOS+xKmOJ82U7+HUtDjXvTlvk8R2riW0=; b=DV6qorSLGptn40KpfQlyr/D/UX+MaDx7YaiYrX81Lxkq4+wdrANbHglme8CFy3MVsN mm808i0FcFNwDZSxzhwby57NMzAZVF4oZzDQGvmdDZwKxS0zTrnVju/glVjjdoue807h RPxkbWpdDshaIBl5RPhjLyGhDsLhom5/37WiK7uyGvx/NgY02tf1Ek532kbgsrVEZm7v j9E7uVLSdPDvwz+FMyejeaJuLCN/4A+PcOBpFBnH0ovIegY1P7nCiaykhTa7mrSwccV6 VmhTyZx04ecR7cMfkJm6o8DOkJhEszIV3DTXTWDazaH3yIuuc7mL6r3a8+GGtDlH7LF1 eT/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=lPPe1l1V; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si8374211edr.214.2020.06.15.00.15.21; Mon, 15 Jun 2020 00:15:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=lPPe1l1V; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728236AbgFOHPV (ORCPT + 1 other); Mon, 15 Jun 2020 03:15:21 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:43996 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728285AbgFOHPU (ORCPT ); Mon, 15 Jun 2020 03:15:20 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05F7FAqN007649; Mon, 15 Jun 2020 02:15:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1592205310; bh=4Pjny+KuuRnsOS+xKmOJ82U7+HUtDjXvTlvk8R2riW0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=lPPe1l1VRtOAZEiGx0LlPIhpnVSur15dcwiFDKXutEwqUduoUyx6L+HmhkaYOTGnX KMj98PlJR4V4KVBXmt3MX3SlqqEMlqjdTwVhKf1C4kOIW2NTUfoa839dd6ntwuac+n Wz3pmJ4RoS9QQ0XPrsathJ8OBLpcHxefYZHuO6rQ= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 05F7FAKF080023 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 Jun 2020 02:15:10 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 15 Jun 2020 02:15:09 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 15 Jun 2020 02:15:09 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05F7ExrB062159; Mon, 15 Jun 2020 02:15:08 -0500 From: Tero Kristo To: , , , CC: Subject: [PATCHv4 5/7] crypto: sa2ul: add device links to child devices Date: Mon, 15 Jun 2020 10:14:50 +0300 Message-ID: <20200615071452.25141-6-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200615071452.25141-1-t-kristo@ti.com> References: <20200615071452.25141-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The child devices for sa2ul (like the RNG) have hard dependency towards the parent, they can't function without the parent enabled. Add device link for this purpose so that the dependencies are taken care of properly. Signed-off-by: Tero Kristo --- drivers/crypto/sa2ul.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c index 52c204d91a44..7aca07931f04 100644 --- a/drivers/crypto/sa2ul.c +++ b/drivers/crypto/sa2ul.c @@ -2338,6 +2338,15 @@ static int sa_dma_init(struct sa_crypto_data *dd) return ret; } +static int sa_link_child(struct device *dev, void *data) +{ + struct device *parent = data; + + device_link_add(dev, parent, DL_FLAG_AUTOPROBE_CONSUMER); + + return 0; +} + static int sa_ul_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -2388,6 +2397,8 @@ static int sa_ul_probe(struct platform_device *pdev) if (ret) goto release_dma; + device_for_each_child(&pdev->dev, &pdev->dev, sa_link_child); + return 0; release_dma: