Messages in this thread Patch in this message | | | Date | Sat, 4 Jul 2015 07:28:02 +0100 | Subject | [PATCH] Add xtal load setting device tree parameter | From | Gordon Hollingworth <> |
| |
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;
--
| |