Lines Matching refs:isink

35 	struct wm831x_isink *isink = rdev_get_drvdata(rdev);  in wm831x_isink_enable()  local
36 struct wm831x *wm831x = isink->wm831x; in wm831x_isink_enable()
40 ret = wm831x_set_bits(wm831x, isink->reg, WM831X_CS1_ENA, in wm831x_isink_enable()
46 ret = wm831x_set_bits(wm831x, isink->reg, WM831X_CS1_DRIVE, in wm831x_isink_enable()
49 wm831x_set_bits(wm831x, isink->reg, WM831X_CS1_ENA, 0); in wm831x_isink_enable()
57 struct wm831x_isink *isink = rdev_get_drvdata(rdev); in wm831x_isink_disable() local
58 struct wm831x *wm831x = isink->wm831x; in wm831x_isink_disable()
61 ret = wm831x_set_bits(wm831x, isink->reg, WM831X_CS1_DRIVE, 0); in wm831x_isink_disable()
65 ret = wm831x_set_bits(wm831x, isink->reg, WM831X_CS1_ENA, 0); in wm831x_isink_disable()
75 struct wm831x_isink *isink = rdev_get_drvdata(rdev); in wm831x_isink_is_enabled() local
76 struct wm831x *wm831x = isink->wm831x; in wm831x_isink_is_enabled()
79 ret = wm831x_reg_read(wm831x, isink->reg); in wm831x_isink_is_enabled()
100 struct wm831x_isink *isink = data; in wm831x_isink_irq() local
102 regulator_notifier_call_chain(isink->regulator, in wm831x_isink_irq()
114 struct wm831x_isink *isink; in wm831x_isink_probe() local
115 int id = pdev->id % ARRAY_SIZE(pdata->isink); in wm831x_isink_probe()
122 if (pdata == NULL || pdata->isink[id] == NULL) in wm831x_isink_probe()
125 isink = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_isink), in wm831x_isink_probe()
127 if (!isink) in wm831x_isink_probe()
130 isink->wm831x = wm831x; in wm831x_isink_probe()
138 isink->reg = res->start; in wm831x_isink_probe()
143 snprintf(isink->name, sizeof(isink->name), "ISINK%d", id + 1); in wm831x_isink_probe()
144 isink->desc.name = isink->name; in wm831x_isink_probe()
145 isink->desc.id = id; in wm831x_isink_probe()
146 isink->desc.ops = &wm831x_isink_ops; in wm831x_isink_probe()
147 isink->desc.type = REGULATOR_CURRENT; in wm831x_isink_probe()
148 isink->desc.owner = THIS_MODULE; in wm831x_isink_probe()
149 isink->desc.curr_table = wm831x_isinkv_values, in wm831x_isink_probe()
150 isink->desc.n_current_limits = ARRAY_SIZE(wm831x_isinkv_values), in wm831x_isink_probe()
151 isink->desc.csel_reg = isink->reg, in wm831x_isink_probe()
152 isink->desc.csel_mask = WM831X_CS1_ISEL_MASK, in wm831x_isink_probe()
155 config.init_data = pdata->isink[id]; in wm831x_isink_probe()
156 config.driver_data = isink; in wm831x_isink_probe()
159 isink->regulator = devm_regulator_register(&pdev->dev, &isink->desc, in wm831x_isink_probe()
161 if (IS_ERR(isink->regulator)) { in wm831x_isink_probe()
162 ret = PTR_ERR(isink->regulator); in wm831x_isink_probe()
172 isink->name, in wm831x_isink_probe()
173 isink); in wm831x_isink_probe()
180 platform_set_drvdata(pdev, isink); in wm831x_isink_probe()