Skip to content
10 changes: 5 additions & 5 deletions drivers/haptics/drv2605.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,11 +601,11 @@ static const struct haptics_driver_api drv2605_driver_api = {
\
static const struct drv2605_config drv2605_config_##inst = { \
.i2c = I2C_DT_SPEC_INST_GET(inst), \
.en_gpio = GPIO_DT_SPEC_INST_GET_OR(inst, ti_en_gpios, {}), \
.in_trig_gpio = GPIO_DT_SPEC_INST_GET_OR(inst, ti_in_trig_gpios, {}), \
.feedback_brake_factor = DT_INST_ENUM_IDX_OR(inst, ti_feedback_brake_factor, 3), \
.loop_gain = DT_INST_ENUM_IDX_OR(inst, ti_loop_gain, 2), \
.actuator_mode = DT_INST_ENUM_IDX_OR(inst, ti_actuator_mode, 0), \
.en_gpio = GPIO_DT_SPEC_INST_GET_OR(inst, en_gpios, {}), \
.in_trig_gpio = GPIO_DT_SPEC_INST_GET_OR(inst, in_trig_gpios, {}), \
.feedback_brake_factor = DT_INST_ENUM_IDX_OR(inst, feedback_brake_factor, 3), \
.loop_gain = DT_INST_ENUM_IDX_OR(inst, loop_gain, 2), \
.actuator_mode = DT_INST_ENUM_IDX_OR(inst, actuator_mode, 0), \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default values should actually be set (and maybe more importantly, documented) in the binding... I think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I know this is not strictly related to this change, but I missed it in initial review and am catching this now as I'm actually starting to play with the driver). Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default values should actually be set (and maybe more importantly, documented) in the binding... I think?

Will do!

as I'm actually starting to play with the driver

Don't have too much fun buzzing around.

}; \
\
static struct drv2605_data drv2605_data_##inst = { \
Expand Down
6 changes: 6 additions & 0 deletions dts/bindings/haptics/ti,drv2605.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ properties:
- "MEDIUM"
- "HIGH"
- "VERY_HIGH"
en-gpios:
type: phandle-array
description: GPIO to enable and disable the device.
in-trig-gpios:
type: phandle-array
description: GPIO to trigger ROM waveforms or drive an input signal.