drivers/usb/host/sl811_cs.c
Source file repositories/reference/linux-study-clean/drivers/usb/host/sl811_cs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/host/sl811_cs.c- Extension
.c- Size
- 4840 bytes
- Lines
- 204
- Domain
- Driver Families
- Bucket
- drivers/usb
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/ptrace.hlinux/slab.hlinux/string.hlinux/timer.hlinux/ioport.hlinux/platform_device.hpcmcia/cistpl.hpcmcia/cisreg.hpcmcia/ds.hlinux/usb/sl811.h
Detected Declarations
function release_platform_devfunction sl811_hc_initfunction sl811_cs_detachfunction sl811_cs_releasefunction sl811_cs_config_checkfunction sl811_cs_configfunction sl811_cs_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* PCMCIA driver for SL811HS (as found in REX-CFU1U)
* Filename: sl811_cs.c
* Author: Yukio Yamamoto
*
* Port to sl811-hcd and 2.6.x by
* Botond Botyanszki <boti@rocketmail.com>
* Simon Pickering
*
* Last update: 2005-05-12
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/ptrace.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/ds.h>
#include <linux/usb/sl811.h>
MODULE_AUTHOR("Botond Botyanszki");
MODULE_DESCRIPTION("REX-CFU1U PCMCIA driver for 2.6");
MODULE_LICENSE("GPL");
/*====================================================================*/
/* MACROS */
/*====================================================================*/
#define INFO(args...) printk(KERN_INFO "sl811_cs: " args)
/*====================================================================*/
/* VARIABLES */
/*====================================================================*/
typedef struct local_info_t {
struct pcmcia_device *p_dev;
} local_info_t;
static void sl811_cs_release(struct pcmcia_device * link);
/*====================================================================*/
static void release_platform_dev(struct device * dev)
{
dev_dbg(dev, "sl811_cs platform_dev release\n");
dev->parent = NULL;
}
static struct sl811_platform_data platform_data = {
.potpg = 100,
.power = 50, /* == 100mA */
// .reset = ... FIXME: invoke CF reset on the card
};
static struct resource resources[] = {
[0] = {
.flags = IORESOURCE_IRQ,
},
[1] = {
// .name = "address",
.flags = IORESOURCE_IO,
},
[2] = {
// .name = "data",
.flags = IORESOURCE_IO,
},
};
extern struct platform_driver sl811h_driver;
static struct platform_device platform_dev = {
.id = -1,
.dev = {
.platform_data = &platform_data,
.release = release_platform_dev,
},
.resource = resources,
.num_resources = ARRAY_SIZE(resources),
};
static int sl811_hc_init(struct device *parent, resource_size_t base_addr,
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/ptrace.h`, `linux/slab.h`, `linux/string.h`, `linux/timer.h`, `linux/ioport.h`, `linux/platform_device.h`.
- Detected declarations: `function release_platform_dev`, `function sl811_hc_init`, `function sl811_cs_detach`, `function sl811_cs_release`, `function sl811_cs_config_check`, `function sl811_cs_config`, `function sl811_cs_probe`.
- Atlas domain: Driver Families / drivers/usb.
- 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.