Loading Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt +2 −3 Original line number Diff line number Diff line Loading @@ -44,8 +44,7 @@ Required dai-link subnodes: Required CPU/CODEC subnodes properties: -link-name : Name of the dai link. -sound-dai : phandle and port of CPU/CODEC -capture-dai : phandle and port of CPU/CODEC -sound-dai : phandle/s and port of CPU/CODEC Example: Loading Loading @@ -73,7 +72,7 @@ sound: sound { sound-dai = <&lpass MI2S_PRIMARY>; }; codec { sound-dai = <&wcd_codec 0>; sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; }; }; Loading Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-analog.txt 0 → 100644 +85 −0 Original line number Diff line number Diff line msm8916 analog audio CODEC Bindings for codec Analog IP which is integrated in pmic pm8916, ## Bindings for codec core on pmic: Required properties - compatible = "qcom,pm8916-wcd-analog-codec"; - reg: represents the slave base address provided to the peripheral. - interrupt-parent : The parent interrupt controller. - interrupts: List of interrupts in given SPMI peripheral. - interrupt-names: Names specified to above list of interrupts in same order. List of supported interrupt names are: "cdc_spk_cnp_int" - Speaker click and pop interrupt. "cdc_spk_clip_int" - Speaker clip interrupt. "cdc_spk_ocp_int" - Speaker over current protect interrupt. "mbhc_ins_rem_det1" - jack insert removal detect interrupt 1. "mbhc_but_rel_det" - button release interrupt. "mbhc_but_press_det" - button press event "mbhc_ins_rem_det" - jack insert removal detect interrupt. "mbhc_switch_int" - multi button headset interrupt. "cdc_ear_ocp_int" - Earphone over current protect interrupt. "cdc_hphr_ocp_int" - Headphone R over current protect interrupt. "cdc_hphl_ocp_det" - Headphone L over current protect interrupt. "cdc_ear_cnp_int" - earphone cnp interrupt. "cdc_hphr_cnp_int" - hphr click and pop interrupt. "cdc_hphl_cnp_int" - hphl click and pop interrupt. - clocks: Handle to mclk. - clock-names: should be "mclk" - vdd-cdc-io-supply: phandle to VDD_CDC_IO regulator DT node. - vdd-cdc-tx-rx-cx-supply: phandle to VDD_CDC_TX/RX/CX regulator DT node. - vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator DT node. Optional Properties: - qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor connected. - qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor connected. Example: spmi_bus { ... audio-codec@f000{ compatible = "qcom,pm8916-wcd-analog-codec"; reg = <0xf000 0x200>; reg-names = "pmic-codec-core"; clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; clock-names = "mclk"; interrupt-parent = <&spmi_bus>; interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, <0x1 0xf0 0x1 IRQ_TYPE_NONE>, <0x1 0xf0 0x2 IRQ_TYPE_NONE>, <0x1 0xf0 0x3 IRQ_TYPE_NONE>, <0x1 0xf0 0x4 IRQ_TYPE_NONE>, <0x1 0xf0 0x5 IRQ_TYPE_NONE>, <0x1 0xf0 0x6 IRQ_TYPE_NONE>, <0x1 0xf0 0x7 IRQ_TYPE_NONE>, <0x1 0xf1 0x0 IRQ_TYPE_NONE>, <0x1 0xf1 0x1 IRQ_TYPE_NONE>, <0x1 0xf1 0x2 IRQ_TYPE_NONE>, <0x1 0xf1 0x3 IRQ_TYPE_NONE>, <0x1 0xf1 0x4 IRQ_TYPE_NONE>, <0x1 0xf1 0x5 IRQ_TYPE_NONE>; interrupt-names = "cdc_spk_cnp_int", "cdc_spk_clip_int", "cdc_spk_ocp_int", "mbhc_ins_rem_det1", "mbhc_but_rel_det", "mbhc_but_press_det", "mbhc_ins_rem_det", "mbhc_switch_int", "cdc_ear_ocp_int", "cdc_hphr_ocp_int", "cdc_hphl_ocp_det", "cdc_ear_cnp_int", "cdc_hphr_cnp_int", "cdc_hphl_cnp_int"; VDD-CDC-IO-supply = <&pm8916_l5>; VDD-CDC-TX-RX-CX-supply = <&pm8916_l5>; VDD-MICBIAS-supply = <&pm8916_l13>; #sound-dai-cells = <1>; }; }; Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-digital.txt 0 → 100644 +20 −0 Original line number Diff line number Diff line msm8916 digital audio CODEC ## Bindings for codec core in lpass: Required properties - compatible = "qcom,msm8916-wcd-digital-codec"; - reg: address space for lpass codec. - clocks: Handle to mclk and ahbclk - clock-names: should be "mclk", "ahbix-clk". Example: audio-codec@771c000{ compatible = "qcom,msm8916-wcd-digital-codec"; reg = <0x0771c000 0x400>; clocks = <&gcc GCC_ULTAUDIO_AHBFABRIC_IXFABRIC_CLK>, <&gcc GCC_CODEC_DIGCODEC_CLK>; clock-names = "ahbix-clk", "mclk"; #sound-dai-cells = <1>; }; drivers/regulator/rk808-regulator.c +4 −5 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ static const struct regulator_linear_range rk808_ldo3_voltage_ranges[] = { static int rk808_buck1_2_get_voltage_sel_regmap(struct regulator_dev *rdev) { struct rk808_regulator_data *pdata = rdev_get_drvdata(rdev); int id = rdev->desc->id - RK808_ID_DCDC1; int id = rdev_get_id(rdev); struct gpio_desc *gpio = pdata->dvs_gpio[id]; unsigned int val; int ret; Loading Loading @@ -193,7 +193,7 @@ static int rk808_buck1_2_set_voltage_sel(struct regulator_dev *rdev, unsigned sel) { struct rk808_regulator_data *pdata = rdev_get_drvdata(rdev); int id = rdev->desc->id - RK808_ID_DCDC1; int id = rdev_get_id(rdev); struct gpio_desc *gpio = pdata->dvs_gpio[id]; unsigned int reg = rdev->desc->vsel_reg; unsigned old_sel; Loading Loading @@ -232,7 +232,7 @@ static int rk808_buck1_2_set_voltage_time_sel(struct regulator_dev *rdev, unsigned int new_selector) { struct rk808_regulator_data *pdata = rdev_get_drvdata(rdev); int id = rdev->desc->id - RK808_ID_DCDC1; int id = rdev_get_id(rdev); struct gpio_desc *gpio = pdata->dvs_gpio[id]; /* if there is no dvs1/2 pin, we don't need wait extra time here. */ Loading @@ -245,8 +245,7 @@ static int rk808_buck1_2_set_voltage_time_sel(struct regulator_dev *rdev, static int rk808_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay) { unsigned int ramp_value = RK808_RAMP_RATE_10MV_PER_US; unsigned int reg = rk808_buck_config_regs[rdev->desc->id - RK808_ID_DCDC1]; unsigned int reg = rk808_buck_config_regs[rdev_get_id(rdev)]; switch (ramp_delay) { case 1 ... 2000: Loading include/sound/soc.h +25 −7 Original line number Diff line number Diff line Loading @@ -1644,25 +1644,43 @@ static inline struct snd_soc_platform *snd_soc_kcontrol_platform( int snd_soc_util_init(void); void snd_soc_util_exit(void); int snd_soc_of_parse_card_name(struct snd_soc_card *card, #define snd_soc_of_parse_card_name(card, propname) \ snd_soc_of_parse_card_name_from_node(card, NULL, propname) int snd_soc_of_parse_card_name_from_node(struct snd_soc_card *card, struct device_node *np, const char *propname); int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, #define snd_soc_of_parse_audio_simple_widgets(card, propname)\ snd_soc_of_parse_audio_simple_widgets_from_node(card, NULL, propname) int snd_soc_of_parse_audio_simple_widgets_from_node(struct snd_soc_card *card, struct device_node *np, const char *propname); int snd_soc_of_parse_tdm_slot(struct device_node *np, unsigned int *tx_mask, unsigned int *rx_mask, unsigned int *slots, unsigned int *slot_width); void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, #define snd_soc_of_parse_audio_prefix(card, codec_conf, of_node, propname) \ snd_soc_of_parse_audio_prefix_from_node(card, NULL, codec_conf, \ of_node, propname) void snd_soc_of_parse_audio_prefix_from_node(struct snd_soc_card *card, struct device_node *np, struct snd_soc_codec_conf *codec_conf, struct device_node *of_node, const char *propname); int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, #define snd_soc_of_parse_audio_routing(card, propname) \ snd_soc_of_parse_audio_routing_from_node(card, NULL, propname) int snd_soc_of_parse_audio_routing_from_node(struct snd_soc_card *card, struct device_node *np, const char *propname); unsigned int snd_soc_of_parse_daifmt(struct device_node *np, const char *prefix, struct device_node **bitclkmaster, struct device_node **framemaster); int snd_soc_get_dai_name(struct of_phandle_args *args, const char **dai_name); int snd_soc_of_get_dai_name(struct device_node *of_node, const char **dai_name); int snd_soc_of_get_dai_link_codecs(struct device *dev, Loading Loading
Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt +2 −3 Original line number Diff line number Diff line Loading @@ -44,8 +44,7 @@ Required dai-link subnodes: Required CPU/CODEC subnodes properties: -link-name : Name of the dai link. -sound-dai : phandle and port of CPU/CODEC -capture-dai : phandle and port of CPU/CODEC -sound-dai : phandle/s and port of CPU/CODEC Example: Loading Loading @@ -73,7 +72,7 @@ sound: sound { sound-dai = <&lpass MI2S_PRIMARY>; }; codec { sound-dai = <&wcd_codec 0>; sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; }; }; Loading
Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-analog.txt 0 → 100644 +85 −0 Original line number Diff line number Diff line msm8916 analog audio CODEC Bindings for codec Analog IP which is integrated in pmic pm8916, ## Bindings for codec core on pmic: Required properties - compatible = "qcom,pm8916-wcd-analog-codec"; - reg: represents the slave base address provided to the peripheral. - interrupt-parent : The parent interrupt controller. - interrupts: List of interrupts in given SPMI peripheral. - interrupt-names: Names specified to above list of interrupts in same order. List of supported interrupt names are: "cdc_spk_cnp_int" - Speaker click and pop interrupt. "cdc_spk_clip_int" - Speaker clip interrupt. "cdc_spk_ocp_int" - Speaker over current protect interrupt. "mbhc_ins_rem_det1" - jack insert removal detect interrupt 1. "mbhc_but_rel_det" - button release interrupt. "mbhc_but_press_det" - button press event "mbhc_ins_rem_det" - jack insert removal detect interrupt. "mbhc_switch_int" - multi button headset interrupt. "cdc_ear_ocp_int" - Earphone over current protect interrupt. "cdc_hphr_ocp_int" - Headphone R over current protect interrupt. "cdc_hphl_ocp_det" - Headphone L over current protect interrupt. "cdc_ear_cnp_int" - earphone cnp interrupt. "cdc_hphr_cnp_int" - hphr click and pop interrupt. "cdc_hphl_cnp_int" - hphl click and pop interrupt. - clocks: Handle to mclk. - clock-names: should be "mclk" - vdd-cdc-io-supply: phandle to VDD_CDC_IO regulator DT node. - vdd-cdc-tx-rx-cx-supply: phandle to VDD_CDC_TX/RX/CX regulator DT node. - vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator DT node. Optional Properties: - qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor connected. - qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor connected. Example: spmi_bus { ... audio-codec@f000{ compatible = "qcom,pm8916-wcd-analog-codec"; reg = <0xf000 0x200>; reg-names = "pmic-codec-core"; clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; clock-names = "mclk"; interrupt-parent = <&spmi_bus>; interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, <0x1 0xf0 0x1 IRQ_TYPE_NONE>, <0x1 0xf0 0x2 IRQ_TYPE_NONE>, <0x1 0xf0 0x3 IRQ_TYPE_NONE>, <0x1 0xf0 0x4 IRQ_TYPE_NONE>, <0x1 0xf0 0x5 IRQ_TYPE_NONE>, <0x1 0xf0 0x6 IRQ_TYPE_NONE>, <0x1 0xf0 0x7 IRQ_TYPE_NONE>, <0x1 0xf1 0x0 IRQ_TYPE_NONE>, <0x1 0xf1 0x1 IRQ_TYPE_NONE>, <0x1 0xf1 0x2 IRQ_TYPE_NONE>, <0x1 0xf1 0x3 IRQ_TYPE_NONE>, <0x1 0xf1 0x4 IRQ_TYPE_NONE>, <0x1 0xf1 0x5 IRQ_TYPE_NONE>; interrupt-names = "cdc_spk_cnp_int", "cdc_spk_clip_int", "cdc_spk_ocp_int", "mbhc_ins_rem_det1", "mbhc_but_rel_det", "mbhc_but_press_det", "mbhc_ins_rem_det", "mbhc_switch_int", "cdc_ear_ocp_int", "cdc_hphr_ocp_int", "cdc_hphl_ocp_det", "cdc_ear_cnp_int", "cdc_hphr_cnp_int", "cdc_hphl_cnp_int"; VDD-CDC-IO-supply = <&pm8916_l5>; VDD-CDC-TX-RX-CX-supply = <&pm8916_l5>; VDD-MICBIAS-supply = <&pm8916_l13>; #sound-dai-cells = <1>; }; };
Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-digital.txt 0 → 100644 +20 −0 Original line number Diff line number Diff line msm8916 digital audio CODEC ## Bindings for codec core in lpass: Required properties - compatible = "qcom,msm8916-wcd-digital-codec"; - reg: address space for lpass codec. - clocks: Handle to mclk and ahbclk - clock-names: should be "mclk", "ahbix-clk". Example: audio-codec@771c000{ compatible = "qcom,msm8916-wcd-digital-codec"; reg = <0x0771c000 0x400>; clocks = <&gcc GCC_ULTAUDIO_AHBFABRIC_IXFABRIC_CLK>, <&gcc GCC_CODEC_DIGCODEC_CLK>; clock-names = "ahbix-clk", "mclk"; #sound-dai-cells = <1>; };
drivers/regulator/rk808-regulator.c +4 −5 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ static const struct regulator_linear_range rk808_ldo3_voltage_ranges[] = { static int rk808_buck1_2_get_voltage_sel_regmap(struct regulator_dev *rdev) { struct rk808_regulator_data *pdata = rdev_get_drvdata(rdev); int id = rdev->desc->id - RK808_ID_DCDC1; int id = rdev_get_id(rdev); struct gpio_desc *gpio = pdata->dvs_gpio[id]; unsigned int val; int ret; Loading Loading @@ -193,7 +193,7 @@ static int rk808_buck1_2_set_voltage_sel(struct regulator_dev *rdev, unsigned sel) { struct rk808_regulator_data *pdata = rdev_get_drvdata(rdev); int id = rdev->desc->id - RK808_ID_DCDC1; int id = rdev_get_id(rdev); struct gpio_desc *gpio = pdata->dvs_gpio[id]; unsigned int reg = rdev->desc->vsel_reg; unsigned old_sel; Loading Loading @@ -232,7 +232,7 @@ static int rk808_buck1_2_set_voltage_time_sel(struct regulator_dev *rdev, unsigned int new_selector) { struct rk808_regulator_data *pdata = rdev_get_drvdata(rdev); int id = rdev->desc->id - RK808_ID_DCDC1; int id = rdev_get_id(rdev); struct gpio_desc *gpio = pdata->dvs_gpio[id]; /* if there is no dvs1/2 pin, we don't need wait extra time here. */ Loading @@ -245,8 +245,7 @@ static int rk808_buck1_2_set_voltage_time_sel(struct regulator_dev *rdev, static int rk808_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay) { unsigned int ramp_value = RK808_RAMP_RATE_10MV_PER_US; unsigned int reg = rk808_buck_config_regs[rdev->desc->id - RK808_ID_DCDC1]; unsigned int reg = rk808_buck_config_regs[rdev_get_id(rdev)]; switch (ramp_delay) { case 1 ... 2000: Loading
include/sound/soc.h +25 −7 Original line number Diff line number Diff line Loading @@ -1644,25 +1644,43 @@ static inline struct snd_soc_platform *snd_soc_kcontrol_platform( int snd_soc_util_init(void); void snd_soc_util_exit(void); int snd_soc_of_parse_card_name(struct snd_soc_card *card, #define snd_soc_of_parse_card_name(card, propname) \ snd_soc_of_parse_card_name_from_node(card, NULL, propname) int snd_soc_of_parse_card_name_from_node(struct snd_soc_card *card, struct device_node *np, const char *propname); int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, #define snd_soc_of_parse_audio_simple_widgets(card, propname)\ snd_soc_of_parse_audio_simple_widgets_from_node(card, NULL, propname) int snd_soc_of_parse_audio_simple_widgets_from_node(struct snd_soc_card *card, struct device_node *np, const char *propname); int snd_soc_of_parse_tdm_slot(struct device_node *np, unsigned int *tx_mask, unsigned int *rx_mask, unsigned int *slots, unsigned int *slot_width); void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, #define snd_soc_of_parse_audio_prefix(card, codec_conf, of_node, propname) \ snd_soc_of_parse_audio_prefix_from_node(card, NULL, codec_conf, \ of_node, propname) void snd_soc_of_parse_audio_prefix_from_node(struct snd_soc_card *card, struct device_node *np, struct snd_soc_codec_conf *codec_conf, struct device_node *of_node, const char *propname); int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, #define snd_soc_of_parse_audio_routing(card, propname) \ snd_soc_of_parse_audio_routing_from_node(card, NULL, propname) int snd_soc_of_parse_audio_routing_from_node(struct snd_soc_card *card, struct device_node *np, const char *propname); unsigned int snd_soc_of_parse_daifmt(struct device_node *np, const char *prefix, struct device_node **bitclkmaster, struct device_node **framemaster); int snd_soc_get_dai_name(struct of_phandle_args *args, const char **dai_name); int snd_soc_of_get_dai_name(struct device_node *of_node, const char **dai_name); int snd_soc_of_get_dai_link_codecs(struct device *dev, Loading