Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp847237yba; Wed, 3 Apr 2019 22:11:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3ZVWj+6i3BmJFPlLA6NmaDrj947h5NCimU4MuEZubrTo29QJh9jqtiPIFF56l4JAAeRZh X-Received: by 2002:a63:d854:: with SMTP id k20mr3824698pgj.107.1554354685909; Wed, 03 Apr 2019 22:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554354685; cv=none; d=google.com; s=arc-20160816; b=vcPg7VZQefixEpdiPAjihS11bgDuTYhrsVke/shvw5cq9bEU73AsQ2yDSew70V+JDe gs/Pl1U88Um03TtVbRSFalu5lLhgdZ4KUcT20BuNT3SJA3p7Ptgf7UwaUNwYxDRohzFg tD6DlY3+jF0S4tdaYTapZqiiN7qzOTbeGs7GeeKDj3PtUms9ghByvqOBJHotPEgNVlne QQrHEr2UaOg54bhctQVUkYArYsQ79LE0biwDdT6GS/r7mIFy8xCXC9O0XjIgZ1HdRa4u yBDi0UUDZcisrZNDrBE5QgXipCnlVCLgP6uach4jT/1hHsDOZa8fYwCdPljI4VU7j8pX Yjkw== 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=T6DAz6gE/47WAT64PBHpyH1u110VFRRJ3mN1jydrD2QigvGvRmbAT7c0hEadJL+vgF gakDHcE/z04NBs4VAg2OMlS1ghS4vjS3fNgFy5f9GqiD9Q4nSIa/ERceRXrSdiJjF7Gw lPoQtOEkqNnjHsRNqyH0B6MVxDBFU4H0Nvg0iwurDirjsBaDc61faL2f1K8jWhPVL8sv i6XcyX/X65c1CXVbrzTzA1J3bpQsNs6VoT79DkUkvZdw5QabJjl731zE/RkJxyZKl3+9 N9uGE+pKrqtX8tDjbp5ERu8b7IU0U0AIe5YgX5mmqYx59usHQ+OE12k6Qxawd5H3DPDa cSmA== 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-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=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 w11si6733687plz.403.2019.04.03.22.11.10; Wed, 03 Apr 2019 22:11:25 -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=@linaro.org header.s=google header.b=I3r7GRr+; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726930AbfDDFKR (ORCPT + 99 others); Thu, 4 Apr 2019 01:10:17 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:32841 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726895AbfDDFKQ (ORCPT ); Thu, 4 Apr 2019 01:10:16 -0400 Received: by mail-pg1-f195.google.com with SMTP id k19so628569pgh.0 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=C8RJmno7hYhYWRu9w74059LDhtSih8+g1E/nZm2D3gxO/vpi+SpdVtNXmWXSUjzAfm 2AoQZd9aEryUwJ4EZmvDrqzQcLVDRYeaBTqEwFZGdz9NiM05gLBeWwQpZ2k8gt9+W6hS cEdnYduuuT6BXAVQpIIa93/S6yd3K0NvXTlXk+7f/+RqMyKt9c3+XFSi2cAdkXRTT+FA YBV+5p97zHZPA+Z6afyvgT2A4WbfI45eNdT8andzETxpohgPy8Aa8lUP2igQOHOBSZSf +BGY+yxJ2Usf58y6wOPRbGUdXPV2Kj41hpJTvy5riEfsLSnleB5gJ+TR9CngyFz2eMMj AUcQ== X-Gm-Message-State: APjAAAWD/iatAPoy//2sHlLhd06ZEV2/RusAIl/vmLwdMs4M4RWEFwcY JGOO7zXQiqxdXxlJmZ9NukxL3A== 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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 }, {}, }; -- 2.20.1