@@ -351,6 +485,15 @@ static int f7188x_gpio_probe(struct platform_device *pdev)
for (i = 0; i < data->nr_bank; i++) {
struct f7188x_gpio_bank *bank = &data->bank[i];
+ /*
+ * Dont export GPIO sysfs if pin set is not enable by MB
+ * manufacturer.
What does MB stands for ?
+ */
+ if (sio->type == f81866 && f81866_verify_gpioset(sio->addr, i))
+ continue;
This whole filtering mechanism relies on the fact that the multiplexing
configuration has been correctly applied by the BIOS (if applied at
all). But I wonder if it is often the case. For example, I have several
boards for which it is not true. And to make the GPIOs available, I need
first to fix the multiplexing pin configuration of the Super I/O.
Maybe it would be more correct to rely on the hardware description of a
board (Device Tree or ACPI) to decide which GPIO bank can be enabled or
not.