mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
input: qcom-hv-haptics: update drive waveform data format
Use 2's complement data format for driving pattern waveform because the pattern/FIFO samples used in the driver are all having unsigned data type. Change-Id: Ib0f7c1c7fe272068177237821debbd3cc1ad4ec8 Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
This commit is contained in:
parent
c6ebd39a1e
commit
1f31666769
|
|
@ -58,6 +58,7 @@
|
|||
#define DEFAULT_VMAX_MV 5000
|
||||
|
||||
#define HAP_CFG_DRV_WF_SEL_REG 0x49
|
||||
#define DRV_WF_FMT_BIT BIT(4)
|
||||
#define DRV_WF_SEL_MASK GENMASK(1, 0)
|
||||
|
||||
#define HAP_CFG_AUTO_SHUTDOWN_CFG_REG 0x4A
|
||||
|
|
@ -1881,6 +1882,12 @@ static int haptics_hw_init(struct haptics_chip *chip)
|
|||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
/* Config to use 2's complement values for sample data */
|
||||
rc = haptics_masked_write(chip, chip->cfg_addr_base,
|
||||
HAP_CFG_DRV_WF_SEL_REG, DRV_WF_FMT_BIT, 0);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
/* preload effect */
|
||||
if (config->preload_effect != -EINVAL) {
|
||||
for (i = 0; i < chip->effects_count; i++)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user