<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: character driver</title>
	<atom:link href="https://www.emblogic.com/blog/10/character-driver/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog/10/character-driver/</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Mon, 07 Oct 2013 04:00:03 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>By: kamran</title>
		<link>https://www.emblogic.com/blog/10/character-driver/#comment-281</link>
		<dc:creator><![CDATA[kamran]]></dc:creator>
		<pubDate>Sun, 02 Oct 2011 19:05:58 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=922#comment-281</guid>
		<description><![CDATA[Following are the api along with the parameter and what is achieved from it,on executing.

int register_chrdev_region(dev_t first, unsigned int count,char *name);

register_chrdev_region works well if you know ahead of time exactly which device numbers you want. Often, however, you will not know which major numbers your device will use; to move over to the use of dynamicly-allocated device numbers on the fly, use the following:

int alloc_chrdev_region(dev_t *dev, unsigned int firstminor,unsigned int count, char *name);

cdev_alloc: 
struct cdev * cdev_alloc (void);
Allocates and returns a cdev structure, or NULL on failure. 

cdev_init:
void cdev_init (struct cdev *cdev,const struct file_operations *fops);
Initializes cdev, remembering fops, making it ready to add to the system with cdev_add.

cdev_add
int cdev_add (struct cdev *p,dev_t dev,unsigned count);
cdev_add adds the device represented by p to the system, making it live immediately, and can be used by the user.

cdev_del
void cdev_del (	struct cdev *p);
cdev_del removes p from the system, possibly freeing the structure itself. 

Hope it will clear the doubts.]]></description>
		<content:encoded><![CDATA[<p>Following are the api along with the parameter and what is achieved from it,on executing.</p>
<p>int register_chrdev_region(dev_t first, unsigned int count,char *name);</p>
<p>register_chrdev_region works well if you know ahead of time exactly which device numbers you want. Often, however, you will not know which major numbers your device will use; to move over to the use of dynamicly-allocated device numbers on the fly, use the following:</p>
<p>int alloc_chrdev_region(dev_t *dev, unsigned int firstminor,unsigned int count, char *name);</p>
<p>cdev_alloc:<br />
struct cdev * cdev_alloc (void);<br />
Allocates and returns a cdev structure, or NULL on failure. </p>
<p>cdev_init:<br />
void cdev_init (struct cdev *cdev,const struct file_operations *fops);<br />
Initializes cdev, remembering fops, making it ready to add to the system with cdev_add.</p>
<p>cdev_add<br />
int cdev_add (struct cdev *p,dev_t dev,unsigned count);<br />
cdev_add adds the device represented by p to the system, making it live immediately, and can be used by the user.</p>
<p>cdev_del<br />
void cdev_del (	struct cdev *p);<br />
cdev_del removes p from the system, possibly freeing the structure itself. </p>
<p>Hope it will clear the doubts.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
