Home
last modified time | relevance | path

Searched refs:tps65912 (Results 1 – 9 of 9) sorted by relevance

/drivers/mfd/
Dtps65912-irq.c26 static inline int irq_to_tps65912_irq(struct tps65912 *tps65912, in irq_to_tps65912_irq() argument
29 return irq - tps65912->irq_base; in irq_to_tps65912_irq()
43 struct tps65912 *tps65912 = irq_data; in tps65912_irq() local
50 tps65912->read(tps65912, TPS65912_INT_STS, 1, &reg); in tps65912_irq()
52 tps65912->read(tps65912, TPS65912_INT_STS2, 1, &reg); in tps65912_irq()
54 tps65912->read(tps65912, TPS65912_INT_STS3, 1, &reg); in tps65912_irq()
56 tps65912->read(tps65912, TPS65912_INT_STS4, 1, &reg); in tps65912_irq()
59 tps65912->read(tps65912, TPS65912_INT_MSK, 1, &reg); in tps65912_irq()
61 tps65912->read(tps65912, TPS65912_INT_MSK2, 1, &reg); in tps65912_irq()
63 tps65912->read(tps65912, TPS65912_INT_MSK3, 1, &reg); in tps65912_irq()
[all …]
Dtps65912-core.c30 int tps65912_set_bits(struct tps65912 *tps65912, u8 reg, u8 mask) in tps65912_set_bits() argument
35 mutex_lock(&tps65912->io_mutex); in tps65912_set_bits()
37 err = tps65912->read(tps65912, reg, 1, &data); in tps65912_set_bits()
39 dev_err(tps65912->dev, "Read from reg 0x%x failed\n", reg); in tps65912_set_bits()
44 err = tps65912->write(tps65912, reg, 1, &data); in tps65912_set_bits()
46 dev_err(tps65912->dev, "Write to reg 0x%x failed\n", reg); in tps65912_set_bits()
49 mutex_unlock(&tps65912->io_mutex); in tps65912_set_bits()
54 int tps65912_clear_bits(struct tps65912 *tps65912, u8 reg, u8 mask) in tps65912_clear_bits() argument
59 mutex_lock(&tps65912->io_mutex); in tps65912_clear_bits()
60 err = tps65912->read(tps65912, reg, 1, &data); in tps65912_clear_bits()
[all …]
Dtps65912-i2c.c25 static int tps65912_i2c_read(struct tps65912 *tps65912, u8 reg, in tps65912_i2c_read() argument
28 struct i2c_client *i2c = tps65912->control_data; in tps65912_i2c_read()
52 static int tps65912_i2c_write(struct tps65912 *tps65912, u8 reg, in tps65912_i2c_write() argument
55 struct i2c_client *i2c = tps65912->control_data; in tps65912_i2c_write()
78 struct tps65912 *tps65912; in tps65912_i2c_probe() local
80 tps65912 = kzalloc(sizeof(struct tps65912), GFP_KERNEL); in tps65912_i2c_probe()
81 if (tps65912 == NULL) in tps65912_i2c_probe()
84 i2c_set_clientdata(i2c, tps65912); in tps65912_i2c_probe()
85 tps65912->dev = &i2c->dev; in tps65912_i2c_probe()
86 tps65912->control_data = i2c; in tps65912_i2c_probe()
[all …]
Dtps65912-spi.c25 static int tps65912_spi_write(struct tps65912 *tps65912, u8 addr, in tps65912_spi_write() argument
28 struct spi_device *spi = tps65912->control_data; in tps65912_spi_write()
52 static int tps65912_spi_read(struct tps65912 *tps65912, u8 addr, in tps65912_spi_read() argument
55 struct spi_device *spi = tps65912->control_data; in tps65912_spi_read()
86 struct tps65912 *tps65912; in tps65912_spi_probe() local
88 tps65912 = kzalloc(sizeof(struct tps65912), GFP_KERNEL); in tps65912_spi_probe()
89 if (tps65912 == NULL) in tps65912_spi_probe()
92 tps65912->dev = &spi->dev; in tps65912_spi_probe()
93 tps65912->control_data = spi; in tps65912_spi_probe()
94 tps65912->read = tps65912_spi_read; in tps65912_spi_probe()
[all …]
DMakefile43 tps65912-objs := tps65912-core.o tps65912-irq.o
44 obj-$(CONFIG_MFD_TPS65912) += tps65912.o
45 obj-$(CONFIG_MFD_TPS65912_I2C) += tps65912-i2c.o
46 obj-$(CONFIG_MFD_TPS65912_SPI) += tps65912-spi.o
/drivers/gpio/
Dgpio-tps65912.c25 struct tps65912 *tps65912; member
31 struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio); in tps65912_gpio_get() local
34 val = tps65912_reg_read(tps65912, TPS65912_GPIO1 + offset); in tps65912_gpio_get()
45 struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio); in tps65912_gpio_set() local
48 tps65912_set_bits(tps65912, TPS65912_GPIO1 + offset, in tps65912_gpio_set()
51 tps65912_clear_bits(tps65912, TPS65912_GPIO1 + offset, in tps65912_gpio_set()
58 struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio); in tps65912_gpio_output() local
63 return tps65912_set_bits(tps65912, TPS65912_GPIO1 + offset, in tps65912_gpio_output()
69 struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio); in tps65912_gpio_input() local
71 return tps65912_clear_bits(tps65912, TPS65912_GPIO1 + offset, in tps65912_gpio_input()
[all …]
DMakefile58 obj-$(CONFIG_GPIO_TPS65912) += gpio-tps65912.o
/drivers/regulator/
Dtps65912-regulator.c110 struct tps65912 *mfd;
124 struct tps65912 *mfd = pmic->mfd; in tps65912_get_range()
214 struct tps65912 *mfd = pmic->mfd; in tps65912_get_sel_register()
262 struct tps65912 *mfd = pmic->mfd; in tps65912_reg_is_enabled()
282 struct tps65912 *mfd = pmic->mfd; in tps65912_reg_enable()
299 struct tps65912 *mfd = pmic->mfd; in tps65912_reg_disable()
312 struct tps65912 *mfd = pmic->mfd; in tps65912_set_mode()
354 struct tps65912 *mfd = pmic->mfd; in tps65912_get_mode()
410 struct tps65912 *mfd = pmic->mfd; in tps65912_get_voltage_dcdc()
428 struct tps65912 *mfd = pmic->mfd; in tps65912_set_voltage_sel()
[all …]
DMakefile47 obj-$(CONFIG_REGULATOR_TPS65912) += tps65912-regulator.o