open-drain GPIO drivers?

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

RevH of the ap7000 docs added the previously-hidden MDER, MDDR, and MDSR registers ... resolving the main difference betwen these GPIO modules and the AT91 modules. (The docs haven't fully caught up though; Figure 19-3 omits those registers, and this functionality is otherwise not brought out in the text.)

Is there any reason not to immediately update all code to handle this option? E.g. let Linux configure pins this way, teach the bitbang I2C code to use it, and so on.

My concern is that the doc change doesn't say "why" this information was now restored after having been removed at some point. Did these registers not work correctly in some earlier chip versions ... docs papered over an erratum? Or was this just an experiment to see whether customers really needed open-drain mode?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
I've updated the i2c bitbanging driver to support open-drain GPIO and it works for me.

Matteo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which bit-banging driver? The one which uses the actual gpio framework? Please to post patch? :)

Thx,
-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

squidgit wrote:
Which bit-banging driver? The one which uses the actual gpio framework? Please to post patch? :)

Thx,
-S.

Hi,
this patch is against the i2c-gpio driver I found with the ISI driver and kernel 2.6.20. I hope can be useful

Matteo

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I get: "Sorry but you are not authorized to view or download this Attachment."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Works for me, try again?

That patch does break platforms which want to use gpio-i2c but don't support multidrive so isn't suitable for anything upstream but no probs just for individual's work, thanks :)

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tried again ... no luck. Using Konqueror, I get a webpage with lots of noise then that message. Using Firefox (albeit not logged-in) I don't even see the attachment thingie. Maybe the problem is the way PNphpBB handles attachments, and downloading them.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The patch has some nice stuff in it, but it contains several unrelated changes and it seems to be based on an old version of the i2c-gpio driver (which doesn't support open-drain gpio.) A patch which _only_ adds and implements the GPIOF_MULTIDRV flag would be very welcome on the kernel@avr32linux.org list (you don't have to subscribe, but you might get held for moderation for a bit if you don't.)

After a patch like that is in, you could:
* Add the GPIOF_MULTIDRV flag to the relevant portmux calls
* Set sda_is_open_drain and scl_is_open_drain to 1 in the i2c_gpio_platform_data definition

and you would have i2c-gpio using open-drain gpio, assuming you're using a recent i2c-gpio driver (i.e. the one from mainline.) No modifications to the actual driver are necessary.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Btw, by "mainline" I mean 2.6.22 or later.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mojojojo wrote:
Using Firefox (albeit not logged-in) I don't even see the attachment thingie.
You do certainly have to be logged in before you can download attachments, this is common to all browsers AFAIK. I have also noticed Konquerer having some issues with phpBB before so I generally do stick to firefox here.

-S.