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: 10684771 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E1B5109C for ; Thu, 15 Nov 2018 17:45:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DE8529182 for ; Thu, 15 Nov 2018 17:45:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81A4E2B4E6; Thu, 15 Nov 2018 17:45:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2447629182 for ; Thu, 15 Nov 2018 17:45:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbeKPDyf (ORCPT ); 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-Google-Smtp-Source: AJdET5cACGltDGqGJv5/GP/+1gB25qr7Xn911kkRTGIixYFTmtWxSrJFuO4WyCnhtziHEzc9uBRcLw== 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 X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/thermal/qcom/tsens-common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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);