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

Commit 50362a8a authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

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

parents e639a471 f2ac9205
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
@@ -64,8 +64,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
@@ -137,6 +135,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
@@ -202,7 +202,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;
@@ -1053,7 +1052,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);
@@ -1231,12 +1230,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)