* [PATCH v3 1/3] pinctrl: cs42l43: Tidy up header includes
@ 2024-01-29 15:31 Charles Keepax
2024-01-29 15:31 ` [PATCH v3 2/3] pinctrl: cs42l43: Remove some needless inlines Charles Keepax
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Charles Keepax @ 2024-01-29 15:31 UTC (permalink / raw)
To: linus.walleij; +Cc: andy.shevchenko, patches, linux-gpio
Fixup a couple of incorrect header includes.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
No changes since v2.
Thanks,
Charles
drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
index 012b0a3bad5a..24e21d1e0d06 100644
--- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
+++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
@@ -5,10 +5,10 @@
// Copyright (c) 2023 Cirrus Logic, Inc. and
// Cirrus Logic International Semiconductor Ltd.
+#include <linux/array_size.h>
#include <linux/bits.h>
#include <linux/build_bug.h>
#include <linux/err.h>
-#include <linux/errno.h>
#include <linux/gpio/driver.h>
#include <linux/mfd/cs42l43.h>
#include <linux/mfd/cs42l43-regs.h>
@@ -17,7 +17,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
-#include <linux/string_helpers.h>
+#include <linux/string_choices.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/pinctrl.h>
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/3] pinctrl: cs42l43: Remove some needless inlines
2024-01-29 15:31 [PATCH v3 1/3] pinctrl: cs42l43: Tidy up header includes Charles Keepax
@ 2024-01-29 15:31 ` Charles Keepax
2024-01-29 15:31 ` [PATCH 3/3] pinctrl: cs42l43: Use str_high_low() Charles Keepax
2024-01-31 8:11 ` [PATCH v3 1/3] pinctrl: cs42l43: Tidy up header includes Linus Walleij
2 siblings, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2024-01-29 15:31 UTC (permalink / raw)
To: linus.walleij; +Cc: andy.shevchenko, patches, linux-gpio
Remove some pointless inline declarations, no reason not to let the
compiler decide.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
No changes since v2.
Thanks,
Charles
drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
index 24e21d1e0d06..ac3df58bbe95 100644
--- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
+++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
@@ -276,7 +276,7 @@ static const struct pinmux_ops cs42l43_pin_mux_ops = {
static const unsigned int cs42l43_pin_drv_str_ma[] = { 1, 2, 4, 8, 9, 10, 12, 16 };
-static inline int cs42l43_pin_get_drv_str(struct cs42l43_pin *priv, unsigned int pin)
+static int cs42l43_pin_get_drv_str(struct cs42l43_pin *priv, unsigned int pin)
{
const struct cs42l43_pin_data *pdat = cs42l43_pin_pins[pin].drv_data;
unsigned int val;
@@ -289,8 +289,8 @@ static inline int cs42l43_pin_get_drv_str(struct cs42l43_pin *priv, unsigned int
return cs42l43_pin_drv_str_ma[(val & pdat->mask) >> pdat->shift];
}
-static inline int cs42l43_pin_set_drv_str(struct cs42l43_pin *priv, unsigned int pin,
- unsigned int ma)
+static int cs42l43_pin_set_drv_str(struct cs42l43_pin *priv, unsigned int pin,
+ unsigned int ma)
{
const struct cs42l43_pin_data *pdat = cs42l43_pin_pins[pin].drv_data;
int i;
@@ -314,7 +314,7 @@ static inline int cs42l43_pin_set_drv_str(struct cs42l43_pin *priv, unsigned int
return -EINVAL;
}
-static inline int cs42l43_pin_get_db(struct cs42l43_pin *priv, unsigned int pin)
+static int cs42l43_pin_get_db(struct cs42l43_pin *priv, unsigned int pin)
{
unsigned int val;
int ret;
@@ -332,8 +332,8 @@ static inline int cs42l43_pin_get_db(struct cs42l43_pin *priv, unsigned int pin)
return 85; // Debounce is roughly 85uS
}
-static inline int cs42l43_pin_set_db(struct cs42l43_pin *priv, unsigned int pin,
- unsigned int us)
+static int cs42l43_pin_set_db(struct cs42l43_pin *priv, unsigned int pin,
+ unsigned int us)
{
if (pin >= CS42L43_NUM_GPIOS)
return -ENOTSUPP;
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] pinctrl: cs42l43: Use str_high_low()
2024-01-29 15:31 [PATCH v3 1/3] pinctrl: cs42l43: Tidy up header includes Charles Keepax
2024-01-29 15:31 ` [PATCH v3 2/3] pinctrl: cs42l43: Remove some needless inlines Charles Keepax
@ 2024-01-29 15:31 ` Charles Keepax
2024-01-31 8:11 ` [PATCH v3 1/3] pinctrl: cs42l43: Tidy up header includes Linus Walleij
2 siblings, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2024-01-29 15:31 UTC (permalink / raw)
To: linus.walleij; +Cc: andy.shevchenko, patches, linux-gpio
Use str_high_low() rather than open coding.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
Changes since v2:
- Added missing brackets in commit message.
Thanks,
Charles
drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
index ac3df58bbe95..628b60ccc2b0 100644
--- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
+++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
@@ -490,7 +490,7 @@ static void cs42l43_gpio_set(struct gpio_chip *chip, unsigned int offset, int va
int ret;
dev_dbg(priv->dev, "Setting gpio%d to %s\n",
- offset + 1, value ? "high" : "low");
+ offset + 1, str_high_low(value));
ret = pm_runtime_resume_and_get(priv->dev);
if (ret) {
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 1/3] pinctrl: cs42l43: Tidy up header includes
2024-01-29 15:31 [PATCH v3 1/3] pinctrl: cs42l43: Tidy up header includes Charles Keepax
2024-01-29 15:31 ` [PATCH v3 2/3] pinctrl: cs42l43: Remove some needless inlines Charles Keepax
2024-01-29 15:31 ` [PATCH 3/3] pinctrl: cs42l43: Use str_high_low() Charles Keepax
@ 2024-01-31 8:11 ` Linus Walleij
2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2024-01-31 8:11 UTC (permalink / raw)
To: Charles Keepax; +Cc: andy.shevchenko, patches, linux-gpio
On Mon, Jan 29, 2024 at 4:31 PM Charles Keepax
<ckeepax@opensource.cirrus.com> wrote:
> Fixup a couple of incorrect header includes.
>
> Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
All patches applied, thanks!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-31 8:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 15:31 [PATCH v3 1/3] pinctrl: cs42l43: Tidy up header includes Charles Keepax
2024-01-29 15:31 ` [PATCH v3 2/3] pinctrl: cs42l43: Remove some needless inlines Charles Keepax
2024-01-29 15:31 ` [PATCH 3/3] pinctrl: cs42l43: Use str_high_low() Charles Keepax
2024-01-31 8:11 ` [PATCH v3 1/3] pinctrl: cs42l43: Tidy up header includes Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).