arch/arm/mach-s3c/pm-gpio.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-s3c/pm-gpio.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-s3c/pm-gpio.c- Extension
.c- Size
- 9726 bytes
- Lines
- 381
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/device.hlinux/init.hlinux/io.hlinux/gpio.hgpio-samsung.hgpio-core.hpm.h
Detected Declarations
function samsung_gpio_pm_1bit_savefunction samsung_gpio_pm_1bit_resumefunction samsung_gpio_pm_2bit_savefunction SFNfunction is_infunction is_outfunction samsung_gpio_pm_2bit_resumefunction samsung_gpio_pm_4bit_savefunction samsung_gpio_pm_4bit_maskfunction samsung_gpio_pm_4bit_confunction samsung_gpio_pm_4bit_resumefunction samsung_pm_save_gpiofunction samsung_pm_save_gpiosfunction samsung_pm_resume_gpiofunction samsung_pm_restore_gpios
Annotated Snippet
if (!ourchip) {
gpio_nr++;
continue;
}
samsung_pm_save_gpio(ourchip);
S3C_PMDBG("%s: save %08x,%08x,%08x,%08x\n",
ourchip->chip.label,
ourchip->pm_save[0],
ourchip->pm_save[1],
ourchip->pm_save[2],
ourchip->pm_save[3]);
gpio_nr += ourchip->chip.ngpio;
gpio_nr += CONFIG_S3C_GPIO_SPACE;
}
}
/**
* samsung_pm_resume_gpio() - restore gpio chip data after suspend
* @ourchip: The suspended chip.
*/
static void samsung_pm_resume_gpio(struct samsung_gpio_chip *ourchip)
{
struct samsung_gpio_pm *pm = ourchip->pm;
if (pm == NULL || pm->resume == NULL)
S3C_PMDBG("%s: no pm for %s\n", __func__, ourchip->chip.label);
else
pm->resume(ourchip);
}
void samsung_pm_restore_gpios(void)
{
struct samsung_gpio_chip *ourchip;
unsigned int gpio_nr;
for (gpio_nr = 0; gpio_nr < S3C_GPIO_END;) {
ourchip = samsung_gpiolib_getchip(gpio_nr);
if (!ourchip) {
gpio_nr++;
continue;
}
samsung_pm_resume_gpio(ourchip);
gpio_nr += ourchip->chip.ngpio;
gpio_nr += CONFIG_S3C_GPIO_SPACE;
}
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/device.h`, `linux/init.h`, `linux/io.h`, `linux/gpio.h`, `gpio-samsung.h`, `gpio-core.h`, `pm.h`.
- Detected declarations: `function samsung_gpio_pm_1bit_save`, `function samsung_gpio_pm_1bit_resume`, `function samsung_gpio_pm_2bit_save`, `function SFN`, `function is_in`, `function is_out`, `function samsung_gpio_pm_2bit_resume`, `function samsung_gpio_pm_4bit_save`, `function samsung_gpio_pm_4bit_mask`, `function samsung_gpio_pm_4bit_con`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.