All of lore.kernel.org
 help / color / mirror / Atom feed
* [rtc-linux] [PATCH] Fixed ds1390_get_reg returned value
@ 2015-09-16 15:51 Ivan Grimaldi
  2015-09-16 18:10   ` Alexandre Belloni
  0 siblings, 1 reply; 5+ messages in thread
From: Ivan Grimaldi @ 2015-09-16 15:51 UTC (permalink / raw)
  To: Alessandro Zummo, Mark Jackson; +Cc: rtc-linux, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

spi_write_then_read puts in rx_buf the received data starting from the
first byte of the rx_buf for n_rx bytes.

Signed-off-by: Ivan Grimaldi <grimaldi.ivan@gmail.com>
---
diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index e67bfcb..a4303b4 100644
--- a/drivers/rtc/rtc-ds1390.c
+++ b/drivers/rtc/rtc-ds1390.c
@@ -62,7 +62,7 @@ static int ds1390_get_reg(struct device *dev, unsigned
char address,
        if (status != 0)
                return status;

-       *data = chip->txrx_buf[1];
+       *data = chip->txrx_buf[0];

        return 0;
 }

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 1607 bytes --]

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

* Re: [rtc-linux] [PATCH] Fixed ds1390_get_reg returned value
  2015-09-16 15:51 [rtc-linux] " Ivan Grimaldi
@ 2015-09-16 18:10   ` Alexandre Belloni
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2015-09-16 18:10 UTC (permalink / raw)
  To: Ivan Grimaldi; +Cc: Alessandro Zummo, Mark Jackson, rtc-linux, linux-kernel

Hi,

Your patch is not properly fomatted, it as probably been mangled by your
mailer can you resend it properly?

Thanks,

On 16/09/2015 at 17:51:17 +0200, Ivan Grimaldi wrote :
> spi_write_then_read puts in rx_buf the received data starting from the
> first byte of the rx_buf for n_rx bytes.
> 
> Signed-off-by: Ivan Grimaldi <grimaldi.ivan@gmail.com>
> ---
> diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
> index e67bfcb..a4303b4 100644
> --- a/drivers/rtc/rtc-ds1390.c
> +++ b/drivers/rtc/rtc-ds1390.c
> @@ -62,7 +62,7 @@ static int ds1390_get_reg(struct device *dev, unsigned
> char address,
>         if (status != 0)
>                 return status;
> 
> -       *data = chip->txrx_buf[1];
> +       *data = chip->txrx_buf[0];
> 
>         return 0;
>  }
> 
> -- 
> -- 
> You received this message because you are subscribed to "rtc-linux".
> Membership options at http://groups.google.com/group/rtc-linux .
> Please read http://groups.google.com/group/rtc-linux/web/checklist
> before submitting a driver.
> --- 
> You received this message because you are subscribed to the Google Groups "rtc-linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

* Re: [rtc-linux] [PATCH] Fixed ds1390_get_reg returned value
@ 2015-09-16 18:10   ` Alexandre Belloni
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2015-09-16 18:10 UTC (permalink / raw)
  To: Ivan Grimaldi; +Cc: Alessandro Zummo, Mark Jackson, rtc-linux, linux-kernel

Hi,

Your patch is not properly fomatted, it as probably been mangled by your
mailer can you resend it properly?

Thanks,

On 16/09/2015 at 17:51:17 +0200, Ivan Grimaldi wrote :
> spi_write_then_read puts in rx_buf the received data starting from the
> first byte of the rx_buf for n_rx bytes.
> 
> Signed-off-by: Ivan Grimaldi <grimaldi.ivan@gmail.com>
> ---
> diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
> index e67bfcb..a4303b4 100644
> --- a/drivers/rtc/rtc-ds1390.c
> +++ b/drivers/rtc/rtc-ds1390.c
> @@ -62,7 +62,7 @@ static int ds1390_get_reg(struct device *dev, unsigned
> char address,
>         if (status != 0)
>                 return status;
> 
> -       *data = chip->txrx_buf[1];
> +       *data = chip->txrx_buf[0];
> 
>         return 0;
>  }
> 
> -- 
> -- 
> You received this message because you are subscribed to "rtc-linux".
> Membership options at http://groups.google.com/group/rtc-linux .
> Please read http://groups.google.com/group/rtc-linux/web/checklist
> before submitting a driver.
> --- 
> You received this message because you are subscribed to the Google Groups "rtc-linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [rtc-linux] [PATCH] Fixed ds1390_get_reg returned value
@ 2015-09-17 21:34 ` Ivan Grimaldi
  0 siblings, 0 replies; 5+ messages in thread
From: Ivan Grimaldi @ 2015-09-17 21:34 UTC (permalink / raw)
  To: a.zummo, mpfj; +Cc: rtc-linux, linux-kernel

spi_write_then_read puts in rx_buf the received data starting from
the first byte of the rx_buf

Signed-off-by: Ivan Grimaldi <grimaldi.ivan@gmail.com>
---
 drivers/rtc/rtc-ds1390.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index e67bfcb..a4303b4 100644
--- a/drivers/rtc/rtc-ds1390.c
+++ b/drivers/rtc/rtc-ds1390.c
@@ -62,7 +62,7 @@ static int ds1390_get_reg(struct device *dev, unsigned char address,
 	if (status != 0)
 		return status;
 
-	*data = chip->txrx_buf[1];
+	*data = chip->txrx_buf[0];
 
 	return 0;
 }
-- 
2.5.2

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

* [PATCH] Fixed ds1390_get_reg returned value
@ 2015-09-17 21:34 ` Ivan Grimaldi
  0 siblings, 0 replies; 5+ messages in thread
From: Ivan Grimaldi @ 2015-09-17 21:34 UTC (permalink / raw)
  To: a.zummo, mpfj; +Cc: rtc-linux, linux-kernel

spi_write_then_read puts in rx_buf the received data starting from
the first byte of the rx_buf

Signed-off-by: Ivan Grimaldi <grimaldi.ivan@gmail.com>
---
 drivers/rtc/rtc-ds1390.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index e67bfcb..a4303b4 100644
--- a/drivers/rtc/rtc-ds1390.c
+++ b/drivers/rtc/rtc-ds1390.c
@@ -62,7 +62,7 @@ static int ds1390_get_reg(struct device *dev, unsigned char address,
 	if (status != 0)
 		return status;
 
-	*data = chip->txrx_buf[1];
+	*data = chip->txrx_buf[0];
 
 	return 0;
 }
-- 
2.5.2


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

end of thread, other threads:[~2015-09-17 21:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17 21:34 [rtc-linux] [PATCH] Fixed ds1390_get_reg returned value Ivan Grimaldi
2015-09-17 21:34 ` Ivan Grimaldi
  -- strict thread matches above, loose matches on Subject: below --
2015-09-16 15:51 [rtc-linux] " Ivan Grimaldi
2015-09-16 18:10 ` Alexandre Belloni
2015-09-16 18:10   ` Alexandre Belloni

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.