From patchwork Thu Apr 4 05:09:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 161744 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1155955jan; Wed, 3 Apr 2019 22:10:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqze/C5+zgEwpux3YABwYFEQX/oCkxrcImLlubXflV92yqLAH4qFU8AC4TrDxN+j71WMSoDh X-Received: by 2002:a17:902:e912:: with SMTP id cs18mr4233610plb.130.1554354618339; Wed, 03 Apr 2019 22:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554354618; cv=none; d=google.com; s=arc-20160816; b=SDgMxXFK/qDM+zV4VnBUoIvsKJcIm5unHrnCo26MjRcUoWIadnRyoY08EYKi0RB/K3 5FAhWVyxvR3AG5AWfn3NSyY8d2zIwUoXXIgbiO4h61xR9jDGwSrac83zViLrNrduQdcU JMgk30hs3gVzUFr4FhyLdGuTT/rlbRc4YA9un6VExZUwcO2zXhwM2hur5FZS7guyNlpf NyJ98E4oCxM8XhL9TRmyIrn+C7gRjl6XwcKrFZQR6vXcgdG7ouEcDrgsxrIVesdl5TUT 39TL13ijOEffYhqpTgeJ1/FJlP9ZvHBqvDrAXGipP6PVoafSAJGdTGscxoEsNF3DCPpP xuyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mdOJYDtANreHncbeef90zrWtNG5DJsKAdH3zS7ujZ1U=; b=l2b3YN9d5rpGGivqh65bzcy4LHb81rRCN9a6rnpk7XBcTR2C9Nt2T6hKPf/eMEwwBn Zs2DCTArGIMNayqQbSp7Upn8hql3CJTqFu8ZueZbLmsQWu8s24oQejM4DIgP+9SDGU9b TIk+6zRyoubfpF1PAcwH+dAcsgY3Vr+lyzJH8ngsQN87VAV2/cjqpQ0KYq4xvYjp8YS4 4PlBNHvMVTEYvtKpC3wDz5VjUSbSxStBEqcTiHDPSQoSHWGGoZVhyVcv5FRNk4WGVKYC 2Gi7b9mHyBDXNM3L1C1nnJrz085ZwzCGKpxVSDBq+wW7VC6L7FlVUL0qyV0Rkksbd6O4 BYUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I3r7GRr+; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si15003567pgq.506.2019.04.03.22.10.18; Wed, 03 Apr 2019 22:10:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=@linaro.org header.s=google header.b=I3r7GRr+; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726902AbfDDFKR (ORCPT + 11 others); Thu, 4 Apr 2019 01:10:17 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45878 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726827AbfDDFKQ (ORCPT ); Thu, 4 Apr 2019 01:10:16 -0400 Received: by mail-pf1-f196.google.com with SMTP id e24so717172pfi.12 for ; Wed, 03 Apr 2019 22:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mdOJYDtANreHncbeef90zrWtNG5DJsKAdH3zS7ujZ1U=; b=I3r7GRr+snPvFd86Mi8jhruOQUNWmdQmm7b7ecIcS4EHj+oanQWssoHtBXIkn+SnYs 0w73rCjZadVrqKxbWQAnB/YE8hVEXIEYZBybv5CJ+9iP5+xbfx4F/G5Yih5yIEJhu+uQ twbx3KiZqUOw30D/xSZ/Ry7bQwQ6y72jCZZ/2NCipPOAbkr1JOr0Bazn0lybvp5H34aZ T0XlScQ5jVShxh+p6UdaUhudPIJ9nIIwGOMd7HYJOpIsZCmzxD3yQY63DukRrvyplI5X mJev8i1yZg9q2PAox8OImn78RPANFXIEPBDJp4pi3QvnN1s9nChyPuxt6We/gHlQoKO5 U7Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mdOJYDtANreHncbeef90zrWtNG5DJsKAdH3zS7ujZ1U=; b=iOI2WfhXFkF+1IfJSMBq6lRPWBHt5mCLSFhNMqG/2/juqqSJrnsp+uHYrWBhIrKFMo mLmldzg2hqgv51RaRj+wbwi/V59uYfUc+EssFxz4zUA62j6Vj2IYMByuj+J7Ys0/6vxF hWkujA9PZLMWweNPQoyc/pXyV1+UchDQboaAkJUib8pzJ1IfWGptMEGMn179RjavGhx4 jomYdLwe8+4vLGDmAs1wBGSKEQ9v+lGfx6wBTnTICM/UePXjwZ1ovudvm2eaeBMO0qES 423xhsoYaq5GeRIxoa8Hje0cOizM7RtsK5YxWCsb8WZgp9c0FBNLh0g/jmACcSQN07ol 8BcA== X-Gm-Message-State: APjAAAVrffC8mGgBcBjpuMe7H5KTj0+J4vJanQBFc1aiXYC97OqTfJJh 7yONT9m8nreuxhVS3H2/LcZMCg== X-Received: by 2002:a63:6fcd:: with SMTP id k196mr3772020pgc.238.1554354616065; Wed, 03 Apr 2019 22:10:16 -0700 (PDT) Received: from centauri.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id q80sm27623011pfa.66.2019.04.03.22.10.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Apr 2019 22:10:15 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown , "Rafael J. Wysocki" , Viresh Kumar Cc: linux-arm-msm@vger.kernel.org, jorge.ramirez-ortiz@linaro.org, Niklas Cassel , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 4/9] cpufreq: qcom: support qcs404 on nvmem driver Date: Thu, 4 Apr 2019 07:09:25 +0200 Message-Id: <20190404050931.9812-5-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190404050931.9812-1-niklas.cassel@linaro.org> References: <20190404050931.9812-1-niklas.cassel@linaro.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel --- drivers/cpufreq/qcom-cpufreq-nvmem.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 2.20.1 diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c index 366c65a7132a..7fdc38218390 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -79,6 +80,13 @@ static enum _msm8996_version qcom_cpufreq_get_msm_id(void) return version; } +static int qcom_cpufreq_qcs404_name_version(struct device *cpu_dev, + struct nvmem_cell *speedbin_nvmem, + struct qcom_cpufreq_drv *drv) +{ + return 0; +} + static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev, struct nvmem_cell *speedbin_nvmem, struct qcom_cpufreq_drv *drv) @@ -191,6 +199,14 @@ static int qcom_cpufreq_probe(struct platform_device *pdev) dev_err(cpu_dev, "Failed to set supported hardware\n"); goto free_opp; } + + ret = dev_pm_domain_attach(cpu_dev, false); + if (ret) { + if (ret == -EPROBE_DEFER) + goto free_opp; + dev_err(cpu_dev, "Could not attach to pm_domain: %d\n", + ret); + } } cpufreq_dt_pdev = platform_device_register_simple("cpufreq-dt", -1, @@ -247,6 +263,8 @@ static const struct of_device_id qcom_cpufreq_match_list[] __initconst = { .data = qcom_cpufreq_kryo_name_version }, { .compatible = "qcom,msm8996", .data = qcom_cpufreq_kryo_name_version }, + { .compatible = "qcom,qcs404", + .data = qcom_cpufreq_qcs404_name_version }, {}, };