scsi: ufshcd: Update the set frequency to devfreq
authorAsutosh Das <asutoshd@codeaurora.org>
Wed, 25 Mar 2020 18:29:00 +0000 (11:29 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 27 Mar 2020 02:18:12 +0000 (22:18 -0400)
commit91831d3336627ff0585c1519935bc11b48de22c6
treef13065a79210b910628f3b12e437c225a9c25769
parent0c2039dc1591bb9a3b887753b37946f09f4bf208
scsi: ufshcd: Update the set frequency to devfreq

Currently, the frequency that devfreq provides the driver always leads the
clocks to be scaled up.  Hence, round the clock-rate to the nearest
frequency before deciding to scale.

Also update the devfreq statistics of current frequency.

Link: https://lore.kernel.org/r/d0c6c22455811e9f0eda01f9bc70d1398b51b2bd.1585160616.git.asutoshd@codeaurora.org
Acked-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c