msm: rpm-smd: Add debugging option to log all RPM requests

Add a function which logs the parameters in each request being
sent to the RPM immediately before each request is sent.  Also
add a module parameter to control this logging.

rpm-smd debug_mask supports the following bits:
BIT(0) = Show pretty formatting in RPM request log messages
BIT(1) = Show raw formatting in RPM request log messages
BIT(2) = Show SMD message ID in RPM request log messages

Example log messages for each possible debug_mask value:
0 = (no message)
1 = RPM req: s=act ldoa 9; uv=1800000
2 = RPM req: s=act, rsc_type=0x616F646C, rsc_id=9;
        [key=0x00007675, value=0x40 77 1B 00]
3 = RPM req: s=act, rsc_type=0x616F646C (ldoa), rsc_id=9;
        [key=0x00007675 (uv), value=0x40 77 1B 00 (1800000)]
4 = (no message)
5 = RPM req: msg_id=8, s=act ldoa 9; uv=1800000
6 = RPM req: msg_id=8, s=act, rsc_type=0x616F646C, rsc_id=9;
        [key=0x00007675, value=0x40 77 1B 00]
7 = RPM req: msg_id=8, s=act, rsc_type=0x616F646C (ldoa),
        rsc_id=9;
        [key=0x00007675 (uv), value=0x40 77 1B 00 (1800000)]

Change-Id: If7e0f6128a065396e703a6c9f8708303491ba5fe
Signed-off-by: David Collins <collinsd@codeaurora.org>
1 file changed