drivers/pcmcia/sa1111_neponset.c
Source file repositories/reference/linux-study-clean/drivers/pcmcia/sa1111_neponset.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pcmcia/sa1111_neponset.c- Extension
.c- Size
- 1997 bytes
- Lines
- 82
- Domain
- Driver Families
- Bucket
- drivers/pcmcia
- 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/module.hlinux/kernel.hlinux/device.hlinux/errno.hlinux/init.hasm/mach-types.hsa1111_generic.hmax1600.h
Detected Declarations
function groundfunction neponset_pcmcia_configure_socketfunction pcmcia_neponset_init
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* linux/drivers/pcmcia/sa1100_neponset.c
*
* Neponset PCMCIA specific routines
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <asm/mach-types.h>
#include "sa1111_generic.h"
#include "max1600.h"
/*
* Neponset uses the Maxim MAX1600, with the following connections:
*
* MAX1600 Neponset
*
* A0VCC SA-1111 GPIO A<1>
* A1VCC SA-1111 GPIO A<0>
* A0VPP CPLD NCR A0VPP
* A1VPP CPLD NCR A1VPP
* B0VCC SA-1111 GPIO A<2>
* B1VCC SA-1111 GPIO A<3>
* B0VPP ground (slot B is CF)
* B1VPP ground (slot B is CF)
*
* VX VCC (5V)
* VY VCC3_3 (3.3V)
* 12INA 12V
* 12INB ground (slot B is CF)
*
* The MAX1600 CODE pin is tied to ground, placing the device in
* "Standard Intel code" mode. Refer to the Maxim data sheet for
* the corresponding truth table.
*/
static int neponset_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
struct max1600 *m;
int ret;
ret = max1600_init(skt->socket.dev.parent, &m,
skt->nr ? MAX1600_CHAN_B : MAX1600_CHAN_A,
MAX1600_CODE_LOW);
if (ret == 0)
skt->driver_data = m;
return ret;
}
static int
neponset_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state)
{
struct max1600 *m = skt->driver_data;
int ret;
ret = sa1111_pcmcia_configure_socket(skt, state);
if (ret == 0)
ret = max1600_configure(m, state->Vcc, state->Vpp);
return ret;
}
static struct pcmcia_low_level neponset_pcmcia_ops = {
.owner = THIS_MODULE,
.hw_init = neponset_pcmcia_hw_init,
.configure_socket = neponset_pcmcia_configure_socket,
.first = 0,
.nr = 2,
};
int pcmcia_neponset_init(struct sa1111_dev *sadev)
{
sa11xx_drv_pcmcia_ops(&neponset_pcmcia_ops);
return sa1111_pcmcia_add(sadev, &neponset_pcmcia_ops,
sa11xx_drv_pcmcia_add_one);
}
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/device.h`, `linux/errno.h`, `linux/init.h`, `asm/mach-types.h`, `sa1111_generic.h`, `max1600.h`.
- Detected declarations: `function ground`, `function neponset_pcmcia_configure_socket`, `function pcmcia_neponset_init`.
- Atlas domain: Driver Families / drivers/pcmcia.
- 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.