Character driver
—————————-
revision 1.38
date: 2016/03/11 05:46:49; author: root; state: Exp; lines: +0 -1
*** empty log message ***
—————————-
revision 1.37
date: 2016/03/10 09:52:22; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.36
date: 2016/03/10 09:49:21; author: root; state: Exp; lines: +5 -5
*** empty log message ***
—————————-
revision 1.35
date: 2016/03/10 09:40:54; author: root; state: Exp; lines: +5 -2
*** empty log message ***
—————————-
revision 1.34
date: 2016/03/10 09:34:58; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.33
date: 2016/03/10 09:32:03; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.32
date: 2016/03/10 09:23:40; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.31
date: 2016/03/10 09:22:50; author: root; state: Exp; lines: +2 -0
We cross check the program.
—————————-
revision 1.30
date: 2016/03/10 09:19:44; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.29
date: 2016/03/10 09:17:59; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.28
date: 2016/03/10 09:17:21; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.27
date: 2016/03/10 09:15:41; author: root; state: Exp; lines: +6 -4
Call the memset().
Call the cdev_init().
Call the cdev_add().
—————————-
revision 1.26
date: 2016/03/10 09:03:11; author: root; state: Exp; lines: +1 -0
Declare the variable of dev inside it.
—————————-
revision 1.25
date: 2016/03/10 08:56:32; author: root; state: Exp; lines: +7 -0
Malloc the memory for dev struct through kmalloc.
It takes two arguments frist type or bit o memory and 2nd is flag.
—————————-
revision 1.24
date: 2016/03/10 08:36:18; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.23
date: 2016/03/10 08:34:18; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.22
date: 2016/03/10 06:20:52; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.21
date: 2016/03/10 06:17:13; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.20
date: 2016/03/10 06:15:15; author: root; state: Exp; lines: +6 -6
*** empty log message ***
—————————-
revision 1.19
date: 2016/03/10 06:11:27; author: root; state: Exp; lines: +6 -4
*** empty log message ***
—————————-
revision 1.18
date: 2016/03/10 06:03:04; author: root; state: Exp; lines: +2 -3
Delete the majorno and minorno variable and declare it into the macro.h
Delete the dev_t devid and declare it into the macro.h
—————————-
revision 1.17
date: 2016/03/10 05:53:26; author: root; state: Exp; lines: +3 -1
Here declare the libraray #include”macro.h”.
We spacifie the macro inside the function.
—————————-
revision 1.16
date: 2016/03/09 10:24:50; author: root; state: Exp; lines: +1 -1
Pass the address.
—————————-
revision 1.15
date: 2016/03/09 10:23:00; author: root; state: Exp; lines: +1 -1
Here we use alloc_chrdev_region().
Now pass the argument where the minor no. startup and no. of devices.
—————————-
revision 1.14
date: 2016/03/09 10:01:33; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.13
date: 2016/03/09 09:58:32; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.12
date: 2016/03/09 09:56:35; author: root; state: Exp; lines: +3 -4
Add the dev_t variable and inside the register_chrdev_region().
Print the majar no. and minor no.
—————————-
revision 1.11
date: 2016/03/09 09:48:56; author: root; state: Exp; lines: +1 -1
Add the argument which tell no. of devices.
—————————-
revision 1.10
date: 2016/03/09 09:46:41; author: root; state: Exp; lines: +1 -1
Aplly condition to check the registeration through register_chrdev_region.
—————————-
revision 1.9
date: 2016/03/09 09:46:07; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.8
date: 2016/03/09 09:42:29; author: root; state: Exp; lines: +3 -3
Decalre a integer variable which name is mano.(major no.).
—————————-
revision 1.7
date: 2016/03/09 09:39:01; author: root; state: Exp; lines: +16 -3
Call the register_chrdev_region().
The frist argument is dev_t type in which major no. is save and 2nd argument strore the minor number.
3rd argument is name of driver i.e in which name you register your own driver in table.
—————————-
revision 1.6
date: 2016/03/09 09:20:55; author: root; state: Exp; lines: +1 -1
Add the termination condition.
—————————-
revision 1.5
date: 2016/03/09 09:19:21; author: root; state: Exp; lines: +0 -2
Add the prototype file.
Define the struct file_operations.
—————————-
revision 1.4
date: 2016/03/09 09:09:30; author: root; state: Exp; lines: +1 -1
Here declare the mno.
—————————-
revision 1.3
date: 2016/03/09 08:56:52; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.2
date: 2016/03/09 08:50:51; author: root; state: Exp; lines: +6 -0
Register().
Frist arguments is major no..
So put in 0 for default case.
2nd arguments are driver name
3rd arguments are file operations.
—————————-
revision 1.1
date: 2016/03/04 10:29:25; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: macro.h,v
Working file: macro.h
head: 1.15
branch:
locks: strict
root: 1.15
access list:
symbolic names:
keyword substitution: kv
total revisions: 15; selected revisions: 15
description:
Declare a new file.Here we define the macro.
—————————-
revision 1.15 locked by: root;
date: 2016/03/27 10:11:10; author: root; state: Exp; lines: +0 -4
*** empty log message ***
—————————-
revision 1.14
date: 2016/03/27 10:10:02; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.13
date: 2016/03/27 10:05:42; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.12
date: 2016/03/27 10:02:37; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.11
date: 2016/03/16 10:38:14; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.10
date: 2016/03/11 12:23:37; author: root; state: Exp; lines: +4 -0
Add the macro of DEBUG
—————————-
revision 1.9
date: 2016/03/11 05:58:19; author: root; state: Exp; lines: +0 -3
*** empty log message ***
—————————-
revision 1.8
date: 2016/03/11 05:52:49; author: root; state: Exp; lines: +3 -0
*** empty log message ***
—————————-
revision 1.7
date: 2016/03/11 05:51:42; author: root; state: Exp; lines: +0 -4
Remove the node macro.
—————————-
revision 1.6
date: 2016/03/10 08:57:42; author: root; state: Exp; lines: +15 -0
define the variale of structure like devicesize,quantumsize,qsetsize,datasize.
—————————-
revision 1.5
date: 2016/03/10 08:41:40; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.4
date: 2016/03/10 06:17:15; author: root; state: Exp; lines: +0 -3
*** empty log message ***
—————————-
revision 1.3
date: 2016/03/10 06:06:02; author: root; state: Exp; lines: +10 -0
Here declare the minorno and majorno .
We also declare dev_t devid variable.
—————————-
revision 1.2
date: 2016/03/10 05:56:12; author: root; state: Exp; lines: +1 -1
Defile the value of nod.
—————————-
revision 1.1
date: 2016/03/10 05:54:14; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: opendev.c,v
Working file: opendev.c
head: 1.44
branch:
locks: strict
root: 1.44
access list:
symbolic names:
keyword substitution: kv
total revisions: 44; selected revisions: 44
description:
Here open the device.
release the device.
—————————-
revision 1.44 locked by: root;
date: 2016/03/26 08:23:06; author: root; state: Exp; lines: +9 -9
*** empty log message ***
—————————-
revision 1.43
date: 2016/03/26 08:17:34; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.42
date: 2016/03/26 08:15:51; author: root; state: Exp; lines: +2 -1
*** empty log message ***
—————————-
revision 1.41
date: 2016/03/26 08:06:45; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.40
date: 2016/03/26 07:56:13; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.39
date: 2016/03/26 07:55:16; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.38
date: 2016/03/26 07:54:15; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.37
date: 2016/03/26 07:53:09; author: root; state: Exp; lines: +3 -0
*** empty log message ***
—————————-
revision 1.36
date: 2016/03/26 07:50:05; author: root; state: Exp; lines: +2 -0
*** empty log message ***
—————————-
revision 1.35
date: 2016/03/26 07:46:21; author: root; state: Exp; lines: +3 -0
*** empty log message ***
—————————-
revision 1.34
date: 2016/03/26 07:42:37; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.33
date: 2016/03/26 06:10:00; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.32
date: 2016/03/26 05:58:03; author: root; state: Exp; lines: +0 -1
remove the call of trimdev().
—————————-
revision 1.31
date: 2016/03/23 19:27:13; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.30
date: 2016/03/23 19:24:55; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.29
date: 2016/03/16 10:45:01; author: root; state: Exp; lines: +4 -4
*** empty log message ***
—————————-
revision 1.28
date: 2016/03/16 05:05:43; author: root; state: Exp; lines: +1 -2
Here we remove one print statement and add some print text.
—————————-
revision 1.27
date: 2016/03/16 04:59:56; author: root; state: Exp; lines: +1 -1
There is not allow , inside printk like that printk(KERN_INFO, “g\n”); like this this create a error.
—————————-
revision 1.26
date: 2016/03/16 04:52:50; author: root; state: Exp; lines: +8 -11
Initially we put ldev = NULL.
We use ldev into container_of().
It return some value then these value save inside the file->private.data.
And make a conditon in which it always strore the last two bit same as because we know O_ACCMODE the value is three and its binaray no. is 11 we and with the flag value so it store same flag digit of frist two digit.
—————————-
revision 1.25
date: 2016/03/16 04:45:55; author: root; state: Exp; lines: +3 -2
*** empty log message ***
—————————-
revision 1.24
date: 2016/03/14 11:47:10; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.23
date: 2016/03/14 11:46:25; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.22
date: 2016/03/14 11:45:46; author: root; state: Exp; lines: +2 -3
*** empty log message ***
—————————-
revision 1.21
date: 2016/03/14 11:43:39; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.20
date: 2016/03/14 11:42:29; author: root; state: Exp; lines: +1 -1
Define the struct dev *ldev.
—————————-
revision 1.19
date: 2016/03/14 11:40:07; author: root; state: Exp; lines: +1 -3
Call the trimdev().
—————————-
revision 1.18
date: 2016/03/14 11:37:59; author: root; state: Exp; lines: +3 -2
Add the macro.h header file.
—————————-
revision 1.17
date: 2016/03/14 11:35:39; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.16
date: 2016/03/14 11:16:28; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.15
date: 2016/03/14 11:13:56; author: root; state: Exp; lines: +1 -2
*** empty log message ***
—————————-
revision 1.14
date: 2016/03/14 11:13:25; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.13
date: 2016/03/14 10:50:12; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.12
date: 2016/03/14 10:45:46; author: root; state: Exp; lines: +3 -1
*** empty log message ***
—————————-
revision 1.11
date: 2016/03/14 10:42:55; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.10
date: 2016/03/14 10:40:59; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.9
date: 2016/03/14 10:24:30; author: root; state: Exp; lines: +0 -4
*** empty log message ***
—————————-
revision 1.8
date: 2016/03/14 10:17:23; author: root; state: Exp; lines: +5 -1
And operataion perform.
—————————-
revision 1.7
date: 2016/03/14 08:08:03; author: root; state: Exp; lines: +3 -0
*** empty log message ***
—————————-
revision 1.6
date: 2016/03/11 12:23:49; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.5
date: 2016/03/11 12:03:53; author: root; state: Exp; lines: +0 -2
*** empty log message ***
—————————-
revision 1.4
date: 2016/03/11 12:02:41; author: root; state: Exp; lines: +7 -1
*** empty log message ***
—————————-
revision 1.3
date: 2016/03/11 11:41:49; author: root; state: Exp; lines: +22 -2
Call the trim function which use to overwrite data.
—————————-
revision 1.2
date: 2016/03/11 10:51:03; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.1
date: 2016/03/11 10:04:55; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: prototype.h,v
Working file: prototype.h
head: 1.16
branch:
locks: strict
root: 1.16
access list:
symbolic names:
keyword substitution: kv
total revisions: 16; selected revisions: 16
description:
—————————-
revision 1.16 locked by: root;
date: 2016/03/28 10:15:46; author: root; state: Exp; lines: +1 -0
Add the seekdev() return and prototype.
—————————-
revision 1.15
date: 2016/03/22 03:46:26; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.14
date: 2016/03/22 03:42:57; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.13
date: 2016/03/21 10:56:47; author: root; state: Exp; lines: +21 -0
Remove the prototype here.
—————————-
revision 1.12
date: 2016/03/11 12:23:50; author: root; state: Exp; lines: +0 -1
*** empty log message ***
—————————-
revision 1.11
date: 2016/03/11 11:50:42; author: root; state: Exp; lines: +1 -1
Defination of the trimdev().
—————————-
revision 1.10
date: 2016/03/11 11:42:31; author: root; state: Exp; lines: +1 -0
Add the int trimdev().
—————————-
revision 1.9
date: 2016/03/11 06:44:38; author: root; state: Exp; lines: +1 -1
Add the dev_t devno.
—————————-
revision 1.8
date: 2016/03/11 06:02:54; author: root; state: Exp; lines: +1 -2
*** empty log message ***
—————————-
revision 1.7
date: 2016/03/11 05:57:57; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.6
date: 2016/03/10 09:16:24; author: root; state: Exp; lines: +1 -1
Add the pointer structre.
—————————-
revision 1.5
date: 2016/03/10 09:03:33; author: root; state: Exp; lines: +1 -0
Add the variable of dev.\
—————————-
revision 1.4
date: 2016/03/10 08:37:52; author: root; state: Exp; lines: +2 -0
Add the two variables.
—————————-
revision 1.3
date: 2016/03/09 09:57:27; author: root; state: Exp; lines: +1 -1
Add the variable chrdev.
—————————-
revision 1.2
date: 2016/03/09 09:44:25; author: root; state: Exp; lines: +1 -0
Add the extern file
Declare the major no. inside the prototype.h.
—————————-
revision 1.1
date: 2016/03/09 09:14:21; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: readdev.c,v
Working file: readdev.c
head: 1.179
branch:
locks: strict
root: 1.179
access list:
symbolic names:
keyword substitution: kv
total revisions: 179; selected revisions: 179
description:
This is a readdev().
Here we start to read data.
—————————-
revision 1.179 locked by: root;
date: 2016/03/31 06:06:31; author: root; state: Exp; lines: +2 -3
*** empty log message ***
—————————-
revision 1.178