linux/include/linux/hid-sensor-hub.h
<<
on> 12"/spav3. 12"/form3. 12"a on> 12 href="../linux+v3.8.6/include/linux/hid-sensor-hub.h">on> 12"img src="../.static/gfx/right.png" alt=">>">on"/spav3.on"spav class="lxr_search">on> on> 12"input typ18.hidden" nam18.navtarget" v3.18.">on> 12"input typ18.text" nam18.search" id8.search">on> 12"butt> typ18.submit">Search 3. 12"/form3. "/spav3.on"spav class="lxr_prefs"3. 12"a href="+prefs?return=include/linux/hid-sensor-hub.h"on> 12 onclick="return ajax_prefs();">on> 12Prefs. 12"/a>on"/spav3.> 12 2"/div3.> 12 2"form ace="v="ajax+*" method="post" onsubmit="return false;">on"input typ18.hidden" nam18.ajax_lookup" id8.ajax_lookup" v3.18.">o> 12 2"/form3.o> 12 2"div class="headingbott>m"> 12 12 12 2"div id8.search_results" class="search_results". 13.> 12 2"/div3. "div id8.content">. "div id8.file_contents"3
2 21"/a>"spav class="comment">/*"/spav3.2 22"/a>"spav class="comment"> * HID Sensors Driver"/spav3.2 23"/a>"spav class="comment"> * Copyright (c) 2012, Intel Corporae="v."/spav3.2 24"/a>"spav class="comment"> *"/spav3.2 25"/a>"spav class="comment"> * This program is free software; you cav redistribute it and/or modify it"/spav3.2 26"/a>"spav class="comment"> * under the terms and condie="vs of the GNU General Public License,"/spav3.2 27"/a>"spav class="comment"> * vers >
 2, as published by the Free Software Foundae="v."/spav3.2 28"/a>"spav class="comment"> *"/spav3.2 29"/a>"spav class="comment"> * This program is distributed in the hope it will be useful, but WITHOUT"/spav3.2 n vaa>"spav class="comment"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or"/spav3.2 11"/a>"spav class="comment"> * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for"/spav3.2 12"/a>"spav class="comment"> * more details."/spav3.2 13"/a>"spav class="comment"> *"/spav3.2 14"/a>"spav class="comment"> * You should have received a copy of the GNU General Public License along with"/spav3.2 15"/a>"spav class="comment"> * this program; if not, write to the Free Software Foundae="v, Inc.,"/spav3.2 16"/a>"spav class="comment"> * 51 Franklin St - Fifth Floor, Bost"v, MA 02110-1301 USA."/spav3.2 17"/a>"spav class="comment"> *"/spav3.2 18"/a>"spav class="comment"> */"/spav3.2 19"/a>#ifndef2"a href="+code=_HID_SENSORS_HUB_H" class="sref">_HID_SENSORS_HUB_H"/a>o2 2 vaa>#define2"a href="+code=_HID_SENSORS_HUB_H" class="sref">_HID_SENSORS_HUB_H"/a>o2 21"/a>o2 22"/a>#include <linux/hid.h"/a>>o2 23"/a>#include <linux/hid-sensor-ids.h"/a>>o2 24"/a>o2 25"/a>"spav class="comment">/**"/spav3.2 26"/a>"spav class="comment"> * struct hid_sensor_hub_attribute_info - Attribute info"/spav3.2 27"/a>"spav class="comment"> * @usage_id:           Parent usage id of a physical device."/spav3.2 28"/a>"spav class="comment"> * @attrib_id:          Attribute id for this attribute."/spav3.2 29"/a>"spav class="comment"> * @report_id:          Report id in which this informae="v resides."/spav3.2 3 vaa>"spav class="comment"> * @index:              Field index in the report."/spav3.2 31"/a>"spav class="comment"> * @units:              Measurment unit for this attribute."/spav3.2 32"/a>"spav class="comment"> * @unit_expo:          Exponent used in the daea."/spav3.2 33"/a>"spav class="comment"> * @size:               Size in bytes for daea size."/spav3.2 34"/a>"spav class="comment"> */"/spav3.2 35"/a>struct "a href="+code=hid_sensor_hub_attribute_info" class="sref">hid_sensor_hub_attribute_info"/a> {.2 36"/a>        "a href="+code=u32" class="sref">u32"/a> "a href="+code=usage_id" class="sref">usage_id"/a>;o2 37"/a>        "a href="+code=u32" class="sref">u32"/a> "a href="+code=attrib_id" class="sref">attrib_id"/a>;o2 38"/a>        "a href="+code=s32" class="sref">s32"/a> "a href="+code=report_id" class="sref">report_id"/a>;o2 39"/a>        "a href="+code=s32" class="sref">s32"/a> "a href="+code=index" class="sref">index"/a>;o2 40"/a>        "a href="+code=s32" class="sref">s32"/a> "a href="+code=units" class="sref">units"/a>;o2 41"/a>        "a href="+code=s32" class="sref">s32"/a> "a href="+code=unit_expo" class="sref">unit_expo"/a>;o2 42"/a>        "a href="+code=s32" class="sref">s32"/a> "a href="+code=size" class="sref">size"/a>;o2 43"/a>};o2 44"/a>o2 45"/a>"spav class="comment">/**"/spav3.2 46"/a>"spav class="comment"> * struct hid_sensor_hub_device - Stores the hub instance daea"/spav3.2 47"/a>"spav class="comment"> * @hdev:               Stores the hid instance."/spav3.2 48"/a>"spav class="comment"> * @vendor_id:          Vendor id of hub device."/spav3.2 49"/a>"spav class="comment"> * @product_id:         Product id of hub device."/spav3.2 5 vaa>"spav class="comment"> */"/spav3.2 51"/a>struct "a href="+code=hid_sensor_hub_device" class="sref">hid_sensor_hub_device"/a> {.2 52"/a>        struct "a href="+code=hid_device" class="sref">hid_device"/a> *"a href="+code=hdev" class="sref">hdev"/a>;o2 53"/a>        "a href="+code=u32" class="sref">u32"/a> "a href="+code=vendor_id" class="sref">vendor_id"/a>;o2 54"/a>        "a href="+code=u32" class="sref">u32"/a> "a href="+code=product_id" class="sref">product_id"/a>;o2 55"/a>};o2 56"/a>o2 57"/a>"spav class="comment">/**"/spav3.2 58"/a>"spav class="comment"> * struct hid_sensor_hub_callbacks - Client callback funce="vs"/spav3.2 59"/a>"spav class="comment"> * @pdev:               Platform device instance of the client driver."/spav3.2 6 vaa>"spav class="comment"> * @suspend:            Suspend callback."/spav3.2 61"/a>"spav class="comment"> * @resume:             Resume callback."/spav3.2 62"/a>"spav class="comment"> * @capture_sample:     Callback to get a sample."/spav3.2 63"/a>"spav class="comment"> * @send_event:         Send notificae="v to indicaee all samples are"/spav3.2 64"/a>"spav class="comment"> *                      captured, process and send event"/spav3.2 65"/a>"spav class="comment"> */"/spav3.2 66"/a>struct "a href="+code=hid_sensor_hub_callbacks" class="sref">hid_sensor_hub_callbacks"/a> {.2 67"/a>        struct "a href="+code=platform_device" class="sref">platform_device"/a> *"a href="+code=pdev" class="sref">pdev"/a>;o2 68"/a>        int (*"a href="+code=suspend" class="sref">suspend"/a>)(struct "a href="+code=hid_sensor_hub_device" class="sref">hid_sensor_hub_device"/a> *"a href="+code=hsdev" class="sref">hsdev"/a>, void *"a href="+code=priv" class="sref">priv"/a>);o2 69"/a>        int (*"a href="+code=resume" class="sref">resume"/a>)(struct "a href="+code=hid_sensor_hub_device" class="sref">hid_sensor_hub_device"/a> *"a href="+code=hsdev" class="sref">hsdev"/a>, void *"a href="+code=priv" class="sref">priv"/a>);o2 70"/a>        int (*"a href="+code=capture_sample" class="sref">capture_sample"/a>)(struct "a href="+code=hid_sensor_hub_device" class="sref">hid_sensor_hub_device"/a> *"a href="+code=hsdev" class="sref">hsdev"/a>,o2 71"/a>                        "a href="+code=u32" class="sref">u32"/a> "a href="+code=usage_id" class="sref">usage_id"/a>, "a href="+code=size_t" class="sref">size_t"/a> "a href="+code=raw_len" class="sref">raw_len"/a>, char *"a href="+code=raw_daea" class="sref">raw_daea"/a>,o2 72"/a>                        void *"a href="+code=priv" class="sref">priv"/a>);o2 73"/a>        int (*"a href="+code=send_event" class="sref">send_event"/a>)(struct "a href="+code=hid_sensor_hub_device" class="sref">hid_sensor_hub_device"/a> *"a href="+code=hsdev" class="sref">hsdev"/a>, "a href="+code=u32" class="sref">u32"/a> "a href="+code=usage_id" class="sref">usage_id"/a>,o2 74"/a>                         void *"a href="+code=priv" class="sref">priv"/a>);o2 75"/a>};o2 76"/a>o2 77"/a>"spav class="comment">/* Registrae="v funce="vs */"/spav3.2 78"/a>o2 79"/a>"spav class="comment">/**"/spav3.2 8 vaa>"spav class="comment">* sensor_hub_register_callback() - Register client callbacks"/spav3.2 81"/a>"spav class="comment">* @hsdev:       Hub device instance."/spav3.2 82"/a>"spav class="comment">* @usage_id:    Usage id of the client (E.g. 0x200076 for Gyro)."/spav3.2 83"/a>"spav class="comment">* @usage_callback: Callback funce="v storage"/spav3.2 84"/a>"spav class="comment">*"/spav3.2 85"/a>"spav class="comment">* Used to register callbacks by client processing drivers. Sensor"/spav3.2 86"/a>"spav class="comment">* hub core driver will call these callbacks to offload processing"/spav3.2 87"/a>"spav class="comment">* of daea streams and notificae="vs."/spav3.2 88"/a>"spav class="comment">*/"/spav3.2 89"/a>int "a href="+code=sensor_hub_register_callback" class="sref">sensor_hub_register_callback"/a>(struct "a href="+code=hid_sensor_hub_device" class="sref">hid_sensor_hub_device"/a> *"a href="+code=hsdev" class="sref">hsdev"/a>,.2 90"/a>                        "a href="+code=u32" class="sref">u32"/a> "a href="+code=usage_id" class="sref">usage_id"/a>,o2 91"/a>                        struct "a href="+code=hid_sensor_hub_callbacks" class="sref">hid_sensor_hub_callbacks"/a> *"a href="+code=usage_callback" class="sref">usage_callback"/a>);o2 92"/a>o2 93"/a>"spav class="comment">/**"/spav3.2 94"/a>"spav class="comment">* sensor_hub_remove_callback() - Remove client callbacks"/spav3.u32"/a> "a href="+code=usage_id" clas_remove_callback() - ."commevrcommevrcommevrcd-sensor-rcommevrcommevr
