From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E6A2372662 for ; Mon, 6 Jul 2026 01:29:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783301374; cv=none; b=tqnqHB89rebvnFwoNSF9ZTBjrJA2733hdSgeJQFZ7XkHQudOztJJ2XMwMyh3Tybwo5+Uqs/yOuz4RqSE6kB3FBwWmeh41x5KPPk1PoQETJ5jTd1Nkx94JDuR7TVChb2KjPROqD+t/UNCYLOpOjTb/GHO35wxOTWCGELaxLikqRo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783301374; c=relaxed/simple; bh=EcRpJUwpC/rhqY4ySAkHr6OxHuvCu6cN1dc5kXPhDtM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JsksIcupkv1TGdoLmZ2nOQUSsYw1h4cMKbvXdQC71neVn5SwZM/M7yZZNY4/USuJXejyt5caXPI7vo2q7EcgpqFYbK3T8wa0L+feVRcYcyit0EuNL+jxk1MGD1b1LWIjE1Sf11/0SdwN31ERYy1jeHEZawI/7myNwnCVgYlNzAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RRQ4KQ24; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RRQ4KQ24" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2c9b1edf2bdso27177445ad.1 for ; Sun, 05 Jul 2026 18:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783301370; x=1783906170; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=gGvSp5fyDj7TwHQ1Fp7icpxYJo/xaDzO9R+cKOZT4RA=; b=RRQ4KQ24uH+Hx7OvoU9/iwx8CVFJrmVr9MUJckPGY6KNpNwm8XVjRG7dq7+mYaJ+DB JEXioX3WcVqw5zuu4COqCUGS9rDQEX8kbBtJEkUCW+w/7vKaV3phYdeisPjb0uc3SCfI Kx5puS84YJraZJhu8zP/XYtBi92TKH7zTkSF1c1GvGWgLp0eok/NqcmGTgelNZrth21J r35hikIMQQlRyvsxlRy4vmaXlzEsXsvR9uzd+YFuypmTiKBIM2fpzizremK0E25YXm0X tay/huTn8XneGlxWn21JDJzQYL5pJLxZIHh4dK3v3G3/PkiRQmM5S4LU0b2RkUu0Fbgk Aedw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783301370; x=1783906170; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=gGvSp5fyDj7TwHQ1Fp7icpxYJo/xaDzO9R+cKOZT4RA=; b=jrA4c8p7vDy8JFpizlYwz+gtbZYjt/1S6R49OMjilRSauUCaa/mZptSEbqARmYsiKm QMiPpgYYfwI+M/HUzHEkFSJ1QpmPmi1p5LUiWuvOfIT/iNaxLympLVKBZEN3kFopn/UC fe1gihCl0INLRYATbtZnDjSofBIv4okoInC79rhtm1+qwy4M22HcJwln4O86v/P4XoWt nyRYVnGnLC7WBc9oJT8HmhUnF4WFkPKJho/7BygDBlxjXcJxcj1El8S63TQLuWwra0MT vJsUiNTEm/MSoZwC2wUilRzHF4fkGXGRCJjjCHzzMAZXpbukn7uTsRTkFF1P1k1+60dL 6Fog== X-Forwarded-Encrypted: i=1; AHgh+RpfHfSTJ7FeN26Q69TXmdnx9+yc0/5sXRG5vGTcsiz5+rss/qeyGp2Czh9JBWfnBXutzr6kAUwT5UnLUx0=@vger.kernel.org X-Gm-Message-State: AOJu0YxvKvdvpzZsdb3vSe/RRMuXN8OJCE07hM+scdnVDcObcTTZVcKJ hFdZs5wf0RINpcVuspR4P3AkFpEPTscjVMdyUsbV6L5HvgGwhe5FPxjg X-Gm-Gg: AfdE7cl8pSuJQavCj8QVu1ZloOuxUHR+OU3tiWYUDuzl59EVgo/NT7TpKD0ApOw0EmU 9uRPcUJwukeuR0vkjZa3txQ0U/oH1Aip2WKmjVm8OohMgDeJFDMBdjrXj+osoahMad1pti9/X+j OyCkufuB+uj063onjxrrDQ9YSxm57AJtvo73DVia2TfbTguFbhaY7+kQyZcbsBhFoHdzrnDbqHf 3uQCU1Vv6xswR72jJ+K6yzQDXbUWtsCLV96VecPnIl/WGnhjyjGBQh3klGavUzsY0DXcexG/ulU ZXjkIFfOb/XqJxtm2PwIKeOuwcuC7/8VEh9kOUFiO6ksEHLRbTZioUtJy1jDhMEFmcnAD1AzAwk HetGRUWr4V7j57rXeKaiWXyEVQUHilzm6sMadX3VwR+GkmecHfo8lEKZFg1UyskZZDGO0qlIkbx 9TcU3DRBveI7oKGm/JZTxHxP11qmNL+BLl/hQm81evL3nRzgzmzXaZ/BkRGrormTvlubBtAyWax Qg= X-Received: by 2002:a17:902:f681:b0:2ca:d91e:bfb4 with SMTP id d9443c01a7336-2cbb9ec1a1cmr86419275ad.24.1783301369574; Sun, 05 Jul 2026 18:29:29 -0700 (PDT) Received: from dtor-ws.sjc.corp.google.com ([2a00:79e0:2ebe:8:bf6:81d1:bcfe:9d1c]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13b3c7ef5b3sm63084524c88.1.2026.07.05.18.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jul 2026 18:29:29 -0700 (PDT) From: Dmitry Torokhov Date: Sun, 05 Jul 2026 18:29:19 -0700 Subject: [PATCH 2/7] ARM: mv78xx0: buffalo-wxl: convert gpio-keys to use software nodes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260705-orion-mv78xx0-swnode-v1-2-07d95ef4f447@gmail.com> References: <20260705-orion-mv78xx0-swnode-v1-0-07d95ef4f447@gmail.com> In-Reply-To: <20260705-orion-mv78xx0-swnode-v1-0-07d95ef4f447@gmail.com> To: Andrew Lunn , Sebastian Hesselbarth , Gregory Clement Cc: Russell King , Bartosz Golaszewski , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16-dev-b242f Convert the Buffalo WXL board setup from legacy gpio_keys_platform_data to software nodes. The gpio-keys platform device is registered with static software node properties and button configurations. Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov --- arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | 50 +++++++++++++++++++------------ 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c index 62e982f74bc2..0c15dd25e966 100644 --- a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c +++ b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c @@ -15,8 +15,10 @@ #include #include #include -#include +#include +#include #include +#include #include #include #include "mv78xx0.h" @@ -105,31 +107,39 @@ static unsigned int wxl_mpp_config[] __initdata = { 0 }; -static struct gpio_keys_button tswxl_buttons[] = { - { - .code = KEY_OPTION, - .gpio = TSWXL_AUTO_SWITCH, - .desc = "Power-auto Switch", - .active_low = 1, - } +static const struct software_node tswxl_gpio_keys_node = { + .name = "tswxl-gpio-keys", }; -static struct gpio_keys_platform_data tswxl_button_data = { - .buttons = tswxl_buttons, - .nbuttons = ARRAY_SIZE(tswxl_buttons), +static const struct property_entry tswxl_auto_switch_props[] = { + PROPERTY_ENTRY_U32("linux,code", KEY_OPTION), + PROPERTY_ENTRY_GPIO("gpios", &orion_gpio_swnodes[0], + TSWXL_AUTO_SWITCH, GPIO_ACTIVE_LOW), + PROPERTY_ENTRY_STRING("label", "Power-auto Switch"), + { } }; -static struct platform_device tswxl_button_device = { - .name = "gpio-keys", - .id = -1, - .num_resources = 0, - .dev = { - .platform_data = &tswxl_button_data, - }, +static const struct software_node tswxl_auto_switch_node = { + .parent = &tswxl_gpio_keys_node, + .properties = tswxl_auto_switch_props, +}; + +static const struct software_node * const tswxl_gpio_keys_swnodes[] __initconst = { + &tswxl_gpio_keys_node, + &tswxl_auto_switch_node, + NULL +}; + +static const struct platform_device_info tswxl_button_info __initconst = { + .name = "gpio-keys", + .id = PLATFORM_DEVID_NONE, + .swnode = &tswxl_gpio_keys_node, }; static void __init wxl_init(void) { + int err; + /* * Basic MV78xx0 setup. Needs to be called early. */ @@ -158,7 +168,9 @@ static void __init wxl_init(void) gpio_direction_output(TSWXL_USB_POWER2, 1); //enable rear switch - platform_device_register(&tswxl_button_device); + err = software_node_register_node_group(tswxl_gpio_keys_swnodes); + if (!err) + platform_device_register_full(&tswxl_button_info); } static int __init wxl_pci_init(void) -- 2.55.0.rc0.799.gd6f94ed593-goog