summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-02-18 13:48:01 +0300
committerLee Jones <lee@kernel.org>2026-03-25 15:45:01 +0300
commit0735e3007c1be6cb40372c403a69200d0929c8d7 (patch)
treef141d494eea485aa25654151b8f1e870aed019d7
parent239cd6a417b989708da4b39a71f925897ec87287 (diff)
downloadlinux-0735e3007c1be6cb40372c403a69200d0929c8d7.tar.xz
mfd: lpc_ich: Expose the GPIO controller cell's software node
One of the users of this driver - meraki-mx100 - abuses the software node API by setting up a dummy software node without any logical link to this GPIO controller and uses the fact that the GPIO core matches the controller's label against the swnode's name to make the lookup work. We want to remove this behavior from GPIOLIB in favor of actual matching of firmware nodes but that would break this user. To facilitate that: create a software node for the GPIO controller cell and expose its address in the provided MFD header. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260218-meraki-swnodes-v2-1-92c521da241c@oss.qualcomm.com Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r--drivers/mfd/lpc_ich.c7
-rw-r--r--include/linux/mfd/lpc_ich.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index 4b7d0cb9340f..5a3d79f339dd 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -45,6 +45,7 @@
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/pinctrl/pinctrl.h>
+#include <linux/property.h>
#include <linux/mfd/core.h>
#include <linux/mfd/lpc_ich.h>
#include <linux/platform_data/itco_wdt.h>
@@ -125,11 +126,17 @@ static struct mfd_cell lpc_ich_wdt_cell = {
.ignore_resource_conflicts = true,
};
+const struct software_node lpc_ich_gpio_swnode = {
+ .name = "gpio_ich",
+};
+EXPORT_SYMBOL_NS(lpc_ich_gpio_swnode, "LPC_ICH");
+
static struct mfd_cell lpc_ich_gpio_cell = {
.name = "gpio_ich",
.num_resources = ARRAY_SIZE(gpio_ich_res),
.resources = gpio_ich_res,
.ignore_resource_conflicts = true,
+ .swnode = &lpc_ich_gpio_swnode,
};
#define INTEL_GPIO_RESOURCE_SIZE 0x1000
diff --git a/include/linux/mfd/lpc_ich.h b/include/linux/mfd/lpc_ich.h
index 1fbda1f8967d..1819aa743c5c 100644
--- a/include/linux/mfd/lpc_ich.h
+++ b/include/linux/mfd/lpc_ich.h
@@ -37,4 +37,6 @@ struct lpc_ich_info {
u8 use_gpio;
};
+extern const struct software_node lpc_ich_gpio_swnode;
+
#endif