AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/09/18 07:54 flow patch-triage
0m Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "KMSANReasoning": "",
  "NeedsKMSAN": false,
  "Reasoning": "The patch modifies error handling and runtime PM logic in mpu3050_drdy_trigger_set_state() within the Invensense MPU-3050 gyroscope driver (drivers/iio/gyro/mpu3050-core.c). This driver requires physical MPU-3050 hardware connected via I2C; probe validates the hardware chip ID over I2C and fails in standard virtualized environments (QEMU/GCE) where this hardware is not emulated. Consequently, the modified code is structurally unreachable during fuzzing.",
  "WorthFuzzing": false
}

1/1 2026/09/18 07:54 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 94634101af4d1621ee3c0283a93bbdce240c613b\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Fri Sep 18 07:54:46 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c\nindex d84e04e4b4314..aab2984a0c098 100644\n--- a/drivers/iio/gyro/mpu3050-core.c\n+++ b/drivers/iio/gyro/mpu3050-core.c\n@@ -988,20 +988,23 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,\n \t\treturn 0;\n \t} else {\n \t\t/* Else we're enabling the trigger from this point */\n-\t\tpm_runtime_get_sync(mpu3050-\u003edev);\n+\t\tret = pm_runtime_resume_and_get(mpu3050-\u003edev);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n \t\tmpu3050-\u003ehw_irq_trigger = true;\n \n \t\t/* Disable all things in the FIFO */\n \t\tret = regmap_write(mpu3050-\u003emap, MPU3050_FIFO_EN, 0);\n \t\tif (ret)\n-\t\t\treturn ret;\n+\t\t\tgoto err_pm_put;\n \n \t\t/* Reset and enable the FIFO */\n \t\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_USR_CTRL,\n \t\t\t\t      MPU3050_USR_CTRL_FIFO_EN |\n \t\t\t\t      MPU3050_USR_CTRL_FIFO_RST);\n \t\tif (ret)\n-\t\t\treturn ret;\n+\t\t\tgoto err_pm_put;\n \n \t\tmpu3050-\u003epending_fifo_footer = false;\n \n@@ -1013,12 +1016,12 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,\n \t\t\t\t   MPU3050_FIFO_EN_GYRO_ZOUT |\n \t\t\t\t   MPU3050_FIFO_EN_FOOTER);\n \t\tif (ret)\n-\t\t\treturn ret;\n+\t\t\tgoto err_pm_put;\n \n \t\t/* Configure the sample engine */\n \t\tret = mpu3050_start_sampling(mpu3050);\n \t\tif (ret)\n-\t\t\treturn ret;\n+\t\t\tgoto err_pm_put;\n \n \t\t/* Clear IRQ flag */\n \t\tret = regmap_read(mpu3050-\u003emap, MPU3050_INT_STATUS, \u0026val);\n@@ -1037,10 +1040,14 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,\n \n \t\tret = regmap_write(mpu3050-\u003emap, MPU3050_INT_CFG, val);\n \t\tif (ret)\n-\t\t\treturn ret;\n+\t\t\tgoto err_pm_put;\n \t}\n \n \treturn 0;\n+\n+err_pm_put:\n+\tpm_runtime_put_autosuspend(mpu3050-\u003edev);\n+\treturn ret;\n }\n \n static const struct iio_trigger_ops mpu3050_trigger_ops = {\n"
}

2/1 2026/09/18 07:54 agent patch-evaluator
0m Model:
core

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies error handling and runtime PM logic in mpu3050_drdy_trigger_set_state() within the Invensense MPU-3050 gyroscope driver (drivers/iio/gyro/mpu3050-core.c). This driver requires physical MPU-3050 hardware connected via I2C; probe validates the hardware chip ID over I2C and fails in standard virtualized environments (QEMU/GCE) where this hardware is not emulated. Consequently, the modified code is structurally unreachable during fuzzing.",
  "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 94634101af4d1621ee3c0283a93bbdce240c613b
Author: syz-cluster <triage@syzkaller.com>
Date:   Fri Sep 18 07:54:46 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c
index d84e04e4b4314..aab2984a0c098 100644
--- a/drivers/iio/gyro/mpu3050-core.c
+++ b/drivers/iio/gyro/mpu3050-core.c
@@ -988,20 +988,23 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,
 		return 0;
 	} else {
 		/* Else we're enabling the trigger from this point */
-		pm_runtime_get_sync(mpu3050->dev);
+		ret = pm_runtime_resume_and_get(mpu3050->dev);
+		if (ret)
+			return ret;
+
 		mpu3050->hw_irq_trigger = true;
 
 		/* Disable all things in the FIFO */
 		ret = regmap_write(mpu3050->map, MPU3050_FIFO_EN, 0);
 		if (ret)
-			return ret;
+			goto err_pm_put;
 
 		/* Reset and enable the FIFO */
 		ret = regmap_set_bits(mpu3050->map, MPU3050_USR_CTRL,
 				      MPU3050_USR_CTRL_FIFO_EN |
 				      MPU3050_USR_CTRL_FIFO_RST);
 		if (ret)
-			return ret;
+			goto err_pm_put;
 
 		mpu3050->pending_fifo_footer = false;
 
@@ -1013,12 +1016,12 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,
 				   MPU3050_FIFO_EN_GYRO_ZOUT |
 				   MPU3050_FIFO_EN_FOOTER);
 		if (ret)
-			return ret;
+			goto err_pm_put;
 
 		/* Configure the sample engine */
 		ret = mpu3050_start_sampling(mpu3050);
 		if (ret)
-			return ret;
+			goto err_pm_put;
 
 		/* Clear IRQ flag */
 		ret = regmap_read(mpu3050->map, MPU3050_INT_STATUS, &val);
@@ -1037,10 +1040,14 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,
 
 		ret = regmap_write(mpu3050->map, MPU3050_INT_CFG, val);
 		if (ret)
-			return ret;
+			goto err_pm_put;
 	}
 
 	return 0;
