Modify

Opened 11 years ago

Closed 10 years ago

#1640 closed enhancement (worksforme)

target/linux/brcm47xx-2.6/files/include/asm-mips/mach-bcm947xx/gpio.h compilation patch

Reported by: dwrobel@… Owned by: developers
Priority: lowest Milestone:
Component: kernel Version:
Keywords: gpio, i2c, i2c-bcm5365 Cc:

Description

The patch allows gpio.h to be used e.g. by i2c-bcm5365.

Attachments (4)

gpio.h.diff (2.1 KB) - added by dwrobel@… 11 years ago.
aforementioned patch
i2c-bcm5365.c (4.9 KB) - added by dwrobel@… 11 years ago.
Working version of i2c-bcm5365 kernel module (tested on wgt634u with r7078)
gpio.h.2.diff (1.7 KB) - added by dwrobel@… 11 years ago.
kernel-2.6.22-rc6 compliant gpio.h patch
i2c.mk.diff (661 bytes) - added by dwrobel@… 11 years ago.
I2C menuconfig patch for: Arch-neutral GPIO API based I2C support

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by dwrobel@…

aforementioned patch

Changed 11 years ago by dwrobel@…

Working version of i2c-bcm5365 kernel module (tested on wgt634u with r7078)

comment:1 Changed 11 years ago by noz

Gpio part committed, to match the latest SSB core driver.

Changed 11 years ago by dwrobel@…

kernel-2.6.22-rc6 compliant gpio.h patch

Changed 11 years ago by dwrobel@…

I2C menuconfig patch for: Arch-neutral GPIO API based I2C support

comment:2 Changed 11 years ago by dwrobel@…

The latest gpio.h patch takes also into consideration recent changes made in gpio_direction_output() prototype.

Thanks to the Arch-neutral I2C support, it's no longer necessary to use the i2c-bcm5365 like modules.

The only thing which remains, is where to put some additional platform specific stuff for device registering?

/* for wgt634u SDA on TP3, SCL on TP4 */
tatic struct i2c_gpio_platform_data i2c_gpio_data = {
        .sda_pin                = 5, /* 
        .scl_pin                = 4,
        .udelay                 = 5,
        .timeout                = HZ,
        .sda_is_open_drain      = 1,
        .scl_is_open_drain      = 1,
        .scl_is_output_only     = 0
  };
  static struct platform_device i2c_gpio_device = {
        .name           = "i2c-gpio",
        .id             = 0,
        .dev            = {
                .platform_data  = &i2c_gpio_data,
        },
  };

and

platform_device_register(&i2c_gpio_device);

comment:3 Changed 10 years ago by nbd

  • Resolution set to worksforme
  • Status changed from new to closed

looks like the current version of i2c-gpio does what you want.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.