lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20120717121943.a8266271ec4f5635954d5fda@canb.auug.org.au>
Date:	Tue, 17 Jul 2012 12:19:43 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Liam Girdwood <lrg@...com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Sangbeom Kim <sbkim73@...sung.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Axel Lin <axel.lin@...il.com>
Subject: linux-next: manual merge of the regulator tree with the mfd tree

Hi all,

Today's linux-next merge of the regulator tree got a conflicts in
drivers/regulator/s5m8767.c between commit 63063bfbffe9 ("mfd: Modify
samsung mfd driver for common api") from the mfd tree and commits
3fe3a182adfe ("regulator: Remove s5m8767a buck initialization"),
df2643cfa4ad ("regulator: Replace set_voltage with set_voltage_sel"),
c848bc8538cd ("regulator: s5m8767a: Support AP watchdog reset
operation"), 1af142c6f984 ("regulator: Modify ramp_delay value for
s5m8767a"), e2eb169b1bc2 ("regulator: s5m8767: Convert to
regulator_list_voltage_linear") from the regulator tree.

I fixed it all up (I think - see below) and can carry the fixes as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/regulator/s5m8767.c
index aeea91b,102287f..0000000
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@@ -431,14 -407,8 +407,8 @@@ static int s5m8767_set_voltage_sel(stru
  		if (ret)
  			return ret;
  
- 		sec_reg_read(s5m8767->iodev, reg, &val);
- 		val = (val & ~mask) | sel;
- 
- 		ret = sec_reg_write(s5m8767->iodev, reg, val);
 -		return s5m_reg_update(s5m8767->iodev, reg, selector, mask);
++		return sec_reg_update(s5m8767->iodev, reg, selector, mask);
  	}
- 
- 	*selector = sel;
- 	return ret;
  }
  
  static int s5m8767_set_voltage_time_sel(struct regulator_dev *rdev,
@@@ -579,6 -567,27 +567,27 @@@ static __devinit int s5m8767_pmic_probe
  	s5m8767->buck4_ramp = pdata->buck4_ramp_enable;
  	s5m8767->opmode = pdata->opmode;
  
+ 	buck_init = s5m8767_convert_voltage_to_sel(&buck_voltage_val2,
+ 						pdata->buck2_init,
+ 						pdata->buck2_init +
+ 						buck_voltage_val2.step);
+ 
 -	s5m_reg_write(s5m8767->iodev, S5M8767_REG_BUCK2DVS2, buck_init);
++	sec_reg_write(s5m8767->iodev, S5M8767_REG_BUCK2DVS2, buck_init);
+ 
+ 	buck_init = s5m8767_convert_voltage_to_sel(&buck_voltage_val2,
+ 						pdata->buck3_init,
+ 						pdata->buck3_init +
+ 						buck_voltage_val2.step);
+ 
 -	s5m_reg_write(s5m8767->iodev, S5M8767_REG_BUCK3DVS2, buck_init);
++	sec_reg_write(s5m8767->iodev, S5M8767_REG_BUCK3DVS2, buck_init);
+ 
+ 	buck_init = s5m8767_convert_voltage_to_sel(&buck_voltage_val2,
+ 						pdata->buck4_init,
+ 						pdata->buck4_init +
+ 						buck_voltage_val2.step);
+ 
 -	s5m_reg_write(s5m8767->iodev, S5M8767_REG_BUCK4DVS2, buck_init);
++	sec_reg_write(s5m8767->iodev, S5M8767_REG_BUCK4DVS2, buck_init);
+ 
  	for (i = 0; i < 8; i++) {
  		if (s5m8767->buck2_gpiodvs) {
  			s5m8767->buck2_vol[i] =
@@@ -608,48 -617,70 +617,70 @@@
  		}
  	}
  
- 	if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs ||
- 		pdata->buck4_gpiodvs) {
- 		if (gpio_is_valid(pdata->buck_gpios[0]) &&
- 			gpio_is_valid(pdata->buck_gpios[1]) &&
- 			gpio_is_valid(pdata->buck_gpios[2])) {
- 			ret = gpio_request(pdata->buck_gpios[0],
- 						"S5M8767 SET1");
- 			if (ret == -EBUSY)
- 				dev_warn(&pdev->dev, "Duplicated gpio request for SET1\n");
- 
- 			ret = gpio_request(pdata->buck_gpios[1],
- 					   "S5M8767 SET2");
- 			if (ret == -EBUSY)
- 				dev_warn(&pdev->dev, "Duplicated gpio request for SET2\n");
- 
- 			ret = gpio_request(pdata->buck_gpios[2],
- 					   "S5M8767 SET3");
- 			if (ret == -EBUSY)
- 				dev_warn(&pdev->dev, "Duplicated gpio request for SET3\n");
- 			/* SET1 GPIO */
- 			gpio_direction_output(pdata->buck_gpios[0],
- 					(s5m8767->buck_gpioindex >> 2) & 0x1);
- 			/* SET2 GPIO */
- 			gpio_direction_output(pdata->buck_gpios[1],
- 					(s5m8767->buck_gpioindex >> 1) & 0x1);
- 			/* SET3 GPIO */
- 			gpio_direction_output(pdata->buck_gpios[2],
- 					(s5m8767->buck_gpioindex >> 0) & 0x1);
- 			ret = 0;
- 		} else {
- 			dev_err(&pdev->dev, "GPIO NOT VALID\n");
- 			ret = -EINVAL;
+ 	if (gpio_is_valid(pdata->buck_gpios[0]) &&
+ 		gpio_is_valid(pdata->buck_gpios[1]) &&
+ 		gpio_is_valid(pdata->buck_gpios[2])) {
+ 		ret = devm_gpio_request(&pdev->dev, pdata->buck_gpios[0],
+ 					"S5M8767 SET1");
+ 		if (ret)
  			return ret;
- 		}
+ 
+ 		ret = devm_gpio_request(&pdev->dev, pdata->buck_gpios[1],
+ 					"S5M8767 SET2");
+ 		if (ret)
+ 			return ret;
+ 
+ 		ret = devm_gpio_request(&pdev->dev, pdata->buck_gpios[2],
+ 					"S5M8767 SET3");
+ 		if (ret)
+ 			return ret;
+ 
+ 		/* SET1 GPIO */
+ 		gpio_direction_output(pdata->buck_gpios[0],
+ 				(s5m8767->buck_gpioindex >> 2) & 0x1);
+ 		/* SET2 GPIO */
+ 		gpio_direction_output(pdata->buck_gpios[1],
+ 				(s5m8767->buck_gpioindex >> 1) & 0x1);
+ 		/* SET3 GPIO */
+ 		gpio_direction_output(pdata->buck_gpios[2],
+ 				(s5m8767->buck_gpioindex >> 0) & 0x1);
+ 	} else {
+ 		dev_err(&pdev->dev, "GPIO NOT VALID\n");
+ 		ret = -EINVAL;
+ 		return ret;
  	}
  
- 	sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK2CTRL,
- 			(pdata->buck2_gpiodvs) ? (1 << 1) : (0 << 1), 1 << 1);
- 	sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK3CTRL,
- 			(pdata->buck3_gpiodvs) ? (1 << 1) : (0 << 1), 1 << 1);
- 	sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK4CTRL,
- 			(pdata->buck4_gpiodvs) ? (1 << 1) : (0 << 1), 1 << 1);
+ 	ret = devm_gpio_request(&pdev->dev, pdata->buck_ds[0], "S5M8767 DS2");
+ 	if (ret)
+ 		return ret;
+ 
+ 	ret = devm_gpio_request(&pdev->dev, pdata->buck_ds[1], "S5M8767 DS3");
+ 	if (ret)
+ 		return ret;
+ 
+ 	ret = devm_gpio_request(&pdev->dev, pdata->buck_ds[2], "S5M8767 DS4");
+ 	if (ret)
+ 		return ret;
+ 
+ 	/* DS2 GPIO */
+ 	gpio_direction_output(pdata->buck_ds[0], 0x0);
+ 	/* DS3 GPIO */
+ 	gpio_direction_output(pdata->buck_ds[1], 0x0);
+ 	/* DS4 GPIO */
+ 	gpio_direction_output(pdata->buck_ds[2], 0x0);
+ 
+ 	if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs ||
+ 	   pdata->buck4_gpiodvs) {
 -		s5m_reg_update(s5m8767->iodev, S5M8767_REG_BUCK2CTRL,
++		sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK2CTRL,
+ 				(pdata->buck2_gpiodvs) ? (1 << 1) : (0 << 1),
+ 				1 << 1);
 -		s5m_reg_update(s5m8767->iodev, S5M8767_REG_BUCK3CTRL,
++		sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK3CTRL,
+ 				(pdata->buck3_gpiodvs) ? (1 << 1) : (0 << 1),
+ 				1 << 1);
 -		s5m_reg_update(s5m8767->iodev, S5M8767_REG_BUCK4CTRL,
++		sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK4CTRL,
+ 				(pdata->buck4_gpiodvs) ? (1 << 1) : (0 << 1),
+ 				1 << 1);
+ 	}
  
  	/* Initialize GPIO DVS registers */
  	for (i = 0; i < 8; i++) {
@@@ -668,28 -699,29 +699,29 @@@
  					   s5m8767->buck4_vol[i]);
  		}
  	}
