All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: pcf8563: disable CLKOUT
@ 2015-10-13  5:08 ` Heiko Schocher
  0 siblings, 0 replies; 8+ messages in thread
From: Heiko Schocher @ 2015-10-13  5:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Heiko Schocher, Alexandre Belloni, Georg.Soffel, rtc-linux,
	Alessandro Zummo, devicetree

Disable the CLKOUT of the RTC after power-up.
After power-up/reset of the RTC, CLKOUT is enabled by default,
with CLKOUT enabled the RTC chip has 2-3 times higher power
consumption. If you do not need CLKOUT, you can disable the
CLKOUT with setting "disable-clkout" property.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 Documentation/devicetree/bindings/rtc/pcf8563.txt | 22 ++++++++++++++
 drivers/rtc/rtc-pcf8563.c                         | 37 +++++++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/pcf8563.txt

diff --git a/Documentation/devicetree/bindings/rtc/pcf8563.txt b/Documentation/devicetree/bindings/rtc/pcf8563.txt
new file mode 100644
index 0000000..36f49e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/pcf8563.txt
@@ -0,0 +1,22 @@
+* Philips PCF8563/Epson RTC8564 Real Time Clock
+
+Philips PCF8563/Epson RTC8564 Real Time Clock
+
+Required properties:
+see: Documentation/devicetree/bindings/i2c/trivial-devices.txt
+
+Optional property:
+- disable-clkout:
+  disable the CLKOUT of the RTC after power-up.
+  After power-up/reset of the RTC, CLKOUT is enabled by default,
+  with CLKOUT enabled the RTC chip has 2-3 times higher power
+  consumption. If you not need CLKOUT, you can disable the CLKOUT
+  with setting this property.
+
+Example:
+
+pcf8563@51 {
+	compatible = "nxp,pcf8563";
+	reg = <0x51>;
+	disable-clkout;
+};
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index e569243..fa9a412 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -53,6 +53,7 @@
 
 #define PCF8563_SC_LV		0x80 /* low voltage */
 #define PCF8563_MO_C		0x80 /* century */
+#define PCF8563_CLKOUT		0x80 /* CLKOUT */
 
 static struct i2c_driver pcf8563_driver;
 
@@ -74,6 +75,7 @@ struct pcf8563 {
 	 */
 	int c_polarity;	/* 0: MO_C=1 means 19xx, otherwise MO_C=1 means 20xx */
 	int voltage_low; /* incicates if a low_voltage was detected */
+	int disable_clkout;
 
 	struct i2c_client *client;
 };
@@ -186,6 +188,33 @@ static irqreturn_t pcf8563_irq(int irq, void *dev_id)
 	return IRQ_NONE;
 }
 
+static int pcf8563_disable_clkout(struct i2c_client *client)
+{
+	struct pcf8563 *pcf8563 = i2c_get_clientdata(client);
+	unsigned char buf;
+	int err;
+
+	if (!pcf8563->disable_clkout)
+		return 0;
+
+	err = pcf8563_read_block_data(client, PCF8563_REG_CLKO, 1, &buf);
+	if (err)
+		return err;
+
+	if (buf & PCF8563_CLKOUT) {
+		buf = 0x00;
+		dev_warn(&client->dev, "CLKOUT enabled! Disabling it...\n");
+		err = pcf8563_write_block_data(client, PCF8563_REG_CLKO, 1,
+				       &buf);
+		if (err < 0)
+			dev_err(&client->dev, "could not disable clock\n");
+	} else {
+		dev_info(&client->dev, "CLKOUT disabled.\n");
+	}
+
+	return 0;
+}
+
 /*
  * In the routines that deal directly with the pcf8563 hardware, we use
  * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch.
@@ -235,6 +264,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
 		tm->tm_sec, tm->tm_min, tm->tm_hour,
 		tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
+	pcf8563_disable_clkout(client);
 	return 0;
 }
 
@@ -406,6 +436,9 @@ static int pcf8563_probe(struct i2c_client *client,
 	int err;
 	unsigned char buf;
 	unsigned char alm_pending;
+#ifdef CONFIG_OF
+	int len;
+#endif
 
 	dev_dbg(&client->dev, "%s\n", __func__);
 
@@ -419,6 +452,10 @@ static int pcf8563_probe(struct i2c_client *client,
 
 	dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");
 
+#ifdef CONFIG_OF
+	if (of_find_property(client->dev.of_node, "disable-clkout", &len))
+		pcf8563->disable_clkout = 1;
+#endif
 	i2c_set_clientdata(client, pcf8563);
 	pcf8563->client = client;
 	device_set_wakeup_capable(&client->dev, 1);
-- 
2.1.0


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

* [rtc-linux] [PATCH] rtc: pcf8563: disable CLKOUT
@ 2015-10-13  5:08 ` Heiko Schocher
  0 siblings, 0 replies; 8+ messages in thread
