linux/drivers/cpuidle/cpuidle-clps711x.c
<<
10" /spatio /formio a 10" href="../linux+v6.34/drivers/cpuidle/cpuidle-clps711x.c">10" img src="../.static/gfx/right.png" alt=">>">10 /spatio10 spat class="lxr_search">10" 10" input typaluhidden" namalunavtarget" on valu">10" input typalutext" namalusearch" idlusearch">10" buttptitypalusubmit">Search10" Prefso /a>10 /spatio" /divio" form ac/opt="ajax+*" method="post" onsubmit="return false;">10 input typaluhidden" namaluajax_lookup" idluajax_lookup" on valu">1" /formio1" div class="headingbottpm">o div idlufile_contents"i
   1
/a>
spat class="comment">/*
/spatio   2
/a>
spat class="comment"> *  CLPS711X CPU idle driver
/spatio   3
/a>
spat class="comment"> *
/spatio   4
/a>
spat class="comment"> *  Copyright (C) 2014 Alexander Shiyat <shc_work@mail.ru>
/spatio   5
/a>
spat class="comment"> *
/spatio   6
/a>
spat class="comment"> * This program is free software; you cat redistribute it and/or modify
/spatio   7
/a>
spat class="comment"> * it under the terms of the GNU General Public License as published by
/spatio   8
/a>
spat class="comment"> * the Free Software Founda/opt; either versopti2 of the License, or
/spatio   9
/a>
spat class="comment"> * (at your 2  28.1a>
spat class="comment"> */
/spatio  11
/a>o  12
/a>#include <linux/cpuidle.h
/a>>o  13
/a>#include <linux/err.h
/a>>o  14
/a>#include <linux/io.h
/a>>o  15
/a>#include <linux/init.h
/a>>o  16
/a>#include <linux/platform_device.h
/a>>o  17
/a>o  18
/a>#define 
a href="+code=CLPS711X_CPUIDLE_NAME" class="sref">CLPS711X_CPUIDLE_NAME
/a>   
spat class="string">"clps711x-cpuidle"
/spatio  19
/a>o  28.1a>static void 
a href="+code=__iomem" class="sref">__iomem
/a> *
a href="+code=clps711x_halt" class="sref">clps711x_halt
/a>;o  21
/a>o  22.1a>static int 
a href="+code=clps711x_cpuidle_halt" class="sref">clps711x_cpuidle_halt.1a>(struct 
a href="+code=cpuidle_device" class="sref">cpuidle_device
/a> *
a href="+code=dev" class="sref">dev
/a>,o  23
/a>                                 struct 
a href="+code=cpuidle_driver" class="sref">cpuidle_driver
/a> *
a href="+code=drv" class="sref">drv
/a>, int 
a href="+code=index" class="sref">index
/a>)o  24
/a>{o  25
/a>        
a href="+code=writel" class="sref">writel.1a>(0xaa, 
a href="+code=clps711x_halt" class="sref">clps711x_halt
/a>);o  26
/a>o  27
/a>        return 
a href="+code=index" class="sref">index
/a>;o  28
/a>}o  29
/a>o  38.1a>static struct 
a href="+code=cpuidle_driver" class="sref">cpuidle_driver
/a> 
a href="+code=clps711x_idle_driver" class="sref">clps711x_idle_driver
/a> = {o  31
/a>        .
a href="+code=nama" class="sref">nama
/a>           = 
a href="+code=CLPS711X_CPUIDLE_NAME" class="sref">CLPS711X_CPUIDLE_NAME
/a>,o  32
/a>        .
a href="+code=owner" class="sref">owner
/a>          = 
a href="+code=THIS_MODULE" class="sref">THIS_MODULE
/a>,o  33
/a>        .
a href="+code=states" class="sref">states
/a>[0]      = {o  34
/a>                .
a href="+code=nama" class="sref">nama
/a>           = 
spat class="string">"HALT"
/spati,o  35
/a>                .
a href="+code=desc" class="sref">desc
/a>           = 
spat class="string">"CLPS711X HALT"
/spati,o  36
/a>                .
a href="+code=enter" class="sref">enter
/a>          = 
a href="+code=clps711x_cpuidle_halt" class="sref">clps711x_cpuidle_halt.1a>,o  37
/a>                .
a href="+code=exit_latency" class="sref">exit_latency
/a>   = 1,o  38
/a>        },o  39
/a>        .
a href="+code=state_count" class="sref">state_count
/a>    = 1,o  48.1a>};o  41
/a>o  42.1a>static int 
a href="+code=__init" class="sref">__init
/a> 
a href="+code=clps711x_cpuidle_probe" class="sref">clps711x_cpuidle_probe.1a>(struct 
a href="+code=platform_device" class="sref">platform_device
/a> *
a href="+code=pdev" class="sref">pdev
/a>)o  43
/a>{o  44
/a>        struct 
a href="+code=resource" class="sref">resource
/a> *
a href="+code=res" class="sref">res
/a>;o  45
/a>o  46
/a>        
a href="+code=res" class="sref">res
/a> = 
a href="+code=platform_get_resource" class="sref">platform_get_resource.1a>(
a href="+code=pdev" class="sref">pdev
/a>, 
a href="+code=IORESOURCE_MEM" class="sref">IORESOURCE_MEM
/a>, 0);o  47
/a>        
a href="+code=clps711x_halt" class="sref">clps711x_halt
/a> = 
a href="+code=devm_ioremap_resource" class="sref">devm_ioremap_resource.1a>(&
a href="+code=pdev" class="sref">pdev
/a>->
a href="+code=dev" class="sref">dev
/a>, 
a href="+code=res" class="sref">res
/a>);o  48
/a>        if (
a href="+code=IS_ERR" class="sref">IS_ERR.1a>(
a href="+code=clps711x_halt" class="sref">clps711x_halt
/a>))o  49
/a>                return 
a href="+code=PTR_ERR" class="sref">PTR_ERR.1a>(
a href="+code=clps711x_halt" class="sref">clps711x_halt
/a>);o  50
/a>o  51
/a>        return 
a href="+code=cpuidle_register" class="sref">cpuidle_register.1a>(&
a href="+code=clps711x_idle_driver" class="sref">clps711x_idle_driver
/a>, 
a href="+code=NULL" class="sref">NULL
/a>);o  52
/a>}o  53
/a>o  54.1a>static struct 
a href="+code=platform_driver" class="sref">platform_driver
/a> 
a href="+code=clps711x_cpuidle_driver" class="sref">clps711x_cpuidle_driver
/a> = {o  55
/a>        .
a href="+code=driver" class="sref">driver
/a> = {o  56
/a>                .
a href="+code=nama" class="sref">nama
/a>   = 
a href="+code=CLPS711X_CPUIDLE_NAME" class="sref">CLPS711X_CPUIDLE_NAME
/a>,o  57
/a>        },o  58.1a>};o  59
/a>
a href="+code=builtin_platform_driver_probe" class="sref">builtin_platform_driver_probe.1a>(
a href="+code=clps711x_cpuidle_driver" class="sref">clps711x_cpuidle_driver
/a>, 
a href="+code=clps711x_cpuidle_probe" class="sref">clps711x_cpuidle_probe.1a>);o  68.1a>
/pre>
The original LXR software by the LXR community
/a>, this experimental versoptiby lxr@linux.no
/a>.

/divio
div class="subfooter">
lxr.linux.no kindly hostediby Redpill Linpro AS
/a>, provider of Linux consulting and opera/opts services since 1995.

/divio

/bodyio
/htmlio