Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3961828imm; Mon, 15 Oct 2018 07:03:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Oq6B9jPej6TiH87PoNWlu9oU5lgPYyL0nBe5XLGwparq2zu6Wr7wmPdqP19KvGSFmT2kD X-Received: by 2002:a17:902:205:: with SMTP id 5-v6mr17378383plc.307.1539612201257; Mon, 15 Oct 2018 07:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539612201; cv=none; d=google.com; s=arc-20160816; b=gVmRbssDeZFoUd1S030ZwTYZWmKxGfV75qVc2LF+Eam9JLP8lwF9Do/M6d+Q0NI4e4 Ww1osoPXIjzazTPxn3vc31zE0JRYxpUy/L8ysr5ZllRg1ZHVflaMSH6dkK0zXpSyVykt I6gGJTsEr7FfwXr36ADcJzoh7H956LjEe2c4G5JdaeEvdR/PimGEHapoZv63PbodcSun 3YnVvtJuQbT2cWbpWeYB25XyJ0DDV1VaJ2BhNYJFcHz5hPusz2GSsQyVcA73ox18RO/H +AX0qVSqAOGIP6apSKilm1VtT7AhGmZTnbz0ZuqJE2Elp7Kps7b71VFuC6CxKc7e0VXI MEeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pfCXLvoXKxc3ObP5wqSTlT8v4ogbnl9QSOSoX8UHkjw=; b=rWal4QOgBP5QQ17Mds/Yc/atWfr7tBidPbVvm5RF/brHWVuGn2yQz/u/1zKNBHbE3K rULmCcPoc1ffRb8O+a6jkcJZIbnFb4zrhi/ksZLxgRFPi8lD8Of/SekN27J7aW1/pSWY vyqokl4Ex4l7NoeQv6fpRsdV3yRL+R+nZXE22qKJ0OsLFO7U7hkHfB9+siMKOg8IaBgE VqDUDuWyCR/eDDSXi/uD/MM/OKmvpCHBmsPfx0H49plkJrL8tXo5MURG6nOGOuHgao4H 26Gcy+bvmCS7jbjS3ZmAcWOjVD0ul3k/tRLSkQI+WYBgR9rEXof/p7JnYTLrPy78hrW1 LqHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="RM7jq/59"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c68-v6si11180797pfa.45.2018.10.15.07.03.06; Mon, 15 Oct 2018 07:03:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="RM7jq/59"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726688AbeJOVr7 (ORCPT + 99 others); Mon, 15 Oct 2018 17:47:59 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:40004 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbeJOVr7 (ORCPT ); Mon, 15 Oct 2018 17:47:59 -0400 Received: by mail-oi1-f193.google.com with SMTP id j68-v6so15131577oib.7; Mon, 15 Oct 2018 07:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pfCXLvoXKxc3ObP5wqSTlT8v4ogbnl9QSOSoX8UHkjw=; b=RM7jq/59RTVbI0qFo8nC3yRfbd89LP5OKweslXGtVlTE6Ms3+GlcFJE1tx7rPZBXCO M/3ZF+A24D+5b9rNSaMsWeBHApDDBoBX/tSULzmtd31+hFafPRdly5Z7KFaAQZQ02Hi9 aX3JQbUBBYYVsMUqExD6PQ4F+yrbjZXh1jLXP5kgxKVXmlRwG1xH/YppYP1qeepwBPZm dC3t4IqpRkvb4roq/aeFUPcAw0G6JOhBn/icXHnidIjhAPmdBLraBhbrLI8ac1Ul3Qsr 2mBj0ufww3zph5vZTtE+PZyj+BJ7W+iciwOB5gQruvF7CxDdZGijUKQdBeIGz2t/Ru2W CcMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pfCXLvoXKxc3ObP5wqSTlT8v4ogbnl9QSOSoX8UHkjw=; b=iTicPdOTajrh7V3A0s0u5lvUKUWCXrUY3tcTJp53j875/4glpeT2vUk8MZFaSX2H/O qteACU2p4nYCfdwEoxJE6A/n8xM5WCyPhj32X2k7PPLaA/zfj/fbnlJdC3A+bkcSL3km e1DIf/KLyKCieReaDE/+5c66EiVkgQiOSCckwSGbcbLxznTwXUaQYus4ph4k3MYVQ/tW wAUx4BkfDK8Hn2tC3cgm1BZEQMS/0/FQ18NKmMJkOEp6RJp1EqZurgGnZVuIhmUdokNc eui3lZFbFfUxDgHiIlQWO1CxCrfQgFRnO+zJL4EyGqa8dZ9Tu2OJmZKioYdeoAhFTiGD 2e0g== X-Gm-Message-State: ABuFfogUR02i/YWFsaGH0T7kIry51jBSkmXBckLGYeCHQCRLDU6aktTu H6qaZphfBPlzqkUwPV3MMOcGavLFitf6+eln0XA= X-Received: by 2002:aca:470f:: with SMTP id u15-v6mr9501387oia.259.1539612153300; Mon, 15 Oct 2018 07:02:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fabio Estevam Date: Mon, 15 Oct 2018 11:02:39 -0300 Message-ID: Subject: Re: [PATCH v2 2/4] crypto: mxs-dcp - Add support for dcp clk To: Leonard Crestez Cc: Shawn Guo , Fabio Estevam , Rob Herring , Marek Vasut , Herbert Xu , Horia Geanta Neag , Franck LENORMAND , Aymen Sghaier , "David S. Miller" , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , NXP Linux Team , Sascha Hauer , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 15, 2018 at 10:28 AM Leonard Crestez wrote: > + /* DCP clock is optional, only used on some SOCs */ > + sdcp->dcp_clk = devm_clk_get(dev, "dcp"); > + if (IS_ERR(sdcp->dcp_clk)) { > + if (sdcp->dcp_clk != ERR_PTR(-ENOENT)) > + return PTR_ERR(sdcp->dcp_clk); > + sdcp->dcp_clk = NULL; > + } > + > + ret = clk_prepare(sdcp->dcp_clk); > + if (ret) > + return ret; > + ret = clk_enable(sdcp->dcp_clk); > + if (ret) > + return ret; Couldn't you use clk_prepare_enable() instead?