From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Kim Kyuwon <q1.kim@samsung.com>, Evgeniy Dushistov <dushistov@mail.ru>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] Input: max7359_keypad - fix coding style issues
Date: Wed, 11 Nov 2026 22:50:58 -0800 [thread overview]
Message-ID: <20261112065059.1802480-3-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <20261112065059.1802480-1-dmitry.torokhov@gmail.com>
Include <linux/bits.h> and switch the configuration register definitions
to use the BIT() macro. Also align the arguments with the open
parenthesis in max7359_initialize().
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/keyboard/max7359_keypad.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/input/keyboard/max7359_keypad.c b/drivers/input/keyboard/max7359_keypad.c
index 686832fe2931..c6673bda67ba 100644
--- a/drivers/input/keyboard/max7359_keypad.c
+++ b/drivers/input/keyboard/max7359_keypad.c
@@ -10,13 +10,14 @@
* Datasheet: http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5456
*/
-#include <linux/module.h>
+#include <linux/bits.h>
#include <linux/i2c.h>
-#include <linux/slab.h>
-#include <linux/interrupt.h>
-#include <linux/pm.h>
#include <linux/input.h>
#include <linux/input/matrix_keypad.h>
+#include <linux/interrupt.h>
+#include <linux/module.h>
+#include <linux/pm.h>
+#include <linux/slab.h>
#define MAX7359_MAX_KEY_ROWS 8
#define MAX7359_MAX_KEY_COLS 8
@@ -37,11 +38,11 @@
/*
* Configuration register bits
*/
-#define MAX7359_CFG_SLEEP (1 << 7)
-#define MAX7359_CFG_INTERRUPT (1 << 5)
-#define MAX7359_CFG_KEY_RELEASE (1 << 3)
-#define MAX7359_CFG_WAKEUP (1 << 1)
-#define MAX7359_CFG_TIMEOUT (1 << 0)
+#define MAX7359_CFG_SLEEP BIT(7)
+#define MAX7359_CFG_INTERRUPT BIT(5)
+#define MAX7359_CFG_KEY_RELEASE BIT(3)
+#define MAX7359_CFG_WAKEUP BIT(1)
+#define MAX7359_CFG_TIMEOUT BIT(0)
/*
* Autosleep register values (ms)
@@ -143,8 +144,8 @@ static void max7359_close(struct input_dev *dev)
static void max7359_initialize(struct i2c_client *client)
{
max7359_write_reg(client, MAX7359_REG_CONFIG,
- MAX7359_CFG_KEY_RELEASE | /* Key release enable */
- MAX7359_CFG_WAKEUP); /* Key press wakeup enable */
+ MAX7359_CFG_KEY_RELEASE | /* Key release enable */
+ MAX7359_CFG_WAKEUP); /* Key press wakeup enable */
/* Full key-scan functionality */
max7359_write_reg(client, MAX7359_REG_DEBOUNCE, 0x1F);
--
2.56.0.567.gdb80ae8cd5-goog
prev parent reply other threads:[~2026-11-12 6:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 6:50 [PATCH 0/2] Input: max7359_keypad - drop platform data support and style fixes Dmitry Torokhov
2026-11-12 6:50 ` [PATCH 1/2] Input: max7359_keypad - drop platform data support Dmitry Torokhov
2026-11-12 6:50 ` Dmitry Torokhov [this message]
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=20261112065059.1802480-3-dmitry.torokhov@gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=dushistov@mail.ru \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=q1.kim@samsung.com \
/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
all inboxes | Powered by JetHome®