All of lore.kernel.org
 help / color / mirror / Atom feed
* gpio-led driver
@ 2016-07-20 11:15 ` Raul Piper
  0 siblings, 0 replies; 17+ messages in thread
From: Raul Piper @ 2016-07-20 11:15 UTC (permalink / raw)
  To: kernelnewbies, linux-leds


[-- Attachment #1.1: Type: text/plain, Size: 310 bytes --]

Hi,
I wanted to know the part number for the leds-gpio.c in the driver/leds
folder and the device tree bindings for this driver .Can some one point out
to me where in Linux kernel it is?

Also why below line has been used.Is it mandatory?
...
*.of_match_table = of_gpio_leds_match,*
},

thanks in advance ,
Rp

[-- Attachment #1.2: Type: text/html, Size: 856 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
@ 2016-07-20 11:15 ` Raul Piper
  0 siblings, 0 replies; 17+ messages in thread
From: Raul Piper @ 2016-07-20 11:15 UTC (permalink / raw)
  To: kernelnewbies

Hi,
I wanted to know the part number for the leds-gpio.c in the driver/leds
folder and the device tree bindings for this driver .Can some one point out
to me where in Linux kernel it is?

Also why below line has been used.Is it mandatory?
...
*.of_match_table = of_gpio_leds_match,*
},

thanks in advance ,
Rp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160720/6bf78c1e/attachment.html 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gpio-led driver
  2016-07-20 11:15 ` Raul Piper
@ 2016-07-20 15:00   ` Anish Kumar
  -1 siblings, 0 replies; 17+ messages in thread
From: Anish Kumar @ 2016-07-20 15:00 UTC (permalink / raw)
  To: Raul Piper; +Cc: linux-leds, kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 818 bytes --]



> On Jul 20, 2016, at 4:15 AM, Raul Piper <raulpblooper@gmail.com> wrote:
> 
> Hi,
> I wanted to know the part number

What is part number?

> for the leds-gpio.c in the driver/leds folder and the device tree bindings for this driver .Can some one point out to me where in Linux kernel it is?
> 
> Also why below line has been used.Is it mandatory?
> ...
> .of_match_table = of_gpio_leds_match,

