arch/mips/bcm47xx/buttons.c
Source file repositories/reference/linux-study-clean/arch/mips/bcm47xx/buttons.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/bcm47xx/buttons.c- Extension
.c- Size
- 22161 bytes
- Lines
- 782
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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
bcm47xx_private.hlinux/input.hlinux/gpio_keys.hlinux/interrupt.hbcm47xx_board.hbcm47xx.h
Detected Declarations
function bcm47xx_buttons_copyfunction bcm47xx_buttons_register
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
#include "bcm47xx_private.h"
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/interrupt.h>
#include <bcm47xx_board.h>
#include <bcm47xx.h>
/**************************************************
* Database
**************************************************/
#define BCM47XX_GPIO_KEY(_gpio, _code) \
{ \
.code = _code, \
.gpio = _gpio, \
.active_low = 1, \
}
#define BCM47XX_GPIO_KEY_H(_gpio, _code) \
{ \
.code = _code, \
.gpio = _gpio, \
}
/* Asus */
static const struct gpio_keys_button
bcm47xx_buttons_asus_rtn10u[] __initconst = {
BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
BCM47XX_GPIO_KEY(21, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_asus_rtn12[] __initconst = {
BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
BCM47XX_GPIO_KEY(1, KEY_RESTART),
BCM47XX_GPIO_KEY(4, BTN_0), /* Router mode */
BCM47XX_GPIO_KEY(5, BTN_1), /* Repeater mode */
BCM47XX_GPIO_KEY(6, BTN_2), /* AP mode */
};
static const struct gpio_keys_button
bcm47xx_buttons_asus_rtn16[] __initconst = {
BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
BCM47XX_GPIO_KEY(8, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_asus_rtn66u[] __initconst = {
BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
BCM47XX_GPIO_KEY(9, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_asus_wl300g[] __initconst = {
BCM47XX_GPIO_KEY(6, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_asus_wl320ge[] __initconst = {
BCM47XX_GPIO_KEY(6, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_asus_wl330ge[] __initconst = {
BCM47XX_GPIO_KEY(2, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_asus_wl500g[] __initconst = {
BCM47XX_GPIO_KEY(6, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_asus_wl500gd[] __initconst = {
BCM47XX_GPIO_KEY(6, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_asus_wl500gpv1[] __initconst = {
BCM47XX_GPIO_KEY(0, KEY_RESTART),
BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
};
static const struct gpio_keys_button
bcm47xx_buttons_asus_wl500gpv2[] __initconst = {
BCM47XX_GPIO_KEY(2, KEY_RESTART),
BCM47XX_GPIO_KEY(3, KEY_WPS_BUTTON),
Annotation
- Immediate include surface: `bcm47xx_private.h`, `linux/input.h`, `linux/gpio_keys.h`, `linux/interrupt.h`, `bcm47xx_board.h`, `bcm47xx.h`.
- Detected declarations: `function bcm47xx_buttons_copy`, `function bcm47xx_buttons_register`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.