From: Sasha Levin <sashal@kernel•org>
To: linux-kernel@vger•kernel.org, stable@vger•kernel.org
Cc: Sasha Levin <sashal@kernel•org>,
linux-pwm@vger•kernel.org,
Thierry Reding <thierry.reding@gmail•com>,
linux-arm-kernel@lists•infradead.org,
Alexander Shiyan <shc_work@mail•ru>
Subject: [PATCH AUTOSEL 4.19 137/219] pwm: clps711x: Fix period calculation
Date: Fri, 22 Nov 2019 00:47:49 -0500 [thread overview]
Message-ID: <20191122054911.1750-130-sashal@kernel.org> (raw)
In-Reply-To: <20191122054911.1750-1-sashal@kernel.org>
From: Alexander Shiyan <shc_work@mail•ru>
[ Upstream commit b0f17570b8203c22f139459c86cfbaa0311313ed ]
Commit e39c0df1be5a ("pwm: Introduce the pwm_args concept") has
changed the variable for the period for clps711x-pwm driver, so now
pwm_get/set_period() works with pwm->state.period variable instead
of pwm->args.period.
This patch changes the period variable in other places where it is used.
Signed-off-by: Alexander Shiyan <shc_work@mail•ru>
Signed-off-by: Thierry Reding <thierry.reding@gmail•com>
Signed-off-by: Sasha Levin <sashal@kernel•org>
---
drivers/pwm/pwm-clps711x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-clps711x.c b/drivers/pwm/pwm-clps711x.c
index 26ec24e457b12..7e16b7def0dcb 100644
--- a/drivers/pwm/pwm-clps711x.c
+++ b/drivers/pwm/pwm-clps711x.c
@@ -48,7 +48,7 @@ static void clps711x_pwm_update_val(struct clps711x_chip *priv, u32 n, u32 v)
static unsigned int clps711x_get_duty(struct pwm_device *pwm, unsigned int v)
{
/* Duty cycle 0..15 max */
- return DIV_ROUND_CLOSEST(v * 0xf, pwm_get_period(pwm));
+ return DIV_ROUND_CLOSEST(v * 0xf, pwm->args.period);
}
static int clps711x_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
@@ -71,7 +71,7 @@ static int clps711x_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
struct clps711x_chip *priv = to_clps711x_chip(chip);
unsigned int duty;
- if (period_ns != pwm_get_period(pwm))
+ if (period_ns != pwm->args.period)
return -EINVAL;
duty = clps711x_get_duty(pwm, duty_ns);
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-11-22 5:58 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-22 5:45 [PATCH AUTOSEL 4.19 008/219] ARM: dts: imx51: Fix memory node duplication Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 009/219] ARM: dts: imx53: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 010/219] ARM: dts: imx31: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 011/219] ARM: dts: imx35: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 012/219] ARM: dts: imx7: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 013/219] ARM: dts: imx6ul: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 014/219] ARM: dts: imx6sx: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 015/219] ARM: dts: imx6sl: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 016/219] ARM: dts: imx50: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 017/219] ARM: dts: imx23: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 018/219] ARM: dts: imx1: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 019/219] ARM: dts: imx27: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 020/219] ARM: dts: imx25: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 021/219] ARM: dts: imx53-voipac-dmm-668: " Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 025/219] arm64: mm: Prevent mismatched 52-bit VA support Sasha Levin
2019-11-22 5:45 ` [PATCH AUTOSEL 4.19 026/219] arm64: smp: Handle errors reported by the firmware Sasha Levin
2019-11-22 5:46 ` [PATCH AUTOSEL 4.19 029/219] ARM: OMAP1: fix USB configuration for device-only setups Sasha Levin
2019-11-22 5:46 ` [PATCH AUTOSEL 4.19 031/219] arm64: preempt: Fix big-endian when checking preempt count in assembly Sasha Levin
2019-12-14 2:14 ` Steven Rostedt
2019-12-16 9:45 ` Will Deacon
2019-12-18 15:38 ` Steven Rostedt
2019-12-18 20:11 ` Greg Kroah-Hartman
2019-12-18 15:40 ` Steven Rostedt
2019-12-18 16:03 ` Will Deacon
2019-11-22 5:46 ` [PATCH AUTOSEL 4.19 035/219] ARM: ks8695: fix section mismatch warning Sasha Levin
2019-11-22 5:46 ` [PATCH AUTOSEL 4.19 068/219] mmc: meson-gx: make sure the descriptor is stopped on errors Sasha Levin
2019-11-22 5:46 ` [PATCH AUTOSEL 4.19 069/219] mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET Sasha Levin
2019-11-22 5:47 ` [PATCH AUTOSEL 4.19 136/219] MIPS: BCM63XX: fix switch core reset on BCM6368 Sasha Levin
2019-11-22 5:47 ` Sasha Levin [this message]
2019-11-22 5:47 ` [PATCH AUTOSEL 4.19 146/219] net: stmicro: fix a missing check of clk_prepare Sasha Levin
2019-11-22 5:48 ` [PATCH AUTOSEL 4.19 162/219] firmware: arm_sdei: fix wrong of_node_put() in init function Sasha Levin
2019-11-22 5:48 ` [PATCH AUTOSEL 4.19 163/219] firmware: arm_sdei: Fix DT platform device creation Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191122054911.1750-130-sashal@kernel.org \
--to=sashal@kernel$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-pwm@vger$(echo .)kernel.org \
--cc=shc_work@mail$(echo .)ru \
--cc=stable@vger$(echo .)kernel.org \
--cc=thierry.reding@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox