Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183043
b: refs/heads/master
c: a0dcf19
h: refs/heads/master
i:
  183041: 9bafc1e
  183039: d334c03
v: v3
  • Loading branch information
Russell King committed Feb 12, 2010
1 parent 69fcf73 commit 5ecc6a1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bba2be480b981bc1e7bea24c2a2552b0ad7e9774
refs/heads/master: a0dcf19f59d4f37150a6b7e115925d72aca15293
24 changes: 0 additions & 24 deletions trunk/arch/arm/mach-pnx4008/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,6 @@ static int set_clock_stop(struct platform_device *pdev)
return retval;
}

static int i2c_pnx_suspend(struct platform_device *pdev, pm_message_t state)
{
int retval = 0;
#ifdef CONFIG_PM
retval = set_clock_run(pdev);
#endif
return retval;
}

static int i2c_pnx_resume(struct platform_device *pdev)
{
int retval = 0;
#ifdef CONFIG_PM
retval = set_clock_run(pdev);
#endif
return retval;
}

static u32 calculate_input_freq(struct platform_device *pdev)
{
return HCLK_MHZ;
Expand Down Expand Up @@ -102,26 +84,20 @@ static struct i2c_adapter pnx_adapter2 = {
};

static struct i2c_pnx_data i2c0_data = {
.suspend = i2c_pnx_suspend,
.resume = i2c_pnx_resume,
.calculate_input_freq = calculate_input_freq,
.set_clock_run = set_clock_run,
.set_clock_stop = set_clock_stop,
.adapter = &pnx_adapter0,
};

static struct i2c_pnx_data i2c1_data = {
.suspend = i2c_pnx_suspend,
.resume = i2c_pnx_resume,
.calculate_input_freq = calculate_input_freq,
.set_clock_run = set_clock_run,
.set_clock_stop = set_clock_stop,
.adapter = &pnx_adapter1,
};

static struct i2c_pnx_data i2c2_data = {
.suspend = i2c_pnx_suspend,
.resume = i2c_pnx_resume,
.calculate_input_freq = calculate_input_freq,
.set_clock_run = set_clock_run,
.set_clock_stop = set_clock_stop,
Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/i2c/busses/i2c-pnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,18 +545,23 @@ static struct i2c_algorithm pnx_algorithm = {
.functionality = i2c_pnx_func,
};

#ifdef CONFIG_PM
static int i2c_pnx_controller_suspend(struct platform_device *pdev,
pm_message_t state)
{
struct i2c_pnx_data *i2c_pnx = platform_get_drvdata(pdev);
return i2c_pnx->suspend(pdev, state);
return i2c_pnx->set_clock_run(pdev);
}

static int i2c_pnx_controller_resume(struct platform_device *pdev)
{
struct i2c_pnx_data *i2c_pnx = platform_get_drvdata(pdev);
return i2c_pnx->resume(pdev);
return i2c_pnx->set_clock_run(pdev);
}
#else
#define i2c_pnx_controller_suspend NULL
#define i2c_pnx_controller_resume NULL
#endif

static int __devinit i2c_pnx_probe(struct platform_device *pdev)
{
Expand Down
4 changes: 0 additions & 4 deletions trunk/include/linux/i2c-pnx.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#ifndef __I2C_PNX_H__
#define __I2C_PNX_H__

#include <linux/pm.h>

struct platform_device;

struct i2c_pnx_mif {
Expand All @@ -34,8 +32,6 @@ struct i2c_pnx_algo_data {
};

struct i2c_pnx_data {
int (*suspend) (struct platform_device *pdev, pm_message_t state);
int (*resume) (struct platform_device *pdev);
u32 (*calculate_input_freq) (struct platform_device *pdev);
int (*set_clock_run) (struct platform_device *pdev);
int (*set_clock_stop) (struct platform_device *pdev);
Expand Down

0 comments on commit 5ecc6a1

Please sign in to comment.