diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-11-03 20:21:36 -0600 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2016-11-03 20:21:36 -0600 |
| commit | e46119845c16713bc5f42442d654df0961220361 (patch) | |
| tree | d38108054025a079db8d743f2692e273ca16d7b6 /include/linux | |
| parent | 28f64cb2a6607069f7dc03c3bcb233dbef49dc8b (diff) | |
| parent | 758693b4a6d94a0724081578d24f6ba1cc449255 (diff) | |
Promotion of kernel.lnx.4.4-161103.1.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1064187 I86976ac6139b8c76d9239acae073f03fbc5e0a38 drivers: soc: Add new parameters for APR IPC logging
1070583 Iaac10a722a595ce7864e813aa56685689356f6a9 msm: camera: isp: Fix reset sequence on stop
1078000 I142f31c6bb46d6a394ad012077e1703875a120ad drivers: qcom: ultrasound: Lock async driver calls
1059495 I94a6fc02436734b4f398d1a72f53b3ae68612679 ASoC: msm: qdsp6v2: Index check for out of range
1081736 I030153a6b2106a6504ed51b5cb00a27f842e2488 usb: pd: Avoid calling SVID disconnect if not previously
1080245 I5b1229091fcb7b3887b54735b9663fd31a35db21 clk: Add support to vote to regulator framework from clk
1083736 I69e37a93418b99a187c7b46cf62524c5fc4901f2 ASoC: wcd934x: Update OCP connection attempts
1070583 If0e92e26c7a44c614536ba0178dc9f70a4260fd5 msm: camera: ispif: Do not reset ispif
1085213 Ie8bb9ed903e46b0914b4ba2630efa864c751c29b ASoC: wcd934x-dsp-cntl: Add misc device to control codec
1052832 Id6d45982cbe42a113e58c9b6509eb6ef8064aeef ASoC: msm: qdsp6v2: Change audio drivers to use %pK
1080940 Id570e427d40d08e29cad7cb74be426bf218d00ee usb: dwc3: Draw 100mA upon host bus reset
1059495 Ic7ed961d8beb16eee35414825ec6ba7d4e95a60d ASoC: msmcobalt: Initialize variable to default value
1084190 I7862bb0fc83573567243ffa9549a2c7405b5986c selinux: nlmsgtab: add SOCK_DESTROY to the netlink mappi
1072758 I0f08dd57fa39d385369ef4886d12e8ea77c6ebc0 sound: usb: Map audio format received from QMI client
1081736 I4510f91e7d23ab161517c13702462da4ec8d7a2e usb: pd: Implement RX message queuing
Change-Id: Id3ec46d006b975d7f115d738f62236bcb2b8ac70
CRs-Fixed: 1078000, 1064187, 1085213, 1084190, 1052832, 1081736, 1059495, 1083736, 1072758, 1080940, 1080245, 1070583
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clk-provider.h | 65 | ||||
| -rw-r--r-- | include/linux/usb/usbpd.h | 3 |
2 files changed, 68 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 9a4a80ae5eaf..2a5acbdc6327 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -13,6 +13,7 @@ #include <linux/io.h> #include <linux/of.h> +#include <linux/mutex.h> #ifdef CONFIG_COMMON_CLK @@ -227,6 +228,9 @@ struct clk_ops { * @parent_names: array of string names for all possible parents * @num_parents: number of possible parents * @flags: framework-level hints and quirks + * @vdd_class: voltage scaling requirement class + * @rate_max: maximum clock rate in Hz supported at each voltage level + * @num_rate_max: number of maximum voltage level supported */ struct clk_init_data { const char *name; @@ -234,8 +238,69 @@ struct clk_init_data { const char * const *parent_names; u8 num_parents; unsigned long flags; + struct clk_vdd_class *vdd_class; + unsigned long *rate_max; + int num_rate_max; }; +struct regulator; + +/** + * struct clk_vdd_class - Voltage scaling class + * @class_name: name of the class + * @regulator: array of regulators + * @num_regulators: size of regulator array. Standard regulator APIs will be + used if this field > 0 + * @set_vdd: function to call when applying a new voltage setting + * @vdd_uv: sorted 2D array of legal voltage settings. Indexed by level, then + regulator + * @level_votes: array of votes for each level + * @num_levels: specifies the size of level_votes array + * @cur_level: the currently set voltage level + * @lock: lock to protect this struct + */ +struct clk_vdd_class { + const char *class_name; + struct regulator **regulator; + int num_regulators; + int (*set_vdd)(struct clk_vdd_class *v_class, int level); + int *vdd_uv; + int *level_votes; + int num_levels; + unsigned long cur_level; + struct mutex lock; +}; + +#define DEFINE_VDD_CLASS(_name, _set_vdd, _num_levels) \ + struct clk_vdd_class _name = { \ + .class_name = #_name, \ + .set_vdd = _set_vdd, \ + .level_votes = (int [_num_levels]) {}, \ + .num_levels = _num_levels, \ + .cur_level = _num_levels, \ + .lock = __MUTEX_INITIALIZER(_name.lock) \ + } + +#define DEFINE_VDD_REGULATORS(_name, _num_levels, _num_regulators, _vdd_uv) \ + struct clk_vdd_class _name = { \ + .class_name = #_name, \ + .vdd_uv = _vdd_uv, \ + .regulator = (struct regulator * [_num_regulators]) {}, \ + .num_regulators = _num_regulators, \ + .level_votes = (int [_num_levels]) {}, \ + .num_levels = _num_levels, \ + .cur_level = _num_levels, \ + .lock = __MUTEX_INITIALIZER(_name.lock) \ + } + +#define DEFINE_VDD_REGS_INIT(_name, _num_regulators) \ + struct clk_vdd_class _name = { \ + .class_name = #_name, \ + .regulator = (struct regulator * [_num_regulators]) {}, \ + .num_regulators = _num_regulators, \ + .lock = __MUTEX_INITIALIZER(_name.lock) \ + } + /** * struct clk_hw - handle for traversing from a struct clk to its corresponding * hardware-specific structure. struct clk_hw should be declared within struct diff --git a/include/linux/usb/usbpd.h b/include/linux/usb/usbpd.h index c2c1025feb8e..3566a7a974d1 100644 --- a/include/linux/usb/usbpd.h +++ b/include/linux/usb/usbpd.h @@ -42,6 +42,7 @@ enum usbpd_svdm_cmd_type { struct usbpd_svid_handler { u16 svid; + /* Notified when VDM session established/reset; must be implemented */ void (*connect)(struct usbpd_svid_handler *hdlr); void (*disconnect)(struct usbpd_svid_handler *hdlr); @@ -54,7 +55,9 @@ struct usbpd_svid_handler { enum usbpd_svdm_cmd_type cmd_type, const u32 *vdos, int num_vdos); + /* client should leave these blank; private members used by PD driver */ struct list_head entry; + bool discovered; }; enum plug_orientation { |
