From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
Alexandre Courbot <gnurou@gmail.com>,
Thierry Reding <thierry.reding@gmail.com>,
Stephen Warren <swarren@wwwdotorg.org>
Subject: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio
Date: Mon, 25 Jan 2016 12:03:48 +0300 [thread overview]
Message-ID: <1453712629-143317-4-git-send-email-heikki.krogerus@linux.intel.com> (raw)
In-Reply-To: <1453712629-143317-1-git-send-email-heikki.krogerus@linux.intel.com>
Pass the rfkill name and type to the device with properties
instead of driver specific platform data.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
CC: Alexandre Courbot <gnurou@gmail.com>
CC: Thierry Reding <thierry.reding@gmail.com>
CC: Stephen Warren <swarren@wwwdotorg.org>
---
arch/arm/mach-tegra/board-paz00.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 49d1110..52db8bf 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -17,23 +17,25 @@
*
*/
+#include <linux/property.h>
#include <linux/gpio/machine.h>
#include <linux/platform_device.h>
-#include <linux/rfkill-gpio.h>
#include "board.h"
-static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = {
- .name = "wifi_rfkill",
- .type = RFKILL_TYPE_WLAN,
+static struct property_entry __initdata wifi_rfkill_prop[] = {
+ PROPERTY_ENTRY_STRING("name", "wifi_rfkill"),
+ PROPERTY_ENTRY_STRING("type", "wlan"),
+ { },
+};
+
+static struct property_set __initdata wifi_rfkill_pset = {
+ .properties = wifi_rfkill_prop,
};
static struct platform_device wifi_rfkill_device = {
.name = "rfkill_gpio",
.id = -1,
- .dev = {
- .platform_data = &wifi_rfkill_platform_data,
- },
};
static struct gpiod_lookup_table wifi_gpio_lookup = {
@@ -47,6 +49,7 @@ static struct gpiod_lookup_table wifi_gpio_lookup = {
void __init tegra_paz00_wifikill_init(void)
{
+ platform_device_add_properties(&wifi_rfkill_device, &wifi_rfkill_pset);
gpiod_add_lookup_table(&wifi_gpio_lookup);
platform_device_register(&wifi_rfkill_device);
}
--
2.7.0.rc3
next prev parent reply other threads:[~2016-01-25 9:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 9:03 [PATCHv2 0/4] net: rfkill: gpio: replace platform data with build-in property Heikki Krogerus
2016-01-25 9:03 ` [PATCHv2 1/4] net: rfkill: add rfkill_find_type function Heikki Krogerus
2016-01-25 9:03 ` [PATCHv2 2/4] net: rfkill: gpio: get the name and type from device property Heikki Krogerus
2016-01-25 9:03 ` Heikki Krogerus [this message]
[not found] ` <1453712629-143317-4-git-send-email-heikki.krogerus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-01-25 12:18 ` [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Thierry Reding
[not found] ` <20160125121840.GA20452-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2016-01-25 20:59 ` [PATCHv2 3/4] ARM: tegra: use build-in device properties withrfkill_gpio Marc Dietrich
2016-01-26 8:46 ` Johannes Berg
[not found] ` <1453798016.2759.5.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-01-26 8:52 ` [PATCHv2 3/4] ARM: tegra: use build-in device propertieswithrfkill_gpio Marc Dietrich
2016-01-26 8:42 ` [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Johannes Berg
2016-02-18 20:04 ` Johannes Berg
[not found] ` <1455825889.2084.16.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-02-19 18:03 ` Thierry Reding
2016-02-23 10:31 ` Johannes Berg
2016-02-23 10:15 ` Arnd Bergmann
2016-02-23 10:31 ` Arnd Bergmann
2016-02-23 10:38 ` Marc Dietrich
2016-02-23 13:17 ` Arnd Bergmann
2016-02-23 13:42 ` Marc Dietrich
2016-02-23 15:06 ` Arnd Bergmann
2016-02-23 20:39 ` Johannes Berg
2016-01-25 9:03 ` [PATCHv2 4/4] net: rfkill: gpio: remove rfkill_gpio_platform_data Heikki Krogerus
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=1453712629-143317-4-git-send-email-heikki.krogerus@linux.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=gnurou@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
/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).