motor: zh915: Update level value according to new motor interface 13/232713/2 accepted/tizen/unified/20200528.132926 submit/tizen/20200526.073613
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 7 May 2020 08:21:46 +0000 (17:21 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 7 May 2020 08:31:39 +0000 (17:31 +0900)
commitb12ea3cf7f04d4c2ee2cb6db11c778e1ed84014c
tree441305ea96b7d00f8c1fd62a57d6c41a551aa688
parentb4b0df406d83ef9e8942b34d158b1ecc889da135
motor: zh915: Update level value according to new motor interface

Priot to that 'u.rumble.strong_magnitude' contains the value as following:
- In case of intensity is strong : 65536
- In case of insensity is weak, 32767

But, the new motor interface uses 'u.rumble.strong_magnitude' as the
'intensity_level' which is range from 1 to 5. In order to keep
the compatibility, calculate the level in the kernel according to
the 'intensity_level' from user process (feedbackd).

In result, the 'level' would be initialized as following to keep
the compatibility.
- If level is 1 (strong), the calculated level value is 65536.
- If level is 2 (weak), the calculated level value is 32767.

Change-Id: Ia8f2fc730432ce9a6c589d571bd9c629627b9316
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/motor/zh915.c