| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/19 15:08 | flow | patch-triage |
6mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch fixes a device reference leak (adding put_device(\u0026rdev-\u003edev)) in regulator_resolve_supply() when a regulator's supply resolves to itself (r == rdev). This condition occurs strictly due to circular regulator supply definitions (e.g. in Device Tree bindings or specific embedded PMIC drivers such as AXP22x with drivevbus enabled via DT). On standard amd64 virtualized fuzzing environments (QEMU/GCE), Device Tree is not supported, no virtual/emulated hardware registers self-supplying regulators, and no userspace interface allows registering arbitrary regulators. Consequently, this error-handling path is structurally unreachable on amd64.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/19 15:08 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit a7612d0c3daf897f2489b21df887dd85e7486ca4\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sat Sep 19 15:08:39 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/regulator/core.c b/drivers/regulator/core.c\nindex 6a4008f387b5e..812e1d61d4019 100644\n--- a/drivers/regulator/core.c\n+++ b/drivers/regulator/core.c\n@@ -2239,6 +2239,7 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)\n \tif (r == rdev) {\n \t\tdev_err(dev, \"Supply for %s (%s) resolved to itself\\n\",\n \t\t\trdev-\u003edesc-\u003ename, rdev-\u003esupply_name);\n+\t\tput_device(\u0026rdev-\u003edev);\n \t\tif (!have_full_constraints()) {\n \t\t\tret = -EINVAL;\n \t\t\tgoto out;\n"
} |
| 2/1 | 2026/09/19 15:08 | agent | patch-evaluator |
6mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch fixes a device reference leak (adding put_device(\u0026rdev-\u003edev)) in regulator_resolve_supply() when a regulator's supply resolves to itself (r == rdev). This condition occurs strictly due to circular regulator supply definitions (e.g. in Device Tree bindings or specific embedded PMIC drivers such as AXP22x with drivevbus enabled via DT). On standard amd64 virtualized fuzzing environments (QEMU/GCE), Device Tree is not supported, no virtual/emulated hardware registers self-supplying regulators, and no userspace interface allows registering arbitrary regulators. Consequently, this error-handling path is structurally unreachable on amd64.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit a7612d0c3daf897f2489b21df887dd85e7486ca4
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Sep 19 15:08:39 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 6a4008f387b5e..812e1d61d4019 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2239,6 +2239,7 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
if (r == rdev) {
dev_err(dev, "Supply for %s (%s) resolved to itself\n",
rdev->desc->name, rdev->supply_name);
+ put_device(&rdev->dev);
if (!have_full_constraints()) {
ret = -EINVAL;
goto out;
|
| 3/2 | 2026/09/19 15:08 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 2868 output: 37 thoughts: 334 Thoughts: **Analyzing a Kernel Regulator Patch** Okay, so the user wants me to take a look at this kernel patch in `drivers/regulator/core.c` and figure out if it's worth fuzzing with syzkaller. Looks like a pretty standard request, nothing alarming here – benign Linux kernel maintenance, likely just another fuzzing triage task. Let's dig in. The patch itself is small, just one line added, and seems to be inside the `regulator_resolve_supply` function. It looks like it adds a `put_device` call right before an error return. I need to understand why. Looks like the developer is making sure there's no reference leak if the regulator resolves to itself which isn't a sane state. The `put_device(&rdev->dev);` call likely decrements the reference count of the device associated with the regulator. A good practice, preventing potential resource leaks. Now, does this create a fuzzing target? Potentially. Any error path is an interesting path for fuzzing, as error handling is often a source of bugs. A self-referential supply situation *could* expose a race condition if not handled correctly. I'll need to think about the conditions that trigger this scenario and what the consequences are. The `!have_full_constraints()` check might be key here, maybe a particular configuration leads to this self-reference. To decide if it's fuzz-worthy, I need to know: 1. **What's the likelihood of this error path being hit in a real-world scenario?** Is this a theoretical issue or a likely occurrence? 2. **What's the *potential* impact of a bug here?** A regulator is power control, so even a small issue could affect power management (system stability, power drain). What's the worst-case scenario? 3. **How complex is the code surrounding this?** Is this a simple function, or does it interact with a lot of other components? Complexity often correlates with bug probability. I'll start by examining the surrounding code in `regulator_resolve_supply` and see how it’s used. I'll probably also need to understand the `have_full_constraints()` function. A `git blame` on the file might shed light on past issues and modifications in this area. From that I can get a better sense if this is a high-risk area, and then start evaluating what symbols and configs I'd need to fuzz it effectively with syzkaller. |
| 4/2 | 2026/09/19 15:08 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2220,
"LineCount": 60
}Results: {
"Contents": "2220:\t\t\t/* Did the lookup explicitly defer for us? */\n2221:\t\t\tif (ret == -EPROBE_DEFER)\n2222:\t\t\t\tgoto out;\n2223:\t\n2224:\t\t\tif (have_full_constraints()) {\n2225:\t\t\t\tr = dummy_regulator_rdev;\n2226:\t\t\t\tif (!r) {\n2227:\t\t\t\t\tret = -EPROBE_DEFER;\n2228:\t\t\t\t\tgoto out;\n2229:\t\t\t\t}\n2230:\t\t\t\tget_device(\u0026r-\u003edev);\n2231:\t\t\t} else {\n2232:\t\t\t\tdev_err(dev, \"Failed to resolve %s-supply for %s\\n\",\n2233:\t\t\t\t\trdev-\u003esupply_name, rdev-\u003edesc-\u003ename);\n2234:\t\t\t\tret = -EPROBE_DEFER;\n2235:\t\t\t\tgoto out;\n2236:\t\t\t}\n2237:\t\t}\n2238:\t\n2239:\t\tif (r == rdev) {\n2240:\t\t\tdev_err(dev, \"Supply for %s (%s) resolved to itself\\n\",\n2241:\t\t\t\trdev-\u003edesc-\u003ename, rdev-\u003esupply_name);\n2242:\t\t\tput_device(\u0026rdev-\u003edev);\n2243:\t\t\tif (!have_full_constraints()) {\n2244:\t\t\t\tret = -EINVAL;\n2245:\t\t\t\tgoto out;\n2246:\t\t\t}\n2247:\t\t\tr = dummy_regulator_rdev;\n2248:\t\t\tif (!r) {\n2249:\t\t\t\tret = -EPROBE_DEFER;\n2250:\t\t\t\tgoto out;\n2251:\t\t\t}\n2252:\t\t\tget_device(\u0026r-\u003edev);\n2253:\t\t}\n2254:\t\n2255:\t\t/*\n2256:\t\t * If the supply's parent device is not the same as the\n2257:\t\t * regulator's parent device, then ensure the parent device\n2258:\t\t * is bound before we resolve the supply, in case the parent\n2259:\t\t * device get probe deferred and unregisters the supply.\n2260:\t\t */\n2261:\t\tif (r-\u003edev.parent \u0026\u0026 r-\u003edev.parent != rdev-\u003edev.parent) {\n2262:\t\t\tif (!device_is_bound(r-\u003edev.parent)) {\n2263:\t\t\t\tput_device(\u0026r-\u003edev);\n2264:\t\t\t\tret = -EPROBE_DEFER;\n2265:\t\t\t\tgoto out;\n2266:\t\t\t}\n2267:\t\t}\n2268:\t\n2269:\t\t/* Recursively resolve the supply of the supply */\n2270:\t\tret = regulator_resolve_supply(r);\n2271:\t\tif (ret \u003c 0) {\n2272:\t\t\tput_device(\u0026r-\u003edev);\n2273:\t\t\tgoto out;\n2274:\t\t}\n2275:\t\n2276:\t\t/*\n2277:\t\t * Recheck rdev-\u003esupply with rdev-\u003emutex lock held to avoid a race\n2278:\t\t * between rdev-\u003esupply null check and setting rdev-\u003esupply in\n2279:\t\t * set_supply() from concurrent tasks.\n"
} |
| 5/2 | 2026/09/19 15:08 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 4639 output: 37 thoughts: 27 Thoughts: Here's a summary of my thought process, as requested: **Deconstructing the Regulator's Supply Resolution** Okay, so I need to get a handle on the context surrounding line 2220. My first instinct is to dive into the `regulator_resolve_supply` function. That's the logical starting point. I want to trace the execution flow back from that specific line to understand the initial conditions, the logic that led up to it, and any crucial data dependencies. Understanding the preceding steps is absolutely critical for interpreting what's happening at 2220 and why. I'm going to start by looking at the function's definition and any calls to it, maybe even any upstream data mutations, that influence the state just before that line's execution. My goal is to paint a complete picture of the "before," to clarify the "what" at 2220. |
| 6/2 | 2026/09/19 15:09 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2180,
"LineCount": 45
}Results: {
"Contents": "2180:\t\t\treturn r;\n2181:\t\n2182:\t\tr = regulator_lookup_by_name(supply);\n2183:\t\tif (r)\n2184:\t\t\treturn r;\n2185:\t\n2186:\t\treturn ERR_PTR(-ENODEV);\n2187:\t}\n2188:\t\n2189:\tstatic int regulator_resolve_supply(struct regulator_dev *rdev)\n2190:\t{\n2191:\t\tstruct regulator_dev *r;\n2192:\t\tstruct device *dev = rdev-\u003edev.parent;\n2193:\t\tstruct ww_acquire_ctx ww_ctx;\n2194:\t\tstruct regulator *supply;\n2195:\t\tbool do_final_setup;\n2196:\t\tint ret = 0;\n2197:\t\n2198:\t\t/* No supply to resolve? */\n2199:\t\tif (!rdev-\u003esupply_name)\n2200:\t\t\treturn 0;\n2201:\t\n2202:\t\t/* Supply already resolved? (fast-path without locking contention) */\n2203:\t\tif (rdev-\u003esupply \u0026\u0026 !rdev-\u003econstraints_pending)\n2204:\t\t\treturn 0;\n2205:\t\n2206:\t\t/* first do a dt based lookup on the node described in the virtual\n2207:\t\t * device.\n2208:\t\t */\n2209:\t\tr = regulator_dt_lookup(\u0026rdev-\u003edev, rdev-\u003esupply_name);\n2210:\t\n2211:\t\t/* If regulator not found use usual search path in the parent\n2212:\t\t * device.\n2213:\t\t */\n2214:\t\tif (!r)\n2215:\t\t\tr = regulator_dev_lookup(dev, rdev-\u003esupply_name);\n2216:\t\n2217:\t\tif (IS_ERR(r)) {\n2218:\t\t\tret = PTR_ERR(r);\n2219:\t\n2220:\t\t\t/* Did the lookup explicitly defer for us? */\n2221:\t\t\tif (ret == -EPROBE_DEFER)\n2222:\t\t\t\tgoto out;\n2223:\t\n2224:\t\t\tif (have_full_constraints()) {\n"
} |
| 7/2 | 2026/09/19 15:09 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5497 output: 31 thoughts: 17 Thoughts: Here's my take on those thoughts: **Tracing the Origins of `regulator_resolve_supply`** Alright, let's dive in. My immediate thought is to understand the context of this `regulator_resolve_supply` function. Where is it being *used*? I need to track down all the call sites. I want to see which other modules and functions are invoking it, to get a handle on what it's *supposed* to be doing and under what conditions. Understanding the calling context is key to understanding its function. Time to start the hunt! I'll fire up the appropriate tools and get to work. |
| 8/2 | 2026/09/19 15:09 | tool | grepper |
0mArgs:{
"Expression": "regulator_resolve_supply",
"PathPrefix": "drivers/regulator/"
}Results: {
"Output": "drivers/regulator/core.c=2146=static struct regulator_dev *regulator_dev_lookup(struct device *dev,\n--\ndrivers/regulator/core.c-2188-\ndrivers/regulator/core.c:2189:static int regulator_resolve_supply(struct regulator_dev *rdev)\ndrivers/regulator/core.c-2190-{\n--\ndrivers/regulator/core.c-2269-\t/* Recursively resolve the supply of the supply */\ndrivers/regulator/core.c:2270:\tret = regulator_resolve_supply(r);\ndrivers/regulator/core.c-2271-\tif (ret \u003c 0) {\n--\ndrivers/regulator/core.c=2426=struct regulator *_regulator_get_common(struct regulator_dev *rdev, struct device *dev,\n--\ndrivers/regulator/core.c-2494-\ndrivers/regulator/core.c:2495:\tret = regulator_resolve_supply(rdev);\ndrivers/regulator/core.c-2496-\tif (ret \u003c 0) {\n--\ndrivers/regulator/core.c=6003=regulator_register(struct device *dev,\n--\ndrivers/regulator/core.c-6174-\t\t\t rdev-\u003esupply_name);\ndrivers/regulator/core.c:6175:\t\tret = regulator_resolve_supply(rdev);\ndrivers/regulator/core.c-6176-\t\tif (!ret)\n--\ndrivers/regulator/core.c-6221-\t\t */\ndrivers/regulator/core.c:6222:\t\tret = regulator_resolve_supply(rdev);\ndrivers/regulator/core.c-6223-\t\tif (ret)\n--\ndrivers/regulator/core.c=6406=static int regulator_bus_probe(struct device *bdev)\n--\ndrivers/regulator/core.c-6410-\ndrivers/regulator/core.c:6411:\tret = regulator_resolve_supply(rdev);\ndrivers/regulator/core.c-6412-\tif (ret)\n"
} |
| 9/2 | 2026/09/19 15:09 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6235 output: 37 thoughts: 121 Thoughts: **Analyzing a Regulator Patch** Okay, hold on a second. I need to understand this patch more deeply. What exactly is it trying to accomplish? Before diving into the code changes, I need to get a high-level view from the commit message or the description of the fix. Alright, now I see, we're looking at a change within `regulator_resolve_supply(rdev)`. Specifically, it appears the patch affects the lookup of the regulator supply, either through `regulator_dt_lookup(&rdev->dev, rdev->supply_name)` or potentially `regulator_dev_lookup(...)`. Hmm, this part is crucial. I need to clarify something. Does either `regulator_dt_lookup` or `regulator_dev_lookup` implicitly hold a reference or take a reference to the `r->dev` device? If they don't, there might be a subtle but critical issue with how the device tree (DT) information is being handled or propagated. Time to meticulously examine the implementations of both `regulator_dev_lookup` and `regulator_dt_lookup` to confirm the reference counting behavior. Need to be sure of this. |
| 10/2 | 2026/09/19 15:09 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2140,
"LineCount": 45
}Results: {
"Contents": "2140:\t * @supply and with the embedded struct device refcount incremented by one.\n2141:\t * The refcount must be dropped by calling put_device().\n2142:\t * On failure one of the following ERR_PTR() encoded values is returned:\n2143:\t * -%ENODEV if lookup fails permanently, -%EPROBE_DEFER if lookup could succeed\n2144:\t * in the future.\n2145:\t */\n2146:\tstatic struct regulator_dev *regulator_dev_lookup(struct device *dev,\n2147:\t\t\t\t\t\t\t const char *supply)\n2148:\t{\n2149:\t\tstruct regulator_dev *r = NULL;\n2150:\t\tstruct regulator_map *map;\n2151:\t\tconst char *devname = NULL;\n2152:\t\n2153:\t\tregulator_supply_alias(\u0026dev, \u0026supply);\n2154:\t\n2155:\t\t/* first do a dt based lookup */\n2156:\t\tr = regulator_dt_lookup(dev, supply);\n2157:\t\tif (r)\n2158:\t\t\treturn r;\n2159:\t\n2160:\t\t/* if not found, try doing it non-dt way */\n2161:\t\tif (dev)\n2162:\t\t\tdevname = dev_name(dev);\n2163:\t\n2164:\t\tmutex_lock(\u0026regulator_list_mutex);\n2165:\t\tlist_for_each_entry(map, \u0026regulator_map_list, list) {\n2166:\t\t\t/* If the mapping has a device set up it must match */\n2167:\t\t\tif (map-\u003edev_name \u0026\u0026\n2168:\t\t\t (!devname || strcmp(map-\u003edev_name, devname)))\n2169:\t\t\t\tcontinue;\n2170:\t\n2171:\t\t\tif (strcmp(map-\u003esupply, supply) == 0 \u0026\u0026\n2172:\t\t\t get_device(\u0026map-\u003eregulator-\u003edev)) {\n2173:\t\t\t\tr = map-\u003eregulator;\n2174:\t\t\t\tbreak;\n2175:\t\t\t}\n2176:\t\t}\n2177:\t\tmutex_unlock(\u0026regulator_list_mutex);\n2178:\t\n2179:\t\tif (r)\n2180:\t\t\treturn r;\n2181:\t\n2182:\t\tr = regulator_lookup_by_name(supply);\n2183:\t\tif (r)\n2184:\t\t\treturn r;\n"
} |
| 11/2 | 2026/09/19 15:09 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 7307 output: 37 thoughts: 42 Thoughts: Okay, here's my interpretation of those thoughts, summarized from my perspective as someone deeply familiar with this kind of work: **My Internal Code Review: Regulator Dive** Alright, so here's what's pinging in my mind as I dig into this. I'm noticing a critical dependency here, specifically when the code encounters an `r` – that's a signal to me. The call to `get_device(&map->regulator->dev)` is triggered *every* time `r` appears. I need to understand the implications of that device call within the scope. I know how things often go with these power regulators. Furthermore, I need to check the exact circumstances when a lookup is performed. From my perspective as an expert, I need to scrutinize what's happening within `regulator_dt_lookup`. It's likely involved in Device Tree interactions, and those can be tricky. I'm going to have to dive into that function, check the parameters passed, the checks performed, and the implications of the lookup. I'm already anticipating potential issues with resource allocation, error handling, and the overall robustness of the regulator management. I'm going to follow this through to its core; it's a detail worth exploring, and potentially a critical area for improving the performance, safety, and reliability of the whole system. |
| 12/2 | 2026/09/19 15:09 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2100,
"LineCount": 45
}Results: {
"Contents": "2100:\t}\n2101:\t\n2102:\tstatic int regulator_match(struct device *dev, const void *data)\n2103:\t{\n2104:\t\tstruct regulator_dev *r = dev_to_rdev(dev);\n2105:\t\n2106:\t\treturn strcmp(rdev_get_name(r), data) == 0;\n2107:\t}\n2108:\t\n2109:\tstatic struct regulator_dev *regulator_lookup_by_name(const char *name)\n2110:\t{\n2111:\t\tstruct device *dev;\n2112:\t\n2113:\t\tdev = class_find_device(\u0026regulator_class, NULL, name, regulator_match);\n2114:\t\n2115:\t\treturn dev ? dev_to_rdev(dev) : NULL;\n2116:\t}\n2117:\t\n2118:\tstatic struct regulator_dev *regulator_dt_lookup(struct device *dev,\n2119:\t\t\t\t\t\t\t const char *supply)\n2120:\t{\n2121:\t\tstruct regulator_dev *r = NULL;\n2122:\t\n2123:\t\tif (dev_of_node(dev)) {\n2124:\t\t\tr = of_regulator_dev_lookup(dev, dev_of_node(dev), supply);\n2125:\t\t\tif (PTR_ERR(r) == -ENODEV)\n2126:\t\t\t\tr = NULL;\n2127:\t\t}\n2128:\t\n2129:\t\treturn r;\n2130:\t}\n2131:\t\n2132:\t/**\n2133:\t * regulator_dev_lookup - lookup a regulator device.\n2134:\t * @dev: device for regulator \"consumer\".\n2135:\t * @supply: Supply name or regulator ID.\n2136:\t *\n2137:\t * Return: pointer to \u0026struct regulator_dev or ERR_PTR() encoded negative error number.\n2138:\t *\n2139:\t * If successful, returns a struct regulator_dev that corresponds to the name\n2140:\t * @supply and with the embedded struct device refcount incremented by one.\n2141:\t * The refcount must be dropped by calling put_device().\n2142:\t * On failure one of the following ERR_PTR() encoded values is returned:\n2143:\t * -%ENODEV if lookup fails permanently, -%EPROBE_DEFER if lookup could succeed\n2144:\t * in the future.\n"
} |
| 13/2 | 2026/09/19 15:09 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8345 output: 37 thoughts: 207 Thoughts: **Analyzing Regulator Device Refcounting and Resolvement** Okay, so I'm looking at this `class_find_device` function, and it's pretty straightforward: it increases the device's reference count. Makes sense, that's what we expect. Now, `regulator_dev_lookup(...)` also does the same thing, returning a regulator device `r` with its reference count *incremented*. That's a critical detail to keep in mind. Now we are in `regulator_resolve_supply`. This looks like a conditional block where there is some kind of looping going on. If `r` (the looked-up regulator device) is equal to `rdev` (the original regulator device we are working with), it means the supply resolved to itself. That's a situation we need to handle. The code logs an error, but here's where it got tricky. Previously, I see that the code *didn't* call `put_device(&rdev->dev)` (or, equivalently, `put_device(&r->dev)`). The reason is that if we don't `have_full_constraints()`, it would jump straight to the `out` label via `goto out;`. But now, this seems to be improved. So, *now* what happens at `out:`? I need to check the rest of the function to see what `out:` does, because that's the cleanup path. It's likely decrementing the reference count somewhere. I need to be sure that we aren't leaking a reference here. It looks like it is checking if we *have* `have_full_constraints()` and then decrementing the refcount if we do not. This will need to be verified. |
| 14/2 | 2026/09/19 15:09 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2350,
"LineCount": 50
}Results: {
"Contents": "2350:\t\t\t\trdev_warn(rdev,\n2351:\t\t\t\t\t \"Failed to set machine constraints: %pe\\n\",\n2352:\t\t\t\t\t ERR_PTR(ret));\n2353:\t\n2354:\t\t\t\tregulator_lock_two(rdev, r, \u0026ww_ctx);\n2355:\t\n2356:\t\t\t\tif (supply != rdev-\u003esupply) {\n2357:\t\t\t\t\t/*\n2358:\t\t\t\t\t * Supply could have been released by another\n2359:\t\t\t\t\t * task that got here before us. If it did, it\n2360:\t\t\t\t\t * will have released 'supply' (i.e. the\n2361:\t\t\t\t\t * previous rdev-\u003esupply) and we shouldn't do\n2362:\t\t\t\t\t * that again via unset_supply.\n2363:\t\t\t\t\t */\n2364:\t\t\t\t\tregulator_unlock_two(rdev, r, \u0026ww_ctx);\n2365:\t\t\t\t\tgoto out;\n2366:\t\t\t\t}\n2367:\t\n2368:\t\t\t\tunregister_regulator_event_forwarding(rdev);\n2369:\t\t\t\trdev-\u003econstraints_pending = true;\n2370:\t\t\t\tgoto unset_supply;\n2371:\t\t\t}\n2372:\t\t\trdev-\u003econstraints_pending = false;\n2373:\t\t}\n2374:\t\tregulator_unlock_dependent(rdev, \u0026ww_ctx);\n2375:\t\n2376:\t\tif (!do_final_setup)\n2377:\t\t\tgoto out;\n2378:\t\n2379:\t\t/* rdev-\u003esupply was created in set_supply() */\n2380:\t\tlink_and_create_debugfs(rdev-\u003esupply, rdev-\u003esupply-\u003erdev, \u0026rdev-\u003edev);\n2381:\t\n2382:\tout:\n2383:\t\treturn ret;\n2384:\t\n2385:\tunset_supply:\n2386:\t\tlockdep_assert_held_once(\u0026rdev-\u003emutex.base);\n2387:\t\tlockdep_assert_held_once(\u0026r-\u003emutex.base);\n2388:\t\trdev-\u003esupply = NULL;\n2389:\t\tregulator_unlock_two(rdev, supply-\u003erdev, \u0026ww_ctx);\n2390:\t\n2391:\t\tregulator_put(supply);\n2392:\t\n2393:\t\treturn ret;\n2394:\t}\n2395:\t\n2396:\t/* common pre-checks for regulator requests */\n2397:\tint _regulator_get_common_check(struct device *dev, const char *id,\n2398:\t\t\t\t\tenum regulator_get_type get_type)\n2399:\t{\n"
} |
| 15/2 | 2026/09/19 15:09 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 9681 output: 29 thoughts: 503 Thoughts: **Device Refcount Leak in Regulator Subsystem** Okay, hold on a second. I need to focus on lines 2247-2253. I'm seeing a possible device refcount leak in `regulator_resolve_supply`. It appears that if `r` (which is equal to `rdev`) ends up resolving to itself, and `have_full_constraints()` returns true, we call `put_device(&rdev->dev)`. Then, we change `r` to point to `dummy_regulator_rdev` and call `get_device(&r->dev)` on the dummy. The original `rdev` had a refcount from earlier lookups, but now that refcount is potentially leaked because we're no longer managing it. Even worse, if `!have_full_constraints()` we `goto out` immediately and the leak happens in that case too. Clearly, that `put_device()` call is meant to fix something; it is probably fixing a leak, but it is *still* leading to another. Now, the critical question is whether `regulator_resolve_supply` is reachable from userspace. Can we trigger this through a user-space interface, like syzkaller fuzzing? I need to figure out how regulators are registered, created, and used. Is there any way for a user-space application or tool like syzkaller to reach this code path? I need to investigate how the regulator subsystem can be interacted with from userspace. Specifically, I need to check for any virtual devices or userspace interfaces related to regulators. Are there sysfs interfaces, configfs interfaces, or any kind of test, dummy, or virtual driver that exposes regulators to userspace? Time to grep the code for any clues about user-space interactions with regulators. |
| 16/2 | 2026/09/19 15:09 | tool | grepper |
0mArgs:{
"Expression": "regulator_register",
"PathPrefix": "drivers/regulator/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1566 lines.\nUse more precise expression if possible.\n\ndrivers/regulator/88pg86x.c=60=static int pg86x_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/88pg86x.c-73-\t\tstruct regulator_dev *rdev;\ndrivers/regulator/88pg86x.c:74:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev,\ndrivers/regulator/88pg86x.c-75-\t\t\t\t\t \u0026pg86x_regulators[id],\n--\ndrivers/regulator/88pm800-regulator.c=226=static int pm800_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm800-regulator.c-260-\ndrivers/regulator/88pm800-regulator.c:261:\t\tregulator = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/88pm800-regulator.c-262-\t\t\t\t\u0026pm800_regulator_info[i].desc, \u0026config);\n--\ndrivers/regulator/88pm8607.c=315=static int pm8607_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm8607.c-359-\ndrivers/regulator/88pm8607.c:360:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc, \u0026config);\ndrivers/regulator/88pm8607.c-361-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/88pm886-regulator.c=340=static int pm886_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm886-regulator.c-365-\t\trdesc = \u0026pm886_regulators[i];\ndrivers/regulator/88pm886-regulator.c:366:\t\trdev = devm_regulator_register(dev, rdesc, \u0026rcfg);\ndrivers/regulator/88pm886-regulator.c-367-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/aat2870-regulator.c=150=static int aat2870_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/aat2870-regulator.c-166-\ndrivers/regulator/aat2870-regulator.c:167:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026ri-\u003edesc, \u0026config);\ndrivers/regulator/aat2870-regulator.c-168-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/ab8500-ext.c=393=static int ab8500_ext_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/ab8500-ext.c-430-\t\t/* register regulator with framework */\ndrivers/regulator/ab8500-ext.c:431:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/ab8500-ext.c-432-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/ab8500.c=1643=static void abx500_get_regulator_info(struct ab8500 *ab8500)\n--\ndrivers/regulator/ab8500.c-1661-\ndrivers/regulator/ab8500.c:1662:static int ab8500_regulator_register(struct platform_device *pdev,\ndrivers/regulator/ab8500.c-1663-\t\t\t\t struct regulator_init_data *init_data,\n--\ndrivers/regulator/ab8500.c-1690-\t/* register regulator with framework */\ndrivers/regulator/ab8500.c:1691:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc, \u0026config);\ndrivers/regulator/ab8500.c-1692-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/ab8500.c=1701=static int ab8500_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/ab8500.c-1725-\tfor (i = 0; i \u003c abx500_regulator.info_size; i++) {\ndrivers/regulator/ab8500.c:1726:\t\terr = ab8500_regulator_register(pdev, match[i].init_data, i,\ndrivers/regulator/ab8500.c-1727-\t\t\t\t\t\tmatch[i].of_node);\n--\ndrivers/regulator/act8865-regulator.c=654=static int act8865_pmic_probe(struct i2c_client *client)\n--\ndrivers/regulator/act8865-regulator.c-755-\ndrivers/regulator/act8865-regulator.c:756:\t\trdev = devm_regulator_register(dev, desc, \u0026config);\ndrivers/regulator/act8865-regulator.c-757-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/act8945a-regulator.c=274=static int act8945a_pmic_probe(struct platform_device *pdev)\n--\ndrivers/regulator/act8945a-regulator.c-309-\tfor (i = 0; i \u003c num_regulators; i++) {\ndrivers/regulator/act8945a-regulator.c:310:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regulators[i],\ndrivers/regulator/act8945a-regulator.c-311-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/ad5398.c=216=static int ad5398_probe(struct i2c_client *client)\n--\ndrivers/regulator/ad5398.c-248-\ndrivers/regulator/ad5398.c:249:\tchip-\u003erdev = devm_regulator_register(\u0026client-\u003edev, \u0026ad5398_reg,\ndrivers/regulator/ad5398.c-250-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/adp5055-regulator.c=345=static int adp5055_probe(struct i2c_client *client)\n--\ndrivers/regulator/adp5055-regulator.c-384-\ndrivers/regulator/adp5055-regulator.c:385:\t\trdev = devm_regulator_register(dev, desc, \u0026config);\ndrivers/regulator/adp5055-regulator.c-386-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/anatop-regulator.c=155=static int anatop_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/anatop-regulator.c-305-\t/* register regulator */\ndrivers/regulator/anatop-regulator.c:306:\trdev = devm_regulator_register(dev, rdesc, \u0026config);\ndrivers/regulator/anatop-regulator.c-307-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/arizona-ldo1.c=226=static int arizona_ldo1_common_init(struct platform_device *pdev,\n--\ndrivers/regulator/arizona-ldo1.c-278-\ndrivers/regulator/arizona-ldo1.c:279:\tldo1-\u003eregulator = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/arizona-ldo1.c-280-\n--\ndrivers/regulator/arizona-micsupp.c=250=static int arizona_micsupp_common_init(struct platform_device *pdev,\n--\ndrivers/regulator/arizona-micsupp.c-284-\ndrivers/regulator/arizona-micsupp.c:285:\tmicsupp-\u003eregulator = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/arizona-micsupp.c-286-\t\t\t\t\t\t desc,\n--\ndrivers/regulator/as3711-regulator.c=203=static int as3711_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/as3711-regulator.c-230-\ndrivers/regulator/as3711-regulator.c:231:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026as3711_reg_desc[id],\ndrivers/regulator/as3711-regulator.c-232-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/as3722-regulator.c=634=static int as3722_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/as3722-regulator.c-795-\t\tconfig.of_node = as3722_regulator_matches[id].of_node;\ndrivers/regulator/as3722-regulator.c:796:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/as3722-regulator.c-797-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/atc260x-regulator.c=473=static int atc260x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/atc260x-regulator.c-513-\t\tif (atc2603c_ver_b \u0026\u0026 regulators[i].id == ATC2603C_ID_DCDC2)\ndrivers/regulator/atc260x-regulator.c:514:\t\t\tatc260x_rdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/atc260x-regulator.c-515-\t\t\t\t\t\t\t \u0026atc2603c_reg_dcdc2_ver_b,\n--\ndrivers/regulator/atc260x-regulator.c-517-\t\telse\ndrivers/regulator/atc260x-regulator.c:518:\t\t\tatc260x_rdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/atc260x-regulator.c-519-\t\t\t\t\t\t\t \u0026regulators[i],\n--\ndrivers/regulator/aw37503-regulator.c=178=static int aw37503_probe(struct i2c_client *client)\n--\ndrivers/regulator/aw37503-regulator.c-203-\tfor (id = 0; id \u003c AW37503_MAX_REGULATORS; ++id) {\ndrivers/regulator/aw37503-regulator.c:204:\t\trdev = devm_regulator_register(dev, \u0026aw_regs_desc[id],\ndrivers/regulator/aw37503-regulator.c-205-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/axp20x-regulator.c=1553=static int axp20x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/axp20x-regulator.c-1689-\ndrivers/regulator/axp20x-regulator.c:1690:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/axp20x-regulator.c-1691-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/axp20x-regulator.c-1733-\t\t\t\t AXP22X_MISC_N_VBUSEN_FUNC, 0);\ndrivers/regulator/axp20x-regulator.c:1734:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/axp20x-regulator.c-1735-\t\t\t\t\t \u0026axp22x_drivevbus_regulator,\n--\ndrivers/regulator/bcm590xx-regulator.c=1098=static int bcm590xx_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bcm590xx-regulator.c-1153-\ndrivers/regulator/bcm590xx-regulator.c:1154:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/bcm590xx-regulator.c-1155-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd71815-regulator.c=561=static int bd7181x_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd71815-regulator.c-599-\ndrivers/regulator/bd71815-regulator.c:600:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/bd71815-regulator.c-601-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/bd71828-regulator.c=1622=static int bd71828_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd71828-regulator.c-1670-\t\tconfig.driver_data = rd;\ndrivers/regulator/bd71828-regulator.c:1671:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/bd71828-regulator.c-1672-\t\t\t\t\t \u0026rd-\u003edesc, \u0026config);\n--\ndrivers/regulator/bd718x7-regulator.c=1673=static int bd718xx_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd718x7-regulator.c-1770-\ndrivers/regulator/bd718x7-regulator.c:1771:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/bd718x7-regulator.c-1772-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/bd9571mwv-regulator.c=273=static int bd9571mwv_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd9571mwv-regulator.c-299-\t\t\tcontinue;\ndrivers/regulator/bd9571mwv-regulator.c:300:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regulators[i],\ndrivers/regulator/bd9571mwv-regulator.c-301-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd9576-regulator.c=897=static int bd957x_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd9576-regulator.c-1035-\ndrivers/regulator/bd9576-regulator.c:1036:\t\tr-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, desc,\ndrivers/regulator/bd9576-regulator.c-1037-\t\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd96801-regulator.c=1210=static int bd96801_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd96801-regulator.c-1267-\ndrivers/regulator/bd96801-regulator.c:1268:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/bd96801-regulator.c-1269-\t\t\t\t\t \u0026rdesc[i].desc, \u0026config);\n--\ndrivers/regulator/bq257xx-regulator.c=142=static int bq257xx_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bq257xx-regulator.c-164-\ndrivers/regulator/bq257xx-regulator.c:165:\tpdata-\u003ebq257xx_reg = devm_regulator_register(dev, \u0026pdata-\u003edesc, \u0026cfg);\ndrivers/regulator/bq257xx-regulator.c-166-\tif (IS_ERR(pdata-\u003ebq257xx_reg)) {\n--\ndrivers/regulator/core.c=1784=static int register_regulator_event_forwarding(struct regulator_dev *rdev)\n--\ndrivers/regulator/core.c-1795-\ndrivers/regulator/core.c:1796:\tret = regulator_register_notifier(rdev-\u003esupply, \u0026rdev-\u003esupply_fwd_nb);\ndrivers/regulator/core.c-1797-\tif (ret) {\n--\ndrivers/regulator/core.c=2700=EXPORT_SYMBOL_GPL(regulator_put);\n--\ndrivers/regulator/core.c-2702-/**\ndrivers/regulator/core.c:2703: * regulator_register_supply_alias - Provide device alias for supply lookup\ndrivers/regulator/core.c-2704- *\n--\ndrivers/regulator/core.c-2715- */\ndrivers/regulator/core.c:2716:int regulator_register_supply_alias(struct device *dev, const char *id,\ndrivers/regulator/core.c-2717-\t\t\t\t struct device *alias_dev,\n--\ndrivers/regulator/core.c-2745-}\ndrivers/regulator/core.c:2746:EXPORT_SYMBOL_GPL(regulator_register_supply_alias);\ndrivers/regulator/core.c-2747-\n--\ndrivers/regulator/core.c=2787=int regulator_bulk_register_supply_alias(struct device *dev,\n--\ndrivers/regulator/core.c-2796-\tfor (i = 0; i \u003c num_id; ++i) {\ndrivers/regulator/core.c:2797:\t\tret = regulator_register_supply_alias(dev, id[i], alias_dev,\ndrivers/regulator/core.c-2798-\t\t\t\t\t\t alias_id[i]);\n--\ndrivers/regulator/core.c=5268=EXPORT_SYMBOL_GPL(regulator_allow_bypass);\n--\ndrivers/regulator/core.c-5270-/**\ndrivers/regulator/core.c:5271: * regulator_register_notifier - register regulator event notifier\ndrivers/regulator/core.c-5272- * @regulator: regulator source\n--\ndrivers/regulator/core.c-5278- */\ndrivers/regulator/core.c:5279:int regulator_register_notifier(struct regulator *regulator,\ndrivers/regulator/core.c-5280-\t\t\t struct notifier_block *nb)\n--\ndrivers/regulator/core.c-5284-}\ndrivers/regulator/core.c:5285:EXPORT_SYMBOL_GPL(regulator_register_notifier);\ndrivers/regulator/core.c-5286-\n--\ndrivers/regulator/core.c=5987=static struct regulator_coupler generic_regulator_coupler = {\n--\ndrivers/regulator/core.c-5991-/**\ndrivers/regulator/core.c:5992: * regulator_register - register regulator\ndrivers/regulator/core.c-5993- * @dev: the device that drive the regulator\n--\ndrivers/regulator/core.c=6002=struct regulator_dev *\ndrivers/regulator/core.c:6003:regulator_register(struct device *dev,\ndrivers/regulator/core.c-6004-\t\t const struct regulator_desc *regulator_desc,\n--\ndrivers/regulator/core.c-6281-}\ndrivers/regulator/core.c:6282:EXPORT_SYMBOL_GPL(regulator_register);\ndrivers/regulator/core.c-6283-\n--\ndrivers/regulator/cpcap-regulator.c=602=static int cpcap_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/cpcap-regulator.c-642-\t\tconfig.driver_data = (void *)regulator;\ndrivers/regulator/cpcap-regulator.c:643:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/cpcap-regulator.c-644-\t\t\t\t\t \u0026regulator-\u003erdesc,\n--\ndrivers/regulator/cros-ec-regulator.c=157=static int cros_ec_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/cros-ec-regulator.c-196-\ndrivers/regulator/cros-ec-regulator.c:197:\tdrvdata-\u003edev = devm_regulator_register(dev, \u0026drvdata-\u003edesc, \u0026cfg);\ndrivers/regulator/cros-ec-regulator.c-198-\tif (IS_ERR(drvdata-\u003edev)) {\n--\ndrivers/regulator/da903x-regulator.c=430=static int da903x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da903x-regulator.c-459-\ndrivers/regulator/da903x-regulator.c:460:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026ri-\u003edesc, \u0026config);\ndrivers/regulator/da903x-regulator.c-461-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/da9052-regulator.c=393=static int da9052_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9052-regulator.c-422-\ndrivers/regulator/da9052-regulator.c:423:\tregulator-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/da9052-regulator.c-424-\t\t\t\t\t\t \u0026regulator-\u003einfo-\u003ereg_desc,\n--\ndrivers/regulator/da9055-regulator.c=508=static int da9055_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9055-regulator.c-538-\ndrivers/regulator/da9055-regulator.c:539:\tregulator-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/da9055-regulator.c-540-\t\t\t\t\t\t \u0026regulator-\u003einfo-\u003ereg_desc,\n--\ndrivers/regulator/da9062-regulator.c=920=static int da9062_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9062-regulator.c-1003-\ndrivers/regulator/da9062-regulator.c:1004:\t\tregl-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regl-\u003edesc,\ndrivers/regulator/da9062-regulator.c-1005-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/da9063-regulator.c=882=static int da9063_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9063-regulator.c-1032-\ndrivers/regulator/da9063-regulator.c:1033:\t\tregl-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regl-\u003edesc,\ndrivers/regulator/da9063-regulator.c-1034-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/da9121-regulator.c=776=static int da9121_set_regulator_config(struct da9121 *chip)\n--\ndrivers/regulator/da9121-regulator.c-790-\ndrivers/regulator/da9121-regulator.c:791:\t\tchip-\u003erdev[i] = devm_regulator_register(chip-\u003edev,\ndrivers/regulator/da9121-regulator.c-792-\t\t\t\t\tregl_desc, \u0026config);\n--\ndrivers/regulator/da9210-regulator.c=130=static int da9210_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/da9210-regulator.c-166-\ndrivers/regulator/da9210-regulator.c:167:\trdev = devm_regulator_register(\u0026i2c-\u003edev, \u0026da9210_reg, \u0026config);\ndrivers/regulator/da9210-regulator.c-168-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/da9211-regulator.c=379=static int da9211_regulator_init(struct da9211 *chip)\n--\ndrivers/regulator/da9211-regulator.c-421-\t\t\tdevm_gpiod_unhinge(chip-\u003edev, config.ena_gpiod);\ndrivers/regulator/da9211-regulator.c:422:\t\tchip-\u003erdev[i] = devm_regulator_register(chip-\u003edev,\ndrivers/regulator/da9211-regulator.c-423-\t\t\t\u0026da9211_regulators[i], \u0026config);\n--\ndrivers/regulator/db8500-prcmu.c=437=static int db8500_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/db8500-prcmu.c-455-\ndrivers/regulator/db8500-prcmu.c:456:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/db8500-prcmu.c-457-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/devres.c=449=static void devm_rdev_release(struct device *dev, void *res)\n--\ndrivers/regulator/devres.c-454-/**\ndrivers/regulator/devres.c:455: * devm_regulator_register - Resource managed regulator_register()\ndrivers/regulator/devres.c-456- * @dev: device to supply\n--\ndrivers/regulator/devres.c-464- */\ndrivers/regulator/devres.c:465:struct regulator_dev *devm_regulator_register(struct device *dev,\ndrivers/regulator/devres.c-466-\t\t\t\t const struct regulator_desc *regulator_desc,\n--\ndrivers/regulator/devres.c-475-\ndrivers/regulator/devres.c:476:\trdev = regulator_register(dev, regulator_desc, config);\ndrivers/regulator/devres.c-477-\tif (!IS_ERR(rdev)) {\n--\ndrivers/regulator/devres.c-485-}\ndrivers/regulator/devres.c:486:EXPORT_SYMBOL_GPL(devm_regulator_register);\ndrivers/regulator/devres.c-487-\n--\ndrivers/regulator/devres.c=502=static void devm_regulator_destroy_supply_alias(struct device *dev, void *res)\n--\ndrivers/regulator/devres.c-509-/**\ndrivers/regulator/devres.c:510: * devm_regulator_register_supply_alias - Resource managed\ndrivers/regulator/devres.c:511: * regulator_register_supply_alias()\ndrivers/regulator/devres.c-512- *\n--\ndrivers/regulator/devres.c-521- */\ndrivers/regulator/devres.c:522:int devm_regulator_register_supply_alias(struct device *dev, const char *id,\ndrivers/regulator/devres.c-523-\t\t\t\t\t struct device *alias_dev,\n--\ndrivers/regulator/devres.c-537-\ndrivers/regulator/devres.c:538:\tret = regulator_register_supply_alias(dev, id, alias_dev, alias_id);\ndrivers/regulator/devres.c-539-\tif (ret \u003c 0) {\n--\ndrivers/regulator/devres.c-547-}\ndrivers/regulator/devres.c:548:EXPORT_SYMBOL_GPL(devm_regulator_register_supply_alias);\ndrivers/regulator/devres.c-549-\n--\ndrivers/regulator/devres.c=584=int devm_regulator_bulk_register_supply_alias(struct device *dev,\n--\ndrivers/regulator/devres.c-593-\tfor (i = 0; i \u003c num_id; ++i) {\ndrivers/regulator/devres.c:594:\t\tret = devm_regulator_register_supply_alias(dev, id[i],\ndrivers/regulator/devres.c-595-\t\t\t\t\t\t\t alias_dev,\n--\ndrivers/regulator/devres.c=629=static void devm_regulator_destroy_notifier(struct device *dev, void *res)\n--\ndrivers/regulator/devres.c-636-/**\ndrivers/regulator/devres.c:637: * devm_regulator_register_notifier - Resource managed\ndrivers/regulator/devres.c:638: * regulator_register_notifier\ndrivers/regulator/devres.c-639- *\n--\ndrivers/regulator/devres.c-645- */\ndrivers/regulator/devres.c:646:int devm_regulator_register_notifier(struct regulator *regulator,\ndrivers/regulator/devres.c-647-\t\t\t\t struct notifier_block *nb)\n--\ndrivers/regulator/devres.c-660-\ndrivers/regulator/devres.c:661:\tret = regulator_register_notifier(regulator, nb);\ndrivers/regulator/devres.c-662-\tif (ret \u003c 0) {\n--\ndrivers/regulator/devres.c-670-}\ndrivers/regulator/devres.c:671:EXPORT_SYMBOL_GPL(devm_regulator_register_notifier);\ndrivers/regulator/devres.c-672-\n--\ndrivers/regulator/devres.c-679- *\ndrivers/regulator/devres.c:680: * Unregister a notifier registered with devm_regulator_register_notifier().\ndrivers/regulator/devres.c-681- * Normally this function will not need to be called and the resource\n--\ndrivers/regulator/dummy.c=40=static int dummy_regulator_probe(struct faux_device *fdev)\n--\ndrivers/regulator/dummy.c-47-\ndrivers/regulator/dummy.c:48:\tdummy_regulator_rdev = devm_regulator_register(\u0026fdev-\u003edev, \u0026dummy_desc,\ndrivers/regulator/dummy.c-49-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/fan53555.c=608=static void fan53555_device_mode_map_setup(struct fan53555_device_info *di)\n--\ndrivers/regulator/fan53555.c-618-\ndrivers/regulator/fan53555.c:619:static int fan53555_regulator_register(struct fan53555_device_info *di,\ndrivers/regulator/fan53555.c-620-\t\t\tstruct regulator_config *config)\n--\ndrivers/regulator/fan53555.c-642-\ndrivers/regulator/fan53555.c:643:\trdev = devm_regulator_register(di-\u003edev, \u0026di-\u003edesc, config);\ndrivers/regulator/fan53555.c-644-\treturn PTR_ERR_OR_ZERO(rdev);\n--\ndrivers/regulator/fan53555.c=704=static int fan53555_regulator_probe(struct i2c_client *client)\n--\ndrivers/regulator/fan53555.c-776-\ndrivers/regulator/fan53555.c:777:\tret = fan53555_regulator_register(di, \u0026config);\ndrivers/regulator/fan53555.c-778-\tif (ret \u003c 0)\n--\ndrivers/regulator/fan53880.c=117=static int fan53880_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/fan53880.c-145-\tfor (i = 0; i \u003c ARRAY_SIZE(fan53880_regulators); i++) {\ndrivers/regulator/fan53880.c:146:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev,\ndrivers/regulator/fan53880.c-147-\t\t\t\t\t \u0026fan53880_regulators[i],\n--\ndrivers/regulator/fixed-helper.c=14=static void regulator_fixed_release(struct device *dev)\n--\ndrivers/regulator/fixed-helper.c-22-/**\ndrivers/regulator/fixed-helper.c:23: * regulator_register_always_on - register an always-on regulator with a fixed name\ndrivers/regulator/fixed-helper.c-24- * @id: platform device id\n--\ndrivers/regulator/fixed-helper.c-31- */\ndrivers/regulator/fixed-helper.c:32:struct platform_device *regulator_register_always_on(int id, const char *name,\ndrivers/regulator/fixed-helper.c-33-\tstruct regulator_consumer_supply *supplies, int num_supplies, int uv)\n--\ndrivers/regulator/fixed.c=218=static int reg_fixed_voltage_probe(struct platform_device *pdev)\n--\ndrivers/regulator/fixed.c-326-\ndrivers/regulator/fixed.c:327:\tdrvdata-\u003edev = devm_regulator_register(\u0026pdev-\u003edev, \u0026drvdata-\u003edesc,\ndrivers/regulator/fixed.c-328-\t\t\t\t\t \u0026cfg);\n--\ndrivers/regulator/fp9931.c=402=static int fp9931_probe(struct i2c_client *client)\n--\ndrivers/regulator/fp9931.c-478-\tfor (i = 0; i \u003c ARRAY_SIZE(regulators); i++) {\ndrivers/regulator/fp9931.c:479:\t\trdev = devm_regulator_register(\u0026client-\u003edev, \u0026regulators[i],\ndrivers/regulator/fp9931.c-480-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/gpio-regulator.c=234=static int gpio_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/gpio-regulator.c-346-\ndrivers/regulator/gpio-regulator.c:347:\trdev = devm_regulator_register(dev, \u0026drvdata-\u003edesc, \u0026cfg);\ndrivers/regulator/gpio-regulator.c-348-\tif (IS_ERR(rdev))\n--\ndrivers/regulator/hi6421-regulator.c=538=static int hi6421_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/hi6421-regulator.c-559-\ndrivers/regulator/hi6421-regulator.c:560:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/hi6421-regulator.c-561-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/hi6421v530-regulator.c=159=static int hi6421v530_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/hi6421v530-regulator.c-175-\ndrivers/regulator/hi6421v530-regulator.c:176:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/hi6421v530-regulator.c-177-\t\t\t\t\u0026hi6421v530_regulator_info[i].rdesc,\n--\ndrivers/regulator/hi6421v600-regulator.c=233=static int hi6421_spmi_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/hi6421v600-regulator.c-265-\ndrivers/regulator/hi6421v600-regulator.c:266:\t\trdev = devm_regulator_register(dev, \u0026info-\u003edesc, \u0026config);\ndrivers/regulator/hi6421v600-regulator.c-267-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/hi655x-regulator.c=169=static int hi655x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/hi655x-regulator.c-186-\ndrivers/regulator/hi655x-regulator.c:187:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/hi655x-regulator.c-188-\t\t\t\t\t \u0026regulators[i].rdesc,\n--\ndrivers/regulator/isl6271a-regulator.c=100=static int isl6271a_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/isl6271a-regulator.c-127-\ndrivers/regulator/isl6271a-regulator.c:128:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev, \u0026isl_rd[i], \u0026config);\ndrivers/regulator/isl6271a-regulator.c-129-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/isl9305.c=140=static int isl9305_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/isl9305.c-162-\ndrivers/regulator/isl9305.c:163:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev,\ndrivers/regulator/isl9305.c-164-\t\t\t\t\t \u0026isl9305_regulators[i],\n--\ndrivers/regulator/lm363x-regulator.c=312=static int lm363x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/lm363x-regulator.c-343-\ndrivers/regulator/lm363x-regulator.c:344:\trdev = devm_regulator_register(dev, \u0026lm363x_regulator_desc[id], \u0026cfg);\ndrivers/regulator/lm363x-regulator.c-345-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/lochnagar-regulator.c=240=static int lochnagar_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/lochnagar-regulator.c-256-\ndrivers/regulator/lochnagar-regulator.c:257:\trdev = devm_regulator_register(dev, desc, \u0026config);\ndrivers/regulator/lochnagar-regulator.c-258-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/lp3971.c=375=static int setup_regulators(struct lp3971 *lp3971,\n--\ndrivers/regulator/lp3971.c-389-\ndrivers/regulator/lp3971.c:390:\t\trdev = devm_regulator_register(lp3971-\u003edev,\ndrivers/regulator/lp3971.c-391-\t\t\t\t\t \u0026regulators[reg-\u003eid], \u0026config);\n--\ndrivers/regulator/lp3972.c=470=static int setup_regulators(struct lp3972 *lp3972,\n--\ndrivers/regulator/lp3972.c-484-\ndrivers/regulator/lp3972.c:485:\t\trdev = devm_regulator_register(lp3972-\u003edev,\ndrivers/regulator/lp3972.c-486-\t\t\t\t\t \u0026regulators[reg-\u003eid], \u0026config);\n--\ndrivers/regulator/lp872x.c=745=static struct regulator_init_data\n--\ndrivers/regulator/lp872x.c-761-\ndrivers/regulator/lp872x.c:762:static int lp872x_regulator_register(struct lp872x *lp)\ndrivers/regulator/lp872x.c-763-{\n--\ndrivers/regulator/lp872x.c-777-\ndrivers/regulator/lp872x.c:778:\t\trdev = devm_regulator_register(lp-\u003edev, desc, \u0026cfg);\ndrivers/regulator/lp872x.c-779-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/lp872x.c=881=static int lp872x_probe(struct i2c_client *cl)\n--\ndrivers/regulator/lp872x.c-926-\ndrivers/regulator/lp872x.c:927:\treturn lp872x_regulator_register(lp);\ndrivers/regulator/lp872x.c-928-}\n--\ndrivers/regulator/lp873x-regulator.c=155=static int lp873x_regulator_probe(struct platform_device *pdev)\n--\n\n"
} |
| 17/2 | 2026/09/19 15:09 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 21811 output: 34 thoughts: 39 Thoughts: **Analyzing the Dummy Regulator Probe** Okay, here we go. My attention is drawn to `dummy_regulator_probe` located in `drivers/regulator/dummy.c`. That's where I need to start. The `dummy` regulator driver is likely a simplified implementation, useful for testing or providing a baseline for more complex regulator interactions. Therefore, to understand this component, I need to open and analyze `drivers/regulator/dummy.c`. That's the next step; I'll dive into the code itself to see how it's structured, what it's doing, and how it interacts with the broader regulator framework. This probe function should give me the initial entry point. |
| 18/2 | 2026/09/19 15:09 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/dummy.c",
"FirstLine": 1,
"LineCount": 70
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0-or-later\n 2:\t/*\n 3:\t * dummy.c\n 4:\t *\n 5:\t * Copyright 2010 Wolfson Microelectronics PLC.\n 6:\t *\n 7:\t * Author: Mark Brown \u003cbroonie@opensource.wolfsonmicro.com\u003e\n 8:\t *\n 9:\t * This is useful for systems with mixed controllable and\n 10:\t * non-controllable regulators, as well as for allowing testing on\n 11:\t * systems with no controllable regulators.\n 12:\t */\n 13:\t\n 14:\t#include \u003clinux/err.h\u003e\n 15:\t#include \u003clinux/export.h\u003e\n 16:\t#include \u003clinux/device/faux.h\u003e\n 17:\t#include \u003clinux/regulator/driver.h\u003e\n 18:\t#include \u003clinux/regulator/machine.h\u003e\n 19:\t\n 20:\t#include \"dummy.h\"\n 21:\t\n 22:\tstruct regulator_dev *dummy_regulator_rdev;\n 23:\t\n 24:\tstatic const struct regulator_init_data dummy_initdata = {\n 25:\t\t.constraints = {\n 26:\t\t\t.always_on = 1,\n 27:\t\t},\n 28:\t};\n 29:\t\n 30:\tstatic const struct regulator_ops dummy_ops;\n 31:\t\n 32:\tstatic const struct regulator_desc dummy_desc = {\n 33:\t\t.name = \"regulator-dummy\",\n 34:\t\t.id = -1,\n 35:\t\t.type = REGULATOR_VOLTAGE,\n 36:\t\t.owner = THIS_MODULE,\n 37:\t\t.ops = \u0026dummy_ops,\n 38:\t};\n 39:\t\n 40:\tstatic int dummy_regulator_probe(struct faux_device *fdev)\n 41:\t{\n 42:\t\tstruct regulator_config config = { };\n 43:\t\tint ret;\n 44:\t\n 45:\t\tconfig.dev = \u0026fdev-\u003edev;\n 46:\t\tconfig.init_data = \u0026dummy_initdata;\n 47:\t\n 48:\t\tdummy_regulator_rdev = devm_regulator_register(\u0026fdev-\u003edev, \u0026dummy_desc,\n 49:\t\t\t\t\t\t\t \u0026config);\n 50:\t\tif (IS_ERR(dummy_regulator_rdev)) {\n 51:\t\t\tret = PTR_ERR(dummy_regulator_rdev);\n 52:\t\t\tpr_err(\"Failed to register regulator: %d\\n\", ret);\n 53:\t\t\treturn ret;\n 54:\t\t}\n 55:\t\n 56:\t\treturn 0;\n 57:\t}\n 58:\t\n 59:\tstatic struct faux_device_ops dummy_regulator_driver = {\n 60:\t\t.probe = dummy_regulator_probe,\n 61:\t};\n 62:\t\n 63:\tstatic struct faux_device *dummy_fdev;\n 64:\t\n 65:\tvoid __init regulator_dummy_init(void)\n 66:\t{\n 67:\t\tdummy_fdev = faux_device_create(\"reg-dummy\", NULL, \u0026dummy_regulator_driver);\n 68:\t\tif (!dummy_fdev) {\n 69:\t\t\tpr_err(\"Failed to allocate dummy regulator device\\n\");\n 70:\t\t\treturn;\n"
} |
| 19/2 | 2026/09/19 15:09 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 22937 output: 37 thoughts: 108 Thoughts: **Digging Deeper into Regulator Supply Resolution** Okay, so I need to understand how this `regulator_resolve_supply` function and regulators in general are being used. Where else are they calling `regulator_resolve_supply`? Specifically, I'm thinking about the recursive nature of this function. I need to understand when this function is actually called. Let's start with the calls within the `drivers/regulator/core.c` file. Right, I see two instances: a recursive call to `regulator_resolve_supply(r)` itself, which I'll need to unpack, and also within `_regulator_get_common`. That `_regulator_get_common` function looks like a key piece of this puzzle, so I need to go over that with a fine-toothed comb to grasp the whole picture. |
| 20/2 | 2026/09/19 15:09 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2485,
"LineCount": 40
}Results: {
"Contents": "2485:\t\tmutex_lock(\u0026regulator_list_mutex);\n2486:\t\tret = (rdev-\u003ecoupling_desc.n_resolved != rdev-\u003ecoupling_desc.n_coupled);\n2487:\t\tmutex_unlock(\u0026regulator_list_mutex);\n2488:\t\n2489:\t\tif (ret != 0) {\n2490:\t\t\tregulator = ERR_PTR(-EPROBE_DEFER);\n2491:\t\t\tput_device(\u0026rdev-\u003edev);\n2492:\t\t\treturn regulator;\n2493:\t\t}\n2494:\t\n2495:\t\tret = regulator_resolve_supply(rdev);\n2496:\t\tif (ret \u003c 0) {\n2497:\t\t\tregulator = ERR_PTR(ret);\n2498:\t\t\tput_device(\u0026rdev-\u003edev);\n2499:\t\t\treturn regulator;\n2500:\t\t}\n2501:\t\n2502:\t\tif (!try_module_get(rdev-\u003eowner)) {\n2503:\t\t\tregulator = ERR_PTR(-EPROBE_DEFER);\n2504:\t\t\tput_device(\u0026rdev-\u003edev);\n2505:\t\t\treturn regulator;\n2506:\t\t}\n2507:\t\n2508:\t\tregulator_lock(rdev);\n2509:\t\tregulator = create_regulator(rdev, dev, id);\n2510:\t\tregulator_unlock(rdev);\n2511:\t\tif (regulator == NULL) {\n2512:\t\t\tregulator = ERR_PTR(-ENOMEM);\n2513:\t\t\tmodule_put(rdev-\u003eowner);\n2514:\t\t\tput_device(\u0026rdev-\u003edev);\n2515:\t\t\treturn regulator;\n2516:\t\t}\n2517:\t\n2518:\t\tlink_and_create_debugfs(regulator, rdev, dev);\n2519:\t\n2520:\t\trdev-\u003eopen_count++;\n2521:\t\tif (get_type == EXCLUSIVE_GET) {\n2522:\t\t\trdev-\u003eexclusive = 1;\n2523:\t\n2524:\t\t\tret = _regulator_is_enabled(rdev);\n"
} |
| 21/2 | 2026/09/19 15:09 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 23850 output: 37 thoughts: 100 Thoughts: **My Internal Regulator Logic** Okay, so I'm thinking about how the regulator framework in the kernel is structured. Specifically, `_regulator_get_common` seems to be the core, the internal workhorse, behind the more user-friendly functions like `regulator_get` and `regulator_get_optional`. Pretty standard design, hiding the complexity behind a clean interface. And honestly, it makes sense. I can recall countless device drivers, things like USB controllers, audio codecs, PCI devices, and MMC interfaces, all leaning on `regulator_get` to power their components. That alone highlights the critical role this plays in the system. Now, as I'm tracing the flow, I'm going to jump into `regulator_register`. I want to see how the regulators are initially set up, so I'm looking at lines 6170-6230 in `drivers/regulator/core.c`. |
| 22/2 | 2026/09/19 15:09 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 6170,
"LineCount": 60
}Results: {
"Contents": "6170:\t\t\t * when creating -SUPPLY symlink in sysfs to a regulator\n6171:\t\t\t * that is just being created\n6172:\t\t\t */\n6173:\t\t\trdev_dbg(rdev, \"will resolve supply early: %s\\n\",\n6174:\t\t\t\t rdev-\u003esupply_name);\n6175:\t\t\tret = regulator_resolve_supply(rdev);\n6176:\t\t\tif (!ret)\n6177:\t\t\t\tret = set_machine_constraints(rdev, false);\n6178:\t\t\telse\n6179:\t\t\t\trdev_dbg(rdev, \"unable to resolve supply early: %pe\\n\",\n6180:\t\t\t\t\t ERR_PTR(ret));\n6181:\t\t\ttried_supply_resolve = true;\n6182:\t\t}\n6183:\t\tif (ret \u003c 0) {\n6184:\t\t\tif (ret != -EPROBE_DEFER)\n6185:\t\t\t\tgoto wash;\n6186:\t\t\trdev-\u003econstraints_pending = true;\n6187:\t\t}\n6188:\t\n6189:\t\tret = regulator_init_coupling(rdev);\n6190:\t\tif (ret \u003c 0)\n6191:\t\t\tgoto wash;\n6192:\t\n6193:\t\t/* add consumers devices */\n6194:\t\tif (init_data) {\n6195:\t\t\tfor (i = 0; i \u003c init_data-\u003enum_consumer_supplies; i++) {\n6196:\t\t\t\tret = set_consumer_device_supply(rdev,\n6197:\t\t\t\t\tinit_data-\u003econsumer_supplies[i].dev_name,\n6198:\t\t\t\t\tinit_data-\u003econsumer_supplies[i].supply);\n6199:\t\t\t\tif (ret \u003c 0) {\n6200:\t\t\t\t\tdev_err(dev, \"Failed to set supply %s\\n\",\n6201:\t\t\t\t\t\tinit_data-\u003econsumer_supplies[i].supply);\n6202:\t\t\t\t\tgoto unset_supplies;\n6203:\t\t\t\t}\n6204:\t\t\t}\n6205:\t\t}\n6206:\t\n6207:\t\tif (!rdev-\u003edesc-\u003eops-\u003eget_voltage \u0026\u0026\n6208:\t\t !rdev-\u003edesc-\u003eops-\u003elist_voltage \u0026\u0026\n6209:\t\t !rdev-\u003edesc-\u003efixed_uV)\n6210:\t\t\trdev-\u003eis_switch = true;\n6211:\t\n6212:\t\tret = device_add(\u0026rdev-\u003edev);\n6213:\t\tif (ret != 0)\n6214:\t\t\tgoto unset_supplies;\n6215:\t\n6216:\t\tif (!tried_supply_resolve) {\n6217:\t\t\t/*\n6218:\t\t\t * As an optimisation, try to resolve our supply (if any) now to\n6219:\t\t\t * avoid adding the bus device. Errors are not fatal at this\n6220:\t\t\t * stage, we'll simply try again later.\n6221:\t\t\t */\n6222:\t\t\tret = regulator_resolve_supply(rdev);\n6223:\t\t\tif (ret)\n6224:\t\t\t\trdev_dbg(rdev,\n6225:\t\t\t\t\t \"unable to resolve supply (ignoring): %pe\\n\",\n6226:\t\t\t\t\t ERR_PTR(ret));\n6227:\t\t}\n6228:\t\n6229:\t\t/*\n"
} |
| 23/2 | 2026/09/19 15:09 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25076 output: 37 thoughts: 40 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience: **Diving into Regulator Bus Probing** Right, so we're looking at `regulator_bus_probe`. Immediately, I'm thinking about the standard regulator initialization flow. Let's see what's happening at lines 6400-6420 in `drivers/regulator/core.c`. I expect to find the core logic involved in enumerating and probing regulators connected to a specific bus. I'm especially curious about how it handles the initial device enumeration, the matching of regulators to their associated devices (if any), and possibly the handling of any power sequencing or voltage control at this early stage. I'll need to check how it deals with device-specific properties, and if it's following the typical regulator framework's rules. I'm keen to see if it makes assumptions about the hardware, or if it's generic to all regulators. |
| 24/2 | 2026/09/19 15:09 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 6400,
"LineCount": 30
}Results: {
"Contents": "6400:\t\t\t\t const struct device_driver *drv)\n6401:\t{\n6402:\t\t/* Match always succeeds, we only have one driver */\n6403:\t\treturn 1;\n6404:\t}\n6405:\t\n6406:\tstatic int regulator_bus_probe(struct device *bdev)\n6407:\t{\n6408:\t\tstruct regulator_dev *rdev = bdev_to_rdev(bdev);\n6409:\t\tint ret;\n6410:\t\n6411:\t\tret = regulator_resolve_supply(rdev);\n6412:\t\tif (ret)\n6413:\t\t\trdev_dbg(rdev,\n6414:\t\t\t\t \"unable to resolve supply or constraints '%s': %pe\\n\",\n6415:\t\t\t\t rdev-\u003esupply_name, ERR_PTR(ret));\n6416:\t\telse\n6417:\t\t\trdev_dbg(rdev, \"resolved supply '%s'\\n\", rdev-\u003esupply_name);\n6418:\t\n6419:\t\treturn ret;\n6420:\t}\n6421:\t\n6422:\tstatic const struct bus_type regulator_bus = {\n6423:\t\t.name = \"regulator\",\n6424:\t\t.match = regulator_bus_match,\n6425:\t\t.probe = regulator_bus_probe,\n6426:\t};\n6427:\t\n6428:\tstatic struct device_driver regulator_bus_driver = {\n6429:\t\t.name = \"regulator-bus-drv\",\n"
} |
| 25/2 | 2026/09/19 15:09 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25783 output: 36 thoughts: 21 Thoughts: Here's my thought process, as if I were considering this question: **USB Device Regulator Inquiry** Okay, hold on a second... Could it be possible for a USB device to actually register a regulator itself? That's not something I've typically seen, but it's an interesting question that deserves a closer look. I'm going to quickly check the USB driver code – is there anything in there that explicitly registers a regulator? Let's see if any existing USB drivers have that capability built in. This requires diving into the kernel code and seeing how these drivers handle power management. I'm especially interested in looking at the USB device driver framework and seeing if anything's exposed. I need to understand whether this is something the USB stack supports, or if I’m barking up the wrong tree. This warrants a more in-depth code review! |
| 26/2 | 2026/09/19 15:10 | tool | grepper |
0mArgs:{
"Expression": "devm_regulator_register|regulator_register",
"PathPrefix": "drivers/usb/"
}Results: {
"Output": "drivers/usb/host/ohci-da8xx.c=198=static int ohci_da8xx_register_notify(struct usb_hcd *hcd)\n--\ndrivers/usb/host/ohci-da8xx.c-205-\t\tda8xx_ohci-\u003enb.notifier_call = ohci_da8xx_regulator_event;\ndrivers/usb/host/ohci-da8xx.c:206:\t\tret = devm_regulator_register_notifier(da8xx_ohci-\u003evbus_reg,\ndrivers/usb/host/ohci-da8xx.c-207-\t\t\t\t\t\t\u0026da8xx_ohci-\u003enb);\n"
} |
| 27/2 | 2026/09/19 15:10 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26197 output: 26 thoughts: 26 Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue: **Investigating Regulator Dependencies** Hmm, this issue with the regulator – it's got me thinking. We've got the immediate problem, but let's zoom out. What about the other drivers and subsystems that might be relying on this regulator functionality? We can't just fix it in isolation; we need to understand the ripple effect. My first thought is, where *exactly* is `regulator_register` being called within the kernel? I need the full picture, a comprehensive map of all the dependencies. No point just poking around the immediate area. Time to fire up the search tools and get a list of all call sites. That should give me a solid starting point for tracing the issue and any potential side effects. Knowing the upstream dependencies is key to a robust fix here. |
| 28/2 | 2026/09/19 15:10 | tool | grepper |
0mArgs:{
"Expression": "\\b(devm_)?regulator_register\\("
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1522 lines.\nUse more precise expression if possible.\n\nDocumentation/driver-api/driver-model/devres.rst=422=REGULATOR\n--\nDocumentation/driver-api/driver-model/devres.rst-435- devm_regulator_put()\nDocumentation/driver-api/driver-model/devres.rst:436: devm_regulator_register()\nDocumentation/driver-api/driver-model/devres.rst-437- devm_regulator_register_notifier()\n--\nDocumentation/power/regulator/regulator.rst=12=Drivers can register a regulator by calling::\nDocumentation/power/regulator/regulator.rst-13-\nDocumentation/power/regulator/regulator.rst:14: struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,\nDocumentation/power/regulator/regulator.rst-15-\t\t\t\t\t const struct regulator_config *config);\n--\ndrivers/hwmon/pmbus/pmbus_core.c=3475=static int pmbus_regulator_register(struct pmbus_data *data)\n--\ndrivers/hwmon/pmbus/pmbus_core.c-3495-\ndrivers/hwmon/pmbus/pmbus_core.c:3496:\t\tdata-\u003erdevs[i] = devm_regulator_register(dev, \u0026info-\u003ereg_desc[i],\ndrivers/hwmon/pmbus/pmbus_core.c-3497-\t\t\t\t\t\t\t \u0026config);\n--\ndrivers/iio/adc/ad7768-1.c=1637=static int ad7768_register_vcm_regulator(struct device *dev,\n--\ndrivers/iio/adc/ad7768-1.c-1652-\ndrivers/iio/adc/ad7768-1.c:1653:\tst-\u003evcm_rdev = devm_regulator_register(dev, \u0026vcm_desc, \u0026config);\ndrivers/iio/adc/ad7768-1.c-1654-\tif (IS_ERR(st-\u003evcm_rdev))\n--\ndrivers/mmc/host/renesas_sdhi_core.c=1055=int renesas_sdhi_probe(struct platform_device *pdev,\n--\ndrivers/mmc/host/renesas_sdhi_core.c-1214-\t\trcfg.driver_data = priv-\u003ehost;\ndrivers/mmc/host/renesas_sdhi_core.c:1215:\t\trdev = devm_regulator_register(dev, \u0026renesas_sdhi_vqmmc_regulator, \u0026rcfg);\ndrivers/mmc/host/renesas_sdhi_core.c-1216-\t\tof_node_put(rcfg.of_node);\n--\ndrivers/net/phy/qcom/at803x.c=749=static int at8031_register_regulators(struct phy_device *phydev)\n--\ndrivers/net/phy/qcom/at803x.c-757-\ndrivers/net/phy/qcom/at803x.c:758:\tpriv-\u003evddio_rdev = devm_regulator_register(dev, \u0026vddio_desc, \u0026config);\ndrivers/net/phy/qcom/at803x.c-759-\tif (IS_ERR(priv-\u003evddio_rdev)) {\n--\ndrivers/net/phy/qcom/at803x.c-763-\ndrivers/net/phy/qcom/at803x.c:764:\tpriv-\u003evddh_rdev = devm_regulator_register(dev, \u0026vddh_desc, \u0026config);\ndrivers/net/phy/qcom/at803x.c-765-\tif (IS_ERR(priv-\u003evddh_rdev)) {\n--\ndrivers/net/pse-pd/pd692x0.c=939=pd692x0_register_manager_regulator(struct device *dev, char *reg_name,\n--\ndrivers/net/pse-pd/pd692x0.c-966-\ndrivers/net/pse-pd/pd692x0.c:967:\trdev = devm_regulator_register(dev, rdesc, \u0026rconfig);\ndrivers/net/pse-pd/pd692x0.c-968-\tif (IS_ERR(rdev)) {\n--\ndrivers/net/pse-pd/pse_core.c=830=devm_pse_pi_regulator_register(struct pse_controller_dev *pcdev,\n--\ndrivers/net/pse-pd/pse_core.c-868-\ndrivers/net/pse-pd/pse_core.c:869:\trdev = devm_regulator_register(pcdev-\u003edev, rdesc, \u0026rconfig);\ndrivers/net/pse-pd/pse_core.c-870-\tif (IS_ERR(rdev)) {\n--\ndrivers/phy/mediatek/phy-mtk-hdmi.c=78=static int mtk_hdmi_phy_register_regulators(struct mtk_hdmi_phy *hdmi_phy)\n--\ndrivers/phy/mediatek/phy-mtk-hdmi.c-92-\ndrivers/phy/mediatek/phy-mtk-hdmi.c:93:\thdmi_phy-\u003erdev = devm_regulator_register(hdmi_phy-\u003edev, vreg_desc, \u0026vreg_config);\ndrivers/phy/mediatek/phy-mtk-hdmi.c-94-\tif (IS_ERR(hdmi_phy-\u003erdev))\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c=930=static int rcar_gen3_phy_usb2_vbus_regulator_register(struct rcar_gen3_chan *channel)\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-940-\t\trcfg.driver_data = channel;\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c:941:\t\trdev = devm_regulator_register(dev, \u0026rcar_gen3_phy_usb2_regulator,\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-942-\t\t\t\t\t \u0026rcfg);\n--\ndrivers/pinctrl/renesas/pfc-sh73a0.c=4122=static int sh73a0_pinmux_soc_init(struct sh_pfc *pfc)\n--\ndrivers/pinctrl/renesas/pfc-sh73a0.c-4131-\ndrivers/pinctrl/renesas/pfc-sh73a0.c:4132:\tvccq = devm_regulator_register(pfc-\u003edev, \u0026sh73a0_vccq_mc0_desc, \u0026cfg);\ndrivers/pinctrl/renesas/pfc-sh73a0.c-4133-\tif (IS_ERR(vccq)) {\n--\ndrivers/platform/olpc/olpc-ec.c=401=static int olpc_ec_probe(struct platform_device *pdev)\n--\ndrivers/platform/olpc/olpc-ec.c-432-\tec-\u003edcon_enabled = true;\ndrivers/platform/olpc/olpc-ec.c:433:\tregulator = devm_regulator_register(\u0026pdev-\u003edev, \u0026dcon_desc, \u0026config);\ndrivers/platform/olpc/olpc-ec.c-434-\tif (IS_ERR(regulator)) {\n--\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c=188=int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,\n--\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c-243-\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c:244:\tregulator-\u003erdev = regulator_register(int3472-\u003edev, \u0026regulator-\u003erdesc, \u0026cfg);\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c-245-\tif (IS_ERR(regulator-\u003erdev))\n--\ndrivers/power/supply/bq24190_charger.c=720=static int bq24190_register_vbus_regulator(struct bq24190_dev_info *bdi)\n--\ndrivers/power/supply/bq24190_charger.c-732-\tcfg.driver_data = bdi;\ndrivers/power/supply/bq24190_charger.c:733:\treg = devm_regulator_register(bdi-\u003edev, bdi-\u003einfo-\u003evbus_desc, \u0026cfg);\ndrivers/power/supply/bq24190_charger.c-734-\tif (IS_ERR(reg)) {\n--\ndrivers/power/supply/bq25890_charger.c=1243=static int bq25890_register_regulator(struct bq25890_device *bq)\n--\ndrivers/power/supply/bq25890_charger.c-1254-\ndrivers/power/supply/bq25890_charger.c:1255:\treg = devm_regulator_register(bq-\u003edev, \u0026bq25890_vbus_desc, \u0026cfg);\ndrivers/power/supply/bq25890_charger.c-1256-\tif (IS_ERR(reg)) {\n--\ndrivers/power/supply/bq25890_charger.c-1262-\tcfg.init_data = NULL;\ndrivers/power/supply/bq25890_charger.c:1263:\treg = devm_regulator_register(bq-\u003edev, \u0026bq25890_vsys_desc, \u0026cfg);\ndrivers/power/supply/bq25890_charger.c-1264-\tif (IS_ERR(reg)) {\n--\ndrivers/power/supply/max77759_charger.c=684=static int max77759_charger_probe(struct platform_device *pdev)\n--\ndrivers/power/supply/max77759_charger.c-727-\tchgin_otg_reg_cfg.of_node = dev_of_node(dev);\ndrivers/power/supply/max77759_charger.c:728:\tchg-\u003echgin_otg_rdev = devm_regulator_register(dev, \u0026chgin_otg_reg_desc,\ndrivers/power/supply/max77759_charger.c-729-\t\t\t\t\t\t \u0026chgin_otg_reg_cfg);\n--\ndrivers/power/supply/mt6360_charger.c=778=static int mt6360_charger_probe(struct platform_device *pdev)\n--\ndrivers/power/supply/mt6360_charger.c-825-\tconfig.regmap = mci-\u003eregmap;\ndrivers/power/supply/mt6360_charger.c:826:\tmci-\u003eotg_rdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026mt6360_otg_rdesc,\ndrivers/power/supply/mt6360_charger.c-827-\t\t\t\t\t\t\u0026config);\n--\ndrivers/power/supply/mt6370-charger.c=737=static int mt6370_chg_init_otg_regulator(struct mt6370_priv *priv)\n--\ndrivers/power/supply/mt6370-charger.c-744-\ndrivers/power/supply/mt6370-charger.c:745:\tpriv-\u003erdev = devm_regulator_register(priv-\u003edev, \u0026mt6370_chg_otg_rdesc,\ndrivers/power/supply/mt6370-charger.c-746-\t\t\t\t\t \u0026rcfg);\n--\ndrivers/power/supply/qcom_smbb.c=831=static int smbb_charger_probe(struct platform_device *pdev)\n--\ndrivers/power/supply/qcom_smbb.c-958-\ndrivers/power/supply/qcom_smbb.c:959:\tchg-\u003eotg_reg = devm_regulator_register(\u0026pdev-\u003edev, \u0026chg-\u003eotg_rdesc,\ndrivers/power/supply/qcom_smbb.c-960-\t\t\t\t\t \u0026config);\n--\ndrivers/power/supply/rt9467-charger.c=337=static int rt9467_register_otg_regulator(struct rt9467_chg_data *data)\n--\ndrivers/power/supply/rt9467-charger.c-344-\ndrivers/power/supply/rt9467-charger.c:345:\tdata-\u003erdev = devm_regulator_register(data-\u003edev, \u0026rt9467_otg_desc, \u0026cfg);\ndrivers/power/supply/rt9467-charger.c-346-\treturn PTR_ERR_OR_ZERO(data-\u003erdev);\n--\ndrivers/power/supply/rt9471.c=633=static int rt9471_register_otg_regulator(struct rt9471_chip *chip)\n--\ndrivers/power/supply/rt9471.c-637-\ndrivers/power/supply/rt9471.c:638:\tchip-\u003eotg_rdev = devm_regulator_register(dev, \u0026rt9471_otg_rdesc, \u0026cfg);\ndrivers/power/supply/rt9471.c-639-\n--\ndrivers/power/supply/sgm41542_charger.c=932=static int sgm4154x_vbus_regulator_register(struct sgm4154x_device *sgm)\n--\ndrivers/power/supply/sgm41542_charger.c-939-\ndrivers/power/supply/sgm41542_charger.c:940:\tsgm-\u003eotg_rdev = devm_regulator_register(sgm-\u003edev,\ndrivers/power/supply/sgm41542_charger.c-941-\t\t\t\t\t\t\u0026sgm4154x_otg_rdesc,\n--\ndrivers/power/supply/smb347-charger.c=1531=static int smb347_probe(struct i2c_client *client)\n--\ndrivers/power/supply/smb347-charger.c-1586-\ndrivers/power/supply/smb347-charger.c:1587:\tsmb-\u003eusb_rdev = devm_regulator_register(dev,\ndrivers/power/supply/smb347-charger.c-1588-\t\t\t\t\t\t\u0026smb347_usb_vbus_regulator_desc,\n--\ndrivers/power/supply/ucs1002_power.c=534=static int ucs1002_probe(struct i2c_client *client)\n--\ndrivers/power/supply/ucs1002_power.c-634-\ndrivers/power/supply/ucs1002_power.c:635:\tinfo-\u003erdev = devm_regulator_register(dev, info-\u003eregulator_descriptor,\ndrivers/power/supply/ucs1002_power.c-636-\t\t\t\t \u0026regulator_config);\n--\ndrivers/regulator/88pg86x.c=60=static int pg86x_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/88pg86x.c-73-\t\tstruct regulator_dev *rdev;\ndrivers/regulator/88pg86x.c:74:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev,\ndrivers/regulator/88pg86x.c-75-\t\t\t\t\t \u0026pg86x_regulators[id],\n--\ndrivers/regulator/88pm800-regulator.c=226=static int pm800_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm800-regulator.c-260-\ndrivers/regulator/88pm800-regulator.c:261:\t\tregulator = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/88pm800-regulator.c-262-\t\t\t\t\u0026pm800_regulator_info[i].desc, \u0026config);\n--\ndrivers/regulator/88pm8607.c=315=static int pm8607_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm8607.c-359-\ndrivers/regulator/88pm8607.c:360:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc, \u0026config);\ndrivers/regulator/88pm8607.c-361-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/88pm886-regulator.c=340=static int pm886_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm886-regulator.c-365-\t\trdesc = \u0026pm886_regulators[i];\ndrivers/regulator/88pm886-regulator.c:366:\t\trdev = devm_regulator_register(dev, rdesc, \u0026rcfg);\ndrivers/regulator/88pm886-regulator.c-367-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/aat2870-regulator.c=150=static int aat2870_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/aat2870-regulator.c-166-\ndrivers/regulator/aat2870-regulator.c:167:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026ri-\u003edesc, \u0026config);\ndrivers/regulator/aat2870-regulator.c-168-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/ab8500-ext.c=393=static int ab8500_ext_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/ab8500-ext.c-430-\t\t/* register regulator with framework */\ndrivers/regulator/ab8500-ext.c:431:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/ab8500-ext.c-432-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/ab8500.c=1662=static int ab8500_regulator_register(struct platform_device *pdev,\n--\ndrivers/regulator/ab8500.c-1690-\t/* register regulator with framework */\ndrivers/regulator/ab8500.c:1691:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc, \u0026config);\ndrivers/regulator/ab8500.c-1692-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/act8865-regulator.c=654=static int act8865_pmic_probe(struct i2c_client *client)\n--\ndrivers/regulator/act8865-regulator.c-755-\ndrivers/regulator/act8865-regulator.c:756:\t\trdev = devm_regulator_register(dev, desc, \u0026config);\ndrivers/regulator/act8865-regulator.c-757-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/act8945a-regulator.c=274=static int act8945a_pmic_probe(struct platform_device *pdev)\n--\ndrivers/regulator/act8945a-regulator.c-309-\tfor (i = 0; i \u003c num_regulators; i++) {\ndrivers/regulator/act8945a-regulator.c:310:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regulators[i],\ndrivers/regulator/act8945a-regulator.c-311-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/ad5398.c=216=static int ad5398_probe(struct i2c_client *client)\n--\ndrivers/regulator/ad5398.c-248-\ndrivers/regulator/ad5398.c:249:\tchip-\u003erdev = devm_regulator_register(\u0026client-\u003edev, \u0026ad5398_reg,\ndrivers/regulator/ad5398.c-250-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/adp5055-regulator.c=345=static int adp5055_probe(struct i2c_client *client)\n--\ndrivers/regulator/adp5055-regulator.c-384-\ndrivers/regulator/adp5055-regulator.c:385:\t\trdev = devm_regulator_register(dev, desc, \u0026config);\ndrivers/regulator/adp5055-regulator.c-386-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/anatop-regulator.c=155=static int anatop_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/anatop-regulator.c-305-\t/* register regulator */\ndrivers/regulator/anatop-regulator.c:306:\trdev = devm_regulator_register(dev, rdesc, \u0026config);\ndrivers/regulator/anatop-regulator.c-307-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/arizona-ldo1.c=226=static int arizona_ldo1_common_init(struct platform_device *pdev,\n--\ndrivers/regulator/arizona-ldo1.c-278-\ndrivers/regulator/arizona-ldo1.c:279:\tldo1-\u003eregulator = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/arizona-ldo1.c-280-\n--\ndrivers/regulator/arizona-micsupp.c=250=static int arizona_micsupp_common_init(struct platform_device *pdev,\n--\ndrivers/regulator/arizona-micsupp.c-284-\ndrivers/regulator/arizona-micsupp.c:285:\tmicsupp-\u003eregulator = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/arizona-micsupp.c-286-\t\t\t\t\t\t desc,\n--\ndrivers/regulator/as3711-regulator.c=203=static int as3711_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/as3711-regulator.c-230-\ndrivers/regulator/as3711-regulator.c:231:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026as3711_reg_desc[id],\ndrivers/regulator/as3711-regulator.c-232-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/as3722-regulator.c=634=static int as3722_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/as3722-regulator.c-795-\t\tconfig.of_node = as3722_regulator_matches[id].of_node;\ndrivers/regulator/as3722-regulator.c:796:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/as3722-regulator.c-797-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/atc260x-regulator.c=473=static int atc260x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/atc260x-regulator.c-513-\t\tif (atc2603c_ver_b \u0026\u0026 regulators[i].id == ATC2603C_ID_DCDC2)\ndrivers/regulator/atc260x-regulator.c:514:\t\t\tatc260x_rdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/atc260x-regulator.c-515-\t\t\t\t\t\t\t \u0026atc2603c_reg_dcdc2_ver_b,\n--\ndrivers/regulator/atc260x-regulator.c-517-\t\telse\ndrivers/regulator/atc260x-regulator.c:518:\t\t\tatc260x_rdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/atc260x-regulator.c-519-\t\t\t\t\t\t\t \u0026regulators[i],\n--\ndrivers/regulator/aw37503-regulator.c=178=static int aw37503_probe(struct i2c_client *client)\n--\ndrivers/regulator/aw37503-regulator.c-203-\tfor (id = 0; id \u003c AW37503_MAX_REGULATORS; ++id) {\ndrivers/regulator/aw37503-regulator.c:204:\t\trdev = devm_regulator_register(dev, \u0026aw_regs_desc[id],\ndrivers/regulator/aw37503-regulator.c-205-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/axp20x-regulator.c=1553=static int axp20x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/axp20x-regulator.c-1689-\ndrivers/regulator/axp20x-regulator.c:1690:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/axp20x-regulator.c-1691-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/axp20x-regulator.c-1733-\t\t\t\t AXP22X_MISC_N_VBUSEN_FUNC, 0);\ndrivers/regulator/axp20x-regulator.c:1734:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/axp20x-regulator.c-1735-\t\t\t\t\t \u0026axp22x_drivevbus_regulator,\n--\ndrivers/regulator/bcm590xx-regulator.c=1098=static int bcm590xx_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bcm590xx-regulator.c-1153-\ndrivers/regulator/bcm590xx-regulator.c:1154:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/bcm590xx-regulator.c-1155-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd71815-regulator.c=561=static int bd7181x_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd71815-regulator.c-599-\ndrivers/regulator/bd71815-regulator.c:600:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/bd71815-regulator.c-601-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/bd71828-regulator.c=1622=static int bd71828_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd71828-regulator.c-1670-\t\tconfig.driver_data = rd;\ndrivers/regulator/bd71828-regulator.c:1671:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/bd71828-regulator.c-1672-\t\t\t\t\t \u0026rd-\u003edesc, \u0026config);\n--\ndrivers/regulator/bd718x7-regulator.c=1673=static int bd718xx_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd718x7-regulator.c-1770-\ndrivers/regulator/bd718x7-regulator.c:1771:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/bd718x7-regulator.c-1772-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/bd9571mwv-regulator.c=273=static int bd9571mwv_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd9571mwv-regulator.c-299-\t\t\tcontinue;\ndrivers/regulator/bd9571mwv-regulator.c:300:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regulators[i],\ndrivers/regulator/bd9571mwv-regulator.c-301-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd9576-regulator.c=897=static int bd957x_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd9576-regulator.c-1035-\ndrivers/regulator/bd9576-regulator.c:1036:\t\tr-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, desc,\ndrivers/regulator/bd9576-regulator.c-1037-\t\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd96801-regulator.c=1210=static int bd96801_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd96801-regulator.c-1267-\ndrivers/regulator/bd96801-regulator.c:1268:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/bd96801-regulator.c-1269-\t\t\t\t\t \u0026rdesc[i].desc, \u0026config);\n--\ndrivers/regulator/bq257xx-regulator.c=142=static int bq257xx_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bq257xx-regulator.c-164-\ndrivers/regulator/bq257xx-regulator.c:165:\tpdata-\u003ebq257xx_reg = devm_regulator_register(dev, \u0026pdata-\u003edesc, \u0026cfg);\ndrivers/regulator/bq257xx-regulator.c-166-\tif (IS_ERR(pdata-\u003ebq257xx_reg)) {\n--\ndrivers/regulator/core.c=6002=struct regulator_dev *\ndrivers/regulator/core.c:6003:regulator_register(struct device *dev,\ndrivers/regulator/core.c-6004-\t\t const struct regulator_desc *regulator_desc,\n--\ndrivers/regulator/cpcap-regulator.c=602=static int cpcap_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/cpcap-regulator.c-642-\t\tconfig.driver_data = (void *)regulator;\ndrivers/regulator/cpcap-regulator.c:643:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/cpcap-regulator.c-644-\t\t\t\t\t \u0026regulator-\u003erdesc,\n--\ndrivers/regulator/cros-ec-regulator.c=157=static int cros_ec_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/cros-ec-regulator.c-196-\ndrivers/regulator/cros-ec-regulator.c:197:\tdrvdata-\u003edev = devm_regulator_register(dev, \u0026drvdata-\u003edesc, \u0026cfg);\ndrivers/regulator/cros-ec-regulator.c-198-\tif (IS_ERR(drvdata-\u003edev)) {\n--\ndrivers/regulator/da903x-regulator.c=430=static int da903x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da903x-regulator.c-459-\ndrivers/regulator/da903x-regulator.c:460:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026ri-\u003edesc, \u0026config);\ndrivers/regulator/da903x-regulator.c-461-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/da9052-regulator.c=393=static int da9052_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9052-regulator.c-422-\ndrivers/regulator/da9052-regulator.c:423:\tregulator-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/da9052-regulator.c-424-\t\t\t\t\t\t \u0026regulator-\u003einfo-\u003ereg_desc,\n--\ndrivers/regulator/da9055-regulator.c=508=static int da9055_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9055-regulator.c-538-\ndrivers/regulator/da9055-regulator.c:539:\tregulator-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/da9055-regulator.c-540-\t\t\t\t\t\t \u0026regulator-\u003einfo-\u003ereg_desc,\n--\ndrivers/regulator/da9062-regulator.c=920=static int da9062_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9062-regulator.c-1003-\ndrivers/regulator/da9062-regulator.c:1004:\t\tregl-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regl-\u003edesc,\ndrivers/regulator/da9062-regulator.c-1005-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/da9063-regulator.c=882=static int da9063_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9063-regulator.c-1032-\ndrivers/regulator/da9063-regulator.c:1033:\t\tregl-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regl-\u003edesc,\ndrivers/regulator/da9063-regulator.c-1034-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/da9121-regulator.c=776=static int da9121_set_regulator_config(struct da9121 *chip)\n--\ndrivers/regulator/da9121-regulator.c-790-\ndrivers/regulator/da9121-regulator.c:791:\t\tchip-\u003erdev[i] = devm_regulator_register(chip-\u003edev,\ndrivers/regulator/da9121-regulator.c-792-\t\t\t\t\tregl_desc, \u0026config);\n--\ndrivers/regulator/da9210-regulator.c=130=static int da9210_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/da9210-regulator.c-166-\ndrivers/regulator/da9210-regulator.c:167:\trdev = devm_regulator_register(\u0026i2c-\u003edev, \u0026da9210_reg, \u0026config);\ndrivers/regulator/da9210-regulator.c-168-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/da9211-regulator.c=379=static int da9211_regulator_init(struct da9211 *chip)\n--\ndrivers/regulator/da9211-regulator.c-421-\t\t\tdevm_gpiod_unhinge(chip-\u003edev, config.ena_gpiod);\ndrivers/regulator/da9211-regulator.c:422:\t\tchip-\u003erdev[i] = devm_regulator_register(chip-\u003edev,\ndrivers/regulator/da9211-regulator.c-423-\t\t\t\u0026da9211_regulators[i], \u0026config);\n--\ndrivers/regulator/db8500-prcmu.c=437=static int db8500_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/db8500-prcmu.c-455-\ndrivers/regulator/db8500-prcmu.c:456:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/db8500-prcmu.c-457-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/devres.c=449=static void devm_rdev_release(struct device *dev, void *res)\n--\ndrivers/regulator/devres.c-454-/**\ndrivers/regulator/devres.c:455: * devm_regulator_register - Resource managed regulator_register()\ndrivers/regulator/devres.c-456- * @dev: device to supply\n--\ndrivers/regulator/devres.c-464- */\ndrivers/regulator/devres.c:465:struct regulator_dev *devm_regulator_register(struct device *dev,\ndrivers/regulator/devres.c-466-\t\t\t\t const struct regulator_desc *regulator_desc,\n--\ndrivers/regulator/devres.c-475-\ndrivers/regulator/devres.c:476:\trdev = regulator_register(dev, regulator_desc, config);\ndrivers/regulator/devres.c-477-\tif (!IS_ERR(rdev)) {\n--\ndrivers/regulator/dummy.c=40=static int dummy_regulator_probe(struct faux_device *fdev)\n--\ndrivers/regulator/dummy.c-47-\ndrivers/regulator/dummy.c:48:\tdummy_regulator_rdev = devm_regulator_register(\u0026fdev-\u003edev, \u0026dummy_desc,\ndrivers/regulator/dummy.c-49-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/fan53555.c=619=static int fan53555_regulator_register(struct fan53555_device_info *di,\n--\ndrivers/regulator/fan53555.c-642-\ndrivers/regulator/fan53555.c:643:\trdev = devm_regulator_register(di-\u003edev, \u0026di-\u003edesc, config);\ndrivers/regulator/fan53555.c-644-\treturn PTR_ERR_OR_ZERO(rdev);\n--\ndrivers/regulator/fan53880.c=117=static int fan53880_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/fan53880.c-145-\tfor (i = 0; i \u003c ARRAY_SIZE(fan53880_regulators); i++) {\ndrivers/regulator/fan53880.c:146:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev,\ndrivers/regulator/fan53880.c-147-\t\t\t\t\t \u0026fan53880_regulators[i],\n--\ndrivers/regulator/fixed.c=218=static int reg_fixed_voltage_probe(struct platform_device *pdev)\n--\ndrivers/regulator/fixed.c-326-\ndrivers/regulator/fixed.c:327:\tdrvdata-\u003edev = devm_regulator_register(\u0026pdev-\u003edev, \u0026drvdata-\u003edesc,\ndrivers/regulator/fixed.c-328-\t\t\t\t\t \u0026cfg);\n--\ndrivers/regulator/fp9931.c=402=static int fp9931_probe(struct i2c_client *client)\n--\ndrivers/regulator/fp9931.c-478-\tfor (i = 0; i \u003c ARRAY_SIZE(regulators); i++) {\ndrivers/regulator/fp9931.c:479:\t\trdev = devm_regulator_register(\u0026client-\u003edev, \u0026regulators[i],\ndrivers/regulator/fp9931.c-480-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/gpio-regulator.c=234=static int gpio_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/gpio-regulator.c-346-\ndrivers/regulator/gpio-regulator.c:347:\trdev = devm_regulator_register(dev, \u0026drvdata-\u003edesc, \u0026cfg);\ndrivers/regulator/gpio-regulator.c-348-\tif (IS_ERR(rdev))\n--\ndrivers/regulator/hi6421-regulator.c=538=static int hi6421_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/hi6421-regulator.c-559-\ndrivers/regulator/hi6421-regulator.c:560:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/hi6421-regulator.c-561-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/hi6421v530-regulator.c=159=static int hi6421v530_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/hi6421v530-regulator.c-175-\ndrivers/regulator/hi6421v530-regulator.c:176:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/hi6421v530-regulator.c-177-\t\t\t\t\u0026hi6421v530_regulator_info[i].rdesc,\n--\ndrivers/regulator/hi6421v600-regulator.c=233=static int hi6421_spmi_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/hi6421v600-regulator.c-265-\ndrivers/regulator/hi6421v600-regulator.c:266:\t\trdev = devm_regulator_register(dev, \u0026info-\u003edesc, \u0026config);\ndrivers/regulator/hi6421v600-regulator.c-267-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/hi655x-regulator.c=169=static int hi655x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/hi655x-regulator.c-186-\ndrivers/regulator/hi655x-regulator.c:187:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/hi655x-regulator.c-188-\t\t\t\t\t \u0026regulators[i].rdesc,\n--\ndrivers/regulator/isl6271a-regulator.c=100=static int isl6271a_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/isl6271a-regulator.c-127-\ndrivers/regulator/isl6271a-regulator.c:128:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev, \u0026isl_rd[i], \u0026config);\ndrivers/regulator/isl6271a-regulator.c-129-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/isl9305.c=140=static int isl9305_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/isl9305.c-162-\ndrivers/regulator/isl9305.c:163:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev,\ndrivers/regulator/isl9305.c-164-\t\t\t\t\t \u0026isl9305_regulators[i],\n--\ndrivers/regulator/lm363x-regulator.c=312=static int lm363x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/lm363x-regulator.c-343-\ndrivers/regulator/lm363x-regulator.c:344:\trdev = devm_regulator_register(dev, \u0026lm363x_regulator_desc[id], \u0026cfg);\ndrivers/regulator/lm363x-regulator.c-345-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/lochnagar-regulator.c=240=static int lochnagar_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/lochnagar-regulator.c-256-\ndrivers/regulator/lochnagar-regulator.c:257:\trdev = devm_regulator_register(dev, desc, \u0026config);\ndrivers/regulator/lochnagar-regulator.c-258-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/lp3971.c=375=static int setup_regulators(struct lp3971 *lp3971,\n--\ndrivers/regulator/lp3971.c-389-\ndrivers/regulator/lp3971.c:390:\t\trdev = devm_regulator_register(lp3971-\u003edev,\ndrivers/regulator/lp3971.c-391-\t\t\t\t\t \u0026regulators[reg-\u003eid], \u0026config);\n--\ndrivers/regulator/lp3972.c=470=static int setup_regulators(struct lp3972 *lp3972,\n--\ndrivers/regulator/lp3972.c-484-\ndrivers/regulator/lp3972.c:485:\t\trdev = devm_regulator_register(lp3972-\u003edev,\ndrivers/regulator/lp3972.c-486-\t\t\t\t\t \u0026regulators[reg-\u003eid], \u0026config);\n\n"
} |
| 29/2 | 2026/09/19 15:10 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 38784 output: 33 thoughts: 163 Thoughts: **Analyzing Regulator Registration Methods** Okay, let's break this down. The core question is: how does `regulator_resolve_supply` get called? My initial thought is it's primarily invoked during regulator registration via `regulator_register`. Makes sense; board and SoC drivers are the usual suspects, especially during probe of platform, I2C, or SPI devices. That's the typical pattern based on my experience. But, a wrinkle! Can a regulator *ever* be registered through userspace or some kind of virtual hardware? That's the question I have to pursue. I'm used to physical hardware being the initiator, so I need to make sure I understand the full range of possibilities. So, let me think: what drivers *do* register regulators? I'll probably find most of the answer within the driver space, so I'll need to look at what drivers actually call the registration function. A good test case would be to investigate whether any virtual or emulated drivers are in the mix. Let's start with QEMU - what regulators are actually getting registered on an amd64 system within QEMU? This should help me understand the atypical cases. To get a better picture of the ecosystem, I think I'll hit up `drivers/regulator/Kconfig` and see what's built on amd64 or `defconfig`. This should give me a better view of which regulators are typically enabled. I can also do a broad search of the `drivers/regulator` directory itself, just to make sure I don't miss anything. |
| 30/2 | 2026/09/19 15:10 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/Kconfig",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tmenuconfig REGULATOR\n 3:\t\tbool \"Voltage and Current Regulator Support\"\n 4:\t\tselect LINEAR_RANGES\n 5:\t\thelp\n 6:\t\t Generic Voltage and Current Regulator support.\n 7:\t\n 8:\t\t This framework is designed to provide a generic interface to voltage\n 9:\t\t and current regulators within the Linux kernel. It's intended to\n 10:\t\t provide voltage and current control to client or consumer drivers and\n 11:\t\t also provide status information to user space applications through a\n 12:\t\t sysfs interface.\n 13:\t\n 14:\t\t The intention is to allow systems to dynamically control regulator\n 15:\t\t output in order to save power and prolong battery life. This applies\n 16:\t\t to both voltage regulators (where voltage output is controllable) and\n 17:\t\t current sinks (where current output is controllable).\n 18:\t\n 19:\t\t This framework safely compiles out if not selected so that client\n 20:\t\t drivers can still be used in systems with no software controllable\n 21:\t\t regulators.\n 22:\t\n 23:\t\t If unsure, say no.\n 24:\t\n 25:\t\n 26:\tif REGULATOR\n 27:\t\n 28:\tconfig REGULATOR_DEBUG\n 29:\t\tbool \"Regulator debug support\"\n 30:\t\thelp\n 31:\t\t Say yes here to enable debugging support.\n 32:\t\n 33:\tconfig REGULATOR_FIXED_VOLTAGE\n 34:\t\ttristate \"Fixed voltage regulator support\"\n 35:\t\thelp\n 36:\t\t This driver provides support for fixed voltage regulators,\n 37:\t\t useful for systems which use a combination of software\n 38:\t\t managed regulators and simple non-configurable regulators.\n 39:\t\n 40:\tconfig REGULATOR_VIRTUAL_CONSUMER\n 41:\t\ttristate \"Virtual regulator consumer support\"\n 42:\t\thelp\n 43:\t\t This driver provides a virtual consumer for the voltage and\n 44:\t\t current regulator API which provides sysfs controls for\n 45:\t\t configuring the supplies requested. This is mainly useful\n 46:\t\t for test purposes.\n 47:\t\n 48:\t\t If unsure, say no.\n 49:\t\n 50:\tconfig REGULATOR_USERSPACE_CONSUMER\n 51:\t\ttristate \"Userspace regulator consumer support\"\n 52:\t\thelp\n 53:\t\t There are some classes of devices that are controlled entirely\n 54:\t\t from user space. Userspace consumer driver provides ability to\n 55:\t\t control power supplies for such devices.\n 56:\t\n 57:\t\t If unsure, say no.\n 58:\t\n 59:\tconfig REGULATOR_NETLINK_EVENTS\n 60:\t\tbool \"Enable support for receiving regulator events via netlink\"\n 61:\t\tdepends on NET\n 62:\t\thelp\n 63:\t\t Enabling this option allows the kernel to broadcast regulator events using\n 64:\t\t the netlink mechanism. User-space applications can subscribe to these events\n 65:\t\t for real-time updates on various regulator events.\n 66:\t\n 67:\t\t If unsure, say no.\n 68:\t\n 69:\tconfig REGULATOR_88PG86X\n 70:\t\ttristate \"Marvell 88PG86X voltage regulators\"\n 71:\t\tdepends on I2C\n 72:\t\tselect REGMAP_I2C\n 73:\t\thelp\n 74:\t\t This driver supports Marvell 88PG867 and 88PG868 voltage regulators.\n 75:\t\t They provide two I2C-controlled DC/DC step-down converters with\n 76:\t\t sleep mode and separate enable pins.\n 77:\t\n 78:\tconfig REGULATOR_88PM800\n 79:\t\ttristate \"Marvell 88PM800 Power regulators\"\n 80:\t\tdepends on MFD_88PM800\n"
} |
| 31/2 | 2026/09/19 15:10 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 40379 output: 34 thoughts: 104 Thoughts: **Tracing the Regulator Supply** Okay, hold on a second. Let me zero in on `regulator_resolve_supply`. When exactly does that function get called? I need to understand its invocation sequence. Let's trace it back. Right, the `dummy.c` module registers `dummy_regulator_rdev` during boot. That happens within `regulator_dummy_init()`. Now, is that initialization triggered by a `core_initcall` or a `postcore_initcall`? I really need to nail down the timing here. Let's quickly double-check the `dummy.h` and `dummy.c` files to confirm the exact initcall type. Gotta keep those details straight. |
| 32/2 | 2026/09/19 15:10 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/dummy.h",
"FirstLine": 1,
"LineCount": 30
}Results: {
"Contents": " 1:\t/* SPDX-License-Identifier: GPL-2.0-or-later */\n 2:\t/*\n 3:\t * dummy.h\n 4:\t *\n 5:\t * Copyright 2010 Wolfson Microelectronics PLC.\n 6:\t *\n 7:\t * Author: Mark Brown \u003cbroonie@opensource.wolfsonmicro.com\u003e\n 8:\t *\n 9:\t * This is useful for systems with mixed controllable and\n 10:\t * non-controllable regulators, as well as for allowing testing on\n 11:\t * systems with no controllable regulators.\n 12:\t */\n 13:\t\n 14:\t#ifndef _DUMMY_H\n 15:\t#define _DUMMY_H\n 16:\t\n 17:\tstruct regulator_dev;\n 18:\t\n 19:\textern struct regulator_dev *dummy_regulator_rdev;\n 20:\t\n 21:\tvoid __init regulator_dummy_init(void);\n 22:\t\n 23:\t#endif\n"
} |
| 33/2 | 2026/09/19 15:10 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 40949 output: 20 thoughts: 19 Thoughts: Here's my thought process, summarized as you requested: **Finding the Call Site of `regulator_dummy_init`** Okay, so I need to understand where `regulator_dummy_init` is actually being used in this codebase. My instinct is to use a grep command. That's the most efficient way to quickly search through the files and find all instances of this specific function call. Grepping will give me a raw list of where the function name appears, which I can then analyze to identify its invocation site. I'm expecting this will quickly lead me to the relevant initialization sequence, assuming it's used directly rather than via some indirect macro or wrapper function. Let's get to it! |
| 34/2 | 2026/09/19 15:10 | tool | grepper |
0mArgs:{
"Expression": "regulator_dummy_init"
}Results: {
"Output": "drivers/regulator/core.c=6764=static int __init regulator_init(void)\n--\ndrivers/regulator/core.c-6790-#endif\ndrivers/regulator/core.c:6791:\tregulator_dummy_init();\ndrivers/regulator/core.c-6792-\n--\ndrivers/regulator/dummy.c=63=static struct faux_device *dummy_fdev;\ndrivers/regulator/dummy.c-64-\ndrivers/regulator/dummy.c:65:void __init regulator_dummy_init(void)\ndrivers/regulator/dummy.c-66-{\n--\ndrivers/regulator/dummy.h=19=extern struct regulator_dev *dummy_regulator_rdev;\ndrivers/regulator/dummy.h-20-\ndrivers/regulator/dummy.h:21:void __init regulator_dummy_init(void);\ndrivers/regulator/dummy.h-22-\n"
} |
| 35/2 | 2026/09/19 15:10 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 41386 output: 32 thoughts: 853 Thoughts: **Analyzing the Regulator Supply Resolution Logic** Okay, so `regulator_dummy_init()` gets called within `regulator_init()`, which is good to know, especially with that `postcore_initcall`. My immediate focus is on understanding what `regulator_resolve_supply()` does and, more importantly, when that specific `r == rdev` condition is triggered. Let's re-examine that code block, specifically the added `put_device(&rdev->dev)`. The critical part is understanding *when* `r == rdev`. This occurs within `regulator_resolve_supply()`. It's a condition where the supply name resolves to the regulator itself. Basically, a self-referential loop. The function checks for this using the `regulator_dt_lookup` and `regulator_dev_lookup` calls. If the resolved regulator (`r`) is the same as the current regulator (`rdev`), we have this loop. The error message is clear: "Supply for ... resolved to itself". Before the patch, the code did something that looks like it had a memory leak. `rdev->dev` had its refcount incremented through the lookup (either DT or device). But, the code did not decrement the reference count. The patch is now fixing this. So, the key change is adding `put_device(&rdev->dev);` in the error condition. This is likely to prevent a resource leak. Now, the question is how this self-referential condition could even happen. My gut feeling is this is probably a misconfiguration. Can syzkaller or userspace create a regulator with this property? Can they cause it to happen? How are regulators registered? Can userspace register regulators directly, create platform devices, or load Device Tree overlays? Can device tree overlays be loaded from userspace? Is this a syzkaller vector? Is `CONFIG_OF_CONFIGFS` enabled? This is a key question! Does the architecture (amd64 in this case) even use Device Tree? Normally amd64 uses ACPI, not DT, unless OF or unittest are enabled. OF is typically for ARM, PowerPC, or RISC-V. Let me verify if `CONFIG_OF` is on amd64 or if a DT overlay is possible. I should check the `drivers/of/Kconfig` file. I need to understand if the architecture is relevant here. |
| 36/2 | 2026/09/19 15:10 | tool | read-file |
0mArgs:{
"File": "drivers/of/Kconfig",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0\n 2:\tconfig DTC\n 3:\t\tbool\n 4:\t\n 5:\tconfig GENERIC_BUILTIN_DTB\n 6:\t\tbool\n 7:\t\n 8:\tconfig BUILTIN_DTB_ALL\n 9:\t\tbool\n 10:\t\n 11:\tmenuconfig OF\n 12:\t\tbool \"Device Tree and Open Firmware support\"\n 13:\t\thelp\n 14:\t\t This option enables the device tree infrastructure.\n 15:\t\t It is automatically selected by platforms that need it or can\n 16:\t\t be enabled manually for unittests, overlays or\n 17:\t\t compile-coverage.\n 18:\t\n 19:\tif OF\n 20:\t\n 21:\tconfig OF_UNITTEST\n 22:\t\tbool \"Device Tree runtime unit tests\"\n 23:\t\tdepends on OF_EARLY_FLATTREE\n 24:\t\tselect IRQ_DOMAIN\n 25:\t\tselect OF_RESOLVE\n 26:\t\thelp\n 27:\t\t This option builds in test cases for the device tree infrastructure\n 28:\t\t that are executed once at boot time, and the results dumped to the\n 29:\t\t console.\n 30:\t\n 31:\t\t This option should only be enabled for a development kernel. The tests\n 32:\t\t will taint the kernel with TAINT_TEST. The tests will cause ERROR and\n 33:\t\t WARNING messages to print on the console. The tests will cause stack\n 34:\t\t traces to print on the console. It is possible that the tests will\n 35:\t\t leave the devicetree in a corrupted state.\n 36:\t\n 37:\t\t The unittest output will be verbose. Copy the output to a file\n 38:\t\t via capturing the console output or via the dmesg command. Process\n 39:\t\t this file with scripts/dtc/of_unittest_expect to reduce the\n 40:\t\t verbosity, test whether expected output is present, and to\n"
} |
| 37/2 | 2026/09/19 15:10 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 43313 output: 28 thoughts: 571 Thoughts: **Regulator Registration and the Curious Case of the USB Connection** Okay, so I'm pondering something a bit unusual: can a regulator, in the kernel, actually be registered without Device Tree (DT) information? It's a question that piques my interest. My instinct tells me to investigate potential driver implementations to find such cases. I'm thinking, could there be a driver that handles a regulator without using DT, perhaps via USB, virtio, or some user-triggerable interface? First, I need to check something that seems important: are there even any USB drivers that *register* a regulator? I had a vague recollection of a `grep` I ran earlier, so I searched again in `drivers/usb/` for `devm_regulator_register` or `regulator_register`. The only result was `ohci_da8xx_register_notify`, but it only calls `devm_regulator_register_notifier`. Interesting. Now, a shift in focus. What about the power supply drivers? I'll have to investigate the `drivers/power/supply/` directory. Scanning through, I see quite a few I2C and platform device implementations: `bq24190_charger.c`, `bq25890_charger.c`, `max77759_charger.c`, `mt6360_charger.c`, `mt6370-charger.c`, `qcom_smbb.c`, `rt9467-charger.c`, `rt9471.c`, `sgm41542_charger.c`, `smb347-charger.c`, and `ucs1002_power.c`. All I2C or platform! None seem to originate from USB, so it doesn't appear I'm onto a USB power/regulator driver. Now, I'm thinking laterally. Can USB devices *create* I2C buses? Devices like `i2c-tiny-usb`, `ch341`, or `cp2112` come to mind. If such a bus is created by a USB device, does userspace instantiate I2C devices on that bus? The answer seems to be yes! In Linux, userspace can indeed instantiate I2C devices via `/sys/bus/i2c/devices/i2c-X/new_device`. But here's a crucial point: if an I2C device is instantiated via `new_device`, can the register device (`r`) actually be equal to the regulator device (`rdev`)? Let's analyze `new_device`: I know it takes a name and an address, but does it pass any platform data? No, it doesn't. And importantly, it doesn't pass DT nodes either. This begs the question: if platform data is NULL and the DT node is NULL, what does `regulator_register` *do* with the `supply_name`? That's the core question now. I need to trace the origin of that `supply_name`. To do this, I need to dive into `drivers/regulator/core.c` and hunt for that variable! |
| 38/2 | 2026/09/19 15:10 | tool | grepper |
0mArgs:{
"Expression": "supply_name",
"PathPrefix": "drivers/regulator/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1334 lines.\nUse more precise expression if possible.\n\ndrivers/regulator/ab8500.c=644=static struct ab8500_regulator_info\n--\ndrivers/regulator/ab8500.c-661-\t\t\t.enable_time\t= 200,\ndrivers/regulator/ab8500.c:662:\t\t\t.supply_name = \"vin\",\ndrivers/regulator/ab8500.c-663-\t\t},\n--\ndrivers/regulator/ab8500.c-684-\t\t\t.enable_time\t= 200,\ndrivers/regulator/ab8500.c:685:\t\t\t.supply_name = \"vin\",\ndrivers/regulator/ab8500.c-686-\t\t},\n--\ndrivers/regulator/ab8500.c-707-\t\t\t.enable_time\t= 450,\ndrivers/regulator/ab8500.c:708:\t\t\t.supply_name = \"vin\",\ndrivers/regulator/ab8500.c-709-\t\t},\n--\ndrivers/regulator/act8865-regulator.c=431=static const struct regulator_ops act8865_fixed_ldo_ops = {\n--\ndrivers/regulator/act8865-regulator.c-442-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\t\\\ndrivers/regulator/act8865-regulator.c:443:\t\t.supply_name\t\t= _supply,\t\t\t\\\ndrivers/regulator/act8865-regulator.c-444-\t\t.id\t\t\t= _family##_ID_##_id,\t\t\\\n--\ndrivers/regulator/act8945a-regulator.c=220=static const struct regulator_ops act8945a_ops = {\n--\ndrivers/regulator/act8945a-regulator.c-236-\t\t.name\t\t\t= _name,\t\t\t\\\ndrivers/regulator/act8945a-regulator.c:237:\t\t.supply_name\t\t= _supply,\t\t\t\\\ndrivers/regulator/act8945a-regulator.c-238-\t\t.of_match\t\t= of_match_ptr(\"REG_\"#_id),\t\\\n--\ndrivers/regulator/arizona-ldo1.c=95=static const struct regulator_desc arizona_ldo1_hc = {\ndrivers/regulator/arizona-ldo1.c-96-\t.name = \"LDO1\",\ndrivers/regulator/arizona-ldo1.c:97:\t.supply_name = \"LDOVDD\",\ndrivers/regulator/arizona-ldo1.c-98-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-ldo1.c=121=static const struct regulator_desc arizona_ldo1 = {\ndrivers/regulator/arizona-ldo1.c-122-\t.name = \"LDO1\",\ndrivers/regulator/arizona-ldo1.c:123:\t.supply_name = \"LDOVDD\",\ndrivers/regulator/arizona-ldo1.c-124-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-ldo1.c=165=static const struct regulator_desc madera_ldo1 = {\ndrivers/regulator/arizona-ldo1.c-166-\t.name = \"LDO1\",\ndrivers/regulator/arizona-ldo1.c:167:\t.supply_name = \"LDOVDD\",\ndrivers/regulator/arizona-ldo1.c-168-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-micsupp.c=130=static const struct regulator_desc arizona_micsupp = {\ndrivers/regulator/arizona-micsupp.c-131-\t.name = \"MICVDD\",\ndrivers/regulator/arizona-micsupp.c:132:\t.supply_name = \"CPVDD\",\ndrivers/regulator/arizona-micsupp.c-133-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-micsupp.c=157=static const struct regulator_desc arizona_micsupp_ext = {\ndrivers/regulator/arizona-micsupp.c-158-\t.name = \"MICVDD\",\ndrivers/regulator/arizona-micsupp.c:159:\t.supply_name = \"CPVDD\",\ndrivers/regulator/arizona-micsupp.c-160-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-micsupp.c=203=static const struct regulator_desc madera_micsupp = {\ndrivers/regulator/arizona-micsupp.c-204-\t.name = \"MICVDD\",\ndrivers/regulator/arizona-micsupp.c:205:\t.supply_name = \"CPVDD1\",\ndrivers/regulator/arizona-micsupp.c-206-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/as3722-regulator.c=634=static int as3722_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/as3722-regulator.c-668-\t\tdesc-\u003ename = as3722_reg_lookup[id].name;\ndrivers/regulator/as3722-regulator.c:669:\t\tdesc-\u003esupply_name = as3722_reg_lookup[id].sname;\ndrivers/regulator/as3722-regulator.c-670-\t\tdesc-\u003eid = as3722_reg_lookup[id].regulator_id;\n--\ndrivers/regulator/atc260x-regulator.c=154=enum atc2603c_reg_ids {\n--\ndrivers/regulator/atc260x-regulator.c-172-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:173:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-174-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-191-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:192:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-193-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-210-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:211:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-212-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-227-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:228:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-229-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-246-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:247:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-248-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-263-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:264:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-265-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-276-\t.name = \"SWITCHLDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:277:\t.supply_name = \"switchldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-278-\t.of_match = of_match_ptr(\"switchldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c=319=enum atc2609a_reg_ids {\n--\ndrivers/regulator/atc260x-regulator.c-339-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:340:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-341-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-358-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:359:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-360-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-377-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:378:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-379-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-396-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:397:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-398-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-417-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:418:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-419-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-439-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:440:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-441-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/aw37503-regulator.c=109=static int aw37503_of_parse_cb(struct device_node *np,\n--\ndrivers/regulator/aw37503-regulator.c-135-\t\t.name = \"aw37503-\"#_name,\t\t\\\ndrivers/regulator/aw37503-regulator.c:136:\t\t.supply_name = \"vin\",\t\t\t\\\ndrivers/regulator/aw37503-regulator.c-137-\t\t.id = AW37503_REGULATOR_ID_##_id,\t\\\n--\ndrivers/regulator/axp20x-regulator.c-355-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:356:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-357-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-377-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:378:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-379-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-396-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:397:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-398-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-410-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:411:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-412-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-425-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:426:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-427-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c=714=static const struct regulator_desc axp22x_drivevbus_regulator = {\ndrivers/regulator/axp20x-regulator.c-715-\t.name\t\t= \"drivevbus\",\ndrivers/regulator/axp20x-regulator.c:716:\t.supply_name\t= \"drivevbus\",\ndrivers/regulator/axp20x-regulator.c-717-\t.of_match\t= of_match_ptr(\"drivevbus\"),\n--\ndrivers/regulator/axp20x-regulator.c=1553=static int axp20x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/axp20x-regulator.c-1660-\t\t\t*new_desc = regulators[i];\ndrivers/regulator/axp20x-regulator.c:1661:\t\t\tnew_desc-\u003esupply_name = dcdc1_name;\ndrivers/regulator/axp20x-regulator.c-1662-\t\t\tdesc = new_desc;\n--\ndrivers/regulator/axp20x-regulator.c-1673-\t\t\t*new_desc = regulators[i];\ndrivers/regulator/axp20x-regulator.c:1674:\t\t\tnew_desc-\u003esupply_name = dcdc5_name;\ndrivers/regulator/axp20x-regulator.c-1675-\t\t\tdesc = new_desc;\n--\ndrivers/regulator/axp20x-regulator.c-1685-\t\t\t*new_desc = regulators[i];\ndrivers/regulator/axp20x-regulator.c:1686:\t\t\tnew_desc-\u003esupply_name = aldo1_name;\ndrivers/regulator/axp20x-regulator.c-1687-\t\t\tdesc = new_desc;\n--\ndrivers/regulator/bd718x7-regulator.c=732=static struct bd718xx_regulator_data bd71847_regulators[] = {\n--\ndrivers/regulator/bd718x7-regulator.c-1037-\t\t\t/* LDO6 is supplied by buck5 */\ndrivers/regulator/bd718x7-regulator.c:1038:\t\t\t.supply_name = \"buck5\",\ndrivers/regulator/bd718x7-regulator.c-1039-\t\t\t.vsel_reg = BD718XX_REG_LDO6_VOLT,\n--\ndrivers/regulator/bd718x7-regulator.c=1082=static struct bd718xx_regulator_data bd71837_regulators[] = {\n--\ndrivers/regulator/bd718x7-regulator.c-1423-\t\t\t/* LDO5 is supplied by buck6 */\ndrivers/regulator/bd718x7-regulator.c:1424:\t\t\t.supply_name = \"buck6\",\ndrivers/regulator/bd718x7-regulator.c-1425-\t\t\t.vsel_reg = BD718XX_REG_LDO5_VOLT,\n--\ndrivers/regulator/bd718x7-regulator.c-1450-\t\t\t/* LDO6 is supplied by buck7 */\ndrivers/regulator/bd718x7-regulator.c:1451:\t\t\t.supply_name = \"buck7\",\ndrivers/regulator/bd718x7-regulator.c-1452-\t\t\t.vsel_reg = BD718XX_REG_LDO6_VOLT,\n--\ndrivers/regulator/core.c=114=static struct regulator *create_regulator(struct regulator_dev *rdev,\ndrivers/regulator/core.c-115-\t\t\t\t\t struct device *dev,\ndrivers/regulator/core.c:116:\t\t\t\t\t const char *supply_name);\ndrivers/regulator/core.c-117-static void destroy_regulator(struct regulator *regulator);\n--\ndrivers/regulator/core.c=1464=static int set_machine_constraints(struct regulator_dev *rdev,\n--\ndrivers/regulator/core.c-1477-\tif (!rdev-\u003eena_pin \u0026\u0026 !ops-\u003eenable) {\ndrivers/regulator/core.c:1478:\t\tif (rdev-\u003esupply_name \u0026\u0026 !rdev-\u003esupply)\ndrivers/regulator/core.c-1479-\t\t\treturn -EPROBE_DEFER;\n--\ndrivers/regulator/core.c-1492-\tif (rdev-\u003econstraints-\u003ealways_on || rdev-\u003econstraints-\u003eboot_on) {\ndrivers/regulator/core.c:1493:\t\tif (rdev-\u003esupply_name \u0026\u0026 !rdev-\u003esupply)\ndrivers/regulator/core.c-1494-\t\t\treturn -EPROBE_DEFER;\n--\ndrivers/regulator/core.c=1986=static void link_and_create_debugfs(struct regulator *regulator, struct regulator_dev *rdev,\n--\ndrivers/regulator/core.c-1995-\t\terr = sysfs_create_link_nowarn(\u0026rdev-\u003edev.kobj, \u0026dev-\u003ekobj,\ndrivers/regulator/core.c:1996:\t\t\t\t\t regulator-\u003esupply_name);\ndrivers/regulator/core.c-1997-\t\tif (err) {\n--\ndrivers/regulator/core.c-2004-\tif (err != -EEXIST) {\ndrivers/regulator/core.c:2005:\t\tregulator-\u003edebugfs = debugfs_create_dir(regulator-\u003esupply_name, rdev-\u003edebugfs);\ndrivers/regulator/core.c-2006-\t\tif (IS_ERR(regulator-\u003edebugfs)) {\n--\ndrivers/regulator/core.c=2024=static struct regulator *create_regulator(struct regulator_dev *rdev,\ndrivers/regulator/core.c-2025-\t\t\t\t\t struct device *dev,\ndrivers/regulator/core.c:2026:\t\t\t\t\t const char *supply_name)\ndrivers/regulator/core.c-2027-{\n--\ndrivers/regulator/core.c-2032-\tif (dev) {\ndrivers/regulator/core.c:2033:\t\tsupply_name = kasprintf(GFP_KERNEL, \"%s-%s\", dev-\u003ekobj.name, supply_name);\ndrivers/regulator/core.c:2034:\t\tif (supply_name == NULL)\ndrivers/regulator/core.c-2035-\t\t\treturn NULL;\ndrivers/regulator/core.c-2036-\t} else {\ndrivers/regulator/core.c:2037:\t\tsupply_name = kstrdup_const(supply_name, GFP_KERNEL);\ndrivers/regulator/core.c:2038:\t\tif (supply_name == NULL)\ndrivers/regulator/core.c-2039-\t\t\treturn NULL;\n--\ndrivers/regulator/core.c-2043-\tif (regulator == NULL) {\ndrivers/regulator/core.c:2044:\t\tkfree_const(supply_name);\ndrivers/regulator/core.c-2045-\t\treturn NULL;\n--\ndrivers/regulator/core.c-2048-\tregulator-\u003erdev = rdev;\ndrivers/regulator/core.c:2049:\tregulator-\u003esupply_name = supply_name;\ndrivers/regulator/core.c-2050-\n--\ndrivers/regulator/core.c=2189=static int regulator_resolve_supply(struct regulator_dev *rdev)\n--\ndrivers/regulator/core.c-2198-\t/* No supply to resolve? */\ndrivers/regulator/core.c:2199:\tif (!rdev-\u003esupply_name)\ndrivers/regulator/core.c-2200-\t\treturn 0;\n--\ndrivers/regulator/core.c-2208-\t */\ndrivers/regulator/core.c:2209:\tr = regulator_dt_lookup(\u0026rdev-\u003edev, rdev-\u003esupply_name);\ndrivers/regulator/core.c-2210-\n--\ndrivers/regulator/core.c-2214-\tif (!r)\ndrivers/regulator/core.c:2215:\t\tr = regulator_dev_lookup(dev, rdev-\u003esupply_name);\ndrivers/regulator/core.c-2216-\n--\ndrivers/regulator/core.c-2232-\t\t\tdev_err(dev, \"Failed to resolve %s-supply for %s\\n\",\ndrivers/regulator/core.c:2233:\t\t\t\trdev-\u003esupply_name, rdev-\u003edesc-\u003ename);\ndrivers/regulator/core.c-2234-\t\t\tret = -EPROBE_DEFER;\n--\ndrivers/regulator/core.c-2240-\t\tdev_err(dev, \"Supply for %s (%s) resolved to itself\\n\",\ndrivers/regulator/core.c:2241:\t\t\trdev-\u003edesc-\u003ename, rdev-\u003esupply_name);\ndrivers/regulator/core.c-2242-\t\tput_device(\u0026rdev-\u003edev);\n--\ndrivers/regulator/core.c=2640=static void destroy_regulator(struct regulator *regulator)\n--\ndrivers/regulator/core.c-2650-\t\t/* remove any sysfs entries */\ndrivers/regulator/core.c:2651:\t\tsysfs_remove_link(\u0026rdev-\u003edev.kobj, regulator-\u003esupply_name);\ndrivers/regulator/core.c-2652-\t}\n--\ndrivers/regulator/core.c-2660-\ndrivers/regulator/core.c:2661:\tkfree_const(regulator-\u003esupply_name);\ndrivers/regulator/core.c-2662-\tkfree(regulator);\n--\ndrivers/regulator/core.c=4791=int regulator_get_voltage_rdev(struct regulator_dev *rdev)\n--\ndrivers/regulator/core.c-4824-\t\tret = regulator_get_voltage_rdev(rdev-\u003esupply-\u003erdev);\ndrivers/regulator/core.c:4825:\t} else if (rdev-\u003esupply_name) {\ndrivers/regulator/core.c-4826-\t\treturn -EPROBE_DEFER;\n--\ndrivers/regulator/core.c=6003=regulator_register(struct device *dev,\n--\ndrivers/regulator/core.c-6123-\tif (init_data \u0026\u0026 init_data-\u003esupply_regulator)\ndrivers/regulator/core.c:6124:\t\trdev-\u003esupply_name = init_data-\u003esupply_regulator;\ndrivers/regulator/core.c:6125:\telse if (regulator_desc-\u003esupply_name)\ndrivers/regulator/core.c:6126:\t\trdev-\u003esupply_name = regulator_desc-\u003esupply_name;\ndrivers/regulator/core.c-6127-\n--\ndrivers/regulator/core.c-6173-\t\trdev_dbg(rdev, \"will resolve supply early: %s\\n\",\ndrivers/regulator/core.c:6174:\t\t\t rdev-\u003esupply_name);\ndrivers/regulator/core.c-6175-\t\tret = regulator_resolve_supply(rdev);\n--\ndrivers/regulator/core.c-6234-\t */\ndrivers/regulator/core.c:6235:\tif (rdev-\u003esupply_name \u0026\u0026 !rdev-\u003esupply) {\ndrivers/regulator/core.c-6236-\t\tdevice_initialize(\u0026rdev-\u003ebdev);\n--\ndrivers/regulator/core.c=6406=static int regulator_bus_probe(struct device *bdev)\n--\ndrivers/regulator/core.c-6414-\t\t\t \"unable to resolve supply or constraints '%s': %pe\\n\",\ndrivers/regulator/core.c:6415:\t\t\t rdev-\u003esupply_name, ERR_PTR(ret));\ndrivers/regulator/core.c-6416-\telse\ndrivers/regulator/core.c:6417:\t\trdev_dbg(rdev, \"resolved supply '%s'\\n\", rdev-\u003esupply_name);\ndrivers/regulator/core.c-6418-\n--\ndrivers/regulator/core.c=6560=static void regulator_summary_show_subtree(struct seq_file *s,\n--\ndrivers/regulator/core.c-6605-\t\t\t 30 - (level + 1) * 3,\ndrivers/regulator/core.c:6606:\t\t\t consumer-\u003esupply_name ? consumer-\u003esupply_name :\ndrivers/regulator/core.c-6607-\t\t\t consumer-\u003edev ? dev_name(consumer-\u003edev) : \"deviceless\");\n--\ndrivers/regulator/cros-ec-regulator.c=157=static int cros_ec_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/cros-ec-regulator.c-185-\tdesc-\u003eops = \u0026cros_ec_regulator_voltage_ops;\ndrivers/regulator/cros-ec-regulator.c:186:\tdesc-\u003esupply_name = \"vin\";\ndrivers/regulator/cros-ec-regulator.c-187-\n--\ndrivers/regulator/fan53555.c=619=static int fan53555_regulator_register(struct fan53555_device_info *di,\n--\ndrivers/regulator/fan53555.c-625-\trdesc-\u003ename = \"fan53555-reg\";\ndrivers/regulator/fan53555.c:626:\trdesc-\u003esupply_name = \"vin\";\ndrivers/regulator/fan53555.c-627-\trdesc-\u003eops = \u0026fan53555_regulator_ops;\n--\ndrivers/regulator/fan53880.c=32=static const struct regulator_ops fan53880_ops = {\n--\ndrivers/regulator/fan53880.c-59-\t\t.enable_time =\t 150,\t\t\t\t\t\\\ndrivers/regulator/fan53880.c:60:\t\t.supply_name =\t _supply,\t\t\t\t\\\ndrivers/regulator/fan53880.c-61-\t\t.ops =\t\t \u0026fan53880_ops,\t\t\t\\\n--\ndrivers/regulator/fan53880.c=64=static const struct regulator_desc fan53880_regulators[] = {\n--\ndrivers/regulator/fan53880.c-85-\t\t.enable_time =\t 480,\ndrivers/regulator/fan53880.c:86:\t\t.supply_name =\t \"PVIN\",\ndrivers/regulator/fan53880.c-87-\t\t.ops =\t\t \u0026fan53880_ops,\n--\ndrivers/regulator/fan53880.c-105-\t\t.enable_time =\t 580,\ndrivers/regulator/fan53880.c:106:\t\t.supply_name =\t \"PVIN\",\ndrivers/regulator/fan53880.c-107-\t\t.ops =\t\t \u0026fan53880_ops,\n--\ndrivers/regulator/fixed-helper.c=14=static void regulator_fixed_release(struct device *dev)\n--\ndrivers/regulator/fixed-helper.c-17-\t\t\tstruct fixed_regulator_data, pdev.dev);\ndrivers/regulator/fixed-helper.c:18:\tkfree_const(data-\u003ecfg.supply_name);\ndrivers/regulator/fixed-helper.c-19-\tkfree(data);\n--\ndrivers/regulator/fixed-helper.c=32=struct platform_device *regulator_register_always_on(int id, const char *name,\n--\ndrivers/regulator/fixed-helper.c-40-\ndrivers/regulator/fixed-helper.c:41:\tdata-\u003ecfg.supply_name = kstrdup_const(name, GFP_KERNEL);\ndrivers/regulator/fixed-helper.c:42:\tif (!data-\u003ecfg.supply_name) {\ndrivers/regulator/fixed-helper.c-43-\t\tkfree(data);\n--\ndrivers/regulator/fixed.c=163=of_get_fixed_voltage_config(struct device *dev,\n--\ndrivers/regulator/fixed.c-181-\ndrivers/regulator/fixed.c:182:\tconfig-\u003esupply_name = init_data-\u003econstraints.name;\ndrivers/regulator/fixed.c-183-\tif (init_data-\u003econstraints.min_uV == init_data-\u003econstraints.max_uV) {\n--\ndrivers/regulator/fixed.c=218=static int reg_fixed_voltage_probe(struct platform_device *pdev)\n--\ndrivers/regulator/fixed.c-245-\tdrvdata-\u003edesc.name = devm_kstrdup(\u0026pdev-\u003edev,\ndrivers/regulator/fixed.c:246:\t\t\t\t\t config-\u003esupply_name,\ndrivers/regulator/fixed.c-247-\t\t\t\t\t GFP_KERNEL);\n--\ndrivers/regulator/fixed.c-278-\tif (config-\u003einput_supply) {\ndrivers/regulator/fixed.c:279:\t\tdrvdata-\u003edesc.supply_name = devm_kstrdup(\u0026pdev-\u003edev,\ndrivers/regulator/fixed.c-280-\t\t\t\t\t config-\u003einput_supply,\ndrivers/regulator/fixed.c-281-\t\t\t\t\t GFP_KERNEL);\ndrivers/regulator/fixed.c:282:\t\tif (!drvdata-\u003edesc.supply_name)\ndrivers/regulator/fixed.c-283-\t\t\treturn -ENOMEM;\n--\ndrivers/regulator/gpio-regulator.c=130=of_get_gpio_regulator_config(struct device *dev, struct device_node *np,\n--\ndrivers/regulator/gpio-regulator.c-148-\ndrivers/regulator/gpio-regulator.c:149:\tconfig-\u003esupply_name = config-\u003einit_data-\u003econstraints.name;\ndrivers/regulator/gpio-regulator.c-150-\n--\ndrivers/regulator/gpio-regulator.c=234=static int gpio_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/gpio-regulator.c-256-\ndrivers/regulator/gpio-regulator.c:257:\tdrvdata-\u003edesc.name = devm_kstrdup(dev, config-\u003esupply_name, GFP_KERNEL);\ndrivers/regulator/gpio-regulator.c-258-\tif (drvdata-\u003edesc.name == NULL) {\n--\ndrivers/regulator/gpio-regulator.c-268-\tif (config-\u003einput_supply) {\ndrivers/regulator/gpio-regulator.c:269:\t\tdrvdata-\u003edesc.supply_name = devm_kstrdup(\u0026pdev-\u003edev,\ndrivers/regulator/gpio-regulator.c-270-\t\t\t\t\t\t\t config-\u003einput_supply,\ndrivers/regulator/gpio-regulator.c-271-\t\t\t\t\t\t\t GFP_KERNEL);\ndrivers/regulator/gpio-regulator.c:272:\t\tif (!drvdata-\u003edesc.supply_name) {\ndrivers/regulator/gpio-regulator.c-273-\t\t\tdev_err(\u0026pdev-\u003edev,\n--\ndrivers/regulator/helpers.c=890=EXPORT_SYMBOL_GPL(regulator_get_current_limit_regmap);\n--\ndrivers/regulator/helpers.c-892-/**\ndrivers/regulator/helpers.c:893: * regulator_bulk_set_supply_names - initialize the 'supply' fields in an array\ndrivers/regulator/helpers.c-894- * of regulator_bulk_data structs\n--\ndrivers/regulator/helpers.c-896- * @consumers: array of regulator_bulk_data entries to initialize\ndrivers/regulator/helpers.c:897: * @supply_names: array of supply name strings\ndrivers/regulator/helpers.c-898- * @num_supplies: number of supply names to initialize\n--\ndrivers/regulator/helpers.c-901- */\ndrivers/regulator/helpers.c:902:void regulator_bulk_set_supply_names(struct regulator_bulk_data *consumers,\ndrivers/regulator/helpers.c:903:\t\t\t\t const char *const *supply_names,\ndrivers/regulator/helpers.c-904-\t\t\t\t unsigned int num_supplies)\n--\ndrivers/regulator/helpers.c-908-\tfor (i = 0; i \u003c num_supplies; i++)\ndrivers/regulator/helpers.c:909:\t\tconsumers[i].supply = supply_names[i];\ndrivers/regulator/helpers.c-910-}\ndrivers/regulator/helpers.c:911:EXPORT_SYMBOL_GPL(regulator_bulk_set_supply_names);\ndrivers/regulator/helpers.c-912-\n--\ndrivers/regulator/internal.h=45=struct regulator {\n--\ndrivers/regulator/internal.h-54-\tstruct regulator_voltage voltage[REGULATOR_STATES_NUM];\ndrivers/regulator/internal.h:55:\tconst char *supply_name;\ndrivers/regulator/internal.h-56-\tstruct device_attribute dev_attr;\n--\ndrivers/regulator/isl9305.c=69=static const struct regulator_desc isl9305_regulators[] = {\n--\ndrivers/regulator/isl9305.c-80-\t\t.enable_mask =\tISL9305_DCD1_EN,\ndrivers/regulator/isl9305.c:81:\t\t.supply_name =\t\"VINDCD1\",\ndrivers/regulator/isl9305.c-82-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/isl9305.c-95-\t\t.enable_mask =\tISL9305_DCD2_EN,\ndrivers/regulator/isl9305.c:96:\t\t.supply_name =\t\"VINDCD2\",\ndrivers/regulator/isl9305.c-97-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/isl9305.c-110-\t\t.enable_mask =\tISL9305_LDO1_EN,\ndrivers/regulator/isl9305.c:111:\t\t.supply_name =\t\"VINLDO1\",\ndrivers/regulator/isl9305.c-112-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/isl9305.c-125-\t\t.enable_mask =\tISL9305_LDO2_EN,\ndrivers/regulator/isl9305.c:126:\t\t.supply_name =\t\"VINLDO2\",\ndrivers/regulator/isl9305.c-127-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/lochnagar-regulator.c=139=static const struct regulator_desc lochnagar_regulators[] = {\n--\ndrivers/regulator/lochnagar-regulator.c-141-\t\t.name = \"MICVDD\",\ndrivers/regulator/lochnagar-regulator.c:142:\t\t.supply_name = \"SYSVDD\",\ndrivers/regulator/lochnagar-regulator.c-143-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lochnagar-regulator.c-164-\t\t.name = \"MIC1VDD\",\ndrivers/regulator/lochnagar-regulator.c:165:\t\t.supply_name = \"MICBIAS1\",\ndrivers/regulator/lochnagar-regulator.c-166-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lochnagar-regulator.c-179-\t\t.name = \"MIC2VDD\",\ndrivers/regulator/lochnagar-regulator.c:180:\t\t.supply_name = \"MICBIAS2\",\ndrivers/regulator/lochnagar-regulator.c-181-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lochnagar-regulator.c-194-\t\t.name = \"VDDCORE\",\ndrivers/regulator/lochnagar-regulator.c:195:\t\t.supply_name = \"SYSVDD\",\ndrivers/regulator/lochnagar-regulator.c-196-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lp873x-regulator.c-19-\t\t\t.name\t\t\t= _name,\t\t\\\ndrivers/regulator/lp873x-regulator.c:20:\t\t\t.supply_name\t\t= _of \"-in\",\t\t\\\ndrivers/regulator/lp873x-regulator.c-21-\t\t\t.id\t\t\t= _id,\t\t\t\\\n--\ndrivers/regulator/lp87565-regulator.c=15=enum LP87565_regulator_id {\n--\ndrivers/regulator/lp87565-regulator.c-30-\t\t\t.name\t\t\t= _name,\t\t\\\ndrivers/regulator/lp87565-regulator.c:31:\t\t\t.supply_name\t\t= _of \"-in\",\t\t\\\ndrivers/regulator/lp87565-regulator.c-32-\t\t\t.id\t\t\t= _id,\t\t\t\\\n--\ndrivers/regulator/max20086-regulator.c=70=static const struct regulator_ops max20086_buck_ops = {\n--\ndrivers/regulator/max20086-regulator.c-78-\t.name = \"OUT\"#n,\t\t\t\\\ndrivers/regulator/max20086-regulator.c:79:\t.supply_name = \"in\",\t\t\t\\\ndrivers/regulator/max20086-regulator.c-80-\t.id = (n) - 1,\t\t\t\t\\\n--\ndrivers/regulator/max20411-regulator.c=74=static const struct regulator_desc max20411_desc = {\n--\ndrivers/regulator/max20411-regulator.c-77-\t.type = REGULATOR_VOLTAGE,\ndrivers/regulator/max20411-regulator.c:78:\t.supply_name = \"vin\",\ndrivers/regulator/max20411-regulator.c-79-\t.name = \"max20411\",\n--\ndrivers/regulator/max5970-regulator.c=348=static int max597x_dt_parse(struct device_node *np,\n--\ndrivers/regulator/max5970-regulator.c-373-\t.owner = THIS_MODULE, \\\ndrivers/regulator/max5970-regulator.c:374:\t.supply_name = _supply, \\\ndrivers/regulator/max5970-regulator.c-375-\t.enable_reg = _ereg, \\\n--\ndrivers/regulator/max77620-regulator.c=644=static const struct regulator_ops max77620_regulator_ops = {\n--\ndrivers/regulator/max77620-regulator.c-675-\t\t\t.of_parse_cb = max77620_of_parse_cb,\t\t\\\ndrivers/regulator/max77620-regulator.c:676:\t\t\t.supply_name = _sname,\t\t\t\t\\\ndrivers/regulator/max77620-regulator.c-677-\t\t\t.id = MAX77620_REGULATOR_ID_##_id,\t\t\\\n--\ndrivers/regulator/max77620-regulator.c-707-\t\t\t.of_parse_cb = max77620_of_parse_cb,\t\t\\\ndrivers/regulator/max77620-regulator.c:708:\t\t\t.supply_name = _sname,\t\t\t\t\\\ndrivers/regulator/max77620-regulator.c-709-\t\t\t.id = MAX77620_REGULATOR_ID_##_id,\t\t\\\n--\ndrivers/regulator/max77650-regulator.c=146=static const struct max77650_regulator_desc max77650_LDO_desc = {\n--\ndrivers/regulator/max77650-regulator.c-150-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:151:\t\t.supply_name\t\t= \"in-ldo\",\ndrivers/regulator/max77650-regulator.c-152-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_LDO,\n--\ndrivers/regulator/max77650-regulator.c=172=static const struct max77650_regulator_desc max77650_SBB0_desc = {\n--\ndrivers/regulator/max77650-regulator.c-176-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:177:\t\t.supply_name\t\t= \"in-sbb0\",\ndrivers/regulator/max77650-regulator.c-178-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB0,\n--\ndrivers/regulator/max77650-regulator.c=202=static const struct max77650_regulator_desc max77650_SBB1_desc = {\n--\ndrivers/regulator/max77650-regulator.c-206-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:207:\t\t.supply_name\t\t= \"in-sbb1\",\ndrivers/regulator/max77650-regulator.c-208-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB1,\n--\ndrivers/regulator/max77650-regulator.c=232=static const struct max77650_regulator_desc max77651_SBB1_desc = {\n--\ndrivers/regulator/max77650-regulator.c-236-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:237:\t\t.supply_name\t\t= \"in-sbb1\",\ndrivers/regulator/max77650-regulator.c-238-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB1,\n--\ndrivers/regulator/max77650-regulator.c=265=static const struct max77650_regulator_desc max77650_SBB2_desc = {\n--\n\n"
} |
| 39/2 | 2026/09/19 15:10 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 56347 output: 26 thoughts: 868 Thoughts: **Analyzing a Curious Regulator Loop** Okay, so I'm looking at this code in `drivers/regulator/axp20x-regulator.c`, specifically line 716 and the definition of `axp22x_drivevbus_regulator`. That's interesting - both the `name` and `supply_name` are set to "drivevbus". That immediately raises a flag. When this regulator is registered, `regulator_resolve_supply(rdev)` gets called. The lookup process, `regulator_lookup_by_name(supply)` will inevitably find *itself*! `r == rdev`. The code even *comments* it, "Supply for drivevbus (drivevbus) resolved to itself". Now, I'm thinking about the implications. `axp20x` is that X-Powers PMIC, usually seen with Allwinner SoCs via I2C or RSB. No, this isn't something easily emulated in QEMU, given its hardware nature. The "r == rdev" situation triggers an error message and, if full constraints aren't present, an `EINVAL` error. This seems like a specific edge case. The code appears to explicitly handle situations where a regulator's supply is configured to be *itself* - it's a legitimate configuration in device trees, platform definitions, or even by accident. It then replaces the regulator with a `dummy_regulator_rdev` and `get_device` is called. My next thought is, how can this scenario be triggered, perhaps from a user space perspective? Can syzkaller, our favorite fuzzer, induce this condition? I need to understand if `regulator_resolve_supply` is even reachable via user-space interaction. I need to know how syzkaller operates and interacts with the kernel. So, where is `regulator_resolve_supply` called? I see it's called by `_regulator_get_common`. That function is, in turn, called by `regulator_get`, `devm_regulator_get`, `regulator_get_optional`, and `regulator_get_exclusive`. Now the key question: can any of these be triggered from user-space? Specifically, are these calls invoked within the `open()`, `ioctl()`, or `write()` calls of drivers that are user-accessible? Perhaps from USB gadget or raw-gadget drivers? Or maybe through Netlink or sysfs interaction? I'll need to grep the driver code for instances of `regulator_get` within those entry points to get a clearer picture of potential attack vectors. |
| 40/2 | 2026/09/19 15:10 | tool | grepper |
0mArgs:{
"Expression": "\\bregulator_get(_optional|_exclusive)?\\("
}Results: {
"Output": "Documentation/power/regulator/consumer.rst=12=A consumer driver can get access to its supply regulator by calling ::\nDocumentation/power/regulator/consumer.rst-13-\nDocumentation/power/regulator/consumer.rst:14:\tregulator = regulator_get(dev, \"Vcc\");\nDocumentation/power/regulator/consumer.rst-15-\n--\nDocumentation/power/regulator/consumer.rst=26=analog and digital supplies by means of bulk operations ::\n--\nDocumentation/power/regulator/consumer.rst-38-\nDocumentation/power/regulator/consumer.rst:39:The regulator access functions regulator_get() and regulator_put() will\nDocumentation/power/regulator/consumer.rst-40-usually be called in your device drivers probe() and remove() respectively.\n--\nDocumentation/power/regulator/consumer.rst=253=To access the hardware for enabling/disabling the regulator, consumers must\nDocumentation/power/regulator/consumer.rst:254:use regulator_get_exclusive(), as it can't work if there's more than one\nDocumentation/power/regulator/consumer.rst-255-consumer. To enable/disable regulator use::\n--\narch/arm/mach-omap1/board-ams-delta.c=804=static int ams_delta_modem_pm_activate(struct device *dev)\narch/arm/mach-omap1/board-ams-delta.c-805-{\narch/arm/mach-omap1/board-ams-delta.c:806:\tmodem_priv.regulator = regulator_get(dev, \"RESET#\");\narch/arm/mach-omap1/board-ams-delta.c-807-\tif (IS_ERR(modem_priv.regulator))\n--\ndrivers/ata/libahci_platform.c=403=static int ahci_platform_get_regulator(struct ahci_host_priv *hpriv, u32 port,\n--\ndrivers/ata/libahci_platform.c-408-\ndrivers/ata/libahci_platform.c:409:\ttarget_pwr = regulator_get(dev, \"target\");\ndrivers/ata/libahci_platform.c-410-\n--\ndrivers/clk/tegra/clk-tegra124-dfll-fcpu.c=641=static int get_alignment_from_regulator(struct device *dev,\n--\ndrivers/clk/tegra/clk-tegra124-dfll-fcpu.c-643-{\ndrivers/clk/tegra/clk-tegra124-dfll-fcpu.c:644:\tstruct regulator *reg = regulator_get(dev, \"vdd-cpu\");\ndrivers/clk/tegra/clk-tegra124-dfll-fcpu.c-645-\n--\ndrivers/cpufreq/imx6q-cpufreq.c=323=static int imx6q_cpufreq_probe(struct platform_device *pdev)\n--\ndrivers/cpufreq/imx6q-cpufreq.c-355-\ndrivers/cpufreq/imx6q-cpufreq.c:356:\tarm_reg = regulator_get(cpu_dev, \"arm\");\ndrivers/cpufreq/imx6q-cpufreq.c:357:\tpu_reg = regulator_get_optional(cpu_dev, \"pu\");\ndrivers/cpufreq/imx6q-cpufreq.c:358:\tsoc_reg = regulator_get(cpu_dev, \"soc\");\ndrivers/cpufreq/imx6q-cpufreq.c-359-\tif (PTR_ERR(arm_reg) == -EPROBE_DEFER ||\n--\ndrivers/cpufreq/mediatek-cpufreq.c=384=static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu)\n--\ndrivers/cpufreq/mediatek-cpufreq.c-419-\ndrivers/cpufreq/mediatek-cpufreq.c:420:\tinfo-\u003eproc_reg = regulator_get_optional(cpu_dev, \"proc\");\ndrivers/cpufreq/mediatek-cpufreq.c-421-\tif (IS_ERR(info-\u003eproc_reg)) {\n--\ndrivers/cpufreq/mediatek-cpufreq.c-434-\t/* Both presence and absence of sram regulator are valid cases. */\ndrivers/cpufreq/mediatek-cpufreq.c:435:\tinfo-\u003esram_reg = regulator_get_optional(cpu_dev, \"sram\");\ndrivers/cpufreq/mediatek-cpufreq.c-436-\tif (IS_ERR(info-\u003esram_reg)) {\n--\ndrivers/cpufreq/pxa2xx-cpufreq.c=128=static void pxa_cpufreq_init_voltages(void)\ndrivers/cpufreq/pxa2xx-cpufreq.c-129-{\ndrivers/cpufreq/pxa2xx-cpufreq.c:130:\tvcc_core = regulator_get(NULL, \"vcc_core\");\ndrivers/cpufreq/pxa2xx-cpufreq.c-131-\tif (IS_ERR(vcc_core)) {\n--\ndrivers/cpufreq/s3c64xx-cpufreq.c=146=static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)\n--\ndrivers/cpufreq/s3c64xx-cpufreq.c-160-#ifdef CONFIG_REGULATOR\ndrivers/cpufreq/s3c64xx-cpufreq.c:161:\tvddarm = regulator_get(NULL, \"vddarm\");\ndrivers/cpufreq/s3c64xx-cpufreq.c-162-\tif (IS_ERR(vddarm)) {\n--\ndrivers/cpufreq/s5pv210-cpufreq.c=591=static int s5pv210_cpufreq_probe(struct platform_device *pdev)\n--\ndrivers/cpufreq/s5pv210-cpufreq.c-604-\t */\ndrivers/cpufreq/s5pv210-cpufreq.c:605:\tarm_regulator = regulator_get(NULL, \"vddarm\");\ndrivers/cpufreq/s5pv210-cpufreq.c-606-\tif (IS_ERR(arm_regulator))\n--\ndrivers/cpufreq/s5pv210-cpufreq.c-609-\ndrivers/cpufreq/s5pv210-cpufreq.c:610:\tint_regulator = regulator_get(NULL, \"vddint\");\ndrivers/cpufreq/s5pv210-cpufreq.c-611-\tif (IS_ERR(int_regulator)) {\n--\ndrivers/dma/ste_dma40.c=3492=static int __init d40_probe(struct platform_device *pdev)\n--\ndrivers/dma/ste_dma40.c-3595-\ndrivers/dma/ste_dma40.c:3596:\t\tbase-\u003elcpa_regulator = regulator_get(base-\u003edev, \"lcla_esram\");\ndrivers/dma/ste_dma40.c-3597-\t\tif (IS_ERR(base-\u003elcpa_regulator)) {\n--\ndrivers/gpu/drm/sysfb/simpledrm.c=391=static int simpledrm_device_init_regulators(struct simpledrm_device *sdev)\n--\ndrivers/gpu/drm/sysfb/simpledrm.c-430-\ndrivers/gpu/drm/sysfb/simpledrm.c:431:\t\tregulator = regulator_get_optional(\u0026pdev-\u003edev, name);\ndrivers/gpu/drm/sysfb/simpledrm.c-432-\t\tif (IS_ERR(regulator)) {\n--\ndrivers/input/misc/max8997_haptic.c=232=static int max8997_haptic_probe(struct platform_device *pdev)\n--\ndrivers/input/misc/max8997_haptic.c-296-\ndrivers/input/misc/max8997_haptic.c:297:\tchip-\u003eregulator = regulator_get(\u0026pdev-\u003edev, \"inmotor\");\ndrivers/input/misc/max8997_haptic.c-298-\tif (IS_ERR(chip-\u003eregulator)) {\n--\ndrivers/mfd/arizona-core.c=934=int arizona_dev_init(struct arizona *arizona)\n--\ndrivers/mfd/arizona-core.c-1018-\t */\ndrivers/mfd/arizona-core.c:1019:\tarizona-\u003edcvdd = regulator_get(arizona-\u003edev, \"DCVDD\");\ndrivers/mfd/arizona-core.c-1020-\tif (IS_ERR(arizona-\u003edcvdd)) {\n--\ndrivers/mfd/madera-core.c=454=int madera_dev_init(struct madera *madera)\n--\ndrivers/mfd/madera-core.c-549-\t */\ndrivers/mfd/madera-core.c:550:\tmadera-\u003edcvdd = regulator_get(madera-\u003edev, \"DCVDD\");\ndrivers/mfd/madera-core.c-551-\tif (IS_ERR(madera-\u003edcvdd)) {\n--\ndrivers/mmc/host/sdhci-omap.c=942=static unsigned int sdhci_omap_regulator_get_caps(struct device *dev,\n--\ndrivers/mmc/host/sdhci-omap.c-947-\ndrivers/mmc/host/sdhci-omap.c:948:\treg = regulator_get(dev, name);\ndrivers/mmc/host/sdhci-omap.c-949-\tif (IS_ERR(reg))\n--\ndrivers/net/pse-pd/pse_core.c=945=static int pse_register_pw_ds(struct pse_controller_dev *pcdev)\n--\ndrivers/net/pse-pd/pse_core.c-983-\ndrivers/net/pse-pd/pse_core.c:984:\t\tsupply = regulator_get(\u0026rdev-\u003edev, rdev-\u003esupply_name);\ndrivers/net/pse-pd/pse_core.c-985-\t\tif (IS_ERR(supply)) {\n--\ndrivers/net/pse-pd/pse_core.c=1401=pse_control_get_internal(struct pse_controller_dev *pcdev, unsigned int index,\n--\ndrivers/net/pse-pd/pse_core.c-1438-\tpcdev-\u003epi[index].admin_state_enabled = ret;\ndrivers/net/pse-pd/pse_core.c:1439:\tpsec-\u003eps = regulator_get_exclusive(pcdev-\u003edev,\ndrivers/net/pse-pd/pse_core.c-1440-\t\t\t\t\t rdev_get_name(pcdev-\u003epi[index].rdev));\n--\ndrivers/net/wan/framer/framer-core.c=607=struct framer *framer_create(struct device *dev, struct device_node *node,\n--\ndrivers/net/wan/framer/framer-core.c-645-\t/* framer-supply */\ndrivers/net/wan/framer/framer-core.c:646:\tframer-\u003epwr = regulator_get_optional(\u0026framer-\u003edev, \"framer\");\ndrivers/net/wan/framer/framer-core.c-647-\tif (IS_ERR(framer-\u003epwr)) {\n--\ndrivers/opp/core.c=2237=static int _opp_set_regulators(struct opp_table *opp_table, struct device *dev,\n--\ndrivers/opp/core.c-2259-\tfor (i = 0; i \u003c count; i++) {\ndrivers/opp/core.c:2260:\t\treg = regulator_get_optional(dev, names[i]);\ndrivers/opp/core.c-2261-\t\tif (IS_ERR(reg)) {\n--\ndrivers/phy/phy-core.c=997=struct phy *phy_create(struct device *dev, struct device_node *node,\n--\ndrivers/phy/phy-core.c-1032-\t/* phy-supply */\ndrivers/phy/phy-core.c:1033:\tphy-\u003epwr = regulator_get_optional(\u0026phy-\u003edev, \"phy\");\ndrivers/phy/phy-core.c-1034-\tif (IS_ERR(phy-\u003epwr)) {\n--\ndrivers/phy/tegra/xusb.c=743=static int tegra_xusb_usb2_port_parse_dt(struct tegra_xusb_usb2_port *usb2)\n--\ndrivers/phy/tegra/xusb.c-779-\ndrivers/phy/tegra/xusb.c:780:\tusb2-\u003esupply = regulator_get(\u0026port-\u003edev, \"vbus\");\ndrivers/phy/tegra/xusb.c-781-\treturn PTR_ERR_OR_ZERO(usb2-\u003esupply);\n--\ndrivers/pinctrl/sunxi/pinctrl-sunxi.c=887=static int sunxi_pmx_request(struct pinctrl_dev *pctldev, unsigned offset)\n--\ndrivers/pinctrl/sunxi/pinctrl-sunxi.c-906-\tsnprintf(supply, sizeof(supply), \"vcc-p%c\", 'a' + bank);\ndrivers/pinctrl/sunxi/pinctrl-sunxi.c:907:\treg = regulator_get(pctl-\u003edev, supply);\ndrivers/pinctrl/sunxi/pinctrl-sunxi.c-908-\tif (IS_ERR(reg))\n--\ndrivers/platform/x86/intel/chtwc_int33fe.c=313=static int cht_int33fe_typec_probe(struct platform_device *pdev)\n--\ndrivers/platform/x86/intel/chtwc_int33fe.c-343-\t */\ndrivers/platform/x86/intel/chtwc_int33fe.c:344:\tregulator = regulator_get_optional(dev, \"cht_wc_usb_typec_vbus\");\ndrivers/platform/x86/intel/chtwc_int33fe.c-345-\tif (IS_ERR(regulator)) {\n--\ndrivers/power/supply/charger-manager.c=1017=static int charger_manager_get_regulators(struct charger_manager *cm)\n--\ndrivers/power/supply/charger-manager.c-1024-\t\tcharger = \u0026desc-\u003echarger_regulators[i];\ndrivers/power/supply/charger-manager.c:1025:\t\tcharger-\u003econsumer = regulator_get(cm-\u003edev,\ndrivers/power/supply/charger-manager.c-1026-\t\t\t\t\t\t charger-\u003eregulator_name);\n--\ndrivers/regulator/core.c=2553=struct regulator *_regulator_get(struct device *dev, const char *id,\n--\ndrivers/regulator/core.c-2579- */\ndrivers/regulator/core.c:2580:struct regulator *regulator_get(struct device *dev, const char *id)\ndrivers/regulator/core.c-2581-{\n--\ndrivers/regulator/core.c=2584=EXPORT_SYMBOL_GPL(regulator_get);\n--\ndrivers/regulator/core.c-2607- */\ndrivers/regulator/core.c:2608:struct regulator *regulator_get_exclusive(struct device *dev, const char *id)\ndrivers/regulator/core.c-2609-{\n--\ndrivers/regulator/core.c=2612=EXPORT_SYMBOL_GPL(regulator_get_exclusive);\n--\ndrivers/regulator/core.c-2621- * It can allow the regulator core to provide stub supplies for other\ndrivers/regulator/core.c:2622: * supplies requested using normal regulator_get() calls without\ndrivers/regulator/core.c-2623- * disrupting the operation of drivers that can handle absent\n--\ndrivers/regulator/core.c-2633- */\ndrivers/regulator/core.c:2634:struct regulator *regulator_get_optional(struct device *dev, const char *id)\ndrivers/regulator/core.c-2635-{\n--\ndrivers/regulator/devres.c=22=static struct regulator *_devm_regulator_get(struct device *dev, const char *id,\n--\ndrivers/regulator/devres.c-42-/**\ndrivers/regulator/devres.c:43: * devm_regulator_get - Resource managed regulator_get()\ndrivers/regulator/devres.c-44- * @dev: device to supply\n--\ndrivers/regulator/devres.c-46- *\ndrivers/regulator/devres.c:47: * Managed regulator_get(). Regulators returned from this function are\ndrivers/regulator/devres.c:48: * automatically regulator_put() on driver detach. See regulator_get() for more\ndrivers/regulator/devres.c-49- * information.\n--\ndrivers/regulator/devres.c=55=EXPORT_SYMBOL_GPL(devm_regulator_get);\n--\ndrivers/regulator/devres.c-57-/**\ndrivers/regulator/devres.c:58: * devm_regulator_get_exclusive - Resource managed regulator_get_exclusive()\ndrivers/regulator/devres.c-59- * @dev: device to supply\n--\ndrivers/regulator/devres.c-61- *\ndrivers/regulator/devres.c:62: * Managed regulator_get_exclusive(). Regulators returned from this function\ndrivers/regulator/devres.c:63: * are automatically regulator_put() on driver detach. See regulator_get() for\ndrivers/regulator/devres.c-64- * more information.\n--\ndrivers/regulator/devres.c=80=static int _devm_regulator_get_enable(struct device *dev, const char *id,\n--\ndrivers/regulator/devres.c-106- * regulator_disable() and regulator_put() are automatically called on driver\ndrivers/regulator/devres.c:107: * detach. See regulator_get_optional() and regulator_enable() for more\ndrivers/regulator/devres.c-108- * information.\n--\ndrivers/regulator/devres.c=114=EXPORT_SYMBOL_GPL(devm_regulator_get_enable_optional);\n--\ndrivers/regulator/devres.c-122- * regulator_disable() and regulator_put() are automatically called on driver\ndrivers/regulator/devres.c:123: * detach. See regulator_get() and regulator_enable() for more\ndrivers/regulator/devres.c-124- * information.\n--\ndrivers/regulator/devres.c=130=EXPORT_SYMBOL_GPL(devm_regulator_get_enable);\n--\ndrivers/regulator/devres.c-132-/**\ndrivers/regulator/devres.c:133: * devm_regulator_get_optional - Resource managed regulator_get_optional()\ndrivers/regulator/devres.c-134- * @dev: device to supply\n--\ndrivers/regulator/devres.c-136- *\ndrivers/regulator/devres.c:137: * Managed regulator_get_optional(). Regulators returned from this\ndrivers/regulator/devres.c-138- * function are automatically regulator_put() on driver detach. See\ndrivers/regulator/devres.c:139: * regulator_get_optional() for more information.\ndrivers/regulator/devres.c-140- */\n--\ndrivers/regulator/devres.c=146=EXPORT_SYMBOL_GPL(devm_regulator_get_optional);\n--\ndrivers/regulator/devres.c-155- * regulator_disable() and regulator_put() are automatically called on driver\ndrivers/regulator/devres.c:156: * detach. See regulator_get_optional(), regulator_enable(), and\ndrivers/regulator/devres.c-157- * regulator_get_voltage() for more information.\n--\ndrivers/regulator/devres.c=788=EXPORT_SYMBOL_GPL(devm_of_regulator_get);\n--\ndrivers/regulator/devres.c-795- *\ndrivers/regulator/devres.c:796: * Managed regulator_get_optional(). Regulators returned from this\ndrivers/regulator/devres.c-797- * function are automatically regulator_put() on driver detach. See\n--\ndrivers/regulator/of_regulator.c=935=int of_regulator_bulk_get_all(struct device *dev, struct device_node *np,\n--\ndrivers/regulator/of_regulator.c-959-\t\t\tname[i] = '\\0';\ndrivers/regulator/of_regulator.c:960:\t\t\ttmp = regulator_get(dev, name);\ndrivers/regulator/of_regulator.c-961-\t\t\tif (IS_ERR(tmp)) {\n--\ndrivers/staging/media/atomisp/pci/atomisp_gmin_platform.c=467=static int gmin_subdev_add(struct gmin_subdev *gs)\n--\ndrivers/staging/media/atomisp/pci/atomisp_gmin_platform.c-592-\tcase PMIC_REGULATOR:\ndrivers/staging/media/atomisp/pci/atomisp_gmin_platform.c:593:\t\tgs-\u003ev1p8_reg = regulator_get(dev, \"V1P8SX\");\ndrivers/staging/media/atomisp/pci/atomisp_gmin_platform.c:594:\t\tgs-\u003ev2p8_reg = regulator_get(dev, \"V2P8SX\");\ndrivers/staging/media/atomisp/pci/atomisp_gmin_platform.c-595-\ndrivers/staging/media/atomisp/pci/atomisp_gmin_platform.c:596:\t\tgs-\u003ev1p2_reg = regulator_get(dev, \"V1P2A\");\ndrivers/staging/media/atomisp/pci/atomisp_gmin_platform.c-597-\n--\ndrivers/ufs/host/ufs-mediatek.c=679=static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba)\n--\ndrivers/ufs/host/ufs-mediatek.c-682-\ndrivers/ufs/host/ufs-mediatek.c:683:\thost-\u003ereg_va09 = regulator_get(hba-\u003edev, \"va09\");\ndrivers/ufs/host/ufs-mediatek.c-684-\tif (IS_ERR(host-\u003ereg_va09))\n--\ndrivers/usb/musb/da8xx.c=434=static inline u8 get_vbus_power(struct device *dev)\n--\ndrivers/usb/musb/da8xx.c-438-\ndrivers/usb/musb/da8xx.c:439:\tvbus_supply = regulator_get_optional(dev, \"vbus\");\ndrivers/usb/musb/da8xx.c-440-\tif (IS_ERR(vbus_supply))\n--\ndrivers/usb/phy/phy-twl6030-usb.c=144=static int twl6030_usb_ldo_init(struct twl6030_usb *twl)\n--\ndrivers/usb/phy/phy-twl6030-usb.c-154-\ndrivers/usb/phy/phy-twl6030-usb.c:155:\ttwl-\u003eusb3v3 = regulator_get(twl-\u003edev, \"usb\");\ndrivers/usb/phy/phy-twl6030-usb.c-156-\tif (IS_ERR(twl-\u003eusb3v3))\n--\ninclude/linux/regulator/consumer.h=141=struct regulator_bulk_data {\n--\ninclude/linux/regulator/consumer.h-152-/* regulator get and put */\ninclude/linux/regulator/consumer.h:153:struct regulator *__must_check regulator_get(struct device *dev,\ninclude/linux/regulator/consumer.h-154-\t\t\t\t\t const char *id);\ninclude/linux/regulator/consumer.h=155=struct regulator *__must_check devm_regulator_get(struct device *dev,\ninclude/linux/regulator/consumer.h-156-\t\t\t\t\t const char *id);\ninclude/linux/regulator/consumer.h:157:struct regulator *__must_check regulator_get_exclusive(struct device *dev,\ninclude/linux/regulator/consumer.h-158-\t\t\t\t\t\t const char *id);\ninclude/linux/regulator/consumer.h=159=struct regulator *__must_check devm_regulator_get_exclusive(struct device *dev,\ninclude/linux/regulator/consumer.h-160-\t\t\t\t\t\t\tconst char *id);\ninclude/linux/regulator/consumer.h:161:struct regulator *__must_check regulator_get_optional(struct device *dev,\ninclude/linux/regulator/consumer.h-162-\t\t\t\t\t\t const char *id);\n--\ninclude/linux/regulator/consumer.h=286=bool regulator_is_equal(struct regulator *reg1, struct regulator *reg2);\n--\ninclude/linux/regulator/consumer.h-293- */\ninclude/linux/regulator/consumer.h:294:static inline struct regulator *__must_check regulator_get(struct device *dev,\ninclude/linux/regulator/consumer.h-295-\tconst char *id)\n--\ninclude/linux/regulator/consumer.h=314=static inline struct regulator *__must_check\ninclude/linux/regulator/consumer.h:315:regulator_get_exclusive(struct device *dev, const char *id)\ninclude/linux/regulator/consumer.h-316-{\n--\ninclude/linux/regulator/consumer.h=343=static inline struct regulator *__must_check\ninclude/linux/regulator/consumer.h:344:regulator_get_optional(struct device *dev, const char *id)\ninclude/linux/regulator/consumer.h-345-{\n--\nrust/helpers/regulator.c=23=__rust_helper struct regulator *rust_helper_regulator_get(struct device *dev,\n--\nrust/helpers/regulator.c-25-{\nrust/helpers/regulator.c:26:\treturn regulator_get(dev, id);\nrust/helpers/regulator.c-27-}\n--\nrust/kernel/regulator.rs=105=pub fn devm_enable_optional(dev: \u0026Device\u003cBound\u003e, name: \u0026CStr) -\u003e Result {\n--\nrust/kernel/regulator.rs-235-/// - `inner` is a pointer obtained from a successful call to\nrust/kernel/regulator.rs:236:/// [`regulator_get()`]. It is treated as an opaque token that may only be\nrust/kernel/regulator.rs-237-/// accessed using C API methods (e.g., it may be `NULL` if the C API returns\n--\nrust/kernel/regulator.rs-239-///\nrust/kernel/regulator.rs:240:/// [`regulator_get()`]: https://docs.kernel.org/driver-api/regulator.html#c.regulator_get\nrust/kernel/regulator.rs-241-pub struct Regulator\u003cState\u003e\n--\nrust/kernel/regulator.rs=272= fn get_internal(dev: \u0026Device, name: \u0026CStr) -\u003e Result\u003cRegulator\u003cT\u003e\u003e {\nrust/kernel/regulator.rs-273- let inner =\nrust/kernel/regulator.rs:274: // SAFETY: It is safe to call `regulator_get()`, on a device pointer\nrust/kernel/regulator.rs-275- // received from the C code.\nrust/kernel/regulator.rs:276: from_err_ptr(unsafe { bindings::regulator_get(dev.as_raw(), name.as_char_ptr()) })?;\nrust/kernel/regulator.rs-277-\nrust/kernel/regulator.rs:278: // INVARIANT: `inner` is a pointer obtained from `regulator_get()`, and\nrust/kernel/regulator.rs-279- // the call was successful.\n--\nrust/kernel/regulator.rs=304= pub fn try_into_enabled(self) -\u003e Result\u003cRegulator\u003cEnabled\u003e, Error\u003cDisabled\u003e\u003e {\nrust/kernel/regulator.rs:305: // We will be transferring the ownership of our `regulator_get()` count to\nrust/kernel/regulator.rs-306- // `Regulator\u003cEnabled\u003e`.\n--\nrust/kernel/regulator.rs=333= pub fn try_into_disabled(self) -\u003e Result\u003cRegulator\u003cDisabled\u003e, Error\u003cEnabled\u003e\u003e {\nrust/kernel/regulator.rs:334: // We will be transferring the ownership of our `regulator_get()` count\nrust/kernel/regulator.rs-335- // to `Regulator\u003cDisabled\u003e`.\n--\nsound/soc/codecs/cx20442.c=347=static int cx20442_component_probe(struct snd_soc_component *component)\n--\nsound/soc/codecs/cx20442.c-354-\nsound/soc/codecs/cx20442.c:355:\tcx20442-\u003epor = regulator_get(component-\u003edev, \"POR\");\nsound/soc/codecs/cx20442.c-356-\tif (IS_ERR(cx20442-\u003epor)) {\n--\nsound/soc/codecs/cx20442.c-361-\t\t * When running on a non-dt platform and requested regulator\nsound/soc/codecs/cx20442.c:362:\t\t * is not available, regulator_get() never returns\nsound/soc/codecs/cx20442.c-363-\t\t * -EPROBE_DEFER as it is not able to justify if the regulator\n--\nsound/soc/codecs/cx20442.c-365-\t\t * still set full constraints flag at late_initcall in order\nsound/soc/codecs/cx20442.c:366:\t\t * to instruct regulator_get() to return a dummy one if\nsound/soc/codecs/cx20442.c-367-\t\t * sufficient. Hence, if we get -ENODEV here, let's convert\n--\nsound/soc/codecs/sgtl5000.c=1419=static int sgtl5000_enable_regulators(struct i2c_client *client)\n--\nsound/soc/codecs/sgtl5000.c-1429-\nsound/soc/codecs/sgtl5000.c:1430:\tvddd = regulator_get_optional(\u0026client-\u003edev, \"VDDD\");\nsound/soc/codecs/sgtl5000.c-1431-\tif (IS_ERR(vddd)) {\n--\nsound/soc/ti/omap3pandora.c=224=static int __init omap3pandora_soc_init(void)\n--\nsound/soc/ti/omap3pandora.c-261-\nsound/soc/ti/omap3pandora.c:262:\tomap3pandora_dac_reg = regulator_get(\u0026omap3pandora_snd_device-\u003edev, \"vcc\");\nsound/soc/ti/omap3pandora.c-263-\tif (IS_ERR(omap3pandora_dac_reg)) {\n"
} |
| 41/2 | 2026/09/19 15:10 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 65951 output: 37 thoughts: 38 Thoughts: Here's my take on those files! **Digging into Regulator Implementation** Okay, hold on a second! Before I get too deep into this particular regulator issue, I need to check something. I'm going to take a look at a couple of files that are likely to be relevant. Specifically, I want to pull up and examine `drivers/regulator/userspace-consumer.c` and `drivers/regulator/virtual.c`. These seem like excellent starting points to understand how userspace consumption and virtualization are handled within this subsystem. I'm going to dive into the code and see how they are structured, what interfaces they provide, and how they relate to the broader regulator framework. This might give me some critical insights! |
| 42/2 | 2026/09/19 15:10 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/userspace-consumer.c",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0-or-later\n 2:\t/*\n 3:\t * userspace-consumer.c\n 4:\t *\n 5:\t * Copyright 2009 CompuLab, Ltd.\n 6:\t *\n 7:\t * Author: Mike Rapoport \u003cmike@compulab.co.il\u003e\n 8:\t *\n 9:\t * Based of virtual consumer driver:\n 10:\t * Copyright 2008 Wolfson Microelectronics PLC.\n 11:\t * Author: Mark Brown \u003cbroonie@opensource.wolfsonmicro.com\u003e\n 12:\t */\n 13:\t\n 14:\t#include \u003clinux/err.h\u003e\n 15:\t#include \u003clinux/mutex.h\u003e\n 16:\t#include \u003clinux/module.h\u003e\n 17:\t#include \u003clinux/of.h\u003e\n 18:\t#include \u003clinux/platform_device.h\u003e\n 19:\t#include \u003clinux/regulator/consumer.h\u003e\n 20:\t#include \u003clinux/regulator/userspace-consumer.h\u003e\n 21:\t#include \u003clinux/slab.h\u003e\n 22:\t\n 23:\tstruct userspace_consumer_data {\n 24:\t\tconst char *name;\n 25:\t\n 26:\t\tstruct mutex lock;\n 27:\t\tbool enabled;\n 28:\t\tbool no_autoswitch;\n 29:\t\n 30:\t\tint num_supplies;\n 31:\t\tstruct regulator_bulk_data *supplies;\n 32:\t};\n 33:\t\n 34:\tstatic ssize_t name_show(struct device *dev,\n 35:\t\t\t\t struct device_attribute *attr, char *buf)\n 36:\t{\n 37:\t\tstruct userspace_consumer_data *data = dev_get_drvdata(dev);\n 38:\t\n 39:\t\treturn sprintf(buf, \"%s\\n\", data-\u003ename);\n 40:\t}\n 41:\t\n 42:\tstatic ssize_t state_show(struct device *dev,\n 43:\t\t\t\t struct device_attribute *attr, char *buf)\n 44:\t{\n 45:\t\tstruct userspace_consumer_data *data = dev_get_drvdata(dev);\n 46:\t\n 47:\t\tif (data-\u003eenabled)\n 48:\t\t\treturn sprintf(buf, \"enabled\\n\");\n 49:\t\n 50:\t\treturn sprintf(buf, \"disabled\\n\");\n 51:\t}\n 52:\t\n 53:\tstatic ssize_t state_store(struct device *dev, struct device_attribute *attr,\n 54:\t\t\t\t const char *buf, size_t count)\n 55:\t{\n 56:\t\tstruct userspace_consumer_data *data = dev_get_drvdata(dev);\n 57:\t\tbool enabled;\n 58:\t\tint ret;\n 59:\t\n 60:\t\t/*\n 61:\t\t * sysfs_streq() doesn't need the \\n's, but we add them so the strings\n 62:\t\t * will be shared with show_state(), above.\n 63:\t\t */\n 64:\t\tif (sysfs_streq(buf, \"enabled\\n\") || sysfs_streq(buf, \"1\"))\n 65:\t\t\tenabled = true;\n 66:\t\telse if (sysfs_streq(buf, \"disabled\\n\") || sysfs_streq(buf, \"0\"))\n 67:\t\t\tenabled = false;\n 68:\t\telse {\n 69:\t\t\tdev_err(dev, \"Configuring invalid mode\\n\");\n 70:\t\t\treturn count;\n 71:\t\t}\n 72:\t\n 73:\t\tmutex_lock(\u0026data-\u003elock);\n 74:\t\tif (enabled != data-\u003eenabled) {\n 75:\t\t\tif (enabled)\n 76:\t\t\t\tret = regulator_bulk_enable(data-\u003enum_supplies,\n 77:\t\t\t\t\t\t\t data-\u003esupplies);\n 78:\t\t\telse\n 79:\t\t\t\tret = regulator_bulk_disable(data-\u003enum_supplies,\n 80:\t\t\t\t\t\t\t data-\u003esupplies);\n"
} |
| 43/2 | 2026/09/19 15:10 | llm | patch-evaluator-compressor |
0mModel:gemini-3.8-flash Args: null Results: null Reply: ### 1. Approaches Tried and Their Results
- **Patch Inspection**:
- Examined commit `a7612d0c3daf897f2489b21df887dd85e7486ca4` in `drivers/regulator/core.c`:
```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 6a4008f387b5e..812e1d61d4019 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2239,6 +2239,7 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
if (r == rdev) {
dev_err(dev, "Supply for %s (%s) resolved to itself\n",
rdev->desc->name, rdev->supply_name);
+ put_device(&rdev->dev);
if (!have_full_constraints()) {
ret = -EINVAL;
goto out;
```
- Identified the change: Adds `put_device(&rdev->dev)` inside `regulator_resolve_supply()` when a regulator's supply resolves to itself (`r == rdev`).
- **Surrounding Logic and Reference Counting Analysis (`drivers/regulator/core.c`)**:
- `regulator_resolve_supply(rdev)` looks up `rdev->supply_name` via:
1. `regulator_dt_lookup(&rdev->dev, rdev->supply_name)` (via `of_regulator_dev_lookup`, which calls `class_find_device` returning a referenced `struct device *`).
2. If not found, `regulator_dev_lookup(dev, rdev->supply_name)` (which acquires a ref via `get_device(&map->regulator->dev)` or `regulator_lookup_by_name` -> `class_find_device`).
- Both lookup paths increment the reference count on `r->dev`.
- When `r == rdev` (self-referential supply):
- Prior to this patch: `put_device(&rdev->dev)` was NOT called. If `!have_full_constraints()`, it set `ret = -EINVAL; goto out;`, leaking the reference acquired during lookup. If full constraints were present, it replaced `r` with `dummy_regulator_rdev` and called `get_device(&r->dev)` on the dummy, also leaking the reference to `rdev->dev`.
- With this patch: Decrements `rdev->dev` refcount immediately upon detecting self-reference.
- **Call Chain and Reachability Investigation**:
- Investigated callers of `regulator_resolve_supply()`:
- Recursive call: `regulator_resolve_supply(r)` inside `regulator_resolve_supply`.
- `_regulator_get_common()`: called during consumer driver initialization / probe (`regulator_get`, `devm_regulator_get`, etc.).
- `regulator_register()`: early supply resolution during driver registration (e.g. lines 6175, 6222).
- `regulator_bus_probe()`: `bus_type regulator_bus` probe callback invoked during device binding on the regulator bus.
- Checked whether regulators can be registered by virtual hardware or userspace:
- USB drivers: Checked `drivers/usb/` for `regulator_register` / `devm_regulator_register`. Only `drivers/usb/host/ohci-da8xx.c` registers a notifier (`devm_regulator_register_notifier`). No USB-pluggable device registers a regulator device.
- Power supply drivers: Checked `drivers/power/supply/`. Drivers registering regulators (e.g., `bq24190`, `max77759`, `mt6360`, `rt9467`) are platform or I2C devices, not USB devices.
- Investigated Device Tree (OF) on `amd64`: `amd64` architecture does not typically instantiate DT devices unless `CONFIG_OF` / `CONFIG_OF_UNITTEST` / `CONFIG_OF_CONFIGFS` are enabled.
- Regulators are typically registered at kernel boot or device driver probe via platform bus / I2C / SPI / MFD from static board files or Device Tree.
### 2. Current Hypotheses and Active Lines of Investigation
- **Hypothesis 1: Reachability Evaluation**:
- The modified code is in `drivers/regulator/core.c:regulator_resolve_supply()`.
- Triggering `r == rdev` requires a regulator whose `rdev->supply_name` resolves to its own name or alias in DT or platform regulator maps.
- Regulators are typically registered by platform/I2C/SPI board devices or firmware descriptions (Device Tree / ACPI).
- Need to verify whether userspace / syzkaller in standard QEMU amd64 environment can reach `regulator_resolve_supply()`, or if any virtual/emulated subsystem or sysfs/configfs interface can register a regulator or trigger `regulator_resolve_supply()`:
- Check if `regulator-dummy` can trigger this.
- Check if sysfs or configfs allows registering regulators or supplies (e.g., `regulator_userspace_consumer`, `regulator_virtual_consumer`). Note: consumers consume regulators, but do they register regulator supplies?
- Check if `platform_device` creation via userspace or any emulated device in standard QEMU x86_64 instantiates regulators.
- Determine if the path is structurally unreachable from syzkaller (e.g., requires malformed DT node or static board init which is either absent on x86_64 or evaluated strictly at boot).
- **Hypothesis 2: WorthFuzzing assessment**:
- If regulator self-resolution is only reachable via malformed Device Tree bindings on embedded architectures (ARM/RISC-V) and no emulated x86_64 device registers regulators with self-supplies, this patch touches code that cannot be exercised dynamically by syzkaller on amd64.
- Need to evaluate whether `CONFIG_REGULATOR` is enabled in standard configs and if any accessible interface exists.
### 3. Critical Files, Functions, and Code Snippets
- **File**: `drivers/regulator/core.c`
- **Function**: `regulator_resolve_supply(struct regulator_dev *rdev)`
```c
static int regulator_resolve_supply(struct regulator_dev *rdev)
{
struct regulator_dev *r;
struct device *dev = rdev->dev.parent;
...
/* first do a dt based lookup on the node described in the virtual device */
r = regulator_dt_lookup(&rdev->dev, rdev->supply_name);
/* If regulator not found use usual search path in the parent device */
if (!r)
r = regulator_dev_lookup(dev, rdev->supply_name);
...
if (r == rdev) {
dev_err(dev, "Supply for %s (%s) resolved to itself\n",
rdev->desc->name, rdev->supply_name);
put_device(&rdev->dev);
if (!have_full_constraints()) {
ret = -EINVAL;
goto out;
}
r = dummy_regulator_rdev;
...
}
```
- **Registration**:
- `regulator_register(struct device *dev, const struct regulator_desc *regulator_desc, const struct regulator_config *cfg)`
- Supply name assignment:
```c
if (init_data && init_data->supply_regulator)
rdev->supply_name = init_data->supply_regulator;
else if (regulator_desc->supply_name)
rdev->supply_name = regulator_desc->supply_name;
```
- **Kconfig**: `drivers/regulator/Kconfig`
- `CONFIG_REGULATOR` (bool)
- `CONFIG_REGULATOR_VIRTUAL_CONSUMER` (tristate)
- `CONFIG_REGULATOR_USERSPACE_CONSUMER` (tristate)
### 4. Watch Out for Reasoning Loops & Repetitive Queries
- Note: Broad `grepper` queries on `regulator_register` or `supply_name` produced truncated outputs (>500 lines) due to hundreds of platform/PMIC drivers across the kernel.
- Avoid repeating broad greps across the whole tree for `regulator_register`.
- Focus directly on:
1. Can userspace create or trigger regulator registration or supply resolution on amd64 in QEMU?
2. Does `r == rdev` require a static misconfiguration in hardware/DT descriptions?
3. Formulate final triage decision based on syzkaller reachability criteria for amd64.Tokens: input: 60337 output: 2110 thoughts: 0 |
| 44/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 14996 output: 37 thoughts: 98 Thoughts: **Analyzing the `userspace_consumer.c` Driver's Supply Handling** Okay, so let's break this down. From what I can tell, `userspace_consumer.c` is operating as a consumer driver. It's essentially taking external supplies and then controlling them through the sysfs interface, enabling and disabling them as needed. The key thing I'm noting is that it *doesn't* do any regulator registration itself, nor does it explicitly try to resolve any supplies to its own internal structure. Now, that immediately raises a question in my mind: How exactly is `regulator_resolve_supply()` getting called in the first place, and how can we end up in a situation where `r` (which I assume is a regulator handle) actually *equals* `rdev` (the regulator device itself)? That sounds counter-intuitive, so I need to understand that. Right, time to dive into the core regulator code. I'm going to pull up `drivers/regulator/core.c` and specifically examine the `regulator_resolve_supply()` function. That's the key to understanding this behavior. |
| 45/2 | 2026/09/19 15:11 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2220,
"LineCount": 80
}Results: {
"Contents": "2220:\t\t\t/* Did the lookup explicitly defer for us? */\n2221:\t\t\tif (ret == -EPROBE_DEFER)\n2222:\t\t\t\tgoto out;\n2223:\t\n2224:\t\t\tif (have_full_constraints()) {\n2225:\t\t\t\tr = dummy_regulator_rdev;\n2226:\t\t\t\tif (!r) {\n2227:\t\t\t\t\tret = -EPROBE_DEFER;\n2228:\t\t\t\t\tgoto out;\n2229:\t\t\t\t}\n2230:\t\t\t\tget_device(\u0026r-\u003edev);\n2231:\t\t\t} else {\n2232:\t\t\t\tdev_err(dev, \"Failed to resolve %s-supply for %s\\n\",\n2233:\t\t\t\t\trdev-\u003esupply_name, rdev-\u003edesc-\u003ename);\n2234:\t\t\t\tret = -EPROBE_DEFER;\n2235:\t\t\t\tgoto out;\n2236:\t\t\t}\n2237:\t\t}\n2238:\t\n2239:\t\tif (r == rdev) {\n2240:\t\t\tdev_err(dev, \"Supply for %s (%s) resolved to itself\\n\",\n2241:\t\t\t\trdev-\u003edesc-\u003ename, rdev-\u003esupply_name);\n2242:\t\t\tput_device(\u0026rdev-\u003edev);\n2243:\t\t\tif (!have_full_constraints()) {\n2244:\t\t\t\tret = -EINVAL;\n2245:\t\t\t\tgoto out;\n2246:\t\t\t}\n2247:\t\t\tr = dummy_regulator_rdev;\n2248:\t\t\tif (!r) {\n2249:\t\t\t\tret = -EPROBE_DEFER;\n2250:\t\t\t\tgoto out;\n2251:\t\t\t}\n2252:\t\t\tget_device(\u0026r-\u003edev);\n2253:\t\t}\n2254:\t\n2255:\t\t/*\n2256:\t\t * If the supply's parent device is not the same as the\n2257:\t\t * regulator's parent device, then ensure the parent device\n2258:\t\t * is bound before we resolve the supply, in case the parent\n2259:\t\t * device get probe deferred and unregisters the supply.\n2260:\t\t */\n2261:\t\tif (r-\u003edev.parent \u0026\u0026 r-\u003edev.parent != rdev-\u003edev.parent) {\n2262:\t\t\tif (!device_is_bound(r-\u003edev.parent)) {\n2263:\t\t\t\tput_device(\u0026r-\u003edev);\n2264:\t\t\t\tret = -EPROBE_DEFER;\n2265:\t\t\t\tgoto out;\n2266:\t\t\t}\n2267:\t\t}\n2268:\t\n2269:\t\t/* Recursively resolve the supply of the supply */\n2270:\t\tret = regulator_resolve_supply(r);\n2271:\t\tif (ret \u003c 0) {\n2272:\t\t\tput_device(\u0026r-\u003edev);\n2273:\t\t\tgoto out;\n2274:\t\t}\n2275:\t\n2276:\t\t/*\n2277:\t\t * Recheck rdev-\u003esupply with rdev-\u003emutex lock held to avoid a race\n2278:\t\t * between rdev-\u003esupply null check and setting rdev-\u003esupply in\n2279:\t\t * set_supply() from concurrent tasks.\n2280:\t\t */\n2281:\t\tregulator_lock_two(rdev, r, \u0026ww_ctx);\n2282:\t\n2283:\t\t/* Supply just resolved by a concurrent task? */\n2284:\t\tif (rdev-\u003esupply) {\n2285:\t\t\t/* Constraints might still be pending due to concurrency. */\n2286:\t\t\tbool done = !rdev-\u003econstraints_pending;\n2287:\t\n2288:\t\t\tsupply = rdev-\u003esupply;\n2289:\t\n2290:\t\t\tregulator_unlock_two(rdev, r, \u0026ww_ctx);\n2291:\t\t\tput_device(\u0026r-\u003edev);\n2292:\t\n2293:\t\t\t/*\n2294:\t\t\t * Supply resolved by concurrent task, and constraints set as\n2295:\t\t\t * well (or not required): fast path.\n2296:\t\t\t */\n2297:\t\t\tif (done)\n2298:\t\t\t\tgoto out;\n2299:\t\n"
} |
| 46/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16492 output: 37 thoughts: 22 Thoughts: Here's a summary of my thinking, expressed in the first person: **Analyzing the `regulator_resolve_supply` Function** Okay, let's dive in. Before line 2220 within the `regulator_resolve_supply` function, I need to understand the control flow and what's happening. I'm especially interested in figuring out what the potential states are for that specific area of code. What variables are being set or modified? Are there any crucial checks or conditional statements that might alter the path of execution leading *up to* line 2220? I'm anticipating that there's a specific data structure or state machine being manipulated here. I want to build a very concrete mental model of what needs to be in place for the program to reach line 2220 without errors. Understanding the pre-conditions to line 2220 will allow me to identify potential issues or inefficiencies further down the line, or perhaps to understand why something failed previously. My focus is on the data dependencies. I'm thinking: "What context does this need? What data is this operation working with at that precise moment?" |
| 47/2 | 2026/09/19 15:11 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2170,
"LineCount": 55
}Results: {
"Contents": "2170:\t\n2171:\t\t\tif (strcmp(map-\u003esupply, supply) == 0 \u0026\u0026\n2172:\t\t\t get_device(\u0026map-\u003eregulator-\u003edev)) {\n2173:\t\t\t\tr = map-\u003eregulator;\n2174:\t\t\t\tbreak;\n2175:\t\t\t}\n2176:\t\t}\n2177:\t\tmutex_unlock(\u0026regulator_list_mutex);\n2178:\t\n2179:\t\tif (r)\n2180:\t\t\treturn r;\n2181:\t\n2182:\t\tr = regulator_lookup_by_name(supply);\n2183:\t\tif (r)\n2184:\t\t\treturn r;\n2185:\t\n2186:\t\treturn ERR_PTR(-ENODEV);\n2187:\t}\n2188:\t\n2189:\tstatic int regulator_resolve_supply(struct regulator_dev *rdev)\n2190:\t{\n2191:\t\tstruct regulator_dev *r;\n2192:\t\tstruct device *dev = rdev-\u003edev.parent;\n2193:\t\tstruct ww_acquire_ctx ww_ctx;\n2194:\t\tstruct regulator *supply;\n2195:\t\tbool do_final_setup;\n2196:\t\tint ret = 0;\n2197:\t\n2198:\t\t/* No supply to resolve? */\n2199:\t\tif (!rdev-\u003esupply_name)\n2200:\t\t\treturn 0;\n2201:\t\n2202:\t\t/* Supply already resolved? (fast-path without locking contention) */\n2203:\t\tif (rdev-\u003esupply \u0026\u0026 !rdev-\u003econstraints_pending)\n2204:\t\t\treturn 0;\n2205:\t\n2206:\t\t/* first do a dt based lookup on the node described in the virtual\n2207:\t\t * device.\n2208:\t\t */\n2209:\t\tr = regulator_dt_lookup(\u0026rdev-\u003edev, rdev-\u003esupply_name);\n2210:\t\n2211:\t\t/* If regulator not found use usual search path in the parent\n2212:\t\t * device.\n2213:\t\t */\n2214:\t\tif (!r)\n2215:\t\t\tr = regulator_dev_lookup(dev, rdev-\u003esupply_name);\n2216:\t\n2217:\t\tif (IS_ERR(r)) {\n2218:\t\t\tret = PTR_ERR(r);\n2219:\t\n2220:\t\t\t/* Did the lookup explicitly defer for us? */\n2221:\t\t\tif (ret == -EPROBE_DEFER)\n2222:\t\t\t\tgoto out;\n2223:\t\n2224:\t\t\tif (have_full_constraints()) {\n"
} |
| 48/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 17519 output: 32 thoughts: 103 Thoughts: **Tracing the Regulator Dependency** Okay, here's what I'm piecing together. I'm seeing that the regulator I'm looking at, let's call it 'r', is being sourced either through `regulator_dt_lookup()` or `regulator_dev_lookup()`. The commonality here is the use of `rdev->supply_name`. Now, the key is understanding where that `rdev->supply_name` comes from. That's the missing link. So, I need to go spelunking in `drivers/regulator/core.c` to trace back how and where `rdev->supply_name` is being populated. That's where the answer lies, and that's the next logical step in my investigation. I need to understand the data flow, and how that dependency is established. |
| 49/2 | 2026/09/19 15:11 | tool | grepper |
0mArgs:{
"Expression": "\\bsupply_name\\b",
"PathPrefix": "drivers/regulator/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1293 lines.\nUse more precise expression if possible.\n\ndrivers/regulator/ab8500.c=644=static struct ab8500_regulator_info\n--\ndrivers/regulator/ab8500.c-661-\t\t\t.enable_time\t= 200,\ndrivers/regulator/ab8500.c:662:\t\t\t.supply_name = \"vin\",\ndrivers/regulator/ab8500.c-663-\t\t},\n--\ndrivers/regulator/ab8500.c-684-\t\t\t.enable_time\t= 200,\ndrivers/regulator/ab8500.c:685:\t\t\t.supply_name = \"vin\",\ndrivers/regulator/ab8500.c-686-\t\t},\n--\ndrivers/regulator/ab8500.c-707-\t\t\t.enable_time\t= 450,\ndrivers/regulator/ab8500.c:708:\t\t\t.supply_name = \"vin\",\ndrivers/regulator/ab8500.c-709-\t\t},\n--\ndrivers/regulator/act8865-regulator.c=431=static const struct regulator_ops act8865_fixed_ldo_ops = {\n--\ndrivers/regulator/act8865-regulator.c-442-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\t\\\ndrivers/regulator/act8865-regulator.c:443:\t\t.supply_name\t\t= _supply,\t\t\t\\\ndrivers/regulator/act8865-regulator.c-444-\t\t.id\t\t\t= _family##_ID_##_id,\t\t\\\n--\ndrivers/regulator/act8945a-regulator.c=220=static const struct regulator_ops act8945a_ops = {\n--\ndrivers/regulator/act8945a-regulator.c-236-\t\t.name\t\t\t= _name,\t\t\t\\\ndrivers/regulator/act8945a-regulator.c:237:\t\t.supply_name\t\t= _supply,\t\t\t\\\ndrivers/regulator/act8945a-regulator.c-238-\t\t.of_match\t\t= of_match_ptr(\"REG_\"#_id),\t\\\n--\ndrivers/regulator/arizona-ldo1.c=95=static const struct regulator_desc arizona_ldo1_hc = {\ndrivers/regulator/arizona-ldo1.c-96-\t.name = \"LDO1\",\ndrivers/regulator/arizona-ldo1.c:97:\t.supply_name = \"LDOVDD\",\ndrivers/regulator/arizona-ldo1.c-98-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-ldo1.c=121=static const struct regulator_desc arizona_ldo1 = {\ndrivers/regulator/arizona-ldo1.c-122-\t.name = \"LDO1\",\ndrivers/regulator/arizona-ldo1.c:123:\t.supply_name = \"LDOVDD\",\ndrivers/regulator/arizona-ldo1.c-124-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-ldo1.c=165=static const struct regulator_desc madera_ldo1 = {\ndrivers/regulator/arizona-ldo1.c-166-\t.name = \"LDO1\",\ndrivers/regulator/arizona-ldo1.c:167:\t.supply_name = \"LDOVDD\",\ndrivers/regulator/arizona-ldo1.c-168-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-micsupp.c=130=static const struct regulator_desc arizona_micsupp = {\ndrivers/regulator/arizona-micsupp.c-131-\t.name = \"MICVDD\",\ndrivers/regulator/arizona-micsupp.c:132:\t.supply_name = \"CPVDD\",\ndrivers/regulator/arizona-micsupp.c-133-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-micsupp.c=157=static const struct regulator_desc arizona_micsupp_ext = {\ndrivers/regulator/arizona-micsupp.c-158-\t.name = \"MICVDD\",\ndrivers/regulator/arizona-micsupp.c:159:\t.supply_name = \"CPVDD\",\ndrivers/regulator/arizona-micsupp.c-160-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-micsupp.c=203=static const struct regulator_desc madera_micsupp = {\ndrivers/regulator/arizona-micsupp.c-204-\t.name = \"MICVDD\",\ndrivers/regulator/arizona-micsupp.c:205:\t.supply_name = \"CPVDD1\",\ndrivers/regulator/arizona-micsupp.c-206-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/as3722-regulator.c=634=static int as3722_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/as3722-regulator.c-668-\t\tdesc-\u003ename = as3722_reg_lookup[id].name;\ndrivers/regulator/as3722-regulator.c:669:\t\tdesc-\u003esupply_name = as3722_reg_lookup[id].sname;\ndrivers/regulator/as3722-regulator.c-670-\t\tdesc-\u003eid = as3722_reg_lookup[id].regulator_id;\n--\ndrivers/regulator/atc260x-regulator.c=154=enum atc2603c_reg_ids {\n--\ndrivers/regulator/atc260x-regulator.c-172-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:173:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-174-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-191-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:192:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-193-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-210-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:211:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-212-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-227-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:228:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-229-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-246-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:247:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-248-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-263-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:264:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-265-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-276-\t.name = \"SWITCHLDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:277:\t.supply_name = \"switchldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-278-\t.of_match = of_match_ptr(\"switchldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c=319=enum atc2609a_reg_ids {\n--\ndrivers/regulator/atc260x-regulator.c-339-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:340:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-341-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-358-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:359:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-360-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-377-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:378:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-379-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-396-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:397:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-398-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-417-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:418:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-419-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-439-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:440:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-441-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/aw37503-regulator.c=109=static int aw37503_of_parse_cb(struct device_node *np,\n--\ndrivers/regulator/aw37503-regulator.c-135-\t\t.name = \"aw37503-\"#_name,\t\t\\\ndrivers/regulator/aw37503-regulator.c:136:\t\t.supply_name = \"vin\",\t\t\t\\\ndrivers/regulator/aw37503-regulator.c-137-\t\t.id = AW37503_REGULATOR_ID_##_id,\t\\\n--\ndrivers/regulator/axp20x-regulator.c-355-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:356:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-357-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-377-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:378:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-379-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-396-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:397:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-398-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-410-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:411:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-412-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-425-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:426:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-427-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c=714=static const struct regulator_desc axp22x_drivevbus_regulator = {\ndrivers/regulator/axp20x-regulator.c-715-\t.name\t\t= \"drivevbus\",\ndrivers/regulator/axp20x-regulator.c:716:\t.supply_name\t= \"drivevbus\",\ndrivers/regulator/axp20x-regulator.c-717-\t.of_match\t= of_match_ptr(\"drivevbus\"),\n--\ndrivers/regulator/axp20x-regulator.c=1553=static int axp20x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/axp20x-regulator.c-1660-\t\t\t*new_desc = regulators[i];\ndrivers/regulator/axp20x-regulator.c:1661:\t\t\tnew_desc-\u003esupply_name = dcdc1_name;\ndrivers/regulator/axp20x-regulator.c-1662-\t\t\tdesc = new_desc;\n--\ndrivers/regulator/axp20x-regulator.c-1673-\t\t\t*new_desc = regulators[i];\ndrivers/regulator/axp20x-regulator.c:1674:\t\t\tnew_desc-\u003esupply_name = dcdc5_name;\ndrivers/regulator/axp20x-regulator.c-1675-\t\t\tdesc = new_desc;\n--\ndrivers/regulator/axp20x-regulator.c-1685-\t\t\t*new_desc = regulators[i];\ndrivers/regulator/axp20x-regulator.c:1686:\t\t\tnew_desc-\u003esupply_name = aldo1_name;\ndrivers/regulator/axp20x-regulator.c-1687-\t\t\tdesc = new_desc;\n--\ndrivers/regulator/bd718x7-regulator.c=732=static struct bd718xx_regulator_data bd71847_regulators[] = {\n--\ndrivers/regulator/bd718x7-regulator.c-1037-\t\t\t/* LDO6 is supplied by buck5 */\ndrivers/regulator/bd718x7-regulator.c:1038:\t\t\t.supply_name = \"buck5\",\ndrivers/regulator/bd718x7-regulator.c-1039-\t\t\t.vsel_reg = BD718XX_REG_LDO6_VOLT,\n--\ndrivers/regulator/bd718x7-regulator.c=1082=static struct bd718xx_regulator_data bd71837_regulators[] = {\n--\ndrivers/regulator/bd718x7-regulator.c-1423-\t\t\t/* LDO5 is supplied by buck6 */\ndrivers/regulator/bd718x7-regulator.c:1424:\t\t\t.supply_name = \"buck6\",\ndrivers/regulator/bd718x7-regulator.c-1425-\t\t\t.vsel_reg = BD718XX_REG_LDO5_VOLT,\n--\ndrivers/regulator/bd718x7-regulator.c-1450-\t\t\t/* LDO6 is supplied by buck7 */\ndrivers/regulator/bd718x7-regulator.c:1451:\t\t\t.supply_name = \"buck7\",\ndrivers/regulator/bd718x7-regulator.c-1452-\t\t\t.vsel_reg = BD718XX_REG_LDO6_VOLT,\n--\ndrivers/regulator/core.c=114=static struct regulator *create_regulator(struct regulator_dev *rdev,\ndrivers/regulator/core.c-115-\t\t\t\t\t struct device *dev,\ndrivers/regulator/core.c:116:\t\t\t\t\t const char *supply_name);\ndrivers/regulator/core.c-117-static void destroy_regulator(struct regulator *regulator);\n--\ndrivers/regulator/core.c=1464=static int set_machine_constraints(struct regulator_dev *rdev,\n--\ndrivers/regulator/core.c-1477-\tif (!rdev-\u003eena_pin \u0026\u0026 !ops-\u003eenable) {\ndrivers/regulator/core.c:1478:\t\tif (rdev-\u003esupply_name \u0026\u0026 !rdev-\u003esupply)\ndrivers/regulator/core.c-1479-\t\t\treturn -EPROBE_DEFER;\n--\ndrivers/regulator/core.c-1492-\tif (rdev-\u003econstraints-\u003ealways_on || rdev-\u003econstraints-\u003eboot_on) {\ndrivers/regulator/core.c:1493:\t\tif (rdev-\u003esupply_name \u0026\u0026 !rdev-\u003esupply)\ndrivers/regulator/core.c-1494-\t\t\treturn -EPROBE_DEFER;\n--\ndrivers/regulator/core.c=1986=static void link_and_create_debugfs(struct regulator *regulator, struct regulator_dev *rdev,\n--\ndrivers/regulator/core.c-1995-\t\terr = sysfs_create_link_nowarn(\u0026rdev-\u003edev.kobj, \u0026dev-\u003ekobj,\ndrivers/regulator/core.c:1996:\t\t\t\t\t regulator-\u003esupply_name);\ndrivers/regulator/core.c-1997-\t\tif (err) {\n--\ndrivers/regulator/core.c-2004-\tif (err != -EEXIST) {\ndrivers/regulator/core.c:2005:\t\tregulator-\u003edebugfs = debugfs_create_dir(regulator-\u003esupply_name, rdev-\u003edebugfs);\ndrivers/regulator/core.c-2006-\t\tif (IS_ERR(regulator-\u003edebugfs)) {\n--\ndrivers/regulator/core.c=2024=static struct regulator *create_regulator(struct regulator_dev *rdev,\ndrivers/regulator/core.c-2025-\t\t\t\t\t struct device *dev,\ndrivers/regulator/core.c:2026:\t\t\t\t\t const char *supply_name)\ndrivers/regulator/core.c-2027-{\n--\ndrivers/regulator/core.c-2032-\tif (dev) {\ndrivers/regulator/core.c:2033:\t\tsupply_name = kasprintf(GFP_KERNEL, \"%s-%s\", dev-\u003ekobj.name, supply_name);\ndrivers/regulator/core.c:2034:\t\tif (supply_name == NULL)\ndrivers/regulator/core.c-2035-\t\t\treturn NULL;\ndrivers/regulator/core.c-2036-\t} else {\ndrivers/regulator/core.c:2037:\t\tsupply_name = kstrdup_const(supply_name, GFP_KERNEL);\ndrivers/regulator/core.c:2038:\t\tif (supply_name == NULL)\ndrivers/regulator/core.c-2039-\t\t\treturn NULL;\n--\ndrivers/regulator/core.c-2043-\tif (regulator == NULL) {\ndrivers/regulator/core.c:2044:\t\tkfree_const(supply_name);\ndrivers/regulator/core.c-2045-\t\treturn NULL;\n--\ndrivers/regulator/core.c-2048-\tregulator-\u003erdev = rdev;\ndrivers/regulator/core.c:2049:\tregulator-\u003esupply_name = supply_name;\ndrivers/regulator/core.c-2050-\n--\ndrivers/regulator/core.c=2189=static int regulator_resolve_supply(struct regulator_dev *rdev)\n--\ndrivers/regulator/core.c-2198-\t/* No supply to resolve? */\ndrivers/regulator/core.c:2199:\tif (!rdev-\u003esupply_name)\ndrivers/regulator/core.c-2200-\t\treturn 0;\n--\ndrivers/regulator/core.c-2208-\t */\ndrivers/regulator/core.c:2209:\tr = regulator_dt_lookup(\u0026rdev-\u003edev, rdev-\u003esupply_name);\ndrivers/regulator/core.c-2210-\n--\ndrivers/regulator/core.c-2214-\tif (!r)\ndrivers/regulator/core.c:2215:\t\tr = regulator_dev_lookup(dev, rdev-\u003esupply_name);\ndrivers/regulator/core.c-2216-\n--\ndrivers/regulator/core.c-2232-\t\t\tdev_err(dev, \"Failed to resolve %s-supply for %s\\n\",\ndrivers/regulator/core.c:2233:\t\t\t\trdev-\u003esupply_name, rdev-\u003edesc-\u003ename);\ndrivers/regulator/core.c-2234-\t\t\tret = -EPROBE_DEFER;\n--\ndrivers/regulator/core.c-2240-\t\tdev_err(dev, \"Supply for %s (%s) resolved to itself\\n\",\ndrivers/regulator/core.c:2241:\t\t\trdev-\u003edesc-\u003ename, rdev-\u003esupply_name);\ndrivers/regulator/core.c-2242-\t\tput_device(\u0026rdev-\u003edev);\n--\ndrivers/regulator/core.c=2640=static void destroy_regulator(struct regulator *regulator)\n--\ndrivers/regulator/core.c-2650-\t\t/* remove any sysfs entries */\ndrivers/regulator/core.c:2651:\t\tsysfs_remove_link(\u0026rdev-\u003edev.kobj, regulator-\u003esupply_name);\ndrivers/regulator/core.c-2652-\t}\n--\ndrivers/regulator/core.c-2660-\ndrivers/regulator/core.c:2661:\tkfree_const(regulator-\u003esupply_name);\ndrivers/regulator/core.c-2662-\tkfree(regulator);\n--\ndrivers/regulator/core.c=4791=int regulator_get_voltage_rdev(struct regulator_dev *rdev)\n--\ndrivers/regulator/core.c-4824-\t\tret = regulator_get_voltage_rdev(rdev-\u003esupply-\u003erdev);\ndrivers/regulator/core.c:4825:\t} else if (rdev-\u003esupply_name) {\ndrivers/regulator/core.c-4826-\t\treturn -EPROBE_DEFER;\n--\ndrivers/regulator/core.c=6003=regulator_register(struct device *dev,\n--\ndrivers/regulator/core.c-6123-\tif (init_data \u0026\u0026 init_data-\u003esupply_regulator)\ndrivers/regulator/core.c:6124:\t\trdev-\u003esupply_name = init_data-\u003esupply_regulator;\ndrivers/regulator/core.c:6125:\telse if (regulator_desc-\u003esupply_name)\ndrivers/regulator/core.c:6126:\t\trdev-\u003esupply_name = regulator_desc-\u003esupply_name;\ndrivers/regulator/core.c-6127-\n--\ndrivers/regulator/core.c-6173-\t\trdev_dbg(rdev, \"will resolve supply early: %s\\n\",\ndrivers/regulator/core.c:6174:\t\t\t rdev-\u003esupply_name);\ndrivers/regulator/core.c-6175-\t\tret = regulator_resolve_supply(rdev);\n--\ndrivers/regulator/core.c-6234-\t */\ndrivers/regulator/core.c:6235:\tif (rdev-\u003esupply_name \u0026\u0026 !rdev-\u003esupply) {\ndrivers/regulator/core.c-6236-\t\tdevice_initialize(\u0026rdev-\u003ebdev);\n--\ndrivers/regulator/core.c=6406=static int regulator_bus_probe(struct device *bdev)\n--\ndrivers/regulator/core.c-6414-\t\t\t \"unable to resolve supply or constraints '%s': %pe\\n\",\ndrivers/regulator/core.c:6415:\t\t\t rdev-\u003esupply_name, ERR_PTR(ret));\ndrivers/regulator/core.c-6416-\telse\ndrivers/regulator/core.c:6417:\t\trdev_dbg(rdev, \"resolved supply '%s'\\n\", rdev-\u003esupply_name);\ndrivers/regulator/core.c-6418-\n--\ndrivers/regulator/core.c=6560=static void regulator_summary_show_subtree(struct seq_file *s,\n--\ndrivers/regulator/core.c-6605-\t\t\t 30 - (level + 1) * 3,\ndrivers/regulator/core.c:6606:\t\t\t consumer-\u003esupply_name ? consumer-\u003esupply_name :\ndrivers/regulator/core.c-6607-\t\t\t consumer-\u003edev ? dev_name(consumer-\u003edev) : \"deviceless\");\n--\ndrivers/regulator/cros-ec-regulator.c=157=static int cros_ec_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/cros-ec-regulator.c-185-\tdesc-\u003eops = \u0026cros_ec_regulator_voltage_ops;\ndrivers/regulator/cros-ec-regulator.c:186:\tdesc-\u003esupply_name = \"vin\";\ndrivers/regulator/cros-ec-regulator.c-187-\n--\ndrivers/regulator/fan53555.c=619=static int fan53555_regulator_register(struct fan53555_device_info *di,\n--\ndrivers/regulator/fan53555.c-625-\trdesc-\u003ename = \"fan53555-reg\";\ndrivers/regulator/fan53555.c:626:\trdesc-\u003esupply_name = \"vin\";\ndrivers/regulator/fan53555.c-627-\trdesc-\u003eops = \u0026fan53555_regulator_ops;\n--\ndrivers/regulator/fan53880.c=32=static const struct regulator_ops fan53880_ops = {\n--\ndrivers/regulator/fan53880.c-59-\t\t.enable_time =\t 150,\t\t\t\t\t\\\ndrivers/regulator/fan53880.c:60:\t\t.supply_name =\t _supply,\t\t\t\t\\\ndrivers/regulator/fan53880.c-61-\t\t.ops =\t\t \u0026fan53880_ops,\t\t\t\\\n--\ndrivers/regulator/fan53880.c=64=static const struct regulator_desc fan53880_regulators[] = {\n--\ndrivers/regulator/fan53880.c-85-\t\t.enable_time =\t 480,\ndrivers/regulator/fan53880.c:86:\t\t.supply_name =\t \"PVIN\",\ndrivers/regulator/fan53880.c-87-\t\t.ops =\t\t \u0026fan53880_ops,\n--\ndrivers/regulator/fan53880.c-105-\t\t.enable_time =\t 580,\ndrivers/regulator/fan53880.c:106:\t\t.supply_name =\t \"PVIN\",\ndrivers/regulator/fan53880.c-107-\t\t.ops =\t\t \u0026fan53880_ops,\n--\ndrivers/regulator/fixed-helper.c=14=static void regulator_fixed_release(struct device *dev)\n--\ndrivers/regulator/fixed-helper.c-17-\t\t\tstruct fixed_regulator_data, pdev.dev);\ndrivers/regulator/fixed-helper.c:18:\tkfree_const(data-\u003ecfg.supply_name);\ndrivers/regulator/fixed-helper.c-19-\tkfree(data);\n--\ndrivers/regulator/fixed-helper.c=32=struct platform_device *regulator_register_always_on(int id, const char *name,\n--\ndrivers/regulator/fixed-helper.c-40-\ndrivers/regulator/fixed-helper.c:41:\tdata-\u003ecfg.supply_name = kstrdup_const(name, GFP_KERNEL);\ndrivers/regulator/fixed-helper.c:42:\tif (!data-\u003ecfg.supply_name) {\ndrivers/regulator/fixed-helper.c-43-\t\tkfree(data);\n--\ndrivers/regulator/fixed.c=163=of_get_fixed_voltage_config(struct device *dev,\n--\ndrivers/regulator/fixed.c-181-\ndrivers/regulator/fixed.c:182:\tconfig-\u003esupply_name = init_data-\u003econstraints.name;\ndrivers/regulator/fixed.c-183-\tif (init_data-\u003econstraints.min_uV == init_data-\u003econstraints.max_uV) {\n--\ndrivers/regulator/fixed.c=218=static int reg_fixed_voltage_probe(struct platform_device *pdev)\n--\ndrivers/regulator/fixed.c-245-\tdrvdata-\u003edesc.name = devm_kstrdup(\u0026pdev-\u003edev,\ndrivers/regulator/fixed.c:246:\t\t\t\t\t config-\u003esupply_name,\ndrivers/regulator/fixed.c-247-\t\t\t\t\t GFP_KERNEL);\n--\ndrivers/regulator/fixed.c-278-\tif (config-\u003einput_supply) {\ndrivers/regulator/fixed.c:279:\t\tdrvdata-\u003edesc.supply_name = devm_kstrdup(\u0026pdev-\u003edev,\ndrivers/regulator/fixed.c-280-\t\t\t\t\t config-\u003einput_supply,\ndrivers/regulator/fixed.c-281-\t\t\t\t\t GFP_KERNEL);\ndrivers/regulator/fixed.c:282:\t\tif (!drvdata-\u003edesc.supply_name)\ndrivers/regulator/fixed.c-283-\t\t\treturn -ENOMEM;\n--\ndrivers/regulator/gpio-regulator.c=130=of_get_gpio_regulator_config(struct device *dev, struct device_node *np,\n--\ndrivers/regulator/gpio-regulator.c-148-\ndrivers/regulator/gpio-regulator.c:149:\tconfig-\u003esupply_name = config-\u003einit_data-\u003econstraints.name;\ndrivers/regulator/gpio-regulator.c-150-\n--\ndrivers/regulator/gpio-regulator.c=234=static int gpio_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/gpio-regulator.c-256-\ndrivers/regulator/gpio-regulator.c:257:\tdrvdata-\u003edesc.name = devm_kstrdup(dev, config-\u003esupply_name, GFP_KERNEL);\ndrivers/regulator/gpio-regulator.c-258-\tif (drvdata-\u003edesc.name == NULL) {\n--\ndrivers/regulator/gpio-regulator.c-268-\tif (config-\u003einput_supply) {\ndrivers/regulator/gpio-regulator.c:269:\t\tdrvdata-\u003edesc.supply_name = devm_kstrdup(\u0026pdev-\u003edev,\ndrivers/regulator/gpio-regulator.c-270-\t\t\t\t\t\t\t config-\u003einput_supply,\ndrivers/regulator/gpio-regulator.c-271-\t\t\t\t\t\t\t GFP_KERNEL);\ndrivers/regulator/gpio-regulator.c:272:\t\tif (!drvdata-\u003edesc.supply_name) {\ndrivers/regulator/gpio-regulator.c-273-\t\t\tdev_err(\u0026pdev-\u003edev,\n--\ndrivers/regulator/internal.h=45=struct regulator {\n--\ndrivers/regulator/internal.h-54-\tstruct regulator_voltage voltage[REGULATOR_STATES_NUM];\ndrivers/regulator/internal.h:55:\tconst char *supply_name;\ndrivers/regulator/internal.h-56-\tstruct device_attribute dev_attr;\n--\ndrivers/regulator/isl9305.c=69=static const struct regulator_desc isl9305_regulators[] = {\n--\ndrivers/regulator/isl9305.c-80-\t\t.enable_mask =\tISL9305_DCD1_EN,\ndrivers/regulator/isl9305.c:81:\t\t.supply_name =\t\"VINDCD1\",\ndrivers/regulator/isl9305.c-82-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/isl9305.c-95-\t\t.enable_mask =\tISL9305_DCD2_EN,\ndrivers/regulator/isl9305.c:96:\t\t.supply_name =\t\"VINDCD2\",\ndrivers/regulator/isl9305.c-97-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/isl9305.c-110-\t\t.enable_mask =\tISL9305_LDO1_EN,\ndrivers/regulator/isl9305.c:111:\t\t.supply_name =\t\"VINLDO1\",\ndrivers/regulator/isl9305.c-112-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/isl9305.c-125-\t\t.enable_mask =\tISL9305_LDO2_EN,\ndrivers/regulator/isl9305.c:126:\t\t.supply_name =\t\"VINLDO2\",\ndrivers/regulator/isl9305.c-127-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/lochnagar-regulator.c=139=static const struct regulator_desc lochnagar_regulators[] = {\n--\ndrivers/regulator/lochnagar-regulator.c-141-\t\t.name = \"MICVDD\",\ndrivers/regulator/lochnagar-regulator.c:142:\t\t.supply_name = \"SYSVDD\",\ndrivers/regulator/lochnagar-regulator.c-143-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lochnagar-regulator.c-164-\t\t.name = \"MIC1VDD\",\ndrivers/regulator/lochnagar-regulator.c:165:\t\t.supply_name = \"MICBIAS1\",\ndrivers/regulator/lochnagar-regulator.c-166-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lochnagar-regulator.c-179-\t\t.name = \"MIC2VDD\",\ndrivers/regulator/lochnagar-regulator.c:180:\t\t.supply_name = \"MICBIAS2\",\ndrivers/regulator/lochnagar-regulator.c-181-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lochnagar-regulator.c-194-\t\t.name = \"VDDCORE\",\ndrivers/regulator/lochnagar-regulator.c:195:\t\t.supply_name = \"SYSVDD\",\ndrivers/regulator/lochnagar-regulator.c-196-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lp873x-regulator.c-19-\t\t\t.name\t\t\t= _name,\t\t\\\ndrivers/regulator/lp873x-regulator.c:20:\t\t\t.supply_name\t\t= _of \"-in\",\t\t\\\ndrivers/regulator/lp873x-regulator.c-21-\t\t\t.id\t\t\t= _id,\t\t\t\\\n--\ndrivers/regulator/lp87565-regulator.c=15=enum LP87565_regulator_id {\n--\ndrivers/regulator/lp87565-regulator.c-30-\t\t\t.name\t\t\t= _name,\t\t\\\ndrivers/regulator/lp87565-regulator.c:31:\t\t\t.supply_name\t\t= _of \"-in\",\t\t\\\ndrivers/regulator/lp87565-regulator.c-32-\t\t\t.id\t\t\t= _id,\t\t\t\\\n--\ndrivers/regulator/max20086-regulator.c=70=static const struct regulator_ops max20086_buck_ops = {\n--\ndrivers/regulator/max20086-regulator.c-78-\t.name = \"OUT\"#n,\t\t\t\\\ndrivers/regulator/max20086-regulator.c:79:\t.supply_name = \"in\",\t\t\t\\\ndrivers/regulator/max20086-regulator.c-80-\t.id = (n) - 1,\t\t\t\t\\\n--\ndrivers/regulator/max20411-regulator.c=74=static const struct regulator_desc max20411_desc = {\n--\ndrivers/regulator/max20411-regulator.c-77-\t.type = REGULATOR_VOLTAGE,\ndrivers/regulator/max20411-regulator.c:78:\t.supply_name = \"vin\",\ndrivers/regulator/max20411-regulator.c-79-\t.name = \"max20411\",\n--\ndrivers/regulator/max5970-regulator.c=348=static int max597x_dt_parse(struct device_node *np,\n--\ndrivers/regulator/max5970-regulator.c-373-\t.owner = THIS_MODULE, \\\ndrivers/regulator/max5970-regulator.c:374:\t.supply_name = _supply, \\\ndrivers/regulator/max5970-regulator.c-375-\t.enable_reg = _ereg, \\\n--\ndrivers/regulator/max77620-regulator.c=644=static const struct regulator_ops max77620_regulator_ops = {\n--\ndrivers/regulator/max77620-regulator.c-675-\t\t\t.of_parse_cb = max77620_of_parse_cb,\t\t\\\ndrivers/regulator/max77620-regulator.c:676:\t\t\t.supply_name = _sname,\t\t\t\t\\\ndrivers/regulator/max77620-regulator.c-677-\t\t\t.id = MAX77620_REGULATOR_ID_##_id,\t\t\\\n--\ndrivers/regulator/max77620-regulator.c-707-\t\t\t.of_parse_cb = max77620_of_parse_cb,\t\t\\\ndrivers/regulator/max77620-regulator.c:708:\t\t\t.supply_name = _sname,\t\t\t\t\\\ndrivers/regulator/max77620-regulator.c-709-\t\t\t.id = MAX77620_REGULATOR_ID_##_id,\t\t\\\n--\ndrivers/regulator/max77650-regulator.c=146=static const struct max77650_regulator_desc max77650_LDO_desc = {\n--\ndrivers/regulator/max77650-regulator.c-150-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:151:\t\t.supply_name\t\t= \"in-ldo\",\ndrivers/regulator/max77650-regulator.c-152-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_LDO,\n--\ndrivers/regulator/max77650-regulator.c=172=static const struct max77650_regulator_desc max77650_SBB0_desc = {\n--\ndrivers/regulator/max77650-regulator.c-176-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:177:\t\t.supply_name\t\t= \"in-sbb0\",\ndrivers/regulator/max77650-regulator.c-178-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB0,\n--\ndrivers/regulator/max77650-regulator.c=202=static const struct max77650_regulator_desc max77650_SBB1_desc = {\n--\ndrivers/regulator/max77650-regulator.c-206-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:207:\t\t.supply_name\t\t= \"in-sbb1\",\ndrivers/regulator/max77650-regulator.c-208-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB1,\n--\ndrivers/regulator/max77650-regulator.c=232=static const struct max77650_regulator_desc max77651_SBB1_desc = {\n--\ndrivers/regulator/max77650-regulator.c-236-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:237:\t\t.supply_name\t\t= \"in-sbb1\",\ndrivers/regulator/max77650-regulator.c-238-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB1,\n--\ndrivers/regulator/max77650-regulator.c=265=static const struct max77650_regulator_desc max77650_SBB2_desc = {\n--\ndrivers/regulator/max77650-regulator.c-269-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:270:\t\t.supply_name\t\t= \"in-sbb0\",\ndrivers/regulator/max77650-regulator.c-271-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB2,\n--\ndrivers/regulator/max77650-regulator.c=295=static const struct max77650_regulator_desc max77651_SBB2_desc = {\n--\ndrivers/regulator/max77650-regulator.c-299-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:300:\t\t.supply_name\t\t= \"in-sbb0\",\ndrivers/regulator/max77650-regulator.c-301-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB2,\n--\ndrivers/regulator/max77802-regulator.c=298=static const struct regulator_ops max77802_buck_dvs_ops = {\n--\ndrivers/regulator/max77802-regulator.c-315-\t.id\t\t= MAX77802_LDO##num,\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c:316:\t.supply_name\t= \"inl\"#supply,\t\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c-317-\t.ops\t\t= \u0026max77802_ldo_ops_logic##log,\t\t\t\\\n--\ndrivers/regulator/max77802-regulator.c-336-\t.id\t\t= MAX77802_LDO##num,\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c:337:\t.supply_name\t= \"inl\"#supply,\t\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c-338-\t.ops\t\t= \u0026max77802_ldo_ops_logic##log,\t\t\t\\\n--\ndrivers/regulator/max77802-regulator.c-357-\t.id\t\t= MAX77802_BUCK##num,\t\t\t\t\\\n\n"
} |
| 50/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 29796 output: 37 thoughts: 99 Thoughts: **Analyzing Regulator Supply Naming** Okay, so I'm trying to figure out how these regulator devices get their supply names. It looks like `rdev->supply_name` is the key piece of information here. It seems to be populated from two potential sources: either `init_data->supply_regulator` or `regulator_desc->supply_name`. That makes sense; we either have initialization data explicitly telling us, or we're pulling it from the regulator description itself. Now, I need to dig deeper into the code to trace how these names are actually resolved and assigned. Let's start by checking out `regulator_dev_lookup` and `regulator_dt_lookup` functions within `drivers/regulator/core.c`. These should shed some light on the device tree interaction, and hopefully the logic behind the lookup process. Right, time to dive in and read lines 2120-2187 in `drivers/regulator/core.c`. Hopefully, those lines will contain the meat of the naming assignment and any default values used. This should give me a solid understanding of the name resolution mechanism and where these names originate from. |
| 51/2 | 2026/09/19 15:11 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2120,
"LineCount": 68
}Results: {
"Contents": "2120:\t{\n2121:\t\tstruct regulator_dev *r = NULL;\n2122:\t\n2123:\t\tif (dev_of_node(dev)) {\n2124:\t\t\tr = of_regulator_dev_lookup(dev, dev_of_node(dev), supply);\n2125:\t\t\tif (PTR_ERR(r) == -ENODEV)\n2126:\t\t\t\tr = NULL;\n2127:\t\t}\n2128:\t\n2129:\t\treturn r;\n2130:\t}\n2131:\t\n2132:\t/**\n2133:\t * regulator_dev_lookup - lookup a regulator device.\n2134:\t * @dev: device for regulator \"consumer\".\n2135:\t * @supply: Supply name or regulator ID.\n2136:\t *\n2137:\t * Return: pointer to \u0026struct regulator_dev or ERR_PTR() encoded negative error number.\n2138:\t *\n2139:\t * If successful, returns a struct regulator_dev that corresponds to the name\n2140:\t * @supply and with the embedded struct device refcount incremented by one.\n2141:\t * The refcount must be dropped by calling put_device().\n2142:\t * On failure one of the following ERR_PTR() encoded values is returned:\n2143:\t * -%ENODEV if lookup fails permanently, -%EPROBE_DEFER if lookup could succeed\n2144:\t * in the future.\n2145:\t */\n2146:\tstatic struct regulator_dev *regulator_dev_lookup(struct device *dev,\n2147:\t\t\t\t\t\t\t const char *supply)\n2148:\t{\n2149:\t\tstruct regulator_dev *r = NULL;\n2150:\t\tstruct regulator_map *map;\n2151:\t\tconst char *devname = NULL;\n2152:\t\n2153:\t\tregulator_supply_alias(\u0026dev, \u0026supply);\n2154:\t\n2155:\t\t/* first do a dt based lookup */\n2156:\t\tr = regulator_dt_lookup(dev, supply);\n2157:\t\tif (r)\n2158:\t\t\treturn r;\n2159:\t\n2160:\t\t/* if not found, try doing it non-dt way */\n2161:\t\tif (dev)\n2162:\t\t\tdevname = dev_name(dev);\n2163:\t\n2164:\t\tmutex_lock(\u0026regulator_list_mutex);\n2165:\t\tlist_for_each_entry(map, \u0026regulator_map_list, list) {\n2166:\t\t\t/* If the mapping has a device set up it must match */\n2167:\t\t\tif (map-\u003edev_name \u0026\u0026\n2168:\t\t\t (!devname || strcmp(map-\u003edev_name, devname)))\n2169:\t\t\t\tcontinue;\n2170:\t\n2171:\t\t\tif (strcmp(map-\u003esupply, supply) == 0 \u0026\u0026\n2172:\t\t\t get_device(\u0026map-\u003eregulator-\u003edev)) {\n2173:\t\t\t\tr = map-\u003eregulator;\n2174:\t\t\t\tbreak;\n2175:\t\t\t}\n2176:\t\t}\n2177:\t\tmutex_unlock(\u0026regulator_list_mutex);\n2178:\t\n2179:\t\tif (r)\n2180:\t\t\treturn r;\n2181:\t\n2182:\t\tr = regulator_lookup_by_name(supply);\n2183:\t\tif (r)\n2184:\t\t\treturn r;\n2185:\t\n2186:\t\treturn ERR_PTR(-ENODEV);\n2187:\t}\n"
} |
| 52/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 31152 output: 35 thoughts: 194 Thoughts: **Analyzing Regulator Supply Resolution** Okay, let's dive into how the condition `r == rdev` can manifest within the `regulator_resolve_supply` function. My understanding is that if, during the regulator lookup, `r` ends up being equal to `rdev`, it means the supply of `rdev` resolves back to `rdev` itself. This implies that the regulator either has itself as its supply, an alias that points back to itself, or, as could be indicated from a Device Tree setup, has something like a `reg1-supply = <®1>` configuration. Now, the critical question is, *when* does `regulator_resolve_supply()` get called? To understand this properly, I need to trace its usage. Let me check the callers of `regulator_resolve_supply` throughout the code. I'll focus on the `drivers/regulator/core.c` file. Looking through that file, I see: 1. At line 2270, we have `ret = regulator_resolve_supply(r);` This is potentially recursive. This warrants close examination. 2. Also, on line 2480, or thereabouts, I see another call. Let's make sure, I'll search for `regulator_resolve_supply` in the code to get the specific line number. |
| 53/2 | 2026/09/19 15:11 | tool | grepper |
0mArgs:{
"Expression": "\\bregulator_resolve_supply\\b",
"PathPrefix": "drivers/regulator/"
}Results: {
"Output": "drivers/regulator/core.c=2146=static struct regulator_dev *regulator_dev_lookup(struct device *dev,\n--\ndrivers/regulator/core.c-2188-\ndrivers/regulator/core.c:2189:static int regulator_resolve_supply(struct regulator_dev *rdev)\ndrivers/regulator/core.c-2190-{\n--\ndrivers/regulator/core.c-2269-\t/* Recursively resolve the supply of the supply */\ndrivers/regulator/core.c:2270:\tret = regulator_resolve_supply(r);\ndrivers/regulator/core.c-2271-\tif (ret \u003c 0) {\n--\ndrivers/regulator/core.c=2426=struct regulator *_regulator_get_common(struct regulator_dev *rdev, struct device *dev,\n--\ndrivers/regulator/core.c-2494-\ndrivers/regulator/core.c:2495:\tret = regulator_resolve_supply(rdev);\ndrivers/regulator/core.c-2496-\tif (ret \u003c 0) {\n--\ndrivers/regulator/core.c=6003=regulator_register(struct device *dev,\n--\ndrivers/regulator/core.c-6174-\t\t\t rdev-\u003esupply_name);\ndrivers/regulator/core.c:6175:\t\tret = regulator_resolve_supply(rdev);\ndrivers/regulator/core.c-6176-\t\tif (!ret)\n--\ndrivers/regulator/core.c-6221-\t\t */\ndrivers/regulator/core.c:6222:\t\tret = regulator_resolve_supply(rdev);\ndrivers/regulator/core.c-6223-\t\tif (ret)\n--\ndrivers/regulator/core.c=6406=static int regulator_bus_probe(struct device *bdev)\n--\ndrivers/regulator/core.c-6410-\ndrivers/regulator/core.c:6411:\tret = regulator_resolve_supply(rdev);\ndrivers/regulator/core.c-6412-\tif (ret)\n"
} |
| 54/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 32231 output: 35 thoughts: 156 Thoughts: **My Analysis of Regulator Registration in the Kernel** Okay, so I'm looking at how regulators get registered within the kernel, specifically in the context of fuzzing, particularly with syzkaller on amd64. Let's see, `regulator_resolve_supply()` – which seems like a core function for supply resolution – is called from a handful of places: `regulator_resolve_supply(r)`, obviously, but also by `_regulator_get_common`, `regulator_register`, and `regulator_bus_probe`. That gives me a good starting point for tracing the execution path. The crucial question is: can we reach a registered regulator, or perhaps trigger a registration, under fuzzing with syzkaller? That's what I want to understand. Therefore, I need to figure out which drivers register regulators – I'll start with those relevant to amd64, x86_64, or any emulated virtual hardware, things like USB, PCI, or virtio. Maybe a device emulated by the fuzzer registers a regulator. My next step is to get a broader picture. I need to understand the big picture. Where do all the regulators come from? Let's check callers of `regulator_register` throughout the entire kernel. This will paint a picture and pinpoint potential targets and entry points for fuzzer interaction. |
| 55/2 | 2026/09/19 15:11 | tool | grepper |
0mArgs:{
"Expression": "devm_regulator_register|regulator_register\\(",
"PathPrefix": "drivers/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1678 lines.\nUse more precise expression if possible.\n\ndrivers/hwmon/pmbus/pmbus_core.c=3447=static void pmbus_regulator_notify_worker(struct work_struct *work)\n--\ndrivers/hwmon/pmbus/pmbus_core.c-3474-\ndrivers/hwmon/pmbus/pmbus_core.c:3475:static int pmbus_regulator_register(struct pmbus_data *data)\ndrivers/hwmon/pmbus/pmbus_core.c-3476-{\n--\ndrivers/hwmon/pmbus/pmbus_core.c-3495-\ndrivers/hwmon/pmbus/pmbus_core.c:3496:\t\tdata-\u003erdevs[i] = devm_regulator_register(dev, \u0026info-\u003ereg_desc[i],\ndrivers/hwmon/pmbus/pmbus_core.c-3497-\t\t\t\t\t\t\t \u0026config);\n--\ndrivers/hwmon/pmbus/pmbus_core.c=3513=static void pmbus_regulator_notify(struct pmbus_data *data, int page, int event)\n--\ndrivers/hwmon/pmbus/pmbus_core.c-3518-#else\ndrivers/hwmon/pmbus/pmbus_core.c:3519:static int pmbus_regulator_register(struct pmbus_data *data)\ndrivers/hwmon/pmbus/pmbus_core.c-3520-{\n--\ndrivers/hwmon/pmbus/pmbus_core.c=3854=int pmbus_do_probe(struct i2c_client *client, struct pmbus_driver_info *info)\n--\ndrivers/hwmon/pmbus/pmbus_core.c-3930-\ndrivers/hwmon/pmbus/pmbus_core.c:3931:\tret = pmbus_regulator_register(data);\ndrivers/hwmon/pmbus/pmbus_core.c-3932-\tif (ret)\n--\ndrivers/iio/adc/ad7768-1.c=1637=static int ad7768_register_vcm_regulator(struct device *dev,\n--\ndrivers/iio/adc/ad7768-1.c-1652-\ndrivers/iio/adc/ad7768-1.c:1653:\tst-\u003evcm_rdev = devm_regulator_register(dev, \u0026vcm_desc, \u0026config);\ndrivers/iio/adc/ad7768-1.c-1654-\tif (IS_ERR(st-\u003evcm_rdev))\n--\ndrivers/mmc/host/renesas_sdhi_core.c=1055=int renesas_sdhi_probe(struct platform_device *pdev,\n--\ndrivers/mmc/host/renesas_sdhi_core.c-1214-\t\trcfg.driver_data = priv-\u003ehost;\ndrivers/mmc/host/renesas_sdhi_core.c:1215:\t\trdev = devm_regulator_register(dev, \u0026renesas_sdhi_vqmmc_regulator, \u0026rcfg);\ndrivers/mmc/host/renesas_sdhi_core.c-1216-\t\tof_node_put(rcfg.of_node);\n--\ndrivers/net/phy/qcom/at803x.c=749=static int at8031_register_regulators(struct phy_device *phydev)\n--\ndrivers/net/phy/qcom/at803x.c-757-\ndrivers/net/phy/qcom/at803x.c:758:\tpriv-\u003evddio_rdev = devm_regulator_register(dev, \u0026vddio_desc, \u0026config);\ndrivers/net/phy/qcom/at803x.c-759-\tif (IS_ERR(priv-\u003evddio_rdev)) {\n--\ndrivers/net/phy/qcom/at803x.c-763-\ndrivers/net/phy/qcom/at803x.c:764:\tpriv-\u003evddh_rdev = devm_regulator_register(dev, \u0026vddh_desc, \u0026config);\ndrivers/net/phy/qcom/at803x.c-765-\tif (IS_ERR(priv-\u003evddh_rdev)) {\n--\ndrivers/net/pse-pd/pd692x0.c=939=pd692x0_register_manager_regulator(struct device *dev, char *reg_name,\n--\ndrivers/net/pse-pd/pd692x0.c-966-\ndrivers/net/pse-pd/pd692x0.c:967:\trdev = devm_regulator_register(dev, rdesc, \u0026rconfig);\ndrivers/net/pse-pd/pd692x0.c-968-\tif (IS_ERR(rdev)) {\n--\ndrivers/net/pse-pd/pse_core.c=829=static int\ndrivers/net/pse-pd/pse_core.c:830:devm_pse_pi_regulator_register(struct pse_controller_dev *pcdev,\ndrivers/net/pse-pd/pse_core.c-831-\t\t\t char *name, int id)\n--\ndrivers/net/pse-pd/pse_core.c-868-\ndrivers/net/pse-pd/pse_core.c:869:\trdev = devm_regulator_register(pcdev-\u003edev, rdesc, \u0026rconfig);\ndrivers/net/pse-pd/pse_core.c-870-\tif (IS_ERR(rdev)) {\n--\ndrivers/net/pse-pd/pse_core.c=1039=int pse_controller_register(struct pse_controller_dev *pcdev)\n--\ndrivers/net/pse-pd/pse_core.c-1093-\ndrivers/net/pse-pd/pse_core.c:1094:\t\tret = devm_pse_pi_regulator_register(pcdev, reg_name, i);\ndrivers/net/pse-pd/pse_core.c-1095-\t\tif (ret)\n--\ndrivers/phy/mediatek/phy-mtk-hdmi.c=78=static int mtk_hdmi_phy_register_regulators(struct mtk_hdmi_phy *hdmi_phy)\n--\ndrivers/phy/mediatek/phy-mtk-hdmi.c-92-\ndrivers/phy/mediatek/phy-mtk-hdmi.c:93:\thdmi_phy-\u003erdev = devm_regulator_register(hdmi_phy-\u003edev, vreg_desc, \u0026vreg_config);\ndrivers/phy/mediatek/phy-mtk-hdmi.c-94-\tif (IS_ERR(hdmi_phy-\u003erdev))\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c=898=static int rcar_gen3_phy_usb2_vbus_regulator_get_exclusive_enable(struct rcar_gen3_chan *channel,\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-929-\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c:930:static int rcar_gen3_phy_usb2_vbus_regulator_register(struct rcar_gen3_chan *channel)\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-931-{\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-940-\t\trcfg.driver_data = channel;\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c:941:\t\trdev = devm_regulator_register(dev, \u0026rcar_gen3_phy_usb2_regulator,\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-942-\t\t\t\t\t \u0026rcfg);\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c=955=static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-1041-\tif (channel-\u003ephy_data-\u003eno_adp_ctrl \u0026\u0026 channel-\u003eis_otg_channel) {\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c:1042:\t\tret = rcar_gen3_phy_usb2_vbus_regulator_register(channel);\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-1043-\t\tif (ret)\n--\ndrivers/pinctrl/renesas/pfc-sh73a0.c=4122=static int sh73a0_pinmux_soc_init(struct sh_pfc *pfc)\n--\ndrivers/pinctrl/renesas/pfc-sh73a0.c-4131-\ndrivers/pinctrl/renesas/pfc-sh73a0.c:4132:\tvccq = devm_regulator_register(pfc-\u003edev, \u0026sh73a0_vccq_mc0_desc, \u0026cfg);\ndrivers/pinctrl/renesas/pfc-sh73a0.c-4133-\tif (IS_ERR(vccq)) {\n--\ndrivers/platform/olpc/olpc-ec.c=401=static int olpc_ec_probe(struct platform_device *pdev)\n--\ndrivers/platform/olpc/olpc-ec.c-432-\tec-\u003edcon_enabled = true;\ndrivers/platform/olpc/olpc-ec.c:433:\tregulator = devm_regulator_register(\u0026pdev-\u003edev, \u0026dcon_desc, \u0026config);\ndrivers/platform/olpc/olpc-ec.c-434-\tif (IS_ERR(regulator)) {\n--\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c=188=int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,\n--\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c-243-\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c:244:\tregulator-\u003erdev = regulator_register(int3472-\u003edev, \u0026regulator-\u003erdesc, \u0026cfg);\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c-245-\tif (IS_ERR(regulator-\u003erdev))\n--\ndrivers/power/supply/bq24190_charger.c=720=static int bq24190_register_vbus_regulator(struct bq24190_dev_info *bdi)\n--\ndrivers/power/supply/bq24190_charger.c-732-\tcfg.driver_data = bdi;\ndrivers/power/supply/bq24190_charger.c:733:\treg = devm_regulator_register(bdi-\u003edev, bdi-\u003einfo-\u003evbus_desc, \u0026cfg);\ndrivers/power/supply/bq24190_charger.c-734-\tif (IS_ERR(reg)) {\n--\ndrivers/power/supply/bq25890_charger.c=1243=static int bq25890_register_regulator(struct bq25890_device *bq)\n--\ndrivers/power/supply/bq25890_charger.c-1254-\ndrivers/power/supply/bq25890_charger.c:1255:\treg = devm_regulator_register(bq-\u003edev, \u0026bq25890_vbus_desc, \u0026cfg);\ndrivers/power/supply/bq25890_charger.c-1256-\tif (IS_ERR(reg)) {\n--\ndrivers/power/supply/bq25890_charger.c-1262-\tcfg.init_data = NULL;\ndrivers/power/supply/bq25890_charger.c:1263:\treg = devm_regulator_register(bq-\u003edev, \u0026bq25890_vsys_desc, \u0026cfg);\ndrivers/power/supply/bq25890_charger.c-1264-\tif (IS_ERR(reg)) {\n--\ndrivers/power/supply/max77759_charger.c=684=static int max77759_charger_probe(struct platform_device *pdev)\n--\ndrivers/power/supply/max77759_charger.c-727-\tchgin_otg_reg_cfg.of_node = dev_of_node(dev);\ndrivers/power/supply/max77759_charger.c:728:\tchg-\u003echgin_otg_rdev = devm_regulator_register(dev, \u0026chgin_otg_reg_desc,\ndrivers/power/supply/max77759_charger.c-729-\t\t\t\t\t\t \u0026chgin_otg_reg_cfg);\n--\ndrivers/power/supply/mt6360_charger.c=778=static int mt6360_charger_probe(struct platform_device *pdev)\n--\ndrivers/power/supply/mt6360_charger.c-825-\tconfig.regmap = mci-\u003eregmap;\ndrivers/power/supply/mt6360_charger.c:826:\tmci-\u003eotg_rdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026mt6360_otg_rdesc,\ndrivers/power/supply/mt6360_charger.c-827-\t\t\t\t\t\t\u0026config);\n--\ndrivers/power/supply/mt6370-charger.c=737=static int mt6370_chg_init_otg_regulator(struct mt6370_priv *priv)\n--\ndrivers/power/supply/mt6370-charger.c-744-\ndrivers/power/supply/mt6370-charger.c:745:\tpriv-\u003erdev = devm_regulator_register(priv-\u003edev, \u0026mt6370_chg_otg_rdesc,\ndrivers/power/supply/mt6370-charger.c-746-\t\t\t\t\t \u0026rcfg);\n--\ndrivers/power/supply/qcom_smbb.c=831=static int smbb_charger_probe(struct platform_device *pdev)\n--\ndrivers/power/supply/qcom_smbb.c-958-\ndrivers/power/supply/qcom_smbb.c:959:\tchg-\u003eotg_reg = devm_regulator_register(\u0026pdev-\u003edev, \u0026chg-\u003eotg_rdesc,\ndrivers/power/supply/qcom_smbb.c-960-\t\t\t\t\t \u0026config);\n--\ndrivers/power/supply/rt9467-charger.c=337=static int rt9467_register_otg_regulator(struct rt9467_chg_data *data)\n--\ndrivers/power/supply/rt9467-charger.c-344-\ndrivers/power/supply/rt9467-charger.c:345:\tdata-\u003erdev = devm_regulator_register(data-\u003edev, \u0026rt9467_otg_desc, \u0026cfg);\ndrivers/power/supply/rt9467-charger.c-346-\treturn PTR_ERR_OR_ZERO(data-\u003erdev);\n--\ndrivers/power/supply/rt9471.c=633=static int rt9471_register_otg_regulator(struct rt9471_chip *chip)\n--\ndrivers/power/supply/rt9471.c-637-\ndrivers/power/supply/rt9471.c:638:\tchip-\u003eotg_rdev = devm_regulator_register(dev, \u0026rt9471_otg_rdesc, \u0026cfg);\ndrivers/power/supply/rt9471.c-639-\n--\ndrivers/power/supply/sgm41542_charger.c=912=static const struct regulator_desc sgm4154x_otg_rdesc = {\n--\ndrivers/power/supply/sgm41542_charger.c-931-\ndrivers/power/supply/sgm41542_charger.c:932:static int sgm4154x_vbus_regulator_register(struct sgm4154x_device *sgm)\ndrivers/power/supply/sgm41542_charger.c-933-{\n--\ndrivers/power/supply/sgm41542_charger.c-939-\ndrivers/power/supply/sgm41542_charger.c:940:\tsgm-\u003eotg_rdev = devm_regulator_register(sgm-\u003edev,\ndrivers/power/supply/sgm41542_charger.c-941-\t\t\t\t\t\t\u0026sgm4154x_otg_rdesc,\n--\ndrivers/power/supply/sgm41542_charger.c=984=static int sgm4154x_probe(struct i2c_client *client)\n--\ndrivers/power/supply/sgm41542_charger.c-1050-\ndrivers/power/supply/sgm41542_charger.c:1051:\tret = sgm4154x_vbus_regulator_register(sgm);\ndrivers/power/supply/sgm41542_charger.c-1052-\tif (ret) {\n--\ndrivers/power/supply/smb347-charger.c=1531=static int smb347_probe(struct i2c_client *client)\n--\ndrivers/power/supply/smb347-charger.c-1586-\ndrivers/power/supply/smb347-charger.c:1587:\tsmb-\u003eusb_rdev = devm_regulator_register(dev,\ndrivers/power/supply/smb347-charger.c-1588-\t\t\t\t\t\t\u0026smb347_usb_vbus_regulator_desc,\n--\ndrivers/power/supply/ucs1002_power.c=534=static int ucs1002_probe(struct i2c_client *client)\n--\ndrivers/power/supply/ucs1002_power.c-634-\ndrivers/power/supply/ucs1002_power.c:635:\tinfo-\u003erdev = devm_regulator_register(dev, info-\u003eregulator_descriptor,\ndrivers/power/supply/ucs1002_power.c-636-\t\t\t\t \u0026regulator_config);\n--\ndrivers/regulator/88pg86x.c=60=static int pg86x_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/88pg86x.c-73-\t\tstruct regulator_dev *rdev;\ndrivers/regulator/88pg86x.c:74:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev,\ndrivers/regulator/88pg86x.c-75-\t\t\t\t\t \u0026pg86x_regulators[id],\n--\ndrivers/regulator/88pm800-regulator.c=226=static int pm800_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm800-regulator.c-260-\ndrivers/regulator/88pm800-regulator.c:261:\t\tregulator = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/88pm800-regulator.c-262-\t\t\t\t\u0026pm800_regulator_info[i].desc, \u0026config);\n--\ndrivers/regulator/88pm8607.c=315=static int pm8607_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm8607.c-359-\ndrivers/regulator/88pm8607.c:360:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc, \u0026config);\ndrivers/regulator/88pm8607.c-361-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/88pm886-regulator.c=340=static int pm886_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm886-regulator.c-365-\t\trdesc = \u0026pm886_regulators[i];\ndrivers/regulator/88pm886-regulator.c:366:\t\trdev = devm_regulator_register(dev, rdesc, \u0026rcfg);\ndrivers/regulator/88pm886-regulator.c-367-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/aat2870-regulator.c=150=static int aat2870_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/aat2870-regulator.c-166-\ndrivers/regulator/aat2870-regulator.c:167:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026ri-\u003edesc, \u0026config);\ndrivers/regulator/aat2870-regulator.c-168-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/ab8500-ext.c=393=static int ab8500_ext_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/ab8500-ext.c-430-\t\t/* register regulator with framework */\ndrivers/regulator/ab8500-ext.c:431:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/ab8500-ext.c-432-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/ab8500.c=1643=static void abx500_get_regulator_info(struct ab8500 *ab8500)\n--\ndrivers/regulator/ab8500.c-1661-\ndrivers/regulator/ab8500.c:1662:static int ab8500_regulator_register(struct platform_device *pdev,\ndrivers/regulator/ab8500.c-1663-\t\t\t\t struct regulator_init_data *init_data,\n--\ndrivers/regulator/ab8500.c-1690-\t/* register regulator with framework */\ndrivers/regulator/ab8500.c:1691:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc, \u0026config);\ndrivers/regulator/ab8500.c-1692-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/ab8500.c=1701=static int ab8500_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/ab8500.c-1725-\tfor (i = 0; i \u003c abx500_regulator.info_size; i++) {\ndrivers/regulator/ab8500.c:1726:\t\terr = ab8500_regulator_register(pdev, match[i].init_data, i,\ndrivers/regulator/ab8500.c-1727-\t\t\t\t\t\tmatch[i].of_node);\n--\ndrivers/regulator/act8865-regulator.c=654=static int act8865_pmic_probe(struct i2c_client *client)\n--\ndrivers/regulator/act8865-regulator.c-755-\ndrivers/regulator/act8865-regulator.c:756:\t\trdev = devm_regulator_register(dev, desc, \u0026config);\ndrivers/regulator/act8865-regulator.c-757-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/act8945a-regulator.c=274=static int act8945a_pmic_probe(struct platform_device *pdev)\n--\ndrivers/regulator/act8945a-regulator.c-309-\tfor (i = 0; i \u003c num_regulators; i++) {\ndrivers/regulator/act8945a-regulator.c:310:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regulators[i],\ndrivers/regulator/act8945a-regulator.c-311-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/ad5398.c=216=static int ad5398_probe(struct i2c_client *client)\n--\ndrivers/regulator/ad5398.c-248-\ndrivers/regulator/ad5398.c:249:\tchip-\u003erdev = devm_regulator_register(\u0026client-\u003edev, \u0026ad5398_reg,\ndrivers/regulator/ad5398.c-250-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/adp5055-regulator.c=345=static int adp5055_probe(struct i2c_client *client)\n--\ndrivers/regulator/adp5055-regulator.c-384-\ndrivers/regulator/adp5055-regulator.c:385:\t\trdev = devm_regulator_register(dev, desc, \u0026config);\ndrivers/regulator/adp5055-regulator.c-386-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/anatop-regulator.c=155=static int anatop_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/anatop-regulator.c-305-\t/* register regulator */\ndrivers/regulator/anatop-regulator.c:306:\trdev = devm_regulator_register(dev, rdesc, \u0026config);\ndrivers/regulator/anatop-regulator.c-307-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/arizona-ldo1.c=226=static int arizona_ldo1_common_init(struct platform_device *pdev,\n--\ndrivers/regulator/arizona-ldo1.c-278-\ndrivers/regulator/arizona-ldo1.c:279:\tldo1-\u003eregulator = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/arizona-ldo1.c-280-\n--\ndrivers/regulator/arizona-micsupp.c=250=static int arizona_micsupp_common_init(struct platform_device *pdev,\n--\ndrivers/regulator/arizona-micsupp.c-284-\ndrivers/regulator/arizona-micsupp.c:285:\tmicsupp-\u003eregulator = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/arizona-micsupp.c-286-\t\t\t\t\t\t desc,\n--\ndrivers/regulator/as3711-regulator.c=203=static int as3711_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/as3711-regulator.c-230-\ndrivers/regulator/as3711-regulator.c:231:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026as3711_reg_desc[id],\ndrivers/regulator/as3711-regulator.c-232-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/as3722-regulator.c=634=static int as3722_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/as3722-regulator.c-795-\t\tconfig.of_node = as3722_regulator_matches[id].of_node;\ndrivers/regulator/as3722-regulator.c:796:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/as3722-regulator.c-797-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/atc260x-regulator.c=473=static int atc260x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/atc260x-regulator.c-513-\t\tif (atc2603c_ver_b \u0026\u0026 regulators[i].id == ATC2603C_ID_DCDC2)\ndrivers/regulator/atc260x-regulator.c:514:\t\t\tatc260x_rdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/atc260x-regulator.c-515-\t\t\t\t\t\t\t \u0026atc2603c_reg_dcdc2_ver_b,\n--\ndrivers/regulator/atc260x-regulator.c-517-\t\telse\ndrivers/regulator/atc260x-regulator.c:518:\t\t\tatc260x_rdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/atc260x-regulator.c-519-\t\t\t\t\t\t\t \u0026regulators[i],\n--\ndrivers/regulator/aw37503-regulator.c=178=static int aw37503_probe(struct i2c_client *client)\n--\ndrivers/regulator/aw37503-regulator.c-203-\tfor (id = 0; id \u003c AW37503_MAX_REGULATORS; ++id) {\ndrivers/regulator/aw37503-regulator.c:204:\t\trdev = devm_regulator_register(dev, \u0026aw_regs_desc[id],\ndrivers/regulator/aw37503-regulator.c-205-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/axp20x-regulator.c=1553=static int axp20x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/axp20x-regulator.c-1689-\ndrivers/regulator/axp20x-regulator.c:1690:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/axp20x-regulator.c-1691-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/axp20x-regulator.c-1733-\t\t\t\t AXP22X_MISC_N_VBUSEN_FUNC, 0);\ndrivers/regulator/axp20x-regulator.c:1734:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/axp20x-regulator.c-1735-\t\t\t\t\t \u0026axp22x_drivevbus_regulator,\n--\ndrivers/regulator/bcm590xx-regulator.c=1098=static int bcm590xx_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bcm590xx-regulator.c-1153-\ndrivers/regulator/bcm590xx-regulator.c:1154:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/bcm590xx-regulator.c-1155-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd71815-regulator.c=561=static int bd7181x_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd71815-regulator.c-599-\ndrivers/regulator/bd71815-regulator.c:600:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/bd71815-regulator.c-601-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/bd71828-regulator.c=1622=static int bd71828_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd71828-regulator.c-1670-\t\tconfig.driver_data = rd;\ndrivers/regulator/bd71828-regulator.c:1671:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/bd71828-regulator.c-1672-\t\t\t\t\t \u0026rd-\u003edesc, \u0026config);\n--\ndrivers/regulator/bd718x7-regulator.c=1673=static int bd718xx_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd718x7-regulator.c-1770-\ndrivers/regulator/bd718x7-regulator.c:1771:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/bd718x7-regulator.c-1772-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/bd9571mwv-regulator.c=273=static int bd9571mwv_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd9571mwv-regulator.c-299-\t\t\tcontinue;\ndrivers/regulator/bd9571mwv-regulator.c:300:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regulators[i],\ndrivers/regulator/bd9571mwv-regulator.c-301-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd9576-regulator.c=897=static int bd957x_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd9576-regulator.c-1035-\ndrivers/regulator/bd9576-regulator.c:1036:\t\tr-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, desc,\ndrivers/regulator/bd9576-regulator.c-1037-\t\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd96801-regulator.c=1210=static int bd96801_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd96801-regulator.c-1267-\ndrivers/regulator/bd96801-regulator.c:1268:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/bd96801-regulator.c-1269-\t\t\t\t\t \u0026rdesc[i].desc, \u0026config);\n--\ndrivers/regulator/bq257xx-regulator.c=142=static int bq257xx_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bq257xx-regulator.c-164-\ndrivers/regulator/bq257xx-regulator.c:165:\tpdata-\u003ebq257xx_reg = devm_regulator_register(dev, \u0026pdata-\u003edesc, \u0026cfg);\ndrivers/regulator/bq257xx-regulator.c-166-\tif (IS_ERR(pdata-\u003ebq257xx_reg)) {\n--\ndrivers/regulator/core.c=6002=struct regulator_dev *\ndrivers/regulator/core.c:6003:regulator_register(struct device *dev,\ndrivers/regulator/core.c-6004-\t\t const struct regulator_desc *regulator_desc,\n--\ndrivers/regulator/cpcap-regulator.c=602=static int cpcap_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/cpcap-regulator.c-642-\t\tconfig.driver_data = (void *)regulator;\ndrivers/regulator/cpcap-regulator.c:643:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/cpcap-regulator.c-644-\t\t\t\t\t \u0026regulator-\u003erdesc,\n--\ndrivers/regulator/cros-ec-regulator.c=157=static int cros_ec_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/cros-ec-regulator.c-196-\ndrivers/regulator/cros-ec-regulator.c:197:\tdrvdata-\u003edev = devm_regulator_register(dev, \u0026drvdata-\u003edesc, \u0026cfg);\ndrivers/regulator/cros-ec-regulator.c-198-\tif (IS_ERR(drvdata-\u003edev)) {\n--\ndrivers/regulator/da903x-regulator.c=430=static int da903x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da903x-regulator.c-459-\ndrivers/regulator/da903x-regulator.c:460:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026ri-\u003edesc, \u0026config);\ndrivers/regulator/da903x-regulator.c-461-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/da9052-regulator.c=393=static int da9052_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9052-regulator.c-422-\ndrivers/regulator/da9052-regulator.c:423:\tregulator-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/da9052-regulator.c-424-\t\t\t\t\t\t \u0026regulator-\u003einfo-\u003ereg_desc,\n--\ndrivers/regulator/da9055-regulator.c=508=static int da9055_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9055-regulator.c-538-\ndrivers/regulator/da9055-regulator.c:539:\tregulator-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/da9055-regulator.c-540-\t\t\t\t\t\t \u0026regulator-\u003einfo-\u003ereg_desc,\n--\ndrivers/regulator/da9062-regulator.c=920=static int da9062_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9062-regulator.c-1003-\ndrivers/regulator/da9062-regulator.c:1004:\t\tregl-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regl-\u003edesc,\ndrivers/regulator/da9062-regulator.c-1005-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/da9063-regulator.c=882=static int da9063_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9063-regulator.c-1032-\ndrivers/regulator/da9063-regulator.c:1033:\t\tregl-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regl-\u003edesc,\ndrivers/regulator/da9063-regulator.c-1034-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/da9121-regulator.c=776=static int da9121_set_regulator_config(struct da9121 *chip)\n--\ndrivers/regulator/da9121-regulator.c-790-\ndrivers/regulator/da9121-regulator.c:791:\t\tchip-\u003erdev[i] = devm_regulator_register(chip-\u003edev,\ndrivers/regulator/da9121-regulator.c-792-\t\t\t\t\tregl_desc, \u0026config);\n--\ndrivers/regulator/da9210-regulator.c=130=static int da9210_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/da9210-regulator.c-166-\ndrivers/regulator/da9210-regulator.c:167:\trdev = devm_regulator_register(\u0026i2c-\u003edev, \u0026da9210_reg, \u0026config);\ndrivers/regulator/da9210-regulator.c-168-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/da9211-regulator.c=379=static int da9211_regulator_init(struct da9211 *chip)\n--\ndrivers/regulator/da9211-regulator.c-421-\t\t\tdevm_gpiod_unhinge(chip-\u003edev, config.ena_gpiod);\ndrivers/regulator/da9211-regulator.c:422:\t\tchip-\u003erdev[i] = devm_regulator_register(chip-\u003edev,\ndrivers/regulator/da9211-regulator.c-423-\t\t\t\u0026da9211_regulators[i], \u0026config);\n--\ndrivers/regulator/db8500-prcmu.c=437=static int db8500_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/db8500-prcmu.c-455-\ndrivers/regulator/db8500-prcmu.c:456:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/db8500-prcmu.c-457-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/devres.c=449=static void devm_rdev_release(struct device *dev, void *res)\n--\ndrivers/regulator/devres.c-454-/**\ndrivers/regulator/devres.c:455: * devm_regulator_register - Resource managed regulator_register()\ndrivers/regulator/devres.c-456- * @dev: device to supply\n--\ndrivers/regulator/devres.c-464- */\ndrivers/regulator/devres.c:465:struct regulator_dev *devm_regulator_register(struct device *dev,\ndrivers/regulator/devres.c-466-\t\t\t\t const struct regulator_desc *regulator_desc,\n--\ndrivers/regulator/devres.c-475-\ndrivers/regulator/devres.c:476:\trdev = regulator_register(dev, regulator_desc, config);\ndrivers/regulator/devres.c-477-\tif (!IS_ERR(rdev)) {\n--\ndrivers/regulator/devres.c-485-}\ndrivers/regulator/devres.c:486:EXPORT_SYMBOL_GPL(devm_regulator_register);\ndrivers/regulator/devres.c-487-\n--\ndrivers/regulator/devres.c=502=static void devm_regulator_destroy_supply_alias(struct device *dev, void *res)\n--\ndrivers/regulator/devres.c-509-/**\ndrivers/regulator/devres.c:510: * devm_regulator_register_supply_alias - Resource managed\ndrivers/regulator/devres.c-511- * regulator_register_supply_alias()\n--\ndrivers/regulator/devres.c-521- */\ndrivers/regulator/devres.c:522:int devm_regulator_register_supply_alias(struct device *dev, const char *id,\ndrivers/regulator/devres.c-523-\t\t\t\t\t struct device *alias_dev,\n--\ndrivers/regulator/devres.c-547-}\ndrivers/regulator/devres.c:548:EXPORT_SYMBOL_GPL(devm_regulator_register_supply_alias);\ndrivers/regulator/devres.c-549-\n--\ndrivers/regulator/devres.c=584=int devm_regulator_bulk_register_supply_alias(struct device *dev,\n--\ndrivers/regulator/devres.c-593-\tfor (i = 0; i \u003c num_id; ++i) {\ndrivers/regulator/devres.c:594:\t\tret = devm_regulator_register_supply_alias(dev, id[i],\ndrivers/regulator/devres.c-595-\t\t\t\t\t\t\t alias_dev,\n--\ndrivers/regulator/devres.c=629=static void devm_regulator_destroy_notifier(struct device *dev, void *res)\n--\ndrivers/regulator/devres.c-636-/**\ndrivers/regulator/devres.c:637: * devm_regulator_register_notifier - Resource managed\ndrivers/regulator/devres.c-638- * regulator_register_notifier\n--\ndrivers/regulator/devres.c-645- */\ndrivers/regulator/devres.c:646:int devm_regulator_register_notifier(struct regulator *regulator,\ndrivers/regulator/devres.c-647-\t\t\t\t struct notifier_block *nb)\n--\ndrivers/regulator/devres.c-670-}\ndrivers/regulator/devres.c:671:EXPORT_SYMBOL_GPL(devm_regulator_register_notifier);\ndrivers/regulator/devres.c-672-\n--\ndrivers/regulator/devres.c-679- *\ndrivers/regulator/devres.c:680: * Unregister a notifier registered with devm_regulator_register_notifier().\ndrivers/regulator/devres.c-681- * Normally this function will not need to be called and the resource\n--\ndrivers/regulator/dummy.c=40=static int dummy_regulator_probe(struct faux_device *fdev)\n--\ndrivers/regulator/dummy.c-47-\ndrivers/regulator/dummy.c:48:\tdummy_regulator_rdev = devm_regulator_register(\u0026fdev-\u003edev, \u0026dummy_desc,\ndrivers/regulator/dummy.c-49-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/fan53555.c=608=static void fan53555_device_mode_map_setup(struct fan53555_device_info *di)\n--\ndrivers/regulator/fan53555.c-618-\ndrivers/regulator/fan53555.c:619:static int fan53555_regulator_register(struct fan53555_device_info *di,\n\n"
} |
| 56/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 44958 output: 34 thoughts: 44 Thoughts: Here's my thinking process: **Diving into the `dummy.c` Regulator Driver** Okay, so we're starting with `dummy.c`. Classic placeholder driver, right? Let's get right to it and focus on line 40 within `drivers/regulator/dummy.c`. That's where things usually get interesting, or at least where the key initialization or operational logic often resides in these basic regulator implementations. Time to take a closer look at that file. This should be a quick one! |
| 57/2 | 2026/09/19 15:11 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/dummy.c",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0-or-later\n 2:\t/*\n 3:\t * dummy.c\n 4:\t *\n 5:\t * Copyright 2010 Wolfson Microelectronics PLC.\n 6:\t *\n 7:\t * Author: Mark Brown \u003cbroonie@opensource.wolfsonmicro.com\u003e\n 8:\t *\n 9:\t * This is useful for systems with mixed controllable and\n 10:\t * non-controllable regulators, as well as for allowing testing on\n 11:\t * systems with no controllable regulators.\n 12:\t */\n 13:\t\n 14:\t#include \u003clinux/err.h\u003e\n 15:\t#include \u003clinux/export.h\u003e\n 16:\t#include \u003clinux/device/faux.h\u003e\n 17:\t#include \u003clinux/regulator/driver.h\u003e\n 18:\t#include \u003clinux/regulator/machine.h\u003e\n 19:\t\n 20:\t#include \"dummy.h\"\n 21:\t\n 22:\tstruct regulator_dev *dummy_regulator_rdev;\n 23:\t\n 24:\tstatic const struct regulator_init_data dummy_initdata = {\n 25:\t\t.constraints = {\n 26:\t\t\t.always_on = 1,\n 27:\t\t},\n 28:\t};\n 29:\t\n 30:\tstatic const struct regulator_ops dummy_ops;\n 31:\t\n 32:\tstatic const struct regulator_desc dummy_desc = {\n 33:\t\t.name = \"regulator-dummy\",\n 34:\t\t.id = -1,\n 35:\t\t.type = REGULATOR_VOLTAGE,\n 36:\t\t.owner = THIS_MODULE,\n 37:\t\t.ops = \u0026dummy_ops,\n 38:\t};\n 39:\t\n 40:\tstatic int dummy_regulator_probe(struct faux_device *fdev)\n 41:\t{\n 42:\t\tstruct regulator_config config = { };\n 43:\t\tint ret;\n 44:\t\n 45:\t\tconfig.dev = \u0026fdev-\u003edev;\n 46:\t\tconfig.init_data = \u0026dummy_initdata;\n 47:\t\n 48:\t\tdummy_regulator_rdev = devm_regulator_register(\u0026fdev-\u003edev, \u0026dummy_desc,\n 49:\t\t\t\t\t\t\t \u0026config);\n 50:\t\tif (IS_ERR(dummy_regulator_rdev)) {\n 51:\t\t\tret = PTR_ERR(dummy_regulator_rdev);\n 52:\t\t\tpr_err(\"Failed to register regulator: %d\\n\", ret);\n 53:\t\t\treturn ret;\n 54:\t\t}\n 55:\t\n 56:\t\treturn 0;\n 57:\t}\n 58:\t\n 59:\tstatic struct faux_device_ops dummy_regulator_driver = {\n 60:\t\t.probe = dummy_regulator_probe,\n 61:\t};\n 62:\t\n 63:\tstatic struct faux_device *dummy_fdev;\n 64:\t\n 65:\tvoid __init regulator_dummy_init(void)\n 66:\t{\n 67:\t\tdummy_fdev = faux_device_create(\"reg-dummy\", NULL, \u0026dummy_regulator_driver);\n 68:\t\tif (!dummy_fdev) {\n 69:\t\t\tpr_err(\"Failed to allocate dummy regulator device\\n\");\n 70:\t\t\treturn;\n 71:\t\t}\n 72:\t}\n"
} |
| 58/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 46067 output: 30 thoughts: 822 Thoughts: **Investigating the Regulator Resolution Logic** Okay, so I'm looking at this `regulator_resolve_supply` function and trying to figure out how `r == rdev` can possibly happen. We know that `regulator_dummy_init()` registers a dummy regulator with no supply name, so that initial check at line 2199 immediately returns. The key seems to be figuring out how the `r` value in that `regulator_resolve_supply` function ends up *equal* to `rdev`, and therefore trigger the "Supply for %s (%s) resolved to itself" error. Initially, I wanted to jump to the commit history to see how this code evolved, but since I'm told the code is *already* committed, I need to focus on the current source. Grepper's limitations mean I can't directly check the commit messages, so I need to reason through the possible code paths. The code first tries a device tree lookup with `regulator_dt_lookup`. Then if that fails, it does a more generic search with `regulator_dev_lookup`. So, let's break this down: Case 1: `regulator_dt_lookup` returns the same regulator. This suggests a Device Tree configuration issue. The device node is likely specifying `vin-supply = <®ulator_vin>;` where the "regulator_vin" is *this* regulator's own phandle. That would be a clear, self-referential error in the DT. Case 2: No DT, so `regulator_dev_lookup` finds the regulator. This scenario might occur in non-DT scenarios, specifically in platform registration, where the `init_data->supply_regulator` is set to the name of the regulator *itself*. It's also possible this happens via a `regulator_map` if the mapping is incorrectly set. The broader question that then comes to mind is: can userspace or, for example, Syzkaller, dynamically create a regulator in a way that could cause this? Can userspace create Device Tree overlays via things like `CONFIG_OF_CONFIGFS` or `CONFIG_OF_OVERLAY`? I need to check if the arch supports device tree. The core of the problem boils down to a circular dependency in the regulator's configuration: the regulator is attempting to supply itself, either through a Device Tree or platform registration error. I need to keep in mind that userspace control is a possibility. |
| 59/2 | 2026/09/19 15:11 | tool | grepper |
0mError:no matches Args: {
"Expression": "config OF\\b",
"PathPrefix": "arch/x86/"
}Results: {
"error": "no matches"
} |
| 60/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 47465 output: 28 thoughts: 12 Thoughts: Here's my summary, as though I'm thinking it: **Kconfig Dive Begins** Alright, time to get into the heart of it. First stop, the `drivers/of/Kconfig` file. I need to understand how the device tree bindings are being handled within this particular driver section. I'm especially interested in how the configuration options are set up and structured, and how they relate to the underlying hardware. Are they using the standard `config` directives, or are there any custom macros or clever tricks being employed? I'm hoping to quickly identify any potential issues or areas for improvement in terms of clarity and maintainability. Let's see what we've got. I'm expecting some standard Kconfig practices, but I'm always on the lookout for anything unusual or particularly insightful. Let's dig in and see if there are any interesting details. |
| 61/2 | 2026/09/19 15:11 | tool | grepper |
0mArgs:{
"Expression": "config OF\\b",
"PathPrefix": "drivers/of/"
}Results: {
"Output": "drivers/of/Kconfig=8=config BUILTIN_DTB_ALL\n--\ndrivers/of/Kconfig-10-\ndrivers/of/Kconfig:11:menuconfig OF\ndrivers/of/Kconfig-12-\tbool \"Device Tree and Open Firmware support\"\n"
} |
| 62/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 47768 output: 33 thoughts: 55 Thoughts: Okay, let's break this down. **Investigating the Open Firmware (OF) Configuration Dependency on x86** Right, so I need to figure out how the Open Firmware (OF) support is being treated in the kernel configuration. I'm seeing `menuconfig OF`, so that's a boolean option, right? Now, the question is, does the x86 architecture *select* or *enable* OF? In other words, is OF automatically included when I choose something on x86, or is it a separate configurable option that x86 provides? To get the answer, I'll need to check the Kconfig files. The logical places to start are either `drivers/of/Kconfig` which should contain the core OF configuration, or `arch/x86/Kconfig` because that's the x86 architecture-specific configuration. I'll search for either a `select OF` statement, which means x86 is forcing the selection, or simply a reference to `OF` which would indicate it is an option x86 exposes. Time to dive in. |
| 63/2 | 2026/09/19 15:11 | tool | grepper |
0mArgs:{
"Expression": "\\bOF\\b",
"PathPrefix": "arch/x86/Kconfig"
}Results: {
"Output": "arch/x86/Kconfig=669=config X86_INTEL_CE\n--\narch/x86/Kconfig-676-\tselect X86_REBOOTFIXUPS\narch/x86/Kconfig:677:\tselect OF\narch/x86/Kconfig-678-\tselect OF_EARLY_FLATTREE\n--\narch/x86/Kconfig=1509=config NUMA\n--\narch/x86/Kconfig-1513-\tselect USE_PERCPU_NUMA_NODE_ID\narch/x86/Kconfig:1514:\tselect OF_NUMA if OF\narch/x86/Kconfig-1515-\thelp\n--\narch/x86/Kconfig=2979=config OLPC\n--\narch/x86/Kconfig-2983-\tselect GPIOLIB_LEGACY\narch/x86/Kconfig:2984:\tselect OF\narch/x86/Kconfig-2985-\tselect OF_PROMTREE\n"
} |
| 64/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 48367 output: 29 thoughts: 121 Thoughts: **My Current Thinking About Device Tree (DT) Support** Okay, so I'm looking at this code and trying to get a handle on the Device Tree (`OF`) configurations. My initial thought is that `OF` is *only* enabled on X86 platforms specifically if we're dealing with either the `X86_INTEL_CE` (that old 32-bit CE4100 chip) or the `OLPC` (the 32-bit XO-1.5). Which, on its face, seems... limited. I mean, on standard `amd64`, it's explicitly *not* enabled! That struck me as odd. Then I paused. Wait a second. That's too simplistic. What about `CONFIG_OF_UNITTEST`? That's a self-test during boot, right? Not really a mainstream deployment. And then it hit me! What about the more interesting use cases I'm familiar with: `OF_CONFIGFS` and `OF_OVERLAY`? Both of those are incredibly relevant to modern usage and require far more nuanced consideration. Time to drill down. I'll need to go straight to `drivers/of/Kconfig` to see what the *actual* configuration options are. That's where the real answers will be. |
| 65/2 | 2026/09/19 15:11 | tool | grepper |
0mArgs:{
"Expression": "config OF_OVERLAY",
"PathPrefix": "drivers/of/"
}Results: {
"Output": "drivers/of/Kconfig=102=config OF_RESOLVE\n--\ndrivers/of/Kconfig-104-\ndrivers/of/Kconfig:105:config OF_OVERLAY\ndrivers/of/Kconfig-106-\tbool \"Device Tree overlays\"\n--\ndrivers/of/Kconfig-115-\ndrivers/of/Kconfig:116:config OF_OVERLAY_KUNIT_TEST\ndrivers/of/Kconfig-117-\ttristate \"Device Tree overlay KUnit tests\" if !KUNIT_ALL_TESTS\n"
} |
| 66/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 48946 output: 26 thoughts: 28 Thoughts: Here's my thinking process: **Investigating ConfigFS and Device Tree Integration** Okay, so I'm wondering about using configfs with the Open Firmware (OF) system. Is there a way to make these two play nicely together? The question immediately pops into my head: "Does `OF_CONFIGFS` exist?" That would be the logical flag for this kind of integration. To find out, I need to dig into the kernel's configuration files. Specifically, the place to look would be the Device Tree drivers configuration, which lives under `drivers/of/Kconfig`. I'll open that up and see if my hunch is correct, or if there's a different approach being used. |
| 67/2 | 2026/09/19 15:11 | tool | grepper |
0mError:no matches Args: {
"Expression": "CONFIGFS",
"PathPrefix": "drivers/of/"
}Results: {
"error": "no matches"
} |
| 68/2 | 2026/09/19 15:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 49162 output: 30 thoughts: 57 Thoughts: **Investigating Regulator Creation in the Absence of Configfs** Okay, so there's no ConfigFS implementation for Open Firmware (OF) regulators in the mainline kernel. That's the starting point. Now, the question is, how *else* can userspace interact to create regulators? I need to figure out if there's an alternative mechanism. Are we talking about ConfigFS being the only way, or are there other methods? My next step is to look for clues, specifically focusing on the `drivers/regulator/` directory. I need to search the kernel source for functions or methods that might offer user-space the capability to create regulators. I'll focus on functions like `faux_device_create` or anything similar that might involve a virtual or "fake" device to expose a regulator through sysfs. I need to understand the current state of the art to understand the issue. I have to see how regulators are exposed to userspace. |
| 69/2 | 2026/09/19 15:12 | tool | grepper |
0mArgs:{
"Expression": "faux_device_create",
"PathPrefix": "drivers/regulator/"
}Results: {
"Output": "drivers/regulator/dummy.c=65=void __init regulator_dummy_init(void)\ndrivers/regulator/dummy.c-66-{\ndrivers/regulator/dummy.c:67:\tdummy_fdev = faux_device_create(\"reg-dummy\", NULL, \u0026dummy_regulator_driver);\ndrivers/regulator/dummy.c-68-\tif (!dummy_fdev) {\n"
} |
| 70/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 49558 output: 22 thoughts: 57 Thoughts: Here's my thought process, as it stands: **Navigating the Regulator Landscape** Okay, so I need to get a handle on the regulator situation. First, I'll go straight to `drivers/regulator/`, and take a look at the `regulator_register` function, that's usually the starting point. I want to quickly identify if there are any virtual regulators in this setup. To find that, I'll need to know which file defines those; `drivers/regulator/virtual.c` sounds likely, or something similarly named. I should probably just do a quick scan of *all* the files in `drivers/regulator/` to be thorough, just in case they're lurking somewhere unexpected. Always good to cover all my bases. |
| 71/2 | 2026/09/19 15:12 | tool | codesearch-dir-index |
0mArgs:{
"Dir": "drivers/regulator"
}Results: {
"Files": [
"88pg86x.c",
"88pm800-regulator.c",
"88pm8607.c",
"88pm886-regulator.c",
"aat2870-regulator.c",
"ab8500-ext.c",
"ab8500.c",
"act8865-regulator.c",
"act8945a-regulator.c",
"ad5398.c",
"adp5055-regulator.c",
"anatop-regulator.c",
"arizona-ldo1.c",
"arizona-micsupp.c",
"as3711-regulator.c",
"as3722-regulator.c",
"atc260x-regulator.c",
"aw37503-regulator.c",
"axp20x-regulator.c",
"bcm590xx-regulator.c",
"bd71815-regulator.c",
"bd71828-regulator.c",
"bd718x7-regulator.c",
"bd9571mwv-regulator.c",
"bd9576-regulator.c",
"bd96801-regulator.c",
"bq257xx-regulator.c",
"core.c",
"cpcap-regulator.c",
"cros-ec-regulator.c",
"da903x-regulator.c",
"da9052-regulator.c",
"da9055-regulator.c",
"da9062-regulator.c",
"da9063-regulator.c",
"da9121-regulator.c",
"da9121-regulator.h",
"da9210-regulator.c",
"da9210-regulator.h",
"da9211-regulator.c",
"da9211-regulator.h",
"db8500-prcmu.c",
"dbx500-prcmu.c",
"dbx500-prcmu.h",
"devres.c",
"dummy.c",
"dummy.h",
"event.c",
"fan53555.c",
"fan53880.c",
"fixed-helper.c",
"fixed.c",
"fp9931.c",
"gpio-regulator.c",
"helpers.c",
"hi6421-regulator.c",
"hi6421v530-regulator.c",
"hi6421v600-regulator.c",
"hi655x-regulator.c",
"internal.h",
"irq_helpers.c",
"isl6271a-regulator.c",
"isl9305.c",
"lm363x-regulator.c",
"lochnagar-regulator.c",
"lp3971.c",
"lp3972.c",
"lp872x.c",
"lp873x-regulator.c",
"lp8755.c",
"lp87565-regulator.c",
"lp8788-buck.c",
"lp8788-ldo.c",
"ltc3589.c",
"ltc3676.c",
"max14577-regulator.c",
"max1586.c",
"max20086-regulator.c",
"max20411-regulator.c",
"max5970-regulator.c",
"max77503-regulator.c",
"max77541-regulator.c",
"max77620-regulator.c",
"max77650-regulator.c",
"max77675-regulator.c",
"max77686-regulator.c",
"max77693-regulator.c",
"max77802-regulator.c",
"max77826-regulator.c",
"max77838-regulator.c",
"max77857-regulator.c",
"max8649.c",
"max8660.c",
"max8893.c",
"max8907-regulator.c",
"max8925-regulator.c",
"max8952.c",
"max8973-regulator.c",
"max8997-regulator.c",
"max8998.c",
"mc13783-regulator.c",
"mc13892-regulator.c",
"mc13xxx-regulator-core.c",
"mc13xxx.h",
"mcp16502.c",
"mp5416.c",
"mp8859.c",
"mp886x.c",
"mpq7920.c",
"mpq7920.h",
"mt6311-regulator.c",
"mt6311-regulator.h",
"mt6315-regulator.c",
"mt6316-regulator.c",
"mt6323-regulator.c",
"mt6331-regulator.c",
"mt6332-regulator.c",
"mt6357-regulator.c",
"mt6358-regulator.c",
"mt6359-regulator.c",
"mt6360-regulator.c",
"mt6363-regulator.c",
"mt6370-regulator.c",
"mt6380-regulator.c",
"mt6397-regulator.c",
"mtk-dvfsrc-regulator.c",
"of_regulator.c",
"palmas-regulator.c",
"pbias-regulator.c",
"pca9450-regulator.c",
"pf0900-regulator.c",
"pf1550-regulator.c",
"pf530x-regulator.c",
"pf8x00-regulator.c",
"pf9453-regulator.c",
"pfuze100-regulator.c",
"pv88060-regulator.c",
"pv88060-regulator.h",
"pv88080-regulator.c",
"pv88080-regulator.h",
"pv88090-regulator.c",
"pv88090-regulator.h",
"pwm-regulator.c",
"qcom-labibb-regulator.c",
"qcom-pm8008-regulator.c",
"qcom-refgen-regulator.c",
"qcom-rpmh-regulator.c",
"qcom_rpm-regulator.c",
"qcom_smd-regulator.c",
"qcom_spmi-regulator.c",
"qcom_usb_vbus-regulator.c",
"raa215300.c",
"rc5t583-regulator.c",
"regnl.h",
"renesas-usb-vbus-regulator.c",
"rk808-regulator.c",
"rn5t618-regulator.c",
"rohm-regulator.c",
"rpi-panel-attiny-regulator.c",
"rpi-panel-v2-regulator.c",
"rt4801-regulator.c",
"rt4803.c",
"rt4831-regulator.c",
"rt5033-regulator.c",
"rt5120-regulator.c",
"rt5133-regulator.c",
"rt5190a-regulator.c",
"rt5739.c",
"rt5759-regulator.c",
"rt6160-regulator.c",
"rt6190-regulator.c",
"rt6245-regulator.c",
"rt8092.c",
"rtmv20-regulator.c",
"rtq2134-regulator.c",
"rtq2208-regulator.c",
"rtq6752-regulator.c",
"s2dos05-regulator.c",
"s2mpa01.c",
"s2mps11.c",
"s5m8767.c",
"sc2730-regulator.c",
"sc2731-regulator.c",
"scmi-regulator.c",
"sgm3804-regulator.c",
"sky81452-regulator.c",
"slg51000-regulator.c",
"slg51000-regulator.h",
"spacemit-p1.c",
"stm32-booster.c",
"stm32-pwr.c",
"stm32-vrefbuf.c",
"stpmic1_regulator.c",
"stw481x-vmmc.c",
"sun20i-regulator.c",
"sy7636a-regulator.c",
"sy8106a-regulator.c",
"sy8824x.c",
"sy8827n.c",
"ti-abb-regulator.c",
"tps51632-regulator.c",
"tps6105x-regulator.c",
"tps62360-regulator.c",
"tps6286x-regulator.c",
"tps6287x-regulator.c",
"tps65023-regulator.c",
"tps6507x-regulator.c",
"tps65086-regulator.c",
"tps65090-regulator.c",
"tps65132-regulator.c",
"tps65185.c",
"tps65217-regulator.c",
"tps65218-regulator.c",
"tps65219-regulator.c",
"tps6524x-regulator.c",
"tps6586x-regulator.c",
"tps65910-regulator.c",
"tps65912-regulator.c",
"tps6594-regulator.c",
"tps68470-regulator.c",
"twl-regulator.c",
"twl6030-regulator.c",
"uniphier-regulator.c",
"userspace-consumer.c",
"vctrl-regulator.c",
"vexpress-regulator.c",
"virtual.c",
"vqmmc-ipq4019-regulator.c",
"wm831x-dcdc.c",
"wm831x-isink.c",
"wm831x-ldo.c",
"wm8350-regulator.c",
"wm8400-regulator.c",
"wm8994-regulator.c"
],
"Subdirs": null
} |
| 72/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 52739 output: 34 thoughts: 17 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into the `virtual.c` Mystery** Okay, time to get to work. First, I need to refresh my memory. Let's start with `virtual.c`. I need to figure out what functionality or aspects of the project are associated with this particular file. Is it related to virtual memory management, emulation, object virtualization, virtual machines, or some other implementation? Given the naming convention it will provide valuable insight into the overall design of the system. I need to understand its role within the larger codebase to make any meaningful progress. My first goal will be to establish its primary purpose and dependencies. From there, I can analyze the implementation details. |
| 73/2 | 2026/09/19 15:12 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/virtual.c",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0-or-later\n 2:\t/*\n 3:\t * reg-virtual-consumer.c\n 4:\t *\n 5:\t * Copyright 2008 Wolfson Microelectronics PLC.\n 6:\t *\n 7:\t * Author: Mark Brown \u003cbroonie@opensource.wolfsonmicro.com\u003e\n 8:\t */\n 9:\t\n 10:\t#include \u003clinux/err.h\u003e\n 11:\t#include \u003clinux/mutex.h\u003e\n 12:\t#include \u003clinux/platform_device.h\u003e\n 13:\t#include \u003clinux/regulator/consumer.h\u003e\n 14:\t#include \u003clinux/slab.h\u003e\n 15:\t#include \u003clinux/module.h\u003e\n 16:\t#include \u003clinux/of.h\u003e\n 17:\t\n 18:\tstruct virtual_consumer_data {\n 19:\t\tstruct mutex lock;\n 20:\t\tstruct regulator *regulator;\n 21:\t\tbool enabled;\n 22:\t\tint min_uV;\n 23:\t\tint max_uV;\n 24:\t\tint min_uA;\n 25:\t\tint max_uA;\n 26:\t\tunsigned int mode;\n 27:\t};\n 28:\t\n 29:\tstatic void update_voltage_constraints(struct device *dev,\n 30:\t\t\t\t\t struct virtual_consumer_data *data)\n 31:\t{\n 32:\t\tint ret;\n 33:\t\n 34:\t\tif (data-\u003emin_uV \u0026\u0026 data-\u003emax_uV\n 35:\t\t \u0026\u0026 data-\u003emin_uV \u003c= data-\u003emax_uV) {\n 36:\t\t\tdev_dbg(dev, \"Requesting %d-%duV\\n\",\n 37:\t\t\t\tdata-\u003emin_uV, data-\u003emax_uV);\n 38:\t\t\tret = regulator_set_voltage(data-\u003eregulator,\n 39:\t\t\t\t\t\tdata-\u003emin_uV, data-\u003emax_uV);\n 40:\t\t\tif (ret != 0) {\n 41:\t\t\t\tdev_err(dev,\n 42:\t\t\t\t\t\"regulator_set_voltage() failed: %d\\n\", ret);\n 43:\t\t\t\treturn;\n 44:\t\t\t}\n 45:\t\t}\n 46:\t\n 47:\t\tif (data-\u003emin_uV \u0026\u0026 data-\u003emax_uV \u0026\u0026 !data-\u003eenabled) {\n 48:\t\t\tdev_dbg(dev, \"Enabling regulator\\n\");\n 49:\t\t\tret = regulator_enable(data-\u003eregulator);\n 50:\t\t\tif (ret == 0)\n 51:\t\t\t\tdata-\u003eenabled = true;\n 52:\t\t\telse\n 53:\t\t\t\tdev_err(dev, \"regulator_enable() failed: %d\\n\",\n 54:\t\t\t\t\tret);\n 55:\t\t}\n 56:\t\n 57:\t\tif (!(data-\u003emin_uV \u0026\u0026 data-\u003emax_uV) \u0026\u0026 data-\u003eenabled) {\n 58:\t\t\tdev_dbg(dev, \"Disabling regulator\\n\");\n 59:\t\t\tret = regulator_disable(data-\u003eregulator);\n 60:\t\t\tif (ret == 0)\n 61:\t\t\t\tdata-\u003eenabled = false;\n 62:\t\t\telse\n 63:\t\t\t\tdev_err(dev, \"regulator_disable() failed: %d\\n\",\n 64:\t\t\t\t\tret);\n 65:\t\t}\n 66:\t}\n 67:\t\n 68:\tstatic void update_current_limit_constraints(struct device *dev,\n 69:\t\t\t\t\t\t struct virtual_consumer_data *data)\n 70:\t{\n 71:\t\tint ret;\n 72:\t\n 73:\t\tif (data-\u003emax_uA\n 74:\t\t \u0026\u0026 data-\u003emin_uA \u003c= data-\u003emax_uA) {\n 75:\t\t\tdev_dbg(dev, \"Requesting %d-%duA\\n\",\n 76:\t\t\t\tdata-\u003emin_uA, data-\u003emax_uA);\n 77:\t\t\tret = regulator_set_current_limit(data-\u003eregulator,\n 78:\t\t\t\t\t\tdata-\u003emin_uA, data-\u003emax_uA);\n 79:\t\t\tif (ret != 0) {\n 80:\t\t\t\tdev_err(dev,\n"
} |
| 74/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 54049 output: 38 thoughts: 42 Thoughts: Okay, let's see... **Analyzing Regulator Drivers and Virtual Consumers** Right, so `virtual.c` I know, it's acting as a consumer here, a `reg-virt-consumer`. That's important to keep in mind. I need to understand the full picture. Hmm, what about `vctrl-regulator.c`? Is that file also a part of this consumer relationship? I should take a look at `vctrl-regulator.c` to see how it fits in this architecture, and ensure there's no misunderstanding of the interactions. Let me dive in and check that. |
| 75/2 | 2026/09/19 15:12 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/vctrl-regulator.c",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0-only\n 2:\t/*\n 3:\t * Driver for voltage controller regulators\n 4:\t *\n 5:\t * Copyright (C) 2017 Google, Inc.\n 6:\t */\n 7:\t\n 8:\t#include \u003clinux/delay.h\u003e\n 9:\t#include \u003clinux/err.h\u003e\n 10:\t#include \u003clinux/init.h\u003e\n 11:\t#include \u003clinux/module.h\u003e\n 12:\t#include \u003clinux/of.h\u003e\n 13:\t#include \u003clinux/platform_device.h\u003e\n 14:\t#include \u003clinux/regulator/coupler.h\u003e\n 15:\t#include \u003clinux/regulator/driver.h\u003e\n 16:\t#include \u003clinux/regulator/of_regulator.h\u003e\n 17:\t#include \u003clinux/sort.h\u003e\n 18:\t\n 19:\t#include \"internal.h\"\n 20:\t\n 21:\tstruct vctrl_voltage_range {\n 22:\t\tint min_uV;\n 23:\t\tint max_uV;\n 24:\t};\n 25:\t\n 26:\tstruct vctrl_voltage_ranges {\n 27:\t\tstruct vctrl_voltage_range ctrl;\n 28:\t\tstruct vctrl_voltage_range out;\n 29:\t};\n 30:\t\n 31:\tstruct vctrl_voltage_table {\n 32:\t\tint ctrl;\n 33:\t\tint out;\n 34:\t\tint ovp_min_sel;\n 35:\t};\n 36:\t\n 37:\tstruct vctrl_data {\n 38:\t\tstruct regulator_dev *rdev;\n 39:\t\tstruct regulator_desc desc;\n 40:\t\tbool enabled;\n 41:\t\tunsigned int min_slew_down_rate;\n 42:\t\tunsigned int ovp_threshold;\n 43:\t\tstruct vctrl_voltage_ranges vrange;\n 44:\t\tstruct vctrl_voltage_table *vtable;\n 45:\t\tunsigned int sel;\n 46:\t};\n 47:\t\n 48:\tstatic int vctrl_calc_ctrl_voltage(struct vctrl_data *vctrl, int out_uV)\n 49:\t{\n 50:\t\tstruct vctrl_voltage_range *ctrl = \u0026vctrl-\u003evrange.ctrl;\n 51:\t\tstruct vctrl_voltage_range *out = \u0026vctrl-\u003evrange.out;\n 52:\t\n 53:\t\treturn ctrl-\u003emin_uV +\n 54:\t\t\tDIV_ROUND_CLOSEST_ULL((s64)(out_uV - out-\u003emin_uV) *\n 55:\t\t\t\t\t (ctrl-\u003emax_uV - ctrl-\u003emin_uV),\n 56:\t\t\t\t\t out-\u003emax_uV - out-\u003emin_uV);\n 57:\t}\n 58:\t\n 59:\tstatic int vctrl_calc_output_voltage(struct vctrl_data *vctrl, int ctrl_uV)\n 60:\t{\n 61:\t\tstruct vctrl_voltage_range *ctrl = \u0026vctrl-\u003evrange.ctrl;\n 62:\t\tstruct vctrl_voltage_range *out = \u0026vctrl-\u003evrange.out;\n 63:\t\n 64:\t\tif (ctrl_uV \u003c 0) {\n 65:\t\t\tpr_err(\"vctrl: failed to get control voltage\\n\");\n 66:\t\t\treturn ctrl_uV;\n 67:\t\t}\n 68:\t\n 69:\t\tif (ctrl_uV \u003c ctrl-\u003emin_uV)\n 70:\t\t\treturn out-\u003emin_uV;\n 71:\t\n 72:\t\tif (ctrl_uV \u003e ctrl-\u003emax_uV)\n 73:\t\t\treturn out-\u003emax_uV;\n 74:\t\n 75:\t\treturn out-\u003emin_uV +\n 76:\t\t\tDIV_ROUND_CLOSEST_ULL((s64)(ctrl_uV - ctrl-\u003emin_uV) *\n 77:\t\t\t\t\t (out-\u003emax_uV - out-\u003emin_uV),\n 78:\t\t\t\t\t ctrl-\u003emax_uV - ctrl-\u003emin_uV);\n 79:\t}\n 80:\t\n"
} |
| 76/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 55371 output: 33 thoughts: 52 Thoughts: Here's my thought process, distilled: **Analyzing the Regulator Framework** Okay, so I'm looking at `vctrl-regulator`. It's a platform driver, so naturally, I need to understand how it's integrated. The key here is that it uses `vctrl_of_match` to be recognized in the device tree setup. Now, to get a handle on the broader context and any dependencies, I'm going to jump over to `drivers/regulator/Kconfig`. That Kconfig file will give me the lowdown on the regulator subsystem in general. I need to understand its build configuration, dependencies, and any relevant options within the broader `drivers/regulator/` space to truly understand where `vctrl-regulator` fits. That should give me a good lay of the land. |
| 77/2 | 2026/09/19 15:12 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/Kconfig",
"FirstLine": 1,
"LineCount": 50
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tmenuconfig REGULATOR\n 3:\t\tbool \"Voltage and Current Regulator Support\"\n 4:\t\tselect LINEAR_RANGES\n 5:\t\thelp\n 6:\t\t Generic Voltage and Current Regulator support.\n 7:\t\n 8:\t\t This framework is designed to provide a generic interface to voltage\n 9:\t\t and current regulators within the Linux kernel. It's intended to\n 10:\t\t provide voltage and current control to client or consumer drivers and\n 11:\t\t also provide status information to user space applications through a\n 12:\t\t sysfs interface.\n 13:\t\n 14:\t\t The intention is to allow systems to dynamically control regulator\n 15:\t\t output in order to save power and prolong battery life. This applies\n 16:\t\t to both voltage regulators (where voltage output is controllable) and\n 17:\t\t current sinks (where current output is controllable).\n 18:\t\n 19:\t\t This framework safely compiles out if not selected so that client\n 20:\t\t drivers can still be used in systems with no software controllable\n 21:\t\t regulators.\n 22:\t\n 23:\t\t If unsure, say no.\n 24:\t\n 25:\t\n 26:\tif REGULATOR\n 27:\t\n 28:\tconfig REGULATOR_DEBUG\n 29:\t\tbool \"Regulator debug support\"\n 30:\t\thelp\n 31:\t\t Say yes here to enable debugging support.\n 32:\t\n 33:\tconfig REGULATOR_FIXED_VOLTAGE\n 34:\t\ttristate \"Fixed voltage regulator support\"\n 35:\t\thelp\n 36:\t\t This driver provides support for fixed voltage regulators,\n 37:\t\t useful for systems which use a combination of software\n 38:\t\t managed regulators and simple non-configurable regulators.\n 39:\t\n 40:\tconfig REGULATOR_VIRTUAL_CONSUMER\n 41:\t\ttristate \"Virtual regulator consumer support\"\n 42:\t\thelp\n 43:\t\t This driver provides a virtual consumer for the voltage and\n 44:\t\t current regulator API which provides sysfs controls for\n 45:\t\t configuring the supplies requested. This is mainly useful\n 46:\t\t for test purposes.\n 47:\t\n 48:\t\t If unsure, say no.\n 49:\t\n 50:\tconfig REGULATOR_USERSPACE_CONSUMER\n"
} |
| 78/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 56267 output: 36 thoughts: 936 Thoughts: **Analyzing Regulator Supply Resolution** Okay, let's break this down. I need to figure out the conditions that lead to `r == rdev` within `regulator_resolve_supply()`. It seems critical because it triggers a specific error path. First, I see the call stack: `regulator_resolve_supply()` is our entry point, specifically examining `struct regulator_dev *rdev`. My focus is on understanding when this function calls itself. Now, looking at the code within `regulator_resolve_supply()`, I see it attempts to resolve a supply for a regulator device. If a supply is specified (`rdev->supply_name`), it needs to find the corresponding regulator. Two main lookup functions are used: `regulator_dt_lookup()` and `regulator_dev_lookup()`. The critical condition, `r == rdev`, occurs if the supply is resolved to *itself*. This seems like a circular dependency or a misconfiguration. To trace how this can happen, I need to know where `r` comes from. It's either the result of `regulator_dt_lookup()` or `regulator_dev_lookup()`. The first lookup, `regulator_dt_lookup(&rdev->dev, rdev->supply_name)`, directly uses the device tree information (`of_regulator_dev_lookup` is involved there, I'll need to remember that). The second, `regulator_dev_lookup(dev, rdev->supply_name)`, is more complex, so I'll examine it next. Diving into `regulator_dev_lookup()`, I see it also tries a device tree lookup first. If that fails, it then searches a global `regulator_map_list`, and finally calls `regulator_lookup_by_name()`. So, the return of `r` is sourced from one of those three sources. So how can `r == rdev` happen? I suspect the `regulator_map_list` search is the most likely culprit. If a regulator is misconfigured in the global list, with a `supply` alias pointing back to itself, we have our issue. The device tree could also be incorrectly configured. I have to look more closely at the map list to be sure. Also, what does `regulator_lookup_by_name` do? That could also cause a loop. I will need to trace it to get the full picture. |
| 79/2 | 2026/09/19 15:12 | tool | grepper |
0mArgs:{
"Expression": "regulator_lookup_by_name",
"PathPrefix": "drivers/regulator/core.c"
}Results: {
"Output": "drivers/regulator/core.c=2102=static int regulator_match(struct device *dev, const void *data)\n--\ndrivers/regulator/core.c-2108-\ndrivers/regulator/core.c:2109:static struct regulator_dev *regulator_lookup_by_name(const char *name)\ndrivers/regulator/core.c-2110-{\n--\ndrivers/regulator/core.c=2146=static struct regulator_dev *regulator_dev_lookup(struct device *dev,\n--\ndrivers/regulator/core.c-2181-\ndrivers/regulator/core.c:2182:\tr = regulator_lookup_by_name(supply);\ndrivers/regulator/core.c-2183-\tif (r)\n"
} |
| 80/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 57971 output: 37 thoughts: 21 Thoughts: Here's a summary of my thought process: **Diving into Regulatory Matching and Lookup Functions** Alright, let's get down to brass tacks. My initial focus is on the functions `regulator_match` and `regulator_lookup_by_name`. I need to understand how these pieces fit into the broader regulatory framework. My mental checklist kicks in: * **`regulator_match`:** What is this function doing? Is it performing exact matches, fuzzy logic comparisons, or something more sophisticated? What kind of input does it take – a regulator identifier, a name, a set of parameters? And more importantly, what's the output? A Boolean result, a confidence score, a list of potential matches with associated metadata? I need to quickly identify the matching algorithm or criteria it employs. Thinking about potential edge cases is critical as well: how does it handle missing data, ambiguous names, or outdated regulatory information? I'm already anticipating areas for optimization if the implementation isn't ideal, or if performance is an issue with large datasets. * **`regulator_lookup_by_name`:** This feels more straightforward, but I need to be careful not to make assumptions. Is it a simple dictionary lookup, or is it more complex than that? What are the underlying data structures being used? Is it optimized for search speed? Is it capable of handling partial matches or name variations, similar to a robust search engine? Again, error handling is crucial here. What happens when the name isn't found? How are collisions or multiple matches handled? Does it prioritize results based on some criteria (e.g., relevance, recency, authority level)? I need to understand how these two functions interact. Does `regulator_lookup_by_name` feed into `regulator_match` somehow? Are they part of a larger chain of operations? My immediate next step is to examine their code and any associated documentation, but I'm approaching this with a clear set of questions in mind. The goal is a comprehensive understanding of their functionality, performance, and potential vulnerabilities within the overall system. |
| 81/2 | 2026/09/19 15:12 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2100,
"LineCount": 25
}Results: {
"Contents": "2100:\t}\n2101:\t\n2102:\tstatic int regulator_match(struct device *dev, const void *data)\n2103:\t{\n2104:\t\tstruct regulator_dev *r = dev_to_rdev(dev);\n2105:\t\n2106:\t\treturn strcmp(rdev_get_name(r), data) == 0;\n2107:\t}\n2108:\t\n2109:\tstatic struct regulator_dev *regulator_lookup_by_name(const char *name)\n2110:\t{\n2111:\t\tstruct device *dev;\n2112:\t\n2113:\t\tdev = class_find_device(\u0026regulator_class, NULL, name, regulator_match);\n2114:\t\n2115:\t\treturn dev ? dev_to_rdev(dev) : NULL;\n2116:\t}\n2117:\t\n2118:\tstatic struct regulator_dev *regulator_dt_lookup(struct device *dev,\n2119:\t\t\t\t\t\t\t const char *supply)\n2120:\t{\n2121:\t\tstruct regulator_dev *r = NULL;\n2122:\t\n2123:\t\tif (dev_of_node(dev)) {\n2124:\t\t\tr = of_regulator_dev_lookup(dev, dev_of_node(dev), supply);\n"
} |
| 82/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 58840 output: 43 thoughts: 555 Thoughts: **Analyzing Regulator Lookup by Name**
Okay, let's break this down. I'm looking at `regulator_lookup_by_name`. The core of it seems to be `class_find_device`, which is used to search for the device based on the name passed to it. It uses a `regulator_match` callback. My focus is on what happens when `rdev->supply_name` matches `rdev_get_name(rdev)`. The code suggests that if these match, `regulator_lookup_by_name` will actually find `rdev`. And, even more interestingly, `class_find_device` takes a reference, effectively incrementing the refcount, on the device.
So, if `rdev->supply_name` equals `rdev_get_name(rdev)`, the lookup is successful. The critical question becomes: What sets `rdev->supply_name` to match the regulator name? Time to hunt down where that assignment happens. Going back to the `grep` results for `supply_name`, I spot something interesting in `drivers/regulator/axp20x-regulator.c`.
Specifically, this looks promising:
```c
static const struct regulator_desc axp22x_drivevbus_regulator = {
.name = "drivevbus",
.supply_name = "drivevbus",
.of_match = of_match_ptr("drivevbus"),
...
```
Ah, bingo! In the `axp22x_drivevbus_regulator`, both `.name` and `.supply_name` are set to "drivevbus". Now, the important part: what's the purpose of this duplication? Is it intentional? Did this design choice break some convention? I better check that code section, at line 714 of the file `drivers/regulator/axp20x-regulator.c`. This is where I'll get the real answer.
|
| 83/2 | 2026/09/19 15:12 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/axp20x-regulator.c",
"FirstLine": 710,
"LineCount": 30
}Results: {
"Contents": " 710:\t\t\t AXP22X_IO_ENABLED, AXP22X_IO_DISABLED),\n 711:\t\tAXP_DESC_FIXED(AXP22X, RTC_LDO, \"rtc_ldo\", \"ips\", 3000),\n 712:\t};\n 713:\t\n 714:\tstatic const struct regulator_desc axp22x_drivevbus_regulator = {\n 715:\t\t.name\t\t= \"drivevbus\",\n 716:\t\t.supply_name\t= \"drivevbus\",\n 717:\t\t.of_match\t= of_match_ptr(\"drivevbus\"),\n 718:\t\t.regulators_node = of_match_ptr(\"regulators\"),\n 719:\t\t.type\t\t= REGULATOR_VOLTAGE,\n 720:\t\t.owner\t\t= THIS_MODULE,\n 721:\t\t.enable_reg\t= AXP20X_VBUS_IPSOUT_MGMT,\n 722:\t\t.enable_mask\t= AXP20X_VBUS_IPSOUT_MGMT_MASK,\n 723:\t\t.ops\t\t= \u0026axp20x_ops_sw,\n 724:\t};\n 725:\t\n 726:\tstatic const struct linear_range axp313a_dcdc1_ranges[] = {\n 727:\t\tREGULATOR_LINEAR_RANGE(500000, 0, 70, 10000),\n 728:\t\tREGULATOR_LINEAR_RANGE(1220000, 71, 87, 20000),\n 729:\t\tREGULATOR_LINEAR_RANGE(1600000, 88, 106, 100000),\n 730:\t};\n 731:\t\n 732:\tstatic const struct linear_range axp313a_dcdc2_ranges[] = {\n 733:\t\tREGULATOR_LINEAR_RANGE(500000, 0, 70, 10000),\n 734:\t\tREGULATOR_LINEAR_RANGE(1220000, 71, 87, 20000),\n 735:\t};\n 736:\t\n 737:\t/*\n 738:\t * This is deviating from the datasheet. The values here are taken from the\n 739:\t * BSP driver and have been confirmed by measurements.\n"
} |
| 84/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 60525 output: 29 thoughts: 212 Thoughts: **Probing the AXP20x PMIC in a Virtual Environment** Okay, wait a minute. Looking at this `drivers/regulator/axp20x-regulator.c` file, this `axp20x` thing is an MFD driver, a "multi-function device" driver, for that X-Powers AXP20x or AXP22x PMIC. And that PMIC is super common in Allwinner SoCs, those ARM/sunxi systems. Now the question is, can I even *probe* that darn PMIC on an amd64 QEMU setup? I mean, it's a completely different architecture. Ah, right! The AXP20x is either an I2C or RSB based PMIC. So that will be `drivers/mfd/axp20x-i2c.c` or `axp20x-rsb.c` for those interfaces. Okay, I have an idea. This is an I2C or RSB device. Let's think. Wait! Can you instantiate I2C devices from userspace? Can I create it from, say, my host system? I need to check. Let's see… I know there's that `/sys/bus/i2c/devices/i2c-X/new_device` sysfs entry. Hmm, let me think. Can userspace actually *instantiate* I2C devices through that `new_device` sysfs file? I think I have an idea. Time to dig into `drivers/i2c/i2c-core-sysfs.c`. Let's see if that's possible. |
| 85/2 | 2026/09/19 15:12 | tool | grepper |
0mArgs:{
"Expression": "new_device",
"PathPrefix": "drivers/i2c/"
}Results: {
"Output": "drivers/i2c/i2c-core-acpi.c=522=struct notifier_block i2c_acpi_notifier = {\n--\ndrivers/i2c/i2c-core-acpi.c-526-/**\ndrivers/i2c/i2c-core-acpi.c:527: * i2c_acpi_new_device_by_fwnode - Create i2c-client for the Nth I2cSerialBus resource\ndrivers/i2c/i2c-core-acpi.c-528- * @fwnode: fwnode with the ACPI resources to get the client from\n--\ndrivers/i2c/i2c-core-acpi.c-543- */\ndrivers/i2c/i2c-core-acpi.c:544:struct i2c_client *i2c_acpi_new_device_by_fwnode(struct fwnode_handle *fwnode,\ndrivers/i2c/i2c-core-acpi.c-545-\t\t\t\t\t\t int index,\n--\ndrivers/i2c/i2c-core-acpi.c-578-}\ndrivers/i2c/i2c-core-acpi.c:579:EXPORT_SYMBOL_GPL(i2c_acpi_new_device_by_fwnode);\ndrivers/i2c/i2c-core-acpi.c-580-\n--\ndrivers/i2c/i2c-core-base.c=1264=static ssize_t\ndrivers/i2c/i2c-core-base.c:1265:new_device_store(struct device *dev, struct device_attribute *attr,\ndrivers/i2c/i2c-core-base.c-1266-\t\t const char *buf, size_t count)\n--\ndrivers/i2c/i2c-core-base.c-1277-\tif (!blank) {\ndrivers/i2c/i2c-core-base.c:1278:\t\tdev_err(dev, \"%s: Missing parameters\\n\", \"new_device\");\ndrivers/i2c/i2c-core-base.c-1279-\t\treturn -EINVAL;\n--\ndrivers/i2c/i2c-core-base.c-1281-\tif (blank - buf \u003e I2C_NAME_SIZE - 1) {\ndrivers/i2c/i2c-core-base.c:1282:\t\tdev_err(dev, \"%s: Invalid device name\\n\", \"new_device\");\ndrivers/i2c/i2c-core-base.c-1283-\t\treturn -EINVAL;\n--\ndrivers/i2c/i2c-core-base.c-1289-\tif (res \u003c 1) {\ndrivers/i2c/i2c-core-base.c:1290:\t\tdev_err(dev, \"%s: Can't parse I2C address\\n\", \"new_device\");\ndrivers/i2c/i2c-core-base.c-1291-\t\treturn -EINVAL;\n--\ndrivers/i2c/i2c-core-base.c-1293-\tif (res \u003e 1 \u0026\u0026 end != '\\n') {\ndrivers/i2c/i2c-core-base.c:1294:\t\tdev_err(dev, \"%s: Extra parameters\\n\", \"new_device\");\ndrivers/i2c/i2c-core-base.c-1295-\t\treturn -EINVAL;\n--\ndrivers/i2c/i2c-core-base.c-1315-\tmutex_unlock(\u0026adap-\u003euserspace_clients_lock);\ndrivers/i2c/i2c-core-base.c:1316:\tdev_info(dev, \"%s: Instantiated device %s at 0x%02hx\\n\", \"new_device\",\ndrivers/i2c/i2c-core-base.c-1317-\t\t info.type, info.addr);\n--\ndrivers/i2c/i2c-core-base.c-1320-}\ndrivers/i2c/i2c-core-base.c:1321:static DEVICE_ATTR_WO(new_device);\ndrivers/i2c/i2c-core-base.c-1322-\n--\ndrivers/i2c/i2c-core-base.c-1325- * they got it wrong. This interface can only be used to delete devices\ndrivers/i2c/i2c-core-base.c:1326: * instantiated by i2c_sysfs_new_device above. This guarantees that we\ndrivers/i2c/i2c-core-base.c-1327- * don't delete devices to which some kernel code still has references.\n--\ndrivers/i2c/i2c-core-base.c=1379=static struct attribute *i2c_adapter_attrs[] = {\ndrivers/i2c/i2c-core-base.c-1380-\t\u0026dev_attr_name.attr,\ndrivers/i2c/i2c-core-base.c:1381:\t\u0026dev_attr_new_device.attr,\ndrivers/i2c/i2c-core-base.c-1382-\t\u0026dev_attr_delete_device.attr,\n"
} |
| 86/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 62492 output: 53 thoughts: 2033 Thoughts: **Analyzing Reachability in Regulator Core Code** Okay, so I'm diving into this. The goal is to determine if this code modification in `drivers/regulator/core.c` is worth fuzzing. The key question is whether the modified code is reachable in a standard QEMU environment, which is the primary gate for fuzzing. My initial thought is about I2C devices. Can I even instantiate them in userspace? Specifically, does QEMU on x86_64 provide an I2C adapter? Usually, it's SMBus, like `i2c-i801`. Can syzkaller write to `/sys/bus/i2c/devices/.../new_device` without root? Syzkaller can do pseudo-syscalls but does it even have descriptions for `new_device`? I need to check if those tools like `syz-grepper` exist. They don't! Ok, let's refocus. I need to apply the negative criteria. The changes aren't to documentation or user-space code. The code isn't hardware-specific that isn't emulated by QEMU. The code being modified isn't a driver teardown or architecture specific. Let's look at the actual code change in `regulator_resolve_supply()`: If `r == rdev`. When can *that* happen? I'm thinking: The function is called, and there's a lookup using `rdev->supply_name`. The crucial question is: How can the lookup result in the regulator pointing to itself? There are two scenarios. First, Device Tree: A regulator in the Device Tree could have a supply pointing to itself in a circular dependency. However, AMD64 uses ACPI, *not* Device Tree in QEMU, so that's a dead end. Second, a driver registers with the names being the same. Let's see if the code includes such examples. Wait! Here is it! `drivers/regulator/axp20x-regulator.c`! It defines a regulator, `axp22x_drivevbus_regulator`, where `.name` and `.supply_name` are the *same*! This makes the scenario possible. Now, my focus shifts to understanding whether the conditions for `r == rdev` can be established, given the `axp22x_drivevbus_regulator` scenario and whether a regulator is registered with `.name` and `.supply_name` being the same. Since this situation can be emulated in QEMU, this is worth fuzzing. |
| 87/2 | 2026/09/19 15:12 | tool | grepper |
0mError:no matches Args: {
"Expression": "\\.name\\s*=\\s*\"([^\"]+)\",\\s*\\.supply_name\\s*=\\s*\"\\1\"",
"PathPrefix": "drivers/regulator/"
}Results: {
"error": "no matches"
} |
| 88/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 65158 output: 37 thoughts: 72 Thoughts: **My Regex Dilemma** Okay, so I'm digging into this code, and a thought just struck me. I need to use backreferences in a regular expression, like `\1`, but I need to make sure the regex engine I'm using supports them. ERE, or Extended Regular Expressions, might not, I need to check. PCRE, or Perl Compatible Regular Expressions, definitely would. I need to be sure before I implement anything. Let's quickly scan the `drivers/regulator/` directory and see if I can find other instances of `.supply_name = "`. Seeing other instances could help me determine which regex style I need. Ah, wait, hold on. Before I get too deep into that, a more specific search might be more fruitful. Let's see if I can find any references to `axp22x_drivevbus_regulator`. That might give me a more focused target for investigation. I want to see how this particular regulator is defined. |
| 89/2 | 2026/09/19 15:12 | tool | grepper |
0mArgs:{
"Expression": "axp22x_drivevbus_regulator",
"PathPrefix": "drivers/regulator/"
}Results: {
"Output": "drivers/regulator/axp20x-regulator.c=646=static const struct regulator_desc axp22x_regulators[] = {\n--\ndrivers/regulator/axp20x-regulator.c-713-\ndrivers/regulator/axp20x-regulator.c:714:static const struct regulator_desc axp22x_drivevbus_regulator = {\ndrivers/regulator/axp20x-regulator.c-715-\t.name\t\t= \"drivevbus\",\n--\ndrivers/regulator/axp20x-regulator.c=1553=static int axp20x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/axp20x-regulator.c-1734-\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/axp20x-regulator.c:1735:\t\t\t\t\t \u0026axp22x_drivevbus_regulator,\ndrivers/regulator/axp20x-regulator.c-1736-\t\t\t\t\t \u0026config);\n"
} |
| 90/2 | 2026/09/19 15:12 | llm | patch-evaluator-compressor |
0mModel:gemini-3.8-flash Args: null Results: null Reply: ### 1. Approaches Tried and Their Results
- **Patch Inspection**:
- Examined commit `a7612d0c3daf897f2489b21df887dd85e7486ca4` in `drivers/regulator/core.c`:
```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 6a4008f387b5e..812e1d61d4019 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2239,6 +2239,7 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
if (r == rdev) {
dev_err(dev, "Supply for %s (%s) resolved to itself\n",
rdev->desc->name, rdev->supply_name);
+ put_device(&rdev->dev);
if (!have_full_constraints()) {
ret = -EINVAL;
goto out;
```
- Identified bug fixed: In `regulator_resolve_supply(rdev)`, the supply lookup via `regulator_dt_lookup` or `regulator_dev_lookup` acquires a reference via `get_device(&r->dev)` (or `class_find_device()`). If the resolved regulator is identical to the regulator being resolved (`r == rdev`), a reference was previously leaked on `rdev->dev`. The patch inserts `put_device(&rdev->dev)` immediately upon detecting self-reference.
- **Supply Resolution & Self-Reference Mechanism (`drivers/regulator/core.c`)**:
- Investigated how `r == rdev` occurs:
- `rdev->supply_name` is set at registration from either `init_data->supply_regulator` or `regulator_desc->supply_name`.
- `r = regulator_dt_lookup(&rdev->dev, rdev->supply_name);`
- If DT lookup returns null, `r = regulator_dev_lookup(dev, rdev->supply_name);` which checks `regulator_map_list` and `regulator_lookup_by_name(supply)`.
- When `r == rdev`, the regulator's supply name matches its own registered name or resolves back to itself via DT/alias/map. For example, in `drivers/regulator/axp20x-regulator.c`:
```c
static const struct regulator_desc axp22x_drivevbus_regulator = {
.name = "drivevbus",
.supply_name = "drivevbus",
...
};
```
- In `dummy.c`, `dummy_regulator_rdev` has `.name = "regulator-dummy"` and has no `.supply_name`.
- **Call Chain of `regulator_resolve_supply()`**:
- Recursive call: `regulator_resolve_supply(r)` at line 2270.
- Consumer request: `_regulator_get_common()` -> `regulator_resolve_supply()` (invoked via `regulator_get`, `devm_regulator_get`, `regulator_get_optional`, `regulator_get_exclusive`).
- Driver registration: `regulator_register()` at early supply resolution lines 6175, 6222.
- Bus probe: `regulator_bus_probe()` at line 6411.
- **Reachability and Virtual Hardware Investigation**:
- Examined consumers and drivers:
- `drivers/regulator/userspace-consumer.c`: only acts as a consumer via `regulator_bulk_enable`/`disable` through sysfs attributes `state_store`. Does not register regulators or define supplies.
- `drivers/regulator/dummy.c`: initializes a static faux device `reg-dummy` during `__init regulator_dummy_init()` with `dummy_initdata` and empty supply name. Does not have self-referencing supplies.
- Searched all drivers calling `regulator_register` / `devm_regulator_register`: Found strictly platform, I2C, SPI, PMIC, MFD, and SoC-specific devices (e.g., `axp20x`, `da9063`, `bd718x7`, `pm800`, `max77650`, etc.).
- Searched USB drivers for regulator registration: No USB hotplug driver registers a regulator.
- Regulators are registered during kernel boot or bus probing of physical/board hardware and Device Tree nodes.
### 2. Current Hypotheses and Theories
- **Hypothesis 1: Code is Structurally Unreachable for Dynamic Syzkaller Fuzzing on amd64**:
- Target architecture: `amd64`.
- In standard amd64 QEMU environments, board PMICs (e.g. AXP20X, PMBus, I2C regulators) and embedded Device Trees are not instantiated.
- Even if a driver with a self-referencing supply (such as `axp20x-regulator.c`) was compiled in, it requires physical/emulated SoC hardware or specific DT bindings that are probed once at boot.
- The condition `r == rdev` is triggered strictly when a regulator is statically misconfigured in code or firmware to supply itself.
- Syzkaller fuzzing cannot dynamically mutate kernel firmware tables or re-probe static board PMIC drivers from userspace to trigger `r == rdev`.
- Drivers with `supply_name == name` are evaluated during boot/probe initialization, not runtime userspace syscalls or virtual gadget hotplug.
- Therefore, the modified path is structurally unreachable for syzkaller fuzzing on `amd64`.
### 3. Critical Files, Code Snippets, and Configurations
- **Modified File**: `drivers/regulator/core.c`
- Function: `regulator_resolve_supply()`:
```c
if (r == rdev) {
dev_err(dev, "Supply for %s (%s) resolved to itself\n",
rdev->desc->name, rdev->supply_name);
put_device(&rdev->dev);
if (!have_full_constraints()) {
ret = -EINVAL;
goto out;
}
r = dummy_regulator_rdev;
if (!r) {
ret = -EPROBE_DEFER;
goto out;
}
get_device(&r->dev);
}
```
- **Example Driver with self-referencing supply**: `drivers/regulator/axp20x-regulator.c`
- Static declaration:
```c
static const struct regulator_desc axp22x_drivevbus_regulator = {
.name = "drivevbus",
.supply_name = "drivevbus",
.of_match = of_match_ptr("drivevbus"),
};
```
- **Configuration**:
- `CONFIG_REGULATOR`
### 4. Potential Reasoning Loops and Repetitive Tool Calls
- Do not repeat tree-wide regex searches for `supply_name` or `regulator_register` (these return >1500 lines across hundreds of embedded drivers).
- Investigation is complete; ready to make final triage decision via `set-results`.Tokens: input: 50578 output: 1747 thoughts: 0 |
| 91/2 | 2026/09/19 15:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 19243 output: 32 thoughts: 0 |
| 92/2 | 2026/09/19 15:13 | tool | grepper |
0mArgs:{
"Expression": "\\.supply_name\\s*=",
"PathPrefix": "drivers/regulator/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 963 lines.\nUse more precise expression if possible.\n\ndrivers/regulator/ab8500.c=644=static struct ab8500_regulator_info\n--\ndrivers/regulator/ab8500.c-661-\t\t\t.enable_time\t= 200,\ndrivers/regulator/ab8500.c:662:\t\t\t.supply_name = \"vin\",\ndrivers/regulator/ab8500.c-663-\t\t},\n--\ndrivers/regulator/ab8500.c-684-\t\t\t.enable_time\t= 200,\ndrivers/regulator/ab8500.c:685:\t\t\t.supply_name = \"vin\",\ndrivers/regulator/ab8500.c-686-\t\t},\n--\ndrivers/regulator/ab8500.c-707-\t\t\t.enable_time\t= 450,\ndrivers/regulator/ab8500.c:708:\t\t\t.supply_name = \"vin\",\ndrivers/regulator/ab8500.c-709-\t\t},\n--\ndrivers/regulator/act8865-regulator.c=431=static const struct regulator_ops act8865_fixed_ldo_ops = {\n--\ndrivers/regulator/act8865-regulator.c-442-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\t\\\ndrivers/regulator/act8865-regulator.c:443:\t\t.supply_name\t\t= _supply,\t\t\t\\\ndrivers/regulator/act8865-regulator.c-444-\t\t.id\t\t\t= _family##_ID_##_id,\t\t\\\n--\ndrivers/regulator/act8945a-regulator.c=220=static const struct regulator_ops act8945a_ops = {\n--\ndrivers/regulator/act8945a-regulator.c-236-\t\t.name\t\t\t= _name,\t\t\t\\\ndrivers/regulator/act8945a-regulator.c:237:\t\t.supply_name\t\t= _supply,\t\t\t\\\ndrivers/regulator/act8945a-regulator.c-238-\t\t.of_match\t\t= of_match_ptr(\"REG_\"#_id),\t\\\n--\ndrivers/regulator/arizona-ldo1.c=95=static const struct regulator_desc arizona_ldo1_hc = {\ndrivers/regulator/arizona-ldo1.c-96-\t.name = \"LDO1\",\ndrivers/regulator/arizona-ldo1.c:97:\t.supply_name = \"LDOVDD\",\ndrivers/regulator/arizona-ldo1.c-98-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-ldo1.c=121=static const struct regulator_desc arizona_ldo1 = {\ndrivers/regulator/arizona-ldo1.c-122-\t.name = \"LDO1\",\ndrivers/regulator/arizona-ldo1.c:123:\t.supply_name = \"LDOVDD\",\ndrivers/regulator/arizona-ldo1.c-124-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-ldo1.c=165=static const struct regulator_desc madera_ldo1 = {\ndrivers/regulator/arizona-ldo1.c-166-\t.name = \"LDO1\",\ndrivers/regulator/arizona-ldo1.c:167:\t.supply_name = \"LDOVDD\",\ndrivers/regulator/arizona-ldo1.c-168-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-micsupp.c=130=static const struct regulator_desc arizona_micsupp = {\ndrivers/regulator/arizona-micsupp.c-131-\t.name = \"MICVDD\",\ndrivers/regulator/arizona-micsupp.c:132:\t.supply_name = \"CPVDD\",\ndrivers/regulator/arizona-micsupp.c-133-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-micsupp.c=157=static const struct regulator_desc arizona_micsupp_ext = {\ndrivers/regulator/arizona-micsupp.c-158-\t.name = \"MICVDD\",\ndrivers/regulator/arizona-micsupp.c:159:\t.supply_name = \"CPVDD\",\ndrivers/regulator/arizona-micsupp.c-160-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/arizona-micsupp.c=203=static const struct regulator_desc madera_micsupp = {\ndrivers/regulator/arizona-micsupp.c-204-\t.name = \"MICVDD\",\ndrivers/regulator/arizona-micsupp.c:205:\t.supply_name = \"CPVDD1\",\ndrivers/regulator/arizona-micsupp.c-206-\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/atc260x-regulator.c=154=enum atc2603c_reg_ids {\n--\ndrivers/regulator/atc260x-regulator.c-172-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:173:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-174-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-191-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:192:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-193-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-210-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:211:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-212-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-227-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:228:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-229-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-246-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:247:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-248-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-263-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:264:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-265-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-276-\t.name = \"SWITCHLDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:277:\t.supply_name = \"switchldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-278-\t.of_match = of_match_ptr(\"switchldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c=319=enum atc2609a_reg_ids {\n--\ndrivers/regulator/atc260x-regulator.c-339-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:340:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-341-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-358-\t.name = \"DCDC\"#num, \\\ndrivers/regulator/atc260x-regulator.c:359:\t.supply_name = \"dcdc\"#num, \\\ndrivers/regulator/atc260x-regulator.c-360-\t.of_match = of_match_ptr(\"dcdc\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-377-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:378:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-379-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-396-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:397:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-398-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-417-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:418:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-419-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/atc260x-regulator.c-439-\t.name = \"LDO\"#num, \\\ndrivers/regulator/atc260x-regulator.c:440:\t.supply_name = \"ldo\"#num, \\\ndrivers/regulator/atc260x-regulator.c-441-\t.of_match = of_match_ptr(\"ldo\"#num), \\\n--\ndrivers/regulator/aw37503-regulator.c=109=static int aw37503_of_parse_cb(struct device_node *np,\n--\ndrivers/regulator/aw37503-regulator.c-135-\t\t.name = \"aw37503-\"#_name,\t\t\\\ndrivers/regulator/aw37503-regulator.c:136:\t\t.supply_name = \"vin\",\t\t\t\\\ndrivers/regulator/aw37503-regulator.c-137-\t\t.id = AW37503_REGULATOR_ID_##_id,\t\\\n--\ndrivers/regulator/axp20x-regulator.c-355-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:356:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-357-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-377-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:378:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-379-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-396-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:397:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-398-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-410-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:411:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-412-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c-425-\t\t.name\t\t= (_match),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c:426:\t\t.supply_name\t= (_supply),\t\t\t\t\t\\\ndrivers/regulator/axp20x-regulator.c-427-\t\t.of_match\t= of_match_ptr(_match),\t\t\t\t\\\n--\ndrivers/regulator/axp20x-regulator.c=714=static const struct regulator_desc axp22x_drivevbus_regulator = {\ndrivers/regulator/axp20x-regulator.c-715-\t.name\t\t= \"drivevbus\",\ndrivers/regulator/axp20x-regulator.c:716:\t.supply_name\t= \"drivevbus\",\ndrivers/regulator/axp20x-regulator.c-717-\t.of_match\t= of_match_ptr(\"drivevbus\"),\n--\ndrivers/regulator/bd718x7-regulator.c=732=static struct bd718xx_regulator_data bd71847_regulators[] = {\n--\ndrivers/regulator/bd718x7-regulator.c-1037-\t\t\t/* LDO6 is supplied by buck5 */\ndrivers/regulator/bd718x7-regulator.c:1038:\t\t\t.supply_name = \"buck5\",\ndrivers/regulator/bd718x7-regulator.c-1039-\t\t\t.vsel_reg = BD718XX_REG_LDO6_VOLT,\n--\ndrivers/regulator/bd718x7-regulator.c=1082=static struct bd718xx_regulator_data bd71837_regulators[] = {\n--\ndrivers/regulator/bd718x7-regulator.c-1423-\t\t\t/* LDO5 is supplied by buck6 */\ndrivers/regulator/bd718x7-regulator.c:1424:\t\t\t.supply_name = \"buck6\",\ndrivers/regulator/bd718x7-regulator.c-1425-\t\t\t.vsel_reg = BD718XX_REG_LDO5_VOLT,\n--\ndrivers/regulator/bd718x7-regulator.c-1450-\t\t\t/* LDO6 is supplied by buck7 */\ndrivers/regulator/bd718x7-regulator.c:1451:\t\t\t.supply_name = \"buck7\",\ndrivers/regulator/bd718x7-regulator.c-1452-\t\t\t.vsel_reg = BD718XX_REG_LDO6_VOLT,\n--\ndrivers/regulator/fan53880.c=32=static const struct regulator_ops fan53880_ops = {\n--\ndrivers/regulator/fan53880.c-59-\t\t.enable_time =\t 150,\t\t\t\t\t\\\ndrivers/regulator/fan53880.c:60:\t\t.supply_name =\t _supply,\t\t\t\t\\\ndrivers/regulator/fan53880.c-61-\t\t.ops =\t\t \u0026fan53880_ops,\t\t\t\\\n--\ndrivers/regulator/fan53880.c=64=static const struct regulator_desc fan53880_regulators[] = {\n--\ndrivers/regulator/fan53880.c-85-\t\t.enable_time =\t 480,\ndrivers/regulator/fan53880.c:86:\t\t.supply_name =\t \"PVIN\",\ndrivers/regulator/fan53880.c-87-\t\t.ops =\t\t \u0026fan53880_ops,\n--\ndrivers/regulator/fan53880.c-105-\t\t.enable_time =\t 580,\ndrivers/regulator/fan53880.c:106:\t\t.supply_name =\t \"PVIN\",\ndrivers/regulator/fan53880.c-107-\t\t.ops =\t\t \u0026fan53880_ops,\n--\ndrivers/regulator/fixed-helper.c=32=struct platform_device *regulator_register_always_on(int id, const char *name,\n--\ndrivers/regulator/fixed-helper.c-40-\ndrivers/regulator/fixed-helper.c:41:\tdata-\u003ecfg.supply_name = kstrdup_const(name, GFP_KERNEL);\ndrivers/regulator/fixed-helper.c-42-\tif (!data-\u003ecfg.supply_name) {\n--\ndrivers/regulator/fixed.c=218=static int reg_fixed_voltage_probe(struct platform_device *pdev)\n--\ndrivers/regulator/fixed.c-278-\tif (config-\u003einput_supply) {\ndrivers/regulator/fixed.c:279:\t\tdrvdata-\u003edesc.supply_name = devm_kstrdup(\u0026pdev-\u003edev,\ndrivers/regulator/fixed.c-280-\t\t\t\t\t config-\u003einput_supply,\n--\ndrivers/regulator/gpio-regulator.c=234=static int gpio_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/gpio-regulator.c-268-\tif (config-\u003einput_supply) {\ndrivers/regulator/gpio-regulator.c:269:\t\tdrvdata-\u003edesc.supply_name = devm_kstrdup(\u0026pdev-\u003edev,\ndrivers/regulator/gpio-regulator.c-270-\t\t\t\t\t\t\t config-\u003einput_supply,\n--\ndrivers/regulator/isl9305.c=69=static const struct regulator_desc isl9305_regulators[] = {\n--\ndrivers/regulator/isl9305.c-80-\t\t.enable_mask =\tISL9305_DCD1_EN,\ndrivers/regulator/isl9305.c:81:\t\t.supply_name =\t\"VINDCD1\",\ndrivers/regulator/isl9305.c-82-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/isl9305.c-95-\t\t.enable_mask =\tISL9305_DCD2_EN,\ndrivers/regulator/isl9305.c:96:\t\t.supply_name =\t\"VINDCD2\",\ndrivers/regulator/isl9305.c-97-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/isl9305.c-110-\t\t.enable_mask =\tISL9305_LDO1_EN,\ndrivers/regulator/isl9305.c:111:\t\t.supply_name =\t\"VINLDO1\",\ndrivers/regulator/isl9305.c-112-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/isl9305.c-125-\t\t.enable_mask =\tISL9305_LDO2_EN,\ndrivers/regulator/isl9305.c:126:\t\t.supply_name =\t\"VINLDO2\",\ndrivers/regulator/isl9305.c-127-\t\t.ops =\t\t\u0026isl9305_ops,\n--\ndrivers/regulator/lochnagar-regulator.c=139=static const struct regulator_desc lochnagar_regulators[] = {\n--\ndrivers/regulator/lochnagar-regulator.c-141-\t\t.name = \"MICVDD\",\ndrivers/regulator/lochnagar-regulator.c:142:\t\t.supply_name = \"SYSVDD\",\ndrivers/regulator/lochnagar-regulator.c-143-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lochnagar-regulator.c-164-\t\t.name = \"MIC1VDD\",\ndrivers/regulator/lochnagar-regulator.c:165:\t\t.supply_name = \"MICBIAS1\",\ndrivers/regulator/lochnagar-regulator.c-166-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lochnagar-regulator.c-179-\t\t.name = \"MIC2VDD\",\ndrivers/regulator/lochnagar-regulator.c:180:\t\t.supply_name = \"MICBIAS2\",\ndrivers/regulator/lochnagar-regulator.c-181-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lochnagar-regulator.c-194-\t\t.name = \"VDDCORE\",\ndrivers/regulator/lochnagar-regulator.c:195:\t\t.supply_name = \"SYSVDD\",\ndrivers/regulator/lochnagar-regulator.c-196-\t\t.type = REGULATOR_VOLTAGE,\n--\ndrivers/regulator/lp873x-regulator.c-19-\t\t\t.name\t\t\t= _name,\t\t\\\ndrivers/regulator/lp873x-regulator.c:20:\t\t\t.supply_name\t\t= _of \"-in\",\t\t\\\ndrivers/regulator/lp873x-regulator.c-21-\t\t\t.id\t\t\t= _id,\t\t\t\\\n--\ndrivers/regulator/lp87565-regulator.c=15=enum LP87565_regulator_id {\n--\ndrivers/regulator/lp87565-regulator.c-30-\t\t\t.name\t\t\t= _name,\t\t\\\ndrivers/regulator/lp87565-regulator.c:31:\t\t\t.supply_name\t\t= _of \"-in\",\t\t\\\ndrivers/regulator/lp87565-regulator.c-32-\t\t\t.id\t\t\t= _id,\t\t\t\\\n--\ndrivers/regulator/max20086-regulator.c=70=static const struct regulator_ops max20086_buck_ops = {\n--\ndrivers/regulator/max20086-regulator.c-78-\t.name = \"OUT\"#n,\t\t\t\\\ndrivers/regulator/max20086-regulator.c:79:\t.supply_name = \"in\",\t\t\t\\\ndrivers/regulator/max20086-regulator.c-80-\t.id = (n) - 1,\t\t\t\t\\\n--\ndrivers/regulator/max20411-regulator.c=74=static const struct regulator_desc max20411_desc = {\n--\ndrivers/regulator/max20411-regulator.c-77-\t.type = REGULATOR_VOLTAGE,\ndrivers/regulator/max20411-regulator.c:78:\t.supply_name = \"vin\",\ndrivers/regulator/max20411-regulator.c-79-\t.name = \"max20411\",\n--\ndrivers/regulator/max5970-regulator.c=348=static int max597x_dt_parse(struct device_node *np,\n--\ndrivers/regulator/max5970-regulator.c-373-\t.owner = THIS_MODULE, \\\ndrivers/regulator/max5970-regulator.c:374:\t.supply_name = _supply, \\\ndrivers/regulator/max5970-regulator.c-375-\t.enable_reg = _ereg, \\\n--\ndrivers/regulator/max77620-regulator.c=644=static const struct regulator_ops max77620_regulator_ops = {\n--\ndrivers/regulator/max77620-regulator.c-675-\t\t\t.of_parse_cb = max77620_of_parse_cb,\t\t\\\ndrivers/regulator/max77620-regulator.c:676:\t\t\t.supply_name = _sname,\t\t\t\t\\\ndrivers/regulator/max77620-regulator.c-677-\t\t\t.id = MAX77620_REGULATOR_ID_##_id,\t\t\\\n--\ndrivers/regulator/max77620-regulator.c-707-\t\t\t.of_parse_cb = max77620_of_parse_cb,\t\t\\\ndrivers/regulator/max77620-regulator.c:708:\t\t\t.supply_name = _sname,\t\t\t\t\\\ndrivers/regulator/max77620-regulator.c-709-\t\t\t.id = MAX77620_REGULATOR_ID_##_id,\t\t\\\n--\ndrivers/regulator/max77650-regulator.c=146=static const struct max77650_regulator_desc max77650_LDO_desc = {\n--\ndrivers/regulator/max77650-regulator.c-150-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:151:\t\t.supply_name\t\t= \"in-ldo\",\ndrivers/regulator/max77650-regulator.c-152-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_LDO,\n--\ndrivers/regulator/max77650-regulator.c=172=static const struct max77650_regulator_desc max77650_SBB0_desc = {\n--\ndrivers/regulator/max77650-regulator.c-176-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:177:\t\t.supply_name\t\t= \"in-sbb0\",\ndrivers/regulator/max77650-regulator.c-178-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB0,\n--\ndrivers/regulator/max77650-regulator.c=202=static const struct max77650_regulator_desc max77650_SBB1_desc = {\n--\ndrivers/regulator/max77650-regulator.c-206-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:207:\t\t.supply_name\t\t= \"in-sbb1\",\ndrivers/regulator/max77650-regulator.c-208-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB1,\n--\ndrivers/regulator/max77650-regulator.c=232=static const struct max77650_regulator_desc max77651_SBB1_desc = {\n--\ndrivers/regulator/max77650-regulator.c-236-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:237:\t\t.supply_name\t\t= \"in-sbb1\",\ndrivers/regulator/max77650-regulator.c-238-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB1,\n--\ndrivers/regulator/max77650-regulator.c=265=static const struct max77650_regulator_desc max77650_SBB2_desc = {\n--\ndrivers/regulator/max77650-regulator.c-269-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:270:\t\t.supply_name\t\t= \"in-sbb0\",\ndrivers/regulator/max77650-regulator.c-271-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB2,\n--\ndrivers/regulator/max77650-regulator.c=295=static const struct max77650_regulator_desc max77651_SBB2_desc = {\n--\ndrivers/regulator/max77650-regulator.c-299-\t\t.regulators_node\t= of_match_ptr(\"regulators\"),\ndrivers/regulator/max77650-regulator.c:300:\t\t.supply_name\t\t= \"in-sbb0\",\ndrivers/regulator/max77650-regulator.c-301-\t\t.id\t\t\t= MAX77650_REGULATOR_ID_SBB2,\n--\ndrivers/regulator/max77802-regulator.c=298=static const struct regulator_ops max77802_buck_dvs_ops = {\n--\ndrivers/regulator/max77802-regulator.c-315-\t.id\t\t= MAX77802_LDO##num,\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c:316:\t.supply_name\t= \"inl\"#supply,\t\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c-317-\t.ops\t\t= \u0026max77802_ldo_ops_logic##log,\t\t\t\\\n--\ndrivers/regulator/max77802-regulator.c-336-\t.id\t\t= MAX77802_LDO##num,\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c:337:\t.supply_name\t= \"inl\"#supply,\t\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c-338-\t.ops\t\t= \u0026max77802_ldo_ops_logic##log,\t\t\t\\\n--\ndrivers/regulator/max77802-regulator.c-357-\t.id\t\t= MAX77802_BUCK##num,\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c:358:\t.supply_name\t= \"inb\"#num,\t\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c-359-\t.ops\t\t= \u0026max77802_buck_16_dvs_ops,\t\t\t\\\n--\ndrivers/regulator/max77802-regulator.c-382-\t.id\t\t= MAX77802_BUCK##num,\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c:383:\t.supply_name\t= \"inb\"#num,\t\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c-384-\t.ops\t\t= \u0026max77802_buck_234_ops,\t\t\t\\\n--\ndrivers/regulator/max77802-regulator.c-408-\t.id\t\t= MAX77802_BUCK##num,\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c:409:\t.supply_name\t= \"inb\"#num,\t\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c-410-\t.ops\t\t= \u0026max77802_buck_dvs_ops,\t\t\t\\\n--\ndrivers/regulator/max77802-regulator.c-429-\t.id\t\t= MAX77802_BUCK##num,\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c:430:\t.supply_name\t= \"inb\"#num,\t\t\t\t\t\\\ndrivers/regulator/max77802-regulator.c-431-\t.ops\t\t= \u0026max77802_buck_dvs_ops,\t\t\t\\\n--\ndrivers/regulator/max8893.c=18=static const struct regulator_desc max8893_regulators[] = {\n--\ndrivers/regulator/max8893.c-20-\t\t.name = \"BUCK\",\ndrivers/regulator/max8893.c:21:\t\t.supply_name = \"in-buck\",\ndrivers/regulator/max8893.c-22-\t\t.of_match = of_match_ptr(\"buck\"),\n--\ndrivers/regulator/max8893.c-37-\t\t.name = \"LDO1\",\ndrivers/regulator/max8893.c:38:\t\t.supply_name = \"in-ldo1\",\ndrivers/regulator/max8893.c-39-\t\t.of_match = of_match_ptr(\"ldo1\"),\n--\ndrivers/regulator/max8893.c-54-\t\t.name = \"LDO2\",\ndrivers/regulator/max8893.c:55:\t\t.supply_name = \"in-ldo2\",\ndrivers/regulator/max8893.c-56-\t\t.of_match = of_match_ptr(\"ldo2\"),\n--\ndrivers/regulator/max8893.c-71-\t\t.name = \"LDO3\",\ndrivers/regulator/max8893.c:72:\t\t.supply_name = \"in-ldo3\",\ndrivers/regulator/max8893.c-73-\t\t.of_match = of_match_ptr(\"ldo3\"),\n--\ndrivers/regulator/max8893.c-88-\t\t.name = \"LDO4\",\ndrivers/regulator/max8893.c:89:\t\t.supply_name = \"in-ldo4\",\ndrivers/regulator/max8893.c-90-\t\t.of_match = of_match_ptr(\"ldo4\"),\n--\ndrivers/regulator/max8893.c-105-\t\t.name = \"LDO5\",\ndrivers/regulator/max8893.c:106:\t\t.supply_name = \"in-ldo5\",\ndrivers/regulator/max8893.c-107-\t\t.of_match = of_match_ptr(\"ldo5\"),\n--\ndrivers/regulator/max8907-regulator.c=32=struct max8907_regulator {\n--\ndrivers/regulator/max8907-regulator.c-38-\t\t.name = \"MBATT\", \\\ndrivers/regulator/max8907-regulator.c:39:\t\t.supply_name = \"mbatt\", \\\ndrivers/regulator/max8907-regulator.c-40-\t\t.id = MAX8907_MBATT, \\\n--\ndrivers/regulator/max8907-regulator.c-48-\t\t.name = #ids, \\\ndrivers/regulator/max8907-regulator.c:49:\t\t.supply_name = supply, \\\ndrivers/regulator/max8907-regulator.c-50-\t\t.id = MAX8907_##ids, \\\n--\ndrivers/regulator/max8907-regulator.c-65-\t\t.name = #ids, \\\ndrivers/regulator/max8907-regulator.c:66:\t\t.supply_name = supply, \\\ndrivers/regulator/max8907-regulator.c-67-\t\t.id = MAX8907_##ids, \\\n--\ndrivers/regulator/max8907-regulator.c-77-\t\t.name = #ids, \\\ndrivers/regulator/max8907-regulator.c:78:\t\t.supply_name = supply, \\\ndrivers/regulator/max8907-regulator.c-79-\t\t.id = MAX8907_##ids, \\\n--\ndrivers/regulator/max8907-regulator.c-91-\t\t.name = #ids, \\\ndrivers/regulator/max8907-regulator.c:92:\t\t.supply_name = supply, \\\ndrivers/regulator/max8907-regulator.c-93-\t\t.id = MAX8907_##ids, \\\n--\ndrivers/regulator/mcp16502.c=102=static unsigned int mcp16502_of_map_mode(unsigned int mode)\n--\ndrivers/regulator/mcp16502.c-112-\t\t.name\t\t\t= _name,\t\t\t\\\ndrivers/regulator/mcp16502.c:113:\t\t.supply_name\t\t= #_sn,\t\t\t\t\\\ndrivers/regulator/mcp16502.c-114-\t\t.regulators_node\t= \"regulators\",\t\t\t\\\n--\ndrivers/regulator/mp8859.c=303=static const struct regulator_desc mp8859_regulators[] = {\n--\ndrivers/regulator/mp8859.c-307-\t\t.name = \"mp8859_dcdc\",\ndrivers/regulator/mp8859.c:308:\t\t.supply_name = \"vin\",\ndrivers/regulator/mp8859.c-309-\t\t.of_match = of_match_ptr(\"mp8859_dcdc\"),\n--\ndrivers/regulator/mt6315-regulator.c=29=struct mt6315_chip {\n--\ndrivers/regulator/mt6315-regulator.c-37-\t\t.name = _name,\t\t\t\t\t\\\ndrivers/regulator/mt6315-regulator.c:38:\t\t.supply_name = _supply,\t\t\t\t\\\ndrivers/regulator/mt6315-regulator.c-39-\t\t.of_match = of_match_ptr(_name),\t\t\\\n--\ndrivers/regulator/mt6358-regulator.c=24=struct mt6358_regulator_info {\n--\ndrivers/regulator/mt6358-regulator.c-41-\t\t.name = #vreg,\t\\\ndrivers/regulator/mt6358-regulator.c:42:\t\t.supply_name = supply,\t\t\\\ndrivers/regulator/mt6358-regulator.c-43-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6358-regulator.c-68-\t\t.name = #vreg,\t\\\ndrivers/regulator/mt6358-regulator.c:69:\t\t.supply_name = supply,\t\t\\\ndrivers/regulator/mt6358-regulator.c-70-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6358-regulator.c-94-\t\t.name = #vreg,\t\\\ndrivers/regulator/mt6358-regulator.c:95:\t\t.supply_name = supply,\t\t\\\ndrivers/regulator/mt6358-regulator.c-96-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6358-regulator.c-118-\t\t.name = #vreg,\t\\\ndrivers/regulator/mt6358-regulator.c:119:\t\t.supply_name = supply,\t\t\\\ndrivers/regulator/mt6358-regulator.c-120-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6358-regulator.c-142-\t\t.name = #vreg,\t\\\ndrivers/regulator/mt6358-regulator.c:143:\t\t.supply_name = \"vsys-\" match,\t\t\\\ndrivers/regulator/mt6358-regulator.c-144-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6358-regulator.c-169-\t\t.name = #vreg,\t\\\ndrivers/regulator/mt6358-regulator.c:170:\t\t.supply_name = supply,\t\t\\\ndrivers/regulator/mt6358-regulator.c-171-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6358-regulator.c-195-\t\t.name = #vreg,\t\\\ndrivers/regulator/mt6358-regulator.c:196:\t\t.supply_name = supply,\t\t\\\ndrivers/regulator/mt6358-regulator.c-197-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6358-regulator.c-219-\t\t.name = #vreg,\t\\\ndrivers/regulator/mt6358-regulator.c:220:\t\t.supply_name = supply,\t\t\\\ndrivers/regulator/mt6358-regulator.c-221-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6359-regulator.c=31=struct mt6359_regulator_info {\n--\ndrivers/regulator/mt6359-regulator.c-48-\t\t.name = #_name,\t\t\t\t\t\\\ndrivers/regulator/mt6359-regulator.c:49:\t\t.supply_name = supply,\t\t\t\t\\\ndrivers/regulator/mt6359-regulator.c-50-\t\t.of_match = of_match_ptr(match),\t\t\\\n--\ndrivers/regulator/mt6359-regulator.c-77-\t\t.name = #_name,\t\t\t\t\t\\\ndrivers/regulator/mt6359-regulator.c:78:\t\t.supply_name = supply,\t\t\t\t\\\ndrivers/regulator/mt6359-regulator.c-79-\t\t.of_match = of_match_ptr(match),\t\t\\\n--\ndrivers/regulator/mt6359-regulator.c-102-\t\t.name = #_name,\t\t\t\t\t\\\ndrivers/regulator/mt6359-regulator.c:103:\t\t.supply_name = supply,\t\t\t\t\\\ndrivers/regulator/mt6359-regulator.c-104-\t\t.of_match = of_match_ptr(match),\t\t\\\n--\ndrivers/regulator/mt6359-regulator.c-127-\t\t.name = #_name,\t\t\t\t\\\ndrivers/regulator/mt6359-regulator.c:128:\t\t.supply_name = supply,\t\t\t\\\ndrivers/regulator/mt6359-regulator.c-129-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6359-regulator.c-150-\t\t.name = #_name,\t\t\t\t\\\ndrivers/regulator/mt6359-regulator.c:151:\t\t.supply_name = supply,\t\t\t\\\ndrivers/regulator/mt6359-regulator.c-152-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6359-regulator.c-172-\t\t.name = #_name,\t\t\t\t\\\ndrivers/regulator/mt6359-regulator.c:173:\t\t.supply_name = supply,\t\t\t\\\ndrivers/regulator/mt6359-regulator.c-174-\t\t.of_match = of_match_ptr(match),\t\\\n--\ndrivers/regulator/mt6360-regulator.c=308=static unsigned int mt6360_regulator_of_map_mode(unsigned int hw_mode)\n--\ndrivers/regulator/mt6360-regulator.c-327-\t\t.name = #_name,\t\t\t\t\t\t\\\ndrivers/regulator/mt6360-regulator.c:328:\t\t.supply_name = #_sname,\t\t\t\t\t\\\ndrivers/regulator/mt6360-regulator.c-329-\t\t.id = MT6360_REGULATOR_##_name,\t\t\t\\\n--\ndrivers/regulator/mt6363-regulator.c=101=struct mt6363_regulator_info {\n--\ndrivers/regulator/mt6363-regulator.c-122-\t\t.name = match,\t\t\t\t\t\t\\\ndrivers/regulator/mt6363-regulator.c:123:\t\t.supply_name = \"vsys-\"match,\t\t\t\t\\\ndrivers/regulator/mt6363-regulator.c-124-\t\t.of_match = of_match_ptr(match),\t\t\t\\\n--\ndrivers/regulator/mt6363-regulator.c-153-\t\t.name = match,\t\t\t\t\t\t\\\ndrivers/regulator/mt6363-regulator.c:154:\t\t.supply_name = in_sup,\t\t\t\t\t\\\ndrivers/regulator/mt6363-regulator.c-155-\t\t.of_match = of_match_ptr(match),\t\t\t\\\n--\ndrivers/regulator/mt6363-regulator.c-190-\t\t.name = match,\t\t\t\t\t\t\\\ndrivers/regulator/mt6363-regulator.c:191:\t\t.supply_name = in_sup,\t\t\t\t\t\\\ndrivers/regulator/mt6363-regulator.c-192-\t\t.of_match = of_match_ptr(match),\t\t\t\\\n--\ndrivers/regulator/pca9450-regulator.c=355=static struct pca9450_regulator_desc pca9450a_regulators[] = {\n--\ndrivers/regulator/pca9450-regulator.c-358-\t\t\t.name = \"buck1\",\ndrivers/regulator/pca9450-regulator.c:359:\t\t\t.supply_name = \"inb13\",\ndrivers/regulator/pca9450-regulator.c-360-\t\t\t.of_match = of_match_ptr(\"BUCK1\"),\n--\ndrivers/regulator/pca9450-regulator.c-392-\t\t\t.name = \"buck2\",\ndrivers/regulator/pca9450-regulator.c:393:\t\t\t.supply_name = \"inb26\",\ndrivers/regulator/pca9450-regulator.c-394-\t\t\t.of_match = of_match_ptr(\"BUCK2\"),\n--\ndrivers/regulator/pca9450-regulator.c-426-\t\t\t.name = \"buck3\",\ndrivers/regulator/pca9450-regulator.c:427:\t\t\t.supply_name = \"inb13\",\ndrivers/regulator/pca9450-regulator.c-428-\t\t\t.of_match = of_match_ptr(\"BUCK3\"),\n--\ndrivers/regulator/pca9450-regulator.c-460-\t\t\t.name = \"buck4\",\ndrivers/regulator/pca9450-regulator.c:461:\t\t\t.supply_name = \"inb45\",\ndrivers/regulator/pca9450-regulator.c-462-\t\t\t.of_match = of_match_ptr(\"BUCK4\"),\n--\ndrivers/regulator/pca9450-regulator.c-485-\t\t\t.name = \"buck5\",\ndrivers/regulator/pca9450-regulator.c:486:\t\t\t.supply_name = \"inb45\",\ndrivers/regulator/pca9450-regulator.c-487-\t\t\t.of_match = of_match_ptr(\"BUCK5\"),\n--\ndrivers/regulator/pca9450-regulator.c-510-\t\t\t.name = \"buck6\",\ndrivers/regulator/pca9450-regulator.c:511:\t\t\t.supply_name = \"inb26\",\ndrivers/regulator/pca9450-regulator.c-512-\t\t\t.of_match = of_match_ptr(\"BUCK6\"),\n\n"
} |
| 93/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 31880 output: 37 thoughts: 281 Thoughts: **Analyzing a Regulator Driver Patch** Okay, let's break this down. My initial thought is to analyze this patch to the regulator core driver. It looks like we have a `diff` output here, showing the changes in `drivers/regulator/core.c`. Specifically, the change seems to be around line 2239. Now, I'm thinking I should zoom in on the surrounding context. To get a good understanding of what this change *really* means, I should check the code around lines 2230 to 2260. I need to understand the function this change is within and what it's trying to achieve. Is this a bug fix? An enhancement? It's essential to understand the overall flow and the intent of the code to make a proper assessment. The inclusion of `put_device(&rdev->dev);` is intriguing, so I definitely need more context to understand the rationale behind it. Understanding the surrounding logic is crucial here. I'll need to see how the device is handled and why this `put_device` call has been introduced. |
| 94/2 | 2026/09/19 15:13 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2220,
"LineCount": 45
}Results: {
"Contents": "2220:\t\t\t/* Did the lookup explicitly defer for us? */\n2221:\t\t\tif (ret == -EPROBE_DEFER)\n2222:\t\t\t\tgoto out;\n2223:\t\n2224:\t\t\tif (have_full_constraints()) {\n2225:\t\t\t\tr = dummy_regulator_rdev;\n2226:\t\t\t\tif (!r) {\n2227:\t\t\t\t\tret = -EPROBE_DEFER;\n2228:\t\t\t\t\tgoto out;\n2229:\t\t\t\t}\n2230:\t\t\t\tget_device(\u0026r-\u003edev);\n2231:\t\t\t} else {\n2232:\t\t\t\tdev_err(dev, \"Failed to resolve %s-supply for %s\\n\",\n2233:\t\t\t\t\trdev-\u003esupply_name, rdev-\u003edesc-\u003ename);\n2234:\t\t\t\tret = -EPROBE_DEFER;\n2235:\t\t\t\tgoto out;\n2236:\t\t\t}\n2237:\t\t}\n2238:\t\n2239:\t\tif (r == rdev) {\n2240:\t\t\tdev_err(dev, \"Supply for %s (%s) resolved to itself\\n\",\n2241:\t\t\t\trdev-\u003edesc-\u003ename, rdev-\u003esupply_name);\n2242:\t\t\tput_device(\u0026rdev-\u003edev);\n2243:\t\t\tif (!have_full_constraints()) {\n2244:\t\t\t\tret = -EINVAL;\n2245:\t\t\t\tgoto out;\n2246:\t\t\t}\n2247:\t\t\tr = dummy_regulator_rdev;\n2248:\t\t\tif (!r) {\n2249:\t\t\t\tret = -EPROBE_DEFER;\n2250:\t\t\t\tgoto out;\n2251:\t\t\t}\n2252:\t\t\tget_device(\u0026r-\u003edev);\n2253:\t\t}\n2254:\t\n2255:\t\t/*\n2256:\t\t * If the supply's parent device is not the same as the\n2257:\t\t * regulator's parent device, then ensure the parent device\n2258:\t\t * is bound before we resolve the supply, in case the parent\n2259:\t\t * device get probe deferred and unregisters the supply.\n2260:\t\t */\n2261:\t\tif (r-\u003edev.parent \u0026\u0026 r-\u003edev.parent != rdev-\u003edev.parent) {\n2262:\t\t\tif (!device_is_bound(r-\u003edev.parent)) {\n2263:\t\t\t\tput_device(\u0026r-\u003edev);\n2264:\t\t\t\tret = -EPROBE_DEFER;\n"
} |
| 95/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 33097 output: 37 thoughts: 55 Thoughts: Okay, let's break this down. **Diving into the `regulator_resolve_supply` Function** Right, I'm digging into this `regulator_resolve_supply` function. My initial question is: when exactly does the condition `r == rdev` evaluate to true within this particular function? I need to understand that logic flow. Okay, let me go back a bit and zoom in on those lines around 2190 to 2220. That seems like a good place to start my investigation. |
| 96/2 | 2026/09/19 15:13 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2190,
"LineCount": 40
}Results: {
"Contents": "2190:\t{\n2191:\t\tstruct regulator_dev *r;\n2192:\t\tstruct device *dev = rdev-\u003edev.parent;\n2193:\t\tstruct ww_acquire_ctx ww_ctx;\n2194:\t\tstruct regulator *supply;\n2195:\t\tbool do_final_setup;\n2196:\t\tint ret = 0;\n2197:\t\n2198:\t\t/* No supply to resolve? */\n2199:\t\tif (!rdev-\u003esupply_name)\n2200:\t\t\treturn 0;\n2201:\t\n2202:\t\t/* Supply already resolved? (fast-path without locking contention) */\n2203:\t\tif (rdev-\u003esupply \u0026\u0026 !rdev-\u003econstraints_pending)\n2204:\t\t\treturn 0;\n2205:\t\n2206:\t\t/* first do a dt based lookup on the node described in the virtual\n2207:\t\t * device.\n2208:\t\t */\n2209:\t\tr = regulator_dt_lookup(\u0026rdev-\u003edev, rdev-\u003esupply_name);\n2210:\t\n2211:\t\t/* If regulator not found use usual search path in the parent\n2212:\t\t * device.\n2213:\t\t */\n2214:\t\tif (!r)\n2215:\t\t\tr = regulator_dev_lookup(dev, rdev-\u003esupply_name);\n2216:\t\n2217:\t\tif (IS_ERR(r)) {\n2218:\t\t\tret = PTR_ERR(r);\n2219:\t\n2220:\t\t\t/* Did the lookup explicitly defer for us? */\n2221:\t\t\tif (ret == -EPROBE_DEFER)\n2222:\t\t\t\tgoto out;\n2223:\t\n2224:\t\t\tif (have_full_constraints()) {\n2225:\t\t\t\tr = dummy_regulator_rdev;\n2226:\t\t\t\tif (!r) {\n2227:\t\t\t\t\tret = -EPROBE_DEFER;\n2228:\t\t\t\t\tgoto out;\n2229:\t\t\t\t}\n"
} |
| 97/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 33853 output: 37 thoughts: 71 Thoughts: Here's my summary, as if I were thinking it: **Digging into Regulator Device Lookup** Okay, so I'm looking at this code and I see these two calls: `r = regulator_dev_lookup(dev, rdev->supply_name)` and `r = regulator_dt_lookup(&rdev->dev, rdev->supply_name)`. Seems like we're trying to find a regulator, and depending on the situation it's done one way or another. My immediate instinct is to understand the first one, `regulator_dev_lookup`, before I get into the Device Tree version. Let's trace through that function and see what it actually *does*. I'm going to jump to lines 2146-2189 and get a feel for the implementation. |
| 98/2 | 2026/09/19 15:13 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/core.c",
"FirstLine": 2146,
"LineCount": 45
}Results: {
"Contents": "2146:\tstatic struct regulator_dev *regulator_dev_lookup(struct device *dev,\n2147:\t\t\t\t\t\t\t const char *supply)\n2148:\t{\n2149:\t\tstruct regulator_dev *r = NULL;\n2150:\t\tstruct regulator_map *map;\n2151:\t\tconst char *devname = NULL;\n2152:\t\n2153:\t\tregulator_supply_alias(\u0026dev, \u0026supply);\n2154:\t\n2155:\t\t/* first do a dt based lookup */\n2156:\t\tr = regulator_dt_lookup(dev, supply);\n2157:\t\tif (r)\n2158:\t\t\treturn r;\n2159:\t\n2160:\t\t/* if not found, try doing it non-dt way */\n2161:\t\tif (dev)\n2162:\t\t\tdevname = dev_name(dev);\n2163:\t\n2164:\t\tmutex_lock(\u0026regulator_list_mutex);\n2165:\t\tlist_for_each_entry(map, \u0026regulator_map_list, list) {\n2166:\t\t\t/* If the mapping has a device set up it must match */\n2167:\t\t\tif (map-\u003edev_name \u0026\u0026\n2168:\t\t\t (!devname || strcmp(map-\u003edev_name, devname)))\n2169:\t\t\t\tcontinue;\n2170:\t\n2171:\t\t\tif (strcmp(map-\u003esupply, supply) == 0 \u0026\u0026\n2172:\t\t\t get_device(\u0026map-\u003eregulator-\u003edev)) {\n2173:\t\t\t\tr = map-\u003eregulator;\n2174:\t\t\t\tbreak;\n2175:\t\t\t}\n2176:\t\t}\n2177:\t\tmutex_unlock(\u0026regulator_list_mutex);\n2178:\t\n2179:\t\tif (r)\n2180:\t\t\treturn r;\n2181:\t\n2182:\t\tr = regulator_lookup_by_name(supply);\n2183:\t\tif (r)\n2184:\t\t\treturn r;\n2185:\t\n2186:\t\treturn ERR_PTR(-ENODEV);\n2187:\t}\n2188:\t\n2189:\tstatic int regulator_resolve_supply(struct regulator_dev *rdev)\n2190:\t{\n"
} |
| 99/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 34751 output: 34 thoughts: 442 Thoughts: **My Analysis of a Potential Regulator Reference Leak** Okay, so I'm looking at this `regulator_lookup_by_name(supply)` function. The core of the problem seems to be in how `class_find_device` works, specifically that it grabs a reference on the device via `dev = class_find_device(®ulator_class, NULL, name, regulator_match);`. Then we get `r = dev_to_rdev(dev)`. If `r` and `rdev` are the same (which is the critical bit), the device was found by name, and `class_find_device` took a reference on `&rdev->dev`. The code later checks: `if (r == rdev)`, and then issues the error message: `"Supply for %s (%s) resolved to itself\n"`. The bug is pretty clear: `put_device(&rdev->dev)` is *missing*. That means the reference count on `&rdev->dev` is leaking! A straightforward memory leak, classic. But the *real* question, the one that makes this interesting for syzkaller, is: Is this code actually *reachable* in a typical, standard virtualized environment on amd64? This is the essential triage question. Let's break this down: 1. **amd64 is our target.** 2. **Syzkaller's typical environments:** GCE or QEMU are the name of the game, often using software-emulated devices like USB gadgets, netdev, or tun/tap. 3. **The key: Can a regulator *actually* resolve to itself in QEMU or GCE on amd64?** This is the make-or-break question. I need to figure out if there's even a plausible scenario. So, how do we get there? I need to figure out what regulators are even *available* on amd64 in those environments. Are any regulators registered at all on amd64 in these settings? I need to search for drivers that register or instantiate regulators on x86/amd64. I think I'll start looking in `drivers/regulator/`, but I need to expand my search beyond there. I'm thinking I should check `dummy.c` because that always seems to be a good test case. Let's see: `dummy_regulator_rdev` is created in `regulator_dummy_init()`. Does `dummy_regulator_rdev` have a supply? I need to check `dummy.c` to understand that. |
| 100/2 | 2026/09/19 15:13 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/dummy.c",
"FirstLine": 1,
"LineCount": 75
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0-or-later\n 2:\t/*\n 3:\t * dummy.c\n 4:\t *\n 5:\t * Copyright 2010 Wolfson Microelectronics PLC.\n 6:\t *\n 7:\t * Author: Mark Brown \u003cbroonie@opensource.wolfsonmicro.com\u003e\n 8:\t *\n 9:\t * This is useful for systems with mixed controllable and\n 10:\t * non-controllable regulators, as well as for allowing testing on\n 11:\t * systems with no controllable regulators.\n 12:\t */\n 13:\t\n 14:\t#include \u003clinux/err.h\u003e\n 15:\t#include \u003clinux/export.h\u003e\n 16:\t#include \u003clinux/device/faux.h\u003e\n 17:\t#include \u003clinux/regulator/driver.h\u003e\n 18:\t#include \u003clinux/regulator/machine.h\u003e\n 19:\t\n 20:\t#include \"dummy.h\"\n 21:\t\n 22:\tstruct regulator_dev *dummy_regulator_rdev;\n 23:\t\n 24:\tstatic const struct regulator_init_data dummy_initdata = {\n 25:\t\t.constraints = {\n 26:\t\t\t.always_on = 1,\n 27:\t\t},\n 28:\t};\n 29:\t\n 30:\tstatic const struct regulator_ops dummy_ops;\n 31:\t\n 32:\tstatic const struct regulator_desc dummy_desc = {\n 33:\t\t.name = \"regulator-dummy\",\n 34:\t\t.id = -1,\n 35:\t\t.type = REGULATOR_VOLTAGE,\n 36:\t\t.owner = THIS_MODULE,\n 37:\t\t.ops = \u0026dummy_ops,\n 38:\t};\n 39:\t\n 40:\tstatic int dummy_regulator_probe(struct faux_device *fdev)\n 41:\t{\n 42:\t\tstruct regulator_config config = { };\n 43:\t\tint ret;\n 44:\t\n 45:\t\tconfig.dev = \u0026fdev-\u003edev;\n 46:\t\tconfig.init_data = \u0026dummy_initdata;\n 47:\t\n 48:\t\tdummy_regulator_rdev = devm_regulator_register(\u0026fdev-\u003edev, \u0026dummy_desc,\n 49:\t\t\t\t\t\t\t \u0026config);\n 50:\t\tif (IS_ERR(dummy_regulator_rdev)) {\n 51:\t\t\tret = PTR_ERR(dummy_regulator_rdev);\n 52:\t\t\tpr_err(\"Failed to register regulator: %d\\n\", ret);\n 53:\t\t\treturn ret;\n 54:\t\t}\n 55:\t\n 56:\t\treturn 0;\n 57:\t}\n 58:\t\n 59:\tstatic struct faux_device_ops dummy_regulator_driver = {\n 60:\t\t.probe = dummy_regulator_probe,\n 61:\t};\n 62:\t\n 63:\tstatic struct faux_device *dummy_fdev;\n 64:\t\n 65:\tvoid __init regulator_dummy_init(void)\n 66:\t{\n 67:\t\tdummy_fdev = faux_device_create(\"reg-dummy\", NULL, \u0026dummy_regulator_driver);\n 68:\t\tif (!dummy_fdev) {\n 69:\t\t\tpr_err(\"Failed to allocate dummy regulator device\\n\");\n 70:\t\t\treturn;\n 71:\t\t}\n 72:\t}\n"
} |
| 101/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 36707 output: 28 thoughts: 121 Thoughts: **Investigating Dynamic Regulator Device Creation** Okay, so I'm looking at this "regulator-dummy" thing and how it's behaving. Specifically, I see that its `.name` is set to "regulator-dummy" and, crucially, its `.supply_name` is null. Right, and the implication is that when `regulator_resolve_supply()` gets called on this `dummy_regulator_rdev`, it immediately returns 0 because that check `if (!rdev->supply_name)` fails. Seems pretty straightforward, it is basically a null device. My next thought is: can userspace somehow inject or dynamically register a regulator device? It would be useful if it could, which is a good question for understanding system behaviour, especially for specialized hardware integration. I need to figure out if there are any interfaces, any system calls, or device tree properties that would facilitate this. Therefore, I need to see how the system handles it. I'll need to check the kernel sources, specifically, the `drivers/` directory and maybe a tree-wide grep. Let's see if there's anything like `regulator_register` kicking around. That's the function I would expect to find if such a thing existed, so that's the natural starting point. |
| 102/2 | 2026/09/19 15:13 | tool | grepper |
0mArgs:{
"Expression": "regulator_register\\b",
"PathPrefix": "drivers/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1644 lines.\nUse more precise expression if possible.\n\ndrivers/hwmon/pmbus/pmbus_core.c=3447=static void pmbus_regulator_notify_worker(struct work_struct *work)\n--\ndrivers/hwmon/pmbus/pmbus_core.c-3474-\ndrivers/hwmon/pmbus/pmbus_core.c:3475:static int pmbus_regulator_register(struct pmbus_data *data)\ndrivers/hwmon/pmbus/pmbus_core.c-3476-{\n--\ndrivers/hwmon/pmbus/pmbus_core.c-3495-\ndrivers/hwmon/pmbus/pmbus_core.c:3496:\t\tdata-\u003erdevs[i] = devm_regulator_register(dev, \u0026info-\u003ereg_desc[i],\ndrivers/hwmon/pmbus/pmbus_core.c-3497-\t\t\t\t\t\t\t \u0026config);\n--\ndrivers/hwmon/pmbus/pmbus_core.c=3513=static void pmbus_regulator_notify(struct pmbus_data *data, int page, int event)\n--\ndrivers/hwmon/pmbus/pmbus_core.c-3518-#else\ndrivers/hwmon/pmbus/pmbus_core.c:3519:static int pmbus_regulator_register(struct pmbus_data *data)\ndrivers/hwmon/pmbus/pmbus_core.c-3520-{\n--\ndrivers/hwmon/pmbus/pmbus_core.c=3854=int pmbus_do_probe(struct i2c_client *client, struct pmbus_driver_info *info)\n--\ndrivers/hwmon/pmbus/pmbus_core.c-3930-\ndrivers/hwmon/pmbus/pmbus_core.c:3931:\tret = pmbus_regulator_register(data);\ndrivers/hwmon/pmbus/pmbus_core.c-3932-\tif (ret)\n--\ndrivers/iio/adc/ad7768-1.c=1637=static int ad7768_register_vcm_regulator(struct device *dev,\n--\ndrivers/iio/adc/ad7768-1.c-1652-\ndrivers/iio/adc/ad7768-1.c:1653:\tst-\u003evcm_rdev = devm_regulator_register(dev, \u0026vcm_desc, \u0026config);\ndrivers/iio/adc/ad7768-1.c-1654-\tif (IS_ERR(st-\u003evcm_rdev))\n--\ndrivers/mmc/host/renesas_sdhi_core.c=1055=int renesas_sdhi_probe(struct platform_device *pdev,\n--\ndrivers/mmc/host/renesas_sdhi_core.c-1214-\t\trcfg.driver_data = priv-\u003ehost;\ndrivers/mmc/host/renesas_sdhi_core.c:1215:\t\trdev = devm_regulator_register(dev, \u0026renesas_sdhi_vqmmc_regulator, \u0026rcfg);\ndrivers/mmc/host/renesas_sdhi_core.c-1216-\t\tof_node_put(rcfg.of_node);\n--\ndrivers/net/phy/qcom/at803x.c=749=static int at8031_register_regulators(struct phy_device *phydev)\n--\ndrivers/net/phy/qcom/at803x.c-757-\ndrivers/net/phy/qcom/at803x.c:758:\tpriv-\u003evddio_rdev = devm_regulator_register(dev, \u0026vddio_desc, \u0026config);\ndrivers/net/phy/qcom/at803x.c-759-\tif (IS_ERR(priv-\u003evddio_rdev)) {\n--\ndrivers/net/phy/qcom/at803x.c-763-\ndrivers/net/phy/qcom/at803x.c:764:\tpriv-\u003evddh_rdev = devm_regulator_register(dev, \u0026vddh_desc, \u0026config);\ndrivers/net/phy/qcom/at803x.c-765-\tif (IS_ERR(priv-\u003evddh_rdev)) {\n--\ndrivers/net/pse-pd/pd692x0.c=939=pd692x0_register_manager_regulator(struct device *dev, char *reg_name,\n--\ndrivers/net/pse-pd/pd692x0.c-966-\ndrivers/net/pse-pd/pd692x0.c:967:\trdev = devm_regulator_register(dev, rdesc, \u0026rconfig);\ndrivers/net/pse-pd/pd692x0.c-968-\tif (IS_ERR(rdev)) {\n--\ndrivers/net/pse-pd/pse_core.c=829=static int\ndrivers/net/pse-pd/pse_core.c:830:devm_pse_pi_regulator_register(struct pse_controller_dev *pcdev,\ndrivers/net/pse-pd/pse_core.c-831-\t\t\t char *name, int id)\n--\ndrivers/net/pse-pd/pse_core.c-868-\ndrivers/net/pse-pd/pse_core.c:869:\trdev = devm_regulator_register(pcdev-\u003edev, rdesc, \u0026rconfig);\ndrivers/net/pse-pd/pse_core.c-870-\tif (IS_ERR(rdev)) {\n--\ndrivers/net/pse-pd/pse_core.c=1039=int pse_controller_register(struct pse_controller_dev *pcdev)\n--\ndrivers/net/pse-pd/pse_core.c-1093-\ndrivers/net/pse-pd/pse_core.c:1094:\t\tret = devm_pse_pi_regulator_register(pcdev, reg_name, i);\ndrivers/net/pse-pd/pse_core.c-1095-\t\tif (ret)\n--\ndrivers/phy/mediatek/phy-mtk-hdmi.c=78=static int mtk_hdmi_phy_register_regulators(struct mtk_hdmi_phy *hdmi_phy)\n--\ndrivers/phy/mediatek/phy-mtk-hdmi.c-92-\ndrivers/phy/mediatek/phy-mtk-hdmi.c:93:\thdmi_phy-\u003erdev = devm_regulator_register(hdmi_phy-\u003edev, vreg_desc, \u0026vreg_config);\ndrivers/phy/mediatek/phy-mtk-hdmi.c-94-\tif (IS_ERR(hdmi_phy-\u003erdev))\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c=898=static int rcar_gen3_phy_usb2_vbus_regulator_get_exclusive_enable(struct rcar_gen3_chan *channel,\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-929-\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c:930:static int rcar_gen3_phy_usb2_vbus_regulator_register(struct rcar_gen3_chan *channel)\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-931-{\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-940-\t\trcfg.driver_data = channel;\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c:941:\t\trdev = devm_regulator_register(dev, \u0026rcar_gen3_phy_usb2_regulator,\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-942-\t\t\t\t\t \u0026rcfg);\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c=955=static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)\n--\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-1041-\tif (channel-\u003ephy_data-\u003eno_adp_ctrl \u0026\u0026 channel-\u003eis_otg_channel) {\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c:1042:\t\tret = rcar_gen3_phy_usb2_vbus_regulator_register(channel);\ndrivers/phy/renesas/phy-rcar-gen3-usb2.c-1043-\t\tif (ret)\n--\ndrivers/pinctrl/renesas/pfc-sh73a0.c=4122=static int sh73a0_pinmux_soc_init(struct sh_pfc *pfc)\n--\ndrivers/pinctrl/renesas/pfc-sh73a0.c-4131-\ndrivers/pinctrl/renesas/pfc-sh73a0.c:4132:\tvccq = devm_regulator_register(pfc-\u003edev, \u0026sh73a0_vccq_mc0_desc, \u0026cfg);\ndrivers/pinctrl/renesas/pfc-sh73a0.c-4133-\tif (IS_ERR(vccq)) {\n--\ndrivers/platform/olpc/olpc-ec.c=401=static int olpc_ec_probe(struct platform_device *pdev)\n--\ndrivers/platform/olpc/olpc-ec.c-432-\tec-\u003edcon_enabled = true;\ndrivers/platform/olpc/olpc-ec.c:433:\tregulator = devm_regulator_register(\u0026pdev-\u003edev, \u0026dcon_desc, \u0026config);\ndrivers/platform/olpc/olpc-ec.c-434-\tif (IS_ERR(regulator)) {\n--\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c=188=int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,\n--\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c-243-\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c:244:\tregulator-\u003erdev = regulator_register(int3472-\u003edev, \u0026regulator-\u003erdesc, \u0026cfg);\ndrivers/platform/x86/intel/int3472/clk_and_regulator.c-245-\tif (IS_ERR(regulator-\u003erdev))\n--\ndrivers/power/supply/bq24190_charger.c=720=static int bq24190_register_vbus_regulator(struct bq24190_dev_info *bdi)\n--\ndrivers/power/supply/bq24190_charger.c-732-\tcfg.driver_data = bdi;\ndrivers/power/supply/bq24190_charger.c:733:\treg = devm_regulator_register(bdi-\u003edev, bdi-\u003einfo-\u003evbus_desc, \u0026cfg);\ndrivers/power/supply/bq24190_charger.c-734-\tif (IS_ERR(reg)) {\n--\ndrivers/power/supply/bq25890_charger.c=1243=static int bq25890_register_regulator(struct bq25890_device *bq)\n--\ndrivers/power/supply/bq25890_charger.c-1254-\ndrivers/power/supply/bq25890_charger.c:1255:\treg = devm_regulator_register(bq-\u003edev, \u0026bq25890_vbus_desc, \u0026cfg);\ndrivers/power/supply/bq25890_charger.c-1256-\tif (IS_ERR(reg)) {\n--\ndrivers/power/supply/bq25890_charger.c-1262-\tcfg.init_data = NULL;\ndrivers/power/supply/bq25890_charger.c:1263:\treg = devm_regulator_register(bq-\u003edev, \u0026bq25890_vsys_desc, \u0026cfg);\ndrivers/power/supply/bq25890_charger.c-1264-\tif (IS_ERR(reg)) {\n--\ndrivers/power/supply/max77759_charger.c=684=static int max77759_charger_probe(struct platform_device *pdev)\n--\ndrivers/power/supply/max77759_charger.c-727-\tchgin_otg_reg_cfg.of_node = dev_of_node(dev);\ndrivers/power/supply/max77759_charger.c:728:\tchg-\u003echgin_otg_rdev = devm_regulator_register(dev, \u0026chgin_otg_reg_desc,\ndrivers/power/supply/max77759_charger.c-729-\t\t\t\t\t\t \u0026chgin_otg_reg_cfg);\n--\ndrivers/power/supply/mt6360_charger.c=778=static int mt6360_charger_probe(struct platform_device *pdev)\n--\ndrivers/power/supply/mt6360_charger.c-825-\tconfig.regmap = mci-\u003eregmap;\ndrivers/power/supply/mt6360_charger.c:826:\tmci-\u003eotg_rdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026mt6360_otg_rdesc,\ndrivers/power/supply/mt6360_charger.c-827-\t\t\t\t\t\t\u0026config);\n--\ndrivers/power/supply/mt6370-charger.c=737=static int mt6370_chg_init_otg_regulator(struct mt6370_priv *priv)\n--\ndrivers/power/supply/mt6370-charger.c-744-\ndrivers/power/supply/mt6370-charger.c:745:\tpriv-\u003erdev = devm_regulator_register(priv-\u003edev, \u0026mt6370_chg_otg_rdesc,\ndrivers/power/supply/mt6370-charger.c-746-\t\t\t\t\t \u0026rcfg);\n--\ndrivers/power/supply/qcom_smbb.c=831=static int smbb_charger_probe(struct platform_device *pdev)\n--\ndrivers/power/supply/qcom_smbb.c-958-\ndrivers/power/supply/qcom_smbb.c:959:\tchg-\u003eotg_reg = devm_regulator_register(\u0026pdev-\u003edev, \u0026chg-\u003eotg_rdesc,\ndrivers/power/supply/qcom_smbb.c-960-\t\t\t\t\t \u0026config);\n--\ndrivers/power/supply/rt9467-charger.c=337=static int rt9467_register_otg_regulator(struct rt9467_chg_data *data)\n--\ndrivers/power/supply/rt9467-charger.c-344-\ndrivers/power/supply/rt9467-charger.c:345:\tdata-\u003erdev = devm_regulator_register(data-\u003edev, \u0026rt9467_otg_desc, \u0026cfg);\ndrivers/power/supply/rt9467-charger.c-346-\treturn PTR_ERR_OR_ZERO(data-\u003erdev);\n--\ndrivers/power/supply/rt9471.c=633=static int rt9471_register_otg_regulator(struct rt9471_chip *chip)\n--\ndrivers/power/supply/rt9471.c-637-\ndrivers/power/supply/rt9471.c:638:\tchip-\u003eotg_rdev = devm_regulator_register(dev, \u0026rt9471_otg_rdesc, \u0026cfg);\ndrivers/power/supply/rt9471.c-639-\n--\ndrivers/power/supply/sgm41542_charger.c=912=static const struct regulator_desc sgm4154x_otg_rdesc = {\n--\ndrivers/power/supply/sgm41542_charger.c-931-\ndrivers/power/supply/sgm41542_charger.c:932:static int sgm4154x_vbus_regulator_register(struct sgm4154x_device *sgm)\ndrivers/power/supply/sgm41542_charger.c-933-{\n--\ndrivers/power/supply/sgm41542_charger.c-939-\ndrivers/power/supply/sgm41542_charger.c:940:\tsgm-\u003eotg_rdev = devm_regulator_register(sgm-\u003edev,\ndrivers/power/supply/sgm41542_charger.c-941-\t\t\t\t\t\t\u0026sgm4154x_otg_rdesc,\n--\ndrivers/power/supply/sgm41542_charger.c=984=static int sgm4154x_probe(struct i2c_client *client)\n--\ndrivers/power/supply/sgm41542_charger.c-1050-\ndrivers/power/supply/sgm41542_charger.c:1051:\tret = sgm4154x_vbus_regulator_register(sgm);\ndrivers/power/supply/sgm41542_charger.c-1052-\tif (ret) {\n--\ndrivers/power/supply/smb347-charger.c=1531=static int smb347_probe(struct i2c_client *client)\n--\ndrivers/power/supply/smb347-charger.c-1586-\ndrivers/power/supply/smb347-charger.c:1587:\tsmb-\u003eusb_rdev = devm_regulator_register(dev,\ndrivers/power/supply/smb347-charger.c-1588-\t\t\t\t\t\t\u0026smb347_usb_vbus_regulator_desc,\n--\ndrivers/power/supply/ucs1002_power.c=534=static int ucs1002_probe(struct i2c_client *client)\n--\ndrivers/power/supply/ucs1002_power.c-634-\ndrivers/power/supply/ucs1002_power.c:635:\tinfo-\u003erdev = devm_regulator_register(dev, info-\u003eregulator_descriptor,\ndrivers/power/supply/ucs1002_power.c-636-\t\t\t\t \u0026regulator_config);\n--\ndrivers/regulator/88pg86x.c=60=static int pg86x_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/88pg86x.c-73-\t\tstruct regulator_dev *rdev;\ndrivers/regulator/88pg86x.c:74:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev,\ndrivers/regulator/88pg86x.c-75-\t\t\t\t\t \u0026pg86x_regulators[id],\n--\ndrivers/regulator/88pm800-regulator.c=226=static int pm800_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm800-regulator.c-260-\ndrivers/regulator/88pm800-regulator.c:261:\t\tregulator = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/88pm800-regulator.c-262-\t\t\t\t\u0026pm800_regulator_info[i].desc, \u0026config);\n--\ndrivers/regulator/88pm8607.c=315=static int pm8607_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm8607.c-359-\ndrivers/regulator/88pm8607.c:360:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc, \u0026config);\ndrivers/regulator/88pm8607.c-361-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/88pm886-regulator.c=340=static int pm886_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/88pm886-regulator.c-365-\t\trdesc = \u0026pm886_regulators[i];\ndrivers/regulator/88pm886-regulator.c:366:\t\trdev = devm_regulator_register(dev, rdesc, \u0026rcfg);\ndrivers/regulator/88pm886-regulator.c-367-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/aat2870-regulator.c=150=static int aat2870_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/aat2870-regulator.c-166-\ndrivers/regulator/aat2870-regulator.c:167:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026ri-\u003edesc, \u0026config);\ndrivers/regulator/aat2870-regulator.c-168-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/ab8500-ext.c=393=static int ab8500_ext_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/ab8500-ext.c-430-\t\t/* register regulator with framework */\ndrivers/regulator/ab8500-ext.c:431:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/ab8500-ext.c-432-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/ab8500.c=1643=static void abx500_get_regulator_info(struct ab8500 *ab8500)\n--\ndrivers/regulator/ab8500.c-1661-\ndrivers/regulator/ab8500.c:1662:static int ab8500_regulator_register(struct platform_device *pdev,\ndrivers/regulator/ab8500.c-1663-\t\t\t\t struct regulator_init_data *init_data,\n--\ndrivers/regulator/ab8500.c-1690-\t/* register regulator with framework */\ndrivers/regulator/ab8500.c:1691:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc, \u0026config);\ndrivers/regulator/ab8500.c-1692-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/ab8500.c=1701=static int ab8500_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/ab8500.c-1725-\tfor (i = 0; i \u003c abx500_regulator.info_size; i++) {\ndrivers/regulator/ab8500.c:1726:\t\terr = ab8500_regulator_register(pdev, match[i].init_data, i,\ndrivers/regulator/ab8500.c-1727-\t\t\t\t\t\tmatch[i].of_node);\n--\ndrivers/regulator/act8865-regulator.c=654=static int act8865_pmic_probe(struct i2c_client *client)\n--\ndrivers/regulator/act8865-regulator.c-755-\ndrivers/regulator/act8865-regulator.c:756:\t\trdev = devm_regulator_register(dev, desc, \u0026config);\ndrivers/regulator/act8865-regulator.c-757-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/act8945a-regulator.c=274=static int act8945a_pmic_probe(struct platform_device *pdev)\n--\ndrivers/regulator/act8945a-regulator.c-309-\tfor (i = 0; i \u003c num_regulators; i++) {\ndrivers/regulator/act8945a-regulator.c:310:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regulators[i],\ndrivers/regulator/act8945a-regulator.c-311-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/ad5398.c=216=static int ad5398_probe(struct i2c_client *client)\n--\ndrivers/regulator/ad5398.c-248-\ndrivers/regulator/ad5398.c:249:\tchip-\u003erdev = devm_regulator_register(\u0026client-\u003edev, \u0026ad5398_reg,\ndrivers/regulator/ad5398.c-250-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/adp5055-regulator.c=345=static int adp5055_probe(struct i2c_client *client)\n--\ndrivers/regulator/adp5055-regulator.c-384-\ndrivers/regulator/adp5055-regulator.c:385:\t\trdev = devm_regulator_register(dev, desc, \u0026config);\ndrivers/regulator/adp5055-regulator.c-386-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/anatop-regulator.c=155=static int anatop_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/anatop-regulator.c-305-\t/* register regulator */\ndrivers/regulator/anatop-regulator.c:306:\trdev = devm_regulator_register(dev, rdesc, \u0026config);\ndrivers/regulator/anatop-regulator.c-307-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/arizona-ldo1.c=226=static int arizona_ldo1_common_init(struct platform_device *pdev,\n--\ndrivers/regulator/arizona-ldo1.c-278-\ndrivers/regulator/arizona-ldo1.c:279:\tldo1-\u003eregulator = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/arizona-ldo1.c-280-\n--\ndrivers/regulator/arizona-micsupp.c=250=static int arizona_micsupp_common_init(struct platform_device *pdev,\n--\ndrivers/regulator/arizona-micsupp.c-284-\ndrivers/regulator/arizona-micsupp.c:285:\tmicsupp-\u003eregulator = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/arizona-micsupp.c-286-\t\t\t\t\t\t desc,\n--\ndrivers/regulator/as3711-regulator.c=203=static int as3711_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/as3711-regulator.c-230-\ndrivers/regulator/as3711-regulator.c:231:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026as3711_reg_desc[id],\ndrivers/regulator/as3711-regulator.c-232-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/as3722-regulator.c=634=static int as3722_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/as3722-regulator.c-795-\t\tconfig.of_node = as3722_regulator_matches[id].of_node;\ndrivers/regulator/as3722-regulator.c:796:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/as3722-regulator.c-797-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/atc260x-regulator.c=473=static int atc260x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/atc260x-regulator.c-513-\t\tif (atc2603c_ver_b \u0026\u0026 regulators[i].id == ATC2603C_ID_DCDC2)\ndrivers/regulator/atc260x-regulator.c:514:\t\t\tatc260x_rdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/atc260x-regulator.c-515-\t\t\t\t\t\t\t \u0026atc2603c_reg_dcdc2_ver_b,\n--\ndrivers/regulator/atc260x-regulator.c-517-\t\telse\ndrivers/regulator/atc260x-regulator.c:518:\t\t\tatc260x_rdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/atc260x-regulator.c-519-\t\t\t\t\t\t\t \u0026regulators[i],\n--\ndrivers/regulator/aw37503-regulator.c=178=static int aw37503_probe(struct i2c_client *client)\n--\ndrivers/regulator/aw37503-regulator.c-203-\tfor (id = 0; id \u003c AW37503_MAX_REGULATORS; ++id) {\ndrivers/regulator/aw37503-regulator.c:204:\t\trdev = devm_regulator_register(dev, \u0026aw_regs_desc[id],\ndrivers/regulator/aw37503-regulator.c-205-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/axp20x-regulator.c=1553=static int axp20x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/axp20x-regulator.c-1689-\ndrivers/regulator/axp20x-regulator.c:1690:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/axp20x-regulator.c-1691-\t\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/axp20x-regulator.c-1733-\t\t\t\t AXP22X_MISC_N_VBUSEN_FUNC, 0);\ndrivers/regulator/axp20x-regulator.c:1734:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/axp20x-regulator.c-1735-\t\t\t\t\t \u0026axp22x_drivevbus_regulator,\n--\ndrivers/regulator/bcm590xx-regulator.c=1098=static int bcm590xx_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bcm590xx-regulator.c-1153-\ndrivers/regulator/bcm590xx-regulator.c:1154:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/bcm590xx-regulator.c-1155-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd71815-regulator.c=561=static int bd7181x_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd71815-regulator.c-599-\ndrivers/regulator/bd71815-regulator.c:600:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/bd71815-regulator.c-601-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/bd71828-regulator.c=1622=static int bd71828_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd71828-regulator.c-1670-\t\tconfig.driver_data = rd;\ndrivers/regulator/bd71828-regulator.c:1671:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/bd71828-regulator.c-1672-\t\t\t\t\t \u0026rd-\u003edesc, \u0026config);\n--\ndrivers/regulator/bd718x7-regulator.c=1673=static int bd718xx_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd718x7-regulator.c-1770-\ndrivers/regulator/bd718x7-regulator.c:1771:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, desc, \u0026config);\ndrivers/regulator/bd718x7-regulator.c-1772-\t\tif (IS_ERR(rdev))\n--\ndrivers/regulator/bd9571mwv-regulator.c=273=static int bd9571mwv_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd9571mwv-regulator.c-299-\t\t\tcontinue;\ndrivers/regulator/bd9571mwv-regulator.c:300:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regulators[i],\ndrivers/regulator/bd9571mwv-regulator.c-301-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd9576-regulator.c=897=static int bd957x_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd9576-regulator.c-1035-\ndrivers/regulator/bd9576-regulator.c:1036:\t\tr-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, desc,\ndrivers/regulator/bd9576-regulator.c-1037-\t\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/bd96801-regulator.c=1210=static int bd96801_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bd96801-regulator.c-1267-\ndrivers/regulator/bd96801-regulator.c:1268:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/bd96801-regulator.c-1269-\t\t\t\t\t \u0026rdesc[i].desc, \u0026config);\n--\ndrivers/regulator/bq257xx-regulator.c=142=static int bq257xx_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/bq257xx-regulator.c-164-\ndrivers/regulator/bq257xx-regulator.c:165:\tpdata-\u003ebq257xx_reg = devm_regulator_register(dev, \u0026pdata-\u003edesc, \u0026cfg);\ndrivers/regulator/bq257xx-regulator.c-166-\tif (IS_ERR(pdata-\u003ebq257xx_reg)) {\n--\ndrivers/regulator/core.c=5987=static struct regulator_coupler generic_regulator_coupler = {\n--\ndrivers/regulator/core.c-5991-/**\ndrivers/regulator/core.c:5992: * regulator_register - register regulator\ndrivers/regulator/core.c-5993- * @dev: the device that drive the regulator\n--\ndrivers/regulator/core.c=6002=struct regulator_dev *\ndrivers/regulator/core.c:6003:regulator_register(struct device *dev,\ndrivers/regulator/core.c-6004-\t\t const struct regulator_desc *regulator_desc,\n--\ndrivers/regulator/core.c-6281-}\ndrivers/regulator/core.c:6282:EXPORT_SYMBOL_GPL(regulator_register);\ndrivers/regulator/core.c-6283-\n--\ndrivers/regulator/cpcap-regulator.c=602=static int cpcap_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/cpcap-regulator.c-642-\t\tconfig.driver_data = (void *)regulator;\ndrivers/regulator/cpcap-regulator.c:643:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/cpcap-regulator.c-644-\t\t\t\t\t \u0026regulator-\u003erdesc,\n--\ndrivers/regulator/cros-ec-regulator.c=157=static int cros_ec_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/cros-ec-regulator.c-196-\ndrivers/regulator/cros-ec-regulator.c:197:\tdrvdata-\u003edev = devm_regulator_register(dev, \u0026drvdata-\u003edesc, \u0026cfg);\ndrivers/regulator/cros-ec-regulator.c-198-\tif (IS_ERR(drvdata-\u003edev)) {\n--\ndrivers/regulator/da903x-regulator.c=430=static int da903x_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da903x-regulator.c-459-\ndrivers/regulator/da903x-regulator.c:460:\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026ri-\u003edesc, \u0026config);\ndrivers/regulator/da903x-regulator.c-461-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/da9052-regulator.c=393=static int da9052_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9052-regulator.c-422-\ndrivers/regulator/da9052-regulator.c:423:\tregulator-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/da9052-regulator.c-424-\t\t\t\t\t\t \u0026regulator-\u003einfo-\u003ereg_desc,\n--\ndrivers/regulator/da9055-regulator.c=508=static int da9055_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9055-regulator.c-538-\ndrivers/regulator/da9055-regulator.c:539:\tregulator-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev,\ndrivers/regulator/da9055-regulator.c-540-\t\t\t\t\t\t \u0026regulator-\u003einfo-\u003ereg_desc,\n--\ndrivers/regulator/da9062-regulator.c=920=static int da9062_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9062-regulator.c-1003-\ndrivers/regulator/da9062-regulator.c:1004:\t\tregl-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regl-\u003edesc,\ndrivers/regulator/da9062-regulator.c-1005-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/da9063-regulator.c=882=static int da9063_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/da9063-regulator.c-1032-\ndrivers/regulator/da9063-regulator.c:1033:\t\tregl-\u003erdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026regl-\u003edesc,\ndrivers/regulator/da9063-regulator.c-1034-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/da9121-regulator.c=776=static int da9121_set_regulator_config(struct da9121 *chip)\n--\ndrivers/regulator/da9121-regulator.c-790-\ndrivers/regulator/da9121-regulator.c:791:\t\tchip-\u003erdev[i] = devm_regulator_register(chip-\u003edev,\ndrivers/regulator/da9121-regulator.c-792-\t\t\t\t\tregl_desc, \u0026config);\n--\ndrivers/regulator/da9210-regulator.c=130=static int da9210_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/da9210-regulator.c-166-\ndrivers/regulator/da9210-regulator.c:167:\trdev = devm_regulator_register(\u0026i2c-\u003edev, \u0026da9210_reg, \u0026config);\ndrivers/regulator/da9210-regulator.c-168-\tif (IS_ERR(rdev)) {\n--\ndrivers/regulator/da9211-regulator.c=379=static int da9211_regulator_init(struct da9211 *chip)\n--\ndrivers/regulator/da9211-regulator.c-421-\t\t\tdevm_gpiod_unhinge(chip-\u003edev, config.ena_gpiod);\ndrivers/regulator/da9211-regulator.c:422:\t\tchip-\u003erdev[i] = devm_regulator_register(chip-\u003edev,\ndrivers/regulator/da9211-regulator.c-423-\t\t\t\u0026da9211_regulators[i], \u0026config);\n--\ndrivers/regulator/db8500-prcmu.c=437=static int db8500_regulator_probe(struct platform_device *pdev)\n--\ndrivers/regulator/db8500-prcmu.c-455-\ndrivers/regulator/db8500-prcmu.c:456:\t\trdev = devm_regulator_register(\u0026pdev-\u003edev, \u0026info-\u003edesc,\ndrivers/regulator/db8500-prcmu.c-457-\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/devres.c=449=static void devm_rdev_release(struct device *dev, void *res)\n--\ndrivers/regulator/devres.c-454-/**\ndrivers/regulator/devres.c:455: * devm_regulator_register - Resource managed regulator_register()\ndrivers/regulator/devres.c-456- * @dev: device to supply\n--\ndrivers/regulator/devres.c-464- */\ndrivers/regulator/devres.c:465:struct regulator_dev *devm_regulator_register(struct device *dev,\ndrivers/regulator/devres.c-466-\t\t\t\t const struct regulator_desc *regulator_desc,\n--\ndrivers/regulator/devres.c-475-\ndrivers/regulator/devres.c:476:\trdev = regulator_register(dev, regulator_desc, config);\ndrivers/regulator/devres.c-477-\tif (!IS_ERR(rdev)) {\n--\ndrivers/regulator/devres.c-485-}\ndrivers/regulator/devres.c:486:EXPORT_SYMBOL_GPL(devm_regulator_register);\ndrivers/regulator/devres.c-487-\n--\ndrivers/regulator/dummy.c=40=static int dummy_regulator_probe(struct faux_device *fdev)\n--\ndrivers/regulator/dummy.c-47-\ndrivers/regulator/dummy.c:48:\tdummy_regulator_rdev = devm_regulator_register(\u0026fdev-\u003edev, \u0026dummy_desc,\ndrivers/regulator/dummy.c-49-\t\t\t\t\t\t \u0026config);\n--\ndrivers/regulator/fan53555.c=608=static void fan53555_device_mode_map_setup(struct fan53555_device_info *di)\n--\ndrivers/regulator/fan53555.c-618-\ndrivers/regulator/fan53555.c:619:static int fan53555_regulator_register(struct fan53555_device_info *di,\ndrivers/regulator/fan53555.c-620-\t\t\tstruct regulator_config *config)\n--\ndrivers/regulator/fan53555.c-642-\ndrivers/regulator/fan53555.c:643:\trdev = devm_regulator_register(di-\u003edev, \u0026di-\u003edesc, config);\ndrivers/regulator/fan53555.c-644-\treturn PTR_ERR_OR_ZERO(rdev);\n--\ndrivers/regulator/fan53555.c=704=static int fan53555_regulator_probe(struct i2c_client *client)\n--\ndrivers/regulator/fan53555.c-776-\ndrivers/regulator/fan53555.c:777:\tret = fan53555_regulator_register(di, \u0026config);\ndrivers/regulator/fan53555.c-778-\tif (ret \u003c 0)\n--\ndrivers/regulator/fan53880.c=117=static int fan53880_i2c_probe(struct i2c_client *i2c)\n--\ndrivers/regulator/fan53880.c-145-\tfor (i = 0; i \u003c ARRAY_SIZE(fan53880_regulators); i++) {\ndrivers/regulator/fan53880.c:146:\t\trdev = devm_regulator_register(\u0026i2c-\u003edev,\ndrivers/regulator/fan53880.c-147-\t\t\t\t\t \u0026fan53880_regulators[i],\n--\ndrivers/regulator/fixed.c=218=static int reg_fixed_voltage_probe(struct platform_device *pdev)\n--\ndrivers/regulator/fixed.c-326-\ndrivers/regulator/fixed.c:327:\tdrvdata-\u003edev = devm_regulator_register(\u0026pdev-\u003edev, \u0026drvdata-\u003edesc,\ndrivers/regulator/fixed.c-328-\t\t\t\t\t \u0026cfg);\n--\ndrivers/regulator/fp9931.c=402=static int fp9931_probe(struct i2c_client *client)\n--\ndrivers/regulator/fp9931.c-478-\tfor (i = 0; i \u003c ARRAY_SIZE(regulators); i++) {\ndrivers/regulator/fp9931.c:479:\t\trdev = devm_regulator_register(\u0026client-\u003edev, \u0026regulators[i],\n\n"
} |
| 103/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 49469 output: 36 thoughts: 234 Thoughts: **Investigating I2C Device Instantiation** Okay, so I'm wondering if I can instantiate an I2C device using the `/sys/bus/i2c/devices/i2c-X/new_device` method. Let's dig into this a bit. I need to confirm this approach. Specifically, I'm considering a scenario where an I2C adapter already exists within QEMU, say the `i801_smbus` on a standard x86/amd64 machine like 'pc' or 'q35'. Now, if root were to run a command like `echo "fan53555 0x60" > /sys/bus/i2c/devices/i2c-0/new_device`, what happens? My hunch is that this should trigger a call to the `fan53555_regulator_probe()` function. Now, I need to understand what `fan53555` is actually doing in this context. A key question is whether or not `fan53555` uses the device model `r == rdev`. To clarify what it is doing, I need to investigate the source code of the driver. Furthermore, I'll need to identify what the supply names are. Let's dive into `fan53555.c` and clarify this. |
| 104/2 | 2026/09/19 15:13 | tool | grepper |
0mArgs:{
"Expression": "supply_name",
"PathPrefix": "drivers/regulator/fan53555.c"
}Results: {
"Output": "drivers/regulator/fan53555.c=619=static int fan53555_regulator_register(struct fan53555_device_info *di,\n--\ndrivers/regulator/fan53555.c-625-\trdesc-\u003ename = \"fan53555-reg\";\ndrivers/regulator/fan53555.c:626:\trdesc-\u003esupply_name = \"vin\";\ndrivers/regulator/fan53555.c-627-\trdesc-\u003eops = \u0026fan53555_regulator_ops;\n"
} |
| 105/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 50201 output: 31 thoughts: 148 Thoughts: **Investigating a Regulator Naming Discrepancy**
Okay, so I'm looking at this device, `fan53555-reg`, and I see its `supply_name` is set to "vin". That seems a bit odd; the device *name* itself is "fan53555-reg". My spidey-sense is tingling. Are we sure this is right? Specifically, I'm concerned that `rdev->desc->name` ("fan53555-reg") and the `supply_name` ("vin") are different.
The crux of my concern: Can *any* regulator driver legitimately have a `supply_name` that's distinct from its own name? That feels like it could be a setup for confusion. Something feels off about this relationship.
I need to dive deeper. I'm going to scan the codebase to identify every instance where the check `r == rdev` could potentially be true. I'll need to understand this logic better.
Hold on... before I get too deep into the code, I need to understand *why* this patch exists in the first place. What was the original intent? Was there a specific problem this was intended to solve? I need to consult the commit history. I'm going to track down the commit message, the author's notes, anything to shed light on the original rationale. Specifically, I'll search the git log for phrases like "resolved to itself," as that might indicate the intention of this patch. That might give me some context on why this seemingly strange naming convention was introduced. Then, I can make an informed judgement.
|
| 106/2 | 2026/09/19 15:13 | tool | grepper |
0mArgs:{
"Expression": "resolved to itself",
"PathPrefix": "drivers/regulator/core.c"
}Results: {
"Output": "drivers/regulator/core.c=2189=static int regulator_resolve_supply(struct regulator_dev *rdev)\n--\ndrivers/regulator/core.c-2239-\tif (r == rdev) {\ndrivers/regulator/core.c:2240:\t\tdev_err(dev, \"Supply for %s (%s) resolved to itself\\n\",\ndrivers/regulator/core.c-2241-\t\t\trdev-\u003edesc-\u003ename, rdev-\u003esupply_name);\n"
} |
| 107/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 50863 output: 45 thoughts: 579 Thoughts: **Investigating the "Supply Resolved to Itself" Error** Okay, let's break this down. My goal is to understand how this "Supply for X (Y) resolved to itself" error came about. First, I need to figure out the *origin* of that specific error message. I'd ideally use `git log -S` with the message itself, but I don't have the `git` tool here, so that's out. Instead, I'll switch gears: I'll try to find instances in the code where the `supply_name` matches the name of the regulator, or where the device tree might be configured in a way that creates a self-reference. That seems like the logical place to start. Wait, hold on! Before I go too far down that path, let's see what the previous execution history said. Ah, here we are! There's a previous patch inspection, specifically commit `a7612d0c3daf897f2489b21df887dd85e7486ca4` in `drivers/regulator/core.c`. This commit *introduced* the error message and added a `put_device()` call. Great, now I know the *when* and *where* of the error's introduction. The diff indicates that this was a defensive measure. And there's an example: `drivers/regulator/axp20x-regulator.c`. It defines a regulator, `axp22x_drivevbus_regulator`, where `.name` and `.supply_name` are both "drivevbus". Bingo! That's the exact scenario triggering the error. This is a static declaration. Now, I want to investigate how this is instantiated. I'll need to go look into `drivers/regulator/axp20x-regulator.c` itself. I need to see how the regulator is actually *used* to understand the context of the potential self-reference. I'm going to look for any special initialization or linking with other devices or subsystems in that file. That should give me a good picture of the problem. |
| 108/2 | 2026/09/19 15:13 | tool | grepper |
0mArgs:{
"Expression": "axp20x_regulator_probe",
"PathPrefix": "drivers/regulator/axp20x-regulator.c"
}Results: {
"Output": "drivers/regulator/axp20x-regulator.c=1488=static bool axp20x_is_polyphase_slave(struct axp20x_dev *axp20x, int id)\n--\ndrivers/regulator/axp20x-regulator.c-1552-\ndrivers/regulator/axp20x-regulator.c:1553:static int axp20x_regulator_probe(struct platform_device *pdev)\ndrivers/regulator/axp20x-regulator.c-1554-{\n--\ndrivers/regulator/axp20x-regulator.c=1746=static struct platform_driver axp20x_regulator_driver = {\ndrivers/regulator/axp20x-regulator.c:1747:\t.probe\t= axp20x_regulator_probe,\ndrivers/regulator/axp20x-regulator.c-1748-\t.driver\t= {\n"
} |
| 109/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 52219 output: 30 thoughts: 55 Thoughts: Here's my take on those thoughts: **Dissecting the AXP20X Regulator Driver** Okay, so `axp20x_regulator_driver`. Right, that's a `platform_driver`. Got it. Now, the key question is, *where* is the corresponding `platform_device` for the AXP20x regulator even being created? I need to find the code that registers that device so I can understand the whole initialization flow. Let's trace back and see which part of the system is responsible for bringing the AXP20x regulator platform device into existence. It looks like "axp20x-regulator" is the name to look for. Time to go hunting! |
| 110/2 | 2026/09/19 15:13 | tool | grepper |
0mArgs:{
"Expression": "axp20x-regulator",
"PathPrefix": "drivers/"
}Results: {
"Output": "drivers/mfd/axp20x.c=942=static const struct mfd_cell axp192_cells[] = {\n--\ndrivers/mfd/axp20x.c-959-\t},\ndrivers/mfd/axp20x.c:960:\t{\t.name\t\t= \"axp20x-regulator\" },\ndrivers/mfd/axp20x.c-961-};\n--\ndrivers/mfd/axp20x.c=963=static const struct mfd_cell axp20x_cells[] = {\n--\ndrivers/mfd/axp20x.c-971-\t}, {\ndrivers/mfd/axp20x.c:972:\t\t.name\t\t= \"axp20x-regulator\",\ndrivers/mfd/axp20x.c-973-\t}, {\n--\ndrivers/mfd/axp20x.c=992=static const struct mfd_cell axp221_cells[] = {\n--\ndrivers/mfd/axp20x.c-1000-\t}, {\ndrivers/mfd/axp20x.c:1001:\t\t.name\t\t= \"axp20x-regulator\",\ndrivers/mfd/axp20x.c-1002-\t}, {\n--\ndrivers/mfd/axp20x.c=1021=static const struct mfd_cell axp223_cells[] = {\n--\ndrivers/mfd/axp20x.c-1035-\t}, {\ndrivers/mfd/axp20x.c:1036:\t\t.name\t\t= \"axp20x-regulator\",\ndrivers/mfd/axp20x.c-1037-\t}, {\n--\ndrivers/mfd/axp20x.c=1058=static struct mfd_cell axp313a_cells[] = {\ndrivers/mfd/axp20x.c-1059-\t/* AXP323 is sometimes paired with AXP717 as sub-PMIC */\ndrivers/mfd/axp20x.c:1060:\tMFD_CELL_BASIC(\"axp20x-regulator\", NULL, NULL, 0, 1),\ndrivers/mfd/axp20x.c-1061-\tMFD_CELL_RES(\"axp313a-pek\", axp313a_pek_resources),\n--\ndrivers/mfd/axp20x.c=1064=static struct mfd_cell axp717_cells[] = {\ndrivers/mfd/axp20x.c:1065:\tMFD_CELL_NAME(\"axp20x-regulator\"),\ndrivers/mfd/axp20x.c-1066-\tMFD_CELL_RES(\"axp20x-pek\", axp717_pek_resources),\n--\ndrivers/mfd/axp20x.c=1138=static const struct mfd_cell axp803_cells[] = {\n--\ndrivers/mfd/axp20x.c-1162-\t},\ndrivers/mfd/axp20x.c:1163:\t{\t.name\t\t= \"axp20x-regulator\" },\ndrivers/mfd/axp20x.c-1164-};\n--\ndrivers/mfd/axp20x.c=1166=static const struct mfd_cell axp806_self_working_cells[] = {\n--\ndrivers/mfd/axp20x.c-1171-\t},\ndrivers/mfd/axp20x.c:1172:\t{\t.name\t\t= \"axp20x-regulator\" },\ndrivers/mfd/axp20x.c-1173-};\n--\ndrivers/mfd/axp20x.c=1175=static const struct mfd_cell axp806_cells[] = {\n--\ndrivers/mfd/axp20x.c-1177-\t\t.id\t\t= 2,\ndrivers/mfd/axp20x.c:1178:\t\t.name\t\t= \"axp20x-regulator\",\ndrivers/mfd/axp20x.c-1179-\t},\n--\ndrivers/mfd/axp20x.c=1182=static const struct mfd_cell axp809_cells[] = {\n--\ndrivers/mfd/axp20x.c-1191-\t\t.id\t\t= 1,\ndrivers/mfd/axp20x.c:1192:\t\t.name\t\t= \"axp20x-regulator\",\ndrivers/mfd/axp20x.c-1193-\t},\n--\ndrivers/mfd/axp20x.c=1196=static const struct mfd_cell axp813_cells[] = {\n--\ndrivers/mfd/axp20x.c-1201-\t}, {\ndrivers/mfd/axp20x.c:1202:\t\t.name\t\t= \"axp20x-regulator\",\ndrivers/mfd/axp20x.c-1203-\t}, {\n--\ndrivers/mfd/axp20x.c=1225=static const struct mfd_cell axp15060_cells[] = {\n--\ndrivers/mfd/axp20x.c-1230-\t}, {\ndrivers/mfd/axp20x.c:1231:\t\t.name\t\t= \"axp20x-regulator\",\ndrivers/mfd/axp20x.c-1232-\t},\n--\ndrivers/mfd/axp20x.c=1236=static const struct mfd_cell axp_regulator_only_cells[] = {\ndrivers/mfd/axp20x.c-1237-\t/* PMIC without IRQ line may be secondary PMIC */\ndrivers/mfd/axp20x.c:1238:\tMFD_CELL_BASIC(\"axp20x-regulator\", NULL, NULL, 0, 1),\ndrivers/mfd/axp20x.c-1239-};\n--\ndrivers/regulator/Makefile=33=obj-$(CONFIG_REGULATOR_AW37503) += aw37503-regulator.o\ndrivers/regulator/Makefile:34:obj-$(CONFIG_REGULATOR_AXP20X) += axp20x-regulator.o\ndrivers/regulator/Makefile-35-obj-$(CONFIG_REGULATOR_BCM590XX) += bcm590xx-regulator.o\n--\ndrivers/regulator/axp20x-regulator.c=1746=static struct platform_driver axp20x_regulator_driver = {\n--\ndrivers/regulator/axp20x-regulator.c-1748-\t.driver\t= {\ndrivers/regulator/axp20x-regulator.c:1749:\t\t.name\t\t= \"axp20x-regulator\",\ndrivers/regulator/axp20x-regulator.c-1750-\t\t.probe_type\t= PROBE_PREFER_ASYNCHRONOUS,\n--\ndrivers/regulator/axp20x-regulator.c=1758=MODULE_DESCRIPTION(\"Regulator Driver for AXP20X PMIC\");\ndrivers/regulator/axp20x-regulator.c:1759:MODULE_ALIAS(\"platform:axp20x-regulator\");\n"
} |
| 111/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 54426 output: 37 thoughts: 38 Thoughts: Here's my summary, as though I were thinking through the problem: **Probing the AXP20X Power Management IC** Okay, so I'm trying to figure out how the AXP20X is probed in the system. The logical next step is to examine the driver code. Since it's an I2C-connected device, I should be looking at the I2C driver implementation. Therefore, let's dive into `drivers/mfd/axp20x-i2c.c` to see how that probe is initiated and carried out. That should give me a solid understanding of the initialization sequence. |
| 112/2 | 2026/09/19 15:13 | tool | grepper |
0mError:no matches Args: {
"Expression": "module_i2c_driver",
"PathPrefix": "drivers/mfd/axp20x"
}Results: {
"error": "no matches"
} |
| 113/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 54652 output: 35 thoughts: 0 |
| 114/2 | 2026/09/19 15:13 | tool | grepper |
0mError:no matches Args: {
"Expression": "i2c_driver",
"PathPrefix": "drivers/mfd/axp20x"
}Results: {
"error": "no matches"
} |
| 115/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 54701 output: 34 thoughts: 0 |
| 116/2 | 2026/09/19 15:13 | tool | grepper |
0mArgs:{
"Expression": "axp20x_i2c",
"PathPrefix": "drivers/mfd/"
}Results: {
"Output": "drivers/mfd/axp20x-i2c.c-24-\ndrivers/mfd/axp20x-i2c.c:25:static int axp20x_i2c_probe(struct i2c_client *i2c)\ndrivers/mfd/axp20x-i2c.c-26-{\n--\ndrivers/mfd/axp20x-i2c.c-51-\ndrivers/mfd/axp20x-i2c.c:52:static void axp20x_i2c_remove(struct i2c_client *i2c)\ndrivers/mfd/axp20x-i2c.c-53-{\n--\ndrivers/mfd/axp20x-i2c.c-59-#ifdef CONFIG_OF\ndrivers/mfd/axp20x-i2c.c:60:static const struct of_device_id axp20x_i2c_of_match[] = {\ndrivers/mfd/axp20x-i2c.c-61-\t{ .compatible = \"x-powers,axp152\", .data = (void *)AXP152_ID },\n--\ndrivers/mfd/axp20x-i2c.c-74-};\ndrivers/mfd/axp20x-i2c.c:75:MODULE_DEVICE_TABLE(of, axp20x_i2c_of_match);\ndrivers/mfd/axp20x-i2c.c-76-#endif\ndrivers/mfd/axp20x-i2c.c-77-\ndrivers/mfd/axp20x-i2c.c:78:static const struct i2c_device_id axp20x_i2c_id[] = {\ndrivers/mfd/axp20x-i2c.c-79-\t{ \"axp152\" },\n--\ndrivers/mfd/axp20x-i2c.c-91-};\ndrivers/mfd/axp20x-i2c.c:92:MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id);\ndrivers/mfd/axp20x-i2c.c-93-\ndrivers/mfd/axp20x-i2c.c-94-#ifdef CONFIG_ACPI\ndrivers/mfd/axp20x-i2c.c:95:static const struct acpi_device_id axp20x_i2c_acpi_match[] = {\ndrivers/mfd/axp20x-i2c.c-96-\t{\n--\ndrivers/mfd/axp20x-i2c.c-101-};\ndrivers/mfd/axp20x-i2c.c:102:MODULE_DEVICE_TABLE(acpi, axp20x_i2c_acpi_match);\ndrivers/mfd/axp20x-i2c.c-103-#endif\ndrivers/mfd/axp20x-i2c.c-104-\ndrivers/mfd/axp20x-i2c.c:105:static struct i2c_driver axp20x_i2c_driver = {\ndrivers/mfd/axp20x-i2c.c-106-\t.driver = {\ndrivers/mfd/axp20x-i2c.c-107-\t\t.name\t= \"axp20x-i2c\",\ndrivers/mfd/axp20x-i2c.c:108:\t\t.of_match_table\t= of_match_ptr(axp20x_i2c_of_match),\ndrivers/mfd/axp20x-i2c.c:109:\t\t.acpi_match_table = ACPI_PTR(axp20x_i2c_acpi_match),\ndrivers/mfd/axp20x-i2c.c-110-\t},\ndrivers/mfd/axp20x-i2c.c:111:\t.probe\t\t= axp20x_i2c_probe,\ndrivers/mfd/axp20x-i2c.c:112:\t.remove\t\t= axp20x_i2c_remove,\ndrivers/mfd/axp20x-i2c.c:113:\t.id_table\t= axp20x_i2c_id,\ndrivers/mfd/axp20x-i2c.c-114-};\ndrivers/mfd/axp20x-i2c.c-115-\ndrivers/mfd/axp20x-i2c.c:116:module_i2c_driver(axp20x_i2c_driver);\ndrivers/mfd/axp20x-i2c.c-117-\n"
} |
| 117/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 55995 output: 43 thoughts: 249 Thoughts: **My Analysis of the AXP20X I2C Driver** Okay, so I'm looking at this `axp20x_i2c_probe` function. It's obviously an I2C driver, targeting a family of power management ICs – the AXP20X series. The key here is this `axp20x_i2c_id` table, which is essentially a device ID table. It lists the supported devices: AXP152, AXP202, all the way through AXP813 and the AXP15060. Standard stuff, clearly used for matching during the probe process. But wait a minute... I need to refresh my memory on what this specific `axp20x_i2c_probe` function actually *does*. I need to go look at line 25 in `drivers/mfd/axp20x-i2c.c` to remind myself of the core actions taking place during that probe, like device initialization and resource allocation, before I make any definitive conclusions about the broader integration. Let me go check that out. |
| 118/2 | 2026/09/19 15:13 | tool | read-file |
0mArgs:{
"File": "drivers/mfd/axp20x-i2c.c",
"FirstLine": 25,
"LineCount": 35
}Results: {
"Contents": " 25:\tstatic int axp20x_i2c_probe(struct i2c_client *i2c)\n 26:\t{\n 27:\t\tstruct axp20x_dev *axp20x;\n 28:\t\tint ret;\n 29:\t\n 30:\t\taxp20x = devm_kzalloc(\u0026i2c-\u003edev, sizeof(*axp20x), GFP_KERNEL);\n 31:\t\tif (!axp20x)\n 32:\t\t\treturn -ENOMEM;\n 33:\t\n 34:\t\taxp20x-\u003edev = \u0026i2c-\u003edev;\n 35:\t\taxp20x-\u003eirq = i2c-\u003eirq;\n 36:\t\tdev_set_drvdata(axp20x-\u003edev, axp20x);\n 37:\t\n 38:\t\tret = axp20x_match_device(axp20x);\n 39:\t\tif (ret)\n 40:\t\t\treturn ret;\n 41:\t\n 42:\t\taxp20x-\u003eregmap = devm_regmap_init_i2c(i2c, axp20x-\u003eregmap_cfg);\n 43:\t\tif (IS_ERR(axp20x-\u003eregmap)) {\n 44:\t\t\tret = PTR_ERR(axp20x-\u003eregmap);\n 45:\t\t\tdev_err(\u0026i2c-\u003edev, \"regmap init failed: %d\\n\", ret);\n 46:\t\t\treturn ret;\n 47:\t\t}\n 48:\t\n 49:\t\treturn axp20x_device_probe(axp20x);\n 50:\t}\n 51:\t\n 52:\tstatic void axp20x_i2c_remove(struct i2c_client *i2c)\n 53:\t{\n 54:\t\tstruct axp20x_dev *axp20x = i2c_get_clientdata(i2c);\n 55:\t\n 56:\t\taxp20x_device_remove(axp20x);\n 57:\t}\n 58:\t\n 59:\t#ifdef CONFIG_OF\n"
} |
| 119/2 | 2026/09/19 15:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 57109 output: 41 thoughts: 83 Thoughts: Here's my thought process, as an expert in embedded systems: **Diving into the AXP20X Driver** Okay, so I'm looking at this AXP20X driver code and the first thing that jumps out is that `axp20x->regmap = devm_regmap_init_i2c(i2c, axp20x->regmap_cfg);` line. I immediately recognize this as the initialization of the register map using the I2C interface. I see the `devm_` prefix, so this is handled by the device managed resources. That's good; we're using the standard, safe way to allocate the register map. I'll need to understand how the register map is configured, of course, but at first glance, this is a clean initialization. Now, I need to understand what happens during the device probe. So, what exactly is `axp20x_device_probe(axp20x)` doing? Time to dig into the driver itself. Let's head over to `drivers/mfd/axp20x.c` and see what's going on within that function. I want to see how the register map is being used, what the initial configuration is, and if any child devices are being registered. Essentially, I'm trying to get a complete picture of how this AXP20X is being integrated into the system. Let's see how things are set up. |
| 120/2 | 2026/09/19 15:14 | tool | grepper |
0mArgs:{
"Expression": "axp20x_device_probe",
"PathPrefix": "drivers/mfd/axp20x.c"
}Results: {
"Output": "drivers/mfd/axp20x.c=1403=EXPORT_SYMBOL(axp20x_match_device);\ndrivers/mfd/axp20x.c-1404-\ndrivers/mfd/axp20x.c:1405:int axp20x_device_probe(struct axp20x_dev *axp20x)\ndrivers/mfd/axp20x.c-1406-{\n--\ndrivers/mfd/axp20x.c-1467-}\ndrivers/mfd/axp20x.c:1468:EXPORT_SYMBOL(axp20x_device_probe);\ndrivers/mfd/axp20x.c-1469-\n"
} |
| 121/2 | 2026/09/19 15:14 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 57753 output: 41 thoughts: 30 Thoughts: Here's my analysis of the provided text, rendered in the first person, assuming I'm an expert in the field: **Diving into the AXP20X Driver - A Closer Look at Line 1405-1460** Okay, let's pull up `drivers/mfd/axp20x.c` and zero in on lines 1405 through 1460. Immediately, I expect this section to be handling a specific power management feature or peripheral within the AXP20x chip, likely related to voltage regulation, power sequencing, or maybe even something less common. Given the length, it could be a complete function implementation or a significant chunk of a larger one. My gut tells me this will be some form of initialization or control path – definitely not a trivial section. I am interested to see what registers are being accessed and how these registers are programmed. This should be an interesting chunk of code. I wonder if it has the documentation that I would expect for such a chunk, such as what this is used for, what power states need to be accounted for, and any dependencies. I'm keen to dissect the conditional statements. Let's see if this code is designed to support the specific hardware configuration and platform that I am building. This is likely where the devil, or a well-hidden bug, lies. Let's dig in. |
| 122/2 | 2026/09/19 15:14 | tool | read-file |
0mArgs:{
"File": "drivers/mfd/axp20x.c",
"FirstLine": 1405,
"LineCount": 60
}Results: {
"Contents": "1405:\tint axp20x_device_probe(struct axp20x_dev *axp20x)\n1406:\t{\n1407:\t\tint ret;\n1408:\t\n1409:\t\t/*\n1410:\t\t * The AXP806 supports either master/standalone or slave mode.\n1411:\t\t * Slave mode allows sharing the serial bus, even with multiple\n1412:\t\t * AXP806 which all have the same hardware address.\n1413:\t\t *\n1414:\t\t * This is done with extra \"serial interface address extension\",\n1415:\t\t * or AXP806_BUS_ADDR_EXT, and \"register address extension\", or\n1416:\t\t * AXP806_REG_ADDR_EXT, registers. The former is read-only, with\n1417:\t\t * 1 bit customizable at the factory, and 1 bit depending on the\n1418:\t\t * state of an external pin. The latter is writable. The device\n1419:\t\t * will only respond to operations to its other registers when\n1420:\t\t * the these device addressing bits (in the upper 4 bits of the\n1421:\t\t * registers) match.\n1422:\t\t *\n1423:\t\t * By default we support an AXP806 chained to an AXP809 in slave\n1424:\t\t * mode. Boards which use an AXP806 in master mode can set the\n1425:\t\t * property \"x-powers,master-mode\" to override the default.\n1426:\t\t */\n1427:\t\tif (axp20x-\u003evariant == AXP806_ID) {\n1428:\t\t\tif (of_property_read_bool(axp20x-\u003edev-\u003eof_node,\n1429:\t\t\t\t\t\t \"x-powers,master-mode\") ||\n1430:\t\t\t of_property_read_bool(axp20x-\u003edev-\u003eof_node,\n1431:\t\t\t\t\t\t \"x-powers,self-working-mode\"))\n1432:\t\t\t\tregmap_write(axp20x-\u003eregmap, AXP806_REG_ADDR_EXT,\n1433:\t\t\t\t\t AXP806_REG_ADDR_EXT_ADDR_MASTER_MODE);\n1434:\t\t\telse\n1435:\t\t\t\tregmap_write(axp20x-\u003eregmap, AXP806_REG_ADDR_EXT,\n1436:\t\t\t\t\t AXP806_REG_ADDR_EXT_ADDR_SLAVE_MODE);\n1437:\t\t}\n1438:\t\n1439:\t\t/* Only if there is an interrupt line connected towards the CPU. */\n1440:\t\tif (axp20x-\u003eirq \u003e 0) {\n1441:\t\t\tret = regmap_add_irq_chip(axp20x-\u003eregmap, axp20x-\u003eirq,\n1442:\t\t\t\t\tIRQF_ONESHOT | IRQF_SHARED | axp20x-\u003eirq_flags,\n1443:\t\t\t\t\t-1, axp20x-\u003eregmap_irq_chip,\n1444:\t\t\t\t\t\u0026axp20x-\u003eregmap_irqc);\n1445:\t\t\tif (ret) {\n1446:\t\t\t\tdev_err(axp20x-\u003edev, \"failed to add irq chip: %d\\n\",\n1447:\t\t\t\t\tret);\n1448:\t\t\t\treturn ret;\n1449:\t\t\t}\n1450:\t\t}\n1451:\t\n1452:\t\tret = mfd_add_devices(axp20x-\u003edev, PLATFORM_DEVID_NONE, axp20x-\u003ecells,\n1453:\t\t\t\t axp20x-\u003enr_cells, NULL, 0, NULL);\n1454:\t\n1455:\t\tif (ret) {\n1456:\t\t\tdev_err(axp20x-\u003edev, \"failed to add MFD devices: %d\\n\", ret);\n1457:\t\t\tregmap_del_irq_chip(axp20x-\u003eirq, axp20x-\u003eregmap_irqc);\n1458:\t\t\treturn ret;\n1459:\t\t}\n1460:\t\n1461:\t\tif (axp20x-\u003evariant != AXP288_ID)\n1462:\t\t\tdevm_register_power_off_handler(axp20x-\u003edev, axp20x_power_off, axp20x);\n1463:\t\n1464:\t\tdev_info(axp20x-\u003edev, \"AXP20X driver loaded\\n\");\n"
} |
| 123/2 | 2026/09/19 15:14 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 59320 output: 41 thoughts: 120 Thoughts: **My I2C Device Investigation** Okay, hold on a minute. I'm building out this I2C device instantiation using `new_device`, but I need to make sure I understand the fundamentals. If there's no physical hardware connected to the bus during initialization, will the subsequent I2C read and write operations even *function*? I know that if I send a read or write command and the device isn't responding with an ACK, it will error out with -ENXIO or -EIO. So, it won't work. I need to be sure the device is physically connected before I start the program. Now, does `axp20x_i2c_probe` actually *perform* I2C read/write actions? Or does it just set up the basic parameters to do that? I need to know when I can expect the I2C transactions to actually happen. Alright, let's take a look at `axp20x_match_device`. I need to understand what that particular function is doing in relation to the I2C setup, it probably plays a crucial role! |
| 124/2 | 2026/09/19 15:14 | tool | grepper |
0mArgs:{
"Expression": "axp20x_match_device",
"PathPrefix": "drivers/mfd/axp20x.c"
}Results: {
"Output": "drivers/mfd/axp20x.c=1241=static int axp20x_power_off(struct sys_off_data *data)\n--\ndrivers/mfd/axp20x.c-1263-\ndrivers/mfd/axp20x.c:1264:int axp20x_match_device(struct axp20x_dev *axp20x)\ndrivers/mfd/axp20x.c-1265-{\n--\ndrivers/mfd/axp20x.c-1402-}\ndrivers/mfd/axp20x.c:1403:EXPORT_SYMBOL(axp20x_match_device);\ndrivers/mfd/axp20x.c-1404-\n"
} |
| 125/2 | 2026/09/19 15:14 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 59931 output: 41 thoughts: 23 Thoughts: Here's a summary of my thinking, expressed in the first person: **Analyzing the Device Matching Routine** Okay, let's dive into this code. I need to understand how the `axp20x` driver identifies and matches specific devices. The place to start is likely the device matching process, so I'll zero in on the `axp20x_match_device` function. I remember seeing a reference to that around line 1264 – time to pull that section up and see what the logic flow looks like. This function is likely where the driver determines if a detected device is actually an AXP20x variant it can support, and I need to figure out what criteria it's using for that determination. Let's get to it. |
| 126/2 | 2026/09/19 15:14 | tool | read-file |
0mArgs:{
"File": "drivers/mfd/axp20x.c",
"FirstLine": 1264,
"LineCount": 40
}Results: {
"Contents": "1264:\tint axp20x_match_device(struct axp20x_dev *axp20x)\n1265:\t{\n1266:\t\tstruct device *dev = axp20x-\u003edev;\n1267:\t\tconst struct mfd_cell *cells_no_irq = NULL;\n1268:\t\tint nr_cells_no_irq = 0;\n1269:\t\n1270:\t\taxp20x-\u003evariant = (long)device_get_match_data(dev);\n1271:\t\tswitch (axp20x-\u003evariant) {\n1272:\t\tcase AXP152_ID:\n1273:\t\t\taxp20x-\u003enr_cells = ARRAY_SIZE(axp152_cells);\n1274:\t\t\taxp20x-\u003ecells = axp152_cells;\n1275:\t\t\taxp20x-\u003eregmap_cfg = \u0026axp152_regmap_config;\n1276:\t\t\taxp20x-\u003eregmap_irq_chip = \u0026axp152_regmap_irq_chip;\n1277:\t\t\tbreak;\n1278:\t\tcase AXP192_ID:\n1279:\t\t\taxp20x-\u003enr_cells = ARRAY_SIZE(axp192_cells);\n1280:\t\t\taxp20x-\u003ecells = axp192_cells;\n1281:\t\t\taxp20x-\u003eregmap_cfg = \u0026axp192_regmap_config;\n1282:\t\t\taxp20x-\u003eregmap_irq_chip = \u0026axp192_regmap_irq_chip;\n1283:\t\t\tbreak;\n1284:\t\tcase AXP202_ID:\n1285:\t\tcase AXP209_ID:\n1286:\t\t\taxp20x-\u003enr_cells = ARRAY_SIZE(axp20x_cells);\n1287:\t\t\taxp20x-\u003ecells = axp20x_cells;\n1288:\t\t\taxp20x-\u003eregmap_cfg = \u0026axp20x_regmap_config;\n1289:\t\t\taxp20x-\u003eregmap_irq_chip = \u0026axp20x_regmap_irq_chip;\n1290:\t\t\tbreak;\n1291:\t\tcase AXP221_ID:\n1292:\t\t\taxp20x-\u003enr_cells = ARRAY_SIZE(axp221_cells);\n1293:\t\t\taxp20x-\u003ecells = axp221_cells;\n1294:\t\t\taxp20x-\u003eregmap_cfg = \u0026axp22x_regmap_config;\n1295:\t\t\taxp20x-\u003eregmap_irq_chip = \u0026axp22x_regmap_irq_chip;\n1296:\t\t\tbreak;\n1297:\t\tcase AXP223_ID:\n1298:\t\t\taxp20x-\u003enr_cells = ARRAY_SIZE(axp223_cells);\n1299:\t\t\taxp20x-\u003ecells = axp223_cells;\n1300:\t\t\taxp20x-\u003eregmap_cfg = \u0026axp22x_regmap_config;\n1301:\t\t\taxp20x-\u003eregmap_irq_chip = \u0026axp22x_regmap_irq_chip;\n1302:\t\t\tbreak;\n1303:\t\tcase AXP288_ID:\n"
} |
| 127/2 | 2026/09/19 15:14 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 61077 output: 44 thoughts: 419 Thoughts: **My Line of Reasoning Through the AXP20X I2C Driver**
Okay, hold on a second! Looking at the `axp20x_i2c_probe` function... it seems there's a specific path taken if the device is created through sysfs, like using that `echo` command. In that scenario, `device_get_match_data(&i2c->dev)` is used to retrieve data about the device.
Now, with I2C devices probed using `i2c_device_id`, that function *should* use `i2c_match_id(axp20x_i2c_id, client)->driver_data`. But wait… looking at the `axp20x-i2c.c` file, the `axp20x_i2c_id` array has these entries: `{ "axp221", 0 },` ... The `driver_data` field here is always zero! That's a problem.
Hold up again. I'm remembering that `i2c_match_id` doesn't automatically return `driver_data` from the `i2c_device_id` array unless the I2C core or something using an ACPI or OF is involved. I should go back and investigate `device_get_match_data` a bit more carefully.
Let's see… I know that for I2C, `device_get_match_data` calls `i2c_get_match_data`. That function first checks for ACPI or OF match data and *then* tries `i2c_client_get_device_id()`.
Okay, back to `axp20x_i2c_id`... I see: `{ "axp152" },` also evaluates to 0! So the variant will also be zero for this case.
But, a more important question is whether the `axp20x-regulator` driver can actually probe without a Device Tree (DT) or regmap. That's crucial. I need to understand how the regulator probe works independently of this I2C probing path.
Let's go look at the `axp20x-regulator.c` probe function directly. Time to read `axp20x_regulator_probe`!
|
| 128/2 | 2026/09/19 15:14 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/axp20x-regulator.c",
"FirstLine": 1550,
"LineCount": 55
}Results: {
"Contents": "1550:\t\treturn false;\n1551:\t}\n1552:\t\n1553:\tstatic int axp20x_regulator_probe(struct platform_device *pdev)\n1554:\t{\n1555:\t\tstruct regulator_dev *rdev;\n1556:\t\tstruct axp20x_dev *axp20x = dev_get_drvdata(pdev-\u003edev.parent);\n1557:\t\tconst struct regulator_desc *regulators;\n1558:\t\tstruct regulator_config config = {\n1559:\t\t\t.dev = pdev-\u003edev.parent,\n1560:\t\t\t.regmap = axp20x-\u003eregmap,\n1561:\t\t\t.driver_data = axp20x,\n1562:\t\t};\n1563:\t\tint ret, i, nregulators;\n1564:\t\tu32 workmode;\n1565:\t\tconst char *dcdc1_name = axp22x_regulators[AXP22X_DCDC1].name;\n1566:\t\tconst char *dcdc5_name = axp22x_regulators[AXP22X_DCDC5].name;\n1567:\t\tconst char *aldo1_name = axp15060_regulators[AXP15060_ALDO1].name;\n1568:\t\tbool drivevbus = false;\n1569:\t\n1570:\t\tswitch (axp20x-\u003evariant) {\n1571:\t\tcase AXP202_ID:\n1572:\t\tcase AXP209_ID:\n1573:\t\t\tregulators = axp20x_regulators;\n1574:\t\t\tnregulators = AXP20X_REG_ID_MAX;\n1575:\t\t\tbreak;\n1576:\t\tcase AXP221_ID:\n1577:\t\tcase AXP223_ID:\n1578:\t\t\tregulators = axp22x_regulators;\n1579:\t\t\tnregulators = AXP22X_REG_ID_MAX;\n1580:\t\t\tdrivevbus = of_property_read_bool(pdev-\u003edev.parent-\u003eof_node,\n1581:\t\t\t\t\t\t\t \"x-powers,drive-vbus-en\");\n1582:\t\t\tbreak;\n1583:\t\tcase AXP313A_ID:\n1584:\t\tcase AXP323_ID:\n1585:\t\t\tregulators = axp313a_regulators;\n1586:\t\t\tnregulators = AXP313A_REG_ID_MAX;\n1587:\t\t\tbreak;\n1588:\t\tcase AXP717_ID:\n1589:\t\t\tregulators = axp717_regulators;\n1590:\t\t\tnregulators = AXP717_REG_ID_MAX;\n1591:\t\t\tbreak;\n1592:\t\tcase AXP803_ID:\n1593:\t\t\tregulators = axp803_regulators;\n1594:\t\t\tnregulators = AXP803_REG_ID_MAX;\n1595:\t\t\tdrivevbus = of_property_read_bool(pdev-\u003edev.parent-\u003eof_node,\n1596:\t\t\t\t\t\t\t \"x-powers,drive-vbus-en\");\n1597:\t\t\tbreak;\n1598:\t\tcase AXP806_ID:\n1599:\t\t\tregulators = axp806_regulators;\n1600:\t\t\tnregulators = AXP806_REG_ID_MAX;\n1601:\t\t\tbreak;\n1602:\t\tcase AXP809_ID:\n1603:\t\t\tregulators = axp809_regulators;\n1604:\t\t\tnregulators = AXP809_REG_ID_MAX;\n"
} |
| 129/2 | 2026/09/19 15:14 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 63063 output: 27 thoughts: 735 Thoughts: **Analyzing Regulator Self-Resolution** Okay, let's break this down. First, I'm focusing on lines 1580-1581 and 1731-1736 in the code. I see that the `drivevbus` regulator's enabling relies on the "x-powers,drive-vbus-en" property existing in the Device Tree node. But wait, this is x86_64 QEMU! Standard QEMU x86 systems *don't* use Device Tree (`CONFIG_OF`). They use ACPI, not the ARM/RISC-V Device Tree that includes things like AXP221 PMIC nodes. So, the `drivevbus` condition is essentially never true in this scenario. That got me thinking: why would a regulator's supply resolve to itself in the first place? Let's trace it through `regulator_resolve_supply()` in `core.c`, specifically lines 2200-2230. * **Case 1: Device Tree (DT) Usage:** If we *were* using DT, a regulator node could have something like `<supply_name>-supply = <&phandle>;`. If there's a bug in the DT and the supply is incorrectly set to itself, say `drivevbus-supply = <&drivevbus>;`, then `regulator_dt_lookup` would return the regulator node itself, leading to `r == rdev`. Bingo. * **Case 2: Non-DT:** Outside of DT, `regulator_dev_lookup(dev, rdev->supply_name)` and `regulator_lookup_by_name(supply)` are used. If a regulator is registered with its `.name` equal to its `.supply_name`, then `regulator_lookup_by_name(rdev->supply_name)` will, of course, find itself! This is precisely what's happening when there's a misconfiguration where the regulator's name and supply name are the same. It logs the very informative: *"Supply for %s (%s) resolved to itself"* and then releases the device. Now, a key question arises: can any of this regulator registration happen via syzkaller on an amd64 QEMU system? I need to check the syzkaller descriptions for anything related to regulators, virtual regulators, or anything similar. I'll need to see if there are pseudo-syscalls or actual syscalls that interact with regulators. I should check the kernel documentation and sysfs/ioctl/netlink interfaces for regulators. And hey, I should check `drivers/regulator/regnl.h`, and find out what that is about, and search for `regnl` using grep. |
| 130/2 | 2026/09/19 15:14 | tool | grepper |
0mArgs:{
"Expression": "regnl",
"PathPrefix": "drivers/regulator/"
}Results: {
"Output": "drivers/regulator/core.c-36-#include \"internal.h\"\ndrivers/regulator/core.c:37:#include \"regnl.h\"\ndrivers/regulator/core.c-38-\n--\ndrivers/regulator/event.c-12-\ndrivers/regulator/event.c:13:#include \"regnl.h\"\ndrivers/regulator/event.c-14-\n"
} |
| 131/2 | 2026/09/19 15:14 | llm | patch-evaluator-compressor |
0mModel:gemini-3.8-flash Args: null Results: null Reply: ### 1. Approaches Tried and Their Results
- **Patch Inspection**:
- Examined commit `a7612d0c3daf897f2489b21df887dd85e7486ca4` in `drivers/regulator/core.c`:
```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 6a4008f387b5e..812e1d61d4019 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2239,6 +2239,7 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
if (r == rdev) {
dev_err(dev, "Supply for %s (%s) resolved to itself\n",
rdev->desc->name, rdev->supply_name);
+ put_device(&rdev->dev);
if (!have_full_constraints()) {
ret = -EINVAL;
goto out;
```
- Analyzed bug mechanism:
- In `regulator_resolve_supply(rdev)`, `r = regulator_dt_lookup(&rdev->dev, rdev->supply_name)` and/or `r = regulator_dev_lookup(dev, rdev->supply_name)` is called.
- Inside `regulator_dev_lookup`, `regulator_lookup_by_name(supply)` calls `class_find_device(®ulator_class, NULL, name, regulator_match)`.
- `class_find_device()` takes a device reference (`get_device`).
- If `r == rdev` (the regulator's supply name matches its own name or maps back to itself), a reference on `rdev->dev` was held by `class_find_device()` but never released.
- The patch adds `put_device(&rdev->dev)` before exiting/reassigning dummy regulator.
- **Investigation of Self-Reference (`r == rdev`) Origin**:
- Investigated how `r == rdev` occurs in practice:
- Condition requires `rdev->supply_name` to be non-NULL and either:
1. A Device Tree phandle cycle where a regulator node's `<supply-name>-supply = <&self>` points to itself.
2. Driver static definition where `.name == .supply_name`.
- Example found: `drivers/regulator/axp20x-regulator.c` line 714:
```c
static const struct regulator_desc axp22x_drivevbus_regulator = {
.name = "drivevbus",
.supply_name = "drivevbus",
.of_match = of_match_ptr("drivevbus"),
...
};
```
- Probed via `axp20x_regulator_probe()` (`platform_device`).
- **Investigation of Virtual / Userspace / Emulated Reachability on `amd64`**:
- **Device Tree on x86/amd64**:
- Checked `arch/x86/Kconfig`: `OF` is only selected by `X86_INTEL_CE` (legacy 32-bit CE4100) and `OLPC` (legacy 32-bit XO-1.5).
- Standard `amd64` (x86_64) virtual machines (QEMU/GCE) use ACPI, not Open Firmware / Device Tree.
- Checked `CONFIGFS` support in `drivers/of/`: `OF_CONFIGFS` does not exist in mainline. Userspace cannot inject Device Tree nodes/overlays to create dynamic regulator nodes on standard amd64 setups.
- **Virtual / Faux / Userspace Drivers**:
- `drivers/regulator/dummy.c`: Only registers static `regulator-dummy` via `regulator_dummy_init()`. It has no `.supply_name` (`supply_name == NULL`), so `regulator_resolve_supply()` exits at line 2199 before any resolution or self-check.
- `drivers/regulator/userspace-consumer.c` and `drivers/regulator/virtual.c`: Only act as regulator consumers (`regulator_get`, `regulator_enable`, `regulator_set_voltage`). They do not register regulators or define supplies.
- `drivers/regulator/vctrl-regulator.c`: Platform driver requiring DT bindings (`vctrl_of_match`).
- **Driver Registration Landscape**:
- Searched all calls to `regulator_register` / `devm_regulator_register`:
- Used across PMIC/MFD drivers (AXP20x, DA9063, BD718x7, PMBus, TPS65xxx, etc.), SoC PHYs, board-specific power supplies.
- None are exposed via virtual hotplug buses (virtio, USB gadget, netdev, tun/tap).
- Self-referencing drivers (e.g. `axp22x_drivevbus_regulator`) are platform devices probed from MFDs instantiated via board DT or I2C on specific embedded hardware.
- None of the standard QEMU amd64 virtual hardware components register a regulator with self-referencing supplies.
### 2. Current Hypotheses and Theories
- **Hypothesis: Structurally Unreachable on Target Architecture (`amd64`)**:
- The patch modifies an error handling branch (`if (r == rdev)`) executed solely when a regulator's supply resolves to itself.
- This condition is strictly an invalid board/hardware configuration error occurring at regulator registration/probe time on specific embedded PMICs/SoCs (or broken Device Tree tables).
- On standard `amd64` QEMU/GCE syzkaller fuzzing environments:
- Device Tree is disabled (`CONFIG_OF` is false on amd64).
- No virtualized/emulated hardware registers a self-supplying regulator.
- No userspace interface or virtual bus (USB gadget, netlink, syscalls) can dynamically register a regulator device or trigger `r == rdev`.
- According to Core Triage Philosophy Section 2 (Unreachable hardware / execution paths on target architecture), this code is structurally unreachable for fuzzing.
- **Triage Result**: `WorthFuzzing=false`.
### 3. Critical File Paths and Code Snippets
- `drivers/regulator/core.c`:
```c
static int regulator_resolve_supply(struct regulator_dev *rdev)
{
...
if (r == rdev) {
dev_err(dev, "Supply for %s (%s) resolved to itself\n",
rdev->desc->name, rdev->supply_name);
put_device(&rdev->dev);
if (!have_full_constraints()) {
ret = -EINVAL;
goto out;
}
r = dummy_regulator_rdev;
if (!r) {
ret = -EPROBE_DEFER;
goto out;
}
get_device(&r->dev);
}
...
}
```
- `drivers/regulator/dummy.c`:
```c
static const struct regulator_desc dummy_desc = {
.name = "regulator-dummy",
.id = -1,
.type = REGULATOR_VOLTAGE,
.owner = THIS_MODULE,
.ops = &dummy_ops,
};
```
### 4. Reasoning Watchpoints and Next Actions
- Avoid redundant greps across `drivers/` for generic driver registration functions (`devm_regulator_register` returns >1600 lines).
- Virtual consumers and fake devices have already been checked (`dummy.c`, `virtual.c`, `userspace-consumer.c`). None register self-supplying regulators.
- Ready to execute `set-results` with `WorthFuzzing=false` and output the final assessment.Tokens: input: 53331 output: 1900 thoughts: 0 |
| 132/2 | 2026/09/19 15:14 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 17130 output: 34 thoughts: 0 |
| 133/2 | 2026/09/19 15:14 | tool | read-file |
0mArgs:{
"File": "drivers/regulator/event.c",
"FirstLine": 1,
"LineCount": 50
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0\n 2:\t/*\n 3:\t * Regulator event over netlink\n 4:\t *\n 5:\t * Author: Naresh Solanki \u003cNaresh.Solanki@9elements.com\u003e\n 6:\t */\n 7:\t\n 8:\t#include \u003cregulator/regulator.h\u003e\n 9:\t#include \u003cnet/netlink.h\u003e\n 10:\t#include \u003cnet/genetlink.h\u003e\n 11:\t#include \u003clinux/atomic.h\u003e\n 12:\t\n 13:\t#include \"regnl.h\"\n 14:\t\n 15:\tstatic atomic_t reg_event_seqnum = ATOMIC_INIT(0);\n 16:\t\n 17:\tstatic const struct genl_multicast_group reg_event_mcgrps[] = {\n 18:\t\t{ .name = REG_GENL_MCAST_GROUP_NAME, },\n 19:\t};\n 20:\t\n 21:\tstatic struct genl_family reg_event_genl_family __ro_after_init = {\n 22:\t\t.module = THIS_MODULE,\n 23:\t\t.name = REG_GENL_FAMILY_NAME,\n 24:\t\t.version = REG_GENL_VERSION,\n 25:\t\t.maxattr = REG_GENL_ATTR_MAX,\n 26:\t\t.mcgrps = reg_event_mcgrps,\n 27:\t\t.n_mcgrps = ARRAY_SIZE(reg_event_mcgrps),\n 28:\t};\n 29:\t\n 30:\tint reg_generate_netlink_event(const char *reg_name, u64 event)\n 31:\t{\n 32:\t\tstruct sk_buff *skb;\n 33:\t\tstruct nlattr *attr;\n 34:\t\tstruct reg_genl_event *edata;\n 35:\t\tvoid *msg_header;\n 36:\t\tint size;\n 37:\t\n 38:\t\t/* allocate memory */\n 39:\t\tsize = nla_total_size(sizeof(struct reg_genl_event)) +\n 40:\t\t nla_total_size(0);\n 41:\t\n 42:\t\tskb = genlmsg_new(size, GFP_ATOMIC);\n 43:\t\tif (!skb)\n 44:\t\t\treturn -ENOMEM;\n 45:\t\n 46:\t\t/* add the genetlink message header */\n 47:\t\tmsg_header = genlmsg_put(skb, 0, atomic_inc_return(\u0026reg_event_seqnum),\n 48:\t\t\t\t\t \u0026reg_event_genl_family, 0, REG_GENL_CMD_EVENT);\n 49:\t\tif (!msg_header) {\n 50:\t\t\tnlmsg_free(skb);\n"
} |
| 134/2 | 2026/09/19 15:14 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 17902 output: 173 thoughts: 670 Thoughts: **My Assessment of the Patch** Okay, everything lines up with my initial analysis. Let me just quickly re-examine those questions to make sure I'm solid. First, *what does the patch do*? It addresses a reference counting issue in `drivers/regulator/core.c`, specifically within `regulator_resolve_supply()`. It seems that when a regulator's supply resolves to *itself* (i.e., `r == rdev`), a reference to `rdev->dev` was incremented but *never* decremented. The patch simply fixes this by dropping that reference with `put_device(&rdev->dev)`. Pretty straightforward. Next, *is this scenario reachable in fuzzing on amd64*? Now, this is where it gets interesting. I've broken down how `r == rdev` can occur, and it boils down to a regulator's supply resolving to itself. This can really only happen in a couple of ways: * **Cyclic Device Tree (DT) phandles:** This scenario is not applicable because `CONFIG_OF` isn't used on amd64. It’s more of a legacy x86 thing (like the OLPC or CE4100), and userspace can't instantiate DT nodes in standard amd64 VMs. * **Static descriptor definition with a matching name and supply name:** This might look like something like `axp22x_drivevbus_regulator`, which also requires a hardware setup. This requires an embedded ARM/RISC-V PMIC on I2C/SPI and needs Device Tree to probe or enable `drivevbus`. My key point: Standard amd64 virtual machines (QEMU/GCE) simply *don't* have hardware or platform devices with self-referencing regulators. There are no virtual interfaces for userspace to dynamically register regulators with arbitrary supplies. So, bottom line, this modified code path (`if (r == rdev)`) is structurally unreachable in standard virtualized amd64 fuzzing environments. Finally, *negative criteria check*. This patch falls squarely into "Structurally unreachable hardware" – it needs vendor-specific hardware. It's basically the same argument as before: this error path hinges on embedded hardware or device-tree-based platforms with circular regulator definitions. And we can't build that on amd64 in QEMU/GCE. Therefore, this patch is a definite WorthFuzzing=false. Let's call `set-results` and be concise with my reasoning. |
| 135/2 | 2026/09/19 15:14 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch fixes a device reference leak (adding put_device(\u0026rdev-\u003edev)) in regulator_resolve_supply() when a regulator's supply resolves to itself (r == rdev). This condition occurs strictly due to circular regulator supply definitions (e.g. in Device Tree bindings or specific embedded PMIC drivers such as AXP22x with drivevbus enabled via DT). On standard amd64 virtualized fuzzing environments (QEMU/GCE), Device Tree is not supported, no virtual/emulated hardware registers self-supplying regulators, and no userspace interface allows registering arbitrary regulators. Consequently, this error-handling path is structurally unreachable on amd64.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch fixes a device reference leak (adding put_device(\u0026rdev-\u003edev)) in regulator_resolve_supply() when a regulator's supply resolves to itself (r == rdev). This condition occurs strictly due to circular regulator supply definitions (e.g. in Device Tree bindings or specific embedded PMIC drivers such as AXP22x with drivevbus enabled via DT). On standard amd64 virtualized fuzzing environments (QEMU/GCE), Device Tree is not supported, no virtual/emulated hardware registers self-supplying regulators, and no userspace interface allows registering arbitrary regulators. Consequently, this error-handling path is structurally unreachable on amd64.",
"WorthFuzzing": false
} |
| 136/1 | 2026/09/19 15:14 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|