From: Heiko Schocher @ 2015-10-13  5:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Heiko Schocher, Alexandre Belloni, Georg.Soffel, rtc-linux,
	Alessandro Zummo, devicetree

Disable the CLKOUT of the RTC after power-up.
After power-up/reset of the RTC, CLKOUT is enabled by default,
with CLKOUT enabled the RTC chip has 2-3 times higher power
consumption. If you do not need CLKOUT, you can disable the
CLKOUT with setting "disable-clkout" property.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 Documentation/devicetree/bindings/rtc/pcf8563.txt | 22 ++++++++++++++
 drivers/rtc/rtc-pcf8563.c                         | 37 +++++++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/pcf8563.txt

diff --git a/Documentation/devicetree/bindings/rtc/pcf8563.txt b/Documentation/devicetree/bindings/rtc/pcf8563.txt
new file mode 100644
index 0000000..36f49e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/pcf8563.txt
@@ -0,0 +1,22 @@
+* Philips PCF8563/Epson RTC8564 Real Time Clock
+
+Philips PCF8563/Epson RTC8564 Real Time Clock
+
+Required properties:
+see: Documentation/devicetree/bindings/i2c/trivial-devices.txt
+
+Optional property:
+- disable-clkout:
+  disable the CLKOUT of the RTC after power-up.
+  After power-up/reset of the RTC, CLKOUT is enabled by default,
+  with CLKOUT enabled the RTC chip has 2-3 times higher power
+  consumption. If you not need CLKOUT, you can disable the CLKOUT
+  with setting this property.
+
+Example:
+
+pcf8563@51 {
+	compatible = "nxp,pcf8563";
+	reg = <0x51>;
+	disable-clkout;
+};
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index e569243..fa9a412 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -53,6 +53,7 @@
 
 #define PCF8563_SC_LV		0x80 /* low voltage */
 #define PCF8563_MO_C		0x80 /* century */
+#define PCF8563_CLKOUT		0x80 /* CLKOUT */
 
 static struct i2c_driver pcf8563_driver;
 
@@ -74,6 +75,7 @@ struct pcf8563 {
 	 */
 	int c_polarity;	/* 0: MO_C=1 means 19xx, otherwise MO_C=1 means 20xx */
 	int voltage_low; /* incicates if a low_voltage was detected */
+	int disable_clkout;
 
 	struct i2c_client *client;
 };
@@ -186,6 +188,33 @@ static irqreturn_t pcf8563_irq(int irq, void *dev_id)
 	return IRQ_NONE;
 }
 
