Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2768837ybh; Mon, 9 Mar 2020 12:36:17 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsrLRHixTXTwsjnxdnzW7rsCHzM0bIPU26o6eocxdspu3D0QHJAcICjG+WLt/Yl8wIDagmH X-Received: by 2002:a05:6830:1bc3:: with SMTP id v3mr14884596ota.310.1583782577504; Mon, 09 Mar 2020 12:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583782577; cv=none; d=google.com; s=arc-20160816; b=MJn6o4hEvCB05y4WosV3KGBCtAaVkyPFXQm0k/e/WpTdSguMDUiAsoYL5F+Mp/ZyiB GYrQDdSKuTOMTQZK5WOBWJ4sAdl3JLXmJya46N8uwU2z4Bh7rIEwRYNKgcmax0PJOyWG OvUtyejKXL29Xf8r2L7Qa5LjdY+E9Tkn6jP0J8V6Zx+OKgScYCytwjKpBBc+XfECxwiM 3eQBE1xOhf7I0vCtDje8hn8Q8OiaFxEkrdQnndZ3CX4dONrwGpls+KNjHtbYfTGuc6vl AEx2FmZKei2CAei41DJrpdO4R2ehx17fKu0lKNjhsDtDkE36IPl7fzOeMQqP6T8It3Zv ZDWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=dQGdCL5eovGMmGPtPMHBORJs3+wzx7nl1Vzh+bSWEzo=; b=lLPwtkXwpJmjymIvtcwdwaVvYar8WMv1gzYoEL4UfuqBkDKLTfZfmEVcOzg7jVufGf x7tzula0ntYUYhP246awS9f0FE+KZEgt5iweQw0tkA+fNZkVeitbGmUADlSG2FY+9NeN 6A5Y3JEblo7aQomvdOQNT//lRVYTaYxGQEJ5EZiNjw76PRiw6JRnSofxnFbFx+Dv42R4 KUhR0m57YUssiv4EoyyTbrXwN78mo7b9awu/AVLlLj9iAFYhhy+U9RLPI1+Tr42puxRx juOHhCtFfrLn4B/uOxWfPJXyHhY3q/pRHAZ2dP4UjBKcuF44SV78IzJqf7Um+2t+NTPo gPEw== ARC-Authentication-Results: i=1; mx.google.com; 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 p7si6391004ota.299.2020.03.09.12.36.05; Mon, 09 Mar 2020 12:36:17 -0700 (PDT) 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; 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 S1726766AbgCITfd (ORCPT + 99 others); Mon, 9 Mar 2020 15:35:33 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:22384 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbgCITfZ (ORCPT ); Mon, 9 Mar 2020 15:35:25 -0400 Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-02.qualcomm.com with ESMTP; 09 Mar 2020 12:35:22 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg03-sd.qualcomm.com with ESMTP; 09 Mar 2020 12:35:21 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id 148F94973; Mon, 9 Mar 2020 12:35:21 -0700 (PDT) From: Guru Das Srinagesh To: linux-pwm@vger.kernel.org Cc: Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Subbaraman Narayanamurthy , linux-kernel@vger.kernel.org, Guru Das Srinagesh , Fabrice Gasnier , Maxime Coquelin , Alexandre Torgue Subject: [PATCH v7 10/13] pwm: stm32-lp: Use %llu format specifier for period Date: Mon, 9 Mar 2020 12:35:13 -0700 Message-Id: <20ac22dbeb9e41bdcb594ee82f6ccd609c3426c6.1583782035.git.gurus@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because period and duty cycle are defined in the PWM framework structs as ints with units of nanoseconds, the maximum time duration that can be set is limited to ~2.147 seconds. Redefining them as u64 values will enable larger time durations to be set. As a first step, prepare this driver to handle the switch to u64 period and duty_cycle by updating the format specifier in this dev_dbg message. The actual switch to u64 period and duty_cycle follows as a separate patch. Cc: Fabrice Gasnier Cc: Maxime Coquelin Cc: Alexandre Torgue Signed-off-by: Guru Das Srinagesh --- drivers/pwm/pwm-stm32-lp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c index 67fca62..134c146 100644 --- a/drivers/pwm/pwm-stm32-lp.c +++ b/drivers/pwm/pwm-stm32-lp.c @@ -61,7 +61,7 @@ static int stm32_pwm_lp_apply(struct pwm_chip *chip, struct pwm_device *pwm, do_div(div, NSEC_PER_SEC); if (!div) { /* Clock is too slow to achieve requested period. */ - dev_dbg(priv->chip.dev, "Can't reach %u ns\n", state->period); + dev_dbg(priv->chip.dev, "Can't reach %llu ns\n", state->period); return -EINVAL; } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project