Platform data isn't really needed for this MFD driver; the regulator
data is not passed in through it and the MFD subdev information isn't
really a function of board configuration. So it makes perfect sense to
just hardcode the cells in the driver and not having to specify them on
every board, etc.
BUG=chrome-os-partner:9776
TEST=build, boot, see graphics on console
Change-Id: I94ddd28b037027fdfab5d41a741d8ffedac97ae8
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/18606
Reviewed-by: Doug Anderson <dianders@google.com>
Tested-by: Olof Johansson <olofj@google.com>
static int __devinit tps65090_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- struct tps65090_platform_data *pdata = client->dev.platform_data;
struct tps65090 *tps65090;
int ret;
- if (!pdata) {
- dev_err(&client->dev, "tps65090 requires platform data\n");
- return -EINVAL;
- }
-
tps65090 = devm_kzalloc(&client->dev, sizeof(struct tps65090),
GFP_KERNEL);
if (tps65090 == NULL)
#ifndef __LINUX_MFD_TPS65090_H
#define __LINUX_MFD_TPS65090_H
-struct tps65090_subdev_info {
- int id;
- const char *name;
- void *platform_data;
-};
-
-struct tps65090_platform_data {
- int irq_base;
- int num_subdevs;
- struct tps65090_subdev_info *subdevs;
-};
-
/*
* NOTE: the functions below are not intended for use outside
* of the TPS65090 sub-device drivers