regulator: Updates for v4.12
Quite a lot going on with the regulator API for this release, much more
in the core than in the drivers for a change:
- Fixes for voltage change propagation through dumb power switches.
- A notification when regulators are enabled.
- A new settling time property for regulators where the time taken to
move to a new voltage is not related to the size of the change.
- Some reorganization of the Arizona drivers in preparation for sharing
the code with the next generation devices they've been integrated
with.
- Support for newer Freescale chips in the Anatop regulator.
- A new driver for voltage controlled regulators to cope with some
exciting ChromeOS hardware designs.
- Support for Rohm BD9571MWV-M and TI TPS65132.
-----BEGIN PGP SIGNATURE-----
iQFHBAABCAAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlkJ72cTHGJyb29uaWVA
a2VybmVsLm9yZwAKCRAk1otyXVSH0KfMB/9zutY/L8UyJ40ZOIn4mgfUiWuzTrMP
lFWlHyRtt0gz6pHlZtaslDUMpp95R/BchE3fNfvmi1VHAAL8yt+edlMniPmVLG+M
09CSr27n0Vk8uk8DIpZNzzPc/Rxp0tfa59/+e01yV69s3x/j0yoFXGxHPbco2zT/
EVSYgQf5yXgAu4qG/htLm0AEQyHvfnMiGvd2Z3xU+kE1BOv617ATmYBdvkZLOKDO
f7QqVK/POkVmDDh3p+qOUYa1+su6icpe3O2bYeWc/x50gxXx+ouxdtmqLSpPoWZz
ox+1S1Mv32UC5q9NMF2lz1o0SK8VNLVVTQHr9x57IbXCyIBl84e+6JES
=6YOx
-----END PGP SIGNATURE-----
Merge tag 'regulator-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
"Quite a lot going on with the regulator API for this release, much
more in the core than in the drivers for a change:
- Fixes for voltage change propagation through dumb power switches.
- A notification when regulators are enabled.
- A new settling time property for regulators where the time taken to
move to a new voltage is not related to the size of the change.
- Some reorganization of the Arizona drivers in preparation for
sharing the code with the next generation devices they've been
integrated with.
- Support for newer Freescale chips in the Anatop regulator.
- A new driver for voltage controlled regulators to cope with some
exciting ChromeOS hardware designs.
- Support for Rohm BD9571MWV-M and TI TPS65132"
* tag 'regulator-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (51 commits)
regulator: Add ROHM BD9571MWV-M PMIC regulator driver
regulator: arizona-ldo1: Factor out generic initialization
regulator: arizona-ldo1: Make arizona_ldo1 independent of struct arizona
regulator: arizona-ldo1: Move pdata into a separate structure
regulator: arizona-micsupp: Factor out generic initialization
regulator: arizona-micsupp: Make arizona_micsupp independent of struct arizona
regulator: arizona-micsupp: Move pdata into a separate structure
regulator: arizona: Split KConfig options for LDO1 and MICSUPP regulators
regulator: anatop: make regulator name property required
regulator: tps65023: Fix inverted core enable logic.
regulator: anatop: make sure regulator name is properly defined
regulator: core: Allow dummy regulators for supplies
regulator: core: Only propagate voltage changes to if it can change voltages
regulator: vctrl: Fix out of bounds array access for vctrl->vtable
regulator: tps65132: fix platform_no_drv_owner.cocci warnings
regulator: tps65132: Fix off-by-one for .max_register setting
regulator: anatop: set default voltage selector for pcie
regulator: tps65132: add device-tree binding
regulator: tps65132: add regulator driver for TI TPS65132
regulator: anatop: remove unneeded name field of struct anatop_regulator
...
This commit is contained in:
commit
a90f0e9ebb
42 changed files with 1638 additions and 187 deletions
|
|
@ -12,6 +12,8 @@
|
|||
#define _ARIZONA_PDATA_H
|
||||
|
||||
#include <dt-bindings/mfd/arizona.h>
|
||||
#include <linux/regulator/arizona-ldo1.h>
|
||||
#include <linux/regulator/arizona-micsupp.h>
|
||||
|
||||
#define ARIZONA_GPN_DIR_MASK 0x8000 /* GPN_DIR */
|
||||
#define ARIZONA_GPN_DIR_SHIFT 15 /* GPN_DIR */
|
||||
|
|
@ -76,13 +78,12 @@ struct arizona_micd_range {
|
|||
|
||||
struct arizona_pdata {
|
||||
int reset; /** GPIO controlling /RESET, if any */
|
||||
int ldoena; /** GPIO controlling LODENA, if any */
|
||||
|
||||
/** Regulator configuration for MICVDD */
|
||||
struct regulator_init_data *micvdd;
|
||||
struct arizona_micsupp_pdata micvdd;
|
||||
|
||||
/** Regulator configuration for LDO1 */
|
||||
struct regulator_init_data *ldo1;
|
||||
struct arizona_ldo1_pdata ldo1;
|
||||
|
||||
/** If a direct 32kHz clock is provided on an MCLK specify it here */
|
||||
int clk32k_src;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
struct regulator_init_data;
|
||||
|
||||
struct isl9305_pdata {
|
||||
struct regulator_init_data *init_data[ISL9305_MAX_REGULATOR];
|
||||
struct regulator_init_data *init_data[ISL9305_MAX_REGULATOR + 1];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
24
include/linux/regulator/arizona-ldo1.h
Normal file
24
include/linux/regulator/arizona-ldo1.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Platform data for Arizona LDO1 regulator
|
||||
*
|
||||
* Copyright 2017 Cirrus Logic
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef ARIZONA_LDO1_H
|
||||
#define ARIZONA_LDO1_H
|
||||
|
||||
struct regulator_init_data;
|
||||
|
||||
struct arizona_ldo1_pdata {
|
||||
/** GPIO controlling LDOENA, if any */
|
||||
int ldoena;
|
||||
|
||||
/** Regulator configuration for LDO1 */
|
||||
const struct regulator_init_data *init_data;
|
||||
};
|
||||
|
||||
#endif
|
||||
21
include/linux/regulator/arizona-micsupp.h
Normal file
21
include/linux/regulator/arizona-micsupp.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Platform data for Arizona micsupp regulator
|
||||
*
|
||||
* Copyright 2017 Cirrus Logic
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef ARIZONA_MICSUPP_H
|
||||
#define ARIZONA_MICSUPP_H
|
||||
|
||||
struct regulator_init_data;
|
||||
|
||||
struct arizona_micsupp_pdata {
|
||||
/** Regulator configuration for micsupp */
|
||||
const struct regulator_init_data *init_data;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -119,6 +119,7 @@ struct regmap;
|
|||
#define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200
|
||||
#define REGULATOR_EVENT_PRE_DISABLE 0x400
|
||||
#define REGULATOR_EVENT_ABORT_DISABLE 0x800
|
||||
#define REGULATOR_EVENT_ENABLE 0x1000
|
||||
|
||||
/*
|
||||
* Regulator errors that can be queried using regulator_get_error_flags
|
||||
|
|
|
|||
|
|
@ -292,6 +292,14 @@ enum regulator_type {
|
|||
* set_active_discharge
|
||||
* @active_discharge_reg: Register for control when using regmap
|
||||
* set_active_discharge
|
||||
* @soft_start_reg: Register for control when using regmap set_soft_start
|
||||
* @soft_start_mask: Mask for control when using regmap set_soft_start
|
||||
* @soft_start_val_on: Enabling value for control when using regmap
|
||||
* set_soft_start
|
||||
* @pull_down_reg: Register for control when using regmap set_pull_down
|
||||
* @pull_down_mask: Mask for control when using regmap set_pull_down
|
||||
* @pull_down_val_on: Enabling value for control when using regmap
|
||||
* set_pull_down
|
||||
*
|
||||
* @enable_time: Time taken for initial enable of regulator (in uS).
|
||||
* @off_on_delay: guard time (in uS), before re-enabling a regulator
|
||||
|
|
@ -345,6 +353,12 @@ struct regulator_desc {
|
|||
unsigned int active_discharge_off;
|
||||
unsigned int active_discharge_mask;
|
||||
unsigned int active_discharge_reg;
|
||||
unsigned int soft_start_reg;
|
||||
unsigned int soft_start_mask;
|
||||
unsigned int soft_start_val_on;
|
||||
unsigned int pull_down_reg;
|
||||
unsigned int pull_down_mask;
|
||||
unsigned int pull_down_val_on;
|
||||
|
||||
unsigned int enable_time;
|
||||
|
||||
|
|
@ -429,6 +443,8 @@ struct regulator_dev {
|
|||
struct regulator_enable_gpio *ena_pin;
|
||||
unsigned int ena_gpio_state:1;
|
||||
|
||||
unsigned int is_switch:1;
|
||||
|
||||
/* time when this regulator was disabled last time */
|
||||
unsigned long last_off_jiffy;
|
||||
};
|
||||
|
|
@ -476,6 +492,8 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
|
|||
unsigned int new_selector);
|
||||
int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable);
|
||||
int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable);
|
||||
int regulator_set_soft_start_regmap(struct regulator_dev *rdev);
|
||||
int regulator_set_pull_down_regmap(struct regulator_dev *rdev);
|
||||
|
||||
int regulator_set_active_discharge_regmap(struct regulator_dev *rdev,
|
||||
bool enable);
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ struct regulator_state {
|
|||
* @initial_state: Suspend state to set by default.
|
||||
* @initial_mode: Mode to set at startup.
|
||||
* @ramp_delay: Time to settle down after voltage change (unit: uV/us)
|
||||
* @settling_time: Time to settle down after voltage change when voltage
|
||||
* change is non-linear (unit: microseconds).
|
||||
* @active_discharge: Enable/disable active discharge. The enum
|
||||
* regulator_active_discharge values are used for
|
||||
* initialisation.
|
||||
|
|
@ -149,6 +151,7 @@ struct regulation_constraints {
|
|||
unsigned int initial_mode;
|
||||
|
||||
unsigned int ramp_delay;
|
||||
unsigned int settling_time;
|
||||
unsigned int enable_time;
|
||||
|
||||
unsigned int active_discharge;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
#define PFUZE200_VGEN4 10
|
||||
#define PFUZE200_VGEN5 11
|
||||
#define PFUZE200_VGEN6 12
|
||||
#define PFUZE200_COIN 13
|
||||
|
||||
#define PFUZE3000_SW1A 0
|
||||
#define PFUZE3000_SW1B 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue