diff options
author | Mark Brown <broonie@kernel.org> | 2018-10-21 17:00:02 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-10-21 17:00:02 +0100 |
commit | 4fd1f509e89f0e8ea28b1baa41d314636ae2064e (patch) | |
tree | b9bb0e99bc91404e8d2709b8a5acdbefdab27bb2 /arch/x86/platform | |
parent | 35a7f35ad1b150ddf59a41dcac7b2fa32982be0e (diff) | |
parent | d8b2a8e9c06bc389659716e81d1c2b1f147611d1 (diff) | |
download | linux-4fd1f509e89f0e8ea28b1baa41d314636ae2064e.tar.bz2 |
Merge branch 'regulator-4.20' into regulator-next
Diffstat (limited to 'arch/x86/platform')
-rw-r--r-- | arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c b/arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c index 4392c15ed9e0..dbfc5cf2aa93 100644 --- a/arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c +++ b/arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c @@ -10,7 +10,7 @@ * of the License. */ -#include <linux/gpio.h> +#include <linux/gpio/machine.h> #include <linux/platform_device.h> #include <linux/regulator/machine.h> #include <linux/regulator/fixed.h> @@ -43,7 +43,6 @@ static struct fixed_voltage_config bcm43xx_vmmc = { * real voltage and signaling are still 1.8V. */ .microvolts = 2000000, /* 1.8V */ - .gpio = -EINVAL, .startup_delay = 250 * 1000, /* 250ms */ .enable_high = 1, /* active high */ .enabled_at_boot = 0, /* disabled at boot */ @@ -58,11 +57,23 @@ static struct platform_device bcm43xx_vmmc_regulator = { }, }; +static struct gpiod_lookup_table bcm43xx_vmmc_gpio_table = { + .dev_id = "reg-fixed-voltage.0", + .table = { + GPIO_LOOKUP("0000:00:0c.0", -1, NULL, GPIO_ACTIVE_LOW), + {} + }, +}; + static int __init bcm43xx_regulator_register(void) { + struct gpiod_lookup_table *table = &bcm43xx_vmmc_gpio_table; + struct gpiod_lookup *lookup = table->table; int ret; - bcm43xx_vmmc.gpio = get_gpio_by_name(WLAN_SFI_GPIO_ENABLE_NAME); + lookup[0].chip_hwnum = get_gpio_by_name(WLAN_SFI_GPIO_ENABLE_NAME); + gpiod_add_lookup_table(table); + ret = platform_device_register(&bcm43xx_vmmc_regulator); if (ret) { pr_err("%s: vmmc regulator register failed\n", __func__); |