/linux-4.1.27/drivers/mfd/ |
D | tps65912-irq.c | 25 static inline int irq_to_tps65912_irq(struct tps65912 *tps65912, in irq_to_tps65912_irq() argument 28 return irq - tps65912->irq_base; in irq_to_tps65912_irq() 42 struct tps65912 *tps65912 = irq_data; in tps65912_irq() local 49 tps65912->read(tps65912, TPS65912_INT_STS, 1, ®); in tps65912_irq() 51 tps65912->read(tps65912, TPS65912_INT_STS2, 1, ®); in tps65912_irq() 53 tps65912->read(tps65912, TPS65912_INT_STS3, 1, ®); in tps65912_irq() 55 tps65912->read(tps65912, TPS65912_INT_STS4, 1, ®); in tps65912_irq() 58 tps65912->read(tps65912, TPS65912_INT_MSK, 1, ®); in tps65912_irq() 60 tps65912->read(tps65912, TPS65912_INT_MSK2, 1, ®); in tps65912_irq() 62 tps65912->read(tps65912, TPS65912_INT_MSK3, 1, ®); in tps65912_irq() [all …]
|
D | tps65912-core.c | 29 int tps65912_set_bits(struct tps65912 *tps65912, u8 reg, u8 mask) in tps65912_set_bits() argument 34 mutex_lock(&tps65912->io_mutex); in tps65912_set_bits() 36 err = tps65912->read(tps65912, reg, 1, &data); in tps65912_set_bits() 38 dev_err(tps65912->dev, "Read from reg 0x%x failed\n", reg); in tps65912_set_bits() 43 err = tps65912->write(tps65912, reg, 1, &data); in tps65912_set_bits() 45 dev_err(tps65912->dev, "Write to reg 0x%x failed\n", reg); in tps65912_set_bits() 48 mutex_unlock(&tps65912->io_mutex); in tps65912_set_bits() 53 int tps65912_clear_bits(struct tps65912 *tps65912, u8 reg, u8 mask) in tps65912_clear_bits() argument 58 mutex_lock(&tps65912->io_mutex); in tps65912_clear_bits() 59 err = tps65912->read(tps65912, reg, 1, &data); in tps65912_clear_bits() [all …]
|
D | tps65912-i2c.c | 25 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 = devm_kzalloc(&i2c->dev, in tps65912_i2c_probe() 81 sizeof(struct tps65912), GFP_KERNEL); in tps65912_i2c_probe() 82 if (tps65912 == NULL) in tps65912_i2c_probe() 85 i2c_set_clientdata(i2c, tps65912); in tps65912_i2c_probe() 86 tps65912->dev = &i2c->dev; in tps65912_i2c_probe() [all …]
|
D | tps65912-spi.c | 25 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() 51 static int tps65912_spi_read(struct tps65912 *tps65912, u8 addr, in tps65912_spi_read() argument 54 struct spi_device *spi = tps65912->control_data; in tps65912_spi_read() 85 struct tps65912 *tps65912; in tps65912_spi_probe() local 87 tps65912 = devm_kzalloc(&spi->dev, in tps65912_spi_probe() 88 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() [all …]
|
D | Makefile | 69 tps65912-objs := tps65912-core.o tps65912-irq.o 70 obj-$(CONFIG_MFD_TPS65912) += tps65912.o 71 obj-$(CONFIG_MFD_TPS65912_I2C) += tps65912-i2c.o 72 obj-$(CONFIG_MFD_TPS65912_SPI) += tps65912-spi.o
|
/linux-4.1.27/drivers/gpio/ |
D | gpio-tps65912.c | 25 struct tps65912 *tps65912; member 34 struct tps65912 *tps65912 = tps65912_gpio->tps65912; in tps65912_gpio_get() local 37 val = tps65912_reg_read(tps65912, TPS65912_GPIO1 + offset); in tps65912_gpio_get() 49 struct tps65912 *tps65912 = tps65912_gpio->tps65912; in tps65912_gpio_set() local 52 tps65912_set_bits(tps65912, TPS65912_GPIO1 + offset, in tps65912_gpio_set() 55 tps65912_clear_bits(tps65912, TPS65912_GPIO1 + offset, in tps65912_gpio_set() 63 struct tps65912 *tps65912 = tps65912_gpio->tps65912; in tps65912_gpio_output() local 68 return tps65912_set_bits(tps65912, TPS65912_GPIO1 + offset, in tps65912_gpio_output() 75 struct tps65912 *tps65912 = tps65912_gpio->tps65912; in tps65912_gpio_input() local 77 return tps65912_clear_bits(tps65912, TPS65912_GPIO1 + offset, in tps65912_gpio_input() [all …]
|
D | Makefile | 95 obj-$(CONFIG_GPIO_TPS65912) += gpio-tps65912.o
|
/linux-4.1.27/include/linux/mfd/ |
D | tps65912.h | 286 struct tps65912 { struct 294 int (*read)(struct tps65912 *tps65912, u8 reg, int size, void *dest); argument 295 int (*write)(struct tps65912 *tps65912, u8 reg, int size, void *src); argument 318 int tps65912_set_bits(struct tps65912 *tps65912, u8 reg, u8 mask); argument 319 int tps65912_clear_bits(struct tps65912 *tps65912, u8 reg, u8 mask); 320 int tps65912_reg_read(struct tps65912 *tps65912, u8 reg); 321 int tps65912_reg_write(struct tps65912 *tps65912, u8 reg, u8 val); 322 int tps65912_device_init(struct tps65912 *tps65912); 323 void tps65912_device_exit(struct tps65912 *tps65912); 324 int tps65912_irq_init(struct tps65912 *tps65912, int irq, [all …]
|
/linux-4.1.27/drivers/regulator/ |
D | tps65912-regulator.c | 109 struct tps65912 *mfd; 129 struct tps65912 *mfd = pmic->mfd; in tps65912_get_range() 205 struct tps65912 *mfd = pmic->mfd; in tps65912_get_sel_register() 253 struct tps65912 *mfd = pmic->mfd; in tps65912_reg_is_enabled() 273 struct tps65912 *mfd = pmic->mfd; in tps65912_reg_enable() 290 struct tps65912 *mfd = pmic->mfd; in tps65912_reg_disable() 303 struct tps65912 *mfd = pmic->mfd; in tps65912_set_mode() 345 struct tps65912 *mfd = pmic->mfd; in tps65912_get_mode() 400 struct tps65912 *mfd = pmic->mfd; in tps65912_get_voltage_sel() 418 struct tps65912 *mfd = pmic->mfd; in tps65912_set_voltage_sel() [all …]
|
D | Makefile | 91 obj-$(CONFIG_REGULATOR_TPS65912) += tps65912-regulator.o
|