* [PATCH] gpio: move gpiod_set_array_value_priv()
@ 2016-04-26 8:51 Linus Walleij
2016-04-28 5:59 ` Alexandre Courbot
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2016-04-26 8:51 UTC (permalink / raw)
To: linux-gpio, Alexandre Courbot; +Cc: Linus Walleij
This renames gpiod_set_array_value_priv() to
gpiod_set_array_value_complex() and moves it to the gpiolib.h
private header file so we can reuse it in the subsystem.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/gpio/gpiolib.c | 24 ++++++++++++------------
drivers/gpio/gpiolib.h | 4 ++++
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 59a0d8e98a04..bb3195d5e3af 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1825,10 +1825,10 @@ static void gpio_chip_set_multiple(struct gpio_chip *chip,
}
}
-static void gpiod_set_array_value_priv(bool raw, bool can_sleep,
- unsigned int array_size,
- struct gpio_desc **desc_array,
- int *value_array)
+void gpiod_set_array_value_complex(bool raw, bool can_sleep,
+ unsigned int array_size,
+ struct gpio_desc **desc_array,
+ int *value_array)
{
int i = 0;
@@ -1934,8 +1934,8 @@ void gpiod_set_raw_array_value(unsigned int array_size,
{
if (!desc_array)
return;
- gpiod_set_array_value_priv(true, false, array_size, desc_array,
- value_array);
+ gpiod_set_array_value_complex(true, false, array_size, desc_array,
+ value_array);
}
EXPORT_SYMBOL_GPL(gpiod_set_raw_array_value);
@@ -1956,8 +1956,8 @@ void gpiod_set_array_value(unsigned int array_size,
{
if (!desc_array)
return;
- gpiod_set_array_value_priv(false, false, array_size, desc_array,
- value_array);
+ gpiod_set_array_value_complex(false, false, array_size, desc_array,
+ value_array);
}
EXPORT_SYMBOL_GPL(gpiod_set_array_value);
@@ -2160,8 +2160,8 @@ void gpiod_set_raw_array_value_cansleep(unsigned int array_size,
might_sleep_if(extra_checks);
if (!desc_array)
return;
- gpiod_set_array_value_priv(true, true, array_size, desc_array,
- value_array);
+ gpiod_set_array_value_complex(true, true, array_size, desc_array,
+ value_array);
}
EXPORT_SYMBOL_GPL(gpiod_set_raw_array_value_cansleep);
@@ -2183,8 +2183,8 @@ void gpiod_set_array_value_cansleep(unsigned int array_size,
might_sleep_if(extra_checks);
if (!desc_array)
return;
- gpiod_set_array_value_priv(false, true, array_size, desc_array,
- value_array);
+ gpiod_set_array_value_complex(false, true, array_size, desc_array,
+ value_array);
}
EXPORT_SYMBOL_GPL(gpiod_set_array_value_cansleep);
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index e30e5fdb1214..2d9ea5e0cab3 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -141,6 +141,10 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,
const char *list_name, int index, enum of_gpio_flags *flags);
struct gpio_desc *gpiochip_get_desc(struct gpio_chip *chip, u16 hwnum);
+void gpiod_set_array_value_complex(bool raw, bool can_sleep,
+ unsigned int array_size,
+ struct gpio_desc **desc_array,
+ int *value_array);
extern struct spinlock gpio_lock;
extern struct list_head gpio_devices;
--
2.4.11
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: move gpiod_set_array_value_priv()
2016-04-26 8:51 [PATCH] gpio: move gpiod_set_array_value_priv() Linus Walleij
@ 2016-04-28 5:59 ` Alexandre Courbot
2016-04-30 10:58 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Courbot @ 2016-04-28 5:59 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-gpio@vger.kernel.org, Alexandre Courbot
On Tue, Apr 26, 2016 at 5:51 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> This renames gpiod_set_array_value_priv() to
> gpiod_set_array_value_complex() and moves it to the gpiolib.h
> private header file so we can reuse it in the subsystem.
Why "complex"?
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: move gpiod_set_array_value_priv()
2016-04-28 5:59 ` Alexandre Courbot
@ 2016-04-30 10:58 ` Linus Walleij
0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2016-04-30 10:58 UTC (permalink / raw)
To: Alexandre Courbot; +Cc: linux-gpio@vger.kernel.org, Alexandre Courbot
On Thu, Apr 28, 2016 at 7:59 AM, Alexandre Courbot <gnurou@gmail.com> wrote:
> On Tue, Apr 26, 2016 at 5:51 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> This renames gpiod_set_array_value_priv() to
>> gpiod_set_array_value_complex() and moves it to the gpiolib.h
>> private header file so we can reuse it in the subsystem.
>
> Why "complex"?
Couldn't come up with anything better. It is not private anymore
as I want to break out the chardev stuff to its own file.
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Thanks!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-30 10:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26 8:51 [PATCH] gpio: move gpiod_set_array_value_priv() Linus Walleij
2016-04-28 5:59 ` Alexandre Courbot
2016-04-30 10:58 ` 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).