Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: dphy: Change units of wakeup and init parameters

The Init and wakeup D-PHY parameters are in the micro/milliseconds range,
putting the values real close to the types limits if they were in
picoseconds.

Move them to microseconds which should be better fit.

Suggested-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Maxime Ripard and committed by
Kishon Vijay Abraham I
2204b2c4 752b5da2

+8 -8
+4 -4
drivers/phy/phy-core-mipi-dphy.c
··· 65 65 */ 66 66 cfg->hs_trail = max(4 * 8 * ui, 60000 + 4 * 4 * ui); 67 67 68 - cfg->init = 100000000; 68 + cfg->init = 100; 69 69 cfg->lpx = 60000; 70 70 cfg->ta_get = 5 * cfg->lpx; 71 71 cfg->ta_go = 4 * cfg->lpx; 72 72 cfg->ta_sure = 2 * cfg->lpx; 73 - cfg->wakeup = 1000000000; 73 + cfg->wakeup = 1000; 74 74 75 75 cfg->hs_clk_rate = hs_clk_rate; 76 76 cfg->lanes = lanes; ··· 143 143 if (cfg->hs_trail < max(8 * ui, 60000 + 4 * ui)) 144 144 return -EINVAL; 145 145 146 - if (cfg->init < 100000000) 146 + if (cfg->init < 100) 147 147 return -EINVAL; 148 148 149 149 if (cfg->lpx < 50000) ··· 158 158 if (cfg->ta_sure < cfg->lpx || cfg->ta_sure > (2 * cfg->lpx)) 159 159 return -EINVAL; 160 160 161 - if (cfg->wakeup < 1000000000) 161 + if (cfg->wakeup < 1000) 162 162 return -EINVAL; 163 163 164 164 return 0;
+4 -4
include/linux/phy/phy-mipi-dphy.h
··· 190 190 /** 191 191 * @init: 192 192 * 193 - * Time, in picoseconds for the initialization period to 193 + * Time, in microseconds for the initialization period to 194 194 * complete. 195 195 * 196 - * Minimum value: 100000000 ps 196 + * Minimum value: 100 us 197 197 */ 198 198 unsigned int init; 199 199 ··· 244 244 /** 245 245 * @wakeup: 246 246 * 247 - * Time, in picoseconds, that a transmitter drives a Mark-1 247 + * Time, in microseconds, that a transmitter drives a Mark-1 248 248 * state prior to a Stop state in order to initiate an exit 249 249 * from ULPS. 250 250 * 251 - * Minimum value: 1000000000 ps 251 + * Minimum value: 1000 us 252 252 */ 253 253 unsigned int wakeup; 254 254