On Mon, Oct 12, 2015 at 02:18:19PM +0100, Carlos Meralto wrote:
> Hi Bob,
> 
> I don't understand the: "When you write to the file from userspace,
> you would then update some (new) battery level variable"
> I create the file with "debugfs_create_file("energy", 0777, phyd,
> &filevalue, &fops_debug);" But the question is about update the
> variable when i write to the file from userspace, is any command to do
> that?

http://lxr.free-electrons.com/source/net/mac80211/debugfs_netdev.c?v=4.0#L452

That file is an example of updating a state variable whenever userspace
writes to the file (the tsf value is passed to drv_set_tsf() which the driver
may write into hardware, but in principle you could do anything here).

The implementation of the debugfs file (that you write) is responsible
for taking the value written and updating some variable (that you
create) somewhere.

-- 
Bob Copeland %% http://bobcopeland.com/
_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to