Lines Matching +full:lp87524 +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>
25 { .name = "lp87565-q1-regulator", },
26 { .name = "lp87565-q1-gpio", },
32 .compatible = "ti,lp87524-q1",
36 .compatible = "ti,lp87565-q1",
40 .compatible = "ti,lp87561-q1",
53 lp87565 = devm_kzalloc(&client->dev, sizeof(*lp87565), GFP_KERNEL); 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 lp87565->reset_gpio = devm_gpiod_get_optional(lp87565->dev, "reset", in lp87565_probe()
69 if (IS_ERR(lp87565->reset_gpio)) { in lp87565_probe()
70 ret = PTR_ERR(lp87565->reset_gpio); in lp87565_probe()
71 if (ret == -EPROBE_DEFER) in lp87565_probe()
75 if (lp87565->reset_gpio) { in lp87565_probe()
76 gpiod_set_value_cansleep(lp87565->reset_gpio, 1); in lp87565_probe()
80 gpiod_set_value_cansleep(lp87565->reset_gpio, 0); in lp87565_probe()
85 ret = regmap_read(lp87565->regmap, LP87565_REG_OTP_REV, &otpid); in lp87565_probe()
87 dev_err(lp87565->dev, "Failed to read OTP ID\n"); in lp87565_probe()
91 lp87565->rev = otpid & LP87565_OTP_REV_OTP_ID; in lp87565_probe()
92 lp87565->dev_type = (uintptr_t)i2c_get_match_data(client); in lp87565_probe()
96 return devm_mfd_add_devices(lp87565->dev, PLATFORM_DEVID_AUTO, in lp87565_probe()
105 gpiod_set_value_cansleep(lp87565->reset_gpio, 1); in lp87565_shutdown()
109 { "lp87565-q1" },
125 MODULE_AUTHOR("J Keerthy <j-keerthy@ti.com>");
126 MODULE_DESCRIPTION("lp87565 chip family Multi-Function Device driver");