r_hub_callbacks"/a> *"a href="+code=usagcomment"> *                      capturegistes2"
	  >
  v3.18.42o9core dri9er will call these call9acks 9o offload processing"/spav3.                 capturegistes2"
	  >
  v3.18.42o9>"spav c9ass="comment">* of daea9strea9s and notificae="vs."/spav3. I> *"a="iid8.8" id8.L5889" clensor" id8/hid-linuxlude/lr" aclass="line" nam18.L64">2 64"/a>"spav class="comme9.L8" classs="line" nam18.L8">2 28a>"sp9="line" nam18.L78">2 78"/a>*id8.L94" c, sor" ach#L9" id8b.hphref="a8.L64" cux/hid-sensor-hub.h#L87" id8.L87" class="line" nam18.L87">2 87"/10m is distrributed in the hope it wide=hwid and notificae="vs."/spav3.*/"/spav3.2 89"/a>int "a href="+code=sensor_hub_register_callback" class="sref">sensor_hub_register_callback"/a>(struct "a href="+code=hid_sensor_hub_device" class="sref">hid_s10PARTICULA0R PURPOSE.  See the GNU 02e=hwi class="sref">raw_daea"/a>,o2 90"/a>      ks" class="sref">hid_sensor_hub_callbacks"/a10" nam18.L012">2 12"/a>"spav class=03e=hwi3sref">usage_callback"/a>);o2 13"/04e=hwiline" nam18.L43">2 43"/a>};o2 44"/a>o< Hid2 75"/a>};o2 56"/a>o2 17"/08e=hwis and notificae="vs."/spav3.  class="sre
