Thread (5 messages) 5 messages, 2 authors, 2016-07-28

gpio-led driver

From: Raul Piper <hidden>
Date: 2016-07-28 11:30:05

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
[off-list ref] wrote:
On 07/22/2016 12:10 PM, Raul Piper wrote:
quoted
On Thu, Jul 21, 2016 at 12:10 PM, Jacek Anaszewski
[off-list ref] wrote:
quoted
Hi Raul,

On 07/20/2016 01:17 PM, Raul Piper wrote:
quoted

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.
quoted
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.
quoted
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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help