# Re: \[PATCH 1/8\] pxa: support pxa168 LCD controller SPI operation

- From: Russell King - ARM Linux \<hidden\>
- Date: 2009-11-12 22:17:53 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2009/11/8539207
- Thread: https://ratatoskr.run/linux-arm-kernel/2009/11/8539009/t.md

```text
On Thu, Nov 12, 2009 at 10:16:16AM +0800, Jun Nie wrote:
> diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c
> index 84d8327..e1f1c5f 100644
> --- a/drivers/video/pxa168fb.c
> +++ b/drivers/video/pxa168fb.c
> @@ -27,12 +27,90 @@
>  #include <linux/clk.h>
>  #include <linux/err.h>
>  #include <linux/uaccess.h>
> +#include <linux/gpio.h>
>  #include <video/pxa168fb.h>
>  
> +#include <mach/gpio.h>

If you include linux/gpio.h, then if the right configuration symbol
(CONFIG_GENERIC_GPIO) is selected, asm/gpio.h and therefore mach/gpio.h
will be included for you.

> +static inline void spi_gpio_assert(int spi_gpio_cs, int val)
> +{
> +	       if (gpio_is_valid(spi_gpio_cs))
> +		                      gpio_set_value(spi_gpio_cs, val);

This seems to have style problems - please run it through checkpatch.
```
