Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1316299
| From | Heikki Krogerus <heikki.krogerus@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio |
| Date | 2016-01-25 10:10 +0100 |
| Message-ID | <qULjQ-1FX-9@gated-at.bofh.it> (permalink) |
| References | <qULjP-1FX-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2016-01-25 10:10 +0100
Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Thierry Reding <thierry.reding@gmail.com> - 2016-01-25 13:20 +0100
Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties withrfkill_gpio Marc Dietrich <marvin24@gmx.de> - 2016-01-25 22:10 +0100
Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties withrfkill_gpio Johannes Berg <johannes@sipsolutions.net> - 2016-01-26 09:50 +0100
Re: [PATCHv2 3/4] ARM: tegra: use build-in device propertieswithrfkill_gpio Marc Dietrich <marvin24@gmx.de> - 2016-01-26 10:00 +0100
Re: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio Johannes Berg <johannes@sipsolutions.net> - 2016-01-26 09:50 +0100
csiph-web