Re: [PATCH 15/18] staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

2018-12-31 Thread Sergio Paracuellos
On Sun, Dec 30, 2018 at 9:28 AM NeilBrown wrote: > > On Sun, Dec 30 2018, Sergio Paracuellos wrote: > > > Hi again and sorry for the noise. > > A bit of noise is no problem, especially when it leads to the right > answer. > > > > > + *num_maps = 0; > > Yes, this works. > I had tried other

Re: [PATCH 15/18] staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

2018-12-30 Thread NeilBrown
On Sun, Dec 30 2018, Sergio Paracuellos wrote: > Hi again and sorry for the noise. A bit of noise is no problem, especially when it leads to the right answer. > > + *num_maps = 0; Yes, this works. I had tried other numbers like ngroups, and got strange errors. With this, it all works. >

Re: [PATCH 15/18] staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

2018-12-30 Thread Sergio Paracuellos
Hi again and sorry for the noise. On Sun, Dec 30, 2018 at 8:37 AM Sergio Paracuellos wrote: > > Hi again, > > Sorry, Too early in the morning and I misunderstood the problem :-) > > On Sun, Dec 30, 2018 at 8:24 AM Sergio Paracuellos > wrote: > > > > Hi Neil, > > > > On Sun, Dec 30, 2018 at 4:58

Re: [PATCH 15/18] staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

2018-12-29 Thread Sergio Paracuellos
Hi again, Sorry, Too early in the morning and I misunderstood the problem :-) On Sun, Dec 30, 2018 at 8:24 AM Sergio Paracuellos wrote: > > Hi Neil, > > On Sun, Dec 30, 2018 at 4:58 AM NeilBrown wrote: > > > > On Thu, Jun 07 2018, Sergio Paracuellos wrote: > > > > > Using 'function' and

Re: [PATCH 15/18] staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

2018-12-29 Thread Sergio Paracuellos
Hi Neil, On Sun, Dec 30, 2018 at 4:58 AM NeilBrown wrote: > > On Thu, Jun 07 2018, Sergio Paracuellos wrote: > > > Using 'function' and 'groups' bindings in the device tree give the > > posibility of refactor 'rt2880_pinctrl_dt_node_to_map' and simplify > > it a lot. Make use of the

Re: [PATCH 15/18] staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

2018-12-29 Thread NeilBrown
On Thu, Jun 07 2018, Sergio Paracuellos wrote: > Using 'function' and 'groups' bindings in the device tree give the > posibility of refactor 'rt2880_pinctrl_dt_node_to_map' and simplify > it a lot. Make use of the 'of_property_count_strings' function to get > number of groups for the node and

[PATCH 15/18] staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

2018-06-07 Thread Sergio Paracuellos
Using 'function' and 'groups' bindings in the device tree give the posibility of refactor 'rt2880_pinctrl_dt_node_to_map' and simplify it a lot. Make use of the 'of_property_count_strings' function to get number of groups for the node and iterate over the groups using 'of_property_for_each_string'