[PATCH 2/6] pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500

Stephen Warren swarren at wwwdotorg.org
Wed Mar 13 14:26:07 EDT 2013


On 03/13/2013 10:11 AM, Linus Walleij wrote:
> On Sat, Mar 9, 2013 at 6:39 AM, Tony Prisk <linux at prisktech.co.nz> wrote:
> 
>> This patch adds support for the GPIO/pinmux controller found on the VIA
>> VT8500 and Wondermedia WM8xxx-series SoCs.
> (...)

>> +static int wmt_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,

>> +       for (i = 0; i < num_pins; i++) {
>> +               pin = prop_u32(pins, i);
> 
> So I don't get this. What is wrong with of_property_read_u32()?
> 
> I think there is something very strange about this parsing code
> if you can't use the common accessors to get the stuff you want,
> if you really need to inspect properties like that static inline does,
> then it should be explained and the function should *not* be in
> this driver but a helper in <linux/of_*> somewhere.

There is no of_property_read_u32_index(), which would read the nth u32
in a list of them. You're right there probably should be. My fault for
not creating one when I first wrote that code in the Tegra driver:-(



More information about the linux-arm-kernel mailing list