+
+err_pm_put:
+	pm_runtime_put_autosuspend(mpu3050->dev);
+	return ret;
 }
 
 static const struct iio_trigger_ops mpu3050_trigger_ops = {

3/2 2026/09/18 07:54 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 3518
							output: 32
							thoughts: 172
						

Thoughts:
**Analyzing the MPU3050 Patch**

Okay, so this patch is touching `drivers/iio/gyro/mpu3050-core.c`. My first thought is always to understand the device itself. What's the context here? Is the MPU3050 something I can readily test in a standard virtualized environment like QEMU or GCE? Or are we talking about an I2C or SPI device that demands specific physical hardware? I need to figure out the instantiation method: is it handled through I2C, SPI, the IIO framework, or perhaps sysfs? I need to understand how this `mpu3050` device binds to the system. Let me check the directory and files, particularly those named `drivers/iio/gyro/mpu3050*`.

Right, let me reach for my tools. Let's fire up `grepper` or `read-file` to get a good look at `drivers/iio/gyro/mpu3050-core.c` and any related files. I need to understand this code and its interactions to fully grasp what's changing and why.



4/2 2026/09/18 07:54 tool grepper
0m Args:
{
  "Expression": "mpu3050",
  "PathPrefix": "drivers/iio/gyro"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 821 lines.\nUse more precise expression if possible.\n\ndrivers/iio/gyro/Kconfig=127=config MPU3050_I2C\n--\ndrivers/iio/gyro/Kconfig-135-\t  This driver can be built as a module. The module will be called\ndrivers/iio/gyro/Kconfig:136:\t  inv-mpu3050-i2c.\ndrivers/iio/gyro/Kconfig-137-\n--\ndrivers/iio/gyro/Makefile=20=obj-$(CONFIG_HID_SENSOR_GYRO_3D) += hid-sensor-gyro-3d.o\n--\ndrivers/iio/gyro/Makefile-23-# we ever create a separate SPI interface for MPU-3050\ndrivers/iio/gyro/Makefile:24:obj-$(CONFIG_MPU3050) += mpu3050.o\ndrivers/iio/gyro/Makefile:25:mpu3050-objs := mpu3050-core.o mpu3050-i2c.o\ndrivers/iio/gyro/Makefile-26-\n--\ndrivers/iio/gyro/mpu3050-core.c-32-\ndrivers/iio/gyro/mpu3050-core.c:33:#include \"mpu3050.h\"\ndrivers/iio/gyro/mpu3050-core.c-34-\n--\ndrivers/iio/gyro/mpu3050-core.c-166- */\ndrivers/iio/gyro/mpu3050-core.c:167:static unsigned int mpu3050_fs_precision[] = {\ndrivers/iio/gyro/mpu3050-core.c-168-\tIIO_DEGREE_TO_RAD(250),\n--\ndrivers/iio/gyro/mpu3050-core.c-176- */\ndrivers/iio/gyro/mpu3050-core.c:177:static const char mpu3050_reg_vdd[] = \"vdd\";\ndrivers/iio/gyro/mpu3050-core.c:178:static const char mpu3050_reg_vlogic[] = \"vlogic\";\ndrivers/iio/gyro/mpu3050-core.c-179-\ndrivers/iio/gyro/mpu3050-core.c:180:static unsigned int mpu3050_get_freq(struct mpu3050 *mpu3050)\ndrivers/iio/gyro/mpu3050-core.c-181-{\n--\ndrivers/iio/gyro/mpu3050-core.c-183-\ndrivers/iio/gyro/mpu3050-core.c:184:\tif (mpu3050-\u003elpf == MPU3050_DLPF_CFG_256HZ_NOLPF2)\ndrivers/iio/gyro/mpu3050-core.c-185-\t\tfreq = 8000;\n--\ndrivers/iio/gyro/mpu3050-core.c-187-\t\tfreq = 1000;\ndrivers/iio/gyro/mpu3050-core.c:188:\tfreq /= (mpu3050-\u003edivisor + 1);\ndrivers/iio/gyro/mpu3050-core.c-189-\n--\ndrivers/iio/gyro/mpu3050-core.c-192-\ndrivers/iio/gyro/mpu3050-core.c:193:static int mpu3050_start_sampling(struct mpu3050 *mpu3050)\ndrivers/iio/gyro/mpu3050-core.c-194-{\n--\ndrivers/iio/gyro/mpu3050-core.c-199-\t/* Reset */\ndrivers/iio/gyro/mpu3050-core.c:200:\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c-201-\t\t\t      MPU3050_PWR_MGM_RESET);\n--\ndrivers/iio/gyro/mpu3050-core.c-205-\t/* Turn on the Z-axis PLL */\ndrivers/iio/gyro/mpu3050-core.c:206:\tret = regmap_update_bits(mpu3050-\u003emap, MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c-207-\t\t\t\t MPU3050_PWR_MGM_CLKSEL_MASK,\n--\ndrivers/iio/gyro/mpu3050-core.c-213-\tfor (i = 0; i \u003c 3; i++)\ndrivers/iio/gyro/mpu3050-core.c:214:\t\traw_val[i] = cpu_to_be16(mpu3050-\u003ecalibration[i]);\ndrivers/iio/gyro/mpu3050-core.c-215-\ndrivers/iio/gyro/mpu3050-core.c:216:\tret = regmap_bulk_write(mpu3050-\u003emap, MPU3050_X_OFFS_USR_H, raw_val,\ndrivers/iio/gyro/mpu3050-core.c-217-\t\t\t\tsizeof(raw_val));\n--\ndrivers/iio/gyro/mpu3050-core.c-221-\t/* Set low pass filter (sample rate), sync and full scale */\ndrivers/iio/gyro/mpu3050-core.c:222:\tret = regmap_write(mpu3050-\u003emap, MPU3050_DLPF_FS_SYNC,\ndrivers/iio/gyro/mpu3050-core.c-223-\t\t\t   MPU3050_EXT_SYNC_NONE \u003c\u003c MPU3050_EXT_SYNC_SHIFT |\ndrivers/iio/gyro/mpu3050-core.c:224:\t\t\t   mpu3050-\u003efullscale \u003c\u003c MPU3050_FS_SHIFT |\ndrivers/iio/gyro/mpu3050-core.c:225:\t\t\t   mpu3050-\u003elpf \u003c\u003c MPU3050_DLPF_CFG_SHIFT);\ndrivers/iio/gyro/mpu3050-core.c-226-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-229-\t/* Set up sampling frequency */\ndrivers/iio/gyro/mpu3050-core.c:230:\tret = regmap_write(mpu3050-\u003emap, MPU3050_SMPLRT_DIV, mpu3050-\u003edivisor);\ndrivers/iio/gyro/mpu3050-core.c-231-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-238-\t */\ndrivers/iio/gyro/mpu3050-core.c:239:\tmsleep(50 + 1000 / mpu3050_get_freq(mpu3050));\ndrivers/iio/gyro/mpu3050-core.c-240-\n--\ndrivers/iio/gyro/mpu3050-core.c-243-\ndrivers/iio/gyro/mpu3050-core.c:244:static int mpu3050_set_8khz_samplerate(struct mpu3050 *mpu3050)\ndrivers/iio/gyro/mpu3050-core.c-245-{\n--\ndrivers/iio/gyro/mpu3050-core.c-247-\tu8 divisor;\ndrivers/iio/gyro/mpu3050-core.c:248:\tenum mpu3050_lpf lpf;\ndrivers/iio/gyro/mpu3050-core.c-249-\ndrivers/iio/gyro/mpu3050-core.c:250:\tlpf = mpu3050-\u003elpf;\ndrivers/iio/gyro/mpu3050-core.c:251:\tdivisor = mpu3050-\u003edivisor;\ndrivers/iio/gyro/mpu3050-core.c-252-\ndrivers/iio/gyro/mpu3050-core.c:253:\tmpu3050-\u003elpf = LPF_256_HZ_NOLPF; /* 8 kHz base frequency */\ndrivers/iio/gyro/mpu3050-core.c:254:\tmpu3050-\u003edivisor = 0; /* Divide by 1 */\ndrivers/iio/gyro/mpu3050-core.c:255:\tret = mpu3050_start_sampling(mpu3050);\ndrivers/iio/gyro/mpu3050-core.c-256-\ndrivers/iio/gyro/mpu3050-core.c:257:\tmpu3050-\u003elpf = lpf;\ndrivers/iio/gyro/mpu3050-core.c:258:\tmpu3050-\u003edivisor = divisor;\ndrivers/iio/gyro/mpu3050-core.c-259-\n--\ndrivers/iio/gyro/mpu3050-core.c-262-\ndrivers/iio/gyro/mpu3050-core.c:263:static int mpu3050_read_raw(struct iio_dev *indio_dev,\ndrivers/iio/gyro/mpu3050-core.c-264-\t\t\t    struct iio_chan_spec const *chan,\n--\ndrivers/iio/gyro/mpu3050-core.c-267-{\ndrivers/iio/gyro/mpu3050-core.c:268:\tstruct mpu3050 *mpu3050 = iio_priv(indio_dev);\ndrivers/iio/gyro/mpu3050-core.c-269-\tint ret;\n--\ndrivers/iio/gyro/mpu3050-core.c-293-\t\tcase IIO_ANGL_VEL:\ndrivers/iio/gyro/mpu3050-core.c:294:\t\t\t*val = mpu3050-\u003ecalibration[chan-\u003escan_index-1];\ndrivers/iio/gyro/mpu3050-core.c-295-\t\t\treturn IIO_VAL_INT;\n--\ndrivers/iio/gyro/mpu3050-core.c-299-\tcase IIO_CHAN_INFO_SAMP_FREQ:\ndrivers/iio/gyro/mpu3050-core.c:300:\t\t*val = mpu3050_get_freq(mpu3050);\ndrivers/iio/gyro/mpu3050-core.c-301-\t\treturn IIO_VAL_INT;\n--\ndrivers/iio/gyro/mpu3050-core.c-316-\t\t\t */\ndrivers/iio/gyro/mpu3050-core.c:317:\t\t\t*val = mpu3050_fs_precision[mpu3050-\u003efullscale] * 2;\ndrivers/iio/gyro/mpu3050-core.c-318-\t\t\t*val2 = U16_MAX;\n--\ndrivers/iio/gyro/mpu3050-core.c-324-\t\t/* Resume device */\ndrivers/iio/gyro/mpu3050-core.c:325:\t\tret = pm_runtime_resume_and_get(mpu3050-\u003edev);\ndrivers/iio/gyro/mpu3050-core.c-326-\t\tif (ret)\ndrivers/iio/gyro/mpu3050-core.c-327-\t\t\treturn ret;\ndrivers/iio/gyro/mpu3050-core.c:328:\t\tmutex_lock(\u0026mpu3050-\u003elock);\ndrivers/iio/gyro/mpu3050-core.c-329-\ndrivers/iio/gyro/mpu3050-core.c:330:\t\tret = mpu3050_set_8khz_samplerate(mpu3050);\ndrivers/iio/gyro/mpu3050-core.c-331-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-335-\t\tcase IIO_TEMP:\ndrivers/iio/gyro/mpu3050-core.c:336:\t\t\tret = regmap_bulk_read(mpu3050-\u003emap, MPU3050_TEMP_H,\ndrivers/iio/gyro/mpu3050-core.c-337-\t\t\t\t\t       \u0026raw_val, sizeof(raw_val));\ndrivers/iio/gyro/mpu3050-core.c-338-\t\t\tif (ret) {\ndrivers/iio/gyro/mpu3050-core.c:339:\t\t\t\tdev_err(mpu3050-\u003edev,\ndrivers/iio/gyro/mpu3050-core.c-340-\t\t\t\t\t\"error reading temperature\\n\");\n--\ndrivers/iio/gyro/mpu3050-core.c-348-\t\tcase IIO_ANGL_VEL:\ndrivers/iio/gyro/mpu3050-core.c:349:\t\t\tret = regmap_bulk_read(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c-350-\t\t\t\t       MPU3050_AXIS_REGS(chan-\u003escan_index-1),\n--\ndrivers/iio/gyro/mpu3050-core.c-353-\t\t\tif (ret) {\ndrivers/iio/gyro/mpu3050-core.c:354:\t\t\t\tdev_err(mpu3050-\u003edev,\ndrivers/iio/gyro/mpu3050-core.c-355-\t\t\t\t\t\"error reading axis data\\n\");\n--\ndrivers/iio/gyro/mpu3050-core.c-373-out_read_raw_unlock:\ndrivers/iio/gyro/mpu3050-core.c:374:\tmutex_unlock(\u0026mpu3050-\u003elock);\ndrivers/iio/gyro/mpu3050-core.c:375:\tpm_runtime_put_autosuspend(mpu3050-\u003edev);\ndrivers/iio/gyro/mpu3050-core.c-376-\n--\ndrivers/iio/gyro/mpu3050-core.c-379-\ndrivers/iio/gyro/mpu3050-core.c:380:static int mpu3050_write_raw(struct iio_dev *indio_dev,\ndrivers/iio/gyro/mpu3050-core.c-381-\t\t\t     const struct iio_chan_spec *chan,\n--\ndrivers/iio/gyro/mpu3050-core.c-383-{\ndrivers/iio/gyro/mpu3050-core.c:384:\tstruct mpu3050 *mpu3050 = iio_priv(indio_dev);\ndrivers/iio/gyro/mpu3050-core.c-385-\t/*\n--\ndrivers/iio/gyro/mpu3050-core.c-388-\tunsigned int fs250 =\ndrivers/iio/gyro/mpu3050-core.c:389:\t\tDIV_ROUND_CLOSEST(mpu3050_fs_precision[0] * 1000000 * 2,\ndrivers/iio/gyro/mpu3050-core.c-390-\t\t\t\t  U16_MAX);\ndrivers/iio/gyro/mpu3050-core.c-391-\tunsigned int fs500 =\ndrivers/iio/gyro/mpu3050-core.c:392:\t\tDIV_ROUND_CLOSEST(mpu3050_fs_precision[1] * 1000000 * 2,\ndrivers/iio/gyro/mpu3050-core.c-393-\t\t\t\t  U16_MAX);\ndrivers/iio/gyro/mpu3050-core.c-394-\tunsigned int fs1000 =\ndrivers/iio/gyro/mpu3050-core.c:395:\t\tDIV_ROUND_CLOSEST(mpu3050_fs_precision[2] * 1000000 * 2,\ndrivers/iio/gyro/mpu3050-core.c-396-\t\t\t\t  U16_MAX);\ndrivers/iio/gyro/mpu3050-core.c-397-\tunsigned int fs2000 =\ndrivers/iio/gyro/mpu3050-core.c:398:\t\tDIV_ROUND_CLOSEST(mpu3050_fs_precision[3] * 1000000 * 2,\ndrivers/iio/gyro/mpu3050-core.c-399-\t\t\t\t  U16_MAX);\n--\ndrivers/iio/gyro/mpu3050-core.c-404-\t\t\treturn -EINVAL;\ndrivers/iio/gyro/mpu3050-core.c:405:\t\tmpu3050-\u003ecalibration[chan-\u003escan_index-1] = val;\ndrivers/iio/gyro/mpu3050-core.c-406-\t\treturn 0;\n--\ndrivers/iio/gyro/mpu3050-core.c-419-\t\tif (val \u003e 1000) {\ndrivers/iio/gyro/mpu3050-core.c:420:\t\t\tmpu3050-\u003elpf = LPF_256_HZ_NOLPF;\ndrivers/iio/gyro/mpu3050-core.c:421:\t\t\tmpu3050-\u003edivisor = DIV_ROUND_CLOSEST(8000, val) - 1;\ndrivers/iio/gyro/mpu3050-core.c-422-\t\t\treturn 0;\n--\ndrivers/iio/gyro/mpu3050-core.c-424-\ndrivers/iio/gyro/mpu3050-core.c:425:\t\tmpu3050-\u003elpf = LPF_188_HZ;\ndrivers/iio/gyro/mpu3050-core.c:426:\t\tmpu3050-\u003edivisor = DIV_ROUND_CLOSEST(1000, val) - 1;\ndrivers/iio/gyro/mpu3050-core.c-427-\t\treturn 0;\n--\ndrivers/iio/gyro/mpu3050-core.c-440-\t\tif (val != 0) {\ndrivers/iio/gyro/mpu3050-core.c:441:\t\t\tmpu3050-\u003efullscale = FS_2000_DPS;\ndrivers/iio/gyro/mpu3050-core.c-442-\t\t\treturn 0;\n--\ndrivers/iio/gyro/mpu3050-core.c-451-\t\t    val2 \u003c ((fs500 + fs250) / 2))\ndrivers/iio/gyro/mpu3050-core.c:452:\t\t\tmpu3050-\u003efullscale = FS_250_DPS;\ndrivers/iio/gyro/mpu3050-core.c-453-\t\telse if (val2 \u003c= fs500 ||\ndrivers/iio/gyro/mpu3050-core.c-454-\t\t\t val2 \u003c ((fs1000 + fs500) / 2))\ndrivers/iio/gyro/mpu3050-core.c:455:\t\t\tmpu3050-\u003efullscale = FS_500_DPS;\ndrivers/iio/gyro/mpu3050-core.c-456-\t\telse if (val2 \u003c= fs1000 ||\ndrivers/iio/gyro/mpu3050-core.c-457-\t\t\t val2 \u003c ((fs2000 + fs1000) / 2))\ndrivers/iio/gyro/mpu3050-core.c:458:\t\t\tmpu3050-\u003efullscale = FS_1000_DPS;\ndrivers/iio/gyro/mpu3050-core.c-459-\t\telse\ndrivers/iio/gyro/mpu3050-core.c-460-\t\t\t/* Catch-all */\ndrivers/iio/gyro/mpu3050-core.c:461:\t\t\tmpu3050-\u003efullscale = FS_2000_DPS;\ndrivers/iio/gyro/mpu3050-core.c-462-\t\treturn 0;\n--\ndrivers/iio/gyro/mpu3050-core.c-469-\ndrivers/iio/gyro/mpu3050-core.c:470:static irqreturn_t mpu3050_trigger_handler(int irq, void *p)\ndrivers/iio/gyro/mpu3050-core.c-471-{\n--\ndrivers/iio/gyro/mpu3050-core.c-473-\tstruct iio_dev *indio_dev = pf-\u003eindio_dev;\ndrivers/iio/gyro/mpu3050-core.c:474:\tstruct mpu3050 *mpu3050 = iio_priv(indio_dev);\ndrivers/iio/gyro/mpu3050-core.c-475-\tint ret;\n--\ndrivers/iio/gyro/mpu3050-core.c-489-\tif (iio_trigger_using_own(indio_dev))\ndrivers/iio/gyro/mpu3050-core.c:490:\t\ttimestamp = mpu3050-\u003ehw_timestamp;\ndrivers/iio/gyro/mpu3050-core.c-491-\telse\n--\ndrivers/iio/gyro/mpu3050-core.c-493-\ndrivers/iio/gyro/mpu3050-core.c:494:\tmutex_lock(\u0026mpu3050-\u003elock);\ndrivers/iio/gyro/mpu3050-core.c-495-\ndrivers/iio/gyro/mpu3050-core.c-496-\t/* Using the hardware IRQ trigger? Check the buffer then. */\ndrivers/iio/gyro/mpu3050-core.c:497:\tif (mpu3050-\u003ehw_irq_trigger) {\ndrivers/iio/gyro/mpu3050-core.c-498-\t\t__be16 raw_fifocnt;\n--\ndrivers/iio/gyro/mpu3050-core.c-503-\ndrivers/iio/gyro/mpu3050-core.c:504:\t\tret = regmap_bulk_read(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c-505-\t\t\t\t       MPU3050_FIFO_COUNT_H,\n--\ndrivers/iio/gyro/mpu3050-core.c-512-\t\tif (fifocnt == 512) {\ndrivers/iio/gyro/mpu3050-core.c:513:\t\t\tdev_info(mpu3050-\u003edev,\ndrivers/iio/gyro/mpu3050-core.c-514-\t\t\t\t \"FIFO overflow! Emptying and resetting FIFO\\n\");\n--\ndrivers/iio/gyro/mpu3050-core.c-516-\t\t\t/* Reset and enable the FIFO */\ndrivers/iio/gyro/mpu3050-core.c:517:\t\t\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_USR_CTRL,\ndrivers/iio/gyro/mpu3050-core.c-518-\t\t\t\t\t      MPU3050_USR_CTRL_FIFO_EN |\n--\ndrivers/iio/gyro/mpu3050-core.c-520-\t\t\tif (ret) {\ndrivers/iio/gyro/mpu3050-core.c:521:\t\t\t\tdev_info(mpu3050-\u003edev, \"error resetting FIFO\\n\");\ndrivers/iio/gyro/mpu3050-core.c-522-\t\t\t\tgoto out_trigger_unlock;\ndrivers/iio/gyro/mpu3050-core.c-523-\t\t\t}\ndrivers/iio/gyro/mpu3050-core.c:524:\t\t\tmpu3050-\u003epending_fifo_footer = false;\ndrivers/iio/gyro/mpu3050-core.c-525-\t\t}\n--\ndrivers/iio/gyro/mpu3050-core.c-527-\t\tif (fifocnt)\ndrivers/iio/gyro/mpu3050-core.c:528:\t\t\tdev_dbg(mpu3050-\u003edev,\ndrivers/iio/gyro/mpu3050-core.c-529-\t\t\t\t\"%d bytes in the FIFO\\n\",\n--\ndrivers/iio/gyro/mpu3050-core.c-544-\t\t\t */\ndrivers/iio/gyro/mpu3050-core.c:545:\t\t\tif (mpu3050-\u003epending_fifo_footer) {\ndrivers/iio/gyro/mpu3050-core.c-546-\t\t\t\ttoread = bytes_per_datum + 2;\n--\ndrivers/iio/gyro/mpu3050-core.c-554-\ndrivers/iio/gyro/mpu3050-core.c:555:\t\t\tret = regmap_bulk_read(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c-556-\t\t\t\t\t       MPU3050_FIFO_R,\n--\ndrivers/iio/gyro/mpu3050-core.c-561-\ndrivers/iio/gyro/mpu3050-core.c:562:\t\t\tdev_dbg(mpu3050-\u003edev,\ndrivers/iio/gyro/mpu3050-core.c-563-\t\t\t\t\"%04x %04x %04x %04x %04x\\n\",\n--\ndrivers/iio/gyro/mpu3050-core.c-577-\t\t\tdatums_from_fifo++;\ndrivers/iio/gyro/mpu3050-core.c:578:\t\t\tmpu3050-\u003epending_fifo_footer = true;\ndrivers/iio/gyro/mpu3050-core.c-579-\n--\ndrivers/iio/gyro/mpu3050-core.c-584-\t\t\tif (fifocnt \u003c bytes_per_datum) {\ndrivers/iio/gyro/mpu3050-core.c:585:\t\t\t\tret = regmap_bulk_read(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c-586-\t\t\t\t\t\t       MPU3050_FIFO_COUNT_H,\n--\ndrivers/iio/gyro/mpu3050-core.c-594-\t\t\tif (fifocnt \u003c bytes_per_datum)\ndrivers/iio/gyro/mpu3050-core.c:595:\t\t\t\tdev_dbg(mpu3050-\u003edev,\ndrivers/iio/gyro/mpu3050-core.c-596-\t\t\t\t\t\"%d bytes left in the FIFO\\n\",\n--\ndrivers/iio/gyro/mpu3050-core.c-625-\tif (datums_from_fifo) {\ndrivers/iio/gyro/mpu3050-core.c:626:\t\tdev_dbg(mpu3050-\u003edev,\ndrivers/iio/gyro/mpu3050-core.c-627-\t\t\t\"read %d datums from the FIFO\\n\",\n--\ndrivers/iio/gyro/mpu3050-core.c-631-\ndrivers/iio/gyro/mpu3050-core.c:632:\tret = regmap_bulk_read(mpu3050-\u003emap, MPU3050_TEMP_H, scan.chans,\ndrivers/iio/gyro/mpu3050-core.c-633-\t\t\t       sizeof(scan.chans));\ndrivers/iio/gyro/mpu3050-core.c-634-\tif (ret) {\ndrivers/iio/gyro/mpu3050-core.c:635:\t\tdev_err(mpu3050-\u003edev,\ndrivers/iio/gyro/mpu3050-core.c-636-\t\t\t\"error reading axis data\\n\");\n--\ndrivers/iio/gyro/mpu3050-core.c-642-out_trigger_unlock:\ndrivers/iio/gyro/mpu3050-core.c:643:\tmutex_unlock(\u0026mpu3050-\u003elock);\ndrivers/iio/gyro/mpu3050-core.c-644-\tiio_trigger_notify_done(indio_dev-\u003etrig);\n--\ndrivers/iio/gyro/mpu3050-core.c-648-\ndrivers/iio/gyro/mpu3050-core.c:649:static int mpu3050_buffer_preenable(struct iio_dev *indio_dev)\ndrivers/iio/gyro/mpu3050-core.c-650-{\ndrivers/iio/gyro/mpu3050-core.c:651:\tstruct mpu3050 *mpu3050 = iio_priv(indio_dev);\ndrivers/iio/gyro/mpu3050-core.c-652-\tint ret;\ndrivers/iio/gyro/mpu3050-core.c-653-\ndrivers/iio/gyro/mpu3050-core.c:654:\tret = pm_runtime_resume_and_get(mpu3050-\u003edev);\ndrivers/iio/gyro/mpu3050-core.c-655-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-658-\t/* Unless we have OUR trigger active, run at full speed */\ndrivers/iio/gyro/mpu3050-core.c:659:\tif (!mpu3050-\u003ehw_irq_trigger) {\ndrivers/iio/gyro/mpu3050-core.c:660:\t\tret = mpu3050_set_8khz_samplerate(mpu3050);\ndrivers/iio/gyro/mpu3050-core.c-661-\t\tif (ret)\ndrivers/iio/gyro/mpu3050-core.c:662:\t\t\tpm_runtime_put_autosuspend(mpu3050-\u003edev);\ndrivers/iio/gyro/mpu3050-core.c-663-\t}\n--\ndrivers/iio/gyro/mpu3050-core.c-667-\ndrivers/iio/gyro/mpu3050-core.c:668:static int mpu3050_buffer_postdisable(struct iio_dev *indio_dev)\ndrivers/iio/gyro/mpu3050-core.c-669-{\ndrivers/iio/gyro/mpu3050-core.c:670:\tstruct mpu3050 *mpu3050 = iio_priv(indio_dev);\ndrivers/iio/gyro/mpu3050-core.c-671-\ndrivers/iio/gyro/mpu3050-core.c:672:\tpm_runtime_put_autosuspend(mpu3050-\u003edev);\ndrivers/iio/gyro/mpu3050-core.c-673-\n--\ndrivers/iio/gyro/mpu3050-core.c-676-\ndrivers/iio/gyro/mpu3050-core.c:677:static const struct iio_buffer_setup_ops mpu3050_buffer_setup_ops = {\ndrivers/iio/gyro/mpu3050-core.c:678:\t.preenable = mpu3050_buffer_preenable,\ndrivers/iio/gyro/mpu3050-core.c:679:\t.postdisable = mpu3050_buffer_postdisable,\ndrivers/iio/gyro/mpu3050-core.c-680-};\n--\ndrivers/iio/gyro/mpu3050-core.c=682=static const struct iio_mount_matrix *\ndrivers/iio/gyro/mpu3050-core.c:683:mpu3050_get_mount_matrix(const struct iio_dev *indio_dev,\ndrivers/iio/gyro/mpu3050-core.c-684-\t\t\t const struct iio_chan_spec *chan)\ndrivers/iio/gyro/mpu3050-core.c-685-{\ndrivers/iio/gyro/mpu3050-core.c:686:\tstruct mpu3050 *mpu3050 = iio_priv(indio_dev);\ndrivers/iio/gyro/mpu3050-core.c-687-\ndrivers/iio/gyro/mpu3050-core.c:688:\treturn \u0026mpu3050-\u003eorientation;\ndrivers/iio/gyro/mpu3050-core.c-689-}\ndrivers/iio/gyro/mpu3050-core.c-690-\ndrivers/iio/gyro/mpu3050-core.c:691:static const struct iio_chan_spec_ext_info mpu3050_ext_info[] = {\ndrivers/iio/gyro/mpu3050-core.c:692:\tIIO_MOUNT_MATRIX(IIO_SHARED_BY_TYPE, mpu3050_get_mount_matrix),\ndrivers/iio/gyro/mpu3050-core.c-693-\t{ }\n--\ndrivers/iio/gyro/mpu3050-core.c-704-\t\t.info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ),\\\ndrivers/iio/gyro/mpu3050-core.c:705:\t\t.ext_info = mpu3050_ext_info,\t\t\t\t\\\ndrivers/iio/gyro/mpu3050-core.c-706-\t\t.scan_index = index,\t\t\t\t\t\\\n--\ndrivers/iio/gyro/mpu3050-core.c-714-\ndrivers/iio/gyro/mpu3050-core.c:715:static const struct iio_chan_spec mpu3050_channels[] = {\ndrivers/iio/gyro/mpu3050-core.c-716-\t{\n--\ndrivers/iio/gyro/mpu3050-core.c-736-/* Four channels apart from timestamp, scan mask = 0x0f */\ndrivers/iio/gyro/mpu3050-core.c:737:static const unsigned long mpu3050_scan_masks[] = { 0xf, 0 };\ndrivers/iio/gyro/mpu3050-core.c-738-\n--\ndrivers/iio/gyro/mpu3050-core.c=743=static IIO_CONST_ATTR(anglevel_scale_available,\n--\ndrivers/iio/gyro/mpu3050-core.c-748-\ndrivers/iio/gyro/mpu3050-core.c:749:static struct attribute *mpu3050_attributes[] = {\ndrivers/iio/gyro/mpu3050-core.c-750-\t\u0026iio_const_attr_anglevel_scale_available.dev_attr.attr,\n--\ndrivers/iio/gyro/mpu3050-core.c-753-\ndrivers/iio/gyro/mpu3050-core.c:754:static const struct attribute_group mpu3050_attribute_group = {\ndrivers/iio/gyro/mpu3050-core.c:755:\t.attrs = mpu3050_attributes,\ndrivers/iio/gyro/mpu3050-core.c-756-};\ndrivers/iio/gyro/mpu3050-core.c-757-\ndrivers/iio/gyro/mpu3050-core.c:758:static const struct iio_info mpu3050_info = {\ndrivers/iio/gyro/mpu3050-core.c:759:\t.read_raw = mpu3050_read_raw,\ndrivers/iio/gyro/mpu3050-core.c:760:\t.write_raw = mpu3050_write_raw,\ndrivers/iio/gyro/mpu3050-core.c:761:\t.attrs = \u0026mpu3050_attribute_group,\ndrivers/iio/gyro/mpu3050-core.c-762-};\n--\ndrivers/iio/gyro/mpu3050-core.c-764-/**\ndrivers/iio/gyro/mpu3050-core.c:765: * mpu3050_read_mem() - read MPU-3050 internal memory\ndrivers/iio/gyro/mpu3050-core.c:766: * @mpu3050: device to read from\ndrivers/iio/gyro/mpu3050-core.c-767- * @bank: target bank\n--\ndrivers/iio/gyro/mpu3050-core.c-771- */\ndrivers/iio/gyro/mpu3050-core.c:772:static int mpu3050_read_mem(struct mpu3050 *mpu3050,\ndrivers/iio/gyro/mpu3050-core.c-773-\t\t\t    u8 bank,\n--\ndrivers/iio/gyro/mpu3050-core.c-779-\ndrivers/iio/gyro/mpu3050-core.c:780:\tret = regmap_write(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c-781-\t\t\t   MPU3050_BANK_SEL,\n--\ndrivers/iio/gyro/mpu3050-core.c-785-\ndrivers/iio/gyro/mpu3050-core.c:786:\tret = regmap_write(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c-787-\t\t\t   MPU3050_MEM_START_ADDR,\n--\ndrivers/iio/gyro/mpu3050-core.c-791-\ndrivers/iio/gyro/mpu3050-core.c:792:\treturn regmap_bulk_read(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c-793-\t\t\t\tMPU3050_MEM_R_W,\n--\ndrivers/iio/gyro/mpu3050-core.c-797-\ndrivers/iio/gyro/mpu3050-core.c:798:static int mpu3050_hw_init(struct mpu3050 *mpu3050)\ndrivers/iio/gyro/mpu3050-core.c-799-{\n--\ndrivers/iio/gyro/mpu3050-core.c-804-\t/* Reset */\ndrivers/iio/gyro/mpu3050-core.c:805:\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c-806-\t\t\t      MPU3050_PWR_MGM_RESET);\n--\ndrivers/iio/gyro/mpu3050-core.c-810-\t/* Turn on the PLL */\ndrivers/iio/gyro/mpu3050-core.c:811:\tret = regmap_update_bits(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c-812-\t\t\t\t MPU3050_PWR_MGM,\n--\ndrivers/iio/gyro/mpu3050-core.c-818-\t/* Disable IRQs */\ndrivers/iio/gyro/mpu3050-core.c:819:\tret = regmap_write(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c-820-\t\t\t   MPU3050_INT_CFG,\n--\ndrivers/iio/gyro/mpu3050-core.c-825-\t/* Read out the 8 bytes of OTP (one-time-programmable) memory */\ndrivers/iio/gyro/mpu3050-core.c:826:\tret = mpu3050_read_mem(mpu3050,\ndrivers/iio/gyro/mpu3050-core.c-827-\t\t\t       (MPU3050_MEM_PRFTCH |\n--\ndrivers/iio/gyro/mpu3050-core.c-840-\ndrivers/iio/gyro/mpu3050-core.c:841:\tdev_info(mpu3050-\u003edev,\ndrivers/iio/gyro/mpu3050-core.c-842-\t\t \"die ID: %04llX, wafer ID: %02llX, A lot ID: %04llX, \"\n--\ndrivers/iio/gyro/mpu3050-core.c-859-\ndrivers/iio/gyro/mpu3050-core.c:860:static int mpu3050_power_up(struct mpu3050 *mpu3050)\ndrivers/iio/gyro/mpu3050-core.c-861-{\n--\ndrivers/iio/gyro/mpu3050-core.c-863-\ndrivers/iio/gyro/mpu3050-core.c:864:\tret = regulator_bulk_enable(ARRAY_SIZE(mpu3050-\u003eregs), mpu3050-\u003eregs);\ndrivers/iio/gyro/mpu3050-core.c-865-\tif (ret) {\ndrivers/iio/gyro/mpu3050-core.c:866:\t\tdev_err(mpu3050-\u003edev, \"cannot enable regulators\\n\");\ndrivers/iio/gyro/mpu3050-core.c-867-\t\treturn ret;\n--\ndrivers/iio/gyro/mpu3050-core.c-875-\t/* Take device out of sleep mode */\ndrivers/iio/gyro/mpu3050-core.c:876:\tret = regmap_clear_bits(mpu3050-\u003emap, MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c-877-\t\t\t\tMPU3050_PWR_MGM_SLEEP);\ndrivers/iio/gyro/mpu3050-core.c-878-\tif (ret) {\ndrivers/iio/gyro/mpu3050-core.c:879:\t\tregulator_bulk_disable(ARRAY_SIZE(mpu3050-\u003eregs), mpu3050-\u003eregs);\ndrivers/iio/gyro/mpu3050-core.c:880:\t\tdev_err(mpu3050-\u003edev, \"error setting power mode\\n\");\ndrivers/iio/gyro/mpu3050-core.c-881-\t\treturn ret;\n--\ndrivers/iio/gyro/mpu3050-core.c-887-\ndrivers/iio/gyro/mpu3050-core.c:888:static int mpu3050_power_down(struct mpu3050 *mpu3050)\ndrivers/iio/gyro/mpu3050-core.c-889-{\n--\ndrivers/iio/gyro/mpu3050-core.c-898-\t */\ndrivers/iio/gyro/mpu3050-core.c:899:\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c-900-\t\t\t      MPU3050_PWR_MGM_SLEEP);\ndrivers/iio/gyro/mpu3050-core.c-901-\tif (ret)\ndrivers/iio/gyro/mpu3050-core.c:902:\t\tdev_err(mpu3050-\u003edev, \"error putting to sleep\\n\");\ndrivers/iio/gyro/mpu3050-core.c-903-\ndrivers/iio/gyro/mpu3050-core.c:904:\tret = regulator_bulk_disable(ARRAY_SIZE(mpu3050-\u003eregs), mpu3050-\u003eregs);\ndrivers/iio/gyro/mpu3050-core.c-905-\tif (ret)\ndrivers/iio/gyro/mpu3050-core.c:906:\t\tdev_err(mpu3050-\u003edev, \"error disabling regulators\\n\");\ndrivers/iio/gyro/mpu3050-core.c-907-\n--\ndrivers/iio/gyro/mpu3050-core.c-910-\ndrivers/iio/gyro/mpu3050-core.c:911:static irqreturn_t mpu3050_irq_handler(int irq, void *p)\ndrivers/iio/gyro/mpu3050-core.c-912-{\n--\ndrivers/iio/gyro/mpu3050-core.c-914-\tstruct iio_dev *indio_dev = iio_trigger_get_drvdata(trig);\ndrivers/iio/gyro/mpu3050-core.c:915:\tstruct mpu3050 *mpu3050 = iio_priv(indio_dev);\ndrivers/iio/gyro/mpu3050-core.c-916-\ndrivers/iio/gyro/mpu3050-core.c:917:\tif (!mpu3050-\u003ehw_irq_trigger)\ndrivers/iio/gyro/mpu3050-core.c-918-\t\treturn IRQ_NONE;\n--\ndrivers/iio/gyro/mpu3050-core.c-920-\t/* Get the time stamp as close in time as possible */\ndrivers/iio/gyro/mpu3050-core.c:921:\tmpu3050-\u003ehw_timestamp = iio_get_time_ns(indio_dev);\ndrivers/iio/gyro/mpu3050-core.c-922-\n--\ndrivers/iio/gyro/mpu3050-core.c-925-\ndrivers/iio/gyro/mpu3050-core.c:926:static irqreturn_t mpu3050_irq_thread(int irq, void *p)\ndrivers/iio/gyro/mpu3050-core.c-927-{\n--\ndrivers/iio/gyro/mpu3050-core.c-929-\tstruct iio_dev *indio_dev = iio_trigger_get_drvdata(trig);\ndrivers/iio/gyro/mpu3050-core.c:930:\tstruct mpu3050 *mpu3050 = iio_priv(indio_dev);\ndrivers/iio/gyro/mpu3050-core.c-931-\tunsigned int val;\n--\ndrivers/iio/gyro/mpu3050-core.c-934-\t/* ACK IRQ and check if it was from us */\ndrivers/iio/gyro/mpu3050-core.c:935:\tret = regmap_read(mpu3050-\u003emap, MPU3050_INT_STATUS, \u0026val);\ndrivers/iio/gyro/mpu3050-core.c-936-\tif (ret) {\ndrivers/iio/gyro/mpu3050-core.c:937:\t\tdev_err(mpu3050-\u003edev, \"error reading IRQ status\\n\");\ndrivers/iio/gyro/mpu3050-core.c-938-\t\treturn IRQ_HANDLED;\n--\ndrivers/iio/gyro/mpu3050-core.c-948-/**\ndrivers/iio/gyro/mpu3050-core.c:949: * mpu3050_drdy_trigger_set_state() - set data ready interrupt state\ndrivers/iio/gyro/mpu3050-core.c-950- * @trig: trigger instance\n--\ndrivers/iio/gyro/mpu3050-core.c-952- */\ndrivers/iio/gyro/mpu3050-core.c:953:static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,\ndrivers/iio/gyro/mpu3050-core.c-954-\t\t\t\t\t  bool enable)\n--\ndrivers/iio/gyro/mpu3050-core.c-956-\tstruct iio_dev *indio_dev = iio_trigger_get_drvdata(trig);\ndrivers/iio/gyro/mpu3050-core.c:957:\tstruct mpu3050 *mpu3050 = iio_priv(indio_dev);\ndrivers/iio/gyro/mpu3050-core.c-958-\tunsigned int val;\n--\ndrivers/iio/gyro/mpu3050-core.c-963-\t\t/* Disable all interrupts */\ndrivers/iio/gyro/mpu3050-core.c:964:\t\tret = regmap_write(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c-965-\t\t\t\t   MPU3050_INT_CFG,\n--\ndrivers/iio/gyro/mpu3050-core.c-967-\t\tif (ret)\ndrivers/iio/gyro/mpu3050-core.c:968:\t\t\tdev_err(mpu3050-\u003edev, \"error disabling IRQ\\n\");\ndrivers/iio/gyro/mpu3050-core.c-969-\ndrivers/iio/gyro/mpu3050-core.c-970-\t\t/* Clear IRQ flag */\ndrivers/iio/gyro/mpu3050-core.c:971:\t\tret = regmap_read(mpu3050-\u003emap, MPU3050_INT_STATUS, \u0026val);\ndrivers/iio/gyro/mpu3050-core.c-972-\t\tif (ret)\ndrivers/iio/gyro/mpu3050-core.c:973:\t\t\tdev_err(mpu3050-\u003edev, \"error clearing IRQ status\\n\");\ndrivers/iio/gyro/mpu3050-core.c-974-\ndrivers/iio/gyro/mpu3050-core.c-975-\t\t/* Disable all things in the FIFO and reset it */\ndrivers/iio/gyro/mpu3050-core.c:976:\t\tret = regmap_write(mpu3050-\u003emap, MPU3050_FIFO_EN, 0);\ndrivers/iio/gyro/mpu3050-core.c-977-\t\tif (ret)\ndrivers/iio/gyro/mpu3050-core.c:978:\t\t\tdev_err(mpu3050-\u003edev, \"error disabling FIFO\\n\");\ndrivers/iio/gyro/mpu3050-core.c-979-\ndrivers/iio/gyro/mpu3050-core.c:980:\t\tret = regmap_write(mpu3050-\u003emap, MPU3050_USR_CTRL,\ndrivers/iio/gyro/mpu3050-core.c-981-\t\t\t\t   MPU3050_USR_CTRL_FIFO_RST);\ndrivers/iio/gyro/mpu3050-core.c-982-\t\tif (ret)\ndrivers/iio/gyro/mpu3050-core.c:983:\t\t\tdev_err(mpu3050-\u003edev, \"error resetting FIFO\\n\");\ndrivers/iio/gyro/mpu3050-core.c-984-\ndrivers/iio/gyro/mpu3050-core.c:985:\t\tpm_runtime_put_autosuspend(mpu3050-\u003edev);\ndrivers/iio/gyro/mpu3050-core.c:986:\t\tmpu3050-\u003ehw_irq_trigger = false;\ndrivers/iio/gyro/mpu3050-core.c-987-\n--\ndrivers/iio/gyro/mpu3050-core.c-990-\t\t/* Else we're enabling the trigger from this point */\ndrivers/iio/gyro/mpu3050-core.c:991:\t\tret = pm_runtime_resume_and_get(mpu3050-\u003edev);\ndrivers/iio/gyro/mpu3050-core.c-992-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-994-\ndrivers/iio/gyro/mpu3050-core.c:995:\t\tmpu3050-\u003ehw_irq_trigger = true;\ndrivers/iio/gyro/mpu3050-core.c-996-\ndrivers/iio/gyro/mpu3050-core.c-997-\t\t/* Disable all things in the FIFO */\ndrivers/iio/gyro/mpu3050-core.c:998:\t\tret = regmap_write(mpu3050-\u003emap, MPU3050_FIFO_EN, 0);\ndrivers/iio/gyro/mpu3050-core.c-999-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-1002-\t\t/* Reset and enable the FIFO */\ndrivers/iio/gyro/mpu3050-core.c:1003:\t\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_USR_CTRL,\ndrivers/iio/gyro/mpu3050-core.c-1004-\t\t\t\t      MPU3050_USR_CTRL_FIFO_EN |\n--\n\n"
}

5/2 2026/09/18 07:54 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 18620
							output: 46
							thoughts: 38
						

Thoughts:
Here's my take on the thought process, as if it were my own:

**Investigating the MPU3050 Instantiation**

Okay, so I need to figure out how the MPU3050 is being brought into the system. My first instinct, as always, is to dive straight into the relevant source code. Let's see... I'll start with the typical path – the `mpu3050-i2c.c` file, since it's likely dealing with the I2C interface, which is the most common connection for these gyros. I'll need to understand the device tree bindings, the driver initialization, and how the device is registered with the I2C bus. Then, I should also double check the Kconfig, to see how the driver is configured or whether there are any conditional dependencies that I need to be aware of.



6/2 2026/09/18 07:54 tool read-file
0m Args:
{
  "File": "drivers/iio/gyro/mpu3050-i2c.c",
  "FirstLine": 1,
  "LineCount": 100
}

Results:
{
  "Contents": "   1:\t// SPDX-License-Identifier: GPL-2.0-only\n   2:\t#include \u003clinux/err.h\u003e\n   3:\t#include \u003clinux/i2c.h\u003e\n   4:\t#include \u003clinux/i2c-mux.h\u003e\n   5:\t#include \u003clinux/iio/iio.h\u003e\n   6:\t#include \u003clinux/module.h\u003e\n   7:\t#include \u003clinux/regmap.h\u003e\n   8:\t#include \u003clinux/pm_runtime.h\u003e\n   9:\t\n  10:\t#include \"mpu3050.h\"\n  11:\t\n  12:\tstatic const struct regmap_config mpu3050_i2c_regmap_config = {\n  13:\t\t.reg_bits = 8,\n  14:\t\t.val_bits = 8,\n  15:\t};\n  16:\t\n  17:\tstatic int mpu3050_i2c_bypass_select(struct i2c_mux_core *mux, u32 chan_id)\n  18:\t{\n  19:\t\tstruct mpu3050 *mpu3050 = i2c_mux_priv(mux);\n  20:\t\n  21:\t\t/* Just power up the device, that is all that is needed */\n  22:\t\treturn pm_runtime_resume_and_get(mpu3050-\u003edev);\n  23:\t}\n  24:\t\n  25:\tstatic int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)\n  26:\t{\n  27:\t\tstruct mpu3050 *mpu3050 = i2c_mux_priv(mux);\n  28:\t\n  29:\t\tpm_runtime_put_autosuspend(mpu3050-\u003edev);\n  30:\t\treturn 0;\n  31:\t}\n  32:\t\n  33:\tstatic int mpu3050_i2c_probe(struct i2c_client *client)\n  34:\t{\n  35:\t\tconst struct i2c_device_id *id = i2c_client_get_device_id(client);\n  36:\t\tstruct regmap *regmap;\n  37:\t\tconst char *name;\n  38:\t\tstruct mpu3050 *mpu3050;\n  39:\t\tint ret;\n  40:\t\n  41:\t\tif (!i2c_check_functionality(client-\u003eadapter,\n  42:\t\t\t\t\t     I2C_FUNC_SMBUS_I2C_BLOCK))\n  43:\t\t\treturn -EOPNOTSUPP;\n  44:\t\n  45:\t\tif (id)\n  46:\t\t\tname = id-\u003ename;\n  47:\t\telse\n  48:\t\t\treturn -ENODEV;\n  49:\t\n  50:\t\tregmap = devm_regmap_init_i2c(client, \u0026mpu3050_i2c_regmap_config);\n  51:\t\tif (IS_ERR(regmap)) {\n  52:\t\t\tdev_err(\u0026client-\u003edev, \"Failed to register i2c regmap: %pe\\n\",\n  53:\t\t\t\tregmap);\n  54:\t\t\treturn PTR_ERR(regmap);\n  55:\t\t}\n  56:\t\n  57:\t\tret = mpu3050_common_probe(\u0026client-\u003edev, regmap, client-\u003eirq, name);\n  58:\t\tif (ret)\n  59:\t\t\treturn ret;\n  60:\t\n  61:\t\t/* The main driver is up, now register the I2C mux */\n  62:\t\tmpu3050 = iio_priv(dev_get_drvdata(\u0026client-\u003edev));\n  63:\t\tmpu3050-\u003ei2cmux = i2c_mux_alloc(client-\u003eadapter, \u0026client-\u003edev,\n  64:\t\t\t\t\t\t1, 0, I2C_MUX_LOCKED | I2C_MUX_GATE,\n  65:\t\t\t\t\t\tmpu3050_i2c_bypass_select,\n  66:\t\t\t\t\t\tmpu3050_i2c_bypass_deselect);\n  67:\t\t/* Just fail the mux, there is no point in killing the driver */\n  68:\t\tif (!mpu3050-\u003ei2cmux)\n  69:\t\t\tdev_err(\u0026client-\u003edev, \"failed to allocate I2C mux\\n\");\n  70:\t\telse {\n  71:\t\t\tmpu3050-\u003ei2cmux-\u003epriv = mpu3050;\n  72:\t\t\t/* Ignore failure, not critical */\n  73:\t\t\ti2c_mux_add_adapter(mpu3050-\u003ei2cmux, 0, 0);\n  74:\t\t}\n  75:\t\n  76:\t\treturn 0;\n  77:\t}\n  78:\t\n  79:\tstatic void mpu3050_i2c_remove(struct i2c_client *client)\n  80:\t{\n  81:\t\tstruct iio_dev *indio_dev = dev_get_drvdata(\u0026client-\u003edev);\n  82:\t\tstruct mpu3050 *mpu3050 = iio_priv(indio_dev);\n  83:\t\n  84:\t\tif (mpu3050-\u003ei2cmux)\n  85:\t\t\ti2c_mux_del_adapters(mpu3050-\u003ei2cmux);\n  86:\t\n  87:\t\tmpu3050_common_remove(\u0026client-\u003edev);\n  88:\t}\n  89:\t\n  90:\t/*\n  91:\t * device id table is used to identify what device can be\n  92:\t * supported by this driver\n  93:\t */\n  94:\tstatic const struct i2c_device_id mpu3050_i2c_id[] = {\n  95:\t\t{ .name = \"mpu3050\" },\n  96:\t\t{ }\n  97:\t};\n  98:\tMODULE_DEVICE_TABLE(i2c, mpu3050_i2c_id);\n  99:\t\n 100:\tstatic const struct of_device_id mpu3050_i2c_of_match[] = {\n"
}

7/2 2026/09/18 07:54 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 20535
							output: 36
							thoughts: 629
						

Thoughts:
**My Reasoning on WorthFuzzing for `mpu3050_common_probe`**

Okay, let's break this down. My initial thought was about `mpu3050_common_probe` in `mpu3050-core.c`. The question is, can I fuzz this? My mind immediately goes to the potential for I2C device instantiation from userspace, perhaps emulated or through `/sys/bus/i2c/devices/i2c-*/new_device`. I need to figure out if syzkaller can even reach I2C devices or if they're considered unreachable hardware.

The key is reachability. I need to be *sure* this code can execute in a standard virtualized environment like QEMU. This means software-emulated devices are fine, but physical ASIC/PCIe cards that aren't emulated are a no-go. The instructions are clear on this, particularly Sections 1 and 2 of the documentation, regarding REACHABILITY and WorthFuzzing criteria. Section 2 is where it lays out the "NEGATIVE CRITERIA," the reasons *not* to fuzz.

First, Section 1: "REACHABILITY IS THE PRIMARY GATE".  Essentially, if code is structurally unreachable (as defined in Section 2), it's a hard stop.

Now, Section 2 is the checklist to determine structural reachability: The code can't be non-kernel, non-executable changes like documentation or userspace scripts. It can't be vendor-specific hardware that isn't emulated (like certain PCIe devices), or unreachable execution paths like teardown callbacks triggered only by hardware unbinding.

So, the critical question is about I2C. Can an I2C gyro sensor (like the MPU-3050) actually *execute* in QEMU? Does `mpu3050_common_probe` rely on a hardware component that *can't* be emulated? I need to check the code itself. I'm going to carefully read `mpu3050_common_probe` in `drivers/iio/gyro/mpu3050-core.c`. The key thing to understand is whether `mpu3050_common_probe` talks to hardware *during* the probe operation. This will determine if I can fuzz it or not.



8/2 2026/09/18 07:55 tool grepper
0m Args:
{
  "Expression": "mpu3050_common_probe",
  "PathPrefix": "drivers/iio/gyro"
}

Results:
{
  "Output": "drivers/iio/gyro/mpu3050-core.c=1057=static int mpu3050_trigger_probe(struct iio_dev *indio_dev, int irq)\n--\ndrivers/iio/gyro/mpu3050-core.c-1150-\ndrivers/iio/gyro/mpu3050-core.c:1151:int mpu3050_common_probe(struct device *dev,\ndrivers/iio/gyro/mpu3050-core.c-1152-\t\t\t struct regmap *map,\n--\ndrivers/iio/gyro/mpu3050-i2c.c=33=static int mpu3050_i2c_probe(struct i2c_client *client)\n--\ndrivers/iio/gyro/mpu3050-i2c.c-56-\ndrivers/iio/gyro/mpu3050-i2c.c:57:\tret = mpu3050_common_probe(\u0026client-\u003edev, regmap, client-\u003eirq, name);\ndrivers/iio/gyro/mpu3050-i2c.c-58-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050.h=68=struct mpu3050 {\n--\ndrivers/iio/gyro/mpu3050.h-89-/* Probe called from different transports */\ndrivers/iio/gyro/mpu3050.h:90:int mpu3050_common_probe(struct device *dev,\ndrivers/iio/gyro/mpu3050.h-91-\t\t\t struct regmap *map,\n"
}

9/2 2026/09/18 07:55 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 22154
							output: 46
							thoughts: 31
						

Thoughts:
Here's a first-person summary, tailored as requested:

**Diving into the MPU3050 Code**

Okay, so I need to refresh my memory on how this MPU3050 driver handles its FIFO buffers. Let's pull up `drivers/iio/gyro/mpu3050-core.c` and zero in around line 1150. I seem to recall that's where the FIFO interrupt handling logic kicks in. Specifically, I'm trying to visualize how the data is read out and the interrupt cleared after a full FIFO has been processed. I wonder if there is an issue with the synchronization, or with how the data is transferred to the IIO buffers. Let's see if the code confirms what I'm expecting to see. Time to do some quick code spelunking!



10/2 2026/09/18 07:55 tool read-file
0m Args:
{
  "File": "drivers/iio/gyro/mpu3050-core.c",
  "FirstLine": 1150,
  "LineCount": 80
}

Results:
{
  "Contents": "1150:\t\n1151:\tint mpu3050_common_probe(struct device *dev,\n1152:\t\t\t\t struct regmap *map,\n1153:\t\t\t\t int irq,\n1154:\t\t\t\t const char *name)\n1155:\t{\n1156:\t\tstruct iio_dev *indio_dev;\n1157:\t\tstruct mpu3050 *mpu3050;\n1158:\t\tunsigned int val;\n1159:\t\tint ret;\n1160:\t\n1161:\t\tindio_dev = devm_iio_device_alloc(dev, sizeof(*mpu3050));\n1162:\t\tif (!indio_dev)\n1163:\t\t\treturn -ENOMEM;\n1164:\t\tmpu3050 = iio_priv(indio_dev);\n1165:\t\n1166:\t\tmpu3050-\u003edev = dev;\n1167:\t\tmpu3050-\u003emap = map;\n1168:\t\tmutex_init(\u0026mpu3050-\u003elock);\n1169:\t\t/* Default fullscale: 2000 degrees per second */\n1170:\t\tmpu3050-\u003efullscale = FS_2000_DPS;\n1171:\t\t/* 1 kHz, divide by 100, default frequency = 10 Hz */\n1172:\t\tmpu3050-\u003elpf = MPU3050_DLPF_CFG_188HZ;\n1173:\t\tmpu3050-\u003edivisor = 99;\n1174:\t\n1175:\t\t/* Read the mounting matrix, if present */\n1176:\t\tret = iio_read_mount_matrix(dev, \u0026mpu3050-\u003eorientation);\n1177:\t\tif (ret)\n1178:\t\t\treturn ret;\n1179:\t\n1180:\t\t/* Fetch and turn on regulators */\n1181:\t\tmpu3050-\u003eregs[0].supply = mpu3050_reg_vdd;\n1182:\t\tmpu3050-\u003eregs[1].supply = mpu3050_reg_vlogic;\n1183:\t\tret = devm_regulator_bulk_get(dev, ARRAY_SIZE(mpu3050-\u003eregs),\n1184:\t\t\t\t\t      mpu3050-\u003eregs);\n1185:\t\tif (ret)\n1186:\t\t\treturn dev_err_probe(dev, ret, \"Cannot get regulators\\n\");\n1187:\t\n1188:\t\tret = mpu3050_power_up(mpu3050);\n1189:\t\tif (ret)\n1190:\t\t\treturn ret;\n1191:\t\n1192:\t\tret = regmap_read(map, MPU3050_CHIP_ID_REG, \u0026val);\n1193:\t\tif (ret) {\n1194:\t\t\tdev_err(dev, \"could not read device ID\\n\");\n1195:\t\t\tret = -ENODEV;\n1196:\t\n1197:\t\t\tgoto err_power_down;\n1198:\t\t}\n1199:\t\n1200:\t\tif ((val \u0026 MPU3050_CHIP_ID_MASK) != MPU3050_CHIP_ID) {\n1201:\t\t\tdev_err(dev, \"unsupported chip id %02x\\n\",\n1202:\t\t\t\t\t(u8)(val \u0026 MPU3050_CHIP_ID_MASK));\n1203:\t\t\tret = -ENODEV;\n1204:\t\t\tgoto err_power_down;\n1205:\t\t}\n1206:\t\n1207:\t\tret = regmap_read(map, MPU3050_PRODUCT_ID_REG, \u0026val);\n1208:\t\tif (ret) {\n1209:\t\t\tdev_err(dev, \"could not read device ID\\n\");\n1210:\t\t\tret = -ENODEV;\n1211:\t\n1212:\t\t\tgoto err_power_down;\n1213:\t\t}\n1214:\t\tdev_info(dev, \"found MPU-3050 part no: %d, version: %d\\n\",\n1215:\t\t\t ((val \u003e\u003e 4) \u0026 0xf), (val \u0026 0xf));\n1216:\t\n1217:\t\tret = mpu3050_hw_init(mpu3050);\n1218:\t\tif (ret)\n1219:\t\t\tgoto err_power_down;\n1220:\t\n1221:\t\tindio_dev-\u003echannels = mpu3050_channels;\n1222:\t\tindio_dev-\u003enum_channels = ARRAY_SIZE(mpu3050_channels);\n1223:\t\tindio_dev-\u003einfo = \u0026mpu3050_info;\n1224:\t\tindio_dev-\u003eavailable_scan_masks = mpu3050_scan_masks;\n1225:\t\tindio_dev-\u003emodes = INDIO_DIRECT_MODE;\n1226:\t\tindio_dev-\u003ename = name;\n1227:\t\n1228:\t\tret = iio_triggered_buffer_setup(indio_dev, iio_pollfunc_store_time,\n1229:\t\t\t\t\t\t mpu3050_trigger_handler,\n"
}

11/2 2026/09/18 07:55 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 23837
							output: 37
							thoughts: 1817
						

Thoughts:
**Analysis of MPU3050 Driver Reachability in Virtualized Environments**

Okay, let's break this down. I'm looking at the `mpu3050_common_probe` function, specifically the chip ID check:

```c
		ret = regmap_read(map, MPU3050_CHIP_ID_REG, &val);
		if (ret) {
			dev_err(dev, "could not read device ID\n");
			ret = -ENODEV;
	
			goto err_power_down;
		}
	
		if ((val & MPU3050_CHIP_ID_MASK) != MPU3050_CHIP_ID) {
			dev_err(dev, "unsupported chip id %02x\n",
					(u8)(val & MPU3050_CHIP_ID_MASK));
			ret = -ENODEV;
			goto err_power_down;
		}
```

My initial thought is, can this driver ever successfully probe without the actual physical MPU-3050 hardware connected to an I2C bus?  No, standard virtualization doesn't emulate this. QEMU and GCE aren't going to magically present an MPU-3050.  And syzkaller definitely doesn't have an I2C device emulation backend for it.  Even if I try to manually create an I2C device with "mpu3050 0x68" via sysfs, the I2C transfer will fail, or the `regmap_read` will fail (or return the wrong chip ID), meaning `mpu3050_common_probe` immediately fails!

I need to confirm if there are any "structural" holes in my understanding.  Are there some mock or dummy I2C buses in the kernel? Are there alternative drivers related to the IIO or gyro system that could be used in lieu of real hardware?

Now, considering the instructions for determining "WorthFuzzing," it's clear reachability is the primary criterion.  The question is, does this modified code fall into the category of "Structurally unreachable hardware?" And I have to apply the explicit negative criteria.

Looking at the code, the function I'm concerned with is `mpu3050_drdy_trigger_set_state`.  This is the trigger operation for the MPU-3050's IIO trigger.  However, this trigger is only registered during `mpu3050_trigger_probe()`, which is called during `mpu3050_common_probe()`.  Since `mpu3050_common_probe` *cannot* succeed without the physical hardware and working I2C communication, the trigger's `set_dev_state` method can NEVER be executed in any standard virtualized environment.

I need to quickly rule out other scenarios. I checked for related dummy IIO drivers (like `CONFIG_IIO_DUMMY`) and confirmed that MPU3050 is a separate I2C driver (`CONFIG_MPU3050_I2C`).  I looked at `drivers/iio/gyro/Kconfig` to confirm, and to identify potential "structural" alternative options.

Therefore, because the MPU-3050 driver relies on physical hardware that's not emulated, and the code I'm looking at is part of a probe path that won't succeed, this code path is structurally unreachable.  The patch does not touch reachable executable code.



12/2 2026/09/18 07:55 tool read-file
0m Args:
{
  "File": "drivers/iio/gyro/Kconfig",
  "FirstLine": 125,
  "LineCount": 25
}

Results:
{
  "Contents": " 125:\t\tselect REGMAP\n 126:\t\n 127:\tconfig MPU3050_I2C\n 128:\t\ttristate \"Invensense MPU3050 devices on I2C\"\n 129:\t\tdepends on I2C\n 130:\t\tselect MPU3050\n 131:\t\tselect REGMAP_I2C\n 132:\t\tselect I2C_MUX\n 133:\t\thelp\n 134:\t\t  This driver supports the Invensense MPU3050 gyroscope over I2C.\n 135:\t\t  This driver can be built as a module. The module will be called\n 136:\t\t  inv-mpu3050-i2c.\n 137:\t\n 138:\tconfig IIO_ST_GYRO_3AXIS\n 139:\t\ttristate \"STMicroelectronics gyroscopes 3-Axis Driver\"\n 140:\t\tdepends on (I2C || SPI_MASTER) \u0026\u0026 SYSFS\n 141:\t\tselect IIO_ST_SENSORS_CORE\n 142:\t\tselect IIO_TRIGGERED_BUFFER if (IIO_BUFFER)\n 143:\t\thelp\n 144:\t\t  Say yes here to build support for STMicroelectronics gyroscopes:\n 145:\t\t  L3G4200D, LSM330DL, L3GD20, LSM330DLC, L3G4IS, LSM330, LSM9DS0.\n 146:\t\n 147:\t\t  Also need to enable at least one of I2C and SPI interface drivers\n 148:\t\t  below.\n 149:\t\n"
}

13/2 2026/09/18 07:55 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 26926
							output: 33
							thoughts: 27
						

Thoughts:
Here's my thought process, summarized as you requested:

**Investigating the MPU3050 Configuration**

Okay, so I'm diving into this and the first thing I need to do is verify the configuration for the `CONFIG_MPU3050` setting. Where is that actually defined? I need to track down the source file or Kconfig fragment that sets this variable. This is fundamental; I can't proceed without knowing how the system is handling the MPU3050's configuration. I need to understand its conditional logic, its dependencies, the default value, and any possible overrides. Knowing this will give me the information that I need to do my job, and is a prerequisite for any meaningful assessment of the MPU3050's integration or potential issues. The configuration system is the key.



14/2 2026/09/18 07:55 tool grepper
0m Args:
{
  "Expression": "config MPU3050\\b",
  "PathPrefix": "drivers/iio"
}

Results:
{
  "Output": "drivers/iio/gyro/Kconfig=111=config HID_SENSOR_GYRO_3D\n--\ndrivers/iio/gyro/Kconfig-120-\ndrivers/iio/gyro/Kconfig:121:config MPU3050\ndrivers/iio/gyro/Kconfig-122-\ttristate\n"
}

15/2 2026/09/18 07:55 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 27258
							output: 37
							thoughts: 25
						

Thoughts:
Okay, let's dive into this. Here's my perspective on lines 120-126 of `drivers/iio/gyro/Kconfig`:

**Analyzing the Gyroscope Kconfig Section**

Alright, I'm heading over to `drivers/iio/gyro/Kconfig`. This section is where the build configuration options for gyroscope drivers reside, right? Specifically, I need to focus on lines 120-126. I'm assuming it relates to a specific gyroscope or perhaps a common feature set. Hmm, the Kconfig language itself... I can already see the `config` keyword, which means we're dealing with a specific option that users can enable or disable. Now, let's see what this configuration option is about. The details in the following lines should tell us what it does.



16/2 2026/09/18 07:55 tool read-file
0m Args:
{
  "File": "drivers/iio/gyro/Kconfig",
  "FirstLine": 115,
  "LineCount": 15
}

Results:
{
  "Contents": " 115:\t\tselect HID_SENSOR_IIO_TRIGGER\n 116:\t\ttristate \"HID Gyroscope 3D\"\n 117:\t\thelp\n 118:\t\t  Say yes here to build support for the HID SENSOR\n 119:\t\t  Gyroscope 3D.\n 120:\t\n 121:\tconfig MPU3050\n 122:\t\ttristate\n 123:\t\tselect IIO_BUFFER\n 124:\t\tselect IIO_TRIGGERED_BUFFER\n 125:\t\tselect REGMAP\n 126:\t\n 127:\tconfig MPU3050_I2C\n 128:\t\ttristate \"Invensense MPU3050 devices on I2C\"\n 129:\t\tdepends on I2C\n"
}

17/2 2026/09/18 07:55 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 27719
							output: 20
							thoughts: 47
						

Thoughts:
**Investigating MPU3050 Configuration**

Okay, so the `MPU3050_I2C` config is the sole selector for the `MPU3050` device. That's a good starting point. Now, before I move on to assuming this is the only place it's touched, let's just confirm that nothing else in the system is inadvertently referencing or depending on the `MPU3050`. I need to ensure there are no other drivers, configurations, or dependencies that might implicitly or explicitly use this component. Quick double-check, no assumptions, just good practice.



18/2 2026/09/18 07:55 tool grepper
0m Args:
{
  "Expression": "MPU3050"
}

Results:
{
  "Output": "Documentation/firmware-guide/acpi/enumeration.rst=310=input driver::\n--\nDocumentation/firmware-guide/acpi/enumeration.rst-312-\tstatic const struct acpi_device_id mpu3050_acpi_match[] = {\nDocumentation/firmware-guide/acpi/enumeration.rst:313:\t\t{ \"MPU3050\", 0 },\nDocumentation/firmware-guide/acpi/enumeration.rst-314-\t\t{ }\n--\narch/arm/boot/dts/st/ste-ux500-samsung-gavini.dts=782=\t\t\tgavini_cfg1 {\n--\narch/arm/boot/dts/st/ste-ux500-samsung-gavini.dts-787-\t};\narch/arm/boot/dts/st/ste-ux500-samsung-gavini.dts:788:\t/* Interrupt line for Invensense MPU3050 gyroscope */\narch/arm/boot/dts/st/ste-ux500-samsung-gavini.dts-789-\tmpu3050 {\n--\narch/arm/boot/dts/st/ste-ux500-samsung-janice.dts=862=\t\t\tjanice_cfg1 {\n--\narch/arm/boot/dts/st/ste-ux500-samsung-janice.dts-867-\t};\narch/arm/boot/dts/st/ste-ux500-samsung-janice.dts:868:\t/* Interrupt line for Invensense MPU3050 gyroscope */\narch/arm/boot/dts/st/ste-ux500-samsung-janice.dts-869-\tmpu3050 {\n--\narch/arm/configs/multi_v7_defconfig=1196=CONFIG_STM32_DAC=m\narch/arm/configs/multi_v7_defconfig:1197:CONFIG_MPU3050_I2C=y\narch/arm/configs/multi_v7_defconfig-1198-CONFIG_IIO_ST_GYRO_3AXIS=m\n--\narch/arm/configs/omap2plus_defconfig=657=CONFIG_BMG160=m\narch/arm/configs/omap2plus_defconfig:658:CONFIG_MPU3050_I2C=m\narch/arm/configs/omap2plus_defconfig-659-CONFIG_ITG3200=m\n--\narch/arm/configs/qcom_defconfig=258=CONFIG_QCOM_SPMI_VADC=m\narch/arm/configs/qcom_defconfig:259:CONFIG_MPU3050_I2C=y\narch/arm/configs/qcom_defconfig-260-CONFIG_INV_MPU6050_I2C=m\n--\narch/arm/configs/tegra_defconfig=302=CONFIG_KXCJK1013=y\narch/arm/configs/tegra_defconfig:303:CONFIG_MPU3050_I2C=y\narch/arm/configs/tegra_defconfig-304-CONFIG_INV_MPU6050_I2C=y\n--\narch/arm/configs/u8500_defconfig=157=CONFIG_IIO_RESCALE=y\narch/arm/configs/u8500_defconfig:158:CONFIG_MPU3050_I2C=y\narch/arm/configs/u8500_defconfig-159-CONFIG_IIO_ST_GYRO_3AXIS=y\n--\ndrivers/iio/gyro/Kconfig=111=config HID_SENSOR_GYRO_3D\n--\ndrivers/iio/gyro/Kconfig-120-\ndrivers/iio/gyro/Kconfig:121:config MPU3050\ndrivers/iio/gyro/Kconfig-122-\ttristate\n--\ndrivers/iio/gyro/Kconfig-126-\ndrivers/iio/gyro/Kconfig:127:config MPU3050_I2C\ndrivers/iio/gyro/Kconfig:128:\ttristate \"Invensense MPU3050 devices on I2C\"\ndrivers/iio/gyro/Kconfig-129-\tdepends on I2C\ndrivers/iio/gyro/Kconfig:130:\tselect MPU3050\ndrivers/iio/gyro/Kconfig-131-\tselect REGMAP_I2C\n--\ndrivers/iio/gyro/Kconfig-133-\thelp\ndrivers/iio/gyro/Kconfig:134:\t  This driver supports the Invensense MPU3050 gyroscope over I2C.\ndrivers/iio/gyro/Kconfig-135-\t  This driver can be built as a module. The module will be called\n--\ndrivers/iio/gyro/Makefile=20=obj-$(CONFIG_HID_SENSOR_GYRO_3D) += hid-sensor-gyro-3d.o\n--\ndrivers/iio/gyro/Makefile-23-# we ever create a separate SPI interface for MPU-3050\ndrivers/iio/gyro/Makefile:24:obj-$(CONFIG_MPU3050) += mpu3050.o\ndrivers/iio/gyro/Makefile-25-mpu3050-objs := mpu3050-core.o mpu3050-i2c.o\n--\ndrivers/iio/gyro/mpu3050-core.c-2-/*\ndrivers/iio/gyro/mpu3050-core.c:3: * MPU3050 gyroscope driver\ndrivers/iio/gyro/mpu3050-core.c-4- *\n--\ndrivers/iio/gyro/mpu3050-core.c-34-\ndrivers/iio/gyro/mpu3050-core.c:35:#define MPU3050_CHIP_ID\t\t0x68\ndrivers/iio/gyro/mpu3050-core.c:36:#define MPU3050_CHIP_ID_MASK\t0x7E\ndrivers/iio/gyro/mpu3050-core.c-37-\n--\ndrivers/iio/gyro/mpu3050-core.c-42- */\ndrivers/iio/gyro/mpu3050-core.c:43:#define MPU3050_CHIP_ID_REG\t0x00\ndrivers/iio/gyro/mpu3050-core.c:44:#define MPU3050_PRODUCT_ID_REG\t0x01\ndrivers/iio/gyro/mpu3050-core.c:45:#define MPU3050_XG_OFFS_TC\t0x05\ndrivers/iio/gyro/mpu3050-core.c:46:#define MPU3050_YG_OFFS_TC\t0x08\ndrivers/iio/gyro/mpu3050-core.c:47:#define MPU3050_ZG_OFFS_TC\t0x0B\ndrivers/iio/gyro/mpu3050-core.c:48:#define MPU3050_X_OFFS_USR_H\t0x0C\ndrivers/iio/gyro/mpu3050-core.c:49:#define MPU3050_Y_OFFS_USR_H\t0x0E\ndrivers/iio/gyro/mpu3050-core.c:50:#define MPU3050_Z_OFFS_USR_H\t0x10\ndrivers/iio/gyro/mpu3050-core.c:51:#define MPU3050_FIFO_EN\t\t0x12\ndrivers/iio/gyro/mpu3050-core.c:52:#define MPU3050_AUX_VDDIO\t0x13\ndrivers/iio/gyro/mpu3050-core.c:53:#define MPU3050_SLV_ADDR\t0x14\ndrivers/iio/gyro/mpu3050-core.c:54:#define MPU3050_SMPLRT_DIV\t0x15\ndrivers/iio/gyro/mpu3050-core.c:55:#define MPU3050_DLPF_FS_SYNC\t0x16\ndrivers/iio/gyro/mpu3050-core.c:56:#define MPU3050_INT_CFG\t\t0x17\ndrivers/iio/gyro/mpu3050-core.c:57:#define MPU3050_AUX_ADDR\t0x18\ndrivers/iio/gyro/mpu3050-core.c:58:#define MPU3050_INT_STATUS\t0x1A\ndrivers/iio/gyro/mpu3050-core.c:59:#define MPU3050_TEMP_H\t\t0x1B\ndrivers/iio/gyro/mpu3050-core.c:60:#define MPU3050_XOUT_H\t\t0x1D\ndrivers/iio/gyro/mpu3050-core.c:61:#define MPU3050_YOUT_H\t\t0x1F\ndrivers/iio/gyro/mpu3050-core.c:62:#define MPU3050_ZOUT_H\t\t0x21\ndrivers/iio/gyro/mpu3050-core.c:63:#define MPU3050_DMP_CFG1\t0x35\ndrivers/iio/gyro/mpu3050-core.c:64:#define MPU3050_DMP_CFG2\t0x36\ndrivers/iio/gyro/mpu3050-core.c:65:#define MPU3050_BANK_SEL\t0x37\ndrivers/iio/gyro/mpu3050-core.c:66:#define MPU3050_MEM_START_ADDR\t0x38\ndrivers/iio/gyro/mpu3050-core.c:67:#define MPU3050_MEM_R_W\t\t0x39\ndrivers/iio/gyro/mpu3050-core.c:68:#define MPU3050_FIFO_COUNT_H\t0x3A\ndrivers/iio/gyro/mpu3050-core.c:69:#define MPU3050_FIFO_R\t\t0x3C\ndrivers/iio/gyro/mpu3050-core.c:70:#define MPU3050_USR_CTRL\t0x3D\ndrivers/iio/gyro/mpu3050-core.c:71:#define MPU3050_PWR_MGM\t\t0x3E\ndrivers/iio/gyro/mpu3050-core.c-72-\ndrivers/iio/gyro/mpu3050-core.c-73-/* MPU memory bank read options */\ndrivers/iio/gyro/mpu3050-core.c:74:#define MPU3050_MEM_PRFTCH\tBIT(5)\ndrivers/iio/gyro/mpu3050-core.c:75:#define MPU3050_MEM_USER_BANK\tBIT(4)\ndrivers/iio/gyro/mpu3050-core.c-76-/* Bits 8-11 select memory bank */\ndrivers/iio/gyro/mpu3050-core.c:77:#define MPU3050_MEM_RAM_BANK_0\t0\ndrivers/iio/gyro/mpu3050-core.c:78:#define MPU3050_MEM_RAM_BANK_1\t1\ndrivers/iio/gyro/mpu3050-core.c:79:#define MPU3050_MEM_RAM_BANK_2\t2\ndrivers/iio/gyro/mpu3050-core.c:80:#define MPU3050_MEM_RAM_BANK_3\t3\ndrivers/iio/gyro/mpu3050-core.c:81:#define MPU3050_MEM_OTP_BANK_0\t4\ndrivers/iio/gyro/mpu3050-core.c-82-\ndrivers/iio/gyro/mpu3050-core.c:83:#define MPU3050_AXIS_REGS(axis) (MPU3050_XOUT_H + (axis * 2))\ndrivers/iio/gyro/mpu3050-core.c-84-\n--\ndrivers/iio/gyro/mpu3050-core.c-87-/* FIFO Enable */\ndrivers/iio/gyro/mpu3050-core.c:88:#define MPU3050_FIFO_EN_FOOTER\t\tBIT(0)\ndrivers/iio/gyro/mpu3050-core.c:89:#define MPU3050_FIFO_EN_AUX_ZOUT\tBIT(1)\ndrivers/iio/gyro/mpu3050-core.c:90:#define MPU3050_FIFO_EN_AUX_YOUT\tBIT(2)\ndrivers/iio/gyro/mpu3050-core.c:91:#define MPU3050_FIFO_EN_AUX_XOUT\tBIT(3)\ndrivers/iio/gyro/mpu3050-core.c:92:#define MPU3050_FIFO_EN_GYRO_ZOUT\tBIT(4)\ndrivers/iio/gyro/mpu3050-core.c:93:#define MPU3050_FIFO_EN_GYRO_YOUT\tBIT(5)\ndrivers/iio/gyro/mpu3050-core.c:94:#define MPU3050_FIFO_EN_GYRO_XOUT\tBIT(6)\ndrivers/iio/gyro/mpu3050-core.c:95:#define MPU3050_FIFO_EN_TEMP_OUT\tBIT(7)\ndrivers/iio/gyro/mpu3050-core.c-96-\n--\ndrivers/iio/gyro/mpu3050-core.c-101- */\ndrivers/iio/gyro/mpu3050-core.c:102:#define MPU3050_EXT_SYNC_NONE\t\t0x00\ndrivers/iio/gyro/mpu3050-core.c:103:#define MPU3050_EXT_SYNC_TEMP\t\t0x20\ndrivers/iio/gyro/mpu3050-core.c:104:#define MPU3050_EXT_SYNC_GYROX\t\t0x40\ndrivers/iio/gyro/mpu3050-core.c:105:#define MPU3050_EXT_SYNC_GYROY\t\t0x60\ndrivers/iio/gyro/mpu3050-core.c:106:#define MPU3050_EXT_SYNC_GYROZ\t\t0x80\ndrivers/iio/gyro/mpu3050-core.c:107:#define MPU3050_EXT_SYNC_ACCELX\t0xA0\ndrivers/iio/gyro/mpu3050-core.c:108:#define MPU3050_EXT_SYNC_ACCELY\t0xC0\ndrivers/iio/gyro/mpu3050-core.c:109:#define MPU3050_EXT_SYNC_ACCELZ\t0xE0\ndrivers/iio/gyro/mpu3050-core.c:110:#define MPU3050_EXT_SYNC_MASK\t\t0xE0\ndrivers/iio/gyro/mpu3050-core.c:111:#define MPU3050_EXT_SYNC_SHIFT\t\t5\ndrivers/iio/gyro/mpu3050-core.c-112-\ndrivers/iio/gyro/mpu3050-core.c:113:#define MPU3050_FS_250DPS\t\t0x00\ndrivers/iio/gyro/mpu3050-core.c:114:#define MPU3050_FS_500DPS\t\t0x08\ndrivers/iio/gyro/mpu3050-core.c:115:#define MPU3050_FS_1000DPS\t\t0x10\ndrivers/iio/gyro/mpu3050-core.c:116:#define MPU3050_FS_2000DPS\t\t0x18\ndrivers/iio/gyro/mpu3050-core.c:117:#define MPU3050_FS_MASK\t\t\t0x18\ndrivers/iio/gyro/mpu3050-core.c:118:#define MPU3050_FS_SHIFT\t\t3\ndrivers/iio/gyro/mpu3050-core.c-119-\ndrivers/iio/gyro/mpu3050-core.c:120:#define MPU3050_DLPF_CFG_256HZ_NOLPF2\t0x00\ndrivers/iio/gyro/mpu3050-core.c:121:#define MPU3050_DLPF_CFG_188HZ\t\t0x01\ndrivers/iio/gyro/mpu3050-core.c:122:#define MPU3050_DLPF_CFG_98HZ\t\t0x02\ndrivers/iio/gyro/mpu3050-core.c:123:#define MPU3050_DLPF_CFG_42HZ\t\t0x03\ndrivers/iio/gyro/mpu3050-core.c:124:#define MPU3050_DLPF_CFG_20HZ\t\t0x04\ndrivers/iio/gyro/mpu3050-core.c:125:#define MPU3050_DLPF_CFG_10HZ\t\t0x05\ndrivers/iio/gyro/mpu3050-core.c:126:#define MPU3050_DLPF_CFG_5HZ\t\t0x06\ndrivers/iio/gyro/mpu3050-core.c:127:#define MPU3050_DLPF_CFG_2100HZ_NOLPF\t0x07\ndrivers/iio/gyro/mpu3050-core.c:128:#define MPU3050_DLPF_CFG_MASK\t\t0x07\ndrivers/iio/gyro/mpu3050-core.c:129:#define MPU3050_DLPF_CFG_SHIFT\t\t0\ndrivers/iio/gyro/mpu3050-core.c-130-\ndrivers/iio/gyro/mpu3050-core.c-131-/* Interrupt config */\ndrivers/iio/gyro/mpu3050-core.c:132:#define MPU3050_INT_RAW_RDY_EN\t\tBIT(0)\ndrivers/iio/gyro/mpu3050-core.c:133:#define MPU3050_INT_DMP_DONE_EN\t\tBIT(1)\ndrivers/iio/gyro/mpu3050-core.c:134:#define MPU3050_INT_MPU_RDY_EN\t\tBIT(2)\ndrivers/iio/gyro/mpu3050-core.c:135:#define MPU3050_INT_ANYRD_2CLEAR\tBIT(4)\ndrivers/iio/gyro/mpu3050-core.c:136:#define MPU3050_INT_LATCH_EN\t\tBIT(5)\ndrivers/iio/gyro/mpu3050-core.c:137:#define MPU3050_INT_OPEN\t\tBIT(6)\ndrivers/iio/gyro/mpu3050-core.c:138:#define MPU3050_INT_ACTL\t\tBIT(7)\ndrivers/iio/gyro/mpu3050-core.c-139-/* Interrupt status */\ndrivers/iio/gyro/mpu3050-core.c:140:#define MPU3050_INT_STATUS_RAW_RDY\tBIT(0)\ndrivers/iio/gyro/mpu3050-core.c:141:#define MPU3050_INT_STATUS_DMP_DONE\tBIT(1)\ndrivers/iio/gyro/mpu3050-core.c:142:#define MPU3050_INT_STATUS_MPU_RDY\tBIT(2)\ndrivers/iio/gyro/mpu3050-core.c:143:#define MPU3050_INT_STATUS_FIFO_OVFLW\tBIT(7)\ndrivers/iio/gyro/mpu3050-core.c-144-/* USR_CTRL */\ndrivers/iio/gyro/mpu3050-core.c:145:#define MPU3050_USR_CTRL_FIFO_EN\tBIT(6)\ndrivers/iio/gyro/mpu3050-core.c:146:#define MPU3050_USR_CTRL_AUX_IF_EN\tBIT(5)\ndrivers/iio/gyro/mpu3050-core.c:147:#define MPU3050_USR_CTRL_AUX_IF_RST\tBIT(3)\ndrivers/iio/gyro/mpu3050-core.c:148:#define MPU3050_USR_CTRL_FIFO_RST\tBIT(1)\ndrivers/iio/gyro/mpu3050-core.c:149:#define MPU3050_USR_CTRL_GYRO_RST\tBIT(0)\ndrivers/iio/gyro/mpu3050-core.c-150-/* PWR_MGM */\ndrivers/iio/gyro/mpu3050-core.c:151:#define MPU3050_PWR_MGM_PLL_X\t\t0x01\ndrivers/iio/gyro/mpu3050-core.c:152:#define MPU3050_PWR_MGM_PLL_Y\t\t0x02\ndrivers/iio/gyro/mpu3050-core.c:153:#define MPU3050_PWR_MGM_PLL_Z\t\t0x03\ndrivers/iio/gyro/mpu3050-core.c:154:#define MPU3050_PWR_MGM_CLKSEL_MASK\t0x07\ndrivers/iio/gyro/mpu3050-core.c:155:#define MPU3050_PWR_MGM_STBY_ZG\t\tBIT(3)\ndrivers/iio/gyro/mpu3050-core.c:156:#define MPU3050_PWR_MGM_STBY_YG\t\tBIT(4)\ndrivers/iio/gyro/mpu3050-core.c:157:#define MPU3050_PWR_MGM_STBY_XG\t\tBIT(5)\ndrivers/iio/gyro/mpu3050-core.c:158:#define MPU3050_PWR_MGM_SLEEP\t\tBIT(6)\ndrivers/iio/gyro/mpu3050-core.c:159:#define MPU3050_PWR_MGM_RESET\t\tBIT(7)\ndrivers/iio/gyro/mpu3050-core.c:160:#define MPU3050_PWR_MGM_MASK\t\t0xff\ndrivers/iio/gyro/mpu3050-core.c-161-\n--\ndrivers/iio/gyro/mpu3050-core.c=180=static unsigned int mpu3050_get_freq(struct mpu3050 *mpu3050)\n--\ndrivers/iio/gyro/mpu3050-core.c-183-\ndrivers/iio/gyro/mpu3050-core.c:184:\tif (mpu3050-\u003elpf == MPU3050_DLPF_CFG_256HZ_NOLPF2)\ndrivers/iio/gyro/mpu3050-core.c-185-\t\tfreq = 8000;\n--\ndrivers/iio/gyro/mpu3050-core.c=193=static int mpu3050_start_sampling(struct mpu3050 *mpu3050)\n--\ndrivers/iio/gyro/mpu3050-core.c-199-\t/* Reset */\ndrivers/iio/gyro/mpu3050-core.c:200:\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c:201:\t\t\t      MPU3050_PWR_MGM_RESET);\ndrivers/iio/gyro/mpu3050-core.c-202-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-205-\t/* Turn on the Z-axis PLL */\ndrivers/iio/gyro/mpu3050-core.c:206:\tret = regmap_update_bits(mpu3050-\u003emap, MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c:207:\t\t\t\t MPU3050_PWR_MGM_CLKSEL_MASK,\ndrivers/iio/gyro/mpu3050-core.c:208:\t\t\t\t MPU3050_PWR_MGM_PLL_Z);\ndrivers/iio/gyro/mpu3050-core.c-209-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-215-\ndrivers/iio/gyro/mpu3050-core.c:216:\tret = regmap_bulk_write(mpu3050-\u003emap, MPU3050_X_OFFS_USR_H, raw_val,\ndrivers/iio/gyro/mpu3050-core.c-217-\t\t\t\tsizeof(raw_val));\n--\ndrivers/iio/gyro/mpu3050-core.c-221-\t/* Set low pass filter (sample rate), sync and full scale */\ndrivers/iio/gyro/mpu3050-core.c:222:\tret = regmap_write(mpu3050-\u003emap, MPU3050_DLPF_FS_SYNC,\ndrivers/iio/gyro/mpu3050-core.c:223:\t\t\t   MPU3050_EXT_SYNC_NONE \u003c\u003c MPU3050_EXT_SYNC_SHIFT |\ndrivers/iio/gyro/mpu3050-core.c:224:\t\t\t   mpu3050-\u003efullscale \u003c\u003c MPU3050_FS_SHIFT |\ndrivers/iio/gyro/mpu3050-core.c:225:\t\t\t   mpu3050-\u003elpf \u003c\u003c MPU3050_DLPF_CFG_SHIFT);\ndrivers/iio/gyro/mpu3050-core.c-226-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-229-\t/* Set up sampling frequency */\ndrivers/iio/gyro/mpu3050-core.c:230:\tret = regmap_write(mpu3050-\u003emap, MPU3050_SMPLRT_DIV, mpu3050-\u003edivisor);\ndrivers/iio/gyro/mpu3050-core.c-231-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c=263=static int mpu3050_read_raw(struct iio_dev *indio_dev,\n--\ndrivers/iio/gyro/mpu3050-core.c-335-\t\tcase IIO_TEMP:\ndrivers/iio/gyro/mpu3050-core.c:336:\t\t\tret = regmap_bulk_read(mpu3050-\u003emap, MPU3050_TEMP_H,\ndrivers/iio/gyro/mpu3050-core.c-337-\t\t\t\t\t       \u0026raw_val, sizeof(raw_val));\n--\ndrivers/iio/gyro/mpu3050-core.c-349-\t\t\tret = regmap_bulk_read(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c:350:\t\t\t\t       MPU3050_AXIS_REGS(chan-\u003escan_index-1),\ndrivers/iio/gyro/mpu3050-core.c-351-\t\t\t\t       \u0026raw_val,\n--\ndrivers/iio/gyro/mpu3050-core.c=470=static irqreturn_t mpu3050_trigger_handler(int irq, void *p)\n--\ndrivers/iio/gyro/mpu3050-core.c-504-\t\tret = regmap_bulk_read(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c:505:\t\t\t\t       MPU3050_FIFO_COUNT_H,\ndrivers/iio/gyro/mpu3050-core.c-506-\t\t\t\t       \u0026raw_fifocnt,\n--\ndrivers/iio/gyro/mpu3050-core.c-516-\t\t\t/* Reset and enable the FIFO */\ndrivers/iio/gyro/mpu3050-core.c:517:\t\t\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_USR_CTRL,\ndrivers/iio/gyro/mpu3050-core.c:518:\t\t\t\t\t      MPU3050_USR_CTRL_FIFO_EN |\ndrivers/iio/gyro/mpu3050-core.c:519:\t\t\t\t\t      MPU3050_USR_CTRL_FIFO_RST);\ndrivers/iio/gyro/mpu3050-core.c-520-\t\t\tif (ret) {\n--\ndrivers/iio/gyro/mpu3050-core.c-555-\t\t\tret = regmap_bulk_read(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c:556:\t\t\t\t\t       MPU3050_FIFO_R,\ndrivers/iio/gyro/mpu3050-core.c-557-\t\t\t\t\t       \u0026fifo_values[offset],\n--\ndrivers/iio/gyro/mpu3050-core.c-585-\t\t\t\tret = regmap_bulk_read(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c:586:\t\t\t\t\t\t       MPU3050_FIFO_COUNT_H,\ndrivers/iio/gyro/mpu3050-core.c-587-\t\t\t\t\t\t       \u0026raw_fifocnt,\n--\ndrivers/iio/gyro/mpu3050-core.c-631-\ndrivers/iio/gyro/mpu3050-core.c:632:\tret = regmap_bulk_read(mpu3050-\u003emap, MPU3050_TEMP_H, scan.chans,\ndrivers/iio/gyro/mpu3050-core.c-633-\t\t\t       sizeof(scan.chans));\n--\ndrivers/iio/gyro/mpu3050-core.c=691=static const struct iio_chan_spec_ext_info mpu3050_ext_info[] = {\n--\ndrivers/iio/gyro/mpu3050-core.c-695-\ndrivers/iio/gyro/mpu3050-core.c:696:#define MPU3050_AXIS_CHANNEL(axis, index)\t\t\t\t\\\ndrivers/iio/gyro/mpu3050-core.c-697-\t{\t\t\t\t\t\t\t\t\\\n--\ndrivers/iio/gyro/mpu3050-core.c=715=static const struct iio_chan_spec mpu3050_channels[] = {\n--\ndrivers/iio/gyro/mpu3050-core.c-729-\t},\ndrivers/iio/gyro/mpu3050-core.c:730:\tMPU3050_AXIS_CHANNEL(X, 1),\ndrivers/iio/gyro/mpu3050-core.c:731:\tMPU3050_AXIS_CHANNEL(Y, 2),\ndrivers/iio/gyro/mpu3050-core.c:732:\tMPU3050_AXIS_CHANNEL(Z, 3),\ndrivers/iio/gyro/mpu3050-core.c-733-\tIIO_CHAN_SOFT_TIMESTAMP(4),\n--\ndrivers/iio/gyro/mpu3050-core.c=772=static int mpu3050_read_mem(struct mpu3050 *mpu3050,\n--\ndrivers/iio/gyro/mpu3050-core.c-780-\tret = regmap_write(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c:781:\t\t\t   MPU3050_BANK_SEL,\ndrivers/iio/gyro/mpu3050-core.c-782-\t\t\t   bank);\n--\ndrivers/iio/gyro/mpu3050-core.c-786-\tret = regmap_write(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c:787:\t\t\t   MPU3050_MEM_START_ADDR,\ndrivers/iio/gyro/mpu3050-core.c-788-\t\t\t   addr);\n--\ndrivers/iio/gyro/mpu3050-core.c-792-\treturn regmap_bulk_read(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c:793:\t\t\t\tMPU3050_MEM_R_W,\ndrivers/iio/gyro/mpu3050-core.c-794-\t\t\t\tbuf,\n--\ndrivers/iio/gyro/mpu3050-core.c=798=static int mpu3050_hw_init(struct mpu3050 *mpu3050)\n--\ndrivers/iio/gyro/mpu3050-core.c-804-\t/* Reset */\ndrivers/iio/gyro/mpu3050-core.c:805:\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c:806:\t\t\t      MPU3050_PWR_MGM_RESET);\ndrivers/iio/gyro/mpu3050-core.c-807-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-811-\tret = regmap_update_bits(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c:812:\t\t\t\t MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c:813:\t\t\t\t MPU3050_PWR_MGM_CLKSEL_MASK,\ndrivers/iio/gyro/mpu3050-core.c:814:\t\t\t\t MPU3050_PWR_MGM_PLL_Z);\ndrivers/iio/gyro/mpu3050-core.c-815-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-819-\tret = regmap_write(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c:820:\t\t\t   MPU3050_INT_CFG,\ndrivers/iio/gyro/mpu3050-core.c-821-\t\t\t   0);\n--\ndrivers/iio/gyro/mpu3050-core.c-826-\tret = mpu3050_read_mem(mpu3050,\ndrivers/iio/gyro/mpu3050-core.c:827:\t\t\t       (MPU3050_MEM_PRFTCH |\ndrivers/iio/gyro/mpu3050-core.c:828:\t\t\t\tMPU3050_MEM_USER_BANK |\ndrivers/iio/gyro/mpu3050-core.c:829:\t\t\t\tMPU3050_MEM_OTP_BANK_0),\ndrivers/iio/gyro/mpu3050-core.c-830-\t\t\t       0,\n--\ndrivers/iio/gyro/mpu3050-core.c=860=static int mpu3050_power_up(struct mpu3050 *mpu3050)\n--\ndrivers/iio/gyro/mpu3050-core.c-875-\t/* Take device out of sleep mode */\ndrivers/iio/gyro/mpu3050-core.c:876:\tret = regmap_clear_bits(mpu3050-\u003emap, MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c:877:\t\t\t\tMPU3050_PWR_MGM_SLEEP);\ndrivers/iio/gyro/mpu3050-core.c-878-\tif (ret) {\n--\ndrivers/iio/gyro/mpu3050-core.c=888=static int mpu3050_power_down(struct mpu3050 *mpu3050)\n--\ndrivers/iio/gyro/mpu3050-core.c-898-\t */\ndrivers/iio/gyro/mpu3050-core.c:899:\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_PWR_MGM,\ndrivers/iio/gyro/mpu3050-core.c:900:\t\t\t      MPU3050_PWR_MGM_SLEEP);\ndrivers/iio/gyro/mpu3050-core.c-901-\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c=926=static irqreturn_t mpu3050_irq_thread(int irq, void *p)\n--\ndrivers/iio/gyro/mpu3050-core.c-934-\t/* ACK IRQ and check if it was from us */\ndrivers/iio/gyro/mpu3050-core.c:935:\tret = regmap_read(mpu3050-\u003emap, MPU3050_INT_STATUS, \u0026val);\ndrivers/iio/gyro/mpu3050-core.c-936-\tif (ret) {\n--\ndrivers/iio/gyro/mpu3050-core.c-939-\t}\ndrivers/iio/gyro/mpu3050-core.c:940:\tif (!(val \u0026 MPU3050_INT_STATUS_RAW_RDY))\ndrivers/iio/gyro/mpu3050-core.c-941-\t\treturn IRQ_NONE;\n--\ndrivers/iio/gyro/mpu3050-core.c=953=static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,\n--\ndrivers/iio/gyro/mpu3050-core.c-964-\t\tret = regmap_write(mpu3050-\u003emap,\ndrivers/iio/gyro/mpu3050-core.c:965:\t\t\t\t   MPU3050_INT_CFG,\ndrivers/iio/gyro/mpu3050-core.c-966-\t\t\t\t   0);\n--\ndrivers/iio/gyro/mpu3050-core.c-970-\t\t/* Clear IRQ flag */\ndrivers/iio/gyro/mpu3050-core.c:971:\t\tret = regmap_read(mpu3050-\u003emap, MPU3050_INT_STATUS, \u0026val);\ndrivers/iio/gyro/mpu3050-core.c-972-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-975-\t\t/* Disable all things in the FIFO and reset it */\ndrivers/iio/gyro/mpu3050-core.c:976:\t\tret = regmap_write(mpu3050-\u003emap, MPU3050_FIFO_EN, 0);\ndrivers/iio/gyro/mpu3050-core.c-977-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-979-\ndrivers/iio/gyro/mpu3050-core.c:980:\t\tret = regmap_write(mpu3050-\u003emap, MPU3050_USR_CTRL,\ndrivers/iio/gyro/mpu3050-core.c:981:\t\t\t\t   MPU3050_USR_CTRL_FIFO_RST);\ndrivers/iio/gyro/mpu3050-core.c-982-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-997-\t\t/* Disable all things in the FIFO */\ndrivers/iio/gyro/mpu3050-core.c:998:\t\tret = regmap_write(mpu3050-\u003emap, MPU3050_FIFO_EN, 0);\ndrivers/iio/gyro/mpu3050-core.c-999-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-1002-\t\t/* Reset and enable the FIFO */\ndrivers/iio/gyro/mpu3050-core.c:1003:\t\tret = regmap_set_bits(mpu3050-\u003emap, MPU3050_USR_CTRL,\ndrivers/iio/gyro/mpu3050-core.c:1004:\t\t\t\t      MPU3050_USR_CTRL_FIFO_EN |\ndrivers/iio/gyro/mpu3050-core.c:1005:\t\t\t\t      MPU3050_USR_CTRL_FIFO_RST);\ndrivers/iio/gyro/mpu3050-core.c-1006-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-1011-\t\t/* Turn on the FIFO for temp+X+Y+Z */\ndrivers/iio/gyro/mpu3050-core.c:1012:\t\tret = regmap_write(mpu3050-\u003emap, MPU3050_FIFO_EN,\ndrivers/iio/gyro/mpu3050-core.c:1013:\t\t\t\t   MPU3050_FIFO_EN_TEMP_OUT |\ndrivers/iio/gyro/mpu3050-core.c:1014:\t\t\t\t   MPU3050_FIFO_EN_GYRO_XOUT |\ndrivers/iio/gyro/mpu3050-core.c:1015:\t\t\t\t   MPU3050_FIFO_EN_GYRO_YOUT |\ndrivers/iio/gyro/mpu3050-core.c:1016:\t\t\t\t   MPU3050_FIFO_EN_GYRO_ZOUT |\ndrivers/iio/gyro/mpu3050-core.c:1017:\t\t\t\t   MPU3050_FIFO_EN_FOOTER);\ndrivers/iio/gyro/mpu3050-core.c-1018-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-1026-\t\t/* Clear IRQ flag */\ndrivers/iio/gyro/mpu3050-core.c:1027:\t\tret = regmap_read(mpu3050-\u003emap, MPU3050_INT_STATUS, \u0026val);\ndrivers/iio/gyro/mpu3050-core.c-1028-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c-1031-\t\t/* Give us interrupts whenever there is new data ready */\ndrivers/iio/gyro/mpu3050-core.c:1032:\t\tval = MPU3050_INT_RAW_RDY_EN;\ndrivers/iio/gyro/mpu3050-core.c-1033-\ndrivers/iio/gyro/mpu3050-core.c-1034-\t\tif (mpu3050-\u003eirq_actl)\ndrivers/iio/gyro/mpu3050-core.c:1035:\t\t\tval |= MPU3050_INT_ACTL;\ndrivers/iio/gyro/mpu3050-core.c-1036-\t\tif (mpu3050-\u003eirq_latch)\ndrivers/iio/gyro/mpu3050-core.c:1037:\t\t\tval |= MPU3050_INT_LATCH_EN;\ndrivers/iio/gyro/mpu3050-core.c-1038-\t\tif (mpu3050-\u003eirq_opendrain)\ndrivers/iio/gyro/mpu3050-core.c:1039:\t\t\tval |= MPU3050_INT_OPEN;\ndrivers/iio/gyro/mpu3050-core.c-1040-\ndrivers/iio/gyro/mpu3050-core.c:1041:\t\tret = regmap_write(mpu3050-\u003emap, MPU3050_INT_CFG, val);\ndrivers/iio/gyro/mpu3050-core.c-1042-\t\tif (ret)\n--\ndrivers/iio/gyro/mpu3050-core.c=1151=int mpu3050_common_probe(struct device *dev,\n--\ndrivers/iio/gyro/mpu3050-core.c-1171-\t/* 1 kHz, divide by 100, default frequency = 10 Hz */\ndrivers/iio/gyro/mpu3050-core.c:1172:\tmpu3050-\u003elpf = MPU3050_DLPF_CFG_188HZ;\ndrivers/iio/gyro/mpu3050-core.c-1173-\tmpu3050-\u003edivisor = 99;\n--\ndrivers/iio/gyro/mpu3050-core.c-1191-\ndrivers/iio/gyro/mpu3050-core.c:1192:\tret = regmap_read(map, MPU3050_CHIP_ID_REG, \u0026val);\ndrivers/iio/gyro/mpu3050-core.c-1193-\tif (ret) {\n--\ndrivers/iio/gyro/mpu3050-core.c-1199-\ndrivers/iio/gyro/mpu3050-core.c:1200:\tif ((val \u0026 MPU3050_CHIP_ID_MASK) != MPU3050_CHIP_ID) {\ndrivers/iio/gyro/mpu3050-core.c-1201-\t\tdev_err(dev, \"unsupported chip id %02x\\n\",\ndrivers/iio/gyro/mpu3050-core.c:1202:\t\t\t\t(u8)(val \u0026 MPU3050_CHIP_ID_MASK));\ndrivers/iio/gyro/mpu3050-core.c-1203-\t\tret = -ENODEV;\n--\ndrivers/iio/gyro/mpu3050-core.c-1206-\ndrivers/iio/gyro/mpu3050-core.c:1207:\tret = regmap_read(map, MPU3050_PRODUCT_ID_REG, \u0026val);\ndrivers/iio/gyro/mpu3050-core.c-1208-\tif (ret) {\n--\ndrivers/iio/gyro/mpu3050-core.c=1306=MODULE_AUTHOR(\"Linus Walleij\");\ndrivers/iio/gyro/mpu3050-core.c:1307:MODULE_DESCRIPTION(\"MPU3050 gyroscope driver\");\ndrivers/iio/gyro/mpu3050-core.c-1308-MODULE_LICENSE(\"GPL\");\n--\ndrivers/iio/gyro/mpu3050-i2c.c=120=MODULE_AUTHOR(\"Linus Walleij\");\ndrivers/iio/gyro/mpu3050-i2c.c:121:MODULE_DESCRIPTION(\"Invensense MPU3050 gyroscope driver\");\ndrivers/iio/gyro/mpu3050-i2c.c-122-MODULE_LICENSE(\"GPL\");\n--\ndrivers/iio/magnetometer/yamaha-yas530.c-15- *\ndrivers/iio/magnetometer/yamaha-yas530.c:16: * Code functions found in the MPU3050 YAS530 and YAS532 drivers\ndrivers/iio/magnetometer/yamaha-yas530.c-17- * named \"inv_compass\" in the Tegra Android kernel tree.\n"
}

19/2 2026/09/18 07:55 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 40917
							output: 153
							thoughts: 1548
						

Thoughts:
**Analysis of `mpu3050_drdy_trigger_set_state` for Fuzzing Suitability**

Okay, let's break this down. My initial focus is on the `mpu3050_drdy_trigger_set_state` function within `mpu3050-core.c`. The patch addresses a runtime PM refcount leak, so it's obviously dealing with power management and error handling within this function. My next step is always to trace the usage to understand its reach.

This function, I see, is part of `mpu3050_trigger_ops` and is registered through `iio_trigger_register`. Digging deeper, `mpu3050_trigger_probe()` sets up the trigger operations, and that function is called exclusively by `mpu3050_common_probe()`. Furthermore, that's only called from `mpu3050_i2c_probe()`, which is, as the name suggests, the probe function for an I2C device driver – specifically, the `mpu3050-i2c` driver.

Now, here's where it gets interesting. This driver directly interfaces with the Invensense MPU-3050 gyroscope hardware via the I2C bus. During the probe, the driver *verifies* the presence of the MPU-3050 chip by reading a specific register (MPU3050_CHIP_ID_REG) and expects a specific ID (0x68). If the correct ID isn't returned, the probe *fails*. And critically, if the probe fails, the trigger is never registered. Therefore, the patched function, `mpu3050_drdy_trigger_set_state`, is *never* executed.

This leads me to the conclusion that this is a structurally unreachable piece of code in standard fuzzing environments. Standard environments like QEMU and GCE *do not* emulate the Invensense MPU-3050 gyroscope hardware, nor do they provide a suitable I2C bus connection to trigger this code path. It's a classic case of a hardware-dependent driver that is completely inaccessible without the physical hardware.

Just to be absolutely sure, I've checked the entire repository for any hint of a virtual bus, USB gadget, or a mock driver that might emulate an MPU-3050. The search turns up *nothing* that provides a path to this function.

Therefore, because this code is inaccessible in the target environments, there's no point in fuzzing it. I need to set the `WorthFuzzing` flag to *false* and provide the justification. The requirements are met:

*   **WorthFuzzing**: *false*
*   **Reasoning**: The patch addresses an I2C-based driver for the Invensense MPU-3050 gyroscope, which requires the physical hardware. The driver checks for the hardware during the probe and fails if the device is not present, making the patched code, specifically `mpu3050_drdy_trigger_set_state`, structurally unreachable in standard QEMU or GCE fuzzing environments where the hardware is not emulated.
*   **FocusSymbols**: \[ ] (empty when WorthFuzzing=false)
*   **EnableConfigs**: \[ ] (empty when WorthFuzzing=false)

I'm ready to call `set-results`.



20/2 2026/09/18 07:55 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The patch modifies error handling and runtime PM logic in mpu3050_drdy_trigger_set_state() within the Invensense MPU-3050 gyroscope driver (drivers/iio/gyro/mpu3050-core.c). This driver requires physical MPU-3050 hardware connected via I2C; probe validates the hardware chip ID over I2C and fails in standard virtualized environments (QEMU/GCE) where this hardware is not emulated. Consequently, the modified code is structurally unreachable during fuzzing.",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies error handling and runtime PM logic in mpu3050_drdy_trigger_set_state() within the Invensense MPU-3050 gyroscope driver (drivers/iio/gyro/mpu3050-core.c). This driver requires physical MPU-3050 hardware connected via I2C; probe validates the hardware chip ID over I2C and fails in standard virtualized environments (QEMU/GCE) where this hardware is not emulated. Consequently, the modified code is structurally unreachable during fuzzing.",
  "WorthFuzzing": false
}

21/1 2026/09/18 07:55 action If
0m Args:
{
  "WorthFuzzing": false
}

Results:
null

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)