| /OK3568_Linux_fs/kernel/drivers/staging/hikey9xx/ |
| H A D | hi6421-spmi-pmic.c | 3 * Device driver for regulators in HISI PMIC IC 27 #include <linux/mfd/hi6421-spmi-pmic.h> 38 /* 8-bit register offset in PMIC */ 63 * The PMIC register is only 8-bit. 64 * Hisilicon SoC use hardware to map PMIC register into SoC mapping. 67 int hi6421_spmi_pmic_read(struct hi6421_spmi_pmic *pmic, int reg) in hi6421_spmi_pmic_read() argument 73 pdev = to_spmi_device(pmic->dev); in hi6421_spmi_pmic_read() 88 int hi6421_spmi_pmic_write(struct hi6421_spmi_pmic *pmic, int reg, u32 val) in hi6421_spmi_pmic_write() argument 93 pdev = to_spmi_device(pmic->dev); in hi6421_spmi_pmic_write() 107 int hi6421_spmi_pmic_rmw(struct hi6421_spmi_pmic *pmic, int reg, in hi6421_spmi_pmic_rmw() argument [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/power/pmic/ |
| H A D | Kconfig | 2 bool "Enable Driver Model for PMIC drivers (UCLASS_PMIC)" 5 This config enables the driver-model PMIC support. 6 UCLASS_PMIC - designed to provide an I/O interface for PMIC devices. 7 For the multi-function PMIC devices, this can be used as parent I/O 10 - 'drivers/power/pmic/pmic-uclass.c' 11 - 'include/power/pmic.h' 14 bool "Enable Driver Model for PMIC drivers (UCLASS_PMIC) in SPL" 17 This config enables the driver-model PMIC support. 18 UCLASS_PMIC - designed to provide an I/O interface for PMIC devices. 19 For the multi-function PMIC devices, this can be used as parent I/O [all …]
|
| H A D | pmic-uclass.su | |
| /OK3568_Linux_fs/kernel/drivers/regulator/ |
| H A D | max77620-regulator.c | 99 static int max77620_regulator_get_fps_src(struct max77620_regulator *pmic, in max77620_regulator_get_fps_src() argument 102 struct max77620_regulator_info *rinfo = pmic->rinfo[id]; in max77620_regulator_get_fps_src() 106 ret = regmap_read(pmic->rmap, rinfo->fps_addr, &val); in max77620_regulator_get_fps_src() 108 dev_err(pmic->dev, "Reg 0x%02x read failed %d\n", in max77620_regulator_get_fps_src() 116 static int max77620_regulator_set_fps_src(struct max77620_regulator *pmic, in max77620_regulator_set_fps_src() argument 119 struct max77620_regulator_info *rinfo = pmic->rinfo[id]; in max77620_regulator_set_fps_src() 134 ret = regmap_read(pmic->rmap, rinfo->fps_addr, &val); in max77620_regulator_set_fps_src() 136 dev_err(pmic->dev, "Reg 0x%02x read failed %d\n", in max77620_regulator_set_fps_src() 141 pmic->active_fps_src[id] = ret; in max77620_regulator_set_fps_src() 145 dev_err(pmic->dev, "Invalid FPS %d for regulator %d\n", in max77620_regulator_set_fps_src() [all …]
|
| H A D | tps65910-regulator.c | 392 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_set_mode() local 396 reg = pmic->get_ctrl_reg(id); in tps65910_set_mode() 417 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_get_mode() local 421 reg = pmic->get_ctrl_reg(id); in tps65910_get_mode() 515 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_get_voltage_sel() local 519 reg = pmic->get_ctrl_reg(id); in tps65910_get_voltage_sel() 558 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65911_get_voltage_sel() local 563 reg = pmic->get_ctrl_reg(id); in tps65911_get_voltage_sel() 635 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_set_voltage_sel() local 639 reg = pmic->get_ctrl_reg(id); in tps65910_set_voltage_sel() [all …]
|
| H A D | Kconfig | 139 signal AB8500 PMIC 168 tristate "AS3711 PMIC" 172 AS3711 PMIC 175 tristate "AMS AS3722 PMIC Regulators" 179 AS3722 PMIC. This will enable support for all the software 183 tristate "X-POWERS AXP20X PMIC Regulators" 187 AXP20X PMIC. 201 This driver supports voltage regulators on ROHM BD70528 PMIC. 213 This driver supports voltage regulators on ROHM BD71828 PMIC. 225 This driver supports voltage regulators on ROHM BD71837 PMIC. [all …]
|
| H A D | palmas-regulator.c | 3 * Driver for Regulator part of Palmas PMIC Chips 442 struct palmas_pmic *pmic = rdev_get_drvdata(dev); in palmas_set_mode_smps() local 443 struct palmas_pmic_driver_data *ddata = pmic->palmas->pmic_ddata; in palmas_set_mode_smps() 448 ret = palmas_smps_read(pmic->palmas, rinfo->ctrl_addr, ®); in palmas_set_mode_smps() 471 pmic->current_reg_mode[id] = reg & PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; in palmas_set_mode_smps() 473 palmas_smps_write(pmic->palmas, rinfo->ctrl_addr, reg); in palmas_set_mode_smps() 476 pmic->desc[id].enable_val = pmic->current_reg_mode[id]; in palmas_set_mode_smps() 483 struct palmas_pmic *pmic = rdev_get_drvdata(dev); in palmas_get_mode_smps() local 487 reg = pmic->current_reg_mode[id] & PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; in palmas_get_mode_smps() 505 struct palmas_pmic *pmic = rdev_get_drvdata(rdev); in palmas_smps_set_ramp_delay() local [all …]
|
| H A D | isl6271a-regulator.c | 31 /* PMIC details */ 39 struct isl_pmic *pmic = rdev_get_drvdata(dev); in isl6271a_get_voltage_sel() local 42 mutex_lock(&pmic->mtx); in isl6271a_get_voltage_sel() 44 idx = i2c_smbus_read_byte(pmic->client); in isl6271a_get_voltage_sel() 46 dev_err(&pmic->client->dev, "Error getting voltage\n"); in isl6271a_get_voltage_sel() 48 mutex_unlock(&pmic->mtx); in isl6271a_get_voltage_sel() 55 struct isl_pmic *pmic = rdev_get_drvdata(dev); in isl6271a_set_voltage_sel() local 58 mutex_lock(&pmic->mtx); in isl6271a_set_voltage_sel() 60 err = i2c_smbus_write_byte(pmic->client, selector); in isl6271a_set_voltage_sel() 62 dev_err(&pmic->client->dev, "Error setting voltage\n"); in isl6271a_set_voltage_sel() [all …]
|
| /OK3568_Linux_fs/u-boot/include/power/ |
| H A D | pmic.h | 46 struct pmic; 48 int (*fg_battery_check) (struct pmic *p, struct pmic *bat); 49 int (*fg_battery_update) (struct pmic *p, struct pmic *bat); 53 int (*chrg_type) (struct pmic *p); 54 int (*chrg_bat_present) (struct pmic *p); 55 int (*chrg_state) (struct pmic *p, int state, int current); 60 int (*battery_init) (struct pmic *bat, struct pmic *p1, 61 struct pmic *p2, struct pmic *p3); 62 int (*battery_charge) (struct pmic *bat); 64 struct pmic *chrg, *fg, *muic; [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/rockchip/ebc-dev/pmic/ |
| H A D | ebc_pmic.h | 20 void (*pmic_power_req)(struct ebc_pmic *pmic, bool up); 21 void (*pmic_pm_suspend)(struct ebc_pmic *pmic); 22 void (*pmic_pm_resume)(struct ebc_pmic *pmic); 23 int (*pmic_read_temperature)(struct ebc_pmic *pmic, int *t); 24 int (*pmic_get_vcom)(struct ebc_pmic *pmic); 25 int (*pmic_set_vcom)(struct ebc_pmic *pmic, int value); 28 static inline void ebc_pmic_power_on(struct ebc_pmic *pmic) in ebc_pmic_power_on() argument 30 return pmic->pmic_power_req(pmic, 1); in ebc_pmic_power_on() 33 static inline void ebc_pmic_power_off(struct ebc_pmic *pmic) in ebc_pmic_power_off() argument 35 return pmic->pmic_power_req(pmic, 0); in ebc_pmic_power_off() [all …]
|
| H A D | ebc_pmic.c | 17 int ebc_pmic_set_vcom(struct ebc_pmic *pmic, int value) in ebc_pmic_set_vcom() argument 24 dev_err(pmic->dev, "vcom value should be %d~%d\n", VCOM_MIN_MV, VCOM_MAX_MV); in ebc_pmic_set_vcom() 27 dev_info(pmic->dev, "set chip vcom to: %dmV\n", value); in ebc_pmic_set_vcom() 29 /* set pmic vcom */ in ebc_pmic_set_vcom() 30 pmic->pmic_set_vcom(pmic, value); in ebc_pmic_set_vcom() 35 dev_info(pmic->dev, "store vcom %d to vendor storage\n", value); in ebc_pmic_set_vcom() 39 dev_err(pmic->dev, "%s failed to write vendor storage\n", __func__); in ebc_pmic_set_vcom() 46 void ebc_pmic_verity_vcom(struct ebc_pmic *pmic) in ebc_pmic_verity_vcom() argument 55 dev_err(pmic->dev, "invaild vcom value %d from vendor storage\n", value_vendor); in ebc_pmic_verity_vcom() 58 value_chip = pmic->pmic_get_vcom(pmic); in ebc_pmic_verity_vcom() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/mfd/ |
| H A D | hi655x-pmic.c | 3 * Device driver for MFD hi655x PMIC 17 #include <linux/mfd/hi655x-pmic.h> 36 .name = "hi655x-pmic", 95 struct hi655x_pmic *pmic; in hi655x_pmic_probe() local 100 pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL); in hi655x_pmic_probe() 101 if (!pmic) in hi655x_pmic_probe() 103 pmic->dev = dev; in hi655x_pmic_probe() 105 pmic->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in hi655x_pmic_probe() 106 base = devm_ioremap_resource(dev, pmic->res); in hi655x_pmic_probe() 110 pmic->regmap = devm_regmap_init_mmio_clk(dev, NULL, base, in hi655x_pmic_probe() [all …]
|
| H A D | intel_soc_pmic_bxtwc.c | 3 * MFD core driver for Intel Broxton Whiskey Cove PMIC 20 /* PMIC device registers */ 58 /* Whiskey Cove PMIC share same ACPI ID between different platforms */ 281 struct intel_soc_pmic *pmic = context; in regmap_ipc_byte_reg_read() local 283 if (!pmic) in regmap_ipc_byte_reg_read() 295 ret = intel_scu_ipc_dev_command(pmic->scu, PMC_PMIC_ACCESS, in regmap_ipc_byte_reg_read() 311 struct intel_soc_pmic *pmic = context; in regmap_ipc_byte_reg_write() local 313 if (!pmic) in regmap_ipc_byte_reg_write() 326 return intel_scu_ipc_dev_command(pmic->scu, PMC_PMIC_ACCESS, in regmap_ipc_byte_reg_write() 331 /* sysfs interfaces to r/w PMIC registers, required by initial script */ [all …]
|
| H A D | intel_soc_pmic_core.c | 3 * Intel SoC PMIC MFD Driver 22 /* Crystal Cove PMIC shares same ACPI ID between different platforms */ 36 struct intel_soc_pmic *pmic; in intel_soc_pmic_i2c_probe() local 47 dev_err(dev, "Failed to get PMIC hardware revision\n"); in intel_soc_pmic_i2c_probe() 63 pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL); in intel_soc_pmic_i2c_probe() 64 if (!pmic) in intel_soc_pmic_i2c_probe() 67 dev_set_drvdata(dev, pmic); in intel_soc_pmic_i2c_probe() 69 pmic->regmap = devm_regmap_init_i2c(i2c, config->regmap_config); in intel_soc_pmic_i2c_probe() 70 if (IS_ERR(pmic->regmap)) in intel_soc_pmic_i2c_probe() 71 return PTR_ERR(pmic->regmap); in intel_soc_pmic_i2c_probe() [all …]
|
| H A D | intel_soc_pmic_chtwc.c | 3 * MFD core driver for Intel Cherrytrail Whiskey Cove PMIC 7 * Based on various non upstream patches to support the CHT Whiskey Cove PMIC: 21 /* PMIC device registers */ 29 /* Whiskey Cove PMIC share same ACPI ID between different platforms */ 140 struct intel_soc_pmic *pmic; in cht_wc_probe() local 147 dev_err(dev, "Failed to get PMIC hardware revision\n"); in cht_wc_probe() 151 dev_err(dev, "Invalid PMIC hardware revision: %llu\n", hrv); in cht_wc_probe() 159 pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL); in cht_wc_probe() 160 if (!pmic) in cht_wc_probe() 163 pmic->irq = client->irq; in cht_wc_probe() [all …]
|
| H A D | intel_soc_pmic_chtdc_ti.c | 3 * Device access for Dollar Cove TI PMIC 110 struct intel_soc_pmic *pmic; in chtdc_ti_probe() local 113 pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL); in chtdc_ti_probe() 114 if (!pmic) in chtdc_ti_probe() 117 i2c_set_clientdata(i2c, pmic); in chtdc_ti_probe() 119 pmic->regmap = devm_regmap_init_i2c(i2c, &chtdc_ti_regmap_config); in chtdc_ti_probe() 120 if (IS_ERR(pmic->regmap)) in chtdc_ti_probe() 121 return PTR_ERR(pmic->regmap); in chtdc_ti_probe() 122 pmic->irq = i2c->irq; in chtdc_ti_probe() 124 ret = devm_regmap_add_irq_chip(dev, pmic->regmap, pmic->irq, in chtdc_ti_probe() [all …]
|
| H A D | intel_soc_pmic_mrfld.c | 3 * Device access for Basin Cove PMIC 23 * Firmware on the systems with Basin Cove PMIC services Level 1 IRQs 77 struct intel_soc_pmic *pmic = context; in bcove_ipc_byte_reg_read() local 81 ret = intel_scu_ipc_dev_ioread8(pmic->scu, reg, &ipc_out); in bcove_ipc_byte_reg_read() 92 struct intel_soc_pmic *pmic = context; in bcove_ipc_byte_reg_write() local 95 return intel_scu_ipc_dev_iowrite8(pmic->scu, reg, ipc_in); in bcove_ipc_byte_reg_write() 109 struct intel_soc_pmic *pmic; in bcove_probe() local 113 pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL); in bcove_probe() 114 if (!pmic) in bcove_probe() 117 pmic->scu = devm_intel_scu_ipc_dev_get(dev); in bcove_probe() [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/power/ |
| H A D | Kconfig | 9 source "drivers/power/pmic/Kconfig" 26 prompt "Select Sunxi PMIC Variant" 34 bool "board without a pmic" 36 Select this for boards which do not use a PMIC. 39 bool "axp152 pmic support" 43 Select this to enable support for the axp152 pmic found on most 47 bool "axp209 pmic support" 51 Select this to enable support for the axp209 pmic found on most 55 bool "axp221 / axp223 pmic support" 59 Select this to enable support for the axp221/axp223 pmic found on most [all …]
|
| H A D | power_core.c | 17 #include <power/pmic.h> 21 int check_reg(struct pmic *p, u32 reg) in check_reg() 32 int pmic_set_output(struct pmic *p, u32 reg, int out, int on) in pmic_set_output() 50 static void pmic_show_info(struct pmic *p) in pmic_show_info() 52 printf("PMIC: %s\n", p->name); in pmic_show_info() 55 static int pmic_dump(struct pmic *p) in pmic_dump() 61 puts("Wrong PMIC name!\n"); in pmic_dump() 69 puts("PMIC: Registers dump failed\n"); in pmic_dump() 80 struct pmic *pmic_alloc(void) in pmic_alloc() 82 struct pmic *p; in pmic_alloc() [all …]
|
| /OK3568_Linux_fs/u-boot/doc/driver-model/ |
| H A D | pmic-framework.txt | 8 PMIC framework based on Driver Model 13 3. Pmic uclass 18 This is an introduction to driver-model multi uclass PMIC IC's support. 20 - UCLASS_PMIC - basic uclass type for PMIC I/O, which provides common 22 - UCLASS_REGULATOR - additional uclass type for specific PMIC features, 27 - drivers/power/pmic/pmic-uclass.c 28 - include/power/pmic.h 39 The Power Management Integrated Circuits (PMIC) are used in embedded systems 43 The single PMIC can provide various functions by single or multiple interfaces, 49 | BUS 0 | Multi interface PMIC IC |--> LDO out 1 [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/regulator/ |
| H A D | max8997-regulator.txt | 7 describes the bindings for 'pmic' sub-block of max8997. 10 - compatible: Should be "maxim,max8997-pmic". 11 - reg: Specifies the i2c slave address of the pmic block. It should be 0x66. 13 - max8997,pmic-buck1-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 17 - max8997,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 21 - max8997,pmic-buck5-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 25 [1] If none of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional 26 property is specified, the 'max8997,pmic-buck[1/2/5]-dvs-voltage' 30 If either of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional 32 'max8997,pmic-buck[1/2/5]-dvs-voltage' should be specified. [all …]
|
| H A D | samsung,s5m8767.txt | 16 - s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used 19 [1] If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional 21 's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified. 24 - s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 28 - s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 32 - s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 36 - s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs. 37 - s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs. 38 - s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs. 42 - s5m8767,pmic-buck-default-dvs-idx: Default voltage setting selected from [all …]
|
| /OK3568_Linux_fs/kernel/drivers/acpi/pmic/ |
| H A D | Kconfig | 4 bool "PMIC (Power Management Integrated Circuit) operation region support" 7 region of the PMIC chip. The operation region can be used 9 PMIC chip. 14 bool "ACPI operation region support for Bay Trail Crystal Cove PMIC" 18 version of the Crystal Cove PMIC. 21 bool "ACPI operation region support for Cherry Trail Crystal Cove PMIC" 25 version of the Crystal Cove PMIC. 28 bool "ACPI operation region support for XPower AXP288 PMIC" 31 This config adds ACPI operation region support for XPower AXP288 PMIC. 34 bool "ACPI operation region support for BXT WhiskeyCove PMIC" [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/power/regulator/ |
| H A D | Kconfig | 10 - 'include/power/pmic.h' 12 - 'drivers/power/pmic/pmic-uclass.c' 13 - 'drivers/power/pmic/regulator-uclass.c' 16 for this purpose if PMIC I/O driver is implemented or dm_scan_fdt_dev() 24 code space can be saved by accessing the PMIC registers directly. 32 Enable support for the regulator functions of the ACT8846 PMIC. The 34 by the PMIC device. This driver is controlled by a device tree node 44 done using direct register writes to the PMIC. 115 Enable support for the regulator functions of the RK8XX PMIC. The 117 by the PMIC device. This driver is controlled by a device tree node [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mfd/ |
| H A D | max8998.txt | 8 PMIC sub-block 11 The PMIC sub-block contains a number of voltage and current regulators, 20 - reg: Specifies the i2c slave address of the pmic block. It should be 0x66. 26 - max8998,pmic-buck1-dvs-gpios: GPIO specifiers for two host gpios used 29 - max8998,pmic-buck2-dvs-gpio: GPIO specifier for host gpio used 32 - max8998,pmic-buck1-default-dvs-idx: Default voltage setting selected from 36 - max8998,pmic-buck2-default-dvs-idx: Default voltage setting selected from 40 - max8998,pmic-buck-voltage-lock: If present, disallows changing of 43 Additional properties required if max8998,pmic-buck1-dvs-gpios is defined: 44 - max8998,pmic-buck1-dvs-voltage: An array of 4 voltage values in microvolts [all …]
|