[U-Boot] [PATCH v1 02/16] gpio: Add support for Qualcomm gpio controller

Mateusz Kulikowski
2016-01-11T21:27:58Z

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 11.01.2016 17:57, Simon Glass wrote:
> Hi,
>
> On 6 January 2016 at 11:21, Mateusz Kulikowski
> <mateusz.kulikowski@gmail.com> wrote:
[...]
>> +static int msm_gpio_get_function(struct udevice *dev, unsigned offset)
>> +{
>> + struct msm_gpio_bank *priv = dev_get_priv(dev);
>> +
>> + if (readl(priv->base + GPIO_CONFIG_OFF(offset)) & GPIO_OE_ENABLE)
>> + return GPIOF_OUTPUT;
>> + return GPIOF_INPUT;
>
> Can it ever be GPIOF_FUNCTION?

For now - not (at least not until I implement pin multiplexing).

This may change once I upgrade the code to replace LittleKernel/fastboot.

[...]
>> +{
>> + struct msm_gpio_bank *priv = dev_get_priv(dev);
>> +
>> + priv->base = dev_get_addr(dev);
>> + return priv->base == FDT_ADDR_T_NONE;
>
> Maybe you mean:
>
> return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0;

Yes I meant that :)

Regards,
Mateusz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJWlB5aAAoJELvtohmVtQzBjDoH/RT9FQGlyNs4KFXhmji970cN
snZxfEQ28kW0A3Tzpbw8S36SgPz5Qr/xwUjXWc4pOGQwgnEQRj7IPnPrgVgbdg4c
VZzoLmLFFLJTnvinoYQmEq0uLMZgDaG6YcvCKPEI1N8fBstsa0UOsflwSFFedvJm
CryhDVQMZnn4SD0jhWCcrsGcaddGAbNj0bdTnF3RqnJnBo4/phI2pP+WLxjv67SQ
H/7k9b29dv9i1em2/DY/SKoTasETVEAaMyVF6FjYj2fzAHwTLaFwGSyZivFSzB7W
spPGK3EoHo+NfAmP3MLrk4R8l5LdACB+jBKfDC9BKtzN0ToQhbKyw53fs/C94cI=
=SpRK
-----END PGP SIGNATURE-----