From 464a89f04248ac8385e14c2d581008a125c0a2a2 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Tue, 1 Dec 2009 08:53:05 -0200 Subject: [PATCH] Device types and char device registering. --- _ldd.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/_ldd.xml b/_ldd.xml index e26b90a..4930ffc 100644 --- a/_ldd.xml +++ b/_ldd.xml @@ -203,4 +203,24 @@ boolean, integers or strings, are given by the user. + +Device types and numbers + +Linux devices may be of different types, including character devices, +block devices or network devices. Both character and block devices have +identifying numbers, a major and a minor number. + + +In Linux, major and minor numbers have to be requested or allocated. The +calls to do that are: + + +int register\_chrdev\_region (dev\_t first, unsigned int count, char +*name); +int alloc\_chrdev\_region (dev\_t *dev, unsigned int firstminor, +unsigned int count, char *name); +void unregister\_chrdev\_region (dev\_t dev, unsigned int count); + + + -- 2.20.1