Lines Matching +full:lp87565 +full:- +full:q1
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2017 Texas Instruments Incorporated - https://www.ti.com/
5 * Author: Keerthy <j-keerthy@ti.com>
14 #include <linux/mfd/lp87565.h>
23 { .name = "lp87565-q1-regulator", },
24 { .name = "lp87565-q1-gpio", },
28 { .compatible = "ti,lp87565", },
30 .compatible = "ti,lp87524-q1",
34 .compatible = "ti,lp87565-q1",
38 .compatible = "ti,lp87561-q1",
48 struct lp87565 *lp87565; in lp87565_probe() local
53 lp87565 = devm_kzalloc(&client->dev, sizeof(*lp87565), GFP_KERNEL); in lp87565_probe()
54 if (!lp87565) in lp87565_probe()
55 return -ENOMEM; in lp87565_probe()
57 lp87565->dev = &client->dev; in lp87565_probe()
59 lp87565->regmap = devm_regmap_init_i2c(client, &lp87565_regmap_config); in lp87565_probe()
60 if (IS_ERR(lp87565->regmap)) { in lp87565_probe()
61 ret = PTR_ERR(lp87565->regmap); in lp87565_probe()
62 dev_err(lp87565->dev, in lp87565_probe()
67 ret = regmap_read(lp87565->regmap, LP87565_REG_OTP_REV, &otpid); in lp87565_probe()
69 dev_err(lp87565->dev, "Failed to read OTP ID\n"); in lp87565_probe()
73 lp87565->rev = otpid & LP87565_OTP_REV_OTP_ID; in lp87565_probe()
75 of_id = of_match_device(of_lp87565_match_table, &client->dev); in lp87565_probe()
77 lp87565->dev_type = (enum lp87565_device_type)of_id->data; in lp87565_probe()
79 i2c_set_clientdata(client, lp87565); in lp87565_probe()
81 return devm_mfd_add_devices(lp87565->dev, PLATFORM_DEVID_AUTO, in lp87565_probe()
87 { "lp87565-q1", 0 },
94 .name = "lp87565",
102 MODULE_AUTHOR("J Keerthy <j-keerthy@ti.com>");
103 MODULE_DESCRIPTION("lp87565 chip family Multi-Function Device driver");