drivers/i2c/busses/i2c-designware-baytrail.c
Source file repositories/reference/linux-study-clean/drivers/i2c/busses/i2c-designware-baytrail.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/i2c/busses/i2c-designware-baytrail.c- Extension
.c- Size
- 959 bytes
- Lines
- 45
- Domain
- Driver Families
- Bucket
- drivers/i2c
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/acpi.hlinux/i2c.hlinux/interrupt.hasm/iosf_mbi.hi2c-designware-core.h
Detected Declarations
function Copyright
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Intel BayTrail PMIC I2C bus semaphore implementation
* Copyright (c) 2014, Intel Corporation.
*/
#include <linux/device.h>
#include <linux/acpi.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <asm/iosf_mbi.h>
#include "i2c-designware-core.h"
int i2c_dw_baytrail_probe_lock_support(struct dw_i2c_dev *dev)
{
acpi_status status;
unsigned long long shared_host = 0;
acpi_handle handle;
if (!dev)
return -ENODEV;
handle = ACPI_HANDLE(dev->dev);
if (!handle)
return -ENODEV;
status = acpi_evaluate_integer(handle, "_SEM", NULL, &shared_host);
if (ACPI_FAILURE(status))
return -ENODEV;
if (!shared_host)
return -ENODEV;
if (!iosf_mbi_available())
return -EPROBE_DEFER;
dev_info(dev->dev, "I2C bus managed by PUNIT\n");
dev->acquire_lock = iosf_mbi_block_punit_i2c_access;
dev->release_lock = iosf_mbi_unblock_punit_i2c_access;
dev->shared_with_punit = true;
return 0;
}
Annotation
- Immediate include surface: `linux/device.h`, `linux/acpi.h`, `linux/i2c.h`, `linux/interrupt.h`, `asm/iosf_mbi.h`, `i2c-designware-core.h`.
- Detected declarations: `function Copyright`.
- Atlas domain: Driver Families / drivers/i2c.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.