linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* device_create_file returns 0 but doesn't work
@ 2013-09-01 23:38 Ian Pilcher
  2013-09-02  4:48 ` Ian Pilcher
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Pilcher @ 2013-09-01 23:38 UTC (permalink / raw)
  To: linux-leds; +Cc: kernelnewbies, linux-kernel

I am trying to add an additional sysfs attribute to a device (LED) that
is created by another driver.  (My ultimate goal is to provide a way for
a userspace application to use the functionality provided by
led_blink_set, which doesn't currently seem to be possible.)

The kernel module code that sets up all the GPIOs & LEDs in my NAS is
at:

  http://pastebin.com/TJZGww8T

The call to device_create_file is at line 373.

device_create_file is returning 0, but the "foo" attribute is not being
created.  ("find /sys -name '*foo*'" doesn't find anything, so I'm not
just looking in the wrong place.)

What am I doing wrong?

Thanks!

-- 
========================================================================
Ian Pilcher                                         arequipeno@gmail.com
Sometimes there's nothing left to do but crash and burn...or die trying.
========================================================================


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

* Re: device_create_file returns 0 but doesn't work
  2013-09-01 23:38 device_create_file returns 0 but doesn't work Ian Pilcher
@ 2013-09-02  4:48 ` Ian Pilcher
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Pilcher @ 2013-09-02  4:48 UTC (permalink / raw)
  To: linux-leds, kernelnewbies, linux-kernel

On 09/01/2013 06:38 PM, Ian Pilcher wrote:
> I am trying to add an additional sysfs attribute to a device (LED) that
> is created by another driver.  (My ultimate goal is to provide a way for
> a userspace application to use the functionality provided by
> led_blink_set, which doesn't currently seem to be possible.)

Turns out it is possible, with the LED timer trigger, so this issue is
now moot.

> 
> The kernel module code that sets up all the GPIOs & LEDs in my NAS is
> at:
> 
>   http://pastebin.com/TJZGww8T
> 
> The call to device_create_file is at line 373.
> 
> device_create_file is returning 0, but the "foo" attribute is not being
> created.  ("find /sys -name '*foo*'" doesn't find anything, so I'm not
> just looking in the wrong place.)

Still rather odd that it doesn't work, however, since ledtrig-timer.c
seems to do pretty much the same thing.  Oh well.

-- 
========================================================================
Ian Pilcher                                         arequipeno@gmail.com
Sometimes there's nothing left to do but crash and burn...or die trying.
========================================================================

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

end of thread, other threads:[~2013-09-02  4:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-01 23:38 device_create_file returns 0 but doesn't work Ian Pilcher
2013-09-02  4:48 ` Ian Pilcher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).