Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2659392imj; Mon, 11 Feb 2019 06:36:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IYqZRFFbK+tubU1CDBH4eX7Rz6tGfIZjJYBFBihr3MuZwAv+/qiUA7YX9LMRuS5ds0/d815 X-Received: by 2002:a62:a9b:: with SMTP id 27mr19265243pfk.223.1549895797793; Mon, 11 Feb 2019 06:36:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895797; cv=none; d=google.com; s=arc-20160816; b=l1QYDNC3wYQU7cMJuDQp5G2wjdUh24GYewuVSOi54b43BJL5BSuC+xAAJc0lXW2trY UD5H/BcK6RL2qBVm8NLUcBW0vQ9vb3LMRduVgsw71ZDM5fE+44mMk9jvpQiznx+VrcDv DIocbC6ciDvHZn0VNDIjVvKzbgh9w6T13LmYqHoIwiy4hWtPvje/R48OWdlVgCpey7OK qg/XZE6heUd4UdzwidyVK+2Y2ZON41xMwSin4y4cV7+M2TWvp+cl+dJugGTXsGnxWT0s 1PzHvVSAqRu905Mlfrl+D4xVMKjTsJsh75IOfAUY7g0ahIBVLpFqJMskK5wpHjTsanmS Wlhg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9yFETgGH2Le46VPtIhyHYklDDoXbCzaZ4sU21YN/FYs=; b=cAfUvobFGOH6c6D+VGm6cqgzHFUXocj5UshK2OsImzCzidbFHTqMUsVGeCwWcWeKH9 JwVKVu5zT/3ZxEEDnIHJDY8FN7clxHWuThb4Olxidj5q60Np4qQIoBRWegpqJbWMiQIS XXIxMlv+GCkyhXf13Cm/I6H2je/d58R8c6Q4zNSRI39POXBnt8Vuy4fZwhYT/VijfOBr xV9WKMAwmVTmCMrP9W1bLi34ANVD5rpUYYprIF/VvcYQgvjPsVlFGnHN7fQLGHHmZYLc vg+HwBZNmTilBCUZy6FqHZM4zOsRMHf9LU4xxh2d8w1Zr6+7uvaqy4wJAjdtPRGZ3y+L 3PMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PB6dfXuj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m32si10462020pld.262.2019.02.11.06.36.21; Mon, 11 Feb 2019 06:36:37 -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=@kernel.org header.s=default header.b=PB6dfXuj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730874AbfBKOee (ORCPT + 99 others); Mon, 11 Feb 2019 09:34:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:42818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730867AbfBKOeb (ORCPT ); Mon, 11 Feb 2019 09:34:31 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB1EF2081B; Mon, 11 Feb 2019 14:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895671; bh=471p3E0aVKn+D59PmlE8kZS00zNQFH7ptb7h0xFTbj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PB6dfXuj2HQmZIXeIw0w15v5Juc8x+DiXSn3FJsJ4u2CqOANzai19kqRSRTpwkN05 pu17ybx00am5McQBTCCSbs4X/DJ6cb/AZtXSYDqXNbWiV/5OWKWsS6kTkoeCRV9RtQ Fgf/gNmJ5jjEhTVqi3DTeTQDczrZPSnZLLXuToKE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Amit Kucheria , Eduardo Valentin , Sasha Levin Subject: [PATCH 4.20 276/352] thermal: tsens: qcom: do not create duplicate regmap debugfs entries Date: Mon, 11 Feb 2019 15:18:23 +0100 Message-Id: <20190211141904.535641198@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 4ab248b3b10a58e379e2d32333fff99ea5ca256c ] 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 Signed-off-by: Eduardo Valentin Signed-off-by: Sasha Levin --- 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); -- 2.19.1