Skip to content

Commit

Permalink
gpio: winbond: Add driver
Browse files Browse the repository at this point in the history
This commit adds GPIO driver for Winbond Super I/Os.

Currently, only W83627UHG model (also known as Nuvoton NCT6627UD)
is supported but in the future a support for other Winbond models,
too, can be added to the driver.

A module parameter "gpios" sets a bitmask of GPIO ports to enable
(bit 0 is GPIO1, bit 1 is GPIO2, etc.).

One should be careful which ports one tinkers with since some
might be managed by the firmware (for functions like powering on and
off, sleeping, BIOS recovery, etc.) and some of GPIO port pins are
physically shared with other devices included in the Super I/O chip.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Maciej S. Szmigiero authored and Linus Walleij committed Jan 9, 2018
1 parent c858233 commit a0d6500
Show file tree
Hide file tree
Showing 3 changed files with 749 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,22 @@ config GPIO_TS5500
blocks of the TS-5500: DIO1, DIO2 and the LCD port, and the TS-5600
LCD port.

config GPIO_WINBOND
tristate "Winbond Super I/O GPIO support"
select ISA_BUS_API
help
This option enables support for GPIOs found on Winbond Super I/O
chips.
Currently, only W83627UHG (also known as Nuvoton NCT6627UD) is
supported.

You will need to provide a module parameter "gpios", or a
boot-time parameter "gpio_winbond.gpios" with a bitmask of GPIO
ports to enable (bit 0 is GPIO1, bit 1 is GPIO2, etc.).

To compile this driver as a module, choose M here: the module will
be called gpio-winbond.

config GPIO_WS16C48
tristate "WinSystems WS16C48 GPIO support"
depends on ISA_BUS_API
Expand Down
1 change: 1 addition & 0 deletions drivers/gpio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ obj-$(CONFIG_GPIO_VIPERBOARD) += gpio-viperboard.o
obj-$(CONFIG_GPIO_VR41XX) += gpio-vr41xx.o
obj-$(CONFIG_GPIO_VX855) += gpio-vx855.o
obj-$(CONFIG_GPIO_WHISKEY_COVE) += gpio-wcove.o
obj-$(CONFIG_GPIO_WINBOND) += gpio-winbond.o
obj-$(CONFIG_GPIO_WM831X) += gpio-wm831x.o
obj-$(CONFIG_GPIO_WM8350) += gpio-wm8350.o
obj-$(CONFIG_GPIO_WM8994) += gpio-wm8994.o
Expand Down
Loading

0 comments on commit a0d6500

Please sign in to comment.