da9211-regulator.c (f26e8817b235d8764363bffcc9cbfc61867371f2) | da9211-regulator.c (707ce9eac5fc3b68f98c887dddea3911a8fc4f9f) |
---|---|
1/* 2 * da9211-regulator.c - Regulator device driver for DA9211/DA9212 | 1/* 2 * da9211-regulator.c - Regulator device driver for DA9211/DA9212 |
3 * /DA9213/DA9214/DA9215 | 3 * /DA9213/DA9223/DA9214/DA9224/DA9215/DA9225 |
4 * Copyright (C) 2015 Dialog Semiconductor Ltd. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, --- 479 unchanged lines hidden (view full) --- 491 492 return ret; 493} 494 495static const struct i2c_device_id da9211_i2c_id[] = { 496 {"da9211", DA9211}, 497 {"da9212", DA9212}, 498 {"da9213", DA9213}, | 4 * Copyright (C) 2015 Dialog Semiconductor Ltd. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, --- 479 unchanged lines hidden (view full) --- 491 492 return ret; 493} 494 495static const struct i2c_device_id da9211_i2c_id[] = { 496 {"da9211", DA9211}, 497 {"da9212", DA9212}, 498 {"da9213", DA9213}, |
499 {"da9223", DA9223}, |
|
499 {"da9214", DA9214}, | 500 {"da9214", DA9214}, |
501 {"da9224", DA9224}, |
|
500 {"da9215", DA9215}, | 502 {"da9215", DA9215}, |
503 {"da9225", DA9225}, |
|
501 {}, 502}; 503MODULE_DEVICE_TABLE(i2c, da9211_i2c_id); 504 505#ifdef CONFIG_OF 506static const struct of_device_id da9211_dt_ids[] = { 507 { .compatible = "dlg,da9211", .data = &da9211_i2c_id[0] }, 508 { .compatible = "dlg,da9212", .data = &da9211_i2c_id[1] }, 509 { .compatible = "dlg,da9213", .data = &da9211_i2c_id[2] }, | 504 {}, 505}; 506MODULE_DEVICE_TABLE(i2c, da9211_i2c_id); 507 508#ifdef CONFIG_OF 509static const struct of_device_id da9211_dt_ids[] = { 510 { .compatible = "dlg,da9211", .data = &da9211_i2c_id[0] }, 511 { .compatible = "dlg,da9212", .data = &da9211_i2c_id[1] }, 512 { .compatible = "dlg,da9213", .data = &da9211_i2c_id[2] }, |
510 { .compatible = "dlg,da9214", .data = &da9211_i2c_id[3] }, 511 { .compatible = "dlg,da9215", .data = &da9211_i2c_id[4] }, | 513 { .compatible = "dlg,da9223", .data = &da9211_i2c_id[3] }, 514 { .compatible = "dlg,da9214", .data = &da9211_i2c_id[4] }, 515 { .compatible = "dlg,da9224", .data = &da9211_i2c_id[5] }, 516 { .compatible = "dlg,da9215", .data = &da9211_i2c_id[6] }, 517 { .compatible = "dlg,da9225", .data = &da9211_i2c_id[7] }, |
512 {}, 513}; 514MODULE_DEVICE_TABLE(of, da9211_dt_ids); 515#endif 516 517static struct i2c_driver da9211_regulator_driver = { 518 .driver = { 519 .name = "da9211", 520 .of_match_table = of_match_ptr(da9211_dt_ids), 521 }, 522 .probe = da9211_i2c_probe, 523 .id_table = da9211_i2c_id, 524}; 525 526module_i2c_driver(da9211_regulator_driver); 527 528MODULE_AUTHOR("James Ban <James.Ban.opensource@diasemi.com>"); | 518 {}, 519}; 520MODULE_DEVICE_TABLE(of, da9211_dt_ids); 521#endif 522 523static struct i2c_driver da9211_regulator_driver = { 524 .driver = { 525 .name = "da9211", 526 .of_match_table = of_match_ptr(da9211_dt_ids), 527 }, 528 .probe = da9211_i2c_probe, 529 .id_table = da9211_i2c_id, 530}; 531 532module_i2c_driver(da9211_regulator_driver); 533 534MODULE_AUTHOR("James Ban <James.Ban.opensource@diasemi.com>"); |
529MODULE_DESCRIPTION("DA9211/DA9212/DA9213/DA9214/DA9215 regulator driver"); | 535MODULE_DESCRIPTION("DA9211/DA9212/DA9213/DA9223/DA9214/DA9224/DA9215/DA9225 regulator driver"); |
530MODULE_LICENSE("GPL"); | 536MODULE_LICENSE("GPL"); |