openbmc / dbus-sensors

D-Bus configurable sensor scanning applications
Apache License 2.0
27 stars 45 forks source link

Redundant check in PwmSensor set handler? #10

Closed alex310110 closed 3 years ago

alex310110 commented 3 years ago

https://github.com/openbmc/dbus-sensors/blob/6736d4b2a77cec00a8919f26035176c8b8025a4d/src/PwmSensor.cpp#L70

Will it be an issue if hwmon pwm goes out of sync than dbus? Is this check reasonably necessary?

edtanous commented 3 years ago

If hwmon goes out of sync to dbus, there's more wrong than dbus-sensor can do anything about.

The theory on that line is to minimize the amount of traffic we send over busses when the PWMs are on something like an i2c extender, where it really matters to keep the traffic low, so it's working as designed.

PS, please ask these kinds of questions on the mailing list; I'm closing this for now, as it seems like a question better suited for the ML. If this actually causes a use case bug, feel free to reopen with more details of the use case.