ALT Linux kernel packages development
 help / color / mirror / Atom feed
From: gosha <gosha@elins.ru>
To: devel-kernel@lists.altlinux.org
Subject: [d-kernel] kernel 2.6.26 & драйвер rtc
Date: Wed, 1 Oct 2008 16:41:53 +0400
Message-ID: <200810011641.54186.gosha@elins.ru> (raw)

                                                Добрый день.


        2.6.26 драйвер rtc ksrc_root/drivers/rtc/...

        После загрузки драйвера insmod , появляется /dev/rtc0

	Но утилита hwclock ищет /dev/rtc

	Если создать ручками mknod /dev/rtc c 251 0 , после этого hwclock работает ok.

        Что необходимо поправить в ядре или системе, чтобы ссылка создавалась автоматически, или драйвер регистрировался /dev/rtc.

<pre>
/*======================================================================================*/
static int ds1337_probe(struct platform_device *pdev)
{int err;
 elins64cmp_rtc=NULL;
 printk("DS1337 Real Time Clock Driver v%s\n", DS1337_VERSION);
 if(ds1337_detect() < 0)
	{printk("%s> RTC device init error!\n", __FUNCTION__); return -ENODEV;}
 elins64cmp_rtc= rtc_device_register("rtc", &pdev->dev, &ds1337_rtc_ops, THIS_MODULE);
 if (IS_ERR(elins64cmp_rtc))
    {err = PTR_ERR(elins64cmp_rtc);
     printk("%s> unable to register the class device\n", __FUNCTION__);
     return err;
    }
 return 0;
}
/*======================================================================================*/
static struct platform_driver ds1337_rtc_driver = {
    .probe = ds1337_probe,
    .remove= ds1337_remove,
    .driver     = { .name   = "rtc",
                    .owner  = THIS_MODULE,},
};
/*======================================================================================*/
static int __init ds1337_rtc_init(void)
{int r;
 if((r= platform_driver_register(&ds1337_rtc_driver))!=0)
    {printk("%s> RTC driver register error!\n", __FUNCTION__); return r;}
 return 0;
}

module_init(ds1337_rtc_init);
/*======================================================================================*/
</pre>


       Спасибо.
     
-- 
С Уваженим,
       gosha.


             reply	other threads:[~2008-10-01 12:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-01 12:41 gosha [this message]
2008-10-02 18:22 ` Ildar Mulyukov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810011641.54186.gosha@elins.ru \
    --to=gosha@elins.ru \
    --cc=devel-kernel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git