lkml.org 
[lkml]   [2015]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] Add xtal load setting device tree parameter
From
Add device tree parameter to enable the setting of the capacitor load
parameter, defaults
to 12 pF this parameter allows the setting of 7pF

Signed-off-by Gordon Hollingworth <gordon@fiveninjas.com>
---

drivers/rtc/rtc-pcf8523.c | 8 +++++++-

1 files changed, 7 insertions(+), 1 deletion(-)


diff --git a/drivers/rtc/rtc-pcf8523.c b/drivers/rtc/rtc-pcf8523.c

index 4cdb64b..3045f46 100644

--- a/drivers/rtc/rtc-pcf8523.c

+++ b/drivers/rtc/rtc-pcf8523.c

@@ -299,7 +299,13 @@ static int pcf8523_probe(struct i2c_client *client,

if (!pcf)

return -ENOMEM;


- err = pcf8523_select_capacitance(client, true);
+ if (of_property_read_bool(client->dev.of_node, "nxp,xtalcap-7pf")) {
+ pr_info( "PCF8523 - set 7pF crystal load");

+ err = pcf8523_select_capacitance(client, false);

+ } else {
+ pr_info( "PCF8523 - set 12pF crystal load");

+ err = pcf8523_select_capacitance(client, true);

+ }
if (err < 0)
return err;


--


\
 
 \ /
  Last update: 2015-07-04 08:41    [W:0.121 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site