This is needed when you are using device tree for getting the board settings but you can also do the same without this as well. Read up on device tree in kernel Documentation folder.
> },
> 
> thanks in advance ,
> Rp
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[-- Attachment #1.2: Type: text/html, Size: 2060 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
@ 2016-07-20 15:00   ` Anish Kumar
  0 siblings, 0 replies; 17+ messages in thread
From: Anish Kumar @ 2016-07-20 15:00 UTC (permalink / raw)
  To: kernelnewbies



> On Jul 20, 2016, at 4:15 AM, Raul Piper <raulpblooper@gmail.com> wrote:
> 
> Hi,
> I wanted to know the part number

What is part number?

> for the leds-gpio.c in the driver/leds folder and the device tree bindings for this driver .Can some one point out to me where in Linux kernel it is?
> 
> Also why below line has been used.Is it mandatory?
> ...
> .of_match_table = of_gpio_leds_match,

This is needed when you are using device tree for getting the board settings but you can also do the same without this as well. Read up on device tree in kernel Documentation folder.
> },
> 
> thanks in advance ,
> Rp
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160720/7ee3bff3/attachment.html 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gpio-led driver
  2016-07-20 15:00   ` Anish Kumar
@ 2016-07-21  4:12     ` Gadre Nayan
  -1 siblings, 0 replies; 17+ messages in thread
From: Gadre Nayan @ 2016-07-21  4:12 UTC (permalink / raw)
  To: Anish Kumar; +Cc: Raul Piper, linux-leds, kernelnewbies

Hi,

OF stands for open firmware, OF uses a format to represent platform
information, which is called a device tree.

An example of how the driver extracts information from device  tree:

#if defined(CONFIG_OF)
static const struct of_device_id dali_of_ids[] =
{
       { .compatible = "arm,dali_gpio", },
       {},
};

MODULE_DEVICE_TABLE(of, dali_of_ids);
#endif

static struct platform_driver dali_driver = {
        .driver = {
                        .name = "dali_gpio",
                        .of_match_table = of_match_ptr(dali_of_ids),
        },
        .probe = Dali_probe,
        .remove = Dali_remove,
};

The driver is going to fetch information from the device tree later on
(in probe) using the compatible property mentioned. So if the tree has
the same compatible string then subsequent information can be obtained
from that device tree node.

Thanks
Nayan Gadre

On Wed, Jul 20, 2016 at 8:30 PM, Anish Kumar
<anish198519851985@gmail.com> wrote:
>
>
> On Jul 20, 2016, at 4:15 AM, Raul Piper <raulpblooper@gmail.com> wrote:
>
> Hi,
> I wanted to know the part number
>
>
> What is part number?
>
> for the leds-gpio.c in the driver/leds folder and the device tree bindings
> for this driver .Can some one point out to me where in Linux kernel it is?
>
> Also why below line has been used.Is it mandatory?
> ...
> .of_match_table = of_gpio_leds_match,
>
>
> This is needed when you are using device tree for getting the board settings
> but you can also do the same without this as well. Read up on device tree in
> kernel Documentation folder.
>
> },
>
> thanks in advance ,
> Rp
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
@ 2016-07-21  4:12     ` Gadre Nayan
  0 siblings, 0 replies; 17+ messages in thread
From: Gadre Nayan @ 2016-07-21  4:12 UTC (permalink / raw)
  To: kernelnewbies

Hi,

OF stands for open firmware, OF uses a format to represent platform
information, which is called a device tree.

An example of how the driver extracts information from device  tree:

#if defined(CONFIG_OF)
static const struct of_device_id dali_of_ids[] =
{
       { .compatible = "arm,dali_gpio", },
       {},
};

MODULE_DEVICE_TABLE(of, dali_of_ids);
#endif

static struct platform_driver dali_driver = {
        .driver = {
                        .name = "dali_gpio",
                        .of_match_table = of_match_ptr(dali_of_ids),
        },
        .probe = Dali_probe,
        .remove = Dali_remove,
};

The driver is going to fetch information from the device tree later on
(in probe) using the compatible property mentioned. So if the tree has
the same compatible string then subsequent information can be obtained
from that device tree node.

Thanks
Nayan Gadre

On Wed, Jul 20, 2016 at 8:30 PM, Anish Kumar
<anish198519851985@gmail.com> wrote:
>
>
> On Jul 20, 2016, at 4:15 AM, Raul Piper <raulpblooper@gmail.com> wrote:
>
> Hi,
> I wanted to know the part number
>
>
> What is part number?
>
> for the leds-gpio.c in the driver/leds folder and the device tree bindings
> for this driver .Can some one point out to me where in Linux kernel it is?
>
> Also why below line has been used.Is it mandatory?
> ...
> .of_match_table = of_gpio_leds_match,
>
>
> This is needed when you are using device tree for getting the board settings
> but you can also do the same without this as well. Read up on device tree in
> kernel Documentation folder.
>
> },
>
> thanks in advance ,
> Rp
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gpio-led driver
  2016-07-21  4:12     ` Gadre Nayan
@ 2016-07-21  4:13       ` Gadre Nayan
  -1 siblings, 0 replies; 17+ messages in thread
From: Gadre Nayan @ 2016-07-21  4:13 UTC (permalink / raw)
  To: Anish Kumar; +Cc: Raul Piper, linux-leds, kernelnewbies

Hi,

OF stands for open firmware, OF uses a format to represent platform
information, which is called a device tree.

An example of how the driver extracts information from device  tree:

#if defined(CONFIG_OF)
static const struct of_device_id dali_of_ids[] =
{
       { .compatible = "arm,dali_gpio", },
       {},
};

MODULE_DEVICE_TABLE(of, dali_of_ids);
#endif

static struct platform_driver dali_driver = {
        .driver = {
                        .name = "dali_gpio",
                        .of_match_table = of_match_ptr(dali_of_ids),
        },
        .probe = Dali_probe,
        .remove = Dali_remove,
};

The driver is going to fetch information from the device tree later on
(in probe) using the compatible property mentioned. So if the tree has
the same compatible string then subsequent information can be obtained
from that device tree node.

Thanks

