Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6f08a90 authored by Fenglin Wu's avatar Fenglin Wu
Browse files

input: misc: qti-haptics: remove "qcom,ilim-ma" property



Remove "qcom,ilim-ma" property as it is not a setting related with
hardware configuration. Set it to 1A by default to allow higher drive
strength.

Change-Id: I35cfa91c33661c0b17c12c1956999d8dc0db876b
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent a571bdf2
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -49,13 +49,6 @@ Properties:
		0 to 3596. If this is not specified, then 1800 mV will be
		used by default.

- qcom,ilim-ma
  Usage:      optional
  Value type: <u32>
  Definition: Specifies the maximum allowed output current in mA for the
		actuator. Allowed values: 400 or 800. If this is not
		specified, 400 mA will be used by default.

- qcom,play-rate-us
  Usage:      optional
  Value type: <u32>
@@ -188,7 +181,6 @@ Example:
	interrupt-names = "hap-sc-irq", "hap-play-irq";
	qcom,actuator-type = "lra";
	qcom,vmax-mv = <1800>;
	qcom,ilim-ma = <400>;
	qcom,play-rate-us = <8000>;
	qcom,lra-resonance-sig-shape = "sine";
	qcom,lra-auto-resonance-mode = "qwd";
+3 −10
Original line number Diff line number Diff line
@@ -57,8 +57,6 @@ enum haptics_custom_effect_param {
#define HAP_WAVEFORM_BUFFER_MAX		8
#define HAP_VMAX_MV_DEFAULT		1800
#define HAP_VMAX_MV_MAX			3596
#define HAP_ILIM_MA_DEFAULT		400
#define HAP_ILIM_MA_MAX			800
#define HAP_PLAY_RATE_US_DEFAULT	5715
#define HAP_PLAY_RATE_US_MAX		20475
#define HAP_PLAY_RATE_US_LSB		5
@@ -130,6 +128,8 @@ enum haptics_custom_effect_param {
#define HAP_VMAX_MV_LSB			116

#define REG_HAP_ILIM_CFG		0x52
#define HAP_ILIM_SEL_1000MA		BIT(1)
#define HAP_ILIM_DEFAULT_SEL		HAP_ILIM_SEL_1000MA
#define REG_HAP_SC_DEB_CFG		0x53
#define REG_HAP_RATE_CFG1		0x54
#define REG_HAP_RATE_CFG2		0x55
@@ -195,7 +195,6 @@ struct qti_hap_config {
	enum lra_auto_res_mode	lra_auto_res_mode;
	enum wf_src		ext_src;
	u16			vmax_mv;
	u16			ilim_ma;
	u16			play_rate_us;
	bool			lra_allow_variable_play_rate;
	bool			use_ext_wf_src;
@@ -1046,7 +1045,7 @@ static int qti_haptics_hw_init(struct qti_hap_chip *chip)

	/* Config ilim_ma */
	addr = REG_HAP_ILIM_CFG;
	val = config->ilim_ma == 400 ? 0 : 1;
	val = HAP_ILIM_DEFAULT_SEL;
	rc = qti_haptics_write(chip, addr, &val, 1);
	if (rc < 0) {
		dev_err(chip->dev, "write ilim_ma failed, rc=%d\n", rc);
@@ -1413,12 +1412,6 @@ static int qti_haptics_parse_dt(struct qti_hap_chip *chip)
		config->vmax_mv = (tmp > HAP_VMAX_MV_MAX) ?
			HAP_VMAX_MV_MAX : tmp;

	config->ilim_ma = HAP_ILIM_MA_DEFAULT;
	rc = of_property_read_u32(node, "qcom,ilim-ma", &tmp);
	if (!rc)
		config->ilim_ma = (tmp >= HAP_ILIM_MA_MAX) ?
			HAP_ILIM_MA_MAX : HAP_ILIM_MA_DEFAULT;

	config->play_rate_us = HAP_PLAY_RATE_US_DEFAULT;
	rc = of_property_read_u32(node, "qcom,play-rate-us", &tmp);
	if (!rc)