From patchwork Thu Nov 15 17:43:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 151231 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7294091ljp; Thu, 15 Nov 2018 09:45:52 -0800 (PST) X-Google-Smtp-Source: AJdET5dLzpj6yEzSWk1PBhLtoDUjId28IEpiY44onogBJZh6yGOElJBTbkgnC2JhEWB7yfO0/Iem X-Received: by 2002:a63:ce08:: with SMTP id y8mr6599781pgf.388.1542303952369; Thu, 15 Nov 2018 09:45:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542303952; cv=none; d=google.com; s=arc-20160816; b=EEGw8gfwMjfLQuhS6nIKtEVx8UeltG5k2aqeA/fEpd7qRMMbkKPx//J5y9zTuQ/Ji1 J09NUkUq5Jwwcimv0k1TjrReqqpohFYhZEjPrsymoFq/BdeABN4Lyn2gJJ1sQqf/HQfh 75aX2etqtW6GJqyf5YTKuVSr1DTetJ8I/+udGugGTMkG1t2An3DTb34PNQZHO94wzDMO q6dDM3rmlk71dsDHRG+A0K9V5AhTiVuIHhO6+aEu/FfKy7ujvyLoIFuXPNoWmHFrVbJt i00GReaqV7/BR8C4Ez5f81TmhOPJxVXTQP0p3ImKWjV0+0EPcB6KXC9uY2ASVZDWTb6t 6tlw== 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=s7mFBLtR5NCuK1acH7SmQqwojPNJoa/6zGwgaHNyGl0=; b=FazyqdQnq+b/UslCYuW8OueRNYnFPBTtnFX06gMkhix4oZEXlEe53cIVLhU/INoc8w QiQy7E6KPPcwkLAJkiKBdZvQHEdLqe6S3nip9B8khOzczxdzqORMNgirYihPt0riIrIt O9DiThc9M0hNnK0BGTAi9SbJJsDbR3Yg/b3ponJYq3rwLmNPFGPgWdXZjDiIdhfx0Nmq PEW0pxpMAm/z+nEM745GZlzOUOuiv+7tw1qwuloe7vp2po+MQZW4DVo9yNE8OapsVbim pXlddSS71k/uZ+IQ4XRnlsOotOGFT0hX+xii9wD1xlETO8dQKYGchvghk6fVojdt/1OJ smEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GNj0nIuv; 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 l70-v6si29699724pfg.136.2018.11.15.09.45.50; Thu, 15 Nov 2018 09:45:52 -0800 (PST) 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=GNj0nIuv; 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 S1726746AbeKPDyf (ORCPT + 11 others); Thu, 15 Nov 2018 22:54:35 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43827 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388388AbeKPDyf (ORCPT ); Thu, 15 Nov 2018 22:54:35 -0500 Received: by mail-wr1-f66.google.com with SMTP id r10so4612851wrs.10 for ; Thu, 15 Nov 2018 09:45:48 -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=s7mFBLtR5NCuK1acH7SmQqwojPNJoa/6zGwgaHNyGl0=; b=GNj0nIuvKAIf65HoVclCUVVSydu9MU05sKa3HF4fJ3t1NIZnh2HE1FJo9OFovHqxfl FWObvDsbUq96+KPduazm777pyE+4nBvWNRc3IREXkviyxsOKqGLZtNeNuPsQRoENRW4K 1qfu8Z0z7M+LZSjLemphYlEs+fGyKXBaS+DaY= 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=s7mFBLtR5NCuK1acH7SmQqwojPNJoa/6zGwgaHNyGl0=; b=mc4tjmWbaGxMCoiln7Kn/M5GOP6wQECMyOOCIwWvaUi93rwfJqWOcpi2cHGyv2yu6D abgkSmU3ZG5w63rs++O1tGieZjNEO0EpwZ+7jiaxA/cooL3tkzqWiFJq5KxLmBRk6A6z QJhYeY8hxWEIEZ8r+ilzSfQ6rZtkbNesbe8rwXRjJFciekTb2LwHlcYlWz4OU7F/3Odo U9ebYsovYT//uwAn1gG6Qt+HIhyxaNQ0pJDnfHHcLT/IaQADsitLiLXulICDMAJh3JY9 oZ6umUbucK1UzdsJWPH58+JdSWdABG1Jmt7sgIfCbo7Zo+zPSwmsKuQ9RQaBZmSNk4VI tThA== X-Gm-Message-State: AGRZ1gLz5X0rPDM53SAQV1q9jl04GPBKD3xyI95ux+OB1FJzy4hEbvRQ Ad35CuGoN7nuCRt9ercNSOkyog== X-Received: by 2002:a05:6000:1048:: with SMTP id c8mr6751562wrx.171.1542303947259; Thu, 15 Nov 2018 09:45:47 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id 6-v6sm18776168wra.35.2018.11.15.09.45.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Nov 2018 09:45:46 -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] thermal: tsens: qcom: do not create duplicate regmap debugfs entries Date: Thu, 15 Nov 2018 17:43:30 +0000 Message-Id: <20181115174330.15224-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- drivers/thermal/qcom/tsens-common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 2.19.1 diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index 3be4be2e0465..78652cac7f3d 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -114,6 +114,14 @@ int get_temp_common(struct tsens_device *tmdev, int id, int *temp) } static const struct regmap_config tsens_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);