OSDN Git Service

gpio: loongson: Create a dynamic platform device
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 13 Apr 2018 10:05:36 +0000 (12:05 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 16 May 2018 12:35:24 +0000 (14:35 +0200)
commit70e703e7410c40b99499b214567c1b6c324e26c6
tree72bd5d3f3ef49b261d228bee43aba4bfbfb88ffe
parentf105edf70011859b33c3309f9c5ea96395cb616c
gpio: loongson: Create a dynamic platform device

It is pretty helpful to create some kind of device for backing the
GPIO chips, especially when preparing the driver for using
GENERIC_GPIO, so let's create a simple platform device and a simple
platform device driver and create the gpiochip in the .probe() routine
for the device driver. Keep all at the core initcall so the behaviour
is the same as before.

Cc: Keguang Zhang <keguang.zhang@gmail.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: linux-mips@linux-mips.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-loongson.c