+static int pcf8563_disable_clkout(struct i2c_client *client)
+{
+	struct pcf8563 *pcf8563 = i2c_get_clientdata(client);
+	unsigned char buf;
+	int err;
+
+	if (!pcf8563->disable_clkout)
+		return 0;
+
+	err = pcf8563_read_block_data(client, PCF8563_REG_CLKO, 1, &buf);
+	if (err)
+		return err;
+
+	if (buf & PCF8563_CLKOUT) {
+		buf = 0x00;
+		dev_warn(&client->dev, "CLKOUT enabled! Disabling it...\n");
+		err = pcf8563_write_block_data(client, PCF8563_REG_CLKO, 1,
+				       &buf);
+		if (err < 0)
+			dev_err(&client->dev, "could not disable clock\n");
+	} else {
+		dev_info(&client->dev, "CLKOUT disabled.\n");
+	}
+
+	return 0;
+}
+
 /*
  * In the routines that deal directly with the pcf8563 hardware, we use
  * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch.
@@ -235,6 +264,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
 		tm->tm_sec, tm->tm_min, tm->tm_hour,
 		tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
+	pcf8563_disable_clkout(client);
 	return 0;
 }
 
@@ -406,6 +436,9 @@ static int pcf8563_probe(struct i2c_client *client,
 	int err;
 	unsigned char buf;
 	unsigned char alm_pending;
+#ifdef CONFIG_OF
+	int len;
+#endif
 
 	dev_dbg(&client->dev, "%s\n", __func__);
 
@@ -419,6 +452,10 @@ static int pcf8563_probe(struct i2c_client *client,
 
 	dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");
 
+#ifdef CONFIG_OF
+	if (of_find_property(client->dev.of_node, "disable-clkout", &len))
+		pcf8563->disable_clkout = 1;
+#endif
 	i2c_set_clientdata(client, pcf8563);
 	pcf8563->client = client;
 	device_set_wakeup_capable(&client->dev, 1);
-- 
2.1.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.

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

* [PATCH] rtc: pcf8563: disable CLKOUT
@ 2015-10-13  5:08 ` Heiko Schocher
  0 siblings, 0 replies; 8+ messages in thread
From: Heiko Schocher @ 2015-10-13  5:08 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Heiko Schocher, Alexandre Belloni,
	Georg.Soffel-k21M0aUVSxZWk0Htik3J/w,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw, Alessandro Zummo,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Disable the CLKOUT of the RTC after power-up.
After power-up/reset of the RTC, CLKOUT is enabled by default,
with CLKOUT enabled the RTC chip has 2-3 times higher power
consumption. If you do not need CLKOUT, you can disable the
CLKOUT with setting "disable-clkout" property.

Signed-off-by: Heiko Schocher <hs-ynQEQJNshbs@public.gmane.org>
---

 Documentation/devicetree/bindings/rtc/pcf8563.txt | 22 ++++++++++++++
 drivers/rtc/rtc-pcf8563.c                         | 37 +++++++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/pcf8563.txt

diff --git a/Documentation/devicetree/bindings/rtc/pcf8563.txt b/Documentation/devicetree/bindings/rtc/pcf8563.txt
new file mode 100644
index 0000000..36f49e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/pcf8563.txt
@@ -0,0 +1,22 @@
+* Philips PCF8563/Epson RTC8564 Real Time Clock
+
+Philips PCF8563/Epson RTC8564 Real Time Clock
+
+Required properties:
+see: Documentation/devicetree/bindings/i2c/trivial-devices.txt
+
+Optional property:
+- disable-clkout:
+  disable the CLKOUT of the RTC after power-up.
+  After power-up/reset of the RTC, CLKOUT is enabled by default,
+  with CLKOUT enabled the RTC chip has 2-3 times higher power
+  consumption. If you not need CLKOUT, you can disable the CLKOUT
+  with setting this property.
+
+Example:
+
+pcf8563@51 {
+	compatible = "nxp,pcf8563";
+	reg = <0x51>;
+	disable-clkout;
+};
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index e569243..fa9a412 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -53,6 +53,7 @@
 
 #define PCF8563_SC_LV		0x80 /* low voltage */
 #define PCF8563_MO_C		0x80 /* century */
+#define PCF8563_CLKOUT		0x80 /* CLKOUT */
 
 static struct i2c_driver pcf8563_driver;
 
@@ -74,6 +75,7 @@ struct pcf8563 {
 	 */
 	int c_polarity;	/* 0: MO_C=1 means 19xx, otherwise MO_C=1 means 20xx */
 	int voltage_low; /* incicates if a low_voltage was detected */
+	int disable_clkout;
 
 	struct i2c_client *client;
 };
@@ -186,6 +188,33 @@ static irqreturn_t pcf8563_irq(int irq, void *dev_id)
 	return IRQ_NONE;
 }
 
