Loading Documentation/devicetree/bindings/sound/wcd_codec.txt +5 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ Required properties: - qcom,wcd-rst-gpio-node: Phandle reference to the DT node having codec reset gpio configuration. If this property is not defined, it is expected to atleast define "qcom,cdc-reset-gpio" property. - cdc-vdd-buck-supply: phandle of buck supply's regulator device tree node. - qcom,cdc-vdd-buck-voltage: buck supply's voltage level min and max in mV. - qcom,cdc-vdd-buck-current: buck supply's max current in mA. Loading Loading @@ -142,6 +141,11 @@ Optional properties: - clock-names : clock name defined for external clock. - clocks : external clock defined for codec clock. - qcom,has-buck-vsel-gpio: Boolean property to select if WCD_BUCK has VSEL controlled by GPIO. - qcom,buck-vsel-gpio-node: Phandle reference to the DT node having wcd buck VSEL gpio configuration. Example: taiko_codec { Loading drivers/mfd/wcd9xxx-core.c +4 −0 Original line number Diff line number Diff line Loading @@ -1280,6 +1280,10 @@ static int wcd9xxx_slim_probe(struct slim_device *slim) ret = -EINVAL; goto err_codec; } if (pdata->has_buck_vsel_gpio) msm_cdc_pinctrl_select_active_state(pdata->buck_vsel_ctl_np); device_id = slim_get_device_id(slim); if (!device_id) { dev_err(&slim->dev, "%s: Error, no device id\n", __func__); Loading drivers/mfd/wcd9xxx-utils.c +13 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,19 @@ struct wcd9xxx_pdata *wcd9xxx_populate_dt_data(struct device *dev) goto err_parse_dt_prop; } pdata->has_buck_vsel_gpio = of_property_read_bool(dev->of_node, "qcom,has-buck-vsel-gpio"); if (pdata->has_buck_vsel_gpio) { pdata->buck_vsel_ctl_np = of_parse_phandle(dev->of_node, "qcom,buck-vsel-gpio-node", 0); if (!pdata->buck_vsel_ctl_np) { dev_err(dev, "%s No entry for %s property in node %s\n", __func__, "qcom,buck-vsel-gpio-node", dev->of_node->full_name); goto err_parse_dt_prop; } } if (!(wcd9xxx_read_of_property_u32(dev, "qcom,cdc-mclk-clk-rate", &prop_val))) pdata->mclk_rate = prop_val; Loading include/linux/mfd/wcd9xxx/pdata.h +2 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,8 @@ struct wcd9xxx_pdata { int irq_base; int num_irqs; int reset_gpio; bool has_buck_vsel_gpio; struct device_node *buck_vsel_ctl_np; struct device_node *wcd_rst_np; struct wcd9xxx_amic amic_settings; struct slim_device slimbus_slave_device; Loading Loading
Documentation/devicetree/bindings/sound/wcd_codec.txt +5 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ Required properties: - qcom,wcd-rst-gpio-node: Phandle reference to the DT node having codec reset gpio configuration. If this property is not defined, it is expected to atleast define "qcom,cdc-reset-gpio" property. - cdc-vdd-buck-supply: phandle of buck supply's regulator device tree node. - qcom,cdc-vdd-buck-voltage: buck supply's voltage level min and max in mV. - qcom,cdc-vdd-buck-current: buck supply's max current in mA. Loading Loading @@ -142,6 +141,11 @@ Optional properties: - clock-names : clock name defined for external clock. - clocks : external clock defined for codec clock. - qcom,has-buck-vsel-gpio: Boolean property to select if WCD_BUCK has VSEL controlled by GPIO. - qcom,buck-vsel-gpio-node: Phandle reference to the DT node having wcd buck VSEL gpio configuration. Example: taiko_codec { Loading
drivers/mfd/wcd9xxx-core.c +4 −0 Original line number Diff line number Diff line Loading @@ -1280,6 +1280,10 @@ static int wcd9xxx_slim_probe(struct slim_device *slim) ret = -EINVAL; goto err_codec; } if (pdata->has_buck_vsel_gpio) msm_cdc_pinctrl_select_active_state(pdata->buck_vsel_ctl_np); device_id = slim_get_device_id(slim); if (!device_id) { dev_err(&slim->dev, "%s: Error, no device id\n", __func__); Loading
drivers/mfd/wcd9xxx-utils.c +13 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,19 @@ struct wcd9xxx_pdata *wcd9xxx_populate_dt_data(struct device *dev) goto err_parse_dt_prop; } pdata->has_buck_vsel_gpio = of_property_read_bool(dev->of_node, "qcom,has-buck-vsel-gpio"); if (pdata->has_buck_vsel_gpio) { pdata->buck_vsel_ctl_np = of_parse_phandle(dev->of_node, "qcom,buck-vsel-gpio-node", 0); if (!pdata->buck_vsel_ctl_np) { dev_err(dev, "%s No entry for %s property in node %s\n", __func__, "qcom,buck-vsel-gpio-node", dev->of_node->full_name); goto err_parse_dt_prop; } } if (!(wcd9xxx_read_of_property_u32(dev, "qcom,cdc-mclk-clk-rate", &prop_val))) pdata->mclk_rate = prop_val; Loading
include/linux/mfd/wcd9xxx/pdata.h +2 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,8 @@ struct wcd9xxx_pdata { int irq_base; int num_irqs; int reset_gpio; bool has_buck_vsel_gpio; struct device_node *buck_vsel_ctl_np; struct device_node *wcd_rst_np; struct wcd9xxx_amic amic_settings; struct slim_device slimbus_slave_device; Loading