On Thu, Jul 21, 2016 at 9:42 AM, Gadre Nayan <gadrenayan@gmail.com> wrote:
> Hi,
>
> OF stands for open firmware, OF uses a format to represent platform
> information, which is called a device tree.
>
> An example of how the driver extracts information from device  tree:
>
> #if defined(CONFIG_OF)
> static const struct of_device_id dali_of_ids[] =
> {
>        { .compatible = "arm,dali_gpio", },
>        {},
> };
>
> MODULE_DEVICE_TABLE(of, dali_of_ids);
> #endif
>
> static struct platform_driver dali_driver = {
>         .driver = {
>                         .name = "dali_gpio",
>                         .of_match_table = of_match_ptr(dali_of_ids),
>         },
>         .probe = Dali_probe,
>         .remove = Dali_remove,
> };
>
> The driver is going to fetch information from the device tree later on
> (in probe) using the compatible property mentioned. So if the tree has
> the same compatible string then subsequent information can be obtained
> from that device tree node.
>
> Thanks
> Nayan Gadre
>
> On Wed, Jul 20, 2016 at 8:30 PM, Anish Kumar
> <anish198519851985@gmail.com> wrote:
>>
>>
>> On Jul 20, 2016, at 4:15 AM, Raul Piper <raulpblooper@gmail.com> wrote:
>>
>> Hi,
>> I wanted to know the part number
>>
>>
>> What is part number?
>>
>> for the leds-gpio.c in the driver/leds folder and the device tree bindings
>> for this driver .Can some one point out to me where in Linux kernel it is?
>>
>> Also why below line has been used.Is it mandatory?
>> ...
>> .of_match_table = of_gpio_leds_match,
>>
>>
>> This is needed when you are using device tree for getting the board settings
>> but you can also do the same without this as well. Read up on device tree in
>> kernel Documentation folder.
>>
>> },
>>
>> thanks in advance ,
>> Rp
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
@ 2016-07-21  4:13       ` Gadre Nayan
  0 siblings, 0 replies; 17+ messages in thread
From: Gadre Nayan @ 2016-07-21  4:13 UTC (permalink / raw)
  To: kernelnewbies

Hi,

OF stands for open firmware, OF uses a format to represent platform
information, which is called a device tree.

An example of how the driver extracts information from device  tree:

#if defined(CONFIG_OF)
static const struct of_device_id dali_of_ids[] =
{
       { .compatible = "arm,dali_gpio", },
       {},
};

MODULE_DEVICE_TABLE(of, dali_of_ids);
#endif

static struct platform_driver dali_driver = {
        .driver = {
                        .name = "dali_gpio",
                        .of_match_table = of_match_ptr(dali_of_ids),
        },
        .probe = Dali_probe,
        .remove = Dali_remove,
};

The driver is going to fetch information from the device tree later on
(in probe) using the compatible property mentioned. So if the tree has
the same compatible string then subsequent information can be obtained
from that device tree node.

Thanks

On Thu, Jul 21, 2016 at 9:42 AM, Gadre Nayan <gadrenayan@gmail.com> wrote:
> Hi,
>
> OF stands for open firmware, OF uses a format to represent platform
> information, which is called a device tree.
>
> An example of how the driver extracts information from device  tree:
>
> #if defined(CONFIG_OF)
> static const struct of_device_id dali_of_ids[] =
> {
>        { .compatible = "arm,dali_gpio", },
>        {},
> };
>
> MODULE_DEVICE_TABLE(of, dali_of_ids);
> #endif
>
> static struct platform_driver dali_driver = {
>         .driver = {
>                         .name = "dali_gpio",
>                         .of_match_table = of_match_ptr(dali_of_ids),
>         },
>         .probe = Dali_probe,
>         .remove = Dali_remove,
> };
>
> The driver is going to fetch information from the device tree later on
> (in probe) using the compatible property mentioned. So if the tree has
> the same compatible string then subsequent information can be obtained
> from that device tree node.
>
> Thanks
> Nayan Gadre
>
> On Wed, Jul 20, 2016 at 8:30 PM, Anish Kumar
> <anish198519851985@gmail.com> wrote:
>>
>>
>> On Jul 20, 2016, at 4:15 AM, Raul Piper <raulpblooper@gmail.com> wrote:
>>
>> Hi,
>> I wanted to know the part number
>>
>>
>> What is part number?
>>
>> for the leds-gpio.c in the driver/leds folder and the device tree bindings
>> for this driver .Can some one point out to me where in Linux kernel it is?
>>
>> Also why below line has been used.Is it mandatory?
>> ...
>> .of_match_table = of_gpio_leds_match,
>>
>>
>> This is needed when you are using device tree for getting the board settings
>> but you can also do the same without this as well. Read up on device tree in
>> kernel Documentation folder.
>>
>> },
>>
>> thanks in advance ,
>> Rp
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gpio-led driver
       [not found]         ` <CAEwN+MDUmadERvzt01M8D0Yi-G7mVnqBJ6ZyuDk3nJhctMJuzQ@mail.gmail.com>
