Welcome to the Linux Foundation Forum!

need to upgrade kernel with driver- ISL1221 RTC

Hi all

i m a beginner in device drivers.

I m using linux kernel 2-6-20 , which is for our application with AT91SAM9260 processor.

I would like to use an RTC to update my system time, the chip is RTC - ISL1221 from intersil.

This kernel is supporting ISL 1208 but not ISL 1221 . [ I could see few options in kernel configuration time, but ISL 1221 is not present in the device drivers-> real time clock -> RTC drivers list. ]



HOW CAN I CONFIGURE THIS KERNEL FOR THIS NEW RTC
, if i write a driver for this?

Please help me out

Regards

SJR

Comments

  • Jinux
    Jinux Posts: 20
    I don't know much myself in that area but this looks like a good place to start.
  • sjremya
    sjremya Posts: 11
    thanks for the reply


    I could find a solution for this ....

    I have added the new RTC configuration in /linux/drivers/rtc/Kconfig as shown below, and now i am able to configure the kernel with the new chip ISL 1221

    <
    config RTC_DRV_ISL1221
    tristate "Intersil 1221"
    depends on RTC_CLASS && I2C
    help
    If you say yes here you get support for the
    Intersil 1221 RTC chip.
    This driver can also be built as a module. If so, the module
    will be called rtc-isl1221.
    >

    Hope now i can go ahead with the driver developement for RTC ISL 1221
    Please correct me if I m doing any thing wrong ....

    thanks in advance

    SJR
  • Jinux
    Jinux Posts: 20
    <
    config RTC_DRV_ISL1221
    tristate "Intersil 1221"
    depends on RTC_CLASS && I2C
    help
    If you say yes here you get support for the
    Intersil 1221 RTC chip.
    This driver can also be built as a module. If so, the module
    will be called rtc-isl1221.
    >

    That makes no sense to me. You put all that in the config file?
  • sjremya
    sjremya Posts: 11
    yes ... i have changed the configuration file for rtc drivers ...............

    do u have some thing more to share regarding this ??
  • mfillpot
    mfillpot Posts: 2,177
    You seem to be on the right track, by my understanding your modification should tell the RTC core to use your driver to communicate. But before that modification is made you will need to build the kernel driver, you can refer to the other drivers in /usr/src/linux/drivers/rtc for examples on working modules. Once the driver has been written and your Kconfig has been applied you will also need to build a custom kernel using your modified files before it will be detected by the running kernel.
  • sjremya
    sjremya Posts: 11
    Hi mfillpot


    Thanks for the valuable advice :) ..........



    I have configured my new chip in Kconfig & added it i Makefile too ....

    Now i am able to create the kernel with the new rtc chip ( which is running with a dummy driver for time being ) .

    Now I hope, I can go ahead with the driver development.

    Guide me if I m wrong in any line

    Regards
    SJR
  • mfillpot
    mfillpot Posts: 2,177
    So far you have been finding many of the necessary steps to integrate the driver. The big step which you still have in front of you is the development, by comparing existing comparative drivers and cross referencing them against your dummy driver you should have a good core in place to complete the development.

    Once you have a working driver I would highly recommend checking out http://kernel.org/faq/#kernelbuild and the linked sites so you can contribute the driver into the mainstream kernel so no one else will have to go through the difficulty that you are experiencing to use the device.

    I look forward to seeing your code as you get further into the process and seeing what difficulties and/or bugs you experience during the development process.
  • sjremya
    sjremya Posts: 11
    sure .........

    thanks once again .....

Categories

Upcoming Training