Commit 7ad68e2f authored by David Brownell's avatar David Brownell Committed by Liam Girdwood

regulator: sysfs attribute reduction (v2)

Clean up the sysfs interface to regulators by only exposing the
attributes that can be properly displayed.  For example: when a
particular regulator method is needed to display the value, only
create that attribute when that method exists.

This cleaned-up interface is much more comprehensible.  Most
regulators only support a subset of the possible methods, so
often more than half the attributes would be meaningless.  Many
"not defined" values are no longer necessary.  (But handling
of out-of-range values still looks a bit iffy.)

Documentation is updated to reflect that few of the attributes
are *always* present, and to briefly explain why a regulator may
not have a given attribute.

This adds object code, about a dozen bytes more than was removed
by the preceding patch, but saves a bunch of per-regulator data
associated with the now-removed attributes.  So there's a net
reduction in memory footprint.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 4fca9545
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment