Skip to contentSkip to conversation

gpio: Adds GPIO driver support for Armada100

PATCH New Ajay Bhargav 3 participants 3 messages Jul 19, 2011 – Jul 20, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/4 gpio: Adds GPIO driver support for Armada100

Hi Prafulla,

Quoted 3 lines

I checked datasheet and for most GPIOs, AF1 is given as GPIO but for few its not, so adding a glue logic to check for specific GPIOs wont be a good idea. That's the reason i thought its good to keep MFP out of this. Please give suggestions.

correcting my previous message, I meant AF0.
adding to this.. I checked Linux kernel source and they are simply validating if gpio number is within max limits so request returns 0.

And you told me to use MAX_MFP instead of using ARMD_MAX_GPIO, but MAX_MFP is defined lesser than the actual number of GPIO e.g. in case of armada100 MAX_MFP is defined 117 whereas max GPIOs are around 123.

Please give me some suggestion.

Regards,
Ajay Bhargav

#2 lore raw

PATCH 1/4 gpio: Adds GPIO driver support for Armada100

Quoted 23 lines

-----Original Message-----
From: Ajay Bhargav [mailto:ajay.bhargav at einfochips.com]
Sent: Tuesday, July 19, 2011 3:59 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de; Ashish Karkare; Prabhanjan Sarnaik
Subject: Re: [PATCH 1/4] gpio: Adds GPIO driver support for Armada100

Hi Prafulla,

Quoted 1 line

I checked datasheet and for most GPIOs, AF1 is given as GPIO but for

few

Quoted 1 line

its not, so adding a glue logic to check for specific GPIOs wont be a

good idea.

Quoted 1 line

That's the reason i thought its good to keep MFP out of this. Please

give suggestions.

correcting my previous message, I meant AF0.
adding to this.. I checked Linux kernel source and they are simply validating if gpio number
is within max limits so request returns 0.

Quoted 5 lines

And you told me to use MAX_MFP instead of using ARMD_MAX_GPIO, but MAX_MFP is defined lesser
than the actual number of GPIO e.g. in case of armada100 MAX_MFP is defined 117 whereas max
GPIOs are around 123.

I will check and let you know.

Regards..
Prafulla . .

#3 lore raw

PATCH 1/4 gpio: Adds GPIO driver support for Armada100

In reply to Ajay Bhargav

Hi Ajay,

Quoted 10 lines · Ajay Bhargav

Hi Prafulla,

Quoted 3 lines

I checked datasheet and for most GPIOs, AF1 is given as GPIO but for few its not, so adding a glue logic to check for specific GPIOs wont be a good idea. That's the reason i thought its good to keep MFP out of this. Please give suggestions.

correcting my previous message, I meant AF0.
adding to this.. I checked Linux kernel source and they are simply validating if gpio number is within max limits so request returns 0.

Quoted 5 lines

And you told me to use MAX_MFP instead of using ARMD_MAX_GPIO, but MAX_MFP is defined lesser than the actual number of GPIO e.g. in case of armada100 MAX_MFP is defined 117 whereas max GPIOs are around 123.

Please give me some suggestion.

Actually, as uboot target at small size, I tend to don't add too much logic to it. So there is no need to
check the "MAX", if one need to set the gpio, he should notice by himself, the gpio number he specified
is a valid gpio address in the system.

Best regards,
Lei