[PATCH] Add xtal load setting device tree parameter

From: Gordon Hollingworth
Date: Sat Jul 04 2015 - 02:29:34 EST


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@xxxxxxxxxxxxxx>
---

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;


--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/