Lines Matching +full:pre +full:- +full:designed
1 // SPDX-License-Identifier: GPL-2.0
23 { .name = "tps68470-gpio" },
54 /** skl_int3472_tps68470_calc_type: Check what platform a device is designed for
61 * 1. No CLDB - likely ACPI tables designed for ChromeOS. We
64 * 2. CLDB, with control_logic_type = 2 - probably ACPI tables
65 * made for Windows 2-in-1 platforms. Register pdevs for GPIO,
74 * * -EINVAL Where @adev has an object named CLDB but it does not conform to
87 if (ret && ret != -ENODEV) in skl_int3472_tps68470_calc_type()
94 return -EINVAL; in skl_int3472_tps68470_calc_type()
117 return -ENODEV; in skl_int3472_fill_clk_pdata()
123 return -ENOMEM; in skl_int3472_fill_clk_pdata()
125 (*clk_pdata)->n_consumers = n_consumers; in skl_int3472_fill_clk_pdata()
133 return -ENOMEM; in skl_int3472_fill_clk_pdata()
136 (*clk_pdata)->consumers[i].consumer_dev_name = sensor_name; in skl_int3472_fill_clk_pdata()
145 struct acpi_device *adev = ACPI_COMPANION(&client->dev); in skl_int3472_tps68470_probe()
156 return -ENODEV; in skl_int3472_tps68470_probe()
158 n_consumers = skl_int3472_fill_clk_pdata(&client->dev, &clk_pdata); in skl_int3472_tps68470_probe()
164 dev_err(&client->dev, "Failed to create regmap: %ld\n", PTR_ERR(regmap)); in skl_int3472_tps68470_probe()
170 ret = tps68470_chip_init(&client->dev, regmap); in skl_int3472_tps68470_probe()
172 dev_err(&client->dev, "TPS68470 init error %d\n", ret); in skl_int3472_tps68470_probe()
179 board_data = int3472_tps68470_get_board_data(dev_name(&client->dev)); in skl_int3472_tps68470_probe()
181 return dev_err_probe(&client->dev, -ENODEV, "No board-data found for this model\n"); in skl_int3472_tps68470_probe()
185 return -ENOMEM; in skl_int3472_tps68470_probe()
193 cells[0].name = "tps68470-clk"; in skl_int3472_tps68470_probe()
196 cells[1].name = "tps68470-regulator"; in skl_int3472_tps68470_probe()
197 cells[1].platform_data = (void *)board_data->tps68470_regulator_pdata; in skl_int3472_tps68470_probe()
199 cells[2].name = "tps68470-gpio"; in skl_int3472_tps68470_probe()
201 for (i = 0; i < board_data->n_gpiod_lookups; i++) in skl_int3472_tps68470_probe()
202 gpiod_add_lookup_table(board_data->tps68470_gpio_lookup_tables[i]); in skl_int3472_tps68470_probe()
204 ret = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_NONE, in skl_int3472_tps68470_probe()
210 for (i = 0; i < board_data->n_gpiod_lookups; i++) in skl_int3472_tps68470_probe()
211 gpiod_remove_lookup_table(board_data->tps68470_gpio_lookup_tables[i]); in skl_int3472_tps68470_probe()
216 ret = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_NONE, in skl_int3472_tps68470_probe()
221 dev_err(&client->dev, "Failed to add MFD devices\n"); in skl_int3472_tps68470_probe()
238 board_data = int3472_tps68470_get_board_data(dev_name(&client->dev)); in skl_int3472_tps68470_remove()
240 for (i = 0; i < board_data->n_gpiod_lookups; i++) in skl_int3472_tps68470_remove()
241 gpiod_remove_lookup_table(board_data->tps68470_gpio_lookup_tables[i]); in skl_int3472_tps68470_remove()
253 .name = "int3472-tps68470",
264 MODULE_SOFTDEP("pre: clk-tps68470 tps68470-regulator");