arch/arm/mach-sa1100/h3600.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-sa1100/h3600.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-sa1100/h3600.c- Extension
.c- Size
- 2975 bytes
- Lines
- 135
- 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/init.hlinux/kernel.hlinux/gpio.hvideo/sa1100fb.hasm/mach-types.hasm/mach/arch.hmach/h3xxx.hmach/irqs.hgeneric.h
Detected Declarations
function Copyrightfunction h3600_lcd_powerfunction h3600_map_iofunction h3600_mach_init
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Support for Compaq iPAQ H3600 handheld computer
*
* Copyright (c) 2000,1 Compaq Computer Corporation. (Author: Jamey Hicks)
* Copyright (c) 2009 Dmitry Artamonow <mad_soft@inbox.ru>
*/
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/gpio.h>
#include <video/sa1100fb.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/h3xxx.h>
#include <mach/irqs.h>
#include "generic.h"
static bool h3600_lcd_request(void)
{
static bool h3600_lcd_ok;
int rc;
if (h3600_lcd_ok)
return true;
rc = gpio_request(H3XXX_EGPIO_LCD_ON, "LCD power");
if (rc)
goto out;
rc = gpio_direction_output(H3XXX_EGPIO_LCD_ON, 0);
if (rc)
goto out_free_on;
rc = gpio_request(H3600_EGPIO_LCD_PCI, "LCD control");
if (rc)
goto out_free_on;
rc = gpio_direction_output(H3600_EGPIO_LCD_PCI, 0);
if (rc)
goto out_free_pci;
rc = gpio_request(H3600_EGPIO_LCD_5V_ON, "LCD 5v");
if (rc)
goto out_free_pci;
rc = gpio_direction_output(H3600_EGPIO_LCD_5V_ON, 0);
if (rc)
goto out_free_5v_on;
rc = gpio_request(H3600_EGPIO_LVDD_ON, "LCD 9v/-6.5v");
if (rc)
goto out_free_5v_on;
rc = gpio_direction_output(H3600_EGPIO_LVDD_ON, 0);
if (rc)
goto out_free_lvdd_on;
goto out;
out_free_lvdd_on:
gpio_free(H3600_EGPIO_LVDD_ON);
out_free_5v_on:
gpio_free(H3600_EGPIO_LCD_5V_ON);
out_free_pci:
gpio_free(H3600_EGPIO_LCD_PCI);
out_free_on:
gpio_free(H3XXX_EGPIO_LCD_ON);
out:
if (rc)
pr_err("%s: can't request GPIOs\n", __func__);
else
h3600_lcd_ok = true;
return h3600_lcd_ok;
}
static void h3600_lcd_power(int enable)
{
if (!h3600_lcd_request())
return;
gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable);
gpio_direction_output(H3600_EGPIO_LCD_PCI, enable);
gpio_direction_output(H3600_EGPIO_LCD_5V_ON, enable);
gpio_direction_output(H3600_EGPIO_LVDD_ON, enable);
}
static const struct sa1100fb_rgb h3600_rgb_16 = {
.red = { .offset = 12, .length = 4, },
.green = { .offset = 7, .length = 4, },
.blue = { .offset = 1, .length = 4, },
.transp = { .offset = 0, .length = 0, },
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/gpio.h`, `video/sa1100fb.h`, `asm/mach-types.h`, `asm/mach/arch.h`, `mach/h3xxx.h`, `mach/irqs.h`.
- Detected declarations: `function Copyright`, `function h3600_lcd_power`, `function h3600_map_io`, `function h3600_mach_init`.
- 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.