@ 2016-07-21  5:59             ` Gadre Nayan
  0 siblings, 0 replies; 17+ messages in thread
From: Gadre Nayan @ 2016-07-21  5:59 UTC (permalink / raw)
  To: Raul Piper; +Cc: linux-leds, kernelnewbies

Hi,

I used this:

/*
* XXX: Use a flat representation of the AM33XX interconnect.
* The real AM33XX interconnect network is quite complex.Since
* that will not bring real advantage to represent that in DT
* for the moment, just use a fake OCP bus entry to represent
* the whole bus hierarchy.
*/
ocp {
          compatible = "simple-bus";
          #address-cells = <1>;
          #size-cells = <1>;
           ranges;
            ti,hwmods = "l3_main";
           .
           .
           .
          dali_gpio {
             compatible = "arm,dali_gpio";
             dali_TX = <9>;
             dali_RX = <10>;
           };
}

Thanks
Nayan Gadre.

On Thu, Jul 21, 2016 at 11:19 AM, Raul Piper <raulpblooper@gmail.com> wrote:
> kindly cc the previous people in "To" .Sorry I missed in while replying you.
>
> On Thu, Jul 21, 2016 at 11:17 AM, Raul Piper <raulpblooper@gmail.com> wrote:
>> HI,
>>
>> On Thu, Jul 21, 2016 at 9:43 AM, Gadre Nayan <gadrenayan@gmail.com> wrote:
>>> Hi,
>>>
>>> OF stands for open firmware, OF uses a format to represent platform
>>> information, which is called a device tree.
>>>
>>> An example of how the driver extracts information from device  tree:
>>>
>>> #if defined(CONFIG_OF)
>>> static const struct of_device_id dali_of_ids[] =
>>> {
>>>        { .compatible = "arm,dali_gpio", },
>>>        {},
>>> };
>>>
>>> MODULE_DEVICE_TABLE(of, dali_of_ids);
>>> #endif
>>>
>>> static struct platform_driver dali_driver = {
>>>         .driver = {
>>>                         .name = "dali_gpio",
>>>                         .of_match_table = of_match_ptr(dali_of_ids),
>>>         },
>>>         .probe = Dali_probe,
>>>         .remove = Dali_remove,
>>> };
>>>
>>> The driver is going to fetch information from the device tree later on
>>> (in probe) using the compatible property mentioned. So if the tree has
>>> the same compatible string then subsequent information can be obtained
>>> from that device tree node.
>>>
>>> Thanks
>>>
>> Can you please post the coresponding dt binding code?
>>
>>> On Thu, Jul 21, 2016 at 9:42 AM, Gadre Nayan <gadrenayan@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> OF stands for open firmware, OF uses a format to represent platform
>>>> information, which is called a device tree.
>>>>
>>>> An example of how the driver extracts information from device  tree:
>>>>
>>>> #if defined(CONFIG_OF)
>>>> static const struct of_device_id dali_of_ids[] =
>>>> {
>>>>        { .compatible = "arm,dali_gpio", },
>>>>        {},
>>>> };
>>>>
>>>> MODULE_DEVICE_TABLE(of, dali_of_ids);
>>>> #endif
>>>>
>>>> static struct platform_driver dali_driver = {
>>>>         .driver = {
>>>>                         .name = "dali_gpio",
>>>>                         .of_match_table = of_match_ptr(dali_of_ids),
>>>>         },
>>>>         .probe = Dali_probe,
>>>>         .remove = Dali_remove,
>>>> };
>>>>
>>>> The driver is going to fetch information from the device tree later on
>>>> (in probe) using the compatible property mentioned. So if the tree has
>>>> the same compatible string then subsequent information can be obtained
>>>> from that device tree node.
>>>>
>>>> Thanks
>>>> Nayan Gadre
>>>>
>>>> On Wed, Jul 20, 2016 at 8:30 PM, Anish Kumar
>>>> <anish198519851985@gmail.com> wrote:
>>>>>
>>>>>
>>>>> On Jul 20, 2016, at 4:15 AM, Raul Piper <raulpblooper@gmail.com> wrote:
>>>>>
>>>>> Hi,
>>>>> I wanted to know the part number
>>>>>
>>>>>
>>>>> What is part number?
>>>>>
>>>>> for the leds-gpio.c in the driver/leds folder and the device tree bindings
>>>>> for this driver .Can some one point out to me where in Linux kernel it is?
>>>>>
>>>>> Also why below line has been used.Is it mandatory?
>>>>> ...
>>>>> .of_match_table = of_gpio_leds_match,
>>>>>
>>>>>
>>>>> This is needed when you are using device tree for getting the board settings
>>>>> but you can also do the same without this as well. Read up on device tree in
>>>>> kernel Documentation folder.
>>>>>
>>>>> },
>>>>>
>>>>> thanks in advance ,
>>>>> Rp
>>>>>
>>>>> _______________________________________________
>>>>> Kernelnewbies mailing list
>>>>> Kernelnewbies@kernelnewbies.org
>>>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Kernelnewbies mailing list
>>>>> Kernelnewbies@kernelnewbies.org
>>>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>>>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
@ 2016-07-21  5:59             ` Gadre Nayan
  0 siblings, 0 replies; 17+ messages in thread