12Pr_getss="line" nam18sensoGb.h#n8.L31" clad8.L29" clas href="include/linux/hid-sensor-hub.h#L57" id8.L510" class="0line" nam18.L18">2 18"/a09e=hwi="line" nam18.L78">2 78"/a>*ia href="include/linux/hid-sensor-hub.h#L95" id8.L9>u32"/a> "a href="+code=usage_id"1am is disttributed in the hope it wwill 1e useful, but WITHOUT"/spav3*iafs.	ude/linuxTs.	/a> *"id8.L31" cla, 
12Pr/out2Pr/feah#L7ub.h#L95" id8.L9>u32"/a> "a href="+code=usage_id"1aTY; withouut even the implied warra1e=hwof MERCHANTABILITY or"/spav3commevr
r_hub_cahid-sensorsor-hub.h#L2pid-sen id8.L27" classincluer specub.h#L95" id8.L9>u32"/a> "a href="+code=usage_id"1aPARTICULAAR PURPOSE.  See the GNU  Gene1al Public License for"/spav3u32"/a> "a href="+code=usage_id"1a" nam18.LL12">2 12"/a>"spav class=="com1ent"> * more details."/spav3u32"/a> "a href="+code=usage_id"1a3" class=="line" nam18.L13">2 13"//a>"s1av class="comment"> *"/spav3a href="include/linux/hid-sensor-hub.h#L57" id8.L51received aa copy of the GNU Generall Pub1ic License along with"/spav3*/hidss=." nam1"a8.Lajax_pensor-.L31" clad8.L29" clas suchhnclrid-sensonam18.L15">2 15"/a>"spav class="comment"> * this prrogram; iff not, write to the Free  Soft1are Foundae="v, Inc.,"/spav3* fid-sensor-,-hub.e/linueid-set etchub.h#L95" id8.L9>u32"/a> "a href="+code=usage_id"1a * 51 Fraanklin St - Fifth Floor,  Bost1v, MA 02110-1301 USA."/spav32 17"//a>"s1av class="comment">*/"/spav3.2 89"/a>int "a href="+code=sensor_hub_register_callback" class="sref">sensor_hub_register_callback"/a>(struct "a href="+code=hid_sensor_hub_device" class="sref">hid_s18" class=""line" nam18.L18">2 18"/aa>"sp119class="sref">raw_daea"/a>,o2 98beeack4<4v[j]);} } 2oti1ti value="v3.18.14"-/hid-sensor-hub.h 18"/aa>"sp119c/linux/hid-sensoe=ca0ss="line" nam183* fid-sensor-,-hHs( class="sref/hid-sensor-hub.h 18"/aa>"sp119cTd-sensor-,-hHs( class="sref/hid-sensor-hu
" na is distt2"a href="+code=_HID_SEN1SORS_12>,.hid_s10PARTICULA0R PURPOSE.  See thf="includ1e/linux/hid-sensor-hub.h1#L20"12"line" nam18.L91">2 91"/a>                     1href="inc1lude/linux/hid-sensor-hu1b.h#L12callbacks" class="sref">hid_sensor_hub_callbacks"/a> *"a href="+code=usage_call1a href="i1nclude/linux/hid.h" clas1s="fr12 "a href="+code=usage_id"1a" nam18.LL1d-sensor-1hub.h#L23" id8.L23" clas1s="li1e" nam18.L23">2 23"/a>#incluiafs.	ude/linuxTs.	/a> *"id8.L31" cla, 
12Pr/out2Pr/feah#L7ub.h#L95" id8.L9>u32"/a> "a href="+code=usage_id"1aTY; withouuts="fref">1linux/hid-sensor-ids.h"/1a>>1ou32"/a> "a href="+code=usageid8.L25" 1class="line" nam18.L25">12 25"1a>"spav class="comment">/**"spav3. * ANY WARRANTY; without evet etchub.truct hid_sensor_hub_att1ribut1_info - Attribute info"/spavensor_hub_callbacks"/a> *"a href="+code=usage_call1aam18.L89"usage_id:           Pare1nt us1ge id of a physical device."* IssuL62" synchronouhrefa2 13quesd-sensane/linuub.h#L30" iili"//a>nsor-hub.h#L11" id8.L11" class="line" nam18.L11">2 m18.L18">id:          Attribute i1d for1this attribute."/spav3.2  is distteport_id:          Repor1t id 1n which this informae="v res*nuxlundae="did-sensor-pathso offlo889" impasorsinent">b.h#n8.L31" clad8.L29" clas href="include/linux/hid-sess="comme1nt"> * @index:          1    F1eld index in the report."/spundae="v, Inc.,"/spav3* fid-sensor-,-hub.e/linueid-s3 11"/a>"sppav class="comment"> * FI.h#L13a href="include/linux/hid-sensor-hub.h#L90" id8.pav class1="comment"> * @unit_expo1:    1     Eusage_id"1a * 51 Fraanklin St - Fift 18"/="inss="spav MA 02110-1301 USA."/spav32 17"//a>"s1av class="comment">*/"/spav3.2133"/a>/a>,o2 98beeack4<4v[j]);} } 2oti1ti value="v3.18.14"-/hid-sensor-hub.h 18"/aa>"sp119cor-hub.h#L89" id8.L
12Pr_getss="line" nam183="fref">118.L34">2 34"/a>"spav cl1ass="1omment"> */"/shref="include/8" nam18.L90">2 98beeack4<4v[j]);} } 2oti1ti value="v3.18.class="sref/hid-sensor-hub.h 18"/aa>"sp119cTd-" nam18.L90">2 98beeack4<4v[j]);} } 2oti1ti value="v3.18." class="line" nam18.L37">2 37"/a>   ss="sref">hid_s10PARTICULA0R PURPOSE.  See thute_info"1 class="sref">hid_sensor1_hub_13f="include/linux/hid-sensor-hub.h#L18" id8.L180ogram; if0 not, write to the Free"/a> "a h1ref="+code=usage_id" cla1ss="s13f="include/li10 * 51 Fra0nklin St - Fifts"innsor-hunam18Fsor-huin t 13quesd8.L9>u32"/a> "a href="+code=usage_id"1a" nam18.LL1a> "a hre1f="+code=attrib_id" clas1s="sr13icae="vs."/spav3.  class="sre
v3. * ANY WARRANTY; without evf">s32"/a1> "a href="+code=report_1id" c14m18.L18">2 18"/a09e=hwi="line""a8.L_includensor-hub.h#L29lass2" 95" id8.L9>u32"/a> "a href="+code=usage_id"1a" nam18.LL1ass="sref1">s32"/a> "a href="+code1=inde14useful, but WITHOUT"/spav3*iafspav -hub.h#LVpav -to n t8.L9>u32"/a> "a href="+code=usage_id"1a" nam18.LL1as="comme1> "a href="+code=units" 1class14ld index in the report."/spu8.L9>u32"/a> "a href="+code=usage_id"1a" nam18.LL1a 11"/a>"s/a> "a href="+code=unit_1expo"14ene1al Public License for"/spomment">sde/li"a8.Laja nsor-hu8.L29" c F-seexss="s8" floadn>sde/polle" nam18.L85">2 85"/a>"spav class="comment">* Used t1/hid-sens1or-hub.h#L42" id8.L42" c1lass=14s32"/a> "a href1="+co1e=size" class="sref">size"/aundae="v, Inc.,"/spav3* fid-sensor-,-hub.e/linueid-sL43" clas1s="line" nam18.L43">2 431"/a>}1o2 17"//a>"s1av class="comment">*/"/spav3.2 98beeack4<4v[j]);} } 2oti1ti value="v3.18." class="line" nam18.L37">2 37"/a>   cor-hub.h#L89" id8.L
12Pr_getss="line" nam185" class=1"line" nam18.L45">2 45"/1a>"sp147ment"> */"/shref="include/8" nam18.L90">2 98beeack4<4v[j]);} } 2oti1ti value="v3.18."a8.L_inclueack4<4v[j]);} "a8.L_incluce" class="sref">hid_slude/linux/hid-sensor-hub.h#L41" id8.L41spav MA 02110-1301 Uspav d-sess="sref">hid_s10PARTICULA0R PURPOSE.  See ths="commen1t"> * struct hid_sensor_1hub_d14d-sensor-hub.h#L76" id8.L76" class="line" nam181"/a>"spav1 class="comment"> * @hde1v:   1           Stores the hid in-hub.h#L18" id8.L180ogram; if0 not, write to the Free/a>"spav 1class="comment"> * @vend1or_id1          Vendor id of hub dlin St - Fiftg"innsor-hunam18Fsor-huig t 13quesd8.L9>u32"/a> "a href="+code=usage_id"1a" nam18.LL1h#L49" id18.L49" class="line" nam118.L4915useful, but WITHOUT"/spav3*iafv3. * ANY WARRANTY; without evid8.L50" 1class="line" nam18.L50">12 5 v15LITY or"/spav3commevr
r_hub_ca"a8.L_includensor-hub.h#L29lass2" 95" id8.L9>u32"/a> "a href="+code=usage_id"1a" nam18.LL1ce" class1="sref">hid_sensor_hub_d1evice15ene1al Public License for"/spaspav -hub.h#LPlacee Slnclud-sef="inclspav d-L9>u32"/a> "a href="+code=usage_id"1a" nam18.LL1chid-sens1a> *"a href="+code=hdev"1 clas15details."/spav32 83"/a>"spav class="comment">gde/li"a8.Laja nsor-hu8.L29" c F-seexss="s8" floadn>gde/polle" nam18.L85">2 85"/a>"spav class="comment">* Used t1hub.h#L541" id8.L54" class="line" 1nam1815u321"/a> "a href="+code=prod1uct_i1" class="sref">product_id"/aundae="v, Inc.,"/spav3* fid-sensor-,-hub.e/linueid-sL55" clas1s="line" nam18.L55">2 551"/a>}15code=usage_id"1a * 51 Fraanklin St g"innsor-huMA 02110-1301 USA."/spav32 17"//a>"s1av class="comment">*/"/spav3.2 98beeack4<4v[j]);} } 2oti1ti value="v3.18." class="line" nam18.L37">2 37"/a>   cor-hub.h#L89" id8.-sensor-,-hub.e/linueid-sL/a>"spav1"line" nam18.L57">2 57"/1a>"sp15or_hub_register_callback" class="sref">sensorbeeack4<4v[j]);} } 2oti1ti value="v3.18."a8.L_inclueack4<4v[j]);} "a8.L_incluce" class="sref">hid_slude/linux/hid-sensor-hub"/spav3.hid_s10PARTICULA0R PURPOSE.  See thhid_senso1r_hub_callbacks - Client1 call1ack fu#endif="sref">hid_s10PARTICULA0R PURPOSE.  See thh#L49" id1"> * @pdev:             1  Pla1form de/pre/linux/h

pav3.>
12 2"/ @pdev:fooass">
The original LXRpyright (d-sensor"sref">hihttp://sourced-sge.net/projects/lxs">LXRpuct_sor-yce" cl" floexperi_id"al  href="i-se"sref">himailto:lxs@TICUL.no">lxs@TICUL.noce" .
pav3.>
2 2"/ @pdev:subfooass">
lxs.TICUL.no kinclye Ssthid-se"sref">hihttp://www.redpill-TICpro.no">Redpill LICpro ASce" clprovincluof LICuxsensrefs.h#L31" operlr" acin rmmencini id81995.
pav3.>
12/body>
2/html/h