From: chengwei <foxfly.lai.tw@gmail.com>
To: lee@kernel.org, broonie@kernel.org, rafael@kernel.org,
mika.westerberg@linux.intel.com,
andriy.shevchenko@linux.intel.com, linus.walleij@linaro.org,
brgl@bgdev.pl
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-gpio@vger.kernel.org, GaryWang@aaeon.com.tw,
musa.lin@yunjingtech.com, jack.chang@yunjingtech.com,
chengwei <larry.lai@yunjingtech.com>,
Nicola Lunghi <nicola.lunghi@emutex.com>
Subject: [PATCH 2/5] regmap: Expose regmap_writeable function to check if a register is writable
Date: Wed, 19 Oct 2022 10:24:47 +0800 [thread overview]
Message-ID: <20221019022450.16851-3-larry.lai@yunjingtech.com> (raw)
In-Reply-To: <20221019022450.16851-1-larry.lai@yunjingtech.com>
Expose the regmap_writeable function for pinctrl-upboard reference.
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: chengwei <larry.lai@yunjingtech.com>
---
drivers/base/regmap/internal.h | 5 -----
drivers/base/regmap/regmap.c | 5 +++++
include/linux/regmap.h | 6 ++++++
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index da8996e7a1f1..eec477755a5c 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -190,11 +190,6 @@ struct regcache_ops {
int (*drop)(struct regmap *map, unsigned int min, unsigned int max);
};
-bool regmap_cached(struct regmap *map, unsigned int reg);
-bool regmap_writeable(struct regmap *map, unsigned int reg);
-bool regmap_readable(struct regmap *map, unsigned int reg);
-bool regmap_volatile(struct regmap *map, unsigned int reg);
-bool regmap_precious(struct regmap *map, unsigned int reg);
bool regmap_writeable_noinc(struct regmap *map, unsigned int reg);
bool regmap_readable_noinc(struct regmap *map, unsigned int reg);
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index fee221c5008c..182536fcce46 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -100,6 +100,7 @@ bool regmap_writeable(struct regmap *map, unsigned int reg)
return true;
}
+EXPORT_SYMBOL_GPL(regmap_writeable);
bool regmap_cached(struct regmap *map, unsigned int reg)
{
@@ -123,6 +124,7 @@ bool regmap_cached(struct regmap *map, unsigned int reg)
return true;
}
+EXPORT_SYMBOL_GPL(regmap_cached);
bool regmap_readable(struct regmap *map, unsigned int reg)
{
@@ -143,6 +145,7 @@ bool regmap_readable(struct regmap *map, unsigned int reg)
return true;
}
+EXPORT_SYMBOL_GPL(regmap_readable);
bool regmap_volatile(struct regmap *map, unsigned int reg)
{
@@ -160,6 +163,7 @@ bool regmap_volatile(struct regmap *map, unsigned int reg)
else
return true;
}
+EXPORT_SYMBOL_GPL(regmap_volatile);
bool regmap_precious(struct regmap *map, unsigned int reg)
{
@@ -174,6 +178,7 @@ bool regmap_precious(struct regmap *map, unsigned int reg)
return false;
}
+EXPORT_SYMBOL_GPL(regmap_precious);
bool regmap_writeable_noinc(struct regmap *map, unsigned int reg)
{
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 7cf2157134ac..4bfa681805cb 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -1225,6 +1225,12 @@ void regcache_mark_dirty(struct regmap *map);
bool regmap_check_range_table(struct regmap *map, unsigned int reg,
const struct regmap_access_table *table);
+bool regmap_cached(struct regmap *map, unsigned int reg);
+bool regmap_writeable(struct regmap *map, unsigned int reg);
+bool regmap_readable(struct regmap *map, unsigned int reg);
+bool regmap_volatile(struct regmap *map, unsigned int reg);
+bool regmap_precious(struct regmap *map, unsigned int reg);
+
int regmap_register_patch(struct regmap *map, const struct reg_sequence *regs,
int num_regs);
int regmap_parse_val(struct regmap *map, const void *buf,
--
2.17.1
next prev parent reply other threads:[~2022-10-19 2:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 2:24 [PATCH 0/5] Add support control UP board CPLD/FPGA pin control chengwei
2022-10-19 2:24 ` [PATCH 1/5] mfd: Add support for UP board CPLD/FPGA chengwei
2022-10-31 14:58 ` Lee Jones
[not found] ` <SG2PR06MB37422173908A6584B3D6D349F93F9@SG2PR06MB3742.apcprd06.prod.outlook.com>
2022-11-08 15:53 ` 回覆: " gregkh
[not found] ` <SG2PR06MB3742D3714B6A255914DC73E4F93F9@SG2PR06MB3742.apcprd06.prod.outlook.com>
2022-11-08 17:24 ` gregkh
2022-11-14 10:09 ` Lee Jones
2022-11-09 4:18 ` Larry Lai
2022-10-19 2:24 ` chengwei [this message]
2022-10-19 11:57 ` [PATCH 2/5] regmap: Expose regmap_writeable function to check if a register is writable Mark Brown
2022-10-19 2:24 ` [PATCH 3/5] ACPI: acpi_node_add_pin_mapping added to header file chengwei
2022-10-19 13:32 ` Andy Shevchenko
2022-10-19 2:24 ` [PATCH 4/5] GPIO ACPI: Add support to map GPIO resources to ranges chengwei
2022-10-19 13:36 ` Andy Shevchenko
2022-10-19 2:24 ` [PATCH 5/5] pinctrl: Add support pin control for UP board CPLD/FPGA chengwei
2022-10-20 16:58 ` Andy Shevchenko
2022-10-21 9:09 ` Linus Walleij
2022-10-21 10:55 ` 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=20221019022450.16851-3-larry.lai@yunjingtech.com \
--to=foxfly.lai.tw@gmail.com \
--cc=GaryWang@aaeon.com.tw \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jack.chang@yunjingtech.com \
--cc=larry.lai@yunjingtech.com \
--cc=lee@kernel.org \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=musa.lin@yunjingtech.com \
--cc=nicola.lunghi@emutex.com \
--cc=rafael@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
all inboxes | Powered by JetHome®