From: Gadre Nayan @ 2016-07-21  5:59 UTC (permalink / raw)
  To: kernelnewbies

Hi,

I used this:

/*
* XXX: Use a flat representation of the AM33XX interconnect.
* The real AM33XX interconnect network is quite complex.Since
* that will not bring real advantage to represent that in DT
* for the moment, just use a fake OCP bus entry to represent
* the whole bus hierarchy.
*/
ocp {
          compatible = "simple-bus";
          #address-cells = <1>;
          #size-cells = <1>;
           ranges;
            ti,hwmods = "l3_main";
           .
           .
           .
          dali_gpio {
             compatible = "arm,dali_gpio";
             dali_TX = <9>;
             dali_RX = <10>;
           };
}

Thanks
Nayan Gadre.

On Thu, Jul 21, 2016 at 11:19 AM, Raul Piper <raulpblooper@gmail.com> wrote:
> kindly cc the previous people in "To" .Sorry I missed in while replying you.
>
> On Thu, Jul 21, 2016 at 11:17 AM, Raul Piper <raulpblooper@gmail.com> wrote:
>> HI,
>>
>> On Thu, Jul 21, 2016 at 9:43 AM, Gadre Nayan <gadrenayan@gmail.com> wrote:
>>> Hi,
>>>
>>> OF stands for open firmware, OF uses a format to represent platform
>>> information, which is called a device tree.
>>>
>>> An example of how the driver extracts information from device  tree:
>>>
>>> #if defined(CONFIG_OF)
>>> static const struct of_device_id dali_of_ids[] =
>>> {
>>>        { .compatible = "arm,dali_gpio", },
>>>        {},
>>> };
>>>
>>> MODULE_DEVICE_TABLE(of, dali_of_ids);
>>> #endif
>>>
>>> static struct platform_driver dali_driver = {
>>>         .driver = {
>>>                         .name = "dali_gpio",
>>>                         .of_match_table = of_match_ptr(dali_of_ids),
>>>         },
>>>         .probe = Dali_probe,
>>>         .remove = Dali_remove,
>>> };
>>>
>>> The driver is going to fetch information from the device tree later on
>>> (in probe) using the compatible property mentioned. So if the tree has
>>> the same compatible string then subsequent information can be obtained
>>> from that device tree node.
>>>
>>> Thanks
>>>
>> Can you please post the coresponding dt binding code?
>>
>>> On Thu, Jul 21, 2016 at 9:42 AM, Gadre Nayan <gadrenayan@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> OF stands for open firmware, OF uses a format to represent platform
>>>> information, which is called a device tree.
>>>>
>>>> An example of how the driver extracts information from device  tree:
>>>>
>>>> #if defined(CONFIG_OF)
>>>> static const struct of_device_id dali_of_ids[] =
>>>> {
>>>>        { .compatible = "arm,dali_gpio", },
>>>>        {},
>>>> };
>>>>
>>>> MODULE_DEVICE_TABLE(of, dali_of_ids);
>>>> #endif
>>>>
>>>> static struct platform_driver dali_driver = {
>>>>         .driver = {
>>>>                         .name = "dali_gpio",
>>>>                         .of_match_table = of_match_ptr(dali_of_ids),
>>>>         },
>>>>         .probe = Dali_probe,
>>>>         .remove = Dali_remove,
>>>> };
>>>>
>>>> The driver is going to fetch information from the device tree later on
>>>> (in probe) using the compatible property mentioned. So if the tree has
>>>> the same compatible string then subsequent information can be obtained
>>>> from that device tree node.
>>>>
>>>> Thanks
>>>> Nayan Gadre
>>>>
>>>> On Wed, Jul 20, 2016 at 8:30 PM, Anish Kumar
>>>> <anish198519851985@gmail.com> wrote:
>>>>>
>>>>>
>>>>> On Jul 20, 2016, at 4:15 AM, Raul Piper <raulpblooper@gmail.com> wrote:
>>>>>
>>>>> Hi,
>>>>> I wanted to know the part number
>>>>>
>>>>>
>>>>> What is part number?
>>>>>
>>>>> for the leds-gpio.c in the driver/leds folder and the device tree bindings
>>>>> for this driver .Can some one point out to me where in Linux kernel it is?
>>>>>
>>>>> Also why below line has been used.Is it mandatory?
>>>>> ...
>>>>> .of_match_table = of_gpio_leds_match,
>>>>>
>>>>>
>>>>> This is needed when you are using device tree for getting the board settings
>>>>> but you can also do the same without this as well. Read up on device tree in
>>>>> kernel Documentation folder.
>>>>>
>>>>> },
>>>>>
>>>>> thanks in advance ,
>>>>> Rp
>>>>>
>>>>> _______________________________________________
>>>>> Kernelnewbies mailing list
>>>>> Kernelnewbies at kernelnewbies.org
>>>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Kernelnewbies mailing list
>>>>> Kernelnewbies at kernelnewbies.org
>>>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>>>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
  2016-07-22 14:35     ` Jacek Anaszewski
@ 2016-07-28 11:30       ` Raul Piper
  0 siblings, 0 replies; 17+ messages in thread
