Version:  2.0.40 2.2.26 2.4.37 3.10 3.11 3.12 3.13 3.14 3.15 3.16 3.17 3.18 3.19 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7

Linux/drivers/clk/x86/clk-lpt.c

  1 /*
  2  * Intel Low Power Subsystem clocks.
  3  *
  4  * Copyright (C) 2013, Intel Corporation
  5  * Authors: Mika Westerberg <mika.westerberg@linux.intel.com>
  6  *          Heikki Krogerus <heikki.krogerus@linux.intel.com>
  7  *
  8  * This program is free software; you can redistribute it and/or modify
  9  * it under the terms of the GNU General Public License version 2 as
 10  * published by the Free Software Foundation.
 11  */
 12 
 13 #include <linux/clk-provider.h>
 14 #include <linux/err.h>
 15 #include <linux/module.h>
 16 #include <linux/platform_data/clk-lpss.h>
 17 #include <linux/platform_device.h>
 18 
 19 static int lpt_clk_probe(struct platform_device *pdev)
 20 {
 21         struct lpss_clk_data *drvdata;
 22         struct clk *clk;
 23 
 24         drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
 25         if (!drvdata)
 26                 return -ENOMEM;
 27 
 28         /* LPSS free running clock */
 29         drvdata->name = "lpss_clk";
 30         clk = clk_register_fixed_rate(&pdev->dev, drvdata->name, NULL,
 31                                       0, 100000000);
 32         if (IS_ERR(clk))
 33                 return PTR_ERR(clk);
 34 
 35         drvdata->clk = clk;
 36         platform_set_drvdata(pdev, drvdata);
 37         return 0;
 38 }
 39 
 40 static struct platform_driver lpt_clk_driver = {
 41         .driver = {
 42                 .name = "clk-lpt",
 43         },
 44         .probe = lpt_clk_probe,
 45 };
 46 
 47 int __init lpt_clk_init(void)
 48 {
 49         return platform_driver_register(&lpt_clk_driver);
 50 }
 51 

This page was automatically generated by LXR 0.3.1 (source).  •  Linux is a registered trademark of Linus Torvalds  •  Contact us