Lines Matching refs:wm831x

51 	struct wm831x *wm831x;  member
63 struct wm831x *wm831x = dcdc->wm831x; in wm831x_dcdc_get_mode() local
67 val = wm831x_reg_read(wm831x, reg); in wm831x_dcdc_get_mode()
88 static int wm831x_dcdc_set_mode_int(struct wm831x *wm831x, int reg, in wm831x_dcdc_set_mode_int() argument
110 return wm831x_set_bits(wm831x, reg, WM831X_DC1_ON_MODE_MASK, in wm831x_dcdc_set_mode_int()
117 struct wm831x *wm831x = dcdc->wm831x; in wm831x_dcdc_set_mode() local
120 return wm831x_dcdc_set_mode_int(wm831x, reg, mode); in wm831x_dcdc_set_mode()
127 struct wm831x *wm831x = dcdc->wm831x; in wm831x_dcdc_set_suspend_mode() local
130 return wm831x_dcdc_set_mode_int(wm831x, reg, mode); in wm831x_dcdc_set_suspend_mode()
136 struct wm831x *wm831x = dcdc->wm831x; in wm831x_dcdc_get_status() local
140 ret = wm831x_reg_read(wm831x, WM831X_DCDC_UV_STATUS); in wm831x_dcdc_get_status()
145 dev_dbg(wm831x->dev, "DCDC%d under voltage\n", in wm831x_dcdc_get_status()
153 dev_dbg(wm831x->dev, "DCDC%d over voltage\n", in wm831x_dcdc_get_status()
159 dev_dbg(wm831x->dev, "DCDC%d over current\n", in wm831x_dcdc_get_status()
166 ret = wm831x_reg_read(wm831x, WM831X_DCDC_STATUS); in wm831x_dcdc_get_status()
230 struct wm831x *wm831x = dcdc->wm831x; in wm831x_buckv_set_voltage_sel() local
243 ret = wm831x_set_bits(wm831x, on_reg, WM831X_DC1_ON_VSEL_MASK, vsel); in wm831x_buckv_set_voltage_sel()
263 ret = wm831x_set_bits(wm831x, dvs_reg, in wm831x_buckv_set_voltage_sel()
269 dev_warn(wm831x->dev, in wm831x_buckv_set_voltage_sel()
280 struct wm831x *wm831x = dcdc->wm831x; in wm831x_buckv_set_suspend_voltage() local
288 return wm831x_set_bits(wm831x, reg, WM831X_DC1_SLP_VSEL_MASK, vsel); in wm831x_buckv_set_suspend_voltage()
332 struct wm831x *wm831x = dcdc->wm831x; in wm831x_buckv_dvs_init() local
347 dev_err(wm831x->dev, "Failed to get %s DVS GPIO: %ld\n", in wm831x_buckv_dvs_init()
360 dev_err(wm831x->dev, "Invalid DVS control source %d for %s\n", in wm831x_buckv_dvs_init()
369 ret = wm831x_set_bits(wm831x, in wm831x_buckv_dvs_init()
375 dev_warn(wm831x->dev, "Failed to set DVS_VSEL: %d\n", in wm831x_buckv_dvs_init()
379 ret = wm831x_set_bits(wm831x, dcdc->base + WM831X_DCDC_DVS_CONTROL, in wm831x_buckv_dvs_init()
382 dev_err(wm831x->dev, "Failed to set %s DVS source: %d\n", in wm831x_buckv_dvs_init()
389 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); in wm831x_buckv_probe() local
390 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev); in wm831x_buckv_probe()
410 dcdc->wm831x = wm831x; in wm831x_buckv_probe()
441 ret = wm831x_reg_read(wm831x, dcdc->base + WM831X_DCDC_ON_CONFIG); in wm831x_buckv_probe()
443 dev_err(wm831x->dev, "Failed to read ON VSEL: %d\n", ret); in wm831x_buckv_probe()
448 ret = wm831x_reg_read(wm831x, dcdc->base + WM831X_DCDC_DVS_CONTROL); in wm831x_buckv_probe()
450 dev_err(wm831x->dev, "Failed to read DVS VSEL: %d\n", ret); in wm831x_buckv_probe()
463 config.regmap = wm831x->regmap; in wm831x_buckv_probe()
469 dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n", in wm831x_buckv_probe()
474 irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); in wm831x_buckv_probe()
485 irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "HC")); in wm831x_buckv_probe()
518 struct wm831x *wm831x = dcdc->wm831x; in wm831x_buckp_set_suspend_voltage() local
526 return wm831x_set_bits(wm831x, reg, WM831X_DC3_ON_VSEL_MASK, sel); in wm831x_buckp_set_suspend_voltage()
547 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); in wm831x_buckp_probe() local
548 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev); in wm831x_buckp_probe()
568 dcdc->wm831x = wm831x; in wm831x_buckp_probe()
601 config.regmap = wm831x->regmap; in wm831x_buckp_probe()
607 dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n", in wm831x_buckp_probe()
612 irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); in wm831x_buckp_probe()
645 struct wm831x *wm831x = dcdc->wm831x; in wm831x_boostp_get_status() local
649 ret = wm831x_reg_read(wm831x, WM831X_DCDC_UV_STATUS); in wm831x_boostp_get_status()
654 dev_dbg(wm831x->dev, "DCDC%d under voltage\n", in wm831x_boostp_get_status()
660 ret = wm831x_reg_read(wm831x, WM831X_DCDC_STATUS); in wm831x_boostp_get_status()
679 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); in wm831x_boostp_probe() local
680 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev); in wm831x_boostp_probe()
696 dcdc->wm831x = wm831x; in wm831x_boostp_probe()
718 config.regmap = wm831x->regmap; in wm831x_boostp_probe()
724 dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n", in wm831x_boostp_probe()
729 irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); in wm831x_boostp_probe()
771 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); in wm831x_epe_probe() local
772 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev); in wm831x_epe_probe()
784 dcdc->wm831x = wm831x; in wm831x_epe_probe()
802 config.regmap = wm831x->regmap; in wm831x_epe_probe()
808 dev_err(wm831x->dev, "Failed to register EPE%d: %d\n", in wm831x_epe_probe()