]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00276567-6 mfd: si476x: Use default configuration when no platform data
authorNicolin Chen <b42378@freescale.com>
Thu, 29 Aug 2013 06:35:44 +0000 (14:35 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 16 Jun 2014 15:43:16 +0000 (17:43 +0200)
This would allow the driver to work normally without specific platform data,
when using devicetree for example.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
drivers/mfd/si476x-i2c.c

index 3eb66d40bf17e0882e5a4c3e5ca42255cc0c9687..d32e25c2128d8a38f080b17f264951e6d8107afc 100644 (file)
@@ -740,8 +740,15 @@ static int si476x_core_probe(struct i2c_client *client,
                memcpy(&core->pinmux, &pdata->pinmux,
                       sizeof(struct si476x_pinmux));
        } else {
-               dev_err(&client->dev, "No platform data provided\n");
-               return -EINVAL;
+               dev_warn(&client->dev, "Using default platform data.\n");
+               core->power_up_parameters.xcload = 0x28;
+               core->power_up_parameters.func = SI476X_FUNC_FM_RECEIVER;
+               core->power_up_parameters.freq = SI476X_FREQ_37P209375_MHZ;
+               core->diversity_mode = SI476X_PHDIV_DISABLED;
+               core->pinmux.dclk = SI476X_DCLK_DAUDIO;
+               core->pinmux.dfs  = SI476X_DFS_DAUDIO;
+               core->pinmux.dout = SI476X_DOUT_I2S_OUTPUT;
+               core->pinmux.xout = SI476X_XOUT_TRISTATE;
        }
 
        core->supplies[0].supply = "vd";