/drivers/mfd/ |
D | stmpe.c | 41 static int __stmpe_enable(struct stmpe *stmpe, unsigned int blocks) in __stmpe_enable() argument 43 return stmpe->variant->enable(stmpe, blocks, true); in __stmpe_enable() 46 static int __stmpe_disable(struct stmpe *stmpe, unsigned int blocks) in __stmpe_disable() argument 48 return stmpe->variant->enable(stmpe, blocks, false); in __stmpe_disable() 51 static int __stmpe_reg_read(struct stmpe *stmpe, u8 reg) in __stmpe_reg_read() argument 55 ret = stmpe->ci->read_byte(stmpe, reg); in __stmpe_reg_read() 57 dev_err(stmpe->dev, "failed to read reg %#x: %d\n", reg, ret); in __stmpe_reg_read() 59 dev_vdbg(stmpe->dev, "rd: reg %#x => data %#x\n", reg, ret); in __stmpe_reg_read() 64 static int __stmpe_reg_write(struct stmpe *stmpe, u8 reg, u8 val) in __stmpe_reg_write() argument 68 dev_vdbg(stmpe->dev, "wr: reg %#x <= %#x\n", reg, val); in __stmpe_reg_write() [all …]
|
D | stmpe-spi.c | 20 static int spi_reg_read(struct stmpe *stmpe, u8 reg) in spi_reg_read() argument 22 struct spi_device *spi = stmpe->client; in spi_reg_read() 28 static int spi_reg_write(struct stmpe *stmpe, u8 reg, u8 val) in spi_reg_write() argument 30 struct spi_device *spi = stmpe->client; in spi_reg_write() 36 static int spi_block_read(struct stmpe *stmpe, u8 reg, u8 length, u8 *values) in spi_block_read() argument 41 ret = spi_reg_read(stmpe, reg + i); in spi_block_read() 50 static int spi_block_write(struct stmpe *stmpe, u8 reg, u8 length, in spi_block_write() argument 56 ret = spi_reg_write(stmpe, reg, *(values + i - 1)); in spi_block_write() 64 static void spi_init(struct stmpe *stmpe) in spi_init() argument 66 struct spi_device *spi = stmpe->client; in spi_init() [all …]
|
D | stmpe.h | 73 int (*enable)(struct stmpe *stmpe, unsigned int blocks, bool enable); 74 int (*get_altfunc)(struct stmpe *stmpe, enum stmpe_block block); 75 int (*enable_autosleep)(struct stmpe *stmpe, int autosleep_timeout); 92 int (*read_byte)(struct stmpe *stmpe, u8 reg); 93 int (*write_byte)(struct stmpe *stmpe, u8 reg, u8 val); 94 int (*read_block)(struct stmpe *stmpe, u8 reg, u8 len, u8 *values); 95 int (*write_block)(struct stmpe *stmpe, u8 reg, u8 len, 97 void (*init)(struct stmpe *stmpe); 101 void stmpe_remove(struct stmpe *stmpe);
|
D | stmpe-i2c.c | 20 static int i2c_reg_read(struct stmpe *stmpe, u8 reg) in i2c_reg_read() argument 22 struct i2c_client *i2c = stmpe->client; in i2c_reg_read() 27 static int i2c_reg_write(struct stmpe *stmpe, u8 reg, u8 val) in i2c_reg_write() argument 29 struct i2c_client *i2c = stmpe->client; in i2c_reg_write() 34 static int i2c_block_read(struct stmpe *stmpe, u8 reg, u8 length, u8 *values) in i2c_block_read() argument 36 struct i2c_client *i2c = stmpe->client; in i2c_block_read() 41 static int i2c_block_write(struct stmpe *stmpe, u8 reg, u8 length, in i2c_block_write() argument 44 struct i2c_client *i2c = stmpe->client; in i2c_block_write() 97 struct stmpe *stmpe = dev_get_drvdata(&i2c->dev); in stmpe_i2c_remove() local 99 stmpe_remove(stmpe); in stmpe_i2c_remove()
|
D | Makefile | 28 obj-$(CONFIG_MFD_STMPE) += stmpe.o 29 obj-$(CONFIG_STMPE_I2C) += stmpe-i2c.o 30 obj-$(CONFIG_STMPE_SPI) += stmpe-spi.o
|
D | Kconfig | 1440 GPIO: stmpe-gpio 1441 Keypad: stmpe-keypad 1442 Touchscreen: stmpe-ts 1443 ADC: stmpe-adc
|
/drivers/gpio/ |
D | gpio-stmpe.c | 32 struct stmpe *stmpe; member 44 struct stmpe *stmpe = stmpe_gpio->stmpe; in stmpe_gpio_get() local 45 u8 reg = stmpe->regs[STMPE_IDX_GPMR_LSB + (offset / 8)]; in stmpe_gpio_get() 49 ret = stmpe_reg_read(stmpe, reg); in stmpe_gpio_get() 59 struct stmpe *stmpe = stmpe_gpio->stmpe; in stmpe_gpio_set() local 61 u8 reg = stmpe->regs[which + (offset / 8)]; in stmpe_gpio_set() 68 if (stmpe->regs[STMPE_IDX_GPSR_LSB] == stmpe->regs[STMPE_IDX_GPCR_LSB]) in stmpe_gpio_set() 69 stmpe_set_bits(stmpe, reg, mask, val ? mask : 0); in stmpe_gpio_set() 71 stmpe_reg_write(stmpe, reg, mask); in stmpe_gpio_set() 78 struct stmpe *stmpe = stmpe_gpio->stmpe; in stmpe_gpio_get_direction() local [all …]
|
D | Makefile | 151 obj-$(CONFIG_GPIO_STMPE) += gpio-stmpe.o
|
/drivers/input/touchscreen/ |
D | stmpe-ts.c | 73 struct stmpe *stmpe; member 85 static int __stmpe_reset_fifo(struct stmpe *stmpe) in __stmpe_reset_fifo() argument 89 ret = stmpe_set_bits(stmpe, STMPE_REG_FIFO_STA, in __stmpe_reset_fifo() 94 return stmpe_set_bits(stmpe, STMPE_REG_FIFO_STA, in __stmpe_reset_fifo() 106 int_sta = stmpe_reg_read(ts->stmpe, STMPE_REG_INT_STA); in stmpe_work() 117 int_sta = stmpe_reg_read(ts->stmpe, STMPE_REG_INT_STA); in stmpe_work() 122 __stmpe_reset_fifo(ts->stmpe); in stmpe_work() 147 stmpe_set_bits(ts->stmpe, STMPE_REG_TSC_CTRL, in stmpe_ts_handler() 150 stmpe_block_read(ts->stmpe, STMPE_REG_TSC_DATA_XYZ, 4, data_set); in stmpe_ts_handler() 162 __stmpe_reset_fifo(ts->stmpe); in stmpe_ts_handler() [all …]
|
D | Makefile | 85 obj-$(CONFIG_TOUCHSCREEN_STMPE) += stmpe-ts.o
|
D | Kconfig | 1248 module will be called stmpe-ts.
|
/drivers/pwm/ |
D | pwm-stmpe.c | 29 struct stmpe *stmpe; member 45 ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS); in stmpe_24xx_pwm_enable() 54 ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value); in stmpe_24xx_pwm_enable() 71 ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS); in stmpe_24xx_pwm_disable() 80 ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value); in stmpe_24xx_pwm_disable() 121 if (stmpe_pwm->stmpe->partnum == STMPE2401 || in stmpe_24xx_pwm_config() 122 stmpe_pwm->stmpe->partnum == STMPE2403) in stmpe_24xx_pwm_config() 125 ret = stmpe_set_altfunc(stmpe_pwm->stmpe, BIT(pin), in stmpe_24xx_pwm_config() 157 if (stmpe_pwm->stmpe->partnum == STMPE2401) in stmpe_24xx_pwm_config() 160 if (stmpe_pwm->stmpe->partnum == STMPE2403) in stmpe_24xx_pwm_config() [all …]
|
D | Makefile | 58 obj-$(CONFIG_PWM_STMPE) += pwm-stmpe.o
|
/drivers/input/keyboard/ |
D | stmpe-keypad.c | 130 struct stmpe *stmpe; member 144 struct stmpe *stmpe = keypad->stmpe; in stmpe_keypad_read_data() local 149 return stmpe_block_read(stmpe, STMPE_KPC_DATA_BYTE0, in stmpe_keypad_read_data() 153 ret = stmpe_reg_read(stmpe, STMPE_KPC_DATA_BYTE0 + i); in stmpe_keypad_read_data() 200 struct stmpe *stmpe = keypad->stmpe; in stmpe_keypad_altfunc_init() local 201 u8 pureg = stmpe->regs[STMPE_IDX_GPPUR_LSB]; in stmpe_keypad_altfunc_init() 238 ret = stmpe_set_altfunc(stmpe, pins, STMPE_BLOCK_KEYPAD); in stmpe_keypad_altfunc_init() 251 ret = stmpe_reg_read(stmpe, pureg); in stmpe_keypad_altfunc_init() 259 ret = stmpe_reg_write(stmpe, pureg, val); in stmpe_keypad_altfunc_init() 268 struct stmpe *stmpe = keypad->stmpe; in stmpe_keypad_chip_init() local [all …]
|
D | Makefile | 64 obj-$(CONFIG_KEYBOARD_STMPE) += stmpe-keypad.o
|
D | Kconfig | 639 called stmpe-keypad.
|
/drivers/iio/adc/ |
D | stmpe-adc.c | 47 struct stmpe *stmpe; member 77 stmpe_reg_write(info->stmpe, STMPE_REG_ADC_CAPT, in stmpe_read_voltage() 83 stmpe_reg_write(info->stmpe, STMPE_REG_ADC_INT_STA, in stmpe_read_voltage() 112 stmpe_reg_write(info->stmpe, STMPE_REG_TEMP_CTRL, in stmpe_read_temp() 165 *val2 = info->stmpe->mod_12b ? 12 : 10; in stmpe_read_raw() 183 int_sta = stmpe_reg_read(info->stmpe, STMPE_REG_ADC_INT_STA); in stmpe_adc_isr() 190 stmpe_block_read(info->stmpe, in stmpe_adc_isr() 193 stmpe_reg_write(info->stmpe, STMPE_REG_ADC_INT_STA, int_sta); in stmpe_adc_isr() 196 stmpe_block_read(info->stmpe, STMPE_REG_TEMP_DATA, 2, in stmpe_adc_isr() 232 struct stmpe *stmpe = adc->stmpe; in stmpe_adc_init_hw() local [all …]
|
D | Makefile | 104 obj-$(CONFIG_STMPE_ADC) += stmpe-adc.o
|