tc3589x.c (29583dfcd2dd72c766422bd05c16f06c6b1fb356) | tc3589x.c (d28fa288ea506812ef73980b8c3dc9c39ec8c18b) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) ST-Ericsson SA 2010 4 * 5 * Author: Hanumath Prasad <hanumath.prasad@stericsson.com> for ST-Ericsson 6 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson 7 */ 8 --- 338 unchanged lines hidden (view full) --- 347 pdata->block |= TC3589x_BLOCK_GPIO; 348 if (of_device_is_compatible(child, "toshiba,tc3589x-keypad")) 349 pdata->block |= TC3589x_BLOCK_KEYPAD; 350 } 351 352 return pdata; 353} 354 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) ST-Ericsson SA 2010 4 * 5 * Author: Hanumath Prasad <hanumath.prasad@stericsson.com> for ST-Ericsson 6 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson 7 */ 8 --- 338 unchanged lines hidden (view full) --- 347 pdata->block |= TC3589x_BLOCK_GPIO; 348 if (of_device_is_compatible(child, "toshiba,tc3589x-keypad")) 349 pdata->block |= TC3589x_BLOCK_KEYPAD; 350 } 351 352 return pdata; 353} 354 |
355static int tc3589x_probe(struct i2c_client *i2c, 356 const struct i2c_device_id *id) | 355static int tc3589x_probe(struct i2c_client *i2c) |
357{ | 356{ |
357 const struct i2c_device_id *id = i2c_client_get_device_id(i2c); |
|
358 struct device_node *np = i2c->dev.of_node; 359 struct tc3589x_platform_data *pdata = dev_get_platdata(&i2c->dev); 360 struct tc3589x *tc3589x; 361 enum tc3589x_version version; 362 int ret; 363 364 if (!pdata) { 365 pdata = tc3589x_of_probe(&i2c->dev, &version); --- 115 unchanged lines hidden (view full) --- 481MODULE_DEVICE_TABLE(i2c, tc3589x_id); 482 483static struct i2c_driver tc3589x_driver = { 484 .driver = { 485 .name = "tc3589x", 486 .pm = &tc3589x_dev_pm_ops, 487 .of_match_table = of_match_ptr(tc3589x_match), 488 }, | 358 struct device_node *np = i2c->dev.of_node; 359 struct tc3589x_platform_data *pdata = dev_get_platdata(&i2c->dev); 360 struct tc3589x *tc3589x; 361 enum tc3589x_version version; 362 int ret; 363 364 if (!pdata) { 365 pdata = tc3589x_of_probe(&i2c->dev, &version); --- 115 unchanged lines hidden (view full) --- 481MODULE_DEVICE_TABLE(i2c, tc3589x_id); 482 483static struct i2c_driver tc3589x_driver = { 484 .driver = { 485 .name = "tc3589x", 486 .pm = &tc3589x_dev_pm_ops, 487 .of_match_table = of_match_ptr(tc3589x_match), 488 }, |
489 .probe = tc3589x_probe, | 489 .probe_new = tc3589x_probe, |
490 .remove = tc3589x_remove, 491 .id_table = tc3589x_id, 492}; 493 494static int __init tc3589x_init(void) 495{ 496 return i2c_add_driver(&tc3589x_driver); 497} 498subsys_initcall(tc3589x_init); 499 500static void __exit tc3589x_exit(void) 501{ 502 i2c_del_driver(&tc3589x_driver); 503} 504module_exit(tc3589x_exit); 505 506MODULE_LICENSE("GPL v2"); 507MODULE_DESCRIPTION("TC3589x MFD core driver"); 508MODULE_AUTHOR("Hanumath Prasad, Rabin Vincent"); | 490 .remove = tc3589x_remove, 491 .id_table = tc3589x_id, 492}; 493 494static int __init tc3589x_init(void) 495{ 496 return i2c_add_driver(&tc3589x_driver); 497} 498subsys_initcall(tc3589x_init); 499 500static void __exit tc3589x_exit(void) 501{ 502 i2c_del_driver(&tc3589x_driver); 503} 504module_exit(tc3589x_exit); 505 506MODULE_LICENSE("GPL v2"); 507MODULE_DESCRIPTION("TC3589x MFD core driver"); 508MODULE_AUTHOR("Hanumath Prasad, Rabin Vincent"); |