public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Hans de Goede" <hdegoede@redhat.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Thierry Reding <thierry.reding@gmail.com>
Subject: [PATCH v4 6/7] pwm: lpss: Make use of bits.h macros for all masks
Date: Tue, 27 Sep 2022 19:24:20 +0300	[thread overview]
Message-ID: <20220927162421.11052-7-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20220927162421.11052-1-andriy.shevchenko@linux.intel.com>

Make use of the GENMASK() (far less error-prone, far more concise).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-lpss.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c
index a20915459809..accdef5dd58e 100644
--- a/drivers/pwm/pwm-lpss.c
+++ b/drivers/pwm/pwm-lpss.c
@@ -10,6 +10,7 @@
  * Author: Alan Cox <alan@linux.intel.com>
  */
 
+#include <linux/bits.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
@@ -26,7 +27,7 @@
 #define PWM_ENABLE			BIT(31)
 #define PWM_SW_UPDATE			BIT(30)
 #define PWM_BASE_UNIT_SHIFT		8
-#define PWM_ON_TIME_DIV_MASK		0x000000ff
+#define PWM_ON_TIME_DIV_MASK		GENMASK(7, 0)
 
 /* Size of each PWM register space if multiple */
 #define PWM_SIZE			0x400
-- 
2.35.1


  parent reply	other threads:[~2022-09-27 16:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 16:24 [PATCH v4 0/7] pwm: lpss: Clean up and convert to a pure library Andy Shevchenko
2022-09-27 16:24 ` [PATCH v4 1/7] pwm: lpss: Deduplicate board info data structures Andy Shevchenko
2022-09-27 16:24 ` [PATCH v4 2/7] pwm: lpss: Move exported symbols to PWM_LPSS namespace Andy Shevchenko
2022-09-27 16:24 ` [PATCH v4 3/7] pwm: lpss: Move resource mapping to the glue drivers Andy Shevchenko
2022-09-27 16:24 ` [PATCH v4 4/7] pwm: lpss: Use device_get_match_data to get device data Andy Shevchenko
2022-09-27 16:24 ` [PATCH v4 5/7] pwm: lpss: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros Andy Shevchenko
2022-09-27 16:24 ` Andy Shevchenko [this message]
2022-09-28 14:20   ` [PATCH v4 6/7] pwm: lpss: Make use of bits.h macros for all masks Thierry Reding
2022-09-28 14:43     ` Andy Shevchenko
2022-09-28 14:49       ` Thierry Reding
2022-09-27 16:24 ` [PATCH v4 7/7] pwm: lpss: Add a comment to the bypass field Andy Shevchenko
2022-09-28 14:22 ` [PATCH v4 0/7] pwm: lpss: Clean up and convert to a pure library Thierry Reding
2022-09-28 14:45   ` Andy Shevchenko

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=20220927162421.11052-7-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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