linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] gpio: mockup: Adjust documentation to the code
@ 2021-03-15 16:59 Andy Shevchenko
  2021-03-15 17:06 ` Andy Shevchenko
  2021-03-16 12:29 ` Bartosz Golaszewski
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-03-15 16:59 UTC (permalink / raw)
  To: Andy Shevchenko, Bartosz Golaszewski, linux-gpio, linux-doc,
	linux-kernel
  Cc: Linus Walleij, Jonathan Corbet

First of all one of the parameter missed 'mockup' in its name,
Second, the semantics of the integer pairs depends on the sign
of the base (the first value in the pair).

Update documentation to reflect the real code behaviour.

Fixes: 2fd1abe99e5f ("Documentation: gpio: add documentation for gpio-mockup")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 Documentation/admin-guide/gpio/gpio-mockup.rst | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Documentation/admin-guide/gpio/gpio-mockup.rst b/Documentation/admin-guide/gpio/gpio-mockup.rst
index 9fa1618b3adc..493071da1738 100644
--- a/Documentation/admin-guide/gpio/gpio-mockup.rst
+++ b/Documentation/admin-guide/gpio/gpio-mockup.rst
@@ -17,17 +17,18 @@ module.
     gpio_mockup_ranges
 
         This parameter takes an argument in the form of an array of integer
-        pairs. Each pair defines the base GPIO number (if any) and the number
-        of lines exposed by the chip. If the base GPIO is -1, the gpiolib
-        will assign it automatically.
+        pairs. Each pair defines the base GPIO number (non-negative integer)
+        and the first number after the last of this chip. If the base GPIO
+        is -1, the gpiolib will assign it automatically. while the following
+        parameter is the number of lines exposed by the chip.
 
-        Example: gpio_mockup_ranges=-1,8,-1,16,405,4
+        Example: gpio_mockup_ranges=-1,8,-1,16,405,409
 
         The line above creates three chips. The first one will expose 8 lines,
         the second 16 and the third 4. The base GPIO for the third chip is set
         to 405 while for two first chips it will be assigned automatically.
 
-    gpio_named_lines
+    gpio_mockup_named_lines
 
         This parameter doesn't take any arguments. It lets the driver know that
         GPIO lines exposed by it should be named.
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] gpio: mockup: Adjust documentation to the code
  2021-03-15 16:59 [PATCH v1 1/1] gpio: mockup: Adjust documentation to the code Andy Shevchenko
@ 2021-03-15 17:06 ` Andy Shevchenko
  2021-03-16 12:29 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-03-15 17:06 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM,
	Linux Documentation List, Linux Kernel Mailing List,
	Linus Walleij, Jonathan Corbet

On Mon, Mar 15, 2021 at 7:01 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> First of all one of the parameter missed 'mockup' in its name,
> Second, the semantics of the integer pairs depends on the sign
> of the base (the first value in the pair).

>          This parameter takes an argument in the form of an array of integer
> -        pairs. Each pair defines the base GPIO number (if any) and the number
> -        of lines exposed by the chip. If the base GPIO is -1, the gpiolib
> -        will assign it automatically.
> +        pairs. Each pair defines the base GPIO number (non-negative integer)
> +        and the first number after the last of this chip. If the base GPIO
> +        is -1, the gpiolib will assign it automatically. while the following
> +        parameter is the number of lines exposed by the chip.
>
> -        Example: gpio_mockup_ranges=-1,8,-1,16,405,4
> +        Example: gpio_mockup_ranges=-1,8,-1,16,405,409

Just a side note: it was always like this (I've checked the initial
gpio-mockup.c code). I think you have to add more test cases.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] gpio: mockup: Adjust documentation to the code
  2021-03-15 16:59 [PATCH v1 1/1] gpio: mockup: Adjust documentation to the code Andy Shevchenko
  2021-03-15 17:06 ` Andy Shevchenko
@ 2021-03-16 12:29 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2021-03-16 12:29 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-gpio, linux-doc, LKML, Linus Walleij, Jonathan Corbet

On Mon, Mar 15, 2021 at 5:59 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> First of all one of the parameter missed 'mockup' in its name,
> Second, the semantics of the integer pairs depends on the sign
> of the base (the first value in the pair).
>
> Update documentation to reflect the real code behaviour.
>
> Fixes: 2fd1abe99e5f ("Documentation: gpio: add documentation for gpio-mockup")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  Documentation/admin-guide/gpio/gpio-mockup.rst | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/admin-guide/gpio/gpio-mockup.rst b/Documentation/admin-guide/gpio/gpio-mockup.rst
> index 9fa1618b3adc..493071da1738 100644
> --- a/Documentation/admin-guide/gpio/gpio-mockup.rst
> +++ b/Documentation/admin-guide/gpio/gpio-mockup.rst
> @@ -17,17 +17,18 @@ module.
>      gpio_mockup_ranges
>
>          This parameter takes an argument in the form of an array of integer
> -        pairs. Each pair defines the base GPIO number (if any) and the number
> -        of lines exposed by the chip. If the base GPIO is -1, the gpiolib
> -        will assign it automatically.
> +        pairs. Each pair defines the base GPIO number (non-negative integer)
> +        and the first number after the last of this chip. If the base GPIO
> +        is -1, the gpiolib will assign it automatically. while the following
> +        parameter is the number of lines exposed by the chip.
>
> -        Example: gpio_mockup_ranges=-1,8,-1,16,405,4
> +        Example: gpio_mockup_ranges=-1,8,-1,16,405,409
>
>          The line above creates three chips. The first one will expose 8 lines,
>          the second 16 and the third 4. The base GPIO for the third chip is set
>          to 405 while for two first chips it will be assigned automatically.
>
> -    gpio_named_lines
> +    gpio_mockup_named_lines
>
>          This parameter doesn't take any arguments. It lets the driver know that
>          GPIO lines exposed by it should be named.
> --
> 2.30.2
>

Applied, thanks!

Bartosz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-16 12:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 16:59 [PATCH v1 1/1] gpio: mockup: Adjust documentation to the code Andy Shevchenko
2021-03-15 17:06 ` Andy Shevchenko
2021-03-16 12:29 ` Bartosz Golaszewski

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).