From: wangkaiyuan <wangkaiyuan@inspur.com>
To: <gregkh@linuxfoundation.org>, <jirislaby@kernel.org>,
<hvilleneuve@dimonoff.com>, <andy.shevchenko@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-serial@vger.kernel.org>,
wangkaiyuan <wangkaiyuan@inspur.com>
Subject: [PATCH 1/2] tty: serial: max310x: convert to use maple tree register cache
Date: Mon, 18 Mar 2024 14:40:36 +0800 [thread overview]
Message-ID: <20240318064036.1656-1-wangkaiyuan@inspur.com> (raw)
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: wangkaiyuan <wangkaiyuan@inspur.com>
---
drivers/tty/serial/max310x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 14dd9cfaa9f7..3b72b2137275 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1478,7 +1478,7 @@ static struct regmap_config regcfg = {
.reg_bits = 8,
.val_bits = 8,
.write_flag_mask = MAX310X_WRITE_BIT,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
.max_register = MAX310X_REG_1F,
.writeable_reg = max310x_reg_writeable,
.volatile_reg = max310x_reg_volatile,
@@ -1582,7 +1582,7 @@ static int max310x_i2c_extended_reg_enable(struct device *dev, bool enable)
static struct regmap_config regcfg_i2c = {
.reg_bits = 8,
.val_bits = 8,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
.writeable_reg = max310x_reg_writeable,
.volatile_reg = max310x_reg_volatile,
.precious_reg = max310x_reg_precious,
--
2.27.0
next reply other threads:[~2024-03-18 6:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 6:40 wangkaiyuan [this message]
2024-03-18 8:30 ` [PATCH 1/2] tty: serial: max310x: convert to use maple tree register cache Andy Shevchenko
2024-04-09 13:39 ` Greg KH
2024-04-09 13:40 ` Greg KH
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=20240318064036.1656-1-wangkaiyuan@inspur.com \
--to=wangkaiyuan@inspur.com \
--cc=andy.shevchenko@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hvilleneuve@dimonoff.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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