- 	sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK2CTRL, 0x78, 0xff);
- 	sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK3CTRL, 0x58, 0xff);
- 	sec_reg_update(s5m8767->iodev, S5M8767_REG_BUCK4CTRL, 0x78, 0xff);
  
  	if (s5m8767->buck2_ramp)
 -		s5m_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, 0x08, 0x08);
 +		sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, 0x08, 0x08);
  
  	if (s5m8767->buck3_ramp)
 -		s5m_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, 0x04, 0x04);
 +		sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, 0x04, 0x04);
  
  	if (s5m8767->buck4_ramp)
 -		s5m_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, 0x02, 0x02);
 +		sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP, 0x02, 0x02);
  
  	if (s5m8767->buck2_ramp || s5m8767->buck3_ramp
  		|| s5m8767->buck4_ramp) {
  		switch (s5m8767->ramp_delay) {
- 		case 15:
+ 		case 5:
 -			s5m_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP,
 +			sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP,
- 					0xc0, 0xf0);
+ 					0x40, 0xf0);
+ 			break;
+ 		case 10:
 -			s5m_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP,
++			sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP,
+ 					0x90, 0xf0);
  			break;
  		case 25:
 -			s5m_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP,
 +			sec_reg_update(s5m8767->iodev, S5M8767_REG_DVSRAMP,
  					0xd0, 0xf0);
  			break;
  		case 50:

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