eqe: vibrator add haptic rtp support

add new file
to indicate rtp interface

Change-Id: I2269d68d01d09174eeff07642b14c404ede77354
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2784337
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
dengwei1 2023-11-02 16:45:09 +08:00 • committed by Wei Deng
commit 0a7ebaa8eb
2 changed files with 66 additions and 6 deletions

View file

@ -294,7 +294,7 @@ static void aw862xx_play_mode(struct aw_haptic *aw_haptic, uint8_t play_mode)
case AW_RTP_MODE:
aw_info("enter rtp mode");
aw_haptic->play_mode = AW_RTP_MODE;
aw862xx_set_pwm(aw_haptic, AW_PWM_24K);
aw862xx_set_pwm(aw_haptic, AW_PWM_12K);
aw862xx_auto_brk_config(aw_haptic, true);
haptic_nv_i2c_write_bits(aw_haptic, AW862XX_REG_PLAYCFG3,
AW862XX_BIT_PLAYCFG3_PLAY_MODE_MASK,

View file

@ -48,11 +48,57 @@ static char aw_ram_name[][AW_NAME_MAX] = {
};
static char aw_rtp_name[][AW_NAME_MAX] = {
{"haptic_nv_rtp_osc_24K_5s.bin"},
{"haptic_nv_rtp.bin"},
{"haptic_nv_rtp_lighthouse.bin"},
{"haptic_nv_rtp_silk.bin"},
{"haptic_nv_rtp_autosin.bin"},
{"aw862xx_rtp.bin"},
{"aw862xx_rtp_Argo_Navis.bin"},
{"aw862xx_rtp_Attentive.bin"},
{"aw862xx_rtp_Awake.bin"},
{"aw862xx_rtp_Bird_Loop.bin"},
{"aw862xx_rtp_Brilliant_Times.bin"},
{"aw862xx_rtp_Chimey_Phone.bin"},
{"aw862xx_rtp_Complex.bin"},
{"aw862xx_rtp_Crazy_Dream.bin"},
{"aw862xx_rtp_Curve_Ball_Blend.bin"},
{"aw862xx_rtp_Digital_Phone.bin"},
{"aw862xx_rtp_Electrovision.bin"},
{"aw862xx_rtp_Ether_Shake.bin"},
{"aw862xx_rtp_Fateful_Words.bin"},
{"aw862xx_rtp_Flutey_Phone.bin"},
{"aw862xx_rtp_Future_Funk.bin"},
{"aw862xx_rtp_Future_Hi_Tech.bin"},
{"aw862xx_rtp_Girtab.bin"},
{"aw862xx_rtp_Hello.bin"},
{"aw862xx_rtp_Hexagon.bin"},
{"aw862xx_rtp_Hydra.bin"},
{"aw862xx_rtp_Insert_Coin.bin"},
{"aw862xx_rtp_Jumping_Dots.bin"},
{"aw862xx_rtp_Keys.bin"},
{"aw862xx_rtp_Loopy.bin"},
{"aw862xx_rtp_Loopy_Lounge.bin"},
{"aw862xx_rtp_Modular.bin"},
{"aw862xx_rtp_Momentum.bin"},
{"aw862xx_rtp_Morning.bin"},
{"aw862xx_rtp_Moto.bin"},
{"aw862xx_rtp_Natural.bin"},
{"aw862xx_rtp_New_Player.bin"},
{"aw862xx_rtp_Onward.bin"},
{"aw862xx_rtp_Organ_Dub.bin"},
{"aw862xx_rtp_Overclocked.bin"},
{"aw862xx_rtp_Pegasus.bin"},
{"aw862xx_rtp_Pyxis.bin"},
{"aw862xx_rtp_Regrade.bin"},
{"aw862xx_rtp_Scarabaeus.bin"},
{"aw862xx_rtp_Sceptrum.bin"},
{"aw862xx_rtp_Simple.bin"},
{"aw862xx_rtp_Solarium.bin"},
{"aw862xx_rtp_Sparse.bin"},
{"aw862xx_rtp_Terrabytes.bin"},
{"aw862xx_rtp_Zero_Hour.bin"},
{"aw862xx_rtp_Play.bin"},
{"aw862xx_rtp_TJINGLE.bin"},
{"aw862xx_rtp_Verizon_Airwaves.bin"},
{"aw862xx_rtp_City_Lights.bin"},
{"aw862xx_rtp_Firefly.bin"},
{"aw862xx_rtp_Now_or_Never.bin"},
};
#ifdef AW_TIKTAP
@ -1684,6 +1730,18 @@ static ssize_t seq_store(struct device *dev, struct device_attribute *attr, cons
return count;
}
static ssize_t rtp_interface_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
return 0;
}
static ssize_t rtp_interface_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
return count;
}
static ssize_t loop_show(struct device *dev, struct device_attribute *attr, char *buf)
{
uint8_t i = 0;
@ -2469,6 +2527,7 @@ static DEVICE_ATTR_RW(activate_mode);
static DEVICE_ATTR_RW(index);
static DEVICE_ATTR_RW(gain);
static DEVICE_ATTR_RW(seq);
static DEVICE_ATTR_RW(rtp_interface);
static DEVICE_ATTR_RW(loop);
static DEVICE_ATTR_RW(ram_update);
static DEVICE_ATTR_RW(f0);
@ -2501,6 +2560,7 @@ static struct attribute *vibrator_attributes[] = {
&dev_attr_index.attr,
&dev_attr_gain.attr,
&dev_attr_seq.attr,
&dev_attr_rtp_interface.attr,
&dev_attr_loop.attr,
&dev_attr_reg.attr,
&dev_attr_ram_update.attr,