From: Raul Piper @ 2016-07-28 11:30 UTC (permalink / raw)
  To: kernelnewbies

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- kirkwood-ns2.dtb
This compiles fine.I was trying to compile only the "leds-ns2.dts"
file, not knowing the actual dtb was kirkwood-ns2.dtb .Thanks !!
This means I cant compile directly the files inside the
Documentation/bindings/leds/ .They have to be associated as some node
with some boards first .

On Fri, Jul 22, 2016 at 8:05 PM, Jacek Anaszewski
<j.anaszewski@samsung.com> wrote:
> On 07/22/2016 12:10 PM, Raul Piper wrote:
>>
>> On Thu, Jul 21, 2016 at 12:10 PM, Jacek Anaszewski
>> <j.anaszewski@samsung.com> wrote:
>>>
>>> Hi Raul,
>>>
>>> On 07/20/2016 01:17 PM, Raul Piper wrote:
>>>>
>>>>
>>>> Hi,
>>>> I wanted to know the part number for the leds-gpio.c in the
>>>> driver/leds folder and the device tree bindings for this driver .Can
>>>> some one point out to me where in Linux kernel it is?
>>>
>>>
>>>
>>> What do you mean by part number? This is generic driver for LEDs
>>> connected directly to a GPIO.
>>
>>
>> Understood,I thought there is some specific part number of the led
>> like all other led drivers in the same folder.
>>
>>> You can find DT documentation for it in the following location:
>>>
>>> Documentation/devicetree/bindings/leds/leds-gpio.txt
>>>
>>
>>   I tried compiling the sample dts file(leds-ns2.dts)  using the dtc
>> compiler .
>>
>> dtc -I dts -O dtb -o leds-ns2.dtb leds-ns2.dts
>>
>> but I am getting this error :
>>
>> DTC: dts->dtb  on file "leds-ns2.dts"
>> Error: leds-ns2.dts:1.1-2 syntax error
>> FATAL ERROR: Unable to parse input tree
>
>
> One minute of googling gives the answer:
>
> You can use the Makefile provided with the kernel:
>
> e.g.
>
> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- kirkwood-ns2.dtb
>
> Make sure that CROSS_COMPILE matches your toolchain prefix.
>
>> Once it starts compiling fine I will modify it according to my
>> driver.Can I build the dtb and load it the way I load the kernel
>> driver.Do I have to do it before or after the insmod ?
>
>
> dtb is required to properly boot the system. It must be appended to the
> kernel image. You have to acquire some knowledge about bootloader
> present on your board and at what address it expects DT blob.
>
> You can ask for details e.g. on linux-arm-kernel at lists.infradead.org
> or try to search the Internet.
>
>> Right now I dont want to build dts as well as driver as a whole kernel
>> and building it as a loadable module.
>> Thanks in advance
>
>
>
> --
> Best regards,
> Jacek Anaszewski

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
  2016-07-22 10:10   ` Raul Piper
@ 2016-07-22 14:35     ` Jacek Anaszewski
  2016-07-28 11:30       ` Raul Piper
  0 siblings, 1 reply; 17+ messages in thread
From: Jacek Anaszewski @ 2016-07-22 14:35 UTC (permalink / raw)
  To: kernelnewbies

On 07/22/2016 12:10 PM, Raul Piper wrote:
> On Thu, Jul 21, 2016 at 12:10 PM, Jacek Anaszewski
> <j.anaszewski@samsung.com> wrote:
>> Hi Raul,
>>
>> On 07/20/2016 01:17 PM, Raul Piper wrote:
>>>
>>> Hi,
>>> I wanted to know the part number for the leds-gpio.c in the
>>> driver/leds folder and the device tree bindings for this driver .Can
>>> some one point out to me where in Linux kernel it is?
>>
>>
>> What do you mean by part number? This is generic driver for LEDs
>> connected directly to a GPIO.
>
> Understood,I thought there is some specific part number of the led
> like all other led drivers in the same folder.
>
>> You can find DT documentation for it in the following location:
>>
>> Documentation/devicetree/bindings/leds/leds-gpio.txt
>>
>
>   I tried compiling the sample dts file(leds-ns2.dts)  using the dtc compiler .
>
> dtc -I dts -O dtb -o leds-ns2.dtb leds-ns2.dts
>
> but I am getting this error :
>
> DTC: dts->dtb  on file "leds-ns2.dts"
> Error: leds-ns2.dts:1.1-2 syntax error
> FATAL ERROR: Unable to parse input tree

One minute of googling gives the answer:

You can use the Makefile provided with the kernel:

e.g.

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- kirkwood-ns2.dtb

Make sure that CROSS_COMPILE matches your toolchain prefix.

> Once it starts compiling fine I will modify it according to my
> driver.Can I build the dtb and load it the way I load the kernel
> driver.Do I have to do it before or after the insmod ?

dtb is required to properly boot the system. It must be appended to the
kernel image. You have to acquire some knowledge about bootloader
present on your board and at what address it expects DT blob.

You can ask for details e.g. on linux-arm-kernel at lists.infradead.org
or try to search the Internet.

> Right now I dont want to build dts as well as driver as a whole kernel
> and building it as a loadable module.
> Thanks in advance


-- 
Best regards,
Jacek Anaszewski

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
  2016-07-21  6:40   ` Jacek Anaszewski
  (?)
