Searched refs:tps6105x (Results 1 - 4 of 4) sorted by relevance

/linux-4.1.27/drivers/mfd/
H A Dtps6105x.c26 #include <linux/mfd/tps6105x.h>
28 int tps6105x_set(struct tps6105x *tps6105x, u8 reg, u8 value) tps6105x_set() argument
32 ret = mutex_lock_interruptible(&tps6105x->lock); tps6105x_set()
35 ret = i2c_smbus_write_byte_data(tps6105x->client, reg, value); tps6105x_set()
36 mutex_unlock(&tps6105x->lock); tps6105x_set()
44 int tps6105x_get(struct tps6105x *tps6105x, u8 reg, u8 *buf) tps6105x_get() argument
48 ret = mutex_lock_interruptible(&tps6105x->lock); tps6105x_get()
51 ret = i2c_smbus_read_byte_data(tps6105x->client, reg); tps6105x_get()
52 mutex_unlock(&tps6105x->lock); tps6105x_get()
65 int tps6105x_mask_and_set(struct tps6105x *tps6105x, u8 reg, tps6105x_mask_and_set() argument
71 ret = mutex_lock_interruptible(&tps6105x->lock); tps6105x_mask_and_set()
74 ret = i2c_smbus_read_byte_data(tps6105x->client, reg); tps6105x_mask_and_set()
79 ret = i2c_smbus_write_byte_data(tps6105x->client, reg, regval); tps6105x_mask_and_set()
81 mutex_unlock(&tps6105x->lock); tps6105x_mask_and_set()
89 static int tps6105x_startup(struct tps6105x *tps6105x) tps6105x_startup() argument
94 ret = tps6105x_get(tps6105x, TPS6105X_REG_0, &regval); tps6105x_startup()
99 dev_info(&tps6105x->client->dev, tps6105x_startup()
103 dev_info(&tps6105x->client->dev, tps6105x_startup()
107 dev_info(&tps6105x->client->dev, tps6105x_startup()
111 dev_info(&tps6105x->client->dev, tps6105x_startup()
131 .name = "tps6105x-gpio",
139 struct tps6105x *tps6105x; tps6105x_probe() local
144 tps6105x = devm_kmalloc(&client->dev, sizeof(*tps6105x), GFP_KERNEL); tps6105x_probe()
145 if (!tps6105x) tps6105x_probe()
148 i2c_set_clientdata(client, tps6105x); tps6105x_probe()
149 tps6105x->client = client; tps6105x_probe()
151 tps6105x->pdata = pdata; tps6105x_probe()
152 mutex_init(&tps6105x->lock); tps6105x_probe()
154 ret = tps6105x_startup(tps6105x); tps6105x_probe()
167 tps6105x_cells[0].name = "tps6105x-leds"; tps6105x_probe()
172 tps6105x_cells[0].name = "tps6105x-flash"; tps6105x_probe()
177 tps6105x_cells[0].name ="tps6105x-regulator"; tps6105x_probe()
186 tps6105x_cells[i].platform_data = tps6105x; tps6105x_probe()
187 tps6105x_cells[i].pdata_size = sizeof(*tps6105x); tps6105x_probe()
196 struct tps6105x *tps6105x = i2c_get_clientdata(client); tps6105x_remove() local
201 tps6105x_mask_and_set(tps6105x, TPS6105X_REG_0, tps6105x_remove()
217 .name = "tps6105x",
H A DMakefile63 obj-$(CONFIG_TPS6105X) += tps6105x.o
/linux-4.1.27/drivers/regulator/
H A Dtps6105x-regulator.c21 #include <linux/mfd/tps6105x.h>
32 struct tps6105x *tps6105x = rdev_get_drvdata(rdev); tps6105x_regulator_enable() local
36 ret = tps6105x_mask_and_set(tps6105x, TPS6105X_REG_0, tps6105x_regulator_enable()
47 struct tps6105x *tps6105x = rdev_get_drvdata(rdev); tps6105x_regulator_disable() local
51 ret = tps6105x_mask_and_set(tps6105x, TPS6105X_REG_0, tps6105x_regulator_disable()
62 struct tps6105x *tps6105x = rdev_get_drvdata(rdev); tps6105x_regulator_is_enabled() local
66 ret = tps6105x_get(tps6105x, TPS6105X_REG_0, &regval); tps6105x_regulator_is_enabled()
80 struct tps6105x *tps6105x = rdev_get_drvdata(rdev); tps6105x_regulator_get_voltage_sel() local
84 ret = tps6105x_get(tps6105x, TPS6105X_REG_0, &regval); tps6105x_regulator_get_voltage_sel()
96 struct tps6105x *tps6105x = rdev_get_drvdata(rdev); tps6105x_regulator_set_voltage_sel() local
99 ret = tps6105x_mask_and_set(tps6105x, TPS6105X_REG_0, tps6105x_regulator_set_voltage_sel()
118 .name = "tps6105x-boost",
132 struct tps6105x *tps6105x = dev_get_platdata(&pdev->dev); tps6105x_regulator_probe() local
133 struct tps6105x_platform_data *pdata = tps6105x->pdata; tps6105x_regulator_probe()
144 config.dev = &tps6105x->client->dev; tps6105x_regulator_probe()
146 config.driver_data = tps6105x; tps6105x_regulator_probe()
149 tps6105x->regulator = devm_regulator_register(&pdev->dev, tps6105x_regulator_probe()
152 if (IS_ERR(tps6105x->regulator)) { tps6105x_regulator_probe()
153 ret = PTR_ERR(tps6105x->regulator); tps6105x_regulator_probe()
154 dev_err(&tps6105x->client->dev, tps6105x_regulator_probe()
158 platform_set_drvdata(pdev, tps6105x); tps6105x_regulator_probe()
165 .name = "tps6105x-regulator",
185 MODULE_ALIAS("platform:tps6105x-regulator");
/linux-4.1.27/include/linux/mfd/
H A Dtps6105x.h84 * struct tps6105x - state holder for the TPS6105x drivers
89 struct tps6105x { struct
96 extern int tps6105x_set(struct tps6105x *tps6105x, u8 reg, u8 value);
97 extern int tps6105x_get(struct tps6105x *tps6105x, u8 reg, u8 *buf);
98 extern int tps6105x_mask_and_set(struct tps6105x *tps6105x, u8 reg,

Completed in 116 milliseconds