From patchwork Thu Apr 6 14:58:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 670952 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B0B9C77B70 for ; Thu, 6 Apr 2023 14:59:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239128AbjDFO7A (ORCPT ); Thu, 6 Apr 2023 10:59:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239084AbjDFO67 (ORCPT ); Thu, 6 Apr 2023 10:58:59 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5CE18A7E for ; Thu, 6 Apr 2023 07:58:55 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id d17so39790605wrb.11 for ; Thu, 06 Apr 2023 07:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680793134; x=1683385134; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zNY1WgFE5W0+EDCsEQWZ33KMDgDEFiFDJkuxdC14U6c=; b=lsMZ/tmQGh0+Gqb95YSagOXlgovDFj8+1loUBZniBPTntn/h5IVkYuQn7ILSUiUVYq aYG9W1n2NKs2RptvcozWQPSf7ZiDwxLfvfzk9UiJw/4tHPRk21e260kkMA/jnzZBPjfN Gr1plOLPrjpPSR0yFk6Z9QNGTRVpkWqLhnZ5Vm0GN/LuZ6WsYtGrUpFFzHamAhcbP87e 3RvCX7bxDIB/qxO3F1sgfYMCRb/6l9ygjdBvhYUwzHTy9HYG0+SS4BsOfB+47W4hrlhQ yOTzP4LrDo7vULF8GRQ+uS04+C8AOlUZ5dpWBOexEQRaejsNhuHOFUDwU6oQEmdmu5xY z0AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680793134; x=1683385134; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zNY1WgFE5W0+EDCsEQWZ33KMDgDEFiFDJkuxdC14U6c=; b=7pUmLnmzzdSDjeTWtRrU/6YKoWLO4Kv5m/i4/gdHixKpvTE3E42j3iOCeLWZjUUOlT JBoPXUgTNuUlf1xzl6oU4AGUWbuQD+ttjrF28gYToiUAmkONZTPyZP6+QqKJUeq2TlLT utrfItQ3qSrz1j5uDRFs40zH1QrUkXRJSBRLL7PZFvGYEVo68i8VU9vBVhHmaKdOb7PH 6KEWyL+Lge+9k1kcgRLhHKE3okvivjfCXR1PoLjQW4C9WoexufcE5dYoz6nv2JI8aLgN Ue+jIgnjq+v47V3sqqxcw9jnojKPvsrB6GlsX5DaVpcaBnTXlImDDwNhpuraygczE6gi 8Vbg== X-Gm-Message-State: AAQBX9d7oKweW8Rsf/rPQkbgwDYtv5q0lUZISurLN1uG7KKMhqaMl+Fd 7ijs+z0YxmJb0m+9XS5fXE/S4A== X-Google-Smtp-Source: AKy350Y5/8nzIFtA5GLno7AkNOE83NgVqaQKljVOSMfIXaK0nWcT0TmjC4AnNwjBHz1+YX5CvUKlMw== X-Received: by 2002:a5d:440d:0:b0:2d8:cacd:797e with SMTP id z13-20020a5d440d000000b002d8cacd797emr7051511wrq.10.1680793133951; Thu, 06 Apr 2023 07:58:53 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id d10-20020a1c730a000000b003f0373d077csm1768160wmb.47.2023.04.06.07.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 07:58:53 -0700 (PDT) From: Bryan O'Donoghue To: amitk@kernel.org, thara.gopinath@gmail.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, rafael@kernel.org, daniel.lezcano@linaro.org, rui.zhang@intel.com, dmitry.baryshkov@linaro.org Cc: linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue Subject: [PATCH 1/3] thermal/drivers/tsens: Add error/debug prints to calibration read Date: Thu, 6 Apr 2023 15:58:48 +0100 Message-Id: <20230406145850.357296-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406145850.357296-1-bryan.odonoghue@linaro.org> References: <20230406145850.357296-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add in some dev_dbg() to aid in viewing of raw calibration data extracted. Signed-off-by: Bryan O'Donoghue --- drivers/thermal/qcom/tsens.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index d3218127e617d..7165b0bfe8b9f 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -115,8 +115,12 @@ int tsens_read_calibration(struct tsens_priv *priv, int shift, u32 *p1, u32 *p2, return ret; ret = nvmem_cell_read_variable_le_u32(priv->dev, name, &p1[i]); - if (ret) + if (ret) { + dev_err(priv->dev, "Failed to read %s\n", name); return ret; + } + + dev_dbg(priv->dev, "%s 0x%x\n", name, p1[i]); ret = snprintf(name, sizeof(name), "s%d_p2%s", priv->sensor[i].hw_id, backup ? "_backup" : ""); @@ -124,8 +128,12 @@ int tsens_read_calibration(struct tsens_priv *priv, int shift, u32 *p1, u32 *p2, return ret; ret = nvmem_cell_read_variable_le_u32(priv->dev, name, &p2[i]); - if (ret) + if (ret) { + dev_err(priv->dev, "Failed to read %s\n", name); return ret; + } + + dev_dbg(priv->dev, "%s 0x%x\n", name, p2[i]); } switch (mode) {