From patchwork Mon Jul 13 08:34:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 11659163 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 0746A618 for ; Mon, 13 Jul 2020 08:36:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 D1D352065D for ; Mon, 13 Jul 2020 08:36:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cxgHAj0a"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="vqz/i5RU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1D352065D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vo5DcHbhyngESGWVuLkcuNJMlrwHc6h6NflxNVnOjmY=; b=cxgHAj0aDa4DX/p9rhXYHiZqx poXT8Ld3oFVF6d/3jpQCc3q0Aj42h6pvS4PFvZS9ubRTAv/b+NBzycuJ1RBk1wYdfdDI35GVyMGB1 4QW/CfhghNunH9JUKg5aOOnLmwFV0tLjZ2hlsTA6w5ULUBrpFJJ3gVjMIlx7OA6tt3Q8GlBoonkGW fvpjW0dOjbu6KHvgg892hwTqjS44frZYWw5EFOfJSQB6g8AkS/sLH1ffQtm/qZGWi4PhUz2qwjuUe 5761qR5mKrgUuTEvjcuK8qyEkcokvUL9RRh8Lqo5PYZ0WrFEs12QhgetaUfGg4j3F/v9PLXqJCViZ vRk7wM7CQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jutvn-00060P-Nt; Mon, 13 Jul 2020 08:35:23 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jutvH-0005r4-Tt for linux-arm-kernel@lists.infradead.org; Mon, 13 Jul 2020 08:34:54 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 06D8YjOS064100; Mon, 13 Jul 2020 03:34:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1594629285; bh=sMcPS/YUvX5L9aCcnOwSIxhQM5LhlKSAZq/8Pvhkcrk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=vqz/i5RUwSrdW5o0dRqZ/FNlD0l6VrTFoIcstQLY5Eg1/e4TNax9+GUo119AZ4Fho 3WxHgI30I2CfpvIwijKTmIlgQPWh5qtfHDQGJP7fdLGqm3COOYBNZEjUWFAsRUY5av 3mdiyqJnfZIYqLGRVMuNOhR+0NgJVr3Z/WZjZbDU= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 06D8YjkC041259; Mon, 13 Jul 2020 03:34:45 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 13 Jul 2020 03:34:45 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE113.ent.ti.com (10.64.6.34) 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, 13 Jul 2020 03:34:45 -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 06D8YYi7032127; Mon, 13 Jul 2020 03:34:43 -0500 From: Tero Kristo To: , , Subject: [PATCHv6 5/7] crypto: sa2ul: add device links to child devices Date: Mon, 13 Jul 2020 11:34:25 +0300 Message-ID: <20200713083427.30117-6-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200713083427.30117-1-t-kristo@ti.com> References: <20200713083427.30117-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200713_043452_135947_006F6CEA X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.47.19.142 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [198.47.19.142 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: j-keerthy@ti.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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(+) diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c index fb4c0aba9048..ebcdffcdb686 100644 --- a/drivers/crypto/sa2ul.c +++ b/drivers/crypto/sa2ul.c @@ -2302,6 +2302,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; @@ -2352,6 +2361,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: