// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2015, The Linux Foundation. All rights reserved. * * GPIO and pin control functions on this SOC are handled by the "TLMM" * device. The driver which controls this device is pinctrl-msm.c. Each * SOC with a TLMM is expected to create a client driver that registers * with pinctrl-msm.c. This means that all TLMM drivers are pin control * drivers. * * This pin control driver is intended to be used only an ACPI-enabled * system. As such, UEFI will handle all pin control configuration, so * this driver does not provide pin control functions. It is effectively * a GPIO-only driver. The alternative is to duplicate the GPIO code of * pinctrl-msm.c into another driver. */ #include <linux/module.h> #include <linux/platform_device.h> #include <linux/pinctrl/pinctrl.h> #include <linux/acpi.h> #include "pinctrl-msm.h" /* A maximum of 256 allows us to use a u8 array to hold the GPIO numbers */ #define MAX_GPIOS … /* maximum size of each gpio name (enough room for "gpioXXX" + null) */ #define NAME_SIZE … static int qdf2xxx_pinctrl_probe(struct platform_device *pdev) { … } static const struct acpi_device_id qdf2xxx_acpi_ids[] = …; MODULE_DEVICE_TABLE(acpi, qdf2xxx_acpi_ids); static struct platform_driver qdf2xxx_pinctrl_driver = …; static int __init qdf2xxx_pinctrl_init(void) { … } arch_initcall(qdf2xxx_pinctrl_init); static void __exit qdf2xxx_pinctrl_exit(void) { … } module_exit(qdf2xxx_pinctrl_exit); MODULE_DESCRIPTION(…) …; MODULE_LICENSE(…) …;