Re: [PATCH 3/4] bcm2835-gpio-exp: Driver for GPIO expander via mailbox service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, Jan 2, 2018 at 2:19 PM, Baruch Siach <baruch@xxxxxxxxxx> wrote:

> +config GPIO_BCM_EXP
> +       bool "Broadcom Exp GPIO"
> +       depends on OF_GPIO && RASPBERRYPI_FIRMWARE && (ARCH_BCM2835 || COMPILE_TEST)
> +       help
> +         Turn on GPIO support for Broadcom chips using the firmware mailbox
> +         to communicate with VideoCore on BCM283x chips.

Should this be

default RASPBERRYPI_FIRMWARE

So it is always available if the firmware interface is there?

> +#include <linux/err.h>
> +#include <linux/gpio.h>

Just use

#include <linux/driver.h>

> +#define MODULE_NAME "brcmexp-gpio"
> +#define NUM_GPIO 8
> +
> +struct brcmexp_gpio {
> +       struct gpio_chip gc;
> +       struct device *dev;
> +       struct rpi_firmware *fw;
> +};
> +
> +struct gpio_set_config {
> +       u32 gpio, direction, polarity, term_en, term_pull_up, state;
> +};
> +
> +struct gpio_get_config {
> +       u32 gpio, direction, polarity, term_en, term_pull_up;
> +};

Seems to support some pin control stuff, hm?

The pull ups seems unused though so OK.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux