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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'ux500/hickup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm fixes for ux500 mismerge mishap from Arnd Bergmann:
"The device tree conversion for arm/ux500 in 3.5 turns out to be
incomplete because of a mismerge done by Linus Walleij that I failed
to notice early enough and that Lee Jones as the original author of
those patches did not manage to fix during the -next cycle. While we
originally to get a much larger set of ux500 device tree enablement
patches merged, this did not happen in time.

After some discussion at Linaro Connect conference this week, Lee has
been able to do damage control and provide a series to put the broken
platform back into usable shape for both DT and non-DT based booting.

This series has not been part of linux-next and is based on top of the
current state of the upstream kernel rather than an -rc, but this is
the best we could manage given the earlier breakage."

* 'ux500/hickup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: ux500: Enable probing of pinctrl through Device Tree
ARM: ux500: Add support for ab8500 regulators into the Device Tree
ARM: ux500: Provide regulator support for SMSC911x via Device Tree
ARM: ux500: Allow PRCMU regulator to be probed during a DT enabled boot
ARM: ux500: Apply db8500-prcmu regulator information to db8500 Device Tree
ARM: ux500: Only initialise STE's UIBs on boards which support them
ARM: ux500: Disable platform setup of the ab8500 when DT is enabled
ARM: ux500: Use correct format for dynamic IRQ assignment
ARM: ux500: Re-enable SMSC911x platform code registration during non-DT boots
ARM: ux500: PRCMU related configuration and layout corrections for Device Tree
ARM: ux500: Remove DB8500 PRCMU platform registration when DT is enabled
ARM: ux500: Disable SMSC911x platform code registration when DT is enabled
ARM: ux500: New DT:ed u8500_init_devices for one-by-one device enablement
ARM: ux500: New DT:ed snowball_platform_devs for one-by-one device enablement
pinctrl-nomadik: Allow Device Tree driver probing

+301 -22
+201 -3
arch/arm/boot/dts/db8500.dtsi
··· 58 58 "st,nomadik-gpio"; 59 59 reg = <0x8012e000 0x80>; 60 60 interrupts = <0 119 0x4>; 61 + interrupt-controller; 62 + #interrupt-cells = <2>; 61 63 supports-sleepmode; 62 64 gpio-controller; 63 65 #gpio-cells = <2>; ··· 71 69 "st,nomadik-gpio"; 72 70 reg = <0x8012e080 0x80>; 73 71 interrupts = <0 120 0x4>; 72 + interrupt-controller; 73 + #interrupt-cells = <2>; 74 74 supports-sleepmode; 75 75 gpio-controller; 76 76 #gpio-cells = <2>; ··· 84 80 "st,nomadik-gpio"; 85 81 reg = <0x8000e000 0x80>; 86 82 interrupts = <0 121 0x4>; 83 + interrupt-controller; 84 + #interrupt-cells = <2>; 87 85 supports-sleepmode; 88 86 gpio-controller; 89 87 #gpio-cells = <2>; ··· 97 91 "st,nomadik-gpio"; 98 92 reg = <0x8000e080 0x80>; 99 93 interrupts = <0 122 0x4>; 94 + interrupt-controller; 95 + #interrupt-cells = <2>; 100 96 supports-sleepmode; 101 97 gpio-controller; 102 98 #gpio-cells = <2>; ··· 110 102 "st,nomadik-gpio"; 111 103 reg = <0x8000e100 0x80>; 112 104 interrupts = <0 123 0x4>; 105 + interrupt-controller; 106 + #interrupt-cells = <2>; 113 107 supports-sleepmode; 114 108 gpio-controller; 115 109 #gpio-cells = <2>; ··· 123 113 "st,nomadik-gpio"; 124 114 reg = <0x8000e180 0x80>; 125 115 interrupts = <0 124 0x4>; 116 + interrupt-controller; 117 + #interrupt-cells = <2>; 126 118 supports-sleepmode; 127 119 gpio-controller; 128 120 #gpio-cells = <2>; ··· 136 124 "st,nomadik-gpio"; 137 125 reg = <0x8011e000 0x80>; 138 126 interrupts = <0 125 0x4>; 127 + interrupt-controller; 128 + #interrupt-cells = <2>; 139 129 supports-sleepmode; 140 130 gpio-controller; 141 131 #gpio-cells = <2>; ··· 149 135 "st,nomadik-gpio"; 150 136 reg = <0x8011e080 0x80>; 151 137 interrupts = <0 126 0x4>; 138 + interrupt-controller; 139 + #interrupt-cells = <2>; 152 140 supports-sleepmode; 153 141 gpio-controller; 154 142 #gpio-cells = <2>; ··· 162 146 "st,nomadik-gpio"; 163 147 reg = <0xa03fe000 0x80>; 164 148 interrupts = <0 127 0x4>; 149 + interrupt-controller; 150 + #interrupt-cells = <2>; 165 151 supports-sleepmode; 166 152 gpio-controller; 167 153 #gpio-cells = <2>; 168 154 gpio-bank = <8>; 155 + }; 156 + 157 + pinctrl { 158 + compatible = "stericsson,nmk_pinctrl"; 169 159 }; 170 160 171 161 usb@a03e0000 { ··· 191 169 prcmu@80157000 { 192 170 compatible = "stericsson,db8500-prcmu"; 193 171 reg = <0x80157000 0x1000>; 194 - interrupts = <46 47>; 172 + interrupts = <0 47 0x4>; 195 173 #address-cells = <1>; 196 174 #size-cells = <1>; 197 175 ranges; 198 176 199 - prcmu-timer-4@80157450 { 177 + prcmu-timer-4@80157450 { 200 178 compatible = "stericsson,db8500-prcmu-timer-4"; 201 179 reg = <0x80157450 0xC>; 180 + }; 181 + 182 + db8500-prcmu-regulators { 183 + compatible = "stericsson,db8500-prcmu-regulator"; 184 + 185 + // DB8500_REGULATOR_VAPE 186 + db8500_vape_reg: db8500_vape { 187 + regulator-name = "db8500-vape"; 188 + regulator-always-on; 189 + }; 190 + 191 + // DB8500_REGULATOR_VARM 192 + db8500_varm_reg: db8500_varm { 193 + regulator-name = "db8500-varm"; 194 + }; 195 + 196 + // DB8500_REGULATOR_VMODEM 197 + db8500_vmodem_reg: db8500_vmodem { 198 + regulator-name = "db8500-vmodem"; 199 + }; 200 + 201 + // DB8500_REGULATOR_VPLL 202 + db8500_vpll_reg: db8500_vpll { 203 + regulator-name = "db8500-vpll"; 204 + }; 205 + 206 + // DB8500_REGULATOR_VSMPS1 207 + db8500_vsmps1_reg: db8500_vsmps1 { 208 + regulator-name = "db8500-vsmps1"; 209 + }; 210 + 211 + // DB8500_REGULATOR_VSMPS2 212 + db8500_vsmps2_reg: db8500_vsmps2 { 213 + regulator-name = "db8500-vsmps2"; 214 + }; 215 + 216 + // DB8500_REGULATOR_VSMPS3 217 + db8500_vsmps3_reg: db8500_vsmps3 { 218 + regulator-name = "db8500-vsmps3"; 219 + }; 220 + 221 + // DB8500_REGULATOR_VRF1 222 + db8500_vrf1_reg: db8500_vrf1 { 223 + regulator-name = "db8500-vrf1"; 224 + }; 225 + 226 + // DB8500_REGULATOR_SWITCH_SVAMMDSP 227 + db8500_sva_mmdsp_reg: db8500_sva_mmdsp { 228 + regulator-name = "db8500-sva-mmdsp"; 229 + }; 230 + 231 + // DB8500_REGULATOR_SWITCH_SVAMMDSPRET 232 + db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret { 233 + regulator-name = "db8500-sva-mmdsp-ret"; 234 + }; 235 + 236 + // DB8500_REGULATOR_SWITCH_SVAPIPE 237 + db8500_sva_pipe_reg: db8500_sva_pipe { 238 + regulator-name = "db8500_sva_pipe"; 239 + }; 240 + 241 + // DB8500_REGULATOR_SWITCH_SIAMMDSP 242 + db8500_sia_mmdsp_reg: db8500_sia_mmdsp { 243 + regulator-name = "db8500_sia_mmdsp"; 244 + }; 245 + 246 + // DB8500_REGULATOR_SWITCH_SIAMMDSPRET 247 + db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret { 248 + regulator-name = "db8500-sia-mmdsp-ret"; 249 + }; 250 + 251 + // DB8500_REGULATOR_SWITCH_SIAPIPE 252 + db8500_sia_pipe_reg: db8500_sia_pipe { 253 + regulator-name = "db8500-sia-pipe"; 254 + }; 255 + 256 + // DB8500_REGULATOR_SWITCH_SGA 257 + db8500_sga_reg: db8500_sga { 258 + regulator-name = "db8500-sga"; 259 + vin-supply = <&db8500_vape_reg>; 260 + }; 261 + 262 + // DB8500_REGULATOR_SWITCH_B2R2_MCDE 263 + db8500_b2r2_mcde_reg: db8500_b2r2_mcde { 264 + regulator-name = "db8500-b2r2-mcde"; 265 + vin-supply = <&db8500_vape_reg>; 266 + }; 267 + 268 + // DB8500_REGULATOR_SWITCH_ESRAM12 269 + db8500_esram12_reg: db8500_esram12 { 270 + regulator-name = "db8500-esram12"; 271 + }; 272 + 273 + // DB8500_REGULATOR_SWITCH_ESRAM12RET 274 + db8500_esram12_ret_reg: db8500_esram12_ret { 275 + regulator-name = "db8500-esram12-ret"; 276 + }; 277 + 278 + // DB8500_REGULATOR_SWITCH_ESRAM34 279 + db8500_esram34_reg: db8500_esram34 { 280 + regulator-name = "db8500-esram34"; 281 + }; 282 + 283 + // DB8500_REGULATOR_SWITCH_ESRAM34RET 284 + db8500_esram34_ret_reg: db8500_esram34_ret { 285 + regulator-name = "db8500-esram34-ret"; 286 + }; 202 287 }; 203 288 204 289 ab8500@5 { 205 290 compatible = "stericsson,ab8500"; 206 291 reg = <5>; /* mailbox 5 is i2c */ 207 292 interrupts = <0 40 0x4>; 293 + 294 + ab8500-regulators { 295 + compatible = "stericsson,ab8500-regulator"; 296 + 297 + // supplies to the display/camera 298 + ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { 299 + regulator-name = "V-DISPLAY"; 300 + regulator-min-microvolt = <2500000>; 301 + regulator-max-microvolt = <2900000>; 302 + regulator-boot-on; 303 + /* BUG: If turned off MMC will be affected. */ 304 + regulator-always-on; 305 + }; 306 + 307 + // supplies to the on-board eMMC 308 + ab8500_ldo_aux2_reg: ab8500_ldo_aux2 { 309 + regulator-name = "V-eMMC1"; 310 + regulator-min-microvolt = <1100000>; 311 + regulator-max-microvolt = <3300000>; 312 + }; 313 + 314 + // supply for VAUX3; SDcard slots 315 + ab8500_ldo_aux3_reg: ab8500_ldo_aux3 { 316 + regulator-name = "V-MMC-SD"; 317 + regulator-min-microvolt = <1100000>; 318 + regulator-max-microvolt = <3300000>; 319 + }; 320 + 321 + // supply for v-intcore12; VINTCORE12 LDO 322 + ab8500_ldo_initcore_reg: ab8500_ldo_initcore { 323 + regulator-name = "V-INTCORE"; 324 + }; 325 + 326 + // supply for tvout; gpadc; TVOUT LDO 327 + ab8500_ldo_tvout_reg: ab8500_ldo_tvout { 328 + regulator-name = "V-TVOUT"; 329 + }; 330 + 331 + // supply for ab8500-usb; USB LDO 332 + ab8500_ldo_usb_reg: ab8500_ldo_usb { 333 + regulator-name = "dummy"; 334 + }; 335 + 336 + // supply for ab8500-vaudio; VAUDIO LDO 337 + ab8500_ldo_audio_reg: ab8500_ldo_audio { 338 + regulator-name = "V-AUD"; 339 + }; 340 + 341 + // supply for v-anamic1 VAMic1-LDO 342 + ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 { 343 + regulator-name = "V-AMIC1"; 344 + }; 345 + 346 + // supply for v-amic2; VAMIC2 LDO; reuse constants for AMIC1 347 + ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 { 348 + regulator-name = "V-AMIC2"; 349 + }; 350 + 351 + // supply for v-dmic; VDMIC LDO 352 + ab8500_ldo_dmic_reg: ab8500_ldo_dmic { 353 + regulator-name = "V-DMIC"; 354 + }; 355 + 356 + // supply for U8500 CSI/DSI; VANA LDO 357 + ab8500_ldo_ana_reg: ab8500_ldo_ana { 358 + regulator-name = "V-CSI/DSI"; 359 + }; 360 + }; 208 361 }; 209 362 }; 210 363 ··· 432 235 status = "disabled"; 433 236 434 237 // Add one of these for each child device 435 - cs-gpios = <&gpio0 31 &gpio4 14 &gpio4 16 &gpio6 22 &gpio7 0>; 238 + cs-gpios = <&gpio0 31 0x4 &gpio4 14 0x4 &gpio4 16 0x4 239 + &gpio6 22 0x4 &gpio7 0 0x4>; 436 240 437 241 }; 438 242
+23 -9
arch/arm/boot/dts/snowball.dts
··· 20 20 reg = <0x00000000 0x20000000>; 21 21 }; 22 22 23 + en_3v3_reg: en_3v3 { 24 + compatible = "regulator-fixed"; 25 + regulator-name = "en-3v3-fixed-supply"; 26 + regulator-min-microvolt = <3300000>; 27 + regulator-max-microvolt = <3300000>; 28 + gpios = <&gpio0 26 0x4>; // 26 29 + startup-delay-us = <5000>; 30 + enable-active-high; 31 + }; 32 + 23 33 gpio_keys { 24 34 compatible = "gpio-keys"; 25 35 #address-cells = <1>; ··· 40 30 wakeup = <1>; 41 31 linux,code = <2>; 42 32 label = "userpb"; 43 - gpios = <&gpio1 0 0>; 33 + gpios = <&gpio1 0 0x4>; 44 34 }; 45 35 button@2 { 46 36 debounce_interval = <50>; 47 37 wakeup = <1>; 48 38 linux,code = <3>; 49 39 label = "extkb1"; 50 - gpios = <&gpio4 23 0>; 40 + gpios = <&gpio4 23 0x4>; 51 41 }; 52 42 button@3 { 53 43 debounce_interval = <50>; 54 44 wakeup = <1>; 55 45 linux,code = <4>; 56 46 label = "extkb2"; 57 - gpios = <&gpio4 24 0>; 47 + gpios = <&gpio4 24 0x4>; 58 48 }; 59 49 button@4 { 60 50 debounce_interval = <50>; 61 51 wakeup = <1>; 62 52 linux,code = <5>; 63 53 label = "extkb3"; 64 - gpios = <&gpio5 1 0>; 54 + gpios = <&gpio5 1 0x4>; 65 55 }; 66 56 button@5 { 67 57 debounce_interval = <50>; 68 58 wakeup = <1>; 69 59 linux,code = <6>; 70 60 label = "extkb4"; 71 - gpios = <&gpio5 2 0>; 61 + gpios = <&gpio5 2 0x4>; 72 62 }; 73 63 }; 74 64 ··· 76 66 compatible = "gpio-leds"; 77 67 used-led { 78 68 label = "user_led"; 79 - gpios = <&gpio4 14>; 69 + gpios = <&gpio4 14 0x4>; 80 70 }; 81 71 }; 82 72 83 73 soc-u9500 { 84 - 85 74 external-bus@50000000 { 86 75 status = "okay"; 87 76 ··· 89 80 reg = <0 0x10000>; 90 81 interrupts = <12 0x1>; 91 82 interrupt-parent = <&gpio4>; 83 + vdd33a-supply = <&en_3v3_reg>; 84 + vddvario-supply = <&db8500_vape_reg>; 85 + 92 86 93 87 reg-shift = <1>; 94 88 reg-io-width = <2>; ··· 103 91 104 92 sdi@80126000 { 105 93 status = "enabled"; 106 - cd-gpios = <&gpio6 26>; 94 + vmmc-supply = <&ab8500_ldo_aux3_reg>; 95 + cd-gpios = <&gpio6 26 0x4>; // 218 107 96 }; 108 97 109 98 sdi@80114000 { 110 99 status = "enabled"; 100 + vmmc-supply = <&ab8500_ldo_aux2_reg>; 111 101 }; 112 102 113 103 uart@80120000 { ··· 128 114 tc3589x@42 { 129 115 //compatible = "tc3589x"; 130 116 reg = <0x42>; 131 - interrupts = <25>; 117 + gpios = <&gpio6 25 0x4>; 132 118 interrupt-parent = <&gpio6>; 133 119 }; 134 120 tps61052@33 {
+1
arch/arm/configs/u8500_defconfig
··· 75 75 CONFIG_AB8500_CORE=y 76 76 CONFIG_REGULATOR=y 77 77 CONFIG_REGULATOR_AB8500=y 78 + CONFIG_REGULATOR_FIXED_VOLTAGE=y 78 79 # CONFIG_HID_SUPPORT is not set 79 80 CONFIG_USB_GADGET=y 80 81 CONFIG_AB8500_USB=y
+1 -3
arch/arm/mach-ux500/board-mop500-uib.c
··· 96 96 /* 97 97 * Detect the UIB attached based on the presence or absence of i2c devices. 98 98 */ 99 - static int __init mop500_uib_init(void) 99 + int __init mop500_uib_init(void) 100 100 { 101 101 struct uib *uib = mop500_uib; 102 102 struct i2c_adapter *i2c0; ··· 131 131 132 132 return 0; 133 133 } 134 - 135 - module_init(mop500_uib_init);
+28 -4
arch/arm/mach-ux500/board-mop500.c
··· 673 673 static struct platform_device *snowball_platform_devs[] __initdata = { 674 674 &snowball_led_dev, 675 675 &snowball_key_dev, 676 + &snowball_sbnet_dev, 676 677 &ab8500_device, 678 + }; 679 + 680 + static struct platform_device *snowball_of_platform_devs[] __initdata = { 681 + &snowball_led_dev, 682 + &snowball_key_dev, 677 683 }; 678 684 679 685 static void __init mop500_init_machine(void) ··· 716 710 717 711 /* This board has full regulator constraints */ 718 712 regulator_has_full_constraints(); 713 + 714 + mop500_uib_init(); 719 715 } 720 716 721 717 static void __init snowball_init_machine(void) ··· 782 774 783 775 /* This board has full regulator constraints */ 784 776 regulator_has_full_constraints(); 777 + 778 + mop500_uib_init(); 785 779 } 786 780 787 781 MACHINE_START(U8500, "ST-Ericsson MOP500 platform") ··· 844 834 static const struct of_device_id u8500_local_bus_nodes[] = { 845 835 /* only create devices below soc node */ 846 836 { .compatible = "stericsson,db8500", }, 837 + { .compatible = "stericsson,db8500-prcmu", }, 838 + { .compatible = "stericsson,db8500-prcmu-regulator", }, 839 + { .compatible = "stericsson,ab8500", }, 840 + { .compatible = "stericsson,ab8500-regulator", }, 847 841 { .compatible = "simple-bus"}, 848 842 { }, 849 843 }; ··· 866 852 else if (of_machine_is_compatible("st-ericsson,hrefv60+")) 867 853 hrefv60_pinmaps_init(); 868 854 869 - parent = u8500_init_devices(); 855 + parent = u8500_of_init_devices(); 870 856 871 857 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) 872 858 mop500_platform_devs[i]->dev.parent = parent; ··· 883 869 ARRAY_SIZE(mop500_platform_devs)); 884 870 885 871 mop500_sdi_init(parent); 886 - 887 872 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); 888 873 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); 889 874 i2c_register_board_info(2, mop500_i2c2_devices, 890 875 ARRAY_SIZE(mop500_i2c2_devices)); 891 876 877 + mop500_uib_init(); 878 + 892 879 } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { 893 - platform_add_devices(snowball_platform_devs, 894 - ARRAY_SIZE(snowball_platform_devs)); 880 + /* 881 + * Devices to be DT:ed: 882 + * snowball_led_dev = todo 883 + * snowball_key_dev = todo 884 + * snowball_sbnet_dev = done 885 + * ab8500_device = done 886 + */ 887 + platform_add_devices(snowball_of_platform_devs, 888 + ARRAY_SIZE(snowball_of_platform_devs)); 895 889 896 890 snowball_sdi_init(parent); 897 891 } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { ··· 920 898 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); 921 899 i2c_register_board_info(2, mop500_i2c2_devices, 922 900 ARRAY_SIZE(mop500_i2c2_devices)); 901 + 902 + mop500_uib_init(); 923 903 } 924 904 mop500_i2c_init(parent); 925 905
+4
arch/arm/mach-ux500/board-mop500.h
··· 89 89 void __init snowball_pinmaps_init(void); 90 90 void __init hrefv60_pinmaps_init(void); 91 91 92 + int __init mop500_uib_init(void); 92 93 void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, 93 94 unsigned n); 95 + 96 + /* TODO: Once all pieces are DT:ed, remove completely. */ 97 + struct device * __init u8500_of_init_devices(void); 94 98 95 99 #endif
+23 -2
arch/arm/mach-ux500/cpu-db8500.c
··· 140 140 static struct platform_device *of_platform_devs[] __initdata = { 141 141 &u8500_dma40_device, 142 142 &db8500_pmu_device, 143 - &db8500_prcmu_device, 144 143 }; 145 144 146 145 static resource_size_t __initdata db8500_gpio_base[] = { ··· 221 222 platform_device_register_data(parent, 222 223 "cpufreq-u8500", -1, NULL, 0); 223 224 225 + for (i = 0; i < ARRAY_SIZE(platform_devs); i++) 226 + platform_devs[i]->dev.parent = parent; 227 + 228 + platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); 229 + 230 + return parent; 231 + } 232 + 233 + /* TODO: Once all pieces are DT:ed, remove completely. */ 234 + struct device * __init u8500_of_init_devices(void) 235 + { 236 + struct device *parent; 237 + int i; 238 + 239 + parent = db8500_soc_device_init(); 240 + 241 + db8500_add_rtc(parent); 242 + db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); 243 + 244 + platform_device_register_data(parent, 245 + "cpufreq-u8500", -1, NULL, 0); 246 + 224 247 for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++) 225 248 of_platform_devs[i]->dev.parent = parent; 226 249 ··· 250 229 * Devices to be DT:ed: 251 230 * u8500_dma40_device = todo 252 231 * db8500_pmu_device = todo 253 - * db8500_prcmu_device = todo 232 + * db8500_prcmu_device = done 254 233 */ 255 234 platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs)); 256 235
+1
drivers/mfd/db8500-prcmu.c
··· 2735 2735 REGULATOR_SUPPLY("vcore", "uart2"), 2736 2736 REGULATOR_SUPPLY("v-ape", "nmk-ske-keypad.0"), 2737 2737 REGULATOR_SUPPLY("v-hsi", "ste_hsi.0"), 2738 + REGULATOR_SUPPLY("vddvario", "smsc911x.0"), 2738 2739 }; 2739 2740 2740 2741 static struct regulator_consumer_supply db8500_vsmps2_consumers[] = {
+19 -1
drivers/pinctrl/pinctrl-nomadik.c
··· 24 24 #include <linux/irq.h> 25 25 #include <linux/irqdomain.h> 26 26 #include <linux/slab.h> 27 + #include <linux/of_device.h> 27 28 #include <linux/pinctrl/pinctrl.h> 28 29 #include <linux/pinctrl/pinmux.h> 29 30 #include <linux/pinctrl/pinconf.h> ··· 1689 1688 .owner = THIS_MODULE, 1690 1689 }; 1691 1690 1691 + static const struct of_device_id nmk_pinctrl_match[] = { 1692 + { 1693 + .compatible = "stericsson,nmk_pinctrl", 1694 + .data = (void *)PINCTRL_NMK_DB8500, 1695 + }, 1696 + {}, 1697 + }; 1698 + 1692 1699 static int __devinit nmk_pinctrl_probe(struct platform_device *pdev) 1693 1700 { 1694 1701 const struct platform_device_id *platid = platform_get_device_id(pdev); 1702 + struct device_node *np = pdev->dev.of_node; 1695 1703 struct nmk_pinctrl *npct; 1704 + unsigned int version = 0; 1696 1705 int i; 1697 1706 1698 1707 npct = devm_kzalloc(&pdev->dev, sizeof(*npct), GFP_KERNEL); 1699 1708 if (!npct) 1700 1709 return -ENOMEM; 1701 1710 1711 + if (platid) 1712 + version = platid->driver_data; 1713 + else if (np) 1714 + version = (unsigned int) 1715 + of_match_device(nmk_pinctrl_match, &pdev->dev)->data; 1716 + 1702 1717 /* Poke in other ASIC variants here */ 1703 - if (platid->driver_data == PINCTRL_NMK_DB8500) 1718 + if (version == PINCTRL_NMK_DB8500) 1704 1719 nmk_pinctrl_db8500_init(&npct->soc); 1705 1720 1706 1721 /* ··· 1775 1758 .driver = { 1776 1759 .owner = THIS_MODULE, 1777 1760 .name = "pinctrl-nomadik", 1761 + .of_match_table = nmk_pinctrl_match, 1778 1762 }, 1779 1763 .probe = nmk_pinctrl_probe, 1780 1764 .id_table = nmk_pinctrl_id,