On 19/05/15 15:33, Thierry Reding wrote:
> * PGP Signed by an unknown key
> 
> On Tue, May 19, 2015 at 03:14:22PM +0100, Jon Hunter wrote:
> [...]
> 
> One more thing:
> 
> [...]
>> diff --git a/drivers/pinctrl/pinctrl-tegra-xusb.c 
>> b/drivers/pinctrl/pinctrl-tegra-xusb.c
>> index 3e8e4a914fb4..c61594066e26 100644
>> --- a/drivers/pinctrl/pinctrl-tegra-xusb.c
>> +++ b/drivers/pinctrl/pinctrl-tegra-xusb.c
>> @@ -125,6 +125,23 @@ static const char 
>> *tegra_xusb_padctl_get_group_name(struct pinctrl_dev *pinctrl,
>>      return padctl->soc->pins[group].name;
>>  }
>>  
>> +static int tegra_xusb_padctl_get_group_pins(struct pinctrl_dev *pinctrl,
>> +                                        unsigned group,
>> +                                        const unsigned **pins,
>> +                                        unsigned *num_pins)
>> +{
>> +    struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
>> +
>> +    /*
>> +     * For the tegra-xusb pad controller groups are synonomous
>> +     * with lanes/pins and there is always one lane/pin per group.
>> +     */
>> +    *pins = &padctl->soc->pins[group].number;
> 
> Shouldn't this be the same as pinctrl->desc->pins? In that case, maybe a
> better solution would be to make .get_group_pins() mandatory again and
> turn this into a pinctrl helper function that can be used by all group-
> only pinctrl drivers?

Yes I believe that you are right. However, I don't think a helper
function would work here, because this function returns a pointer to an
array of pin numbers. In the case of xusb this is simplified a bit
because we are only returning a single number here for the group.
However, if you look at other pinctrl devices (such as pinctrl-tegra.c)
there could be more than one number in the array.

Cheers
Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to