Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2875561imu; Mon, 19 Nov 2018 07:25:34 -0800 (PST) X-Google-Smtp-Source: AJdET5f/EJOOeb1dTnU4Bk/11GMB1u83+LIr9a8NTqIpDltyqfsL9jL4VTq+A2rwN25Gofs/Kq9h X-Received: by 2002:a17:902:a601:: with SMTP id u1mr22755134plq.77.1542641133995; Mon, 19 Nov 2018 07:25:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542641133; cv=none; d=google.com; s=arc-20160816; b=VgVfqMSEckfQfn49+epHDwDee3QPbnym49LYVKggRDsyev4t+kkz90nwpWkp+xA+Fx Lg3CZPc0N6gTQHl1Ycefj+MCDhs4cwAAZw0DJo5ydC4e2dhejpBKeD9IuIxlhiop3i1Z jDwx57jYrDmvZY90LDARHOT0Ytky1LqQxeMMsC4ex4k4VYcB7u6NRkxFZrxNXs0qkNbD d7XLa79UJPlQ4MwNDMTkxE8ewLFcQ+1br89oRUMJlK729G21aG0N6IT8JCoGi0Tcb/zY uVscSFZrySVIpQYiFNscSnV44QXrHk4k56Oqq0T2st+7hbVg0BfI3w2St3YE1r3C81k1 vScg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7v9ifr9DKIZvKyNCR25kpbfcPqULn5218MHkC3ZE8TQ=; b=uLFje7TaKJx1dliylWMdor5EAyzoILVcnRgefaEj/bNPreQFeiGbcObAbGiFyKgvu3 dzghTZj9ANgBXzdF72hvxifFV+FH4orzW1jwCJ9LesojnbALoUyZh947AapyrYmjLvnO RvZtVaTIzsTb8C/2Ck7knDIaObe8LKIRnIwAtU/iY0HIxL6TwxcIxnlwKrXsuyjTVKkw 0sczedInOQ15WasOxxQIud/eook39cXuLAbY8jRzl24n/fBlRQgEJMJNRdUV0zN5fOta mZDGphEtW+v4JdwEARSi8Ww/7lku2Dj0XBonBY8LdNowAJSEWjdDT3kxrTy9BtqBEoZ+ uJJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BtSOfl6+; 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 g7si20484257plq.336.2018.11.19.07.25.17; Mon, 19 Nov 2018 07:25:33 -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=BtSOfl6+; 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 S1729847AbeKTBqk (ORCPT + 99 others); Mon, 19 Nov 2018 20:46:40 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:36659 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729483AbeKTBqk (ORCPT ); Mon, 19 Nov 2018 20:46:40 -0500 Received: by mail-qk1-f196.google.com with SMTP id o125so49127660qkf.3 for ; Mon, 19 Nov 2018 07:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7v9ifr9DKIZvKyNCR25kpbfcPqULn5218MHkC3ZE8TQ=; b=BtSOfl6+DQe3a8zRJFfZunn006Yb+kwzv6GSPNuPVmtboudZ93hAdHHtQ/OixteWcZ nueiRpKTh2JwXpoFERlhw5jvkBDPk63xcXq1h5c39WAhvH5lI6pPTNv5gSvs+Uo9jp58 5GAdQ9KBR3uEVRh1HpItUbGsbFaZ/sZihddl8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7v9ifr9DKIZvKyNCR25kpbfcPqULn5218MHkC3ZE8TQ=; b=S4gdtK+GRlGpPI6RcB61KCrzJbSyH/ieDgAvfmgMNrX5yBEvR8EioqFhuLXAPwz/0f R8M6U6wCHQcYNrn+Zq7Iseuf35TmOO3Ka5nsWBOc8NR3HRO3fidpaM1i1RIFpaqrxRQf f1Pxd4jxlRV2NrqpcIXWnnnaraJO6wKY6I7ROISEXnXZanqhOueUNg0ugyJS/wy9ZGeI ILM+lGjD+Kz6o8a9CQ0e9l2ufv73NVRpHamUbF2pxrMdpCbM3xJArDixWUAafdagNlsq X/90kUHZ/q8iGPPQ0eGySEAgeUydEL9qPLTsr9evC8eoPvN6w9XBUCbk2FmdYb9ewALE TJNw== X-Gm-Message-State: AGRZ1gKFCbhRvvFiUmbI7x3dUWV0ORbILswgVLh6K2xTjCXrdxyCz3la HS9L9/fWlhg5/mInu3LrjPVfWgBjyYWxmKvPD0uz5w== X-Received: by 2002:ac8:203:: with SMTP id k3mr22035482qtg.64.1542640964256; Mon, 19 Nov 2018 07:22:44 -0800 (PST) MIME-Version: 1.0 References: <20181115174330.15224-1-srinivas.kandagatla@linaro.org> In-Reply-To: <20181115174330.15224-1-srinivas.kandagatla@linaro.org> From: Amit Kucheria Date: Mon, 19 Nov 2018 20:52:33 +0530 Message-ID: Subject: Re: [PATCH] thermal: tsens: qcom: do not create duplicate regmap debugfs entries To: Srinivas Kandagatla Cc: Eduardo Valentin , Linux Kernel Mailing List , linux-arm-msm , Linux PM list , Daniel Lezcano Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 15, 2018 at 11:15 PM Srinivas Kandagatla wrote: > > 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 Good catch! > Signed-off-by: Srinivas Kandagatla Acked-by: Amit Kucheria Tested-by: Amit Kucheria after a minor fix below... > --- > 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 = { I suggest renaming this to tsens_tm_config and modifying the corresponding devm_regmap_init_mmio below. > + .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 >