+static int pcf8563_disable_clkout(struct i2c_client *client)
+{
+	struct pcf8563 *pcf8563 = i2c_get_clientdata(client);
+	unsigned char buf;
+	int err;
+
+	if (!pcf8563->disable_clkout)
+		return 0;
+
+	err = pcf8563_read_block_data(client, PCF8563_REG_CLKO, 1, &buf);
+	if (err)
+		return err;
+
+	if (buf & PCF8563_CLKOUT) {
+		buf = 0x00;
+		dev_warn(&client->dev, "CLKOUT enabled! Disabling it...\n");
+		err = pcf8563_write_block_data(client, PCF8563_REG_CLKO, 1,
+				       &buf);
+		if (err < 0)
+			dev_err(&client->dev, "could not disable clock\n");
+	} else {
+		dev_info(&client->dev, "CLKOUT disabled.\n");
+	}
+
+	return 0;
+}
+
 /*
  * In the routines that deal directly with the pcf8563 hardware, we use
  * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch.
@@ -235,6 +264,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
 		tm->tm_sec, tm->tm_min, tm->tm_hour,
 		tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
+	pcf8563_disable_clkout(client);
 	return 0;
 }
 
@@ -406,6 +436,9 @@ static int pcf8563_probe(struct i2c_client *client,
 	int err;
 	unsigned char buf;
 	unsigned char alm_pending;
+#ifdef CONFIG_OF
+	int len;
+#endif
 
 	dev_dbg(&client->dev, "%s\n", __func__);
 
@@ -419,6 +452,10 @@ static int pcf8563_probe(struct i2c_client *client,
 
 	dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");
 
+#ifdef CONFIG_OF
+	if (of_find_property(client->dev.of_node, "disable-clkout", &len))
+		pcf8563->disable_clkout = 1;
+#endif
 	i2c_set_clientdata(client, pcf8563);
 	pcf8563->client = client;
 	device_set_wakeup_capable(&client->dev, 1);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] rtc: pcf8563: disable CLKOUT
  2015-10-13  5:08 ` [rtc-linux] " Heiko Schocher
@ 2015-10-13 20:17   ` Alexandre Belloni
  -1 siblings, 0 replies; 8+ messages in thread
From: Alexandre Belloni @ 2015-10-13 20:17 UTC (permalink / raw)
  To: Heiko Schocher
  Cc: linux-kernel, Georg.Soffel, rtc-linux, Alessandro Zummo, devicetree

Hi,

On 13/10/2015 at 07:08:58 +0200, Heiko Schocher wrote :
> Disable the CLKOUT of the RTC after power-up.
> After power-up/reset of the RTC, CLKOUT is enabled by default,
> with CLKOUT enabled the RTC chip has 2-3 times higher power
> consumption. If you do not need CLKOUT, you can disable the
> CLKOUT with setting "disable-clkout" property.
> 

I think you can simply unconditionally disable clkout. My preferred way
of doing what you suggest is probably to register a clock in the CCF. If
the clock is not used, it will be automatically disabled.
It will also provide a generic way of setting the clkout frequency (some
RTC are able to output 32kHZ, 1kHz and 1Hz).

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

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

* [rtc-linux] Re: [PATCH] rtc: pcf8563: disable CLKOUT
@ 2015-10-13 20:17   ` Alexandre Belloni
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandre Belloni @ 2015-10-13 20:17 UTC (permalink / raw)
  To: Heiko Schocher
  Cc: linux-kernel, Georg.Soffel, rtc-linux, Alessandro Zummo, devicetree

Hi,

On 13/10/2015 at 07:08:58 +0200, Heiko Schocher wrote :
> Disable the CLKOUT of the RTC after power-up.
> After power-up/reset of the RTC, CLKOUT is enabled by default,
> with CLKOUT enabled the RTC chip has 2-3 times higher power
> consumption. If you do not need CLKOUT, you can disable the
> CLKOUT with setting "disable-clkout" property.
> 

I think you can simply unconditionally disable clkout. My preferred way
of doing what you suggest is probably to register a clock in the CCF. If
the clock is not used, it will be automatically disabled.
It will also provide a generic way of setting the clkout frequency (some
RTC are able to output 32kHZ, 1kHz and 1Hz).

-- 
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] 8+ messages in thread

* Re: [PATCH] rtc: pcf8563: disable CLKOUT
  2015-10-13 20:17   ` [rtc-linux] " Alexandre Belloni
  (?)
@ 2015-10-14  4:19     ` Heiko Schocher
  -1 siblings, 0 replies; 8+ messages in thread
From: Heiko Schocher @ 2015-10-14  4:19 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: linux-kernel, Georg.Soffel, rtc-linux, Alessandro Zummo, devicetree

Hello Alexandre,

Am 13.10.2015 um 22:17 schrieb Alexandre Belloni:
> Hi,
>
> On 13/10/2015 at 07:08:58 +0200, Heiko Schocher wrote :
>> Disable the CLKOUT of the RTC after power-up.
>> After power-up/reset of the RTC, CLKOUT is enabled by default,
>> with CLKOUT enabled the RTC chip has 2-3 times higher power
>> consumption. If you do not need CLKOUT, you can disable the
>> CLKOUT with setting "disable-clkout" property.
>>
>
> I think you can simply unconditionally disable clkout. My preferred way
> of doing what you suggest is probably to register a clock in the CCF. If
> the clock is not used, it will be automatically disabled.
> It will also provide a generic way of setting the clkout frequency (some
> RTC are able to output 32kHZ, 1kHz and 1Hz).

Does disabling it ot break some boards?

I take a look into CCF, good idea.

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [rtc-linux] Re: [PATCH] rtc: pcf8563: disable CLKOUT
@ 2015-10-14  4:19     ` Heiko Schocher
  0 siblings, 0 replies; 8+ messages in thread
From: Heiko Schocher @ 2015-10-14  4:19 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: linux-kernel, Georg.Soffel, rtc-linux, Alessandro Zummo, devicetree

Hello Alexandre,

Am 13.10.2015 um 22:17 schrieb Alexandre Belloni:
> Hi,
>
> On 13/10/2015 at 07:08:58 +0200, Heiko Schocher wrote :
>> Disable the CLKOUT of the RTC after power-up.
>> After power-up/reset of the RTC, CLKOUT is enabled by default,
>> with CLKOUT enabled the RTC chip has 2-3 times higher power
>> consumption. If you do not need CLKOUT, you can disable the
>> CLKOUT with setting "disable-clkout" property.
>>
>
> I think you can simply unconditionally disable clkout. My preferred way
> of doing what you suggest is probably to register a clock in the CCF. If
> the clock is not used, it will be automatically disabled.
> It will also provide a generic way of setting the clkout frequency (some
> RTC are able to output 32kHZ, 1kHz and 1Hz).

Does disabling it ot break some boards?

I take a look into CCF, good idea.

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

-- 
-- 
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] 8+ messages in thread

* Re: [PATCH] rtc: pcf8563: disable CLKOUT
@ 2015-10-14  4:19     ` Heiko Schocher
  0 siblings, 0 replies; 8+ messages in thread
From: Heiko Schocher @ 2015-10-14  4:19 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Georg.Soffel-k21M0aUVSxZWk0Htik3J/w,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw, Alessandro Zummo,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hello Alexandre,

Am 13.10.2015 um 22:17 schrieb Alexandre Belloni:
> Hi,
>
> On 13/10/2015 at 07:08:58 +0200, Heiko Schocher wrote :
>> Disable the CLKOUT of the RTC after power-up.
>> After power-up/reset of the RTC, CLKOUT is enabled by default,
>> with CLKOUT enabled the RTC chip has 2-3 times higher power
>> consumption. If you do not need CLKOUT, you can disable the
>> CLKOUT with setting "disable-clkout" property.
>>
>
> I think you can simply unconditionally disable clkout. My preferred way
> of doing what you suggest is probably to register a clock in the CCF. If
> the clock is not used, it will be automatically disabled.
> It will also provide a generic way of setting the clkout frequency (some
> RTC are able to output 32kHZ, 1kHz and 1Hz).

Does disabling it ot break some boards?

I take a look into CCF, good idea.

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-10-14  4:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13  5:08 [PATCH] rtc: pcf8563: disable CLKOUT Heiko Schocher
2015-10-13  5:08 ` Heiko Schocher
2015-10-13  5:08 ` [rtc-linux] " Heiko Schocher
2015-10-13 20:17 ` Alexandre Belloni
2015-10-13 20:17   ` [rtc-linux] " Alexandre Belloni
2015-10-14  4:19   ` Heiko Schocher
2015-10-14  4:19     ` Heiko Schocher
2015-10-14  4:19     ` [rtc-linux] " Heiko Schocher

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.