From patchwork Wed Jul 1 08:05:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 192119 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp257915ilg; Wed, 1 Jul 2020 01:06:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaQ4QvR80bKtbi/wHoCi/33BnxikzVYlTflmUKqLv1AlYUQC+qdEbT68exZ0jfLJagF5hh X-Received: by 2002:a17:906:c451:: with SMTP id ck17mr22627629ejb.80.1593590776020; Wed, 01 Jul 2020 01:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593590776; cv=none; d=google.com; s=arc-20160816; b=QW+QkJF6qzuP75KxzkcZGvghv3OBO4M5FAijSm+O0Iox8L0fbROyNKwhppZ2qjD7f5 Rip8bk4f0TCcdCJfg2BfH+eQCVdmUYYAPSsW1InsqOCtdrzhonNYu9imxGg4qGXa8Pqq YbEnyx21yyw7dYRSxJBGbWhpVh7gIssU/Dh71+RCAyBj8RfL2eJR/iVlKmmFQG3US6zy nFoMJ1qcTSakv8cq1JMZ4/ZMk4ySYamF94z8zKNpPHKk4B8z9fH3YJ+Z6KtuEdDj2/no YeAXz/7nG7TIsMkAvkSd1dOJUtD19X0YH5KNVv5LCGRGmYdVEFHLhZ1dhz8+OrqkF/+F OdyA== 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=qss1T0kR8Yhb6TuZ9w3U+BLn6FFmNM3CzQg7mdrYzlk=; b=mdpCn2ckZA0JeKykJDY3KtXxZ7Wc+ByzQdEyspFMctcN3zVAYaid0n2QzkwtaSG7Z6 Q7OGq0h16cCh0y/QecPGnkomcT4/QqFsAKEYuDrJjojpEjFEXmhxlHMEEfxuxmA5A3SP rRzD712UFaAhVqTYfbyYX8oy89U5/XSZ3/OYKl9RVYHgZO/24gJoQl25S56J6KLihgf7 5k5wDGF0A8KuAMw0L9uDUZ4Cn7pdM9A0Bc3zdbkXhMAhInMbU+DYeRHYJVZFaXnJAxHG zFyRUfZFrM2QTJXi5eyqblExOPFP8CWRfTDEHOtTvQbfqxWaecLneuk2oI2LUz2R4M0K fY9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=L1jatucP; 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 j13si3434276eds.407.2020.07.01.01.06.15; Wed, 01 Jul 2020 01:06:16 -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=L1jatucP; 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 S1728560AbgGAIGO (ORCPT + 1 other); Wed, 1 Jul 2020 04:06:14 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:47378 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728593AbgGAIGN (ORCPT ); Wed, 1 Jul 2020 04:06:13 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 061869Fn050747; Wed, 1 Jul 2020 03:06:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1593590769; bh=qss1T0kR8Yhb6TuZ9w3U+BLn6FFmNM3CzQg7mdrYzlk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=L1jatucPogf/8rTK3dCVdJNT6H1OI3P1A9THV6C103cat40b8Y7jHsZjySiY2a7Jm tPzRT1E5QfiDi6aDcaCsiE/b5ruDyJbwGn+9ciCgeIoiLEokKCz8F2MIOm0Oqguc5J XdzKF2Ec0/zdJQVwYqLmLMRAVuxDIcQanizNwFHo= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 061869Sd089858 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 1 Jul 2020 03:06:09 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 1 Jul 2020 03:06:08 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE115.ent.ti.com (10.64.6.36) 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; Wed, 1 Jul 2020 03:06:08 -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 06185wUh078048; Wed, 1 Jul 2020 03:06:07 -0500 From: Tero Kristo To: , , CC: Subject: [PATCHv5 5/7] crypto: sa2ul: add device links to child devices Date: Wed, 1 Jul 2020 11:05:51 +0300 Message-ID: <20200701080553.22604-6-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701080553.22604-1-t-kristo@ti.com> References: <20200701080553.22604-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 6fc57d10e04a..aa080c65389e 100644 --- a/drivers/crypto/sa2ul.c +++ b/drivers/crypto/sa2ul.c @@ -2303,6 +2303,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; @@ -2353,6 +2362,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: