mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
ARM: tegra: Core changes for v6.11-rc1
Uses software nodes to describe rfkill instead of using a GPIO lookup table. -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmZ+3ToACgkQ3SOs138+ s6ESPw/+M9tc/ZtTezSd6Fz3TbBmSZEMARWxK14VqPjol11xsUuvAofy2hQEvZVM BPH8McQ5VfZYzjW5WHWTPLbsFziG0g06qNyFcWNERPOvlUyOA4a7HUtnQ+WGR2/F RIPaNR8px6q+gK7/v45hlE67wPiljWZNditVDES2M6aNSVF54pyPJ4lfCHbk+vNB XBncuUeOAyLjWNGhGz2jlCpfedxLSVm6L86fJRVLpWt87XGPBrS1spT48pGZCavl OMeDsyB/YB0Nam+AmNiUxZbvkyUz4Sp6YuyOLUOAHAFhEbAQXeZuh1Y0zevMFREz kyTfwIthPdNJIaQjl5rViWC4xxMlSP3dpZoFIzdGrxPLL3dQTJYILFLhYUMjT7hP 0pdIjvgK9lJqBjrK8joYF1wKSyIWb3HnCLJCuerFADjrydMFEAqRyf8/eXQuKv0K yHTtjVeFmptMKkq3H0Eut/BHWOu/PWpuXz3tMnSzSePrjgwI1TLtl5tSxa45FnIk Uu4evBiFSagniQbxskCp1oRpT5PsxNoPxrvEIb1wKU+fVjd5auJwyw9vLPzuTjrj JQ/bV/KaryDBWHdFLWqDUZrD2zwvi3yNO918xwkQQoZ8rP+qrevByftb/4mS413j F9HVg44oWflxpXJvyJHikKtpXVj8dSWWWGG9CDvjwJ382rFN4A0= =nfdq -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaNORQACgkQYKtH/8kJ UidmdQ/9G3dnoiLhvOIE/9Mnyuyo8S6VnyIA/5pTQvl6/cHMYmDcUKj7vFjCipNC zEufe+YWO+hqkkrDCJHwfL4xieh2oWlckCN5MlpVFSBLSMSD200AkhIQjhJ/pyVK mzx+W8D81YP15CX9uPrkoETQtXeyHwrV2yd01CKuhs4VKqOkfa0VWWFSVdfe+W4Y ZlitJrJker7r6dlioOIVx+SILwl/T7M0a0n6l9EafK1JlkhrR6TAsRt7AggXuA+Q Z2bMe/ZnoOaIjpBSTeoEv7ocg7rH7HOiNFbIZYTpQgPCacj28YWZjo+EK465llft JGKLbLipJwKz/5xrpOk9MZRWvcQCzYAy48XgU0h9+/VtYwthQKrynkg3btogA+1o isvkSliSWVBdyC3JxNbtfeG+pNAWc4Tm1w4JN9LS6Ug3SmIUixVyBUcHHycsrSVr Mt7rGCpS4wDsV/QPuqAjjJrTDBthz6FgMJ0ob3/sMmkHTHU8q11CuiRN7XthHL2M WZ2oJkzJ4QGOwKgWRluq/QM2bd2IuWyPlopNxCzjEf/VQn6mxiPDpsZS6nCdJ0Lf aKot75f1bBepC6CpapEo9q0dYkeh5BDLD28D1T/wEjcbfnzzccfB1X6aO5BjXBWk YMHbHKv/hS4vcab4f+v8xTKWyp3i/onSDc+m1uR7cVOTJt+u7qQ= =24qa -----END PGP SIGNATURE----- Merge tag 'tegra-for-6.11-arm-core' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/arm ARM: tegra: Core changes for v6.11-rc1 Uses software nodes to describe rfkill instead of using a GPIO lookup table. * tag 'tegra-for-6.11-arm-core' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: paz00: Use software nodes to describe GPIOs for WiFi rfkill Link: https://lore.kernel.org/r/20240628210818.3627404-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
696a2af228
@ -8,35 +8,49 @@
|
||||
* Copyright (C) 2010 Google, Inc.
|
||||
*/
|
||||
|
||||
#include <linux/property.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/gpio/property.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/property.h>
|
||||
|
||||
#include "board.h"
|
||||
|
||||
static struct property_entry wifi_rfkill_prop[] __initdata = {
|
||||
static const struct software_node tegra_gpiochip_node = {
|
||||
.name = "tegra-gpio",
|
||||
};
|
||||
|
||||
static const struct property_entry wifi_rfkill_prop[] __initconst = {
|
||||
PROPERTY_ENTRY_STRING("name", "wifi_rfkill"),
|
||||
PROPERTY_ENTRY_STRING("type", "wlan"),
|
||||
{ },
|
||||
PROPERTY_ENTRY_GPIO("reset-gpios",
|
||||
&tegra_gpiochip_node, 25, GPIO_ACTIVE_HIGH),
|
||||
PROPERTY_ENTRY_GPIO("shutdown-gpios",
|
||||
&tegra_gpiochip_node, 85, GPIO_ACTIVE_HIGH),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct platform_device wifi_rfkill_device = {
|
||||
.name = "rfkill_gpio",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table wifi_gpio_lookup = {
|
||||
.dev_id = "rfkill_gpio",
|
||||
.table = {
|
||||
GPIO_LOOKUP("tegra-gpio", 25, "reset", 0),
|
||||
GPIO_LOOKUP("tegra-gpio", 85, "shutdown", 0),
|
||||
{ },
|
||||
},
|
||||
static const struct platform_device_info wifi_rfkill_info __initconst = {
|
||||
.name = "rfkill_gpio",
|
||||
.id = PLATFORM_DEVID_NONE,
|
||||
.properties = wifi_rfkill_prop,
|
||||
};
|
||||
|
||||
void __init tegra_paz00_wifikill_init(void)
|
||||
{
|
||||
device_create_managed_software_node(&wifi_rfkill_device.dev, wifi_rfkill_prop, NULL);
|
||||
gpiod_add_lookup_table(&wifi_gpio_lookup);
|
||||
platform_device_register(&wifi_rfkill_device);
|
||||
struct platform_device *pd;
|
||||
int err;
|
||||
|
||||
err = software_node_register(&tegra_gpiochip_node);
|
||||
if (err) {
|
||||
pr_err("failed to register %s node: %d\n",
|
||||
tegra_gpiochip_node.name, err);
|
||||
return;
|
||||
}
|
||||
|
||||
pd = platform_device_register_full(&wifi_rfkill_info);
|
||||
err = PTR_ERR_OR_ZERO(pd);
|
||||
if (err)
|
||||
pr_err("failed to register WiFi rfkill device: %d\n", err);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user