From: j.anaszewski@samsung.com (Jacek Anaszewski)
To: kernelnewbies@lists.kernelnewbies.org
Subject: gpio-led driver
Date: Fri, 22 Jul 2016 16:35:34 +0200 [thread overview]
Message-ID: <57922F36.3010505@samsung.com> (raw)
In-Reply-To: <CAEwN+MDyTC4yyDRncRqtnKr_87iX5zJcxoS+POrCCmekb68X3w@mail.gmail.com>
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
next prev parent reply other threads:[~2016-07-22 14:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 11:17 gpio-led driver 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 [this message]
2016-07-28 11:30 ` Raul Piper
-- strict thread matches above, loose matches on Subject: below --
2016-07-20 11:15 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
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=57922F36.3010505@samsung.com \
--to=j.anaszewski@samsung.com \
--cc=kernelnewbies@lists.kernelnewbies.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.