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: 235372 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2637299ilg; Mon, 13 Jul 2020 01:34:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNvPgND77b914ke91uftNrfKAosqyvjAGFfN0rfGEeqXh5N63GscPjqzOBI8Y/bkTFtKZn X-Received: by 2002:a17:906:c150:: with SMTP id dp16mr71340526ejc.536.1594629297046; Mon, 13 Jul 2020 01:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594629297; cv=none; d=google.com; s=arc-20160816; b=MMHdnPYeRm17Tp5AnF8TFzZtkPs/rRYPfL7OCBQzOcGmH2HeUkTUXDsY9oFt5Sg17N MZIbXZk7WYFxZwabbzJgyeB/xMjpZaP1+c6cZcwOZA08wszJDViQXgLRk8wyNMn48DkY X7C+fz704EaDW9AjMAqBQjS5tttxFJxwry9VnBgfIGCsiWBsO9x35IxHLRWpRHd1Z/TB mGAQ5+/+WkQ+19YUuM1hnPSdwQC3UTC3XmohDiop440YXaGEozwKJNMoKgbTaDHahGZO 0NoS3J0OBsSIQY9EHvpzl56sONo6J8uEGvIQMy43B/t+5DB04ue9iy26VKW/yTFPg7gY rcsA== 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=sMcPS/YUvX5L9aCcnOwSIxhQM5LhlKSAZq/8Pvhkcrk=; b=AaZy52lS4wvOotgFhVwqc2xvDQqYeBWa1+pSqt+lgqsiTGgk2bPla4yEF0XMeQkIKz dcwifinHmt+SMckQsfXgp/VwTCgAcDt105KbpNXF49r/b3P4qlAE/CxRTO+bP6prTqEA Vv9KgRbf4O58EtRYKlU2MDpeTu5vkk+U57UUkzaWwrtGZ/GvHudvZ1mEGwxIrD/eHPME s96OuJiRe8Kb60pzpJ4pOlcRHra94W9s9nPdZNv9m8M/+mjLtsk84/HOPZkmt4c2S9xz lPt10lEgQRkVdXJNfi82KL0e6HIHlXpujmiZ4WOkESLoUMhLTqSK8sVk38s1KpNYxkEo DwVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="vqz/i5RU"; 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 v12si8052682ejc.292.2020.07.13.01.34.56; Mon, 13 Jul 2020 01:34:57 -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="vqz/i5RU"; 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 S1726360AbgGMIe4 (ORCPT + 1 other); Mon, 13 Jul 2020 04:34:56 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:38450 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbgGMIez (ORCPT ); Mon, 13 Jul 2020 04:34:55 -0400 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: , , CC: , 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 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 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: