From: Stephen Warren <hidden> Date: 2012-03-29 17:48:14
On 03/29/2012 11:31 AM, viresh kumar wrote:
On Mar 29, 2012 10:56 PM, Stephen Warren wrote:
quoted
On 03/29/2012 10:34 AM, viresh kumar wrote:
...
quoted
I vaguely recall raising the same issue before, and Linus saying he
wanted to be consistent with similar list_*() functions in other
subsystems, but personally I'd prefer to evaluate this aspect of the
pinctrl subsystem on its own.
Which other subsystems have such stuff?
For example. include/linux/regulator/driver.h struct regulator_ops field
list_voltage().
I vaguely recall raising the same issue before, and Linus saying he
wanted to be consistent with similar list_*() functions in other
subsystems, but personally I'd prefer to evaluate this aspect of the
pinctrl subsystem on its own.
Which other subsystems have such stuff?
For example. include/linux/regulator/driver.h struct regulator_ops field
list_voltage().
Thanks.
Anyway, if others implement it, that doesn't mean we also do that, even
if we are not happy with it. It is not only about cleaning of code, but
it will save boot time too.
@Linus: Can i have your viewpoint before i start doing this?
--
viresh
On Fri, Mar 30, 2012 at 6:01 AM, Viresh Kumar [off-list ref] wrote:
Anyway, if others implement it, that doesn't mean we also do that, even
if we are not happy with it. It is not only about cleaning of code, but
it will save boot time too.
@Linus: Can i have your viewpoint before i start doing this?
Just patch it, as detailed in the other letter there is really no point
for having it like this so go ahead. As long as you also patch all
the users and remove the old interface, just rewrite it. If you could
also test it on something it'd be nice ...
Yours,
Linus Walleij
Just patch it, as detailed in the other letter there is really no point
for having it like this so go ahead. As long as you also patch all
the users and remove the old interface, just rewrite it.
I have this in mind. Will fix all users.
If you could also test it on something it'd be nice ...
I don't have any board to test it. But after i am done with this, i
will complete pinctrl support for SPEAr and there i can test it.
I hope before that lot of other people would be able to test it. :)
BTW, i am planning not to add another call, get_groups_count(),
but add another field like ngroups, which would be set by users.
--
viresh
On Fri, Mar 30, 2012 at 7:09 AM, Viresh Kumar [off-list ref] wrote:
BTW, i am planning not to add another call, get_groups_count(),
but add another field like ngroups, which would be set by users.
get_groups_count() may make some sense if the number of
available groups could in some instance change at runtime.
Maybe a bit overcautious and pedantic but you never know...
But do it any way you like, I don't worry very much :-)
Yours,
Linus Walleij
get_groups_count() may make some sense if the number of
available groups could in some instance change at runtime.
Maybe a bit overcautious and pedantic but you never know...
On Thu, Mar 29, 2012 at 7:48 PM, Stephen Warren [off-list ref] wrote:
On 03/29/2012 11:31 AM, viresh kumar wrote:
quoted
On Mar 29, 2012 10:56 PM, Stephen Warren wrote:
quoted
On 03/29/2012 10:34 AM, viresh kumar wrote:
...
quoted
quoted
I vaguely recall raising the same issue before, and Linus saying he
wanted to be consistent with similar list_*() functions in other
subsystems, but personally I'd prefer to evaluate this aspect of the
pinctrl subsystem on its own.
Which other subsystems have such stuff?
For example. include/linux/regulator/driver.h struct regulator_ops field
list_voltage().
Well, actually .list_voltage() returns the voltage per se for each
enumerator, so it works like this quick way to iterate over a list
of integers.
But since we're not really getting anything back from the .list_groups()
callback, just zero or error, there is no specific point in having
it engineered like this.
So please go ahead and patch it in whatever way makes more
sense!
Thanks,
Linus Walleij
From: Mark Brown <hidden> Date: 2012-04-02 16:30:43
On Thu, Mar 29, 2012 at 11:48:14AM -0600, Stephen Warren wrote:
On 03/29/2012 11:31 AM, viresh kumar wrote:
quoted
Which other subsystems have such stuff?
For example. include/linux/regulator/driver.h struct regulator_ops field
list_voltage().
The reason regulator does this for list voltage is because we
idiomatically have gaps in the space of selectors as they should
normally map directly onto register values but sometimes some of the
register values are not specified so we need to skip them. This can
happen both due to chip limitations or due to constraints imposed by
the system.