From patchwork Thu Dec 6 09:39:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 153002 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp10313646ljp; Thu, 6 Dec 2018 01:39:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/V7113bWg3fLOG1ETq2F+Rii2h/mbNDxg84cBS+X7QV77RpWzFy3hYsZ8Pw8urMr/OwEMrb X-Received: by 2002:a63:580a:: with SMTP id m10mr23116169pgb.332.1544089165606; Thu, 06 Dec 2018 01:39:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544089165; cv=none; d=google.com; s=arc-20160816; b=wAgteWu82l1Sm8H/yAYNOACH3EAgtl4n2kCqprAYmluALUnpZIhaPbH7IB0FuSiCXa mkiFaLQePWJ8WZFWNjC/Jn/H9uXVEea0gUuDc8InV0twOswkXwIuZyFWv6V2HaQRk795 xGfBrPoTrJKHnnFH+We8n4OHyYly+UrGcHcdgrO/R3piCIV93WQLoNRQyLbka738K7Xj BVmLwq6uMnARCEW7ndDdIll8l1mudS+LwbQ7jI4MoGxd7TkD46x1FrqeJpqb+W7dqXPc +oPfUpIG5weyY3FvbXDveNuE38qCo3TJyFFnX1iQ88RLnlJaVOf5SNPjegyHa+uGLFT4 P+uA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=d1+BTdxj2KV5OgO7Eh6W4io7PjLKDST3CdGEejtC8Ek=; b=kU45R/j86xE5QhcS9N7g4yNBjOOPABbtpab1+kC4JAkih6HN46/18o4k6qsq//oi8G PwMjpato6G59hGvWxg0KQhYw6zKdla+BIp8K0hm1WJ8jxnUT1NiWWyt3PxjpPWoMndpH BuKv+UEw0yjgOkqM6DtgbD4vvs89MJ8KZmoLbxGVBgraYUs8L676+R3rw633UWwFyeRk 963FJ5rg09SmZuMQVLg+7GKEJVh8qGBpsaK1/qhWQI7hNJiDfPSk785f4PpXdglxOBY4 0U8Otv3jqNGaCVmdy1bwfTfF4+SgT2RlOmkTWB1/B7TRPCTQEquboQbM9s+kDMPEjPCF eyaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dSh4XoBP; 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 m3si21698239pfh.58.2018.12.06.01.39.25; Thu, 06 Dec 2018 01:39:25 -0800 (PST) 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=dSh4XoBP; 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 S1729411AbeLFJjX (ORCPT + 31 others); Thu, 6 Dec 2018 04:39:23 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:52746 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727783AbeLFJjX (ORCPT ); Thu, 6 Dec 2018 04:39:23 -0500 Received: by mail-wm1-f68.google.com with SMTP id r11-v6so271361wmb.2 for ; Thu, 06 Dec 2018 01:39:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d1+BTdxj2KV5OgO7Eh6W4io7PjLKDST3CdGEejtC8Ek=; b=dSh4XoBP8vXWpfC9HCta3u+XGs3mBkgTnmWZxZ29DeeQ4ctzubRlMVn4ewPLPdbVju 8oVHRcbDYqNytGck5LGb18FLlAzgBHpRrekM/paGu/hpCS2tXWUFi2Nf5YtkqqxfkSsk zE+5QUZV22v9hBI7LZ9M7XxTk1YPzt6fLmHaQ= 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:mime-version :content-transfer-encoding; bh=d1+BTdxj2KV5OgO7Eh6W4io7PjLKDST3CdGEejtC8Ek=; b=slzgSW+WOph/yxXN2UcpUAb2KRUHkRgV32os0fYEwrsAvRc5kRAzZeGrYivFK8JGke U/hgQdSZUpECADFHJ7BNEOBcPhZX406vvTCz/fMxPAPlLzG0w66DoyyjC55AaE9Ng1OJ SoHgtiMUdHvLfs/PFqhZ8FIG9hBw56aZ1eHnQqdonFzbk6w0tzsn38HHT5qTHRrv4u5n qCz3EUbwijEZruKKkv6/ga9aYyRJZwMBAyNwepAtMlWFpUnrHHX4U8Sn7vg5QxM9ajHn syY77n8raKga8KcBPH+p/SrgxGoaXumcXQTyf5f8jQZ4rV+8/gFDXWYRHm1lELS3MlNK 4b3Q== X-Gm-Message-State: AA+aEWbuRsSj1ALjhB70Y58bBoRKyXifL9egauIQx8mG4PxZzS/3qC6p H8o11UJnVBpdHJQhJCq0WO2OJA== X-Received: by 2002:a1c:4c0c:: with SMTP id z12mr14769713wmf.17.1544089161511; Thu, 06 Dec 2018 01:39:21 -0800 (PST) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id o81sm378003wmd.10.2018.12.06.01.39.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Dec 2018 01:39:20 -0800 (PST) From: Srinivas Kandagatla To: amit.kucheria@linaro.org, edubezval@gmail.com Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, daniel.lezcano@linaro.org, Srinivas Kandagatla Subject: [PATCH v2] thermal: tsens: qcom: do not create duplicate regmap debugfs entries Date: Thu, 6 Dec 2018 09:39:17 +0000 Message-Id: <20181206093917.26610-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Regmap would use device name to create debugfs entries. If the device has multiple regmaps it is recommended to use name field in regmap_config. Fix this by providing name to the regmap configs correctly. Without this patch we would see below error on DB820c. qcom-tsens 4a9000.thermal-sensor: Failed to create 4a9000.thermal-sensor debugfs directory Signed-off-by: Srinivas Kandagatla Acked-by: Amit Kucheria Tested-by: Amit Kucheria --- Changes since v1: -rename tsens_config to tsens_tm_config as suggested by Amit. drivers/thermal/qcom/tsens-common.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) -- 2.19.2 diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index 3be4be2e0465..ddfdf88ffb4e 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -113,7 +113,15 @@ int get_temp_common(struct tsens_device *tmdev, int id, int *temp) return 0; } -static const struct regmap_config tsens_config = { +static const struct regmap_config tsens_tm_config = { + .name = "tm", + .reg_bits = 32, + .val_bits = 32, + .reg_stride = 4, +}; + +static const struct regmap_config tsens_srot_config = { + .name = "srot", .reg_bits = 32, .val_bits = 32, .reg_stride = 4, @@ -139,8 +147,8 @@ int __init init_common(struct tsens_device *tmdev) if (IS_ERR(srot_base)) return PTR_ERR(srot_base); - tmdev->srot_map = devm_regmap_init_mmio(tmdev->dev, - srot_base, &tsens_config); + tmdev->srot_map = devm_regmap_init_mmio(tmdev->dev, srot_base, + &tsens_srot_config); if (IS_ERR(tmdev->srot_map)) return PTR_ERR(tmdev->srot_map); @@ -154,7 +162,8 @@ int __init init_common(struct tsens_device *tmdev) if (IS_ERR(tm_base)) return PTR_ERR(tm_base); - tmdev->tm_map = devm_regmap_init_mmio(tmdev->dev, tm_base, &tsens_config); + tmdev->tm_map = devm_regmap_init_mmio(tmdev->dev, tm_base, + &tsens_tm_config); if (IS_ERR(tmdev->tm_map)) return PTR_ERR(tmdev->tm_map);