Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02929a44 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'regulator/topic/cpcap',...

Merge remote-tracking branches 'regulator/topic/cpcap', 'regulator/topic/da9063', 'regulator/topic/dt', 'regulator/topic/fan53555' and 'regulator/topic/ltc3589' into regulator-next
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -204,8 +204,8 @@ static struct device_node *of_get_regulator(struct device *dev, const char *supp
	regnode = of_parse_phandle(dev->of_node, prop_name, 0);

	if (!regnode) {
		dev_dbg(dev, "Looking up %s property in node %s failed\n",
				prop_name, dev->of_node->full_name);
		dev_dbg(dev, "Looking up %s property in node %pOF failed\n",
				prop_name, dev->of_node);
		return NULL;
	}
	return regnode;
+13 −0
Original line number Diff line number Diff line
@@ -123,6 +123,7 @@ struct cpcap_regulator {
		.enable_val = (mode_val),				\
		.disable_val = (off_val),				\
		.ramp_delay = (volt_trans_time),			\
		.of_map_mode = cpcap_map_mode,				\
	},								\
	.assign_reg = (assignment_reg),					\
	.assign_mask = (assignment_mask),				\
@@ -213,6 +214,18 @@ static int cpcap_regulator_disable(struct regulator_dev *rdev)
	return error;
}

static unsigned int cpcap_map_mode(unsigned int mode)
{
	switch (mode) {
	case CPCAP_BIT_AUDIO_NORMAL_MODE:
		return REGULATOR_MODE_NORMAL;
	case CPCAP_BIT_AUDIO_LOW_PWR:
		return REGULATOR_MODE_STANDBY;
	default:
		return -EINVAL;
	}
}

static unsigned int cpcap_regulator_get_mode(struct regulator_dev *rdev)
{
	int value;
+1 −1
Original line number Diff line number Diff line
@@ -736,7 +736,7 @@ static int da9063_regulator_probe(struct platform_device *pdev)
	if (IS_ERR(regl_pdata) || regl_pdata->n_regulators == 0) {
		dev_err(&pdev->dev,
			"No regulators defined for the platform\n");
		return PTR_ERR(regl_pdata);
		return -ENODEV;
	}

	/* Find regulators set for particular device model */
+6 −9
Original line number Diff line number Diff line
@@ -407,14 +407,8 @@ static int fan53555_regulator_probe(struct i2c_client *client,

	di->regulator = pdata->regulator;
	if (client->dev.of_node) {
		const struct of_device_id *match;

		match = of_match_device(of_match_ptr(fan53555_dt_ids),
					&client->dev);
		if (!match)
			return -ENODEV;

		di->vendor = (unsigned long) match->data;
		di->vendor =
			(unsigned long)of_device_get_match_data(&client->dev);
	} else {
		/* if no ramp constraint set, get the pdata ramp_delay */
		if (!di->regulator->constraints.ramp_delay) {
@@ -476,7 +470,10 @@ static const struct i2c_device_id fan53555_id[] = {
		.name = "fan53555",
		.driver_data = FAN53555_VENDOR_FAIRCHILD
	}, {
		.name = "syr82x",
		.name = "syr827",
		.driver_data = FAN53555_VENDOR_SILERGY
	}, {
		.name = "syr828",
		.driver_data = FAN53555_VENDOR_SILERGY
	},
	{ },
+1 −1
Original line number Diff line number Diff line
@@ -539,7 +539,7 @@ static int ltc3589_probe(struct i2c_client *client,
	return 0;
}

static struct i2c_device_id ltc3589_i2c_id[] = {
static const struct i2c_device_id ltc3589_i2c_id[] = {
	{ "ltc3589",   LTC3589   },
	{ "ltc3589-1", LTC3589_1 },
	{ "ltc3589-2", LTC3589_2 },
Loading