mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
x86: pinctrl: Add multi-ACPI control
Add a Kconfig to control whether pinctrl is represented as a single ACPI device or as multiple devices. In the latter case (the default) we should return the pin number relative to the pinctrl device. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
This commit is contained in:
@@ -15,6 +15,18 @@ config INTEL_PINCTRL_IOSTANDBY
|
|||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
config INTEL_PINCTRL_MULTI_ACPI_DEVICES
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Enable this if the pinctrl devices are modelled as multiple,
|
||||||
|
separate ACPI devices in the ACPI tables. If enabled, the ACPI
|
||||||
|
devices match the U-Boot pinctrl devices and the pin 'offset' is
|
||||||
|
relatove to a particular pinctrl device. If disabled, there is a
|
||||||
|
single ACPI pinctrl device which includes all U-Boot pinctrl devices
|
||||||
|
and the pin 'offset' is in effect a global pin number.
|
||||||
|
|
||||||
|
|
||||||
config PINCTRL_INTEL_APL
|
config PINCTRL_INTEL_APL
|
||||||
bool "Support Intel Apollo Lake (APL)"
|
bool "Support Intel Apollo Lake (APL)"
|
||||||
help
|
help
|
||||||
|
@@ -427,6 +427,8 @@ int intel_pinctrl_get_acpi_pin(struct udevice *dev, uint offset)
|
|||||||
const struct pad_community *comm = priv->comm;
|
const struct pad_community *comm = priv->comm;
|
||||||
int group;
|
int group;
|
||||||
|
|
||||||
|
if (IS_ENABLED(CONFIG_INTEL_PINCTRL_MULTI_ACPI_DEVICES))
|
||||||
|
return offset;
|
||||||
group = pinctrl_group_index(comm, offset);
|
group = pinctrl_group_index(comm, offset);
|
||||||
|
|
||||||
/* If pad base is not set then use GPIO number as ACPI pin number */
|
/* If pad base is not set then use GPIO number as ACPI pin number */
|
||||||
|
Reference in New Issue
Block a user