mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge tag 'regulator-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
"The biggest chunk of the regulator changes for this release outside of
the new drivers is the conversion of the fixed regulator to use the
GPIO descriptor API, there's a small addition to the GPIO API plus a
bunch of updates to board files to implement it. This is some really
welcome work from Linus Walleij that's had a bunch of review and has
been sitting in -next for a while so I'm fairly happy there's no major
issues.
- Helpers for overlapping linear ranges.
- Display opmode and consumer requested load in the regualtor_summary
file in debugfs, plus a fix there.
- Support for the fun and entertaining power off mechanism that the
pfuze100 hardware implements.
- Conversion of the fixed regulator API to use GPIO descriptors,
including pulling in a bunch of patches to a bunch of board files.
- New drivers for Cirrus Logic Lochnagar, Qualcomm PMS405, Rohm
BD71847, ST PMIC1, and TI LM363x devices"
* tag 'regulator-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (36 commits)
regulator: lochnagar: Use a consisent comment style for SPDX header
regulator: bd718x7: Remove struct bd718xx_pmic
regulator: Fetch enable gpiods nonexclusive
regulator/gpio: Allow nonexclusive GPIO access
regulator: lochnagar: Add support for the Cirrus Logic Lochnagar
regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode
regulator: stpmic1: add stpmic1 regulator driver
dt-bindings: regulator: document stpmic1 pmic regulators
regulator: axp20x: Mark expected switch fall-throughs
regulator: bd718xx: fix build warning on x86_64
regulator: fixed: Default enable high on DT regulators
regulator: bd718xx: rename bd71837 to 718xx
regulator: bd718XX use pickable ranges
regulator/mfd: bd718xx: rename bd71837/bd71847 common instances
regulator: Support regulators where voltage ranges are selectable
mfd: dt bindings: add BD71847 device-tree binding documentation
regulator: dt bindings: add BD71847 device-tree binding documentation
regulator/mfd: Support ROHM BD71847 power management IC
regulator: da905{2,5}: Remove unnecessary array check
regulator: qcom: Add PMS405 regulators
...
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
* ROHM BD71837 Power Management Integrated Circuit bindings
|
||||
* ROHM BD71837 and BD71847 Power Management Integrated Circuit bindings
|
||||
|
||||
BD71837MWV is a programmable Power Management IC for powering single-core,
|
||||
dual-core, and quad-core SoCs such as NXP-i.MX 8M. It is optimized for
|
||||
low BOM cost and compact solution footprint. It integrates 8 Buck
|
||||
egulators and 7 LDOs to provide all the power rails required by the SoC and
|
||||
the commonly used peripherals.
|
||||
BD71837MWV and BD71847MWV are programmable Power Management ICs for powering
|
||||
single-core, dual-core, and quad-core SoCs such as NXP-i.MX 8M. They are
|
||||
optimized for low BOM cost and compact solution footprint. BD71837MWV
|
||||
integrates 8 Buck regulators and 7 LDOs. BD71847MWV contains 6 Buck regulators
|
||||
and 6 LDOs.
|
||||
|
||||
Datasheet for PMIC is available at:
|
||||
Datasheet for BD71837 is available at:
|
||||
https://www.rohm.com/datasheet/BD71837MWV/bd71837mwv-e
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "rohm,bd71837".
|
||||
- compatible : Should be "rohm,bd71837" for bd71837
|
||||
"rohm,bd71847" for bd71847.
|
||||
- reg : I2C slave address.
|
||||
- interrupt-parent : Phandle to the parent interrupt controller.
|
||||
- interrupts : The interrupt line the device is connected to.
|
||||
|
||||
@@ -12,6 +12,11 @@ Optional properties:
|
||||
disabled. This binding is a workaround to keep backward compatibility with
|
||||
old dtb's which rely on the fact that the switched regulators are always on
|
||||
and don't mark them explicit as "regulator-always-on".
|
||||
- fsl,pmic-stby-poweroff: if present, configure the PMIC to shutdown all
|
||||
power rails when PMIC_STBY_REQ line is asserted during the power off sequence.
|
||||
Use this option if the SoC should be powered off by external power
|
||||
management IC (PMIC) on PMIC_STBY_REQ signal.
|
||||
As opposite to PMIC_STBY_REQ boards can implement PMIC_ON_REQ signal.
|
||||
|
||||
Required child node:
|
||||
- regulators: This is the list of child nodes that specify the regulator
|
||||
|
||||
@@ -26,6 +26,7 @@ Regulator nodes are identified by their compatible:
|
||||
"qcom,rpm-pm8998-regulators"
|
||||
"qcom,rpm-pma8084-regulators"
|
||||
"qcom,rpm-pmi8998-regulators"
|
||||
"qcom,rpm-pms405-regulators"
|
||||
|
||||
- vdd_s1-supply:
|
||||
- vdd_s2-supply:
|
||||
@@ -188,6 +189,24 @@ Regulator nodes are identified by their compatible:
|
||||
Definition: reference to regulator supplying the input pin, as
|
||||
described in the data sheet
|
||||
|
||||
- vdd_s1-supply:
|
||||
- vdd_s2-supply:
|
||||
- vdd_s3-supply:
|
||||
- vdd_s4-supply:
|
||||
- vdd_s5-supply:
|
||||
- vdd_l1_l2-supply:
|
||||
- vdd_l3_l8-supply:
|
||||
- vdd_l4-supply:
|
||||
- vdd_l5_l6-supply:
|
||||
- vdd_l7-supply:
|
||||
- vdd_l3_l8-supply:
|
||||
- vdd_l9-supply:
|
||||
- vdd_l10_l11_l12_l13-supply:
|
||||
Usage: optional (pms405 only)
|
||||
Value type: <phandle>
|
||||
Definition: reference to regulator supplying the input pin, as
|
||||
described in the data sheet
|
||||
|
||||
The regulator node houses sub-nodes for each regulator within the device. Each
|
||||
sub-node is identified using the node's name, with valid values listed for each
|
||||
of the pmics below.
|
||||
@@ -222,6 +241,10 @@ pma8084:
|
||||
pmi8998:
|
||||
bob
|
||||
|
||||
pms405:
|
||||
s1, s2, s3, s4, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12,
|
||||
l13
|
||||
|
||||
The content of each sub-node is defined by the standard binding for regulators -
|
||||
see regulator.txt.
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
ROHM BD71837 Power Management Integrated Circuit (PMIC) regulator bindings
|
||||
ROHM BD71837 and BD71847 Power Management Integrated Circuit regulator bindings
|
||||
|
||||
Required properties:
|
||||
- regulator-name: should be "buck1", ..., "buck8" and "ldo1", ..., "ldo7"
|
||||
- regulator-name: should be "buck1", ..., "buck8" and "ldo1", ..., "ldo7" for
|
||||
BD71837. For BD71847 names should be "buck1", ..., "buck6"
|
||||
and "ldo1", ..., "ldo6"
|
||||
|
||||
List of regulators provided by this controller. BD71837 regulators node
|
||||
should be sub node of the BD71837 MFD node. See BD71837 MFD bindings at
|
||||
@@ -16,10 +18,14 @@ disabled by driver at startup. LDO5 and LDO6 are supplied by those and
|
||||
if they are disabled at startup the voltage monitoring for LDO5/LDO6 will
|
||||
cause PMIC to reset.
|
||||
|
||||
The valid names for regulator nodes are:
|
||||
The valid names for BD71837 regulator nodes are:
|
||||
BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6, BUCK7, BUCK8
|
||||
LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7
|
||||
|
||||
The valid names for BD71847 regulator nodes are:
|
||||
BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6
|
||||
LDO1, LDO2, LDO3, LDO4, LDO5, LDO6
|
||||
|
||||
Optional properties:
|
||||
- Any optional property defined in bindings/regulator/regulator.txt
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
STMicroelectronics STPMIC1 Voltage regulators
|
||||
|
||||
Regulator Nodes are optional depending on needs.
|
||||
|
||||
Available Regulators in STPMIC1 device are:
|
||||
- buck1 for Buck BUCK1
|
||||
- buck2 for Buck BUCK2
|
||||
- buck3 for Buck BUCK3
|
||||
- buck4 for Buck BUCK4
|
||||
- ldo1 for LDO LDO1
|
||||
- ldo2 for LDO LDO2
|
||||
- ldo3 for LDO LDO3
|
||||
- ldo4 for LDO LDO4
|
||||
- ldo5 for LDO LDO5
|
||||
- ldo6 for LDO LDO6
|
||||
- vref_ddr for LDO Vref DDR
|
||||
- boost for Buck BOOST
|
||||
- pwr_sw1 for VBUS_OTG switch
|
||||
- pwr_sw2 for SW_OUT switch
|
||||
|
||||
Switches are fixed voltage regulators with only enable/disable capability.
|
||||
|
||||
Optional properties:
|
||||
- st,mask-reset: mask reset for this regulator: the regulator configuration
|
||||
is maintained during pmic reset.
|
||||
- regulator-pull-down: enable high pull down
|
||||
if not specified light pull down is used
|
||||
- regulator-over-current-protection:
|
||||
if set, all regulators are switched off in case of over-current detection
|
||||
on this regulator,
|
||||
if not set, the driver only sends an over-current event.
|
||||
- interrupt-parent: phandle to the parent interrupt controller
|
||||
- interrupts: index of current limit detection interrupt
|
||||
- <regulator>-supply: phandle to the parent supply/regulator node
|
||||
each regulator supply can be described except vref_ddr.
|
||||
|
||||
Example:
|
||||
regulators {
|
||||
compatible = "st,stpmic1-regulators";
|
||||
|
||||
ldo6-supply = <&v3v3>;
|
||||
|
||||
vdd_core: buck1 {
|
||||
regulator-name = "vdd_core";
|
||||
interrupts = <IT_CURLIM_BUCK1 0>;
|
||||
interrupt-parent = <&pmic>;
|
||||
st,mask-reset;
|
||||
regulator-pull-down;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
};
|
||||
|
||||
v3v3: buck4 {
|
||||
regulator-name = "v3v3";
|
||||
interrupts = <IT_CURLIM_BUCK4 0>;
|
||||
interrupt-parent = <&mypmic>;
|
||||
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
v1v8: ldo6 {
|
||||
regulator-name = "v1v8";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
};
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/gpio/driver.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/regulator/fixed.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
@@ -175,6 +176,7 @@ static struct resource mx21ads_mmgpio_resource =
|
||||
DEFINE_RES_MEM_NAMED(MX21ADS_IO_REG, SZ_2, "dat");
|
||||
|
||||
static struct bgpio_pdata mx21ads_mmgpio_pdata = {
|
||||
.label = "mx21ads-mmgpio",
|
||||
.base = MX21ADS_MMGPIO_BASE,
|
||||
.ngpio = 16,
|
||||
};
|
||||
@@ -203,7 +205,6 @@ static struct regulator_init_data mx21ads_lcd_regulator_init_data = {
|
||||
static struct fixed_voltage_config mx21ads_lcd_regulator_pdata = {
|
||||
.supply_name = "LCD",
|
||||
.microvolts = 3300000,
|
||||
.gpio = MX21ADS_IO_LCDON,
|
||||
.enable_high = 1,
|
||||
.init_data = &mx21ads_lcd_regulator_init_data,
|
||||
};
|
||||
@@ -216,6 +217,14 @@ static struct platform_device mx21ads_lcd_regulator = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table mx21ads_lcd_regulator_gpiod_table = {
|
||||
.dev_id = "reg-fixed-voltage.0", /* Let's hope ID 0 is what we get */
|
||||
.table = {
|
||||
GPIO_LOOKUP("mx21ads-mmgpio", 9, NULL, GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* Connected is a portrait Sharp-QVGA display
|
||||
* of type: LQ035Q7DB02
|
||||
@@ -311,6 +320,7 @@ static void __init mx21ads_late_init(void)
|
||||
{
|
||||
imx21_add_mxc_mmc(0, &mx21ads_sdhc_pdata);
|
||||
|
||||
gpiod_add_lookup_table(&mx21ads_lcd_regulator_gpiod_table);
|
||||
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
|
||||
|
||||
mx21ads_cs8900_resources[1].start =
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/gpio/driver.h>
|
||||
/* Needed for gpio_to_irq() */
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/map.h>
|
||||
@@ -230,10 +231,17 @@ static struct regulator_init_data mx27ads_lcd_regulator_init_data = {
|
||||
static struct fixed_voltage_config mx27ads_lcd_regulator_pdata = {
|
||||
.supply_name = "LCD",
|
||||
.microvolts = 3300000,
|
||||
.gpio = MX27ADS_LCD_GPIO,
|
||||
.init_data = &mx27ads_lcd_regulator_init_data,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table mx27ads_lcd_regulator_gpiod_table = {
|
||||
.dev_id = "reg-fixed-voltage.0", /* Let's hope ID 0 is what we get */
|
||||
.table = {
|
||||
GPIO_LOOKUP("LCD", 0, NULL, GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void __init mx27ads_regulator_init(void)
|
||||
{
|
||||
struct gpio_chip *vchip;
|
||||
@@ -247,6 +255,8 @@ static void __init mx27ads_regulator_init(void)
|
||||
vchip->set = vgpio_set;
|
||||
gpiochip_add_data(vchip, NULL);
|
||||
|
||||
gpiod_add_lookup_table(&mx27ads_lcd_regulator_gpiod_table);
|
||||
|
||||
platform_device_register_data(NULL, "reg-fixed-voltage",
|
||||
PLATFORM_DEVID_AUTO,
|
||||
&mx27ads_lcd_regulator_pdata,
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/gpio-pxa.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/max8649.h>
|
||||
#include <linux/regulator/fixed.h>
|
||||
@@ -148,7 +149,6 @@ static struct regulator_init_data brownstone_v_5vp_data = {
|
||||
static struct fixed_voltage_config brownstone_v_5vp = {
|
||||
.supply_name = "v_5vp",
|
||||
.microvolts = 5000000,
|
||||
.gpio = GPIO_5V_ENABLE,
|
||||
.enable_high = 1,
|
||||
.enabled_at_boot = 1,
|
||||
.init_data = &brownstone_v_5vp_data,
|
||||
@@ -162,6 +162,15 @@ static struct platform_device brownstone_v_5vp_device = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table brownstone_v_5vp_gpiod_table = {
|
||||
.dev_id = "reg-fixed-voltage.1", /* .id set to 1 above */
|
||||
.table = {
|
||||
GPIO_LOOKUP("gpio-pxa", GPIO_5V_ENABLE,
|
||||
NULL, GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct max8925_platform_data brownstone_max8925_info = {
|
||||
.irq_base = MMP_NR_IRQS,
|
||||
};
|
||||
@@ -217,6 +226,7 @@ static void __init brownstone_init(void)
|
||||
mmp2_add_isram(&mmp2_isram_platdata);
|
||||
|
||||
/* enable 5v regulator */
|
||||
gpiod_add_lookup_table(&brownstone_v_5vp_gpiod_table);
|
||||
platform_device_register(&brownstone_v_5vp_device);
|
||||
}
|
||||
|
||||
|
||||
@@ -300,7 +300,6 @@ static struct regulator_init_data modem_nreset_data = {
|
||||
static struct fixed_voltage_config modem_nreset_config = {
|
||||
.supply_name = "modem_nreset",
|
||||
.microvolts = 3300000,
|
||||
.gpio = AMS_DELTA_GPIO_PIN_MODEM_NRESET,
|
||||
.startup_delay = 25000,
|
||||
.enable_high = 1,
|
||||
.enabled_at_boot = 1,
|
||||
@@ -315,6 +314,15 @@ static struct platform_device modem_nreset_device = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table ams_delta_nreset_gpiod_table = {
|
||||
.dev_id = "reg-fixed-voltage",
|
||||
.table = {
|
||||
GPIO_LOOKUP(LATCH2_LABEL, LATCH2_PIN_MODEM_NRESET,
|
||||
NULL, GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
struct modem_private_data {
|
||||
struct regulator *regulator;
|
||||
};
|
||||
@@ -568,7 +576,6 @@ static struct regulator_init_data keybrd_pwr_initdata = {
|
||||
static struct fixed_voltage_config keybrd_pwr_config = {
|
||||
.supply_name = "keybrd_pwr",
|
||||
.microvolts = 5000000,
|
||||
.gpio = AMS_DELTA_GPIO_PIN_KEYBRD_PWR,
|
||||
.enable_high = 1,
|
||||
.init_data = &keybrd_pwr_initdata,
|
||||
};
|
||||
@@ -602,6 +609,7 @@ static struct platform_device *ams_delta_devices[] __initdata = {
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table *ams_delta_gpio_tables[] __initdata = {
|
||||
&ams_delta_nreset_gpiod_table,
|
||||
&ams_delta_audio_gpio_table,
|
||||
&keybrd_pwr_gpio_table,
|
||||
&ams_delta_lcd_gpio_table,
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/davinci_emac.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/of_platform.h>
|
||||
@@ -328,7 +329,6 @@ static struct regulator_init_data pandora_vmmc3 = {
|
||||
static struct fixed_voltage_config pandora_vwlan = {
|
||||
.supply_name = "vwlan",
|
||||
.microvolts = 1800000, /* 1.8V */
|
||||
.gpio = PANDORA_WIFI_NRESET_GPIO,
|
||||
.startup_delay = 50000, /* 50ms */
|
||||
.enable_high = 1,
|
||||
.init_data = &pandora_vmmc3,
|
||||
@@ -342,6 +342,19 @@ static struct platform_device pandora_vwlan_device = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table pandora_vwlan_gpiod_table = {
|
||||
.dev_id = "reg-fixed-voltage.1",
|
||||
.table = {
|
||||
/*
|
||||
* As this is a low GPIO number it should be at the first
|
||||
* GPIO bank.
|
||||
*/
|
||||
GPIO_LOOKUP("gpio-0-31", PANDORA_WIFI_NRESET_GPIO,
|
||||
NULL, GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void pandora_wl1251_init_card(struct mmc_card *card)
|
||||
{
|
||||
/*
|
||||
@@ -403,6 +416,7 @@ fail:
|
||||
static void __init omap3_pandora_legacy_init(void)
|
||||
{
|
||||
platform_device_register(&pandora_backlight);
|
||||
gpiod_add_lookup_table(&pandora_vwlan_gpiod_table);
|
||||
platform_device_register(&pandora_vwlan_device);
|
||||
omap_hsmmc_init(pandora_mmc3);
|
||||
omap_hsmmc_late_init(pandora_mmc3);
|
||||
|
||||
@@ -984,7 +984,6 @@ static struct fixed_voltage_config camera_dummy_config = {
|
||||
.supply_name = "camera_vdd",
|
||||
.input_supply = "vcc cam",
|
||||
.microvolts = 2800000,
|
||||
.gpio = -1,
|
||||
.enable_high = 0,
|
||||
.init_data = &camera_dummy_initdata,
|
||||
};
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/regulator/fixed.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/leds-lp3944.h>
|
||||
#include <linux/platform_data/i2c-pxa.h>
|
||||
@@ -698,31 +699,39 @@ static struct pxa27x_keypad_platform_data e2_keypad_platform_data = {
|
||||
|
||||
#if defined(CONFIG_MACH_EZX_A780) || defined(CONFIG_MACH_EZX_A910)
|
||||
/* camera */
|
||||
static struct regulator_consumer_supply camera_dummy_supplies[] = {
|
||||
static struct regulator_consumer_supply camera_regulator_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdd", "0-005d"),
|
||||
};
|
||||
|
||||
static struct regulator_init_data camera_dummy_initdata = {
|
||||
.consumer_supplies = camera_dummy_supplies,
|
||||
.num_consumer_supplies = ARRAY_SIZE(camera_dummy_supplies),
|
||||
static struct regulator_init_data camera_regulator_initdata = {
|
||||
.consumer_supplies = camera_regulator_supplies,
|
||||
.num_consumer_supplies = ARRAY_SIZE(camera_regulator_supplies),
|
||||
.constraints = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
};
|
||||
|
||||
static struct fixed_voltage_config camera_dummy_config = {
|
||||
static struct fixed_voltage_config camera_regulator_config = {
|
||||
.supply_name = "camera_vdd",
|
||||
.microvolts = 2800000,
|
||||
.gpio = GPIO50_nCAM_EN,
|
||||
.enable_high = 0,
|
||||
.init_data = &camera_dummy_initdata,
|
||||
.init_data = &camera_regulator_initdata,
|
||||
};
|
||||
|
||||
static struct platform_device camera_supply_dummy_device = {
|
||||
static struct platform_device camera_supply_regulator_device = {
|
||||
.name = "reg-fixed-voltage",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &camera_dummy_config,
|
||||
.platform_data = &camera_regulator_config,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table camera_supply_gpiod_table = {
|
||||
.dev_id = "reg-fixed-voltage.1",
|
||||
.table = {
|
||||
GPIO_LOOKUP("gpio-pxa", GPIO50_nCAM_EN,
|
||||
NULL, GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
#endif
|
||||
@@ -800,7 +809,7 @@ static struct i2c_board_info a780_i2c_board_info[] = {
|
||||
|
||||
static struct platform_device *a780_devices[] __initdata = {
|
||||
&a780_gpio_keys,
|
||||
&camera_supply_dummy_device,
|
||||
&camera_supply_regulator_device,
|
||||
};
|
||||
|
||||
static void __init a780_init(void)
|
||||
@@ -823,6 +832,7 @@ static void __init a780_init(void)
|
||||
if (a780_camera_init() == 0)
|
||||
pxa_set_camera_info(&a780_pxacamera_platform_data);
|
||||
|
||||
gpiod_add_lookup_table(&camera_supply_gpiod_table);
|
||||
pwm_add_table(ezx_pwm_lookup, ARRAY_SIZE(ezx_pwm_lookup));
|
||||
platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
|
||||
platform_add_devices(ARRAY_AND_SIZE(a780_devices));
|
||||
@@ -1098,7 +1108,7 @@ static struct i2c_board_info __initdata a910_i2c_board_info[] = {
|
||||
|
||||
static struct platform_device *a910_devices[] __initdata = {
|
||||
&a910_gpio_keys,
|
||||
&camera_supply_dummy_device,
|
||||
&camera_supply_regulator_device,
|
||||
};
|
||||
|
||||
static void __init a910_init(void)
|
||||
@@ -1121,6 +1131,7 @@ static void __init a910_init(void)
|
||||
if (a910_camera_init() == 0)
|
||||
pxa_set_camera_info(&a910_pxacamera_platform_data);
|
||||
|
||||
gpiod_add_lookup_table(&camera_supply_gpiod_table);
|
||||
pwm_add_table(ezx_pwm_lookup, ARRAY_SIZE(ezx_pwm_lookup));
|
||||
platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
|
||||
platform_add_devices(ARRAY_AND_SIZE(a910_devices));
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/mfd/htc-pasic3.h>
|
||||
@@ -696,7 +697,6 @@ static struct regulator_init_data vads7846_regulator = {
|
||||
static struct fixed_voltage_config vads7846 = {
|
||||
.supply_name = "vads7846",
|
||||
.microvolts = 3300000, /* probably */
|
||||
.gpio = -EINVAL,
|
||||
.startup_delay = 0,
|
||||
.init_data = &vads7846_regulator,
|
||||
};
|
||||
|
||||
@@ -886,7 +886,6 @@ static struct regulator_init_data audio_va_initdata = {
|
||||
static struct fixed_voltage_config audio_va_config = {
|
||||
.supply_name = "audio_va",
|
||||
.microvolts = 5000000,
|
||||
.gpio = GPIO_AUDIO_VA_ENABLE,
|
||||
.enable_high = 1,
|
||||
.enabled_at_boot = 0,
|
||||
.init_data = &audio_va_initdata,
|
||||
@@ -900,6 +899,15 @@ static struct platform_device audio_va_device = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table audio_va_gpiod_table = {
|
||||
.dev_id = "reg-fixed-voltage.0",
|
||||
.table = {
|
||||
GPIO_LOOKUP("gpio-pxa", GPIO_AUDIO_VA_ENABLE,
|
||||
NULL, GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
/* Dummy supplies for Codec's VD/VLC */
|
||||
|
||||
static struct regulator_consumer_supply audio_dummy_supplies[] = {
|
||||
@@ -918,7 +926,6 @@ static struct regulator_init_data audio_dummy_initdata = {
|
||||
static struct fixed_voltage_config audio_dummy_config = {
|
||||
.supply_name = "audio_vd",
|
||||
.microvolts = 3300000,
|
||||
.gpio = -1,
|
||||
.init_data = &audio_dummy_initdata,
|
||||
};
|
||||
|
||||
@@ -1033,6 +1040,7 @@ static void __init raumfeld_audio_init(void)
|
||||
else
|
||||
gpio_direction_output(GPIO_MCLK_RESET, 1);
|
||||
|
||||
gpiod_add_lookup_table(&audio_va_gpiod_table);
|
||||
platform_add_devices(ARRAY_AND_SIZE(audio_regulator_devices));
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/serial_8250.h>
|
||||
#include <linux/dm9000.h>
|
||||
#include <linux/mmc/host.h>
|
||||
@@ -410,7 +411,6 @@ static struct regulator_init_data can_regulator_init_data = {
|
||||
static struct fixed_voltage_config can_regulator_pdata = {
|
||||
.supply_name = "CAN_SHDN",
|
||||
.microvolts = 3300000,
|
||||
.gpio = ZEUS_CAN_SHDN_GPIO,
|
||||
.init_data = &can_regulator_init_data,
|
||||
};
|
||||
|
||||
@@ -422,6 +422,15 @@ static struct platform_device can_regulator_device = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table can_regulator_gpiod_table = {
|
||||
.dev_id = "reg-fixed-voltage.0",
|
||||
.table = {
|
||||
GPIO_LOOKUP("gpio-pxa", ZEUS_CAN_SHDN_GPIO,
|
||||
NULL, GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct mcp251x_platform_data zeus_mcp2515_pdata = {
|
||||
.oscillator_frequency = 16*1000*1000,
|
||||
};
|
||||
@@ -538,7 +547,6 @@ static struct regulator_init_data zeus_ohci_regulator_data = {
|
||||
static struct fixed_voltage_config zeus_ohci_regulator_config = {
|
||||
.supply_name = "vbus2",
|
||||
.microvolts = 5000000, /* 5.0V */
|
||||
.gpio = ZEUS_USB2_PWREN_GPIO,
|
||||
.enable_high = 1,
|
||||
.startup_delay = 0,
|
||||
.init_data = &zeus_ohci_regulator_data,
|
||||
@@ -552,6 +560,15 @@ static struct platform_device zeus_ohci_regulator_device = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table zeus_ohci_regulator_gpiod_table = {
|
||||
.dev_id = "reg-fixed-voltage.0",
|
||||
.table = {
|
||||
GPIO_LOOKUP("gpio-pxa", ZEUS_USB2_PWREN_GPIO,
|
||||
NULL, GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct pxaohci_platform_data zeus_ohci_platform_data = {
|
||||
.port_mode = PMM_NPS_MODE,
|
||||
/* Clear Power Control Polarity Low and set Power Sense
|
||||
@@ -855,6 +872,8 @@ static void __init zeus_init(void)
|
||||
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(zeus_pin_config));
|
||||
|
||||
gpiod_add_lookup_table(&can_regulator_gpiod_table);
|
||||
gpiod_add_lookup_table(&zeus_ohci_regulator_gpiod_table);
|
||||
platform_add_devices(zeus_devices, ARRAY_SIZE(zeus_devices));
|
||||
|
||||
zeus_register_ohci();
|
||||
|
||||
@@ -352,7 +352,6 @@ static struct fixed_voltage_config wallvdd_pdata = {
|
||||
.supply_name = "WALLVDD",
|
||||
.microvolts = 5000000,
|
||||
.init_data = &wallvdd_data,
|
||||
.gpio = -EINVAL,
|
||||
};
|
||||
|
||||
static struct platform_device wallvdd_device = {
|
||||
|
||||
@@ -222,7 +222,6 @@ static struct fixed_voltage_config smdk6410_b_pwr_5v_pdata = {
|
||||
.supply_name = "B_PWR_5V",
|
||||
.microvolts = 5000000,
|
||||
.init_data = &smdk6410_b_pwr_5v_data,
|
||||
.gpio = -EINVAL,
|
||||
};
|
||||
|
||||
static struct platform_device smdk6410_b_pwr_5v = {
|
||||
|
||||
@@ -101,7 +101,7 @@ static int __init assabet_init_gpio(void __iomem *reg, u32 def_val)
|
||||
|
||||
assabet_bcr_gc = gc;
|
||||
|
||||
return gc->base;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -471,6 +471,14 @@ static struct fixed_voltage_config assabet_cf_vcc_pdata __initdata = {
|
||||
.enable_high = 1,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table assabet_cf_vcc_gpio_table = {
|
||||
.dev_id = "reg-fixed-voltage.0",
|
||||
.table = {
|
||||
GPIO_LOOKUP("assabet", 0, NULL, GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void __init assabet_init(void)
|
||||
{
|
||||
/*
|
||||
@@ -517,9 +525,11 @@ static void __init assabet_init(void)
|
||||
neponset_resources, ARRAY_SIZE(neponset_resources));
|
||||
#endif
|
||||
} else {
|
||||
gpiod_add_lookup_table(&assabet_cf_vcc_gpio_table);
|
||||
sa11x0_register_fixed_regulator(0, &assabet_cf_vcc_pdata,
|
||||
assabet_cf_vcc_consumers,
|
||||
ARRAY_SIZE(assabet_cf_vcc_consumers));
|
||||
assabet_cf_vcc_consumers,
|
||||
ARRAY_SIZE(assabet_cf_vcc_consumers),
|
||||
true);
|
||||
|
||||
}
|
||||
|
||||
@@ -802,7 +812,6 @@ fs_initcall(assabet_leds_init);
|
||||
|
||||
void __init assabet_init_irq(void)
|
||||
{
|
||||
unsigned int assabet_gpio_base;
|
||||
u32 def_val;
|
||||
|
||||
sa1100_init_irq();
|
||||
@@ -817,9 +826,7 @@ void __init assabet_init_irq(void)
|
||||
*
|
||||
* This must precede any driver calls to BCR_set() or BCR_clear().
|
||||
*/
|
||||
assabet_gpio_base = assabet_init_gpio((void *)&ASSABET_BCR, def_val);
|
||||
|
||||
assabet_cf_vcc_pdata.gpio = assabet_gpio_base + 0;
|
||||
assabet_init_gpio((void *)&ASSABET_BCR, def_val);
|
||||
}
|
||||
|
||||
MACHINE_START(ASSABET, "Intel-Assabet")
|
||||
|
||||
@@ -348,7 +348,8 @@ void __init sa11x0_init_late(void)
|
||||
|
||||
int __init sa11x0_register_fixed_regulator(int n,
|
||||
struct fixed_voltage_config *cfg,
|
||||
struct regulator_consumer_supply *supplies, unsigned num_supplies)
|
||||
struct regulator_consumer_supply *supplies, unsigned num_supplies,
|
||||
bool uses_gpio)
|
||||
{
|
||||
struct regulator_init_data *id;
|
||||
|
||||
@@ -356,7 +357,7 @@ int __init sa11x0_register_fixed_regulator(int n,
|
||||
if (!cfg->init_data)
|
||||
return -ENOMEM;
|
||||
|
||||
if (cfg->gpio < 0)
|
||||
if (!uses_gpio)
|
||||
id->constraints.always_on = 1;
|
||||
id->constraints.name = cfg->supply_name;
|
||||
id->constraints.min_uV = cfg->microvolts;
|
||||
|
||||
@@ -54,4 +54,5 @@ void sa11x0_register_pcmcia(int socket, struct gpiod_lookup_table *);
|
||||
struct fixed_voltage_config;
|
||||
struct regulator_consumer_supply;
|
||||
int sa11x0_register_fixed_regulator(int n, struct fixed_voltage_config *cfg,
|
||||
struct regulator_consumer_supply *supplies, unsigned num_supplies);
|
||||
struct regulator_consumer_supply *supplies, unsigned num_supplies,
|
||||
bool uses_gpio);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user