Message ID | 20240224112902.55539-2-Leif.Middelschulte@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-79587-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1099978dyb; Sat, 24 Feb 2024 03:29:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCULs6roGdglAyDIMUaMpA5RpoNtfd7iDcQUMldTqPoKA9tyymXoOWeNjk27yONycdnB7AY4vDT7KpGhE9aE7NYE0XASZA== X-Google-Smtp-Source: AGHT+IFDwCrUpBgYh9FEqNAqZnnQa1LnvXq7N5cI7Yf2WTvzkDQRJB3E6i50kVKj2aoNfx7qG1VE X-Received: by 2002:ac8:5b8a:0:b0:42e:792b:7e03 with SMTP id a10-20020ac85b8a000000b0042e792b7e03mr154174qta.46.1708774180619; Sat, 24 Feb 2024 03:29:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708774180; cv=pass; d=google.com; s=arc-20160816; b=0giI8wlEpr3bIns/Gg+Inn5PNAHUy8FMa1k7aBsdxPHA13LQTmL8bFtD+YxMEj/c2+ plrl+7wJOc4qVPOYLGB2dEre1jb0xaM/OC21b9/WiaWY8ZOmM2Rtrq7T0P76cSJn5yVj sKHxCde3bhjYXVgE5VFM0bh9cMfQVSV6o0w6HSoydvd50ZgA/vw8g6PedbCY2Cg0ZmrQ p0j9EKwYVl/YcI6R55gfZB/nvgL5zdQySS7ma/4g8ZfQdjNQftMtyV1+jjNCC/E4OaVr NRTQ/JJGuZ4z88DbOCIw7t5bpr9+A/ur/VA6GqxuNK5XYCZckYWIXX7CFc6rn9aGi+gt Qmkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4MmK3Tpm9+5KttJbHDCWPd/7vMZzGKkTnGzOOVkaN4Y=; fh=k5pj6gPi6gDXcZEIB4KnVWwXiviziq6ShGcZ4dHCpME=; b=t/k/MEklMm9/Raq2iQmxdzrP3iXdCSGGq59WGzeKr2euG24zGmaNJeplNc/tTtIufY 8tzPkP/Rmh9fZlUYryjD0vJxRzMqzrcz+Cfi2dHEFTMiOMxnHrVL+a8AsE/CYTe1JLw+ VNeAxiNuXEd6n0Oo2kcLl9+FtjQYKc1dZRX/LlObhCUMzBhw84GAqxFO8V54XIS14fVR bAM0QF5QWTRW+WgM1BV/GvhSSM1PFKqSlYchY6cTKv6M5P18jENub80rsdJ08cFZoEEN 1QoMsMQjOEWgIt/g1c3OOInUIHiylsJTNqxe37IbhH2anuflovzjhLW65AuF1hlG/c9i 8N5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QyTK5cBN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-79587-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79587-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w8-20020ac87e88000000b0042e4f157265si919975qtj.241.2024.02.24.03.29.40 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 03:29:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79587-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QyTK5cBN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-79587-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79587-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6AF111C21652 for <ouuuleilei@gmail.com>; Sat, 24 Feb 2024 11:29:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60553364CF; Sat, 24 Feb 2024 11:29:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QyTK5cBN" Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 493BC250EB; Sat, 24 Feb 2024 11:29:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708774165; cv=none; b=Zf/3FtF6L0BzZi6IFQarlG2m2VA0cWEn6nZx5bWn/BknkUfQyRtQi90xlkP0vBTL95j8G9w/u4N/iODgNKa8nyGwXFWgMz0ZbEy/MZmjJgbC7kHNhFUY1SE9TDAFljnVLSze+yHpEqsoZtcDuFqLaW/PId3SJvVljfoTygNkdhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708774165; c=relaxed/simple; bh=oLDwwbjlfldA8YTQKnJROMeakHh9GmORvJ1FZwNxLQI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FOGwdlMw0QvT4EAWfH7CLVzHobaLEIljuXoKG4uwcD3oWNCDQk3fKtQSuYdISNibscVexGocorcuU2ZdWVoeGIfPo4jGOJ7HgVicdlyXv5XQjrdK9FhpJ6QgnkbnfDKPxtxPNfBKd4AeSLBSjpd5P7Yhf1thwGyNPxr7iXriEbM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QyTK5cBN; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-55a5e7fa471so2116350a12.1; Sat, 24 Feb 2024 03:29:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708774162; x=1709378962; darn=vger.kernel.org; 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=4MmK3Tpm9+5KttJbHDCWPd/7vMZzGKkTnGzOOVkaN4Y=; b=QyTK5cBNd+V4/72EdyRSZjyYIQkT0EvAM8EpS03PVsfDyO24mIjDkTMXkiiRuxYO3m 1oWu9ckdD86DH6cFjzTZBCF1V6kT2S0N0mvSqniIV+11BmVNFtBdjlHBxgmw/CSt0cNf PQIb1f0ka/aiBVFDPqGcZCXYHyI94tYD46hsqr4/rpRveQj6vOeV01CVCOSQE7TblzOW GmNGCrKpXSzd4J01HvpF15Jtvhjzr6ZwTQEz5+jiHQhPKftrPsDLwRooSiireOJ5hkw4 Zol9mboP2mxH3kEKYQvQYSz9hKd1Y1ilFP6xBKETs3enqiUacIZF3rBL389sB5EB5f4m 9yUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708774162; x=1709378962; 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=4MmK3Tpm9+5KttJbHDCWPd/7vMZzGKkTnGzOOVkaN4Y=; b=CTB3TdLsdSidA4RZwAsfRzarZZ3ECbcGJsTpJZ2eHF6wou3db/aFd4/ODGj0Lny7pP N1AAZqVFvXYHSvbw625LRdnmXI++lm9y+FTwvRyut4Ap4PoHKYZruaKb1wx0Sb5cI+8y ACjSGJDqwbmXzr1Z0utdpiLkMiBidRNNO3nxwZ0XZFS000018oSRvmavBaK3sT8x8xZu 9cRn/N5sbpI+a29jyx+933/N16r7MT94eyAlm0Gw7vGDI7tBhTCTnFD0DQZ2H82gsMAs Slwvio6Dxeg8gbrRyu75WIXlx+ifWJ4CsDVlgAMP/NlvHuq6G/Cwex72966lxqsq5kB4 88aQ== X-Forwarded-Encrypted: i=1; AJvYcCXrrztE18pTD05NPJWW/4zUY+2GMw7ZUJrVvwccJ2C7FsTHiMLFcBHe3jqiOx1FqxV8/jq+vfxk8zOeXFHiVTENUPJYrWTOjgnLyOJO997dgkXI998uWQB8J1I/pk47xwBrH2O26UJa X-Gm-Message-State: AOJu0YyYF/v8oFLzq9LEClZcyk6Bo2OI7FNmOtkXX/s9rwiKrO8NYtU+ qyv2OpqCsyG0canakju7+qNkTu2bRPlzyzPzoKCAOU48QlPl5Iwc X-Received: by 2002:a17:906:3449:b0:a41:31ed:acd5 with SMTP id d9-20020a170906344900b00a4131edacd5mr1438285ejb.50.1708774162367; Sat, 24 Feb 2024 03:29:22 -0800 (PST) Received: from localhost.localdomain (p5dc68d61.dip0.t-ipconnect.de. [93.198.141.97]) by smtp.gmail.com with ESMTPSA id s1-20020a170906060100b00a3d9e6e9983sm507181ejb.174.2024.02.24.03.29.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 24 Feb 2024 03:29:21 -0800 (PST) From: Leif Middelschulte <leif.middelschulte@gmail.com> X-Google-Original-From: Leif Middelschulte <Leif.Middelschulte@gmail.com> To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com> Cc: Leif Middelschulte <Leif.Middelschulte@gmail.com>, linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/2] pwm: imx27: avoid PWM consumer API Date: Sat, 24 Feb 2024 12:29:01 +0100 Message-Id: <20240224112902.55539-2-Leif.Middelschulte@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-145) In-Reply-To: <20240224112902.55539-1-Leif.Middelschulte@gmail.com> References: <20230906154215.4ikrrbx4xgx2nmu5@pengutronix.de> <20240224112902.55539-1-Leif.Middelschulte@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791779595197171736 X-GMAIL-MSGID: 1791779595197171736 |
Series |
[v4,1/2] pwm: imx27: fix race condition .apply,.get_state
|
|
Commit Message
Leif Middelschulte
Feb. 24, 2024, 11:29 a.m. UTC
Access struct members directly.
Signed-off-by: Leif Middelschulte <Leif.Middelschulte@gmail.com>
---
drivers/pwm/pwm-imx27.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello Leif, On Sat, Feb 24, 2024 at 12:29:01PM +0100, Leif Middelschulte wrote: > diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c > index cb564460b79c..d00d79a5edb1 100644 > --- a/drivers/pwm/pwm-imx27.c > +++ b/drivers/pwm/pwm-imx27.c > @@ -255,7 +255,7 @@ static void pwm_imx27_wait_fifo_slot(struct pwm_chip *chip, > sr = readl(imx->mmio_base + MX3_PWMSR); > fifoav = FIELD_GET(MX3_PWMSR_FIFOAV, sr); > if (fifoav == MX3_PWMSR_FIFOAV_4WORDS) { > - period_ms = DIV_ROUND_UP_ULL(pwm_get_period(pwm), > + period_ms = DIV_ROUND_UP_ULL(pwm->state.period, > NSEC_PER_MSEC); > msleep(period_ms); This doesn't apply anymore on top of pwm/for-next. See commit 1706175c682fdb3fbe0b70d50b137aaa270959db which includes this change (and more). Best regards Uwe
diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c index cb564460b79c..d00d79a5edb1 100644 --- a/drivers/pwm/pwm-imx27.c +++ b/drivers/pwm/pwm-imx27.c @@ -255,7 +255,7 @@ static void pwm_imx27_wait_fifo_slot(struct pwm_chip *chip, sr = readl(imx->mmio_base + MX3_PWMSR); fifoav = FIELD_GET(MX3_PWMSR_FIFOAV, sr); if (fifoav == MX3_PWMSR_FIFOAV_4WORDS) { - period_ms = DIV_ROUND_UP_ULL(pwm_get_period(pwm), + period_ms = DIV_ROUND_UP_ULL(pwm->state.period, NSEC_PER_MSEC); msleep(period_ms);