Kernel newbie need some help - Embedded

This is a discussion on Kernel newbie need some help - Embedded ; Hi all, Can any tell me what is the point of "struct platform_device", what does it represent and what it is used for ? thanks...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Kernel newbie need some help

  1. Kernel newbie need some help

    Hi all,
    Can any tell me what is the point of "struct platform_device", what
    does it represent and what it is used for ?
    thanks


  2. Re: Kernel newbie need some help

    Iyed wrote:
    > Hi all,
    > Can any tell me what is the point of "struct platform_device", what
    > does it represent and what it is used for ?
    > thanks




    /*
    * platform_device.h - generic, centralized driver model
    *
    * Copyright (c) 2001-2003 Patrick Mochel
    *
    * This file is released under the GPLv2
    *
    * See Documentation/driver-model/ for more information.
    */

    #ifndef _PLATFORM_DEVICE_H_
    #define _PLATFORM_DEVICE_H_

    #include

    struct platform_device {
    const char * name;
    u32 id;
    struct device dev;
    u32 num_resources;
    struct resource * resource;
    };
    ....

  3. Re: Kernel newbie need some help

    OK


  4. Re: Kernel newbie need some help

    I read the documentation, but it was not very clear.


  5. Re: Kernel newbie need some help

    Iyed wrote:

    > I read the documentation, but it was not very clear.


    Its used for devices which cannot be autodetected (in contrast to devices on
    the PCI bus). You must *know* they are in the system. And you must know
    which resources these devices allocate. So you create a list of platform
    devices in your board support package. See arch/arm/mach-pxa/generic.c (or
    mainstone.c) for some examples how to use them.

    Hope it helps
    JB

+ Reply to Thread