Skip to content

Commit 9dfa374

Browse files
committed
platform_data: Add linux/platform_data/tps68470.h file
The clk and regulator frameworks expect clk/regulator consumer-devices to have info about the consumed clks/regulators described in the device's fw_node. To work around cases where this info is not present in the firmware tables, which is often the case on x86/ACPI devices, both frameworks allow the provider-driver to attach info about consumers to the provider-device during probe/registration of the provider device. The TI TPS68470 PMIC is used x86/ACPI devices with the consumer-info missing from the ACPI tables. Thus the tps68470-clk and tps68470-regulator drivers must provide the consumer-info at probe time. Define tps68470_clk_platform_data and tps68470_regulator_platform_data structs to allow the x86 platform code to pass the necessary consumer info to these drivers. Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c537be0 commit 9dfa374

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/* SPDX-License-Identifier: GPL-2.0-or-later */
2+
/*
3+
* TI TPS68470 PMIC platform data definition.
4+
*
5+
* Copyright (c) 2021 Red Hat Inc.
6+
*
7+
* Red Hat authors:
8+
* Hans de Goede <[email protected]>
9+
*/
10+
#ifndef __PDATA_TPS68470_H
11+
#define __PDATA_TPS68470_H
12+
13+
enum tps68470_regulators {
14+
TPS68470_CORE,
15+
TPS68470_ANA,
16+
TPS68470_VCM,
17+
TPS68470_VIO,
18+
TPS68470_VSIO,
19+
TPS68470_AUX1,
20+
TPS68470_AUX2,
21+
TPS68470_NUM_REGULATORS
22+
};
23+
24+
struct regulator_init_data;
25+
26+
struct tps68470_regulator_platform_data {
27+
const struct regulator_init_data *reg_init_data[TPS68470_NUM_REGULATORS];
28+
};
29+
30+
struct tps68470_clk_platform_data {
31+
const char *consumer_dev_name;
32+
const char *consumer_con_id;
33+
};
34+
35+
#endif

0 commit comments

Comments
 (0)