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: 11603963 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 E06B41392 for ; Mon, 15 Jun 2020 07:16:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BABF0206D7 for ; Mon, 15 Jun 2020 07:16:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RYGXeMwH"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="lPPe1l1V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BABF0206D7 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=bombadil.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=LsWT0tHKllkL4bZPUJZB15Nt8QMjVfHt1AoQs9GqORQ=; b=RYGXeMwHUAcQtw CD/SCzN1nWV3BEKBRgecKbKQVUpnT5Dazegm5UFrCDhwQVfuqMf6sxHlm//82jQfDIa934gnnimq6 ZwF2MpR0uPEAdBaaXs2I9RRZV0uDg54gGPDkkG0iGA95Taswz3+LiVEecsq1mufNKNoS4HqHd6yZq y7yFlL3uHgeFbsldSGjcn2RTySq4ZfESeysamOM00DhkK92S4kuC/2TJ3XEeftl08UoEhGo9zVysG 2iZJtnNsv7o49zo0/T+eKJCJi5AFdM4ZBC0T5mpan7uggLL4nHVkOqhkLCPYdGpMn4uNXpm/dAhOK CRKC5GueIZOf7ZBZrPLw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jkjLZ-0007fI-0q; Mon, 15 Jun 2020 07:15:57 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jkjKu-0006p2-Md for linux-arm-kernel@lists.infradead.org; Mon, 15 Jun 2020 07:15:19 +0000 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: , , , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200615_001516_792522_723FB3DC X-CRM114-Status: UNSURE ( 9.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [198.47.23.249 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.47.23.249 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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.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 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 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: