Skip to content

Commit 3de1436

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
Documentation: gpio: Replace leading TABs by spaces in code blocks
Code blocks are indented with two spaces. If there's a leading TAB, the syntax highlighting might be broken in some editors. To prevent that, unify all code blocks by using spaces instead of leading TAB(s). Signed-off-by: Andy Shevchenko <[email protected]> [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 1685f72 commit 3de1436

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Documentation/driver-api/gpio/driver.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This document serves as a guide for writers of GPIO chip drivers.
77
Each GPIO controller driver needs to include the following header, which defines
88
the structures used to define a GPIO driver::
99

10-
#include <linux/gpio/driver.h>
10+
#include <linux/gpio/driver.h>
1111

1212

1313
Internal Representation of GPIOs
@@ -144,7 +144,7 @@ is not open, it will present a high-impedance (tristate) to the external rail::
144144
in ----|| |/
145145
||--+ in ----|
146146
| |\
147-
GND GND
147+
GND GND
148148

149149
This configuration is normally used as a way to achieve one of two things:
150150

@@ -550,10 +550,10 @@ the interrupt separately and go with it:
550550
struct my_gpio *g;
551551
struct gpio_irq_chip *girq;
552552
553-
ret = devm_request_threaded_irq(dev, irq, NULL,
554-
irq_thread_fn, IRQF_ONESHOT, "my-chip", g);
553+
ret = devm_request_threaded_irq(dev, irq, NULL, irq_thread_fn,
554+
IRQF_ONESHOT, "my-chip", g);
555555
if (ret < 0)
556-
return ret;
556+
return ret;
557557
558558
/* Get a pointer to the gpio_irq_chip */
559559
girq = &g->gc.irq;
@@ -681,12 +681,12 @@ certain operations and keep track of usage inside of the gpiolib subsystem.
681681
Input GPIOs can be used as IRQ signals. When this happens, a driver is requested
682682
to mark the GPIO as being used as an IRQ::
683683

684-
int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset)
684+
int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset)
685685

686686
This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock
687687
is released::
688688

689-
void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset)
689+
void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset)
690690

691691
When implementing an irqchip inside a GPIO driver, these two functions should
692692
typically be called in the .startup() and .shutdown() callbacks from the
@@ -708,12 +708,12 @@ When a GPIO is used as an IRQ signal, then gpiolib also needs to know if
708708
the IRQ is enabled or disabled. In order to inform gpiolib about this,
709709
the irqchip driver should call::
710710

711-
void gpiochip_disable_irq(struct gpio_chip *chip, unsigned int offset)
711+
void gpiochip_disable_irq(struct gpio_chip *chip, unsigned int offset)
712712

713713
This allows drivers to drive the GPIO as an output while the IRQ is
714714
disabled. When the IRQ is enabled again, a driver should call::
715715

716-
void gpiochip_enable_irq(struct gpio_chip *chip, unsigned int offset)
716+
void gpiochip_enable_irq(struct gpio_chip *chip, unsigned int offset)
717717

718718
When implementing an irqchip inside a GPIO driver, these two functions should
719719
typically be called in the .irq_disable() and .irq_enable() callbacks from the
@@ -763,12 +763,12 @@ Sometimes it is useful to allow a GPIO chip driver to request its own GPIO
763763
descriptors through the gpiolib API. A GPIO driver can use the following
764764
functions to request and free descriptors::
765765

766-
struct gpio_desc *gpiochip_request_own_desc(struct gpio_desc *desc,
767-
u16 hwnum,
768-
const char *label,
769-
enum gpiod_flags flags)
766+
struct gpio_desc *gpiochip_request_own_desc(struct gpio_desc *desc,
767+
u16 hwnum,
768+
const char *label,
769+
enum gpiod_flags flags)
770770

771-
void gpiochip_free_own_desc(struct gpio_desc *desc)
771+
void gpiochip_free_own_desc(struct gpio_desc *desc)
772772

773773
Descriptors requested with gpiochip_request_own_desc() must be released with
774774
gpiochip_free_own_desc().

0 commit comments

Comments
 (0)