All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] power: regulator: act8846: fix reading values
@ 2016-08-07 11:55 John Keeping
  2016-08-07 11:55 ` [U-Boot] [PATCH 2/2] power: pmic: act8846: add missing newline to debug statements John Keeping
  2016-08-08 21:44 ` [U-Boot] [PATCH 1/2] power: regulator: act8846: fix reading values Simon Glass
  0 siblings, 2 replies; 6+ messages in thread
From: John Keeping @ 2016-08-07 11:55 UTC (permalink / raw)
  To: u-boot

The voltage and control registers need to be looked up from the value in
driver_data.  Adjust the get_value and get_enable functions to match the
corresponding set_* functions.

Signed-off-by: John Keeping <john@metanate.com>
---

 drivers/power/regulator/act8846.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/power/regulator/act8846.c b/drivers/power/regulator/act8846.c
index 255f8b0..d506165 100644
--- a/drivers/power/regulator/act8846.c
+++ b/drivers/power/regulator/act8846.c
@@ -88,7 +88,7 @@ static int reg_get_value(struct udevice *dev)
 	int reg = dev->driver_data;
 	int ret;
 
-	ret = pmic_reg_read(dev->parent, reg);
+	ret = pmic_reg_read(dev->parent, addr_vol[reg]);
 	if (ret < 0)
 		return ret;
 
@@ -120,7 +120,7 @@ static bool reg_get_enable(struct udevice *dev)
 	int reg = dev->driver_data;
 	int ret;
 
-	ret = pmic_reg_read(dev->parent, reg);
+	ret = pmic_reg_read(dev->parent, addr_ctl[reg]);
 	if (ret < 0)
 		return ret;
 
-- 
2.9.2.639.g855ae9f

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] power: pmic: act8846: add missing newline to debug statements
  2016-08-07 11:55 [U-Boot] [PATCH 1/2] power: regulator: act8846: fix reading values John Keeping
@ 2016-08-07 11:55 ` John Keeping
  2016-08-08 21:44   ` Simon Glass
  2016-08-08 21:44 ` [U-Boot] [PATCH 1/2] power: regulator: act8846: fix reading values Simon Glass
  1 sibling, 1 reply; 6+ messages in thread
From: John Keeping @ 2016-08-07 11:55 UTC (permalink / raw)
  To: u-boot

Signed-off-by: John Keeping <john@metanate.com>
---

 drivers/power/pmic/act8846.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/power/pmic/act8846.c b/drivers/power/pmic/act8846.c
index ff096b3..e8164bf 100644
--- a/drivers/power/pmic/act8846.c
+++ b/drivers/power/pmic/act8846.c
@@ -29,7 +29,7 @@ static int act8846_write(struct udevice *dev, uint reg, const uint8_t *buff,
 			  int len)
 {
 	if (dm_i2c_write(dev, reg, buff, len)) {
-		debug("write error to device: %p register: %#x!", dev, reg);
+		debug("write error to device: %p register: %#x!\n", dev, reg);
 		return -EIO;
 	}
 
@@ -39,7 +39,7 @@ static int act8846_write(struct udevice *dev, uint reg, const uint8_t *buff,
 static int act8846_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
 {
 	if (dm_i2c_read(dev, reg, buff, len)) {
-		debug("read error from device: %p register: %#x!", dev, reg);
+		debug("read error from device: %p register: %#x!\n", dev, reg);
 		return -EIO;
 	}
 
-- 
2.9.2.639.g855ae9f

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] power: regulator: act8846: fix reading values
  2016-08-07 11:55 [U-Boot] [PATCH 1/2] power: regulator: act8846: fix reading values John Keeping
  2016-08-07 11:55 ` [U-Boot] [PATCH 2/2] power: pmic: act8846: add missing newline to debug statements John Keeping
@ 2016-08-08 21:44 ` Simon Glass
  2016-08-12 17:04   ` Simon Glass
  1 sibling, 1 reply; 6+ messages in thread
From: Simon Glass @ 2016-08-08 21:44 UTC (permalink / raw)
  To: u-boot

On 7 August 2016 at 05:55, John Keeping <john@metanate.com> wrote:
> The voltage and control registers need to be looked up from the value in
> driver_data.  Adjust the get_value and get_enable functions to match the
> corresponding set_* functions.
>
> Signed-off-by: John Keeping <john@metanate.com>
> ---
>
>  drivers/power/regulator/act8846.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] power: pmic: act8846: add missing newline to debug statements
  2016-08-07 11:55 ` [U-Boot] [PATCH 2/2] power: pmic: act8846: add missing newline to debug statements John Keeping
@ 2016-08-08 21:44   ` Simon Glass
  2016-08-12 17:04     ` Simon Glass
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2016-08-08 21:44 UTC (permalink / raw)
  To: u-boot

On 7 August 2016 at 05:55, John Keeping <john@metanate.com> wrote:
> Signed-off-by: John Keeping <john@metanate.com>
> ---
>
>  drivers/power/pmic/act8846.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] power: regulator: act8846: fix reading values
  2016-08-08 21:44 ` [U-Boot] [PATCH 1/2] power: regulator: act8846: fix reading values Simon Glass
@ 2016-08-12 17:04   ` Simon Glass
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2016-08-12 17:04 UTC (permalink / raw)
  To: u-boot

On 8 August 2016 at 15:44, Simon Glass <sjg@chromium.org> wrote:
> On 7 August 2016 at 05:55, John Keeping <john@metanate.com> wrote:
>> The voltage and control registers need to be looked up from the value in
>> driver_data.  Adjust the get_value and get_enable functions to match the
>> corresponding set_* functions.
>>
>> Signed-off-by: John Keeping <john@metanate.com>
>> ---
>>
>>  drivers/power/regulator/act8846.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm, thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] power: pmic: act8846: add missing newline to debug statements
  2016-08-08 21:44   ` Simon Glass
@ 2016-08-12 17:04     ` Simon Glass
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2016-08-12 17:04 UTC (permalink / raw)
  To: u-boot

On 8 August 2016 at 15:44, Simon Glass <sjg@chromium.org> wrote:
> On 7 August 2016 at 05:55, John Keeping <john@metanate.com> wrote:
>> Signed-off-by: John Keeping <john@metanate.com>
>> ---
>>
>>  drivers/power/pmic/act8846.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm, thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-12 17:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-07 11:55 [U-Boot] [PATCH 1/2] power: regulator: act8846: fix reading values John Keeping
2016-08-07 11:55 ` [U-Boot] [PATCH 2/2] power: pmic: act8846: add missing newline to debug statements John Keeping
2016-08-08 21:44   ` Simon Glass
2016-08-12 17:04     ` Simon Glass
2016-08-08 21:44 ` [U-Boot] [PATCH 1/2] power: regulator: act8846: fix reading values Simon Glass
2016-08-12 17:04   ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.