From: Jamie Lentin <jm@lentin.co.uk>
To: Andrew Lunn <andrew@lunn.ch>, Jason <jason@lakedaemon.net>
Cc: devicetree-discuss@lists.ozlabs.org,
Jamie Lentin <jm@lentin.co.uk>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: Kirkwood: Describe DNS32? gpio-keys in DT.
Date: Thu, 19 Jul 2012 21:31:00 +0100 [thread overview]
Message-ID: <1342729860-14647-5-git-send-email-jm@lentin.co.uk> (raw)
In-Reply-To: <1342729860-14647-1-git-send-email-jm@lentin.co.uk>
Move description of GPIO keys on both the DNS320 and DNS325 into DT.
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
arch/arm/boot/dts/kirkwood-dnskw.dtsi | 21 +++++++++++++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 37 ---------------------------------
2 files changed, 21 insertions(+), 37 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
index 067672c..2bad626 100644
--- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -4,6 +4,27 @@
model = "D-Link DNS NASes (kirkwood-based)";
compatible = "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood";
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ button@1 {
+ label = "Power button";
+ linux,code = <116>;
+ gpios = <&gpio1 2 1>;
+ };
+ button@2 {
+ label = "USB unmount button";
+ linux,code = <161>;
+ gpios = <&gpio1 15 1>;
+ };
+ button@3 {
+ label = "Reset button";
+ linux,code = <0x198>;
+ gpios = <&gpio1 16 1>;
+ };
+ };
+
ocp@f1000000 {
sata@80000 {
status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index aac9c90..4ab3506 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -19,7 +19,6 @@
#include <linux/of.h>
#include <linux/gpio.h>
#include <linux/input.h>
-#include <linux/gpio_keys.h>
#include <linux/gpio-fan.h>
#include <linux/leds.h>
#include <asm/mach-types.h>
@@ -68,41 +67,6 @@ static unsigned int dnskw_mpp_config[] __initdata = {
0
};
-static struct gpio_keys_button dnskw_button_pins[] = {
- {
- .code = KEY_POWER,
- .gpio = 34,
- .desc = "Power button",
- .active_low = 1,
- },
- {
- .code = KEY_EJECTCD,
- .gpio = 47,
- .desc = "USB unmount button",
- .active_low = 1,
- },
- {
- .code = KEY_RESTART,
- .gpio = 48,
- .desc = "Reset button",
- .active_low = 1,
- },
-};
-
-static struct gpio_keys_platform_data dnskw_button_data = {
- .buttons = dnskw_button_pins,
- .nbuttons = ARRAY_SIZE(dnskw_button_pins),
-};
-
-static struct platform_device dnskw_button_device = {
- .name = "gpio-keys",
- .id = -1,
- .num_resources = 0,
- .dev = {
- .platform_data = &dnskw_button_data,
- }
-};
-
/* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */
static struct gpio_fan_speed dnskw_fan_speed[] = {
{ 0, 0 },
@@ -150,7 +114,6 @@ void __init dnskw_init(void)
kirkwood_ehci_init();
kirkwood_ge00_init(&dnskw_ge00_data);
- platform_device_register(&dnskw_button_device);
platform_device_register(&dnskw_fan_device);
/* Register power-off GPIO. */
--
1.7.10.4
prev parent reply other threads:[~2012-07-19 20:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 20:30 [PATCH 0/4] Use DT to define more of the DNS320 & DNS325 Jamie Lentin
2012-07-19 20:30 ` [PATCH 1/4] ARM: Kirkwood: Describe DNS325 temperature sensor in DT Jamie Lentin
2012-07-19 20:30 ` [PATCH 2/4] kirkwood: Replace DNS-320/DNS-325 leds with dt bindings Jamie Lentin
2012-07-19 20:30 ` [PATCH 3/4] ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi Jamie Lentin
2012-07-19 20:31 ` Jamie Lentin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1342729860-14647-5-git-send-email-jm@lentin.co.uk \
--to=jm@lentin.co.uk \
--cc=andrew@lunn.ch \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).