Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199390
b: refs/heads/master
c: 0bc20bb
h: refs/heads/master
v: v3
  • Loading branch information
Todd Fischer authored and Samuel Ortiz committed May 27, 2010
1 parent eb35fe6 commit 5902c4d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 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: d183fcc975cbbc9c427deb2d7948ab03673995c9
refs/heads/master: 0bc20bba357f18a0e52f45afc452d0b69cf06f76
7 changes: 6 additions & 1 deletion trunk/arch/arm/mach-davinci/board-da850-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/i2c/pca953x.h>
#include <linux/mfd/tps6507x.h>
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/mtd/mtd.h>
Expand Down Expand Up @@ -533,10 +534,14 @@ struct regulator_init_data tps65070_regulator_data[] = {
},
};

static struct tps6507x_board tps_board = {
.tps6507x_pmic_init_data = &tps65070_regulator_data[0],
};

static struct i2c_board_info __initdata da850evm_tps65070_info[] = {
{
I2C_BOARD_INFO("tps6507x", 0x48),
.platform_data = &tps65070_regulator_data[0],
.platform_data = &tps_board,
},
};

Expand Down
14 changes: 12 additions & 2 deletions trunk/drivers/regulator/tps6507x-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,20 +489,30 @@ static int __devinit tps_6507x_probe(struct i2c_client *client,
struct regulator_init_data *init_data;
struct regulator_dev *rdev;
struct tps_pmic *tps;
struct tps6507x_board *tps_board;
int i;
int error;

if (!i2c_check_functionality(client->adapter,
I2C_FUNC_SMBUS_BYTE_DATA))
return -EIO;

/**
* tps_board points to pmic related constants
* coming from the board-evm file.
*/

tps_board = dev_get_platdata(&client->dev);
if (!tps_board)
return -EINVAL;

/**
* init_data points to array of regulator_init structures
* coming from the board-evm file.
*/
init_data = client->dev.platform_data;
init_data = tps_board->tps6507x_pmic_init_data;
if (!init_data)
return -EIO;
return -EINVAL;

tps = kzalloc(sizeof(*tps), GFP_KERNEL);
if (!tps)
Expand Down
11 changes: 11 additions & 0 deletions trunk/include/linux/mfd/tps6507x.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,15 @@
/* VDCDC MASK */
#define TPS6507X_DEFDCDCX_DCDC_MASK 0X3F

/**
* struct tps6507x_board - packages regulator and touchscreen init data
* @tps6507x_regulator_data: regulator initialization values
*
* Board data may be used to initialize regulator and touchscreen.
*/

struct tps6507x_board {
struct regulator_init_data *tps6507x_pmic_init_data;
};

#endif /* __LINUX_MFD_TPS6507X_H */

0 comments on commit 5902c4d

Please sign in to comment.