@ 2016-07-22 10:10   ` Raul Piper
  2016-07-22 14:35     ` Jacek Anaszewski
  -1 siblings, 1 reply; 17+ messages in thread
From: Raul Piper @ 2016-07-22 10:10 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Jul 21, 2016 at 12:10 PM, Jacek Anaszewski
<j.anaszewski@samsung.com> wrote:
> Hi Raul,
>
> On 07/20/2016 01:17 PM, Raul Piper wrote:
>>
>> Hi,
>> I wanted to know the part number for the leds-gpio.c in the
>> driver/leds folder and the device tree bindings for this driver .Can
>> some one point out to me where in Linux kernel it is?
>
>
> What do you mean by part number? This is generic driver for LEDs
> connected directly to a GPIO.

Understood,I thought there is some specific part number of the led
like all other led drivers in the same folder.

> You can find DT documentation for it in the following location:
>
> Documentation/devicetree/bindings/leds/leds-gpio.txt
>

 I tried compiling the sample dts file(leds-ns2.dts)  using the dtc compiler .

dtc -I dts -O dtb -o leds-ns2.dtb leds-ns2.dts

but I am getting this error :

DTC: dts->dtb  on file "leds-ns2.dts"
Error: leds-ns2.dts:1.1-2 syntax error
FATAL ERROR: Unable to parse input tree

Once it starts compiling fine I will modify it according to my
driver.Can I build the dtb and load it the way I load the kernel
driver.Do I have to do it before or after the insmod ?

Right now I dont want to build dts as well as driver as a whole kernel
and building it as a loadable module.
Thanks in advance

Rgds,
Rp




> --
> Best regards,
> Jacek Anaszewski

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gpio-led driver
  2016-07-20 11:17 ` Raul Piper
@ 2016-07-21  6:40   ` Jacek Anaszewski
  -1 siblings, 0 replies; 17+ messages in thread
From: Jacek Anaszewski @ 2016-07-21  6:40 UTC (permalink / raw)
  To: Raul Piper; +Cc: kernelnewbies, linux-leds

Hi Raul,

On 07/20/2016 01:17 PM, Raul Piper wrote:
> Hi,
> I wanted to know the part number for the leds-gpio.c in the
> driver/leds folder and the device tree bindings for this driver .Can
> some one point out to me where in Linux kernel it is?

What do you mean by part number? This is generic driver for LEDs
connected directly to a GPIO.

You can find DT documentation for it in the following location:

Documentation/devicetree/bindings/leds/leds-gpio.txt

-- 
Best regards,
Jacek Anaszewski

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
@ 2016-07-21  6:40   ` Jacek Anaszewski
  0 siblings, 0 replies; 17+ messages in thread
From: Jacek Anaszewski @ 2016-07-21  6:40 UTC (permalink / raw)
  To: kernelnewbies

Hi Raul,

On 07/20/2016 01:17 PM, Raul Piper wrote:
> Hi,
> I wanted to know the part number for the leds-gpio.c in the
> driver/leds folder and the device tree bindings for this driver .Can
> some one point out to me where in Linux kernel it is?

What do you mean by part number? This is generic driver for LEDs
connected directly to a GPIO.

You can find DT documentation for it in the following location:

Documentation/devicetree/bindings/leds/leds-gpio.txt

-- 
Best regards,
Jacek Anaszewski

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
@ 2016-07-20 11:17 ` Raul Piper
  0 siblings, 0 replies; 17+ messages in thread
From: Raul Piper @ 2016-07-20 11:17 UTC (permalink / raw)
  To: kernelnewbies, linux-leds

Hi,
I wanted to know the part number for the leds-gpio.c in the
driver/leds folder and the device tree bindings for this driver .Can
some one point out to me where in Linux kernel it is?

Also why below line has been used.Is it mandatory?
...
.of_match_table = of_gpio_leds_match,
},

thanks in advance ,
Rp

^ permalink raw reply	[flat|nested] 17+ messages in thread

* gpio-led driver
@ 2016-07-20 11:17 ` Raul Piper
  0 siblings, 0 replies; 17+ messages in thread
From: Raul Piper @ 2016-07-20 11:17 UTC (permalink / raw)
  To: kernelnewbies

Hi,
I wanted to know the part number for the leds-gpio.c in the
driver/leds folder and the device tree bindings for this driver .Can
some one point out to me where in Linux kernel it is?

Also why below line has been used.Is it mandatory?
...
.of_match_table = of_gpio_leds_match,
},

thanks in advance ,
Rp

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-07-28 11:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-20 11:15 gpio-led driver Raul Piper
2016-07-20 11:15 ` Raul Piper
2016-07-20 15:00 ` Anish Kumar
2016-07-20 15:00   ` Anish Kumar
2016-07-21  4:12   ` Gadre Nayan
2016-07-21  4:12     ` Gadre Nayan
2016-07-21  4:13     ` Gadre Nayan
2016-07-21  4:13       ` Gadre Nayan
     [not found]       ` <CAEwN+MCSG80LATxpXRcrx7jrUOKizfibseP5sGJvkJn70ZaTFQ@mail.gmail.com>
     [not found]         ` <CAEwN+MDUmadERvzt01M8D0Yi-G7mVnqBJ6ZyuDk3nJhctMJuzQ@mail.gmail.com>
2016-07-21  5:59           ` Gadre Nayan
2016-07-21  5:59             ` Gadre Nayan
2016-07-20 11:17 Raul Piper
2016-07-20 11:17 ` Raul Piper
2016-07-21  6:40 ` Jacek Anaszewski
2016-07-21  6:40   ` Jacek Anaszewski
2016-07-22 10:10   ` Raul Piper
2016-07-22 14:35     ` Jacek Anaszewski
2016-07-28 11:30       ` Raul Piper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.