From: Axel Lin Date: Wed, 28 Nov 2012 02:41:04 +0000 (+0800) Subject: regulator: pcf50633: Use linear_min_sel and regulator_[map|list]_voltage_linear X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~35^2~13^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05cf34c1af48e2e1308a03fbc778039243bebd3a;p=pandora-kernel.git regulator: pcf50633: Use linear_min_sel and regulator_[map|list]_voltage_linear This driver can be converted to use linear_min_sel and regulator_[map|list]_voltage_linear. Below shows the equation (from Datasheet) for each LDOs. For AUTOOUT: VO(prog) = 0.625 + auto_out x 0.025 V; e.g. (00000000 to 00101110: reserved) 00101111: 1.8 V (min) 01010011: 2.7 V 01101010: 3.275 V 01101011: 3.300 V 01101100: 3.325 V 01111111 : 3.800 V (max) The linear mapping start from 0x2f selector. Thus we convert this equation to: VO(prog) = 1.8 + (selector - linear_min_sel) x 0.025 V (min_uV = 1800000, uV_step = 25000, linear_min_sel = 0x2f) For DOWNxOUT: VO(prog) = 0.625 + downx_out x 0.025 V; e.g. 00000000 : 0.625 V (min) 00010111 : 1.200 V 00101111 : 1.800 V 01011111 : 3.000 V (max) For xLDOOUT: VO(prog) = 0.9 + xldo_out x 0.1 V; e.g. 00000: 0.9 V 00001: 1.0 V 11000 : 3.3 V 11011 : 3.6 V Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- Reading git-diff-tree failed