Skip to content

Commit

Permalink
OMAP1: I2C: fix device initialization
Browse files Browse the repository at this point in the history
Commit 4d17aeb ("OMAP: I2C: split
device registration and convert OMAP2+ to omap_device") broke I2C on
OMAP1.  The following messages appear at boot:

i2c_omap i2c_omap.1: failure requesting irq 0
i2c_omap: probe of i2c_omap.1 failed with error -22

Investigation revealed that a chunk of code is missing from the
original plat-omap/i2c.c file which configured the IRQ and base address
for the I2C block on OMAP1.  Upon adding this back, the OMAP1 I2C block
seems to initialize correctly.

Thanks to Cory Maccarrone <darkstar6262@gmail.com> for reporting the bug,
and apologies for the breakage.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Tested-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Paul Walmsley authored and Tony Lindgren committed Dec 7, 2010
1 parent 52aa8c5 commit 00b4ade
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/arm/plat-omap/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,15 @@ static inline int omap1_i2c_add_bus(int bus_id)
{
struct platform_device *pdev;
struct omap_i2c_bus_platform_data *pdata;
struct resource *res;

omap1_i2c_mux_pins(bus_id);

pdev = &omap_i2c_devices[bus_id - 1];
res = pdev->resource;
res[0].start = OMAP1_I2C_BASE;
res[0].end = res[0].start + OMAP_I2C_SIZE;
res[1].start = INT_I2C;
pdata = &i2c_pdata[bus_id - 1];

return platform_device_register(pdev);
Expand Down

0 comments on commit 00b4ade

Please sign in to comment.