From rkit
리눅스 커널 모듈/드라이버 개발 가이드. platform_driver, DT 바인딩, sysfs, ioctl. Triggers: kernel module, driver, platform_driver, sysfs, ioctl, 커널 모듈, カーネル
npx claudepluginhub solitasroh/rkit --plugin rkitThis skill is limited to using the following tools:
```c
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/io.h>
struct mydrv_data { void __iomem *base; int irq; };
static int mydrv_probe(struct platform_device *pdev) {
struct mydrv_data *priv;
struct resource *res;
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->base = devm_ioremap_resource(&pdev->dev, res);
priv->irq = platform_get_irq(pdev, 0);
platform_set_drvdata(pdev, priv);
return 0;
}
mydevice@21e8000 {
compatible = "vendor,mydevice";
reg = <0x021e8000 0x4000>;
interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_UART_IPG>;
status = "okay";
};
obj-m := mydrv.o
KDIR ?= /lib/modules/$(shell uname -r)/build
all: $(MAKE) -C $(KDIR) M=$(PWD) modules
clean: $(MAKE) -C $(KDIR) M=$(PWD) clean
devm_* managed resources (auto-cleanup on remove)platform_get_resource() for MMIO regionsdevm_request_irq() for interrupt handlerssysfs_create_group() for user-space interface