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

Input: twl6040-vibra - remove support for legacy (pdata) mode

TWL6040 is used only with OMAP4/5 SoCs and they can only boot in in DT mode.
The support for pdata/legacy boot can be removed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Peter Ujfalusi and committed by
Dmitry Torokhov
7bf2a98a 46146e7d

+15 -26
+15 -26
drivers/input/misc/twl6040-vibra.c
··· 257 257 258 258 static int twl6040_vibra_probe(struct platform_device *pdev) 259 259 { 260 - struct twl6040_vibra_data *pdata = pdev->dev.platform_data; 261 260 struct device *twl6040_core_dev = pdev->dev.parent; 262 261 struct device_node *twl6040_core_node = NULL; 263 262 struct vibra_info *info; ··· 269 270 "vibra"); 270 271 #endif 271 272 272 - if (!pdata && !twl6040_core_node) { 273 - dev_err(&pdev->dev, "platform_data not available\n"); 273 + if (!twl6040_core_node) { 274 + dev_err(&pdev->dev, "parent of node is missing?\n"); 274 275 return -EINVAL; 275 276 } 276 277 ··· 283 284 info->dev = &pdev->dev; 284 285 285 286 info->twl6040 = dev_get_drvdata(pdev->dev.parent); 286 - if (pdata) { 287 - info->vibldrv_res = pdata->vibldrv_res; 288 - info->vibrdrv_res = pdata->vibrdrv_res; 289 - info->viblmotor_res = pdata->viblmotor_res; 290 - info->vibrmotor_res = pdata->vibrmotor_res; 291 - vddvibl_uV = pdata->vddvibl_uV; 292 - vddvibr_uV = pdata->vddvibr_uV; 293 - } else { 294 - of_property_read_u32(twl6040_core_node, "ti,vibldrv-res", 295 - &info->vibldrv_res); 296 - of_property_read_u32(twl6040_core_node, "ti,vibrdrv-res", 297 - &info->vibrdrv_res); 298 - of_property_read_u32(twl6040_core_node, "ti,viblmotor-res", 299 - &info->viblmotor_res); 300 - of_property_read_u32(twl6040_core_node, "ti,vibrmotor-res", 301 - &info->vibrmotor_res); 302 - of_property_read_u32(twl6040_core_node, "ti,vddvibl-uV", 303 - &vddvibl_uV); 304 - of_property_read_u32(twl6040_core_node, "ti,vddvibr-uV", 305 - &vddvibr_uV); 306 - } 287 + 288 + of_property_read_u32(twl6040_core_node, "ti,vibldrv-res", 289 + &info->vibldrv_res); 290 + of_property_read_u32(twl6040_core_node, "ti,vibrdrv-res", 291 + &info->vibrdrv_res); 292 + of_property_read_u32(twl6040_core_node, "ti,viblmotor-res", 293 + &info->viblmotor_res); 294 + of_property_read_u32(twl6040_core_node, "ti,vibrmotor-res", 295 + &info->vibrmotor_res); 296 + of_property_read_u32(twl6040_core_node, "ti,vddvibl-uV", &vddvibl_uV); 297 + of_property_read_u32(twl6040_core_node, "ti,vddvibr-uV", &vddvibr_uV); 307 298 308 299 if ((!info->vibldrv_res && !info->viblmotor_res) || 309 300 (!info->vibrdrv_res && !info->vibrmotor_res)) { ··· 323 334 * When booted with Device tree the regulators are attached to the 324 335 * parent device (twl6040 MFD core) 325 336 */ 326 - ret = regulator_bulk_get(pdata ? info->dev : twl6040_core_dev, 327 - ARRAY_SIZE(info->supplies), info->supplies); 337 + ret = regulator_bulk_get(twl6040_core_dev, ARRAY_SIZE(info->supplies), 338 + info->supplies); 328 339 if (ret) { 329 340 dev_err(info->dev, "couldn't get regulators %d\n", ret); 330 341 return ret;