Skip to contentSkip to conversation

Fixed ds1390_get_reg returned value

PATCH Superseded Ivan Grimaldi 1 participant 2 messages Sep 18, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 Fixed ds1390_get_reg returned value

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

---
 drivers/rtc/rtc-ds1390.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-ds1390.c +1 -1
index e67bfcb..a4303b4 100644
@@ -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;
 }
Signature · 12 lines
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 [email protected].
For more options, visit https://groups.google.com/d/optout.
#1 lore raw

PATCH v3 2/2 Added trickle charger device tree binding

Introduce a device tree binding for specifying the trickle charger configuration for ds1339.

---
 .../devicetree/bindings/rtc/dallas,ds1390.txt      | 18 +++++++
 drivers/rtc/rtc-ds1390.c                           | 62 ++++++++++++++++++++++
 2 files changed, 80 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/dallas,ds1390.txt
Documentation/devicetree/bindings/rtc/dallas,ds1390.txt new file +18 -0
new file mode 100644
index 0000000..8e76f26
@@ -0,0 +1,18 @@
+* Dallas DS1390		SPI Serial Real-Time Clock
+
+Required properties:
+- compatible: Should contain "dallas,ds1390".
+- reg: SPI address for chip
+
+Optional properties:
+- trickle-resistor-ohms : Selected resistor for trickle charger
+	Values usable for ds1390 are 250, 2000, 4000
+	Should be given if trickle charger should be enabled
+- trickle-diode-disable : Do not use internal trickle charger diode
+	Should be given if internal trickle charger diode should be disabled
+Example:
+	ds1390: rtc@68 {
+		compatible = "dallas,ds1390";
+		trickle-resistor-ohms = <250>;
+		reg = <0>;
+	};
drivers/rtc/rtc-ds1390.c +62 -0

91 lines not on this page · raw message

Signature · 12 lines
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 [email protected].
For more options, visit https://groups.google.com/d/optout.