diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..3b8b9b33be3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,93 @@ +# +# NOTE! Don't add files that are generated in specific +# subdirectories here. Add them in the ".gitignore" file +# in that subdirectory instead. +# +# NOTE! Please use 'git ls-files -i --exclude-standard' +# command after changing this file, to see if there are +# any tracked files which get ignored after the change. +# +# Normal rules +# +.* +*.o +*.o.* +*.a +*.s +*.ko +*.so +*.so.dbg +*.mod.c +*.i +*.lst +*.symtypes +*.order +modules.builtin +*.elf +*.bin +*.gz +*.bz2 +*.lzma +*.xz +*.lzo +*.patch +*.gcno + +# +# Top-level generic files +# +/tags +/TAGS +/linux +/vmlinux +/vmlinuz +/System.map +/Module.markers +/Module.symvers + +# +# Debian directory (make deb-pkg) +# +/debian/ + +# +# git files that we don't want to ignore even it they are dot-files +# +!.gitignore +!.mailmap + +# +# Generated include files +# +include/config +include/generated +arch/*/include/generated + +# stgit generated dirs +patches-* + +# quilt's files +patches +series + +# cscope files +cscope.* +ncscope.* + +# gnu global files +GPATH +GRTAGS +GSYMS +GTAGS + +*.orig +*~ +\#*# + +# +# Leavings from module signing +# +extra_certificates +signing_key.priv +signing_key.x509 +x509.genkey diff --git a/.mailmap b/.mailmap new file mode 100644 index 00000000000..658003aa944 --- /dev/null +++ b/.mailmap @@ -0,0 +1,118 @@ +# +# This list is used by git-shortlog to fix a few botched name translations +# in the git archive, either because the author's full name was messed up +# and/or not always written the same way, making contributions from the +# same person appearing not to be so or badly displayed. +# +# repo-abbrev: /pub/scm/linux/kernel/git/ +# + +Aaron Durbin +Adam Oldham +Adam Radford +Adrian Bunk +Alan Cox +Alan Cox +Aleksey Gorelov +Al Viro +Al Viro +Andreas Herrmann +Andrew Morton +Andrew Vasquez +Andy Adamson +Archit Taneja +Arnaud Patard +Arnd Bergmann +Axel Dyks +Axel Lin +Ben Gardner +Ben M Cahill +Björn Steinbrink +Brian Avery +Brian King +Christoph Hellwig +Corey Minyard +Damian Hobson-Garcia +David Brownell +David Woodhouse +Dmitry Eremin-Solenikov +Domen Puncer +Douglas Gilbert +Ed L. Cashin +Evgeniy Polyakov +Felipe W Damasio +Felix Kuhling +Felix Moeller +Filipe Lautert +Franck Bui-Huu +Frank Zago +Greg Kroah-Hartman +Greg Kroah-Hartman +Greg Kroah-Hartman +Henk Vergonet +Henrik Kretzschmar +Herbert Xu +Jacob Shin +James Bottomley +James Bottomley +James E Wilson +James Ketrenos +Jean Tourrilhes +Jeff Garzik +Jens Axboe +Jens Osterkamp +John Stultz +Juha Yrjola +Juha Yrjola +Juha Yrjola +Kay Sievers +Kenneth W Chen +Koushik +Kuninori Morimoto +Leonid I Ananiev +Linas Vepstas +Mark Brown +Matthieu CASTET +Mayuresh Janorkar +Michael Buesch +Michel Dänzer +Mitesh shah +Morten Welinder +Morten Welinder +Morten Welinder +Morten Welinder +Mythri P K +Nguyen Anh Quynh +Paolo 'Blaisorblade' Giarrusso +Patrick Mochel +Peter A Jonsson +Peter Oruba +Peter Oruba +Praveen BP +Rajesh Shah +Ralf Baechle +Ralf Wildenhues +Rémi Denis-Courmont +Rudolf Marek +Rui Saraiva +Sachin P Sant +Sam Ravnborg +Sascha Hauer +S.Çağlar Onur +Simon Kelley +Stéphane Witzmann +Stephen Hemminger +Sumit Semwal +Tejun Heo +Thomas Graf +Tony Luck +Tsuneo Yoshioka +Uwe Kleine-König +Uwe Kleine-König +Uwe Kleine-König +Valdis Kletnieks +Viresh Kumar +Takashi YOSHII +Yusuke Goda +Gustavo Padovan +Gustavo Padovan diff --git a/Documentation/ABI/testing/sysfs-block-zram b/Documentation/ABI/testing/sysfs-block-zram index ec93fe33baa..6086feb60ad 100644 --- a/Documentation/ABI/testing/sysfs-block-zram +++ b/Documentation/ABI/testing/sysfs-block-zram @@ -5,20 +5,33 @@ Description: The disksize file is read-write and specifies the disk size which represents the limit on the *uncompressed* worth of data that can be stored in this disk. +<<<<<<< HEAD +======= + Unit: bytes +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed What: /sys/block/zram/initstate Date: August 2010 Contact: Nitin Gupta Description: +<<<<<<< HEAD The disksize file is read-only and shows the initialization +======= + The initstate file is read-only and shows the initialization +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed state of the device. What: /sys/block/zram/reset Date: August 2010 Contact: Nitin Gupta Description: +<<<<<<< HEAD The disksize file is write-only and allows resetting the device. The reset operation frees all the memory assocaited +======= + The reset file is write-only and allows resetting the + device. The reset operation frees all the memory associated +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed with this device. What: /sys/block/zram/num_reads @@ -42,6 +55,7 @@ Description: The invalid_io file is read-only and specifies the number of non-page-size-aligned I/O requests issued to this device. +<<<<<<< HEAD What: /sys/block/zram/notify_free Date: August 2010 Contact: Nitin Gupta @@ -60,6 +74,50 @@ Description: discard requests received by this device. These requests provide information to block device regarding blocks which are no longer used by filesystem. +======= +What: /sys/block/zram/failed_reads +Date: February 2014 +Contact: Sergey Senozhatsky +Description: + The failed_reads file is read-only and specifies the number of + failed reads happened on this device. + +What: /sys/block/zram/failed_writes +Date: February 2014 +Contact: Sergey Senozhatsky +Description: + The failed_writes file is read-only and specifies the number of + failed writes happened on this device. + +What: /sys/block/zram/max_comp_streams +Date: February 2014 +Contact: Sergey Senozhatsky +Description: + The max_comp_streams file is read-write and specifies the + number of backend's zcomp_strm compression streams (number of + concurrent compress operations). + +What: /sys/block/zram/comp_algorithm +Date: February 2014 +Contact: Sergey Senozhatsky +Description: + The comp_algorithm file is read-write and lets to show + available and selected compression algorithms, change + compression algorithm selection. + +What: /sys/block/zram/notify_free +Date: August 2010 +Contact: Nitin Gupta +Description: + The notify_free file is read-only. Depending on device usage + scenario it may account a) the number of pages freed because + of swap slot free notifications or b) the number of pages freed + because of REQ_DISCARD requests sent by bio. The former ones + are sent to a swap block device when a swap slot is freed, which + implies that this disk is being used as a swap disk. The latter + ones are sent by filesystem mounted with discard option, + whenever some data blocks are getting discarded. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed What: /sys/block/zram/zero_pages Date: August 2010 @@ -97,3 +155,50 @@ Description: efficiency can be calculated using compr_data_size and this statistic. Unit: bytes +<<<<<<< HEAD +======= + +What: /sys/block/zram/mem_used_max +Date: August 2014 +Contact: Minchan Kim +Description: + The mem_used_max file is read/write and specifies the amount + of maximum memory zram have consumed to store compressed data. + For resetting the value, you should write "0". Otherwise, + you could see -EINVAL. + Unit: bytes + +What: /sys/block/zram/mem_limit +Date: August 2014 +Contact: Minchan Kim +Description: + The mem_limit file is read/write and specifies the maximum + amount of memory ZRAM can use to store the compressed data. The + limit could be changed in run time and "0" means disable the + limit. No limit is the initial state. Unit: bytes + +What: /sys/block/zram/compact +Date: August 2015 +Contact: Minchan Kim +Description: + The compact file is write-only and trigger compaction for + allocator zrm uses. The allocator moves some objects so that + it could free fragment space. + +What: /sys/block/zram/io_stat +Date: August 2015 +Contact: Sergey Senozhatsky +Description: + The io_stat file is read-only and accumulates device's I/O + statistics not accounted by block layer. For example, + failed_reads, failed_writes, etc. File format is similar to + block layer statistics file format. + +What: /sys/block/zram/mm_stat +Date: August 2015 +Contact: Sergey Senozhatsky +Description: + The mm_stat file is read-only and represents device's mm + statistics (orig_data_size, compr_data_size, etc.) in a format + similar to block layer statistics file format. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed diff --git a/Documentation/DocBook/media/dvb/dvbstb.pdf b/Documentation/DocBook/media/dvb/dvbstb.pdf new file mode 100644 index 00000000000..0fa75d90c3e Binary files /dev/null and b/Documentation/DocBook/media/dvb/dvbstb.pdf differ diff --git a/Documentation/DocBook/media/v4l/crop.pdf b/Documentation/DocBook/media/v4l/crop.pdf new file mode 100644 index 00000000000..c9fb81cd32f Binary files /dev/null and b/Documentation/DocBook/media/v4l/crop.pdf differ diff --git a/Documentation/DocBook/media/v4l/fieldseq_bt.pdf b/Documentation/DocBook/media/v4l/fieldseq_bt.pdf new file mode 100644 index 00000000000..26598b23f80 Binary files /dev/null and b/Documentation/DocBook/media/v4l/fieldseq_bt.pdf differ diff --git a/Documentation/DocBook/media/v4l/fieldseq_tb.pdf b/Documentation/DocBook/media/v4l/fieldseq_tb.pdf new file mode 100644 index 00000000000..4965b22ddb3 Binary files /dev/null and b/Documentation/DocBook/media/v4l/fieldseq_tb.pdf differ diff --git a/Documentation/DocBook/media/v4l/pipeline.pdf b/Documentation/DocBook/media/v4l/pipeline.pdf new file mode 100644 index 00000000000..ee3e37f04b6 Binary files /dev/null and b/Documentation/DocBook/media/v4l/pipeline.pdf differ diff --git a/Documentation/DocBook/media/v4l/vbi_525.pdf b/Documentation/DocBook/media/v4l/vbi_525.pdf new file mode 100644 index 00000000000..9e72c25b208 Binary files /dev/null and b/Documentation/DocBook/media/v4l/vbi_525.pdf differ diff --git a/Documentation/DocBook/media/v4l/vbi_625.pdf b/Documentation/DocBook/media/v4l/vbi_625.pdf new file mode 100644 index 00000000000..765235e33a4 Binary files /dev/null and b/Documentation/DocBook/media/v4l/vbi_625.pdf differ diff --git a/Documentation/DocBook/media/v4l/vbi_hsync.pdf b/Documentation/DocBook/media/v4l/vbi_hsync.pdf new file mode 100644 index 00000000000..200b668189b Binary files /dev/null and b/Documentation/DocBook/media/v4l/vbi_hsync.pdf differ diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt new file mode 100644 index 00000000000..48a183e2998 --- /dev/null +++ b/Documentation/blockdev/zram.txt @@ -0,0 +1,189 @@ +zram: Compressed RAM based block devices +---------------------------------------- + +* Introduction + +The zram module creates RAM based block devices named /dev/zram +( = 0, 1, ...). Pages written to these disks are compressed and stored +in memory itself. These disks allow very fast I/O and compression provides +good amounts of memory savings. Some of the usecases include /tmp storage, +use as swap disks, various caches under /var and maybe many more :) + +Statistics for individual zram devices are exported through sysfs nodes at +/sys/block/zram/ + +* Usage + +Following shows a typical sequence of steps for using zram. + +1) Load Module: + modprobe zram num_devices=4 + This creates 4 devices: /dev/zram{0,1,2,3} + (num_devices parameter is optional. Default: 1) + +2) Set max number of compression streams + Compression backend may use up to max_comp_streams compression streams, + thus allowing up to max_comp_streams concurrent compression operations. + By default, compression backend uses single compression stream. + + Examples: + #show max compression streams number + cat /sys/block/zram0/max_comp_streams + + #set max compression streams number to 3 + echo 3 > /sys/block/zram0/max_comp_streams + +Note: +In order to enable compression backend's multi stream support max_comp_streams +must be initially set to desired concurrency level before ZRAM device +initialisation. Once the device initialised as a single stream compression +backend (max_comp_streams equals to 1), you will see error if you try to change +the value of max_comp_streams because single stream compression backend +implemented as a special case by lock overhead issue and does not support +dynamic max_comp_streams. Only multi stream backend supports dynamic +max_comp_streams adjustment. + +3) Select compression algorithm + Using comp_algorithm device attribute one can see available and + currently selected (shown in square brackets) compression algortithms, + change selected compression algorithm (once the device is initialised + there is no way to change compression algorithm). + + Examples: + #show supported compression algorithms + cat /sys/block/zram0/comp_algorithm + lzo [lz4] + + #select lzo compression algorithm + echo lzo > /sys/block/zram0/comp_algorithm + +4) Set Disksize + Set disk size by writing the value to sysfs node 'disksize'. + The value can be either in bytes or you can use mem suffixes. + Examples: + # Initialize /dev/zram0 with 50MB disksize + echo $((50*1024*1024)) > /sys/block/zram0/disksize + + # Using mem suffixes + echo 256K > /sys/block/zram0/disksize + echo 512M > /sys/block/zram0/disksize + echo 1G > /sys/block/zram0/disksize + +Note: +There is little point creating a zram of greater than twice the size of memory +since we expect a 2:1 compression ratio. Note that zram uses about 0.1% of the +size of the disk when not in use so a huge zram is wasteful. + +5) Set memory limit: Optional + Set memory limit by writing the value to sysfs node 'mem_limit'. + The value can be either in bytes or you can use mem suffixes. + In addition, you could change the value in runtime. + Examples: + # limit /dev/zram0 with 50MB memory + echo $((50*1024*1024)) > /sys/block/zram0/mem_limit + + # Using mem suffixes + echo 256K > /sys/block/zram0/mem_limit + echo 512M > /sys/block/zram0/mem_limit + echo 1G > /sys/block/zram0/mem_limit + + # To disable memory limit + echo 0 > /sys/block/zram0/mem_limit + +6) Activate: + mkswap /dev/zram0 + swapon /dev/zram0 + + mkfs.ext4 /dev/zram1 + mount /dev/zram1 /tmp + +7) Stats: +Per-device statistics are exported as various nodes under /sys/block/zram/ + +A brief description of exported device attritbutes. For more details please +read Documentation/ABI/testing/sysfs-block-zram. + +Name access description +---- ------ ----------- +disksize RW show and set the device's disk size +initstate RO shows the initialization state of the device +reset WO trigger device reset +num_reads RO the number of reads +failed_reads RO the number of failed reads +num_write RO the number of writes +failed_writes RO the number of failed writes +invalid_io RO the number of non-page-size-aligned I/O requests +max_comp_streams RW the number of possible concurrent compress operations +comp_algorithm RW show and change the compression algorithm +notify_free RO the number of notifications to free pages (either + slot free notifications or REQ_DISCARD requests) +zero_pages RO the number of zero filled pages written to this disk +orig_data_size RO uncompressed size of data stored in this disk +compr_data_size RO compressed size of data stored in this disk +mem_used_total RO the amount of memory allocated for this disk +mem_used_max RW the maximum amount memory zram have consumed to + store compressed data +mem_limit RW the maximum amount of memory ZRAM can use to store + the compressed data +num_migrated RO the number of objects migrated migrated by compaction + + +WARNING +======= +per-stat sysfs attributes are considered to be deprecated. +The basic strategy is: +-- the existing RW nodes will be downgraded to WO nodes (in linux 4.11) +-- deprecated RO sysfs nodes will eventually be removed (in linux 4.11) + +The list of deprecated attributes can be found here: +Documentation/ABI/obsolete/sysfs-block-zram + +Basically, every attribute that has its own read accessible sysfs node +(e.g. num_reads) *AND* is accessible via one of the stat files (zram/stat +or zram/io_stat or zram/mm_stat) is considered to be deprecated. + +User space is advised to use the following files to read the device statistics. + +File /sys/block/zram/stat + +Represents block layer statistics. Read Documentation/block/stat.txt for +details. + +File /sys/block/zram/io_stat + +The stat file represents device's I/O statistics not accounted by block +layer and, thus, not available in zram/stat file. It consists of a +single line of text and contains the following stats separated by +whitespace: + failed_reads + failed_writes + invalid_io + notify_free + +File /sys/block/zram/mm_stat + +The stat file represents device's mm statistics. It consists of a single +line of text and contains the following stats separated by whitespace: + orig_data_size + compr_data_size + mem_used_total + mem_limit + mem_used_max + zero_pages + num_migrated + +8) Deactivate: + swapoff /dev/zram0 + umount /dev/zram1 + +9) Reset: + Write any positive value to 'reset' sysfs node + echo 1 > /sys/block/zram0/reset + echo 1 > /sys/block/zram1/reset + + This frees all the memory allocated for the given device and + resets the disksize to zero. You must set the disksize again + before reusing the device. + +Nitin Gupta +ngupta@vflare.org diff --git a/Documentation/devicetree/bindings/fb/mdss-mdp.txt b/Documentation/devicetree/bindings/fb/mdss-mdp.txt index 7ad5888dd81..f4dd98b4ee0 100644 --- a/Documentation/devicetree/bindings/fb/mdss-mdp.txt +++ b/Documentation/devicetree/bindings/fb/mdss-mdp.txt @@ -402,8 +402,41 @@ Fudge Factors: Fudge factors are used to boost demand for applied in scenarios where panel interface can be more tolerant to memory latency such as command mode panels. +<<<<<<< HEAD - qcom,max-bandwidth-per-pipe-kbps: This value indicates the max bandwidth in KB that a single pipe can support without underflow. +======= +- qcom,max-bandwidth-per-pipe-kbps: A two dimensional array indicating the max + bandwidth in KB that a single pipe can support + without underflow for various usecases. The + first parameter indicates the usecase and the + second parameter gives the max bw allowed for + the usecase. Following are the enum values for + modes in different cases: + For default case, mode = 1 + camera usecase, mode = 2 + hflip usecase, mode = 4 + vflip usecase, mode = 8 + First parameter/mode value need to match enum, + mdss_mdp_max_bw_mode, present in + include/uapi/linux/msm_mdp.h. +- qcom,max-bw-settings: This two dimension array indicates the max bandwidth + in KB that has to be supported when particular + scenarios are involved such as camera, flip. + The first parameter indicate the + scenario/usecase and second paramter indicate + the maximum bandwidth for that usecase. + Following are the enum values for modes in different + cases: + For default case, mode = 1 + camera usecase, mode = 2 + hflip usecase, mode = 4 + vflip usecase, mode = 8 + First parameter/mode value need to match enum, + mdss_mdp_max_bw_mode, present in + include/uapi/linux/msm_mdp.h. + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed - qcom,mdss-has-panic-ctrl: Boolean property to indicate if panic/robust signal control feature is available or not. - qcom,mdss-pipe-vig-panic-ctrl-offsets: Array of panic/robust signal offsets @@ -523,6 +556,16 @@ Example: qcom,max-bandwidth-low-kbps = <2300000>; qcom,max-bandwidth-high-kbps = <3000000>; +<<<<<<< HEAD +======= + qcom,max-bandwidth-per-pipe-kbps = <4 2100000>, + <8 1800000>; + qcom,max-bw-settings = <1 2300000>, + <2 1700000>, + <4 2300000>, + <8 2000000>; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,max-mixer-width = <2048>; qcom,max-clk-rate = <320000000>; qcom,vbif-settings = <0x0004 0x00000001>, diff --git a/Documentation/devicetree/bindings/input/misc/ap3426_cm.txt b/Documentation/devicetree/bindings/input/misc/ap3426_cm.txt new file mode 100644 index 00000000000..18dd984eeb8 --- /dev/null +++ b/Documentation/devicetree/bindings/input/misc/ap3426_cm.txt @@ -0,0 +1,51 @@ +AP3426 3-in-1 digital ALS+PS+IRLED module + +AP3426 is a module integrated with a digital ambient light sensor, a proximity +sensor, and an IR LED in a single package. It provides multiple gain ambient +light detection as well as external object distance detection. It can be +connected to host processor via i2c. + +This is for the CyanogenMod version of the driver, called ap3426_cm. + +Required properties: + - compatible : Should be "di_ap3426". + - reg : i2c slave address of this device. + - vdd-supply : Analog power supply needed to power up this device. + - vio-supply : Digital IO power supply needed for IO and i2c. + - interrupt-parent : The interrupt controler this device connected to. + - interrupts : L/P sample interrupt to indicate new data ready. + - pinctrl-names : pinctrl configuration names of this device. Should be "default" and "sleep". + - pinctrl-0 : Should specify pin control groups used for this sensor. + - pinctrl-1 : Should specify pin control groups used for this sensor. + - ap3426,irq-gpio : GPIO pin for interrupt of this device. + - ap3426,ps-integrated-time: Selects the duration at which the device's ADC will sample the + photodiode current signal. The maximum value is 63. + - ap3426,ps-thdl : Proximity sensor low threshold + - ap3426,ps-thdh : Proximity sensor high threshold + + +Optional properties: + - ap3426,ps-calibration-min : Minimum reading for proximity sensor calibration + - ap3426,ps-calibration-expected : Expected reading for proximity sensor calibration + - ap3426,ps-calibration-max : Maximum reading for proximity sensor calibration + +Example: + +&i2c_0 { /* BLSP1 QUP2 */ + di_ap3426@1e { + compatible = "di_ap3426"; + reg = <0x1e>; + interrupt-parent = <&msm_gpio>; + interrupts = <113 0x2002>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + ap3426,irq-gpio= <&msm_gpio 113 0x2002>; + ap3426,ps-thdl = <100>; + ap3426,ps-thdh = <200>; + ap3426,ps-calibration-min = <0>; + ap3426,ps-calibration-expected = <120>; + ap3426,ps-calibration-max = <500>; + ap3426,ps-integrated-time = <0x0>; + }; +}; + diff --git a/Documentation/devicetree/bindings/input/misc/bmi160.txt b/Documentation/devicetree/bindings/input/misc/bmi160.txt new file mode 100644 index 00000000000..7fe6eedb09b --- /dev/null +++ b/Documentation/devicetree/bindings/input/misc/bmi160.txt @@ -0,0 +1,49 @@ +BOSCH 6-axis accelerometer and gyroscope sensor driver. + +Required properties: + + - compatible : Should be "bosch,bmi160". + - reg : i2c slave address of the device. + - pinctrl-names : Pinctrl configuration names of this sensor driver. + Should be "default". + - pinctrl-0 : The pinctrl node corresponding to "default", + should be <&bmi160_int1_default &bmi160_int2_default>. + - interrupt-parent : Parent of interrupt. + - interrupts : Accelerometer interrupts to indicate new data ready or events. + - vdd-supply : Analog power supply needed to power device. + - vio-supply : Digital IO power supply needed for IO and I2C. + - bosch,init-interval : Initial data polling interval in millisecond. + - bosch,place : The placing of the accelerometer on board. There are 8 + patterns of placing described as below: + 0: 1st pin is right down + 1: 1st pin is left down + 2: 1st pin is left top + 3: 1st pin is right top + 4: 1st pin is left down (from top view) + 5: 1st pin is left top (from top view) + 6: 1st pin is right top (from top view) + 7: 1st pin is right down (from top view) + +Optional properties: + + - bosch,gpio-int1 : 1st irq gpio which is to provide interrupts + to host, interrupt events can be route to any of + these two irq pins according device configuration. + - bosch,gpio-int2 : 2nd irq gpio which is to provide interrupts + to host. +Example: +&i2c_0 { /* BLSP1 QUP2 */ + bosch@68 { /* Accelerometer and Gyroscope sensor */ + compatible = "bosch,bmi160"; + reg = <0x68>; + pinctrl-names = "default"; + pinctrl-0 = <&bmi160_int1_default>; + interrupt-parent = <&msm_gpio>; + interrupts = <96 0x2002>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + bosch,init-interval = <200>; + bosch,place = <1>; + bosch,gpio-int1 = <&msm_gpio 96 0x2002>; + }; +}; diff --git a/Documentation/devicetree/bindings/input/misc/mmc3x30.txt b/Documentation/devicetree/bindings/input/misc/mmc3x30.txt new file mode 100644 index 00000000000..f050cdc8cc9 --- /dev/null +++ b/Documentation/devicetree/bindings/input/misc/mmc3x30.txt @@ -0,0 +1,58 @@ +MEMSIC MMC3x30 3-axis magnetic sensor + +The MEMSIC 3-axis magnetic sensor is a complete 3-axis magnetic sensor with +on-chip signal processing and intergrated i2c bus. It can be connected to host +processor via i2c. It can measure magnetic fields within the full scale range +from -16 Gauss to +16 Gauss. + +Required properties: + + - compatible : Should be "memsic,mmc3x30". + - reg : i2c address of the device. + - vdd-supply : Analog power supply needed to power up the device. + - vio-supply : Digital IO power supply needed for IO and I2C. + - memsic,dir : String value of the direction of the ecompass sensor + chip. There are 8 patterns of direction: + + + x > 0 /___________o + / /| + / / |* 1st pin is here + /________/ /| + |_______/|/ |/ z > 0 + / + |/ y > 0 + + + The above graph shows the coordinate of the sensor chip. Specify the + following string to memsic,dir to convert it into Android coordinate. + Note the definition of sensor placement on target board is relative to + Android portrait mode. + + left right up down + obverse-x-axis-forward Y+ Y- X+ X- + obverse-x-axis-rightward X- X+ Y+ Y- + obverse-x-axis-backward Y- Y+ X- X+ + obverse-x-axis-leftward X+ X- Y- Y+ + reverse-x-axis-forward Y- Y+ X+ X- + reverse-x-axis-rightward X- X+ Y- Y+ + reverse-x-axis-backward Y+ Y- X- X+ + reverse-x-axis-leftward X+ X- Y+ Y- + +Optional properites: + + - memsic,auto-report : Boolean value to indicate if enable auto-report mode. + + Example: + A chip on 8916 platform with the pattern as the above graph: + &i2c_0 { /* BLSP1 QUP2 */ + memsic@30 { + compatible = "memsic,mmc3x30"; + reg = <0x30>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + memsic,dir = "obverse-x-axis-forward"; + memsic,auto-report; + }; + }; + diff --git a/Documentation/devicetree/bindings/input/touchscreen/himax-852xes.txt b/Documentation/devicetree/bindings/input/touchscreen/himax-852xes.txt new file mode 100755 index 00000000000..026ad93159b --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/himax-852xes.txt @@ -0,0 +1,70 @@ +Himax touch controller + +The himax controller is connected to host processor +via i2c. The controller generates interrupts when the +user touches the panel. The host controller is expected +to read the touch coordinates over i2c and pass the coordinates +to the rest of the system. + +Required properties: + + - compatible : should be "himax,852xes" + - reg : i2c slave address of the device + - interrupt-parent : parent of interrupt + - interrupts : touch sample interrupt to indicate presense or release + of fingers on the panel. + - vdd-ana-supply : Power supply needed to power up the device + - vcc_i2c-supply : Power source required to power up i2c bus + - himax,irq-gpio : irq gpio which is to provide interrupts to host, + same as "interrupts" node. It will also + contain active low or active high information. + - himax,rst-gpio : reset gpio to control the reset of chip + - himax,display-coords : display coords in pixels. It is a four + tuple consisting of min x, min y, max x and + max y values + - pinctrl-names : This should be defined if a target uses pinctrl framework. + See "pinctrl" in Documentation/devicetree/bindings/pinctrl/msm-pinctrl.txt. + Specify the names of the configs that pinctrl can install in driver. + Following are the pinctrl configs that can be installed: + "pmx_ts_active" : Active configuration of pins, this should specify active + config defined in pin groups of interrupt and reset gpio. + "pmx_ts_suspend" : Disabled configuration of pins, this should specify sleep + config defined in pin groups of interrupt and reset gpio. + "pmx_ts_release" : Release configuration of pins, this should specify + release config defined in pin groups of interrupt and reset gpio. + - himax,num-max-touches: It defines the maximum number of touch supported by the controller. + - himax,hard-reset-delay-ms : hard reset delay in ms + - himax,post-hard-reset-delay-ms : post hard reset delay in ms + - report_type : the protocol type when TP reports, 0 means TYPE A, 1 means type B. + +Optional properties: + + - himax,button-map : button map of key codes. It is a three tuple consisting of key codes. + - himax,panel-coords : panel coords for the chip in pixels. + It is a four tuple consisting of min x, + min y, max x and max y values + - himax,ic-type : It defines the ic-type of the controller. Values are as folows: + +Example: + i2c@78b9000 { /* BLSP1 QUP5 */ + himax@4a { + compatible = "himax,852xes"; + reg = <0x4a>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2008>; + himax,irq-gpio = <&msm_gpio 13 0x00000001>; + himax,rst-gpio = <&msm_gpio 12 0x0>; + vdd-ana-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + himax,display-coords = <0 0 480 854>; + pinctrl-names = "pmx_ts_active","pmx_ts_suspend"; + pinctrl-0 = <&ts_int_active &ts_reset_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + himax,button-map = <172 139 158>; + himax,ic-type = <2>; + himax,num_max_touches = <2>; + himax,hard-reset-delay-ms = <100>; + himax,post-hard-reset-delay-ms = <100>; + report_type = <1>; + }; + }; diff --git a/Documentation/devicetree/bindings/leds/leds-aw2013.txt b/Documentation/devicetree/bindings/leds/leds-aw2013.txt index 4b18135d631..cefa92d62be 100644 --- a/Documentation/devicetree/bindings/leds/leds-aw2013.txt +++ b/Documentation/devicetree/bindings/leds/leds-aw2013.txt @@ -11,6 +11,16 @@ Required properties: - vdd-supply : Power supply needed to power up the device - vcc-supply : Power source required to power up i2c bus +<<<<<<< HEAD +======= +Optional properties: + - pinctrl-names : default, suspend pincontrol names, should be + "aw2013_led_default", "aw2013_led_suspend" if + necessary. + - pinctrl-0/1 : pincontrol entry reference for default, + suspended states. + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed LED required sub-node properties: - aw2013,name : name of the LED - aw2013,id : id of the LED @@ -39,6 +49,12 @@ Example: reg = <0x45>; vdd-supply = <&pm8909_l17>; vcc-supply = <&pm8909_l6>; +<<<<<<< HEAD +======= + pinctrl-names = "aw2013_led_default", "aw2013_led_suspend"; + pinctrl-0 = <&red_led_default &green_led_default &blue_led_default>; + pinctrl-1 = <&red_led_default &green_led_default &blue_led_default>; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed aw2013,red { aw2013,name = "red"; diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt new file mode 100644 index 00000000000..2c5bb36fd16 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/arizona.txt @@ -0,0 +1,204 @@ +Wolfson Arizona class audio SoCs + +These devices are audio SoCs with extensive digital capabilites and a range +of analogue I/O. + +Required properties: + + - compatible : One of the following chip-specific strings: + "wlf,wm5102" + "wlf,wm5110" + "wlf,wm8280" + "wlf,wm8281" + "wlf,wm8997" + "wlf,WM8998" + "wlf,wm1814" + "wlf,wm8285" + "wlf,wm1840" + "wlf,wm1831" + "cirrus,cs47l24" + "cirrus,cs47l85" + + - reg : I2C slave address when connected using I2C, chip select number when + using SPI. + + - interrupts : The interrupt line the /IRQ signal for the device is + connected to. + - interrupt-controller : Arizona class devices contain interrupt controllers + and may provide interrupt services to other devices. + - interrupt-parent : The parent interrupt controller. + - #interrupt-cells: the number of cells to describe an IRQ, this should be 2. + The first cell is the IRQ number. + The second cell is the flags, encoded as the trigger masks from + Documentation/devicetree/bindings/interrupts.txt + + - gpio-controller : Indicates this device is a GPIO controller. + - #gpio-cells : Must be 2. The first cell is the pin number and the + second cell is used to specify optional parameters (currently unused). + + - AVDD-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply (wm5102, wm5110), + DBVDD4-supply (wm8285), CPVDD-supply, SPKVDDL-supply (wm5102, wm5110), + SPKVDDR-supply (wm5102, wm5110), SPKVDD-supply (wm8997, cs47l24) : Power + supplies for the device, as covered in + Documentation/devicetree/bindings/regulator/regulator.txt + +Optional properties: + + - wlf,reset : GPIO specifier for the GPIO controlling /RESET + - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA + - wlf,clk32k-src : set input source for codec 32kHz clock. + 0 = default, 1 = MCLK1, 2 = MCLK2, 3 = None + + - wlf,micd-software-compare : Use a software comparison to determine mic + presence + - wlf,micd-detect-debounce : Additional software microphone detection + debounce specified in milliseconds + - wlf,micd-pol-gpio : GPIO specifier for the GPIO controlling the headset + polarity if one exists + - wlf,micd-bias-start-time : Time allowed for MICBIAS to startup prior to + performing microphone detection, specified as per the MICD_BIAS_STARTTIME + bits in the register MIC_DETECT_1 + - wlf,micd-rate : Delay between successive microphone detection measurements, + specified as per the MICD_RATE bits in the register MIC_DETECT_1 + - wlf,micd-dbtime : Microphone detection hardware debounce level, specified + as per the MICD_DBTIME bits in the register MIC_DETECT_1 + - wlf,micd-timeout : Timeout for microphone detection, specified in + milliseconds + - wlf,micd-force-micbias : Force MICBIAS continuously on during microphone + detection + - wlf,micd-ranges : Microphone detection level and key configuration, this + field can be of variable length but should always be a multiple of 2 cells + long, each two cell group represents one button configuration + The first cell is the maximum impedance for this button in ohms + The second cell the key that should be reported to the input layer + - wlf,micd-configs : Headset polarity configurations, the field can be of + variable length but should always be a multiple of 3 cells long, each two + cell group represents one polarity configration + The first cell is the accessory detection source as per the ACCDET_SRC bits + in the ACCESSORY_DETECT_MODE_1 register + The second cell represents the MICBIAS to be used as per the MICD_BIAS_SRC + bits in the MIC_DETECT_1 register + The third cell represents the value of the micd-pol-gpio pin, a non-zero + value indicates this should be on + - wlf,init-mic-delay : Adds a delay in milliseconds between jack detection + and beginning ramp of MICBIAS. + - wlf,micd-clamp-mode: Specifies the logic of the micdetect clamp block + - wlf,hs-mic: Specify an input to mute during headset button presses and + jack removal: 1 - IN1L, 2 - IN1R, ..., n - IN[n]R + + - wlf,micbias1 : Configuration for the micbias regulator, should include 5 + cells. + The first cell is the output voltage in millivolts + The second cell a non-zero value indicates an external capacitor is fitted + The third cell a non-zero value indicates the micbias should be actively + discharged + The four cell a non-zero value indicates that the micbias should be + brought up slowly to reduce pops + The fifth cell a non-zero value indicates the micbias should be bypassed + and simply output MICVDD + - wlf,micbias2 : See wlf,micbias1 + - wlf,micbias3 : See wlf,micbias1 + - wlf,micbias4 : See wlf,micbias1 + + - wlf,gpio-defaults : A list of GPIO configuration register values. Defines + for the appropriate values can found in . If + absent, no configuration of these registers is performed. If any entry has + a value that is out of range for a 16 bit register then the chip default + will be used. + + - wlf,max-channels-clocked : The maximum number of channels to be clocked on + each AIF, useful for I2S systems with multiple data lines being mastered. + Specify one cell for each AIF, specify zero for AIFs that should be handled + normally. + + - wlf,dmic-ref : DMIC reference for each input, must contain four cells if + specified. 0 indicates MICVDD and is the default, 1,2,3 indicate the + respective MICBIAS. + + - wlf,inmode : Input mode for each input, must contain four cells if + specified. 0 indicates Differential, 1 indicates Single Ended and 2 + indicates a digital microphone. + For most codecs the entries map to + wm8998: entries are for + cs47l85, wm8285: entries are for + + - wlf,out-mono : Mono bit for each output, must contain six cells if + specified. A non-zero value indicates the corresponding output is mono. + + - wlf,use-jd-gpio : Use GPIO input for jack detection. + - wlf,usr-jd-gpio-nopull : Internal pull on GPIO is disabled when used for + jack detection. + + - wlf,gpsw : Settings for the general purpose switch, set as per the + SW1_MODE bits in the GP Switch 1 register + + wlf,wm5102t-output-pwr : Output power setting (WM5102T only) + + - wlf,fixed-hpdet-imp : Do not perform any headphone detection, just use + the fixed value specified here as the headphone impedance. + + - wlf,hpdet-short-circuit-imp : Specifies the maximum impedance in ohms + that will be considered as a short circuit + + - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if + they are being externally supplied. As covered in + Documentation/devicetree/bindings/regulator/regulator.txt + +Optional subnodes: + - ldo1 : Initial data for the LDO1 regulator, as covered in + Documentation/devicetree/bindings/regulator/regulator.txt + - micvdd : Initial data for the MICVDD regulator, as covered in + Documentation/devicetree/bindings/regulator/regulator.txt + +Example: + +codec: wm5102@1a { + compatible = "wlf,wm5102"; + reg = <0x1a>; + interrupts = <347>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + + gpio-controller; + #gpio-cells = <2>; + + wlf,micd-detect-debounce = <10>; + wlf,micd-bias-start-time = <0x1>; + wlf,micd-rate = <0x1>; + wlf,micd-dbtime = <0x1>; + wlf,micd-timeout = <10>; + wlf,micd-force-micbias; + wlf,micd-ranges = < + 11 0x100 + 28 0x101 + 54 0x102 + 100 0x103 + 186 0x104 + 430 0x105 + >; + wlf,micd-configs = < + 0x1 1 0 + 0x0 2 1 + >; + wlf,fixed-hpdet-imp = <8>; + + wlf,micbias2 = <2600 0 1 1 0>; + wlf,init-mic-delay = <10>; + wlf,micd-clamp-mode = <0xb>; + + wlf,dmic-ref = <0 0 1 0>; + wlf,inmode = <0 0 2 0>; + + wlf,gpsw = <0x3>; + + wlf,gpio-defaults = < + ARIZONA_GP_FN_TXLRCLK + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + >; + + wlf,max-channels-clocked = <2 0 0>; +}; diff --git a/Documentation/devicetree/bindings/power/qpnp-linear-charger.txt b/Documentation/devicetree/bindings/power/qpnp-linear-charger.txt index 3e2560bfdde..bb008faccca 100644 --- a/Documentation/devicetree/bindings/power/qpnp-linear-charger.txt +++ b/Documentation/devicetree/bindings/power/qpnp-linear-charger.txt @@ -19,6 +19,11 @@ Parent node required properties: - qcom,vddsafe-mv: Maximum Vdd voltage in mV. - qcom,vinmin-mv: Minimum input voltage in mV. - qcom,ibatsafe-ma: Safety battery current setting +<<<<<<< HEAD +======= +- qcom,usbin-ovp-irq: External IC irq to trigger over + voltage when insert charger. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed Parent node optional properties: - qcom,vbatweak-uv: Weak battery voltage threshold in uV, @@ -42,6 +47,11 @@ Parent node optional properties: voltage. - qcom,cool-bat-mv: Cool temperature battery target voltage. +<<<<<<< HEAD +======= +- qcom,cfg-current-limited: Limited charge current not to exceed + this value. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed - qcom,thermal-mitigation: Array of ibatmax values for different system thermal mitigation level. - qcom,tchg-mins: Maximum total software initialized @@ -166,6 +176,10 @@ Example: qcom,cool-bat-mv = <4100>; qcom,ibatmax-warm-ma = <360>; qcom,ibatmax-cool-ma = <360>; +<<<<<<< HEAD +======= + qcom,cfg-current-limited = <900>; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,warm-bat-mv = <4100>; qcom,batt-hot-percentage = <25>; qcom,batt-cold-percentage = <85>; @@ -173,6 +187,10 @@ Example: qcom,resume-soc = <99>; qcom,btc-disabled = <0>; qcom,chg-vadc = <&pm8916_vadc>; +<<<<<<< HEAD +======= + qcom,usbin-ovp-irq = <&msm_gpio 110 0>; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,chgr@1000 { reg = <0x1000 0x100>; diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index a0d4e6d89fd..d2b0e8697a5 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -78,6 +78,10 @@ st STMicroelectronics ste ST-Ericsson stericsson ST-Ericsson synaptics Synaptics Inc. +<<<<<<< HEAD +======= +himax Himax, Inc. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ti Texas Instruments toshiba Toshiba Corporation via VIA Technologies, Inc. diff --git a/Documentation/sound/alsa/soc/wolfson-arizona.txt b/Documentation/sound/alsa/soc/wolfson-arizona.txt new file mode 100644 index 00000000000..f8195db8642 --- /dev/null +++ b/Documentation/sound/alsa/soc/wolfson-arizona.txt @@ -0,0 +1,195 @@ +This document lists the features of the Cirrus Logic / Wolfson Microelectronics +'Arizona' class SmartCodecs that are supported by the kernel drivers. +Note that some features are covered by other classes of driver (extcon, +regulator, etc.), the list below shows the full set of features related +to sound: + +'-' means not relevant for that audio hub model + + WM8280 +Feature WM8997 WM8998 WM5102 WM8281 CS47L24 CS47L85 CS47L35 +---------------------------------------------------------------------------------------------- +32-bit samples Y Y Y Y Y Y Y +24-bit samples Y Y Y Y Y Y Y +192kHz sample rate Y Y Y Y Y Y Y +Routing controlled via ALSA controls Y Y Y Y Y Y Y +Volume control on all mixer inputs Y Y Y Y Y Y Y +Volume control on all outputs Y Y Y Y Y Y Y +Mute control on all outputs Y Y Y Y Y Y Y +Output DRE control - Y Y Y - Y Y +Output OSR control Y - Y Y Y Y N +Input ramp control Y Y Y Y Y Y Y +Output ramp control Y Y Y Y Y Y Y +Route any audio input to any mixer input Y Y Y Y Y Y Y +Route internal signals to mixer inputs Y Y Y Y Y Y Y +Route audio path through ISRC Y Y Y Y Y Y Y +Route audio path through ASRC - Y Y Y Y Y - +Route audio path through EQs Y Y Y Y Y Y Y +Route audio path through LHPFs Y Y Y Y Y Y Y +Route audio path through DRCs Y Y Y Y Y Y Y +Route audio path through ADSP cores - - Y Y Y Y Y +Set EQ coefficient through ALSA controls Y Y Y Y Y Y Y +Set LHPF coeffs through ALSA controls Y Y Y Y Y Y Y +Set DRC coefficient through ALSA controls Y Y Y Y Y Y Y +Set Noise Gates through ALSA controls Y Y Y Y Y Y Y +Config inputs analogue/digital mode [note 1] Y Y Y Y - Y Y +Input HPF control - Y - Y Y Y Y +Input mux controls [note 8] - Y - - - Y Y +Config analogue inputs as single-ended + or differential [note 1] Y Y Y Y - Y Y +Host I2S routing to any AIF Y Y Y Y Y Y Y +I2S TDM (multi-channel) [note 2] Y Y Y Y Y Y Y +Configure TDM active slots [note 2] Y Y Y Y Y Y Y +Configure TDM slot size [note 2] Y Y Y Y Y Y Y +AEC loopback control Y Y Y Y Y Y Y +ANC block control - - - Y - Y - +Select firmware by ALSA control [note 6] - - Y Y Y Y Y +Load ADSP firmware via DAPM power-up - - Y Y Y Y Y +Load tuning data (.bin) with firmware - - Y Y Y Y Y +Expose firmware controls via ALSA - - Y Y Y Y Y +Set sample-rate domain frequencies [note 4] Y Y Y Y Y Y Y +Auto sample-rate detection N N N N N N N +Codec control over SPI - - Y Y Y Y Y +Codec control over I2C Y Y Y Y - Y Y +DAPM-based power up/down Y Y Y Y Y Y Y +Jack insert detection Y Y Y Y - Y Y +Headset mic detection Y Y Y Y - Y Y +Headset button detection Y Y Y Y - Y Y +Headphone speaker impedance detection Y Y Y Y - Y Y +Codec internal LDOVDD regulator control Y Y Y Y - Y - +Support for external DCVDD regulator Y Y Y Y Y Y Y +Build as loadable module Y Y Y Y Y Y Y +Configure via pdata Y Y Y Y Y Y Y +Configure via device tree [note 7] Y Y Y Y Y Y Y +Configure via ACPI N N N N N N N +Configure SYSCLK rate [note 5] Y Y Y Y Y Y Y +Configure ASYNCCLK rate [note 5] Y Y Y Y Y Y - +Configure analogue mic bias [note 1] Y Y Y Y - Y Y +Configure mapping of headset button + resistance to key event [note 1] Y Y Y Y - Y Y +Configure available firmwares [note 3] - - Y Y Y Y Y +Support SoundClear Control - - N Y Y Y Y + +Notes: +1. Integration-time configuration. Not possible to change at runtime +2. TDM is only possible if host I2S controller and I2S driver support TDM + The set_tdm_slot() function is implemented to enable configuration of the + slot size and which slots the codec will use. Codec channels are mapped in + ascending order to the active slots - for example if the active TX slots in + the I2S frame are 0, 1, and 7 then they will be mapped + 0->AIFTX1 1->AIFTX2 7->AIFTX3 +3. Default firmware list can be overidden by device tree +4. Limited control of domain 2/3 frequency +5. Configured in ASoC machine driver +6. Firmware can be set by host but cannot be changed while ADSP is powered-up, + it must be removed from an active path to power-down and the new + firmware will be loaded when it is next powered-up as part of an + active path +7. Configuration from device tree is work-in-progress so there may be some + pdata settings that have not yet been migrated to device tree +8. See below for a description of the input mux routing. + + +INPUT MUXES +=========== +Some SmartCodecs have input paths with input muxes to select between two +possible external input sources for that path. + +For example on the WM8998: + - The IN1 path can be selected between IN1A or IN1B pins. The left and right + channels have separate mux controls + - The IN2 path can be selected between IN2A or IN2B and is mono + +A diagram of the route through the input muxes on the WM8998 is shown below +(the other SmartCodecs with input muxes are similar): + +Input pin ALSA control Internal signal path +------------------------------------------------------- + + +------------+ +IN1AL ---> "A" | | + | "IN1L Mux" | --> IN1L +IN1BL ---> "B" | | + +------------+ + + +------------+ +IN1AR ---> "A" | | + | "IN1R Mux" | --> IN1R +IN1BR ---> "B" | | + +------------+ + + +------------+ +IN2A ---> "A" | | + | "IN2 Mux" | --> IN2L +IN2B ---> "B" | | + +------------+ + + +WM8998 input muxes +------------------ +IN1A and IN2A can be set as digital. IN1B and IN2B are analogue only. + +It is important to note that although the left and right paths of IN1 have +separate mux controls, these are only separate for analogue paths. The setting +of digital/analogue applies jointly to both channels of IN1. Because of this, +if IN1A is digital _both_ the left and right mux are ganged together and +changing the mux on one channel will automatically change the other. + +The input mode pdata for WM8998 is defined as: + + pdata affects legal values behaviour + inmode[0] IN1 ARIZONA_INMODE_DIFF (0) IN1A and IN1B analogue differential + ARIZONA_INMODE_SE (1) IN1A and IN1B analogue single-ended + ARIZONA_INMODE_DMIC (2) IN1A digital, IN1B analogue differential + ARIZONA_INMODE_DMIC | + ARIZONA_INMODE_SE (3) IN1A digital, IN1B analogue single-ended + + inmode[1] IN2 ARIZONA_INMODE_DIFF (0) IN2A and IN2B analogue differential + ARIZONA_INMODE_SE (1) IN2A and IN2B analogue single-ended + ARIZONA_INMODE_DMIC (2) IN2A digital, IN2B analogue differential + ARIZONA_INMODE_DMIC | + ARIZONA_INMODE_SE (3) IN2A digital, IN2B analogue single-ended + +How firmwares are loaded +======================== +The driver exposes an ALSA control to set the firmware for each ADSP on the +codec. These are named: + + DSP1 Firmware + DSP2 Firmware + ... etc. + +The control is an enumeration of the available firmwares by function. It does +not directly set the actual filename of the firmware to be loaded. The mapping +between control values and actual firmware filename can be found in the file +sound/soc/codecs/wm_adsp.c + +Setting this control tells the driver what firmware to load WHEN THE ADSP IS +NEXT POWERED UP. Setting the control does not force the firmware to be loaded +immediately, nor does it reboot the ADSP if it is currently running a different +firmware. + +To load a firmware, or to reboot the ADSP with different firmware you must: + - Disconnect the ADSP from any active audio path so that it will be powered-down + - Set the firmware control to the firmware you want to load + - Connect the ADSP to an active audio path so it will be powered-up + +Firmware files can have an associated file called a "bin file". This has the +same name as the firmware file, but with the extension .bin, and goes in the +same directory as the firmware file. The bin file contains settings to be +patched in the ADSP memory after the firmware has been loaded. When the driver +loads a firmware it will look for a bin file and if found will apply the patches +from that bin file. + +The purpose of the bin file is to allow tuning data to be applied to the firmware +without the need to rebuild the firmware to include this data. For example, +some audio algorithms must be tuned to the acoustic properties of the enclosure +the microphones or speakers are in - it would be impractical to build a new +firmware for each device with its unique parameters; instead the device is tuned +and the tuning data is put into the bin file. + +The bin file is not intended for setting parameters that are runtime-modifiable, +such as volume controls, since the bin file is a one-shot set of parameters +that are patched when the firmware is loaded. Runtime modifiable controls should +be exposed by the firmware as such and the driver will create ALSA controls for +them. diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt index 88152f214f4..608b0a65992 100644 --- a/Documentation/sysctl/fs.txt +++ b/Documentation/sysctl/fs.txt @@ -32,6 +32,11 @@ Currently, these files are in /proc/sys/fs: - nr_open - overflowuid - overflowgid +<<<<<<< HEAD +======= +- pipe-user-pages-hard +- pipe-user-pages-soft +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed - protected_hardlinks - protected_symlinks - suid_dumpable @@ -159,6 +164,30 @@ The default is 65534. ============================================================== +<<<<<<< HEAD +======= +pipe-user-pages-hard: + +Maximum total number of pages a non-privileged user may allocate for pipes. +Once this limit is reached, no new pipes may be allocated until usage goes +below the limit again. When set to 0, no limit is applied, which is the default +setting. + +============================================================== + +pipe-user-pages-soft: + +Maximum total number of pages a non-privileged user may allocate for pipes +before the pipe size gets limited to a single page. Once this limit is reached, +new pipes will be limited to a single page in size for this user in order to +limit total memory usage, and trying to increase them using fcntl() will be +denied until usage goes below the limit again. The default value allows to +allocate up to 1024 pipes at their default size. When set to 0, no limit is +applied. + +============================================================== + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed protected_hardlinks: A long-standing class of security issues is the hardlink-based diff --git a/android/configs/android-base.cfg b/android/configs/android-base.cfg index 5b888487ede..5ac35c6770a 100644 --- a/android/configs/android-base.cfg +++ b/android/configs/android-base.cfg @@ -1,12 +1,27 @@ # KEEP ALPHABETICALLY SORTED +<<<<<<< HEAD # CONFIG_INET_LRO is not set # CONFIG_MODULES is not set # CONFIG_OABI_COMPAT is not set +======= +# CONFIG_DEVKMEM is not set +# CONFIG_DEVMEM is not set +# CONFIG_INET_LRO is not set +# CONFIG_MODULES is not set +# CONFIG_OABI_COMPAT is not set +# CONFIG_SYSVIPC is not set +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_ANDROID=y CONFIG_ANDROID_BINDER_IPC=y CONFIG_ANDROID_INTF_ALARM_DEV=y CONFIG_ANDROID_LOW_MEMORY_KILLER=y +<<<<<<< HEAD +CONFIG_ASHMEM=y +======= +CONFIG_ARMV7_COMPAT=y CONFIG_ASHMEM=y +CONFIG_AUDIT=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_BLK_DEV_DM=y CONFIG_BLK_DEV_INITRD=y CONFIG_CGROUPS=y @@ -24,6 +39,10 @@ CONFIG_INET6_ESP=y CONFIG_INET6_IPCOMP=y CONFIG_INET=y CONFIG_INET_ESP=y +<<<<<<< HEAD +======= +CONFIG_INET_XFRM_MODE_TUNNEL=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_IP6_NF_FILTER=y CONFIG_IP6_NF_IPTABLES=y CONFIG_IP6_NF_MANGLE=y @@ -48,6 +67,10 @@ CONFIG_IP_NF_MATCH_AH=y CONFIG_IP_NF_MATCH_ECN=y CONFIG_IP_NF_MATCH_TTL=y CONFIG_IP_NF_RAW=y +<<<<<<< HEAD +======= +CONFIG_IP_NF_SECURITY=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_NETMAP=y CONFIG_IP_NF_TARGET_REDIRECT=y @@ -82,10 +105,18 @@ CONFIG_NETFILTER_XT_MATCH_TIME=y CONFIG_NETFILTER_XT_MATCH_U32=y CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y CONFIG_NETFILTER_XT_TARGET_CONNMARK=y +<<<<<<< HEAD +======= +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y CONFIG_NETFILTER_XT_TARGET_MARK=y CONFIG_NETFILTER_XT_TARGET_NFLOG=y CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y +<<<<<<< HEAD +======= +CONFIG_NETFILTER_XT_TARGET_SECMARK=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_NETFILTER_XT_TARGET_TCPMSS=y CONFIG_NETFILTER_XT_TARGET_TPROXY=y CONFIG_NETFILTER_XT_TARGET_TRACE=y @@ -107,6 +138,10 @@ CONFIG_NF_CONNTRACK_IRC=y CONFIG_NF_CONNTRACK_NETBIOS_NS=y CONFIG_NF_CONNTRACK_PPTP=y CONFIG_NF_CONNTRACK_SANE=y +<<<<<<< HEAD +======= +CONFIG_NF_CONNTRACK_SECMARK=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_NF_CONNTRACK_TFTP=y CONFIG_NF_CT_NETLINK=y CONFIG_NF_CT_PROTO_DCCP=y @@ -127,10 +162,21 @@ CONFIG_PREEMPT=y CONFIG_RESOURCE_COUNTERS=y CONFIG_RTC_CLASS=y CONFIG_RT_GROUP_SCHED=y +<<<<<<< HEAD CONFIG_STAGING=y CONFIG_SWITCH=y CONFIG_SYNC=y CONFIG_SYSVIPC=y +======= +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK=y +CONFIG_SECURITY_SELINUX=y +CONFIG_SND=y +CONFIG_SOUND=y +CONFIG_STAGING=y +CONFIG_SWITCH=y +CONFIG_SYNC=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_TUN=y CONFIG_UNIX=y CONFIG_USB_GADGET=y diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 27fe6a93395..0b7b76c2820 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1728,6 +1728,22 @@ config OABI_COMPAT UNPREDICTABLE (in fact it can be predicted that it won't work at all). If in doubt say Y. +<<<<<<< HEAD +======= +config 4KSTACKS + bool "Use 4K kernel stacks instead of 8K" + default n + help + This option will use less memory for each kernel stack in the + system, which can save potentially hundreds of kilobytes of memory. + It also helps reduce fragmentation in kernel memory. However, + it can be dangerous since not all kernel code paths are thrifty + in their use of the stack. Unless you have carefully monitored your + kernel stack usage and verified that your programs and kernel + usage patterns will not overflow 4K, you should leave this set + to N. + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed config ARCH_HAS_HOLES_MEMORYMODEL bool diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile index 99cc7c4bebd..8b650bacd87 100755 --- a/arch/arm/boot/dts/qcom/Makefile +++ b/arch/arm/boot/dts/qcom/Makefile @@ -53,6 +53,10 @@ dtb-$(CONFIG_ARCH_MSM8909) += msm8909-sim.dtb \ msm8909-pm8916-qhd-rcm.dtb \ msm8909-pm8916-qrd-skut-evt.dtb \ msm8909-pm8916-qrd-skut-dvt.dtb \ +<<<<<<< HEAD +======= + msm8909-pm8916-qrd-skuq.dtb \ +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed msm8208-cdp.dtb \ msm8208-mtp.dtb \ msm8208-1gb-cdp.dtb \ @@ -77,6 +81,22 @@ dtb-$(CONFIG_ARCH_MSM8909) += msm8909-sim.dtb \ apq8009-mtp-wcd9326-refboard.dtb \ apq8009-512mb-mtp-wcd9326-refboard.dtb +<<<<<<< HEAD +======= +ifeq ($(CONFIG_MACH_CKT_MSM8939),y) +dtb-$(CONFIG_ARCH_MSM8916) += msm8939-spirit.dtb +else ifeq ($(CONFIG_MACH_HAIER_MSM8916),y) +dtb-$(CONFIG_ARCH_MSM8916) += msm8916-g36c1h.dtb +else ifeq ($(CONFIG_MACH_LONGCHEER_MSM8916),y) +dtb-$(CONFIG_ARCH_MSM8916) += msm8916-qrd-l8150.dtb +else ifeq ($(CONFIG_MACH_HUAQIN_MSM8916),y) +dtb-$(CONFIG_ARCH_MSM8916) += msm8916-ql790.dtb +else ifeq ($(CONFIG_MACH_WINGTECH_MSM8916),y) +dtb-$(CONFIG_ARCH_MSM8916) += msm8916-t86519a1.dtb +else ifeq ($(CONFIG_MACH_YULONG_MSM8939),y) +dtb-$(CONFIG_ARCH_MSM8916) += msm8939-cp8675-i01-p0.dtb +else +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dtb-$(CONFIG_ARCH_MSM8916) += msm8916-cdp.dtb \ msm8916-cdp-smb1360.dtb \ msm8916-mtp.dtb \ @@ -123,9 +143,14 @@ dtb-$(CONFIG_ARCH_MSM8916) += msm8916-cdp.dtb \ msm8929-mtp-wcd9306-smb1360.dtb \ msm8929-qrd-skul.dtb \ msm8929-qrd-skulb.dtb \ +<<<<<<< HEAD msm8929-cdp-jdi.dtb \ test01a-msm8939-qrd-skuk.dtb \ test01a-msm8939-v3.0-qrd-skuk.dtb \ +======= + msm8929-cdp-jdi.dtb +endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dtb-$(CONFIG_ARCH_MSM8226) += msm8226-sim.dtb \ msm8226-fluid.dtb \ diff --git a/arch/arm/boot/dts/qcom/apq8084-ion.dtsi b/arch/arm/boot/dts/qcom/apq8084-ion.dtsi index bd649fe3926..5a62ebc476a 100644 --- a/arch/arm/boot/dts/qcom/apq8084-ion.dtsi +++ b/arch/arm/boot/dts/qcom/apq8084-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2013-2014,2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,ion-heap@8 { /* CP_MM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <8>; diff --git a/arch/arm/boot/dts/qcom/batterydata-qrd-skuq-4v35-2500mah.dtsi b/arch/arm/boot/dts/qcom/batterydata-qrd-skuq-4v35-2500mah.dtsi new file mode 100644 index 00000000000..6da521b95fb --- /dev/null +++ b/arch/arm/boot/dts/qcom/batterydata-qrd-skuq-4v35-2500mah.dtsi @@ -0,0 +1,118 @@ +/* Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +*/ + +qcom,8909-QSIP-batterydata { + qcom,battery-type = "8909_QSIP"; + qcom,batt-id-kohm = <0>; + qcom,chg-term-ua = <100000>; + qcom,default-rbatt-mohm = <156>; + qcom,fcc-mah = <2500>; + qcom,max-voltage-uv = <4350000>; + qcom,rbatt-capacitive-mohm = <50>; + qcom,v-cutoff-uv = <3400000>; + + qcom,fcc-temp-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-data = <2462 2461 2462 2460 2455>; + }; + + qcom,ibat-acc-lut { + qcom,lut-col-legend = <(-20) 0 25>; + qcom,lut-row-legend = <0 250 500 1000>; + qcom,lut-data = <2413 2437 2437>, + <70 2231 2432>, + <6 1782 2405>, + <6 1002 2354>; + }; + + qcom,pc-temp-ocv-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <4325 4321 4315 4309 4299>, + <4200 4227 4232 4230 4226>, + <4129 4169 4176 4175 4171>, + <4081 4114 4124 4123 4120>, + <3994 4070 4076 4074 4071>, + <3939 3999 4025 4027 4026>, + <3900 3945 3979 3987 3985>, + <3864 3916 3945 3950 3947>, + <3831 3884 3901 3911 3910>, + <3807 3852 3865 3867 3866>, + <3787 3824 3837 3837 3836>, + <3770 3798 3815 3815 3814>, + <3754 3776 3797 3798 3796>, + <3736 3762 3781 3783 3782>, + <3719 3750 3766 3767 3762>, + <3701 3740 3753 3748 3737>, + <3679 3728 3736 3730 3716>, + <3658 3717 3718 3711 3697>, + <3638 3707 3701 3693 3680>, + <3621 3699 3692 3683 3671>, + <3612 3693 3690 3682 3670>, + <3603 3687 3688 3680 3668>, + <3591 3679 3685 3678 3667>, + <3577 3670 3682 3676 3663>, + <3560 3656 3675 3668 3651>, + <3538 3634 3654 3644 3621>, + <3509 3601 3613 3600 3574>, + <3470 3552 3554 3541 3512>, + <3412 3477 3472 3458 3425>, + <3297 3341 3342 3328 3288>, + <3000 3000 3000 3000 3000>; + }; + + qcom,rbatt-sf-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>; + qcom,lut-data = <1542 379 100 73 64>, + <1542 379 100 73 64>, + <1444 381 103 75 65>, + <1393 375 107 77 66>, + <1296 379 113 81 68>, + <1265 365 117 83 70>, + <1256 352 124 89 73>, + <1252 356 123 94 76>, + <1252 352 109 95 79>, + <1268 349 102 79 69>, + <1291 348 100 75 66>, + <1322 349 102 77 67>, + <1361 349 106 80 70>, + <1407 358 109 83 73>, + <1463 372 108 84 71>, + <1527 392 108 79 68>, + <1601 424 108 79 68>, + <1671 455 108 79 68>, + <1797 481 105 77 67>, + <1905 496 104 76 66>, + <1948 499 106 78 68>, + <1841 472 109 80 70>, + <1851 459 112 82 72>, + <2015 473 117 85 74>, + <2217 485 122 87 73>, + <2488 498 119 84 69>, + <2879 515 114 81 69>, + <3471 542 115 83 71>, + <4550 587 122 87 77>, + <8603 724 163 125 153>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-BB.dtsi b/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-BB.dtsi new file mode 100644 index 00000000000..3d3a14dbced --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-BB.dtsi @@ -0,0 +1,114 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* manufacturer is �ȿ˵�� */ + +qcom,CPLD-312-BB-data { + qcom,fcc-mah = <2500>; + qcom,default-rbatt-mohm = <221>; + qcom,rbatt-capacitive-mohm = <0>; + qcom,flat-ocv-threshold-uv = <3800000>; + qcom,max-voltage-uv = <4350000>; + qcom,v-cutoff-uv = <3400000>; + qcom,chg-term-ua = <100000>; + qcom,batt-id-kohm = <47>; + qcom,battery-type = "CPLD-312-BB"; + + qcom,rbatt-sf-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <655 191 100 92 88>, + <836 204 102 93 88>, + <819 203 101 93 88>, + <815 210 104 94 89>, + <752 220 107 96 90>, + <725 205 109 98 91>, + <717 197 113 100 94>, + <713 193 112 102 95>, + <717 191 105 96 91>, + <730 192 102 93 89>, + <751 194 101 93 90>, + <781 198 103 94 90>, + <821 206 104 96 92>, + <874 219 104 96 93>, + <943 236 104 94 90>, + <1030 262 103 93 89>, + <1145 307 104 93 89>, + <1338 376 104 94 90>, + <1657 445 103 94 90>, + <1925 505 107 95 91>, + <2114 535 109 97 92>, + <2320 565 112 99 93>, + <2549 595 114 100 94>, + <2819 593 115 100 94>, + <3038 604 113 98 91>, + <3294 607 111 97 92>, + <3809 623 114 99 93>, + <4900 681 120 102 96>, + <7216 794 130 108 101>, + <13329 1548 162 128 113>, + <24329 22630 9610 8180 1644>; + }; + + qcom,fcc-temp-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-data = <2578 2580 2590 2584 2573>; + }; + + qcom,pc-temp-ocv-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <4295 4287 4293 4289 4285>, + <4208 4216 4229 4228 4224>, + <4129 4156 4173 4173 4169>, + <4075 4103 4120 4120 4117>, + <3991 4050 4072 4070 4067>, + <3933 3982 4021 4022 4021>, + <3891 3933 3978 3980 3978>, + <3853 3894 3933 3936 3935>, + <3824 3859 3888 3889 3889>, + <3802 3830 3853 3854 3854>, + <3785 3807 3827 3828 3827>, + <3770 3790 3806 3807 3806>, + <3756 3778 3788 3789 3788>, + <3741 3769 3774 3773 3770>, + <3725 3757 3760 3755 3747>, + <3707 3738 3744 3736 3724>, + <3684 3712 3723 3715 3703>, + <3660 3694 3701 3693 3682>, + <3634 3680 3683 3677 3667>, + <3612 3671 3679 3673 3663>, + <3596 3663 3677 3671 3662>, + <3580 3654 3674 3669 3659>, + <3560 3644 3670 3665 3655>, + <3536 3626 3662 3657 3646>, + <3508 3600 3642 3635 3621>, + <3475 3565 3605 3598 3582>, + <3430 3519 3556 3549 3533>, + <3370 3457 3494 3487 3471>, + <3288 3374 3412 3405 3390>, + <3182 3255 3289 3279 3266>, + <3000 3000 3000 3000 3000>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-CC.dtsi b/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-CC.dtsi new file mode 100644 index 00000000000..51c7239b492 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-CC.dtsi @@ -0,0 +1,108 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* manufacturer is ���� */ + +qcom,CPLD-312-CC-data { + qcom,fcc-mah = <2500>; + qcom,default-rbatt-mohm = <189>; + qcom,rbatt-capacitive-mohm = <0>; + qcom,flat-ocv-threshold-uv = <3800000>; + qcom,max-voltage-uv = <4350000>; + qcom,v-cutoff-uv = <3400000>; + qcom,chg-term-ua = <100000>; + qcom,batt-id-kohm = <1>; + qcom,battery-type = "CPLD-312-CC"; + + qcom,rbatt-sf-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 15 10 9>, + <8 7 6 5 4>, + <3 2 1 0>; + qcom,lut-data = <1132 292 100 81 77>, + <1129 293 100 81 77>, + <1021 300 100 82 78>, + <958 300 102 83 78>, + <915 305 104 84 79>, + <826 303 110 87 81>, + <811 270 110 89 83>, + <801 277 108 91 83>, + <802 275 99 84 79>, + <819 276 98 82 78>, + <841 280 98 82 79>, + <867 293 99 83 79>, + <894 311 101 84 80>, + <923 333 102 85 81>, + <959 359 100 83 79>, + <1001 389 100 82 78>, + <1054 426 101 83 79>, + <1132 492 102 83 79>, + <1107 496 103 84 81>, + <1152 513 105 86 83>, + <1201 534 106 87 83>, + <1264 556 107 87 80>, + <1367 586 106 86 81>, + <1595 625 107 86 82>, + <1925 683 109 87 84>, + <2422 771 114 89 88>, + <3339 902 122 95 110>, + <6239 1385 148 112 2788>, + <68439 37753 18795 40357 35346>; + }; + + qcom,fcc-temp-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-data = <2578 2580 2590 2584 2573>; + }; + + qcom,pc-temp-ocv-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 15 10 9>, + <8 7 6 5 4>, + <3 2 1 0>; + qcom,lut-data = <4331 4325 4319 4324 4314>, + <4226 4252 4257 4262 4256>, + <4156 4193 4201 4205 4200>, + <4103 4138 4146 4150 4144>, + <4052 4088 4094 4097 4091>, + <3962 4031 4050 4048 4041>, + <3913 3952 3983 3996 3994>, + <3871 3915 3942 3951 3947>, + <3838 3880 3897 3901 3898>, + <3816 3847 3864 3865 3863>, + <3800 3819 3837 3838 3836>, + <3784 3800 3815 3816 3813>, + <3770 3784 3797 3797 3794>, + <3755 3770 3779 3780 3774>, + <3740 3757 3762 3759 3747>, + <3723 3741 3746 3739 3724>, + <3702 3721 3728 3720 3704>, + <3673 3703 3705 3696 3682>, + <3633 3683 3686 3679 3666>, + <3620 3676 3684 3677 3663>, + <3607 3666 3680 3674 3656>, + <3589 3650 3671 3667 3633>, + <3567 3629 3649 3647 3599>, + <3540 3598 3612 3611 3555>, + <3507 3558 3566 3566 3499>, + <3463 3504 3508 3508 3426>, + <3399 3426 3430 3430 3325>, + <3289 3300 3313 3312 3190>, + <3000 3000 3000 3000 3000>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-LS.dtsi b/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-LS.dtsi new file mode 100644 index 00000000000..a2a9fb19398 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-LS.dtsi @@ -0,0 +1,114 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* manufacturer is ��������عɷ����޹�˾ */ + +qcom,CPLD-312-LS-data { + qcom,fcc-mah = <2500>; + qcom,default-rbatt-mohm = <221>; + qcom,rbatt-capacitive-mohm = <0>; + qcom,flat-ocv-threshold-uv = <3800000>; + qcom,max-voltage-uv = <4350000>; + qcom,v-cutoff-uv = <3400000>; + qcom,chg-term-ua = <100000>; + qcom,batt-id-kohm = <220>; + qcom,battery-type = "CPLD-312-LS"; + + qcom,rbatt-sf-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <690 289 100 81 74>, + <689 288 100 80 74>, + <657 280 101 82 75>, + <626 272 103 84 76>, + <621 266 104 86 77>, + <578 261 108 89 78>, + <562 245 112 91 80>, + <564 243 117 96 83>, + <561 247 109 93 85>, + <567 255 104 84 80>, + <592 268 107 83 76>, + <628 289 111 85 77>, + <672 317 116 88 79>, + <719 349 121 90 81>, + <763 386 128 90 80>, + <811 433 135 89 78>, + <867 485 143 89 78>, + <922 520 152 91 78>, + <940 566 161 90 78>, + <965 620 167 92 78>, + <1002 651 173 94 80>, + <1046 688 180 96 80>, + <1096 728 190 99 82>, + <1190 772 198 100 83>, + <1384 820 207 100 83>, + <1707 871 214 100 81>, + <2193 948 228 103 83>, + <3022 1109 249 109 85>, + <4621 1409 278 123 95>, + <11415 2907 471 217 152>, + <69815 17735 15567 14532 14463>; + }; + + qcom,fcc-temp-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-data = <2578 2580 2590 2584 2573>; + }; + + qcom,pc-temp-ocv-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <4317 4350 4296 4339 4335>, + <4227 4267 4229 4279 4276>, + <4159 4204 4174 4223 4219>, + <4091 4146 4122 4168 4163>, + <4046 4091 4073 4114 4109>, + <3973 4036 4027 4064 4058>, + <3919 3972 3984 4016 4011>, + <3879 3926 3943 3972 3968>, + <3841 3886 3893 3923 3924>, + <3811 3852 3854 3877 3878>, + <3795 3824 3827 3845 3843>, + <3781 3803 3806 3821 3818>, + <3767 3789 3788 3799 3798>, + <3753 3776 3774 3781 3780>, + <3739 3762 3763 3763 3760>, + <3725 3746 3748 3744 3735>, + <3708 3723 3725 3723 3713>, + <3691 3700 3698 3698 3689>, + <3676 3686 3678 3677 3668>, + <3663 3679 3673 3674 3664>, + <3654 3675 3671 3673 3663>, + <3643 3671 3669 3671 3661>, + <3630 3667 3666 3668 3660>, + <3613 3659 3660 3662 3655>, + <3592 3645 3647 3646 3643>, + <3564 3616 3614 3610 3608>, + <3528 3573 3565 3559 3558>, + <3476 3513 3500 3492 3493>, + <3394 3425 3414 3400 3406>, + <3257 3298 3290 3275 3278>, + <3000 3000 3000 3000 3000>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-MK.dtsi b/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-MK.dtsi new file mode 100644 index 00000000000..437976045ec --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-MK.dtsi @@ -0,0 +1,114 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* manufacturer is ��ݸ����������Դ���޹�˾ */ + +qcom,CPLD-312-MK-data { + qcom,fcc-mah = <2500>; + qcom,default-rbatt-mohm = <198>; + qcom,rbatt-capacitive-mohm = <0>; + qcom,flat-ocv-threshold-uv = <3800000>; + qcom,max-voltage-uv = <4350000>; + qcom,v-cutoff-uv = <3400000>; + qcom,chg-term-ua = <100000>; + qcom,batt-id-kohm = <100>; + qcom,battery-type = "CPLD-312-MK"; + + qcom,fcc-temp-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-data = <3030 3033 3037 3035 3031>; + }; + + qcom,rbatt-sf-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <770 214 100 83 79>, + <769 214 100 83 79>, + <734 219 101 86 80>, + <698 221 103 80 81>, + <693 218 107 81 82>, + <645 217 111 83 84>, + <628 203 115 86 87>, + <630 196 115 91 89>, + <626 196 104 91 90>, + <633 195 96 80 83>, + <661 196 96 77 81>, + <701 196 98 79 82>, + <751 197 100 81 84>, + <802 205 102 83 87>, + <852 219 103 82 85>, + <906 237 102 80 82>, + <968 254 103 80 83>, + <1029 275 102 80 83>, + <1049 281 98 77 81>, + <1077 303 101 78 82>, + <1119 318 104 80 83>, + <1167 340 108 82 85>, + <1223 364 112 84 87>, + <1328 395 115 86 88>, + <1544 435 114 87 87>, + <1906 489 113 85 84>, + <2447 586 118 84 85>, + <3373 748 128 87 89>, + <5158 1006 157 94 97>, + <12741 5614 4390 120 145>, + <77925 45169 44470 19375 16302>; + }; + + qcom,pc-temp-ocv-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <4317 4336 4329 4333 4328>, + <4227 4264 4264 4268 4263>, + <4159 4203 4206 4211 4206>, + <4091 4146 4150 4154 4151>, + <4046 4088 4098 4102 4098>, + <3973 4032 4049 4052 4048>, + <3919 3969 3998 4005 4003>, + <3879 3925 3953 3964 3961>, + <3841 3889 3904 3920 3918>, + <3811 3856 3865 3872 3871>, + <3795 3828 3836 3839 3839>, + <3781 3804 3813 3816 3815>, + <3767 3784 3794 3797 3796>, + <3753 3770 3778 3781 3779>, + <3739 3757 3764 3765 3758>, + <3725 3741 3749 3747 3734>, + <3708 3720 3730 3728 3714>, + <3691 3706 3704 3704 3690>, + <3676 3697 3685 3681 3669>, + <3663 3690 3680 3676 3665>, + <3654 3686 3679 3675 3664>, + <3643 3682 3677 3674 3662>, + <3630 3677 3674 3672 3660>, + <3613 3668 3667 3668 3656>, + <3592 3650 3647 3659 3642>, + <3564 3617 3606 3632 3607>, + <3528 3568 3549 3586 3556>, + <3476 3499 3474 3525 3493>, + <3394 3404 3370 3444 3408>, + <3257 3269 3246 3327 3281>, + <3000 3000 3000 3000 3000>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-TM.dtsi b/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-TM.dtsi new file mode 100644 index 00000000000..13f0c929d7d --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/batterydata-CPLD-351-TM.dtsi @@ -0,0 +1,114 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* manufacturer is ��ɽ��ó������޹�˾ */ + +qcom,CPLD-312-TM-data { + qcom,fcc-mah = <2500>; + qcom,default-rbatt-mohm = <177>; + qcom,rbatt-capacitive-mohm = <0>; + qcom,flat-ocv-threshold-uv = <3800000>; + qcom,max-voltage-uv = <4350000>; + qcom,v-cutoff-uv = <3400000>; + qcom,chg-term-ua = <100000>; + qcom,batt-id-kohm = <1000>; + qcom,battery-type = "CPLD-312-TM"; + + qcom,rbatt-sf-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <1097 243 100 88 85>, + <1094 243 100 88 85>, + <1000 242 100 89 86>, + <949 244 101 89 87>, + <911 240 103 91 87>, + <832 253 110 94 88>, + <832 216 110 96 90>, + <829 216 116 98 93>, + <833 218 104 93 90>, + <848 216 98 88 87>, + <867 219 98 89 87>, + <890 223 100 89 88>, + <916 229 102 91 88>, + <949 238 103 93 90>, + <989 250 103 92 88>, + <1041 262 102 89 88>, + <1104 275 103 90 88>, + <1160 294 104 90 88>, + <1193 310 103 90 87>, + <1167 321 103 90 88>, + <1201 330 105 91 89>, + <1235 342 106 92 89>, + <1275 356 109 93 90>, + <1316 367 111 94 90>, + <1379 379 110 92 89>, + <1550 394 110 93 89>, + <1809 420 113 94 90>, + <2225 454 119 98 94>, + <3528 510 132 111 100>, + <22458 5145 1517 1750 512>, + <120201 56027 44417 65354 36303>; + }; + + qcom,fcc-temp-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-data = <2578 2580 2590 2584 2573>; + }; + + qcom,pc-temp-ocv-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <4325 4328 4323 4317 4313>, + <4222 4253 4258 4255 4252>, + <4148 4195 4202 4199 4196>, + <4096 4142 4147 4145 4142>, + <4040 4090 4095 4092 4091>, + <3950 4043 4051 4045 4042>, + <3911 3960 3989 3994 3997>, + <3874 3922 3952 3954 3955>, + <3841 3890 3904 3906 3907>, + <3817 3857 3866 3866 3866>, + <3799 3830 3839 3839 3839>, + <3783 3806 3816 3816 3816>, + <3769 3787 3797 3798 3797>, + <3756 3772 3781 3781 3779>, + <3741 3759 3765 3762 3755>, + <3725 3744 3749 3741 3729>, + <3705 3725 3731 3721 3709>, + <3684 3711 3711 3702 3690>, + <3664 3702 3693 3684 3672>, + <3647 3696 3688 3680 3669>, + <3636 3692 3686 3679 3667>, + <3622 3687 3684 3677 3665>, + <3607 3679 3681 3673 3662>, + <3588 3665 3673 3664 3652>, + <3566 3644 3652 3641 3626>, + <3536 3611 3613 3601 3587>, + <3499 3568 3562 3549 3537>, + <3447 3508 3496 3483 3472>, + <3364 3419 3405 3392 3382>, + <3201 3253 3234 3218 3220>, + <3000 3000 3000 3000 3000>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/dsi-panel-hx8394a-lide-lg-hd-550-video.dtsi b/arch/arm/boot/dts/qcom/cp8675/dsi-panel-hx8394a-lide-lg-hd-550-video.dtsi new file mode 100644 index 00000000000..5cce76d1909 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/dsi-panel-hx8394a-lide-lg-hd-550-video.dtsi @@ -0,0 +1,152 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&mdss_mdp { + dsi_hx8394a_lide_lg_hd: qcom,mdss_dsi_hx8394a_lide_lg_hd_video { + qcom,cont-splash-enabled; + qcom,mdss-dsi-panel-name = "LCD_TYPE_HX8394A_LIDE_LG_HD_550"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <55>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <720>; + qcom,mdss-dsi-panel-height = <1280>; + qcom,mdss-dsi-h-front-porch = <86>; + qcom,mdss-dsi-h-back-porch = <100>; + qcom,mdss-dsi-h-pulse-width = <10>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <9>; + qcom,mdss-dsi-v-front-porch = <2>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-pixel-packing = <0>; + qcom,mdss-dsi-on-command = [ + 39 01 00 00 00 00 04 B9 FF 83 94 + 39 01 00 00 02 00 11 BA 13 02 00 16 C5 40 10 ff 0f 04 03 21 24 25 20 08 + 39 01 00 00 00 00 11 B1 01 00 04 86 01 11 11 31 39 29 29 47 02 01 E6 E2 + 39 01 00 00 00 00 17 B4 80 09 32 10 00 32 15 08 32 10 08 33 04 43 04 37 04 43 06 61 61 06 + 39 01 00 00 00 00 07 B2 00 C8 09 00 00 33 + 39 01 00 00 00 00 37 D5 00 00 00 00 0A 00 01 00 CC 00 00 00 88 88 88 88 99 88 88 88 AA BB 23 01 67 45 01 23 88 88 88 88 88 88 88 88 88 99 88 88 BB AA 54 76 10 32 32 10 88 88 88 88 3C 01 + 39 01 00 00 00 00 05 C7 00 10 00 10 + 39 01 00 00 00 00 02 CC 09 + 39 01 00 00 00 00 02 BC 07 + 39 01 00 00 00 00 03 C0 0C 17 + 39 01 00 00 00 00 80 C1 01 00 0A 16 1B 27 2E 35 3F 45 4F 56 60 66 6C 76 7C 82 8A 92 9C A4 A9 B2 BB C0 C8 CE D8 DE E7 F2 F9 FF 7A E7 D4 72 46 74 94 E1 C0 00 0A 16 1B 27 2E 35 3F 45 4F 56 60 66 6C 76 7C 82 8A 92 9C A4 A9 B2 BB C0 C8 CE D8 DE E7 F2 F9 FF 7A E7 D4 72 46 74 94 E1 C0 00 0A 16 1B 27 2E 35 3F 45 4F 56 60 66 6C 76 7C 82 8A 92 9C A4 A9 B2 BB C0 C8 CE D8 DE E7 F2 F9 FF 7A E7 D4 72 46 74 94 E1 C0 + 39 01 00 00 00 00 05 BF 06 00 10 04 + 39 01 00 00 00 00 02 B6 06 + 39 01 00 00 00 00 2B E0 01 12 18 3F 3F 3F 21 3F 06 0C 0D 10 12 10 12 0D 19 01 12 18 3F 3F 3F 21 3F 06 0C 0D 10 12 10 12 0D 19 0A 17 06 0E 0A 17 06 0E + 39 01 00 00 01 00 0C C9 0F 00 1E 1E 00 00 00 01 3E 00 00 + 39 01 00 00 00 00 02 51 00 + 39 01 00 00 00 00 02 53 24 + 39 01 00 00 00 00 02 B9 00 + 05 01 00 00 01 00 02 11 00 + 39 01 00 00 00 00 04 B9 FF 83 94 + 39 01 00 00 01 00 0A CA 2C 2C 2C 2B 2B 2B 2A 2A 20 + ]; + qcom,mdss-dsi-off-command = [ + 05 01 00 00 14 00 02 28 00 + 05 01 00 00 78 00 02 10 00 + ]; + cm,mdss-livedisplay-cabc-cmd = [ + 39 01 00 00 00 00 02 55 00 + ]; + cm,mdss-livedisplay-cabc-ui-value = <0x01>; + cm,mdss-livedisplay-cabc-image-value = <0x2>; + cm,mdss-livedisplay-cabc-video-value = <0x3>; + cm,mdss-livedisplay-color-enhance-on = [ + 39 01 00 00 00 00 04 B9 FF 83 94 + 39 01 00 00 00 00 02 E4 11 + 39 01 00 00 00 00 02 B9 00 + ]; + cm,mdss-livedisplay-color-enhance-off = [ + 39 01 00 00 00 00 04 B9 FF 83 94 + 39 01 00 00 00 00 02 E4 00 + 39 01 00 00 00 00 02 B9 00 + ]; + cm,mdss-livedisplay-post-cmd = [ + 05 01 00 00 10 00 02 29 00 + ]; + qcom,panel-backlight-response-curve = [ + 00 01 02 03 04 05 06 07 + 07 07 07 09 0A 0A 0B 0B + 0C 0C 0D 0D 0E 0E 0F 0F + 0F 0F 0F 10 10 10 10 11 + 11 11 11 12 12 12 12 13 + 13 13 13 14 14 14 15 15 + 15 16 16 16 17 18 18 19 + 1A 1B 1B 1C 1D 1D 1E 1F + 21 21 21 22 23 23 24 25 + 26 26 27 27 28 28 29 29 + 2A 2A 2B 2B 2C 2C 2D 2D + 2E 2E 2F 2F 30 30 31 31 + 31 32 32 33 33 33 34 34 + 34 35 37 38 3A 3B 3D 3E + 3F 40 41 42 43 44 45 46 + 47 48 49 4A 4B 4C 4D 4E + 4F 50 51 51 52 53 54 54 + 55 56 57 57 58 59 5A 5B + 5C 5E 5F 61 62 64 65 67 + 68 6A 6B 6C 6E 6F 71 72 + 74 75 77 78 7A 7B 7D 7E + 7F 81 82 84 85 87 89 8B + 8C 8D 8E 90 91 92 94 95 + 97 98 9A 9B 9D 9E A0 A1 + A3 A4 A5 A7 A8 AA AB AD + AE AF B1 B3 B4 B5 B7 B8 + BA BB BD BE BF C1 C4 C5 + C7 C8 C9 CA CB CD CE D0 + D1 D3 D4 D6 D7 D9 DA DB + DD DE E0 E1 E3 E4 E6 E7 + E9 EA EC ED EE F0 F1 F3 + F4 F6 F7 F9 FA FC FD FF + ]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_lp_mode"; + qcom,panel-alive-reg-content = [ + 09 04 80 73 04 00 + ]; + qcom,mdss-dsi-panel-status-command = [ + 39 01 00 00 00 00 04 B9 FF 83 94 + 39 01 00 00 02 00 0B BA 73 42 00 16 D5 40 10 00 00 24 + ]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-check-mode = "reg_read_yl"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "burst_mode"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [83 1F 17 00 30 2E 1C 21 26 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x20>; + qcom,mdss-dsi-t-clk-pre = <0x2C>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-reset-sequence = <1 10>, <0 2>, <1 10>; + qcom,mdss-pan-physical-width-dimension = <68>; + qcom,mdss-pan-physical-height-dimension = <121>; + qcom,has-tps65132; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/dsi-panel-nt35596-yashi-otp-id22-auo-fhd-550-video.dtsi b/arch/arm/boot/dts/qcom/cp8675/dsi-panel-nt35596-yashi-otp-id22-auo-fhd-550-video.dtsi new file mode 100644 index 00000000000..ff2c29ee957 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/dsi-panel-nt35596-yashi-otp-id22-auo-fhd-550-video.dtsi @@ -0,0 +1,308 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&mdss_mdp { + dsi_nt35596_yashi_otp_id22_auo_fhd: qcom,mdss_dsi_nt35596_yashi_otp_id22_auo_fhd_video { + qcom,cont-splash-enabled; + qcom,mdss-dsi-panel-name = "LCD_TYPE_1080P_3335505_2"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <96>; + qcom,mdss-dsi-h-back-porch = <46>; + qcom,mdss-dsi-h-pulse-width = <6>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-front-porch = <7>; + qcom,mdss-dsi-v-back-porch = <6>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-pixel-packing = <0>; + qcom,mdss-dsi-on-command = [ + 39 01 00 00 00 00 02 FF EE + 39 01 00 00 0A 00 02 18 40 + 39 01 00 00 14 00 02 18 00 + 39 01 00 00 00 00 02 24 4F + 39 01 00 00 00 00 02 38 C8 + 39 01 00 00 00 00 02 39 27 + 39 01 00 00 00 00 02 1E 77 + 39 01 00 00 00 00 02 1D 0F + 39 01 00 00 00 00 02 7E 71 + 39 01 00 00 00 00 02 7C 31 + 39 01 00 00 00 00 02 FF 01 + 39 01 00 00 00 00 02 00 01 + 39 01 00 00 00 00 02 01 55 + 39 01 00 00 00 00 02 02 40 + 39 01 00 00 00 00 02 05 40 + 39 01 00 00 00 00 02 06 4A + 39 01 00 00 00 00 02 07 24 + 39 01 00 00 00 00 02 08 0C + 39 01 00 00 00 00 02 0B 7D + 39 01 00 00 00 00 02 0C 7D + 39 01 00 00 00 00 02 0E B0 + 39 01 00 00 00 00 02 0F AE + 39 01 00 00 00 00 02 11 10 + 39 01 00 00 00 00 02 12 10 + 39 01 00 00 00 00 02 13 03 + 39 01 00 00 00 00 02 14 4A + 39 01 00 00 00 00 02 15 12 + 39 01 00 00 00 00 02 16 12 + 39 01 00 00 00 00 02 18 00 + 39 01 00 00 00 00 02 19 77 + 39 01 00 00 00 00 02 1A 55 + 39 01 00 00 00 00 02 1B 13 + 39 01 00 00 00 00 02 1C 00 + 39 01 00 00 00 00 02 1D 00 + 39 01 00 00 00 00 02 1E 13 + 39 01 00 00 00 00 02 1F 00 + 39 01 00 00 00 00 02 23 00 + 39 01 00 00 00 00 02 24 00 + 39 01 00 00 00 00 02 25 00 + 39 01 00 00 00 00 02 26 00 + 39 01 00 00 00 00 02 27 00 + 39 01 00 00 00 00 02 28 00 + 39 01 00 00 00 00 02 35 00 + 39 01 00 00 00 00 02 66 00 + 39 01 00 00 00 00 02 58 82 + 39 01 00 00 00 00 02 59 02 + 39 01 00 00 00 00 02 5A 02 + 39 01 00 00 00 00 02 5B 02 + 39 01 00 00 00 00 02 5C 82 + 39 01 00 00 00 00 02 5D 82 + 39 01 00 00 00 00 02 5E 02 + 39 01 00 00 00 00 02 5F 02 + 39 01 00 00 00 00 02 72 31 + 39 01 00 00 00 00 02 FF 05 + 39 01 00 00 00 00 02 00 01 + 39 01 00 00 00 00 02 01 0B + 39 01 00 00 00 00 02 02 0C + 39 01 00 00 00 00 02 03 09 + 39 01 00 00 00 00 02 04 0A + 39 01 00 00 00 00 02 05 00 + 39 01 00 00 00 00 02 06 0F + 39 01 00 00 00 00 02 07 10 + 39 01 00 00 00 00 02 08 00 + 39 01 00 00 00 00 02 09 00 + 39 01 00 00 00 00 02 0A 00 + 39 01 00 00 00 00 02 0B 00 + 39 01 00 00 00 00 02 0C 00 + 39 01 00 00 00 00 02 0D 13 + 39 01 00 00 00 00 02 0E 15 + 39 01 00 00 00 00 02 0F 17 + 39 01 00 00 00 00 02 10 01 + 39 01 00 00 00 00 02 11 0B + 39 01 00 00 00 00 02 12 0C + 39 01 00 00 00 00 02 13 09 + 39 01 00 00 00 00 02 14 0A + 39 01 00 00 00 00 02 15 00 + 39 01 00 00 00 00 02 16 0F + 39 01 00 00 00 00 02 17 10 + 39 01 00 00 00 00 02 18 00 + 39 01 00 00 00 00 02 19 00 + 39 01 00 00 00 00 02 1A 00 + 39 01 00 00 00 00 02 1B 00 + 39 01 00 00 00 00 02 1C 00 + 39 01 00 00 00 00 02 1D 13 + 39 01 00 00 00 00 02 1E 15 + 39 01 00 00 00 00 02 1F 17 + 39 01 00 00 00 00 02 20 00 + 39 01 00 00 00 00 02 21 03 + 39 01 00 00 00 00 02 22 01 + 39 01 00 00 00 00 02 23 40 + 39 01 00 00 00 00 02 24 40 + 39 01 00 00 00 00 02 25 ED + 39 01 00 00 00 00 02 29 58 + 39 01 00 00 00 00 02 2A 12 + 39 01 00 00 00 00 02 2B 01 + 39 01 00 00 00 00 02 4B 06 + 39 01 00 00 00 00 02 4C 11 + 39 01 00 00 00 00 02 4D 20 + 39 01 00 00 00 00 02 4E 02 + 39 01 00 00 00 00 02 4F 02 + 39 01 00 00 00 00 02 50 20 + 39 01 00 00 00 00 02 51 61 + 39 01 00 00 00 00 02 52 01 + 39 01 00 00 00 00 02 53 63 + 39 01 00 00 00 00 02 54 77 + 39 01 00 00 00 00 02 55 ED + 39 01 00 00 00 00 02 5B 00 + 39 01 00 00 00 00 02 5C 00 + 39 01 00 00 00 00 02 5D 00 + 39 01 00 00 00 00 02 5E 00 + 39 01 00 00 00 00 02 5F 15 + 39 01 00 00 00 00 02 60 75 + 39 01 00 00 00 00 02 61 00 + 39 01 00 00 00 00 02 62 00 + 39 01 00 00 00 00 02 63 00 + 39 01 00 00 00 00 02 64 00 + 39 01 00 00 00 00 02 65 00 + 39 01 00 00 00 00 02 66 00 + 39 01 00 00 00 00 02 67 00 + 39 01 00 00 00 00 02 68 04 + 39 01 00 00 00 00 02 69 00 + 39 01 00 00 00 00 02 6A 00 + 39 01 00 00 00 00 02 6C 40 + 39 01 00 00 00 00 02 75 01 + 39 01 00 00 00 00 02 76 01 + 39 01 00 00 00 00 02 7A 80 + 39 01 00 00 00 00 02 7B A3 + 39 01 00 00 00 00 02 7C D8 + 39 01 00 00 00 00 02 7D 60 + 39 01 00 00 00 00 02 7F 15 + 39 01 00 00 00 00 02 80 81 + 39 01 00 00 00 00 02 83 05 + 39 01 00 00 00 00 02 93 08 + 39 01 00 00 00 00 02 94 10 + 39 01 00 00 00 00 02 8A 00 + 39 01 00 00 00 00 02 9B 0F + 39 01 00 00 00 00 02 FF 04 + 39 01 00 00 00 00 02 07 20 + 39 01 00 00 00 00 02 08 06 + 39 01 00 00 00 00 02 FF 01 + 39 01 00 00 00 00 02 FF 02 + 39 01 00 00 00 00 02 FF 03 + 39 01 00 00 00 00 02 00 50 + 39 01 00 00 00 00 02 01 54 + 39 01 00 00 00 00 02 02 58 + 39 01 00 00 00 00 02 03 5C + 39 01 00 00 00 00 02 04 58 + 39 01 00 00 00 00 02 05 54 + 39 01 00 00 00 00 02 06 50 + 39 01 00 00 00 00 02 07 48 + 39 01 00 00 00 00 02 08 40 + 39 01 00 00 00 00 02 09 38 + 39 01 00 00 00 00 02 0A 30 + 39 01 00 00 00 00 02 0B 28 + 39 01 00 00 00 00 02 0C 28 + 39 01 00 00 00 00 02 0D 28 + 39 01 00 00 00 00 02 0E 28 + 39 01 00 00 00 00 02 0F 20 + 39 01 00 00 00 00 02 10 10 + 39 01 00 00 00 00 02 11 00 + 39 01 00 00 00 00 02 12 00 + 39 01 00 00 00 00 02 13 00 + 39 01 00 00 00 00 02 14 08 + 39 01 00 00 00 00 02 15 10 + 39 01 00 00 00 00 02 16 18 + 39 01 00 00 00 00 02 17 20 + 39 01 00 00 00 00 02 18 28 + 39 01 00 00 00 00 02 19 30 + 39 01 00 00 00 00 02 1A 77 + 39 01 00 00 00 00 02 53 00 + 39 01 00 00 00 00 02 54 00 + 39 01 00 00 00 00 02 5B 00 + 39 01 00 00 00 00 02 63 00 + 39 01 00 00 00 00 02 FF 00 + 39 01 00 00 00 00 02 FF 04 + 39 01 00 00 00 00 02 FF 00 + 39 01 00 00 00 00 02 D3 08 + 39 01 00 00 00 00 02 D4 07 + 39 01 00 00 00 00 02 51 00 + 39 01 00 00 00 00 02 53 24 + 39 01 00 00 00 00 02 55 91 + 39 01 00 00 00 00 02 FF EE + 39 01 00 00 00 00 02 7C 31 + 39 01 00 00 00 00 02 FF 05 + 39 01 00 00 00 00 02 54 75 + 39 01 00 00 00 00 02 FF 00 + 05 01 00 00 78 00 02 11 00 + ]; + qcom,mdss-dsi-off-command = [ + 05 01 00 00 14 00 02 28 00 + 05 01 00 00 78 00 02 10 00 + ]; + cm,mdss-livedisplay-cabc-cmd = [ + 29 01 00 00 00 00 02 55 00 + ]; + cm,mdss-livedisplay-cabc-ui-value = <1>; + cm,mdss-livedisplay-cabc-image-value = <2>; + cm,mdss-livedisplay-cabc-video-value = <3>; + cm,mdss-livedisplay-color-enhance-on = [ + 29 01 00 00 00 00 02 81 81 + ]; + cm,mdss-livedisplay-color-enhance-off = [ + 29 01 00 00 00 00 02 81 00 + ]; + cm,mdss-livedisplay-post-cmd = [ + 05 01 00 00 14 00 02 29 00 + ]; + qcom,panel-backlight-response-curve = [ + 00 01 02 03 04 04 04 04 + 04 04 04 04 05 05 06 06 + 07 07 08 08 09 09 0A 0A + 0B 0B 0C 0C 0C 0C 0C 0C + 0D 0D 0D 0D 0E 0E 0E 0E + 0E 0F 0F 10 11 12 12 13 + 14 15 15 16 17 18 18 19 + 1A 1B 1B 1C 1D 1D 1E 1F + 21 21 21 22 23 23 24 25 + 26 26 27 27 28 28 29 29 + 2A 2A 2A 2B 2B 2B 2C 2C + 2C 2D 2D 2D 2E 2E 2F 2F + 2F 30 30 31 31 31 32 33 + 34 35 37 38 3A 3B 3D 3E + 3F 40 41 42 43 44 45 46 + 47 48 49 4A 4B 4C 4D 4E + 4F 50 51 51 52 53 54 54 + 55 56 57 57 58 59 5A 5B + 5C 5E 5F 61 62 64 65 67 + 68 6A 6B 6C 6E 6F 71 72 + 74 75 77 78 7A 7B 7D 7E + 7F 81 82 84 85 87 89 8B + 8C 8D 8E 90 91 92 94 95 + 97 98 9A 9B 9D 9E A0 A1 + A3 A4 A5 A7 A8 AA AB AD + AE AF B1 B3 B4 B5 B7 B8 + BA BB BD BE BF C1 C4 C5 + C7 C8 C9 CA CB CD CE D0 + D1 D3 D4 D6 D7 D9 DA DB + DD DE E0 E1 E3 E4 E6 E7 + E9 EA EC ED EE F0 F1 F3 + F4 F6 F7 F9 FA FC FD FF + ]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-command = [06 01 00 01 05 00 02 0A 08]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-check-mode = "reg_read"; + qcom,mdss-dsi-traffic-mode = "burst_mode"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [E7 36 24 00 66 6A 2A 3A 2D 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x20>; + qcom,mdss-dsi-t-clk-pre = <0x2C>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-reset-sequence = <1 10>, <0 6>, <1 10>, <0 6>, <1 10>; + qcom,mdss-pan-physical-width-dimension = <68>; + qcom,mdss-pan-physical-height-dimension = <121>; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-init-delay-us = <200>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/dsi-panel-otm1283a-boyi-lg-hd-550-video.dtsi b/arch/arm/boot/dts/qcom/cp8675/dsi-panel-otm1283a-boyi-lg-hd-550-video.dtsi new file mode 100644 index 00000000000..df1b7902e77 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/dsi-panel-otm1283a-boyi-lg-hd-550-video.dtsi @@ -0,0 +1,333 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&mdss_mdp { + dsi_otm1283a_boyi_lg_hd: qcom,mdss_dsi_otm1283a_boyi_lg_hd_video { + qcom,cont-splash-enabled; + qcom,mdss-dsi-panel-name = "LCD_TYPE_OTM1283A_BOYI_LG_HD_550"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <720>; + qcom,mdss-dsi-panel-height = <1280>; + qcom,mdss-dsi-h-front-porch = <52>; + qcom,mdss-dsi-h-back-porch = <100>; + qcom,mdss-dsi-h-pulse-width = <24>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-front-porch = <20>; + qcom,mdss-dsi-v-back-porch = <8>; + qcom,mdss-dsi-v-pulse-width = <4>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-pixel-packing = <0>; + qcom,mdss-dsi-on-command = [ + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 04 ff 12 83 01 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 03 ff 12 83 + 29 01 00 00 00 00 02 00 c6 + 29 01 00 00 00 00 02 B0 03 + 29 01 00 00 00 00 02 00 B9 + 29 01 00 00 00 00 02 B0 51 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 0a c0 00 64 00 0f 11 00 64 0f 11 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 07 c0 00 55 00 01 00 04 + 29 01 00 00 00 00 02 00 a4 + 29 01 00 00 00 00 02 c0 00 + 29 01 00 00 00 00 02 00 b3 + 29 01 00 00 00 00 03 c0 00 50 + 29 01 00 00 00 00 02 00 81 + 29 01 00 00 00 00 02 c1 55 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 02 c4 30 + 29 01 00 00 00 00 02 00 81 + 29 01 00 00 00 00 02 c4 82 + 29 01 00 00 00 00 02 00 82 + 29 01 00 00 00 00 02 c4 02 + 29 01 00 00 00 00 02 00 87 + 29 01 00 00 00 00 02 c4 18 + 29 01 00 00 00 00 02 00 8A + 29 01 00 00 00 00 02 c4 40 + 29 01 00 00 00 00 02 00 8b + 29 01 00 00 00 00 02 c4 00 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 02 c4 52 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 0f c4 05 10 06 02 05 15 10 05 10 07 02 05 15 10 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 03 c4 00 00 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 02 c5 50 + 29 01 00 00 00 00 02 00 91 + 29 01 00 00 00 00 03 c5 54 50 + 29 01 00 00 00 00 02 00 94 + 29 01 00 00 00 00 02 c5 66 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 03 c5 04 38 + 29 01 00 00 00 00 02 00 b4 + 29 01 00 00 00 00 02 c5 c0 + 29 01 00 00 00 00 02 00 bb + 29 01 00 00 00 00 02 c5 80 + 29 01 00 00 00 00 02 00 b5 + 29 01 00 00 00 00 07 c5 3b ed 30 3b ed 30 + 29 01 00 00 00 00 02 00 b1 + 29 01 00 00 00 00 02 c6 05 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 05 f5 02 11 02 11 + 29 01 00 00 00 00 02 00 b2 + 29 01 00 00 00 00 03 f5 00 00 + 29 01 00 00 00 00 02 00 b4 + 29 01 00 00 00 00 03 f5 00 00 + 29 01 00 00 00 00 02 00 b6 + 29 01 00 00 00 00 03 f5 00 00 + 29 01 00 00 00 00 02 00 b8 + 29 01 00 00 00 00 03 f5 00 00 + 29 01 00 00 00 00 02 00 94 + 29 01 00 00 00 00 02 F5 02 + 29 01 00 00 00 00 02 00 BA + 29 01 00 00 00 00 02 F5 03 + 29 01 00 00 00 00 02 00 C3 + 29 01 00 00 00 00 02 F5 81 + 29 01 00 00 00 00 02 00 B1 + 29 01 00 00 00 00 02 C6 05 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 0c cb 00 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 10 cb 00 00 00 00 00 00 00 00 00 00 00 ff 00 ff 00 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 10 cb ff 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 10 cb 00 00 00 ff 00 ff 00 ff 00 ff 00 00 00 00 00 + 29 01 00 00 00 00 02 00 c0 + 29 01 00 00 00 00 10 cb 00 00 00 00 05 05 00 00 05 00 05 05 00 05 05 + 29 01 00 00 00 00 02 00 d0 + 29 01 00 00 00 00 10 cb 05 05 05 00 00 00 00 00 00 00 00 05 05 00 00 + 29 01 00 00 00 00 02 00 e0 + 29 01 00 00 00 00 0f cb 05 00 05 05 00 05 05 05 05 05 00 00 00 00 + 29 01 00 00 00 00 02 00 f0 + 29 01 00 00 00 00 0c cb ff ff ff ff ff ff ff ff ff ff ff + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 10 cc 00 00 00 00 2E 2D 00 00 29 00 2A 0c 00 0a 10 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 10 cc 0e 02 04 00 00 00 00 00 00 00 00 2E 2D 00 00 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 0f cc 29 00 2A 0b 00 09 0f 0d 01 03 00 00 00 00 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 10 cc 00 00 00 00 2D 2E 00 00 29 00 2A 0f 00 09 0b + 29 01 00 00 00 00 02 00 c0 + 29 01 00 00 00 00 10 cc 0d 03 01 00 00 00 00 00 00 00 00 2D 2E 00 00 + 29 01 00 00 00 00 02 00 d0 + 29 01 00 00 00 00 0f cc 29 00 2A 10 00 0a 0c 0e 04 02 00 00 00 00 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 0d ce 8b 03 10 8a 03 10 89 03 10 88 03 10 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 0f ce f0 00 00 f0 00 00 f0 00 00 f0 00 00 00 00 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 0f ce 38 07 84 fe 00 10 00 38 06 84 ff 00 10 00 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 0f ce 38 05 85 00 00 10 00 38 04 85 01 00 10 00 + 29 01 00 00 00 00 02 00 c0 + 29 01 00 00 00 00 0f ce 38 03 85 02 00 10 00 38 02 85 03 00 10 00 + 29 01 00 00 00 00 02 00 d0 + 29 01 00 00 00 00 0f ce 38 01 85 04 00 10 00 38 00 85 05 00 10 00 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 0f cf 70 00 00 10 00 00 00 70 00 00 10 00 00 00 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 0f cf 70 00 00 10 00 00 00 70 00 00 10 00 00 00 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 0f cf 70 00 00 10 00 00 00 70 00 00 10 00 00 00 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 0f cf 70 00 00 10 00 00 00 70 00 00 10 00 00 00 + 29 01 00 00 00 00 02 00 c0 + 29 01 00 00 00 00 0c cf 04 01 20 20 00 00 01 80 00 03 08 + 29 01 00 00 00 00 02 00 C2 + 29 01 00 00 00 00 02 F5 C0 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 02 C4 01 + 29 01 00 00 00 00 02 00 88 + 29 01 00 00 00 00 02 C4 80 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 03 d8 bc bc + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 d9 8b + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 11 E1 04 0b 10 0d 06 0e 0c 0a 04 07 0c 09 10 16 12 08 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 11 E2 04 0B 10 0D 07 0E 0C 0A 04 09 0C 09 10 16 12 08 + 29 01 00 00 00 00 02 00 A0 + 29 01 00 00 00 00 0d D6 01 00 01 00 01 00 01 b3 01 f3 01 b3 + 29 01 00 00 00 00 02 00 B0 + 29 01 00 00 00 00 0d D6 01 b3 01 b3 01 b3 01 b3 01 b3 01 b3 + 29 01 00 00 00 00 02 00 C0 + 29 01 00 00 00 00 0d D6 1e 11 00 77 11 77 a2 11 77 77 11 77 + 29 01 00 00 00 00 02 00 D0 + 29 01 00 00 00 00 07 D6 77 11 77 77 11 77 + 29 01 00 00 00 00 02 00 E0 + 29 01 00 00 00 00 0d D6 1e 11 3c 3c 11 3c 51 11 3c 3c 11 3c + 29 01 00 00 00 00 02 00 F0 + 29 01 00 00 00 00 07 D6 3c 11 3c 3c 11 3c + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 02 D6 80 + 29 01 00 00 00 00 02 00 81 + 29 01 00 00 00 00 03 D6 03 FF + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 1d CA 01 8E 95 9D A4 AB B2 BA C1 C8 CF D7 DE E5 EC F4 E8 FF 87 FF 87 FF 05 03 05 03 05 03 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 10 + 29 01 00 00 00 00 13 C7 90 A9 AA AA AA AA AA AA 99 88 88 88 77 66 55 55 55 55 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 11 + 29 01 00 00 00 00 13 C7 90 99 AA AA AA AA AA 9A 99 88 88 88 77 66 66 55 55 55 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 12 + 29 01 00 00 00 00 13 C7 90 99 A9 AA AA AA AA 99 99 88 88 88 77 66 66 66 55 55 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 13 + 29 01 00 00 00 00 13 C7 90 99 99 AA AA AA 9A 99 99 88 88 88 77 66 66 66 66 55 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 14 + 29 01 00 00 00 00 13 C7 90 99 99 A9 AA AA 99 99 99 88 88 88 77 66 66 66 66 66 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 15 + 29 01 00 00 00 00 13 C7 90 99 99 99 AA 9A 99 99 99 88 88 88 77 77 66 66 66 66 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 16 + 29 01 00 00 00 00 13 C7 90 99 99 99 A9 99 99 99 99 88 88 88 77 77 77 66 66 66 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 00 17 + 29 01 00 00 00 00 13 C7 80 99 99 99 99 99 99 99 99 88 88 88 77 77 77 77 66 66 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 00 18 + 29 01 00 00 00 00 13 C7 80 98 99 99 99 98 99 99 99 88 88 88 77 77 77 77 77 66 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 19 + 29 01 00 00 00 00 13 C7 80 88 99 99 99 88 99 99 99 88 88 88 77 77 77 77 77 77 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 1A + 29 01 00 00 00 00 13 C7 80 88 98 99 99 88 98 99 99 88 88 88 88 77 77 77 77 77 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 1B + 29 01 00 00 00 00 13 C7 80 88 88 99 99 88 88 99 99 88 88 88 88 88 77 77 77 77 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 1C + 29 01 00 00 00 00 13 C7 80 88 88 98 99 88 88 98 99 88 88 88 88 88 88 77 77 77 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 00 1D + 29 01 00 00 00 00 13 C7 80 88 88 88 99 88 88 88 99 88 88 88 88 88 88 88 77 77 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 1E + 29 01 00 00 00 00 13 C7 80 88 88 88 98 88 88 88 98 88 88 88 88 88 88 88 78 78 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 1F + 29 01 00 00 00 00 13 C7 80 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 00 + 29 01 00 00 00 00 02 00 A0 + 29 01 00 00 00 00 02 C1 02 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 03 ff ff ff + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 04 ff ff ff ff + 29 01 00 00 00 00 02 51 00 + 29 01 00 00 00 00 02 53 24 + 05 01 00 00 01 00 02 11 00 + ]; + qcom,mdss-dsi-off-command = [ + 05 01 00 00 14 00 02 28 00 + 05 01 00 00 78 00 02 10 00 + ]; + cm,mdss-livedisplay-cabc-cmd = [ + 29 01 00 00 00 00 02 55 00 + ]; + cm,mdss-livedisplay-cabc-ui-value = <0x01>; + cm,mdss-livedisplay-cabc-image-value = <0x02>; + cm,mdss-livedisplay-cabc-video-value = <0x03>; + cm,mdss-livedisplay-cabc-ce-value = <0x80>; + cm,mdss-livedisplay-post-cmd = [ + 05 01 00 00 00 00 02 29 00 + ]; + qcom,panel-backlight-response-curve = [ + 00 01 02 02 03 03 03 04 + 04 05 06 06 07 08 09 0A + 0A 0B 0C 0C 0D 0D 0E 0E + 0F 0F 0F 10 10 10 10 11 + 11 11 11 12 12 12 12 13 + 13 13 13 14 14 14 15 15 + 15 16 16 16 17 18 18 19 + 1A 1B 1B 1C 1D 1D 1E 1F + 21 21 21 22 23 23 24 25 + 26 26 27 27 28 28 29 29 + 2A 2A 2B 2B 2C 2C 2D 2D + 2E 2E 2F 2F 30 30 31 31 + 31 32 32 33 33 33 34 34 + 34 35 37 38 3A 3B 3D 3E + 3F 40 41 42 43 44 45 46 + 47 48 49 4A 4B 4C 4D 4E + 4F 50 51 51 52 53 54 54 + 55 56 57 57 58 59 5A 5B + 5C 5E 5F 61 62 64 65 67 + 68 6A 6B 6C 6E 6F 71 72 + 74 75 77 78 7A 7B 7D 7E + 7F 81 82 84 85 87 89 8B + 8C 8D 8E 90 91 92 94 95 + 97 98 9A 9B 9D 9E A0 A1 + A3 A4 A5 A7 A8 AA AB AD + AE AF B1 B3 B4 B5 B7 B8 + BA BB BD BE BF C1 C4 C5 + C7 C8 C9 CA CB CD CE D0 + D1 D3 D4 D6 D7 D9 DA DB + DD DE E0 E1 E3 E4 E6 E7 + E9 EA EC ED EE F0 F1 F3 + F4 F6 F7 F9 FA FC FD FF + ]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_lp_mode"; + qcom,panel-alive-reg-content = [ + 0A 01 9C + 0B 01 00 + 0D 01 00 + ]; + qcom,mdss-dsi-panel-status-command = [ + 06 01 00 01 05 00 02 0A 08 + ]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-check-mode = "reg_read_yl"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "burst_mode"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [92 1A 12 00 3E 42 16 1E 14 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x04>; + qcom,mdss-dsi-t-clk-pre = <0x1C>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-reset-sequence = <1 10>, <0 2>, <1 10>; + qcom,mdss-pan-physical-width-dimension = <68>; + qcom,mdss-pan-physical-height-dimension = <121>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/dsi-panel-otm1283a-lide-cpt-hd-550-video.dtsi b/arch/arm/boot/dts/qcom/cp8675/dsi-panel-otm1283a-lide-cpt-hd-550-video.dtsi new file mode 100644 index 00000000000..c37a70dff48 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/dsi-panel-otm1283a-lide-cpt-hd-550-video.dtsi @@ -0,0 +1,329 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&mdss_mdp { + dsi_otm1283a_lide_cpt_hd: qcom,mdss_dsi_otm1283a_lide_cpt_hd_video { + qcom,cont-splash-enabled; + qcom,mdss-dsi-panel-name = "LCD_TYPE_OTM1283A_LIDE_CPT_HD_550"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <55>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <720>; + qcom,mdss-dsi-panel-height = <1280>; + qcom,mdss-dsi-h-front-porch = <44>; + qcom,mdss-dsi-h-back-porch = <42>; + qcom,mdss-dsi-h-pulse-width = <6>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-front-porch = <16>; + qcom,mdss-dsi-v-back-porch = <14>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-pixel-packing = <0>; + qcom,mdss-dsi-on-command = [ + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 04 ff 12 83 01 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 03 ff 12 83 + 29 01 00 00 00 00 02 00 92 + 29 01 00 00 00 00 03 ff 30 02 + 29 01 00 00 00 00 02 00 B9 + 29 01 00 00 00 00 02 B0 51 + 29 01 00 00 00 00 02 00 c6 + 29 01 00 00 00 00 02 B0 03 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 0A c0 00 64 00 10 10 00 64 10 10 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 07 c0 00 5c 00 01 00 04 + 29 01 00 00 00 00 02 00 a4 + 29 01 00 00 00 00 02 c0 22 + 29 01 00 00 00 00 02 00 b3 + 29 01 00 00 00 00 03 c0 00 50 + 29 01 00 00 00 00 02 00 81 + 29 01 00 00 00 00 02 c1 77 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 02 c4 30 + 29 01 00 00 00 00 02 00 81 + 29 01 00 00 00 00 02 c4 82 + 29 01 00 00 00 00 02 00 82 + 29 01 00 00 00 00 02 C4 02 + 29 01 00 00 00 00 02 00 87 + 29 01 00 00 00 00 02 c4 18 + 29 01 00 00 00 00 02 00 8A + 29 01 00 00 00 00 02 c4 40 + 29 01 00 00 00 00 02 00 8b + 29 01 00 00 00 00 02 c4 00 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 02 c4 52 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 0F c4 05 10 06 02 05 15 10 05 10 07 02 05 15 10 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 03 c4 00 00 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 05 f5 02 11 02 11 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 02 c5 50 + 29 01 00 00 00 00 02 00 94 + 29 01 00 00 00 00 02 c5 66 + 29 01 00 00 00 00 02 00 91 + 29 01 00 00 00 00 03 c5 46 40 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 03 c5 04 38 + 29 01 00 00 00 00 02 00 b5 + 29 01 00 00 00 00 07 c5 3f ff ff 3f ff ff + 29 01 00 00 00 00 02 00 bb + 29 01 00 00 00 00 02 c5 80 + 29 01 00 00 00 00 02 00 b1 + 29 01 00 00 00 00 02 c6 05 + 29 01 00 00 00 00 02 00 b2 + 29 01 00 00 00 00 05 f5 00 00 00 00 + 29 01 00 00 00 00 02 00 94 + 29 01 00 00 00 00 02 F5 02 + 29 01 00 00 00 00 02 00 BA + 29 01 00 00 00 00 02 F5 03 + 29 01 00 00 00 00 02 00 C3 + 29 01 00 00 00 00 02 F5 81 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 0C cb 00 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 10 cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 10 cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 10 cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 c0 + 29 01 00 00 00 00 10 cb 05 05 05 05 05 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 d0 + 29 01 00 00 00 00 10 cb ff ff ff 00 05 05 05 05 05 05 05 05 00 00 00 + 29 01 00 00 00 00 02 00 e0 + 29 01 00 00 00 00 0F cb 00 00 00 00 00 00 00 ff ff ff 00 05 05 05 + 29 01 00 00 00 00 02 00 f0 + 29 01 00 00 00 00 0C cb ff ff ff ff ff ff ff ff ff ff ff + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 10 cc 02 0a 0c 0e 10 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 10 cc 00 00 00 00 2e 2d 06 01 09 0b 0d 0f 00 00 00 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 0F cc 00 00 00 00 00 00 00 00 00 00 00 2e 2d 05 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 10 cc 05 0f 0d 0b 09 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 c0 + 29 01 00 00 00 00 10 cc 00 00 00 00 2d 2e 01 06 10 0e 0c 0a 00 00 00 + 29 01 00 00 00 00 02 00 d0 + 29 01 00 00 00 00 0F cc 00 00 00 00 00 00 00 00 00 00 00 2d 2e 02 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 0D ce 87 03 10 86 03 10 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 0F ce 35 01 10 35 02 10 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 0F ce 38 03 04 f8 00 10 00 38 02 04 f9 00 10 00 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 0F ce 38 01 04 fa 00 10 00 38 00 04 fb 00 10 00 + 29 01 00 00 00 00 02 00 c0 + 29 01 00 00 00 00 0F ce 30 00 04 fc 00 10 00 30 01 04 fd 00 10 00 + 29 01 00 00 00 00 02 00 d0 + 29 01 00 00 00 00 0F ce 30 02 04 fe 00 10 00 30 03 04 ff 00 10 00 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 0F cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 0F cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 0F cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 b0 + 29 01 00 00 00 00 0F cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 29 01 00 00 00 00 02 00 c0 + 29 01 00 00 00 00 0C cf 01 01 20 20 00 00 01 81 00 03 08 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 03 d8 b6 b6 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 d9 6a + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 11 E1 02 0a 10 0d 06 0f 0B 0b 02 06 0B 08 0F 12 0c 06 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 11 E2 02 0a 10 0d 06 0f 0B 0A 03 06 0b 08 0F 11 0c 06 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 22 EC 40 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 04 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 22 ED 40 43 34 44 43 34 44 43 34 44 43 34 44 43 34 44 34 44 43 34 44 43 34 44 43 34 44 43 34 44 43 34 04 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 22 EE 40 44 34 44 44 44 44 43 44 44 44 34 44 44 44 44 34 44 44 44 44 43 44 44 44 34 44 44 44 44 43 44 04 + 29 01 00 00 00 00 02 00 a0 + 29 01 00 00 00 00 0D D6 01 CD 01 CD 01 CD 01 CD 01 CD 01 CD + 29 01 00 00 00 00 02 00 B0 + 29 01 00 00 00 00 0D D6 01 CD 01 CD 01 CD 01 CD 01 CD 01 CD + 29 01 00 00 00 00 02 00 C0 + 29 01 00 00 00 00 0D D6 89 11 89 89 11 89 89 11 89 89 11 89 + 29 01 00 00 00 00 02 00 D0 + 29 01 00 00 00 00 07 D6 89 11 89 89 11 89 + 29 01 00 00 00 00 02 00 E0 + 29 01 00 00 00 00 0D D6 44 11 44 44 11 44 44 11 44 44 11 44 + 29 01 00 00 00 00 02 00 F0 + 29 01 00 00 00 00 07 D6 44 11 44 44 11 44 + 29 01 00 00 00 00 02 00 90 + 29 01 00 00 00 00 02 D6 80 + 29 01 00 00 00 00 02 00 81 + 29 01 00 00 00 00 03 D6 03 FF + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 1D CA 01 8E 95 9D A4 AB B2 BA C1 C8 CF D7 DE E5 EC F4 E8 FF 87 FF 87 FF 05 03 05 03 05 03 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 10 + 29 01 00 00 00 00 13 C7 90 A9 AA AA AA AA AA AA 99 88 88 88 77 66 55 55 55 55 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 11 + 29 01 00 00 00 00 13 C7 90 99 AA AA AA AA AA 9A 99 88 88 88 77 66 66 55 55 55 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 12 + 29 01 00 00 00 00 13 C7 90 99 A9 AA AA AA AA 99 99 88 88 88 77 66 66 66 55 55 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 13 + 29 01 00 00 00 00 13 C7 90 99 99 AA AA AA 9A 99 99 88 88 88 77 66 66 66 66 55 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 14 + 29 01 00 00 00 00 13 C7 90 99 99 A9 AA AA 99 99 99 88 88 88 77 66 66 66 66 66 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 15 + 29 01 00 00 00 00 13 C7 90 99 99 99 AA 9A 99 99 99 88 88 88 77 77 66 66 66 66 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 16 + 29 01 00 00 00 00 13 C7 90 99 99 99 A9 99 99 99 99 88 88 88 77 77 77 66 66 66 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 00 17 + 29 01 00 00 00 00 13 C7 80 99 99 99 99 99 99 99 99 88 88 88 77 77 77 77 66 66 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 00 18 + 29 01 00 00 00 00 13 C7 80 98 99 99 99 98 99 99 99 88 88 88 77 77 77 77 77 66 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 19 + 29 01 00 00 00 00 13 C7 80 88 99 99 99 88 99 99 99 88 88 88 77 77 77 77 77 77 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 1A + 29 01 00 00 00 00 13 C7 80 88 98 99 99 88 98 99 99 88 88 88 88 77 77 77 77 77 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 1B + 29 01 00 00 00 00 13 C7 80 88 88 99 99 88 88 99 99 88 88 88 88 88 77 77 77 77 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 1C + 29 01 00 00 00 00 13 C7 80 88 88 98 99 88 88 98 99 88 88 88 88 88 88 77 77 77 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 00 1D + 29 01 00 00 00 00 13 C7 80 88 88 88 99 88 88 88 99 88 88 88 88 88 88 88 77 77 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 1E + 29 01 00 00 00 00 13 C7 80 88 88 88 98 88 88 88 98 88 88 88 88 88 88 88 78 78 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 1F + 29 01 00 00 00 00 13 C7 80 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 02 C6 00 + 29 01 00 00 00 00 02 00 C2 + 29 01 00 00 00 00 02 F5 C0 + 29 01 00 00 00 00 02 00 80 + 29 01 00 00 00 00 02 C4 01 + 29 01 00 00 00 00 02 00 88 + 29 01 00 00 00 00 02 C4 80 + 29 01 00 00 00 00 02 00 A0 + 29 01 00 00 00 00 02 C1 02 + 29 01 00 00 00 00 02 00 00 + 29 01 00 00 00 00 04 ff ff ff ff + 29 01 00 00 00 00 02 51 00 + 29 01 00 00 00 00 02 53 24 + 05 01 00 00 01 00 02 11 00 + ]; + qcom,mdss-dsi-off-command = [ + 05 01 00 00 14 00 02 28 00 + 05 01 00 00 78 00 02 10 00 + ]; + cm,mdss-livedisplay-cabc-cmd = [ + 29 01 00 00 00 00 02 55 00 + ]; + cm,mdss-livedisplay-cabc-ui-value = <0x01>; + cm,mdss-livedisplay-cabc-image-value = <0x02>; + cm,mdss-livedisplay-cabc-video-value = <0x03>; + cm,mdss-livedisplay-cabc-ce-value = <0x80>; + cm,mdss-livedisplay-post-cmd = [ + 05 01 00 00 00 00 02 29 00 + ]; + qcom,panel-backlight-response-curve = [ + 00 01 01 02 02 03 03 04 + 04 05 06 06 06 07 07 08 + 08 09 09 0A 0A 0B 0B 0C + 0C 0C 0C 0C 0C 0C 0C 0C + 0D 0D 0D 0D 0E 0E 0E 0E + 0E 0F 0F 10 11 12 12 13 + 14 15 15 16 17 18 18 19 + 1A 1B 1B 1C 1D 1D 1E 1F + 21 21 21 22 23 23 24 25 + 26 26 27 27 28 28 29 29 + 2A 2A 2B 2B 2C 2C 2D 2D + 2E 2E 2F 2F 30 30 31 31 + 31 32 32 33 33 33 34 34 + 34 35 37 38 3A 3B 3D 3E + 3F 40 41 42 43 44 45 46 + 47 48 49 4A 4B 4C 4D 4E + 4F 50 51 51 52 53 54 54 + 55 56 57 57 58 59 5A 5B + 5C 5E 5F 61 62 64 65 67 + 68 6A 6B 6C 6E 6F 71 72 + 74 75 77 78 7A 7B 7D 7E + 7F 81 82 84 85 87 89 8B + 8C 8D 8E 90 91 92 94 95 + 97 98 9A 9B 9D 9E A0 A1 + A3 A4 A5 A7 A8 AA AB AD + AE AF B1 B3 B4 B5 B7 B8 + BA BB BD BE BF C1 C4 C5 + C7 C8 C9 CA CB CD CE D0 + D1 D3 D4 D6 D7 D9 DA DB + DD DE E0 E1 E3 E4 E6 E7 + E9 EA EC ED EE F0 F1 F3 + F4 F6 F7 F9 FA FC FD FF + ]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_lp_mode"; + qcom,panel-alive-reg-content = [ + 0A 01 9C + 0B 01 00 + 0D 01 00 + ]; + qcom,mdss-dsi-panel-status-command = [ + 06 01 00 01 05 00 02 0A 08 + ]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-check-mode = "reg_read_yl"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "burst_mode"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [81 20 18 00 30 2E 1C 22 27 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x20>; + qcom,mdss-dsi-t-clk-pre = <0x2C>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-reset-sequence = <1 10>, <0 2>, <1 10>; + qcom,mdss-pan-physical-width-dimension = <68>; + qcom,mdss-pan-physical-height-dimension = <121>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/dsi-panel-r63315-tianma-tm-fhd-550-video.dtsi b/arch/arm/boot/dts/qcom/cp8675/dsi-panel-r63315-tianma-tm-fhd-550-video.dtsi new file mode 100644 index 00000000000..8ed5d5b67dd --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/dsi-panel-r63315-tianma-tm-fhd-550-video.dtsi @@ -0,0 +1,143 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&mdss_mdp { + dsi_r63315_tianma_tm_fhd: qcom,mdss_dsi_r63315_tianma_tm_fhd_video { + qcom,cont-splash-enabled; + qcom,mdss-dsi-panel-name = "LCD_TYPE_1080P_4055505"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <96>; + qcom,mdss-dsi-h-back-porch = <45>; + qcom,mdss-dsi-h-pulse-width = <15>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-front-porch = <6>; + qcom,mdss-dsi-v-back-porch = <4>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-pixel-packing = <0>; + qcom,mdss-dsi-on-command = [ + 29 01 00 00 00 00 02 b0 04 + 29 01 00 00 00 00 02 d6 01 + 29 01 00 00 00 00 07 B8 07 90 1E 10 1E 32 + 29 01 00 00 00 00 07 B9 07 82 3C 10 3C 87 + 29 01 00 00 00 00 07 BA 07 78 64 10 64 B4 + 29 01 00 00 00 00 1A D3 1B 33 BB BB B3 33 33 33 00 01 00 A0 C8 A0 0D 46 46 33 3B 37 72 57 3D BF 33 + 29 01 00 00 00 00 1F C7 00 11 19 22 30 3E 48 58 3E 47 54 62 6C 74 76 00 11 19 22 30 3E 48 58 3E 47 54 62 6C 74 76 + 29 01 00 00 00 00 14 C8 01 00 01 00 03 FC 00 00 01 00 FF B4 00 00 00 03 09 E7 00 + 29 01 00 00 00 00 21 CA 01 80 DC F0 D0 F0 D0 F0 08 08 14 8A 0A 4A 37 A0 55 F8 0C 0C 20 10 3F 3F 19 D6 10 10 3F 3F 3F 3F + 39 01 00 00 00 00 02 35 00 + 39 01 00 00 00 00 02 36 00 + 39 01 00 00 00 00 02 51 00 + 39 01 00 00 00 00 02 53 24 + 05 01 00 00 78 00 02 11 00 + ]; + qcom,mdss-dsi-off-command = [ + 05 01 00 00 14 00 02 28 00 + 29 01 00 00 14 00 1A D3 13 33 BB B3 B3 33 33 33 00 01 00 A0 C8 A0 0D 46 46 33 3B 37 72 57 3D BF 33 + 05 01 00 00 78 00 02 10 00 + ]; + cm,mdss-livedisplay-cabc-cmd = [ + 29 01 00 00 00 00 02 55 00 + ]; + cm,mdss-livedisplay-cabc-ui-value = <1>; + cm,mdss-livedisplay-cabc-image-value = <2>; + cm,mdss-livedisplay-cabc-video-value = <3>; + cm,mdss-livedisplay-color-enhance-on = [ + 29 01 00 00 00 00 02 81 81 + ]; + cm,mdss-livedisplay-color-enhance-off = [ + 29 01 00 00 00 00 02 81 00 + ]; + cm,mdss-livedisplay-post-cmd = [ + 05 01 00 00 14 00 02 29 00 + ]; + qcom,panel-backlight-response-curve = [ + 00 01 02 03 04 05 05 05 + 05 05 05 05 06 07 08 08 + 09 09 0A 0A 0B 0B 0C 0C + 0C 0C 0C 0C 0C 0C 0C 0C + 0D 0D 0D 0D 0E 0E 0E 0E + 0E 0F 0F 10 11 12 12 13 + 14 15 15 16 17 18 18 19 + 1A 1B 1B 1C 1D 1D 1E 1F + 21 21 21 22 23 23 24 25 + 26 26 27 27 28 28 29 29 + 2A 2A 2A 2B 2B 2B 2C 2C + 2C 2D 2D 2D 2E 2E 2F 2F + 2F 30 30 31 31 31 32 33 + 34 35 37 38 3A 3B 3D 3E + 3F 40 41 42 43 44 45 46 + 47 48 49 4A 4B 4C 4D 4E + 4F 50 51 51 52 53 54 54 + 55 56 57 57 58 59 5A 5B + 5C 5E 5F 61 62 64 65 67 + 68 6A 6B 6C 6E 6F 71 72 + 74 75 77 78 7A 7B 7D 7E + 7F 81 82 84 85 87 89 8B + 8C 8D 8E 90 91 92 94 95 + 97 98 9A 9B 9D 9E A0 A1 + A3 A4 A5 A7 A8 AA AB AD + AE AF B1 B3 B4 B5 B7 B8 + BA BB BD BE BF C1 C4 C5 + C7 C8 C9 CA CB CD CE D0 + D1 D3 D4 D6 D7 D9 DA DB + DD DE E0 E1 E3 E4 E6 E7 + E8 E9 EA EA EB EB EC EC + ED EE EF F0 F1 F2 F3 F4 + ]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + /* + qcom,panel-alive-reg-content = [ + 0A 01 9C + 0B 01 00 + 0D 01 00 + ]; + */ + qcom,mdss-dsi-panel-status-command = [06 01 00 01 05 00 02 0A 08]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-check-mode = "reg_read"; + qcom,mdss-dsi-traffic-mode = "burst_mode"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [E7 36 24 00 66 6A 2A 3A 2D 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x20>; + qcom,mdss-dsi-t-clk-pre = <0x2C>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-reset-sequence = <1 10>, <0 20>, <1 20>; + qcom,mdss-pan-physical-width-dimension = <68>; + qcom,mdss-pan-physical-height-dimension = <121>; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-init-delay-us = <200>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/msm-pm8916-cp8675.dtsi b/arch/arm/boot/dts/qcom/cp8675/msm-pm8916-cp8675.dtsi new file mode 100644 index 00000000000..55fe911a487 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/msm-pm8916-cp8675.dtsi @@ -0,0 +1,49 @@ +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&spmi_bus { + qcom,pm8916@0 { + pm8916_rtc: qcom,pm8916_rtc { + qcom,qpnp-rtc-alarm-pwrup = <1>; + }; + + pm8916_vadc: vadc@3100 { + qcom,vadc-recalib-check; + }; + + pm8916_adc_tm: vadc@3400 { + qcom,adc-tm-recalib-check; + }; + + pm8916_vbus: yl,vbus { + spmi-dev-container; + compatible = "yulong,yl_pm8916_vbus"; + #address-cells = <1>; + #size-cells = <1>; + status = "ok"; + qcom,chg-vadc = <&pm8916_vadc>; + qcom,bat-if@1200 { + reg = <0x1200 0x100>; + }; + qcom,usb-chgpth@1300 { + reg = <0x1300 0x100>; + interrupts = <0 0x13 0x2>, + <0 0x13 0x1>; + interrupt-names = "chg-gone", + "usbin-valid"; + }; + qcom,vm-bms@4000 { + reg = <0x4000 0x100>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/msm8939-audio-internal_codec-cp8675.dtsi b/arch/arm/boot/dts/qcom/cp8675/msm8939-audio-internal_codec-cp8675.dtsi new file mode 100644 index 00000000000..6b7e3251831 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/msm8939-audio-internal_codec-cp8675.dtsi @@ -0,0 +1,40 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&soc { + sound { + qcom,msm-mbhc-hphl-swh = <1>; + qcom,model = "msm8939-snd-card"; + qcom,msm-hs-micbias-type = "external"; + qcom,audio-routing = + "RX_BIAS", "MCLK", + "SPK_RX_BIAS", "MCLK", + "INT_LDO_H", "MCLK", + "MIC BIAS External", "Handset Mic", + "MIC BIAS External2", "Headset Mic", + "MIC BIAS External", "Secondary Mic", + "AMIC1", "MIC BIAS External", + "AMIC2", "MIC BIAS External2", + "AMIC3", "MIC BIAS External", + "DMIC1", "MIC BIAS Internal1", + "MIC BIAS Internal1", "Digital Mic1", + "DMIC2", "MIC BIAS Internal1", + "MIC BIAS Internal1", "Digital Mic2"; + pinctrl-names = "cdc_lines_act", + "cdc_lines_sus", + "cross_conn_det_act", + "cross_conn_det_sus", + "cdc_lines_dmic_act", + "cdc_lines_dmic_sus"; + }; +}; + diff --git a/arch/arm/boot/dts/qcom/cp8675/msm8939-camera-sensor-cp8675.dtsi b/arch/arm/boot/dts/qcom/cp8675/msm8939-camera-sensor-cp8675.dtsi new file mode 100644 index 00000000000..a1a09c12ce9 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/msm8939-camera-sensor-cp8675.dtsi @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&soc { +}; + +&cci { + actuator0: qcom,actuator@6e { + cell-index = <0>; + reg = <0x18>; + compatible = "qcom,actuator"; + qcom,cci-master = <0>; + }; + + led_flash0: qcom,led-flash@66 { + cell-index = <0>; + compatible = "rohm-flash,sgm3780"; + label = "sgm3780"; + qcom,flash-type = <1>; + gpios = <&msm_gpio 31 0>, + <&msm_gpio 32 0>; + qcom,gpio-flash-en = <0>; + qcom,gpio-flash-now = <1>; + qcom,gpio-req-tbl-num = <0 1>; + qcom,gpio-req-tbl-flags = <0 0>; + qcom,gpio-req-tbl-label = "FLASH_EN", + "FLASH_NOW"; + }; + + qcom,camera@21 { + cell-index = <0>; + compatible = "qcom,imx135", "qcom,camera"; + reg = <0x21>; + qcom,slave-id = <0x20 0x0016 0x135>; + qcom,csiphy-sd-index = <0>; + qcom,csid-sd-index = <0>; + qcom,actuator-src = <&actuator0>; + qcom,led-flash-src = <&led_flash0>; + qcom,mount-angle = <90>; + qcom,sensor-name = "imx135_cp8675"; + cam_vdig-supply = <&pm8916_l5>; + cam_vio-supply = <&pm8916_l6>; + cam_vana-supply = <&pm8916_l6>; + cam_vaf-supply = <&pm8916_l10>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana", + "cam_vaf"; + qcom,cam-vreg-type = <0 1 0 0>; + qcom,cam-vreg-min-voltage = <1800000 1800000 1800000 2800000>; + qcom,cam-vreg-max-voltage = <1800000 1800000 1800000 2800000>; + qcom,cam-vreg-op-mode = <200000 0 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default + &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + qcom,gpio-no-mux = <0>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 16 0>, + <&msm_gpio 119 0>, + <&msm_gpio 120 0>, + <&msm_gpio 34 0>; + qcom,gpio-standby = <1>; + qcom,gpio-vana = <2>; + qcom,gpio-vdig = <3>; + qcom,gpio-af-pwdm = <4>; + qcom,gpio-req-tbl-num = <0 1 2 3 4>; + qcom,gpio-req-tbl-flags = <1 0 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_STANDBY", + "CAM_VANA", + "CAM_VDIG", + "CAM_AF_PWDM"; + qcom,csi-lane-assign = <0x4320>; + qcom,csi-lane-mask = <0x1f>; + qcom,sensor-position = <0>; + qcom,sensor-mode = <1>; + qcom,cci-master = <0>; + status = "ok"; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@22 { + cell-index = <0>; + compatible = "qcom,imx214", "qcom,camera"; + reg = <0x20>; + qcom,slave-id = <0x20 0x0016 0x0214>; + qcom,csiphy-sd-index = <0>; + qcom,csid-sd-index = <0>; + qcom,mount-angle = <90>; + qcom,sensor-name = "imx214_cp8675"; + qcom,actuator-src = <&actuator0>; + qcom,led-flash-src = <&led_flash0>; + cam_vdig-supply = <&pm8916_l6>; + cam_vio-supply = <&pm8916_l6>; + cam_vana-supply = <&pm8916_l6>; + cam_vaf-supply = <&pm8916_l10>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana","cam_vaf"; + qcom,cam-vreg-type = <0 0 0 0>; + qcom,cam-vreg-min-voltage = <0 1800000 0 2800000>; + qcom,cam-vreg-max-voltage = <0 1800000 0 2800000>; + qcom,cam-vreg-op-mode = <0 105000 0 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + qcom,gpio-no-mux = <0>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 16 0>, + <&msm_gpio 119 0>, + <&msm_gpio 120 0>, + <&msm_gpio 34 0>; + qcom,gpio-standby = <1>; + qcom,gpio-vana = <2>; + qcom,gpio-vdig = <3>; + qcom,gpio-af-pwdm = <4>; + qcom,gpio-req-tbl-num = <0 1 2 3 4>; + qcom,gpio-req-tbl-flags = <1 0 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_STANDBY", + "CAM_VANA", + "CAM_VDIG", + "CAM_AF_PWDM"; + qcom,csi-lane-assign = <0x4320>; + qcom,csi-lane-mask = <0x1f>; + qcom,sensor-position = <0>; + qcom,sensor-mode = <1>; + qcom,cci-master = <0>; + status = "ok"; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@6c { + cell-index = <1>; + compatible = "ovti,ov5648", "qcom,camera"; + reg = <0x6c>; + qcom,slave-id = <0x6c 0x300a 0x5648>; + qcom,csiphy-sd-index = <1>; + qcom,csid-sd-index = <1>; + qcom,mount-angle = <270>; + qcom,sensor-name = "ov5648_cp8675"; + cam_vdig-supply = <&pm8916_l6>; + cam_vio-supply = <&pm8916_l6>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio"; + qcom,cam-vreg-type = <0 1>; + qcom,cam-vreg-min-voltage = <0 1800000>; + qcom,cam-vreg-max-voltage = <0 1800000>; + qcom,cam-vreg-op-mode = <0 200000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_default + &cam_sensor_front_default>; + pinctrl-1 = <&cam_sensor_mclk1_sleep &cam_sensor_front_sleep>; + qcom,gpio-no-mux = <0>; + gpios = <&msm_gpio 27 0>, + <&msm_gpio 28 0>, + <&msm_gpio 33 0>, + <&msm_gpio 119 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-vana = <3>; + qcom,gpio-req-tbl-num = <0 1 2 3>; + qcom,gpio-req-tbl-flags = <1 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET", + "CAM_STANDBY", + "CAM_VANA"; + qcom,csi-lane-assign = <0x4320>; + qcom,csi-lane-mask = <0x07>; + qcom,sensor-position = <1>; + qcom,sensor-mode = <0>; + qcom,cci-master = <0>; + status = "ok"; + clocks = <&clock_gcc clk_mclk1_clk_src>, + <&clock_gcc clk_gcc_camss_mclk1_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/msm8939-cp8675.dtsi b/arch/arm/boot/dts/qcom/cp8675/msm8939-cp8675.dtsi new file mode 100644 index 00000000000..7ad3482e8b1 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/msm8939-cp8675.dtsi @@ -0,0 +1,388 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "msm8939-audio-internal_codec-cp8675.dtsi" +#include "msm8939-camera-sensor-cp8675.dtsi" +#include "msm8939-panels-cp8675.dtsi" +#include "msm8939-pinctrl-cp8675.dtsi" +#include "msm8939-regulator-cp8675.dtsi" +#include "msm-pm8916-cp8675.dtsi" + +/ { + memory { + pstore_reserve_mem: pstore_reserve_region@0 { + linux,reserve-contiguous-region; + linux,reserve-region; + linux,remove-completely; + reg = <0x0 0x8c300000 0x0 0x00100000>; + label = "pstore_reserve_mem"; + }; + }; +}; + +&soc { + ramoops { + compatible = "ramoops"; + status = "ok"; + + android,ramoops-buffer-start = <0x8c300000>; + android,ramoops-buffer-size = <0x100000>; + android,ramoops-console-size = <0x80000>; + android,ramoops-record-size = <0x20000>; + android,ramoops-dump-oops = <0x1>; + }; + + i2c@78b9000 { /* BLSP1 QUP5 */ + goodix_ts@5d { + compatible = "Goodix,Goodix-TS"; + reg = <0x5d>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2>; + vdd_ana-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + pinctrl-names = "pmx_ts_active","pmx_ts_suspend"; + pinctrl-0 = <&ts_int_active &ts_reset_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + + goodix,reset-gpio = <&msm_gpio 12 0x00>; + goodix,irq-gpio = <&msm_gpio 13 0x2>; + goodix,irq_flags = <0x2>; + goodix,screen_x = <720>; + goodix,screen_y = <1280>; + }; + }; + + i2c@78b8000 { /* BLSP1 QUP4 */ + fan5405_charger@6A { + compatible = "yl,fan5405_charger"; + reg = <0x6A>; + fan5405,irq-gpio = <&msm_gpio 62 0x00>; + fan5405,en-gpio = <&msm_gpio 2 0x00>; + interrupt-parent = <&msm_gpio>; + interrupts = <62 0>; + interrupt-names = "fan5405_irq"; + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&fan_int_active>; + pinctrl-1 = <&fan_int_sleep>; + yl,max-vbus-current-mA = <1500>; + yl,weak-batt-vol-mv = <3400>; + yl,max-voltage-mv = <4380>; + yl,max-charge-current-mA = <900>; + yl,term-current-mA = <150>; + yl,vsp-mv = <4500>; + yl,safety-charge_current-mA = <1500>; + yl,safety-voltage-mv = <4380>; + yl,enable-te; + yl,recharge-thresh-mv = <100>; + yl,vbus-ovp-mv = <6500>; + yl,recharge-capa = <99>; + yl,batt-temp-hot = <520>; /* 52 celsius */ + yl,batt-temp-too-hot = <570>; /* 57 celsius*/ + yl,batt-temp-cold = <100>; /* 10 celsius */ + yl,batt-temp-too-cold = <0>; /*3 celsius*/ + yl,batt-psy-name = "battery"; + yl,battery-psy-name = "lc709203_battery"; + }; + + tps651321@3E { + compatible="qcom,tps-651321"; + reg=<0x3e>; + interrupt-parent=<&msm_gpio>; + vdd-supply=<&pm8916_l17>; + vcc_i2c-supply=<&pm8916_l5>; + interrupts=<13 0x2008>; + }; + }; + + yl_adc_battery { + compatible = "yl,yl_adc_battery"; + yl,adc_batt_psy_name = "yl_adc_battery"; + yl,charge_psy_name = "battery"; + yl,lcd_open_delta_mv = <50>; + yl,lcd_close_delta_mv = <30>; + yl,bk_level_offset_step = <5>; + yl,pon_volt_delta = <50>; + yl,voltage_max_uv = <4350000>; + yl,capa_design_mAH = <2500>; + yl,soc_high_scaled = <98>; + yl,soc_low_scaled = <3>; + qcom,yl_adc-vadc=<&pm8916_vadc>; + }; + + i2c@78b6000 { /* BLSP1 QUP2 */ + mpu6880@68 { + compatible = "mpu6880"; + reg = <0x68>; + }; + pa12200001@1e { + compatible = "pa12200001"; + reg = <0x1e>; + pinctrl-names = "default","sleep"; + pinctrl-0 = <&pa12200001_default>; + pinctrl-1 = <&pa12200001_sleep>; + interrupt-parent = <&msm_gpio>; + interrupts = <113 0x2>; + vdd_ana-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + alsp_vreg-supply = <&pm8916_l6>; + pa12200001,gpio_int = <&msm_gpio 113 0x00>; + pa12200001,irq_flags = <0x2>; + pa12200001,cfgs = <40 25 255 0 5 1 0 2 0 1 3 1 1 0 0 50 100>; + }; + yl_lc709203@0B { + compatible = "yl,yl_lc709203"; + reg = <0x0B>; + qcom,lc-vadc = <&pm8916_vadc>; + yl,soc-high-scaled = <990>; + yl,soc-low-scaled = <0>; + yl,lc709203-psy-name = "lc709203_battery"; + yl,charge-psy-name = "battery"; + yl,battery-data { + yl,rpull-up-kohm = <100>; + yl,vref-batt-id-uv = <1800000>; + yl,CPLD-351-BB-data { + yl,batt-full-capa = <2500>; + yl,batt-id-kohm = <47>; + yl,battery-type = "CPLD-351-BB"; + yl,battery-appli = <0x0025>; + }; + yl,CPLD-351-CC-data { + yl,batt-full-capa = <2500>; + yl,batt-id-kohm = <1>; + yl,battery-type = "CPLD-351-CC"; + yl,battery-appli = <0x0038>; + }; + yl,CPLD-351-LS-data { + yl,batt-full-capa = <2500>; + yl,batt-id-kohm = <220>; + yl,battery-type = "CPLD-351-LS"; + yl,battery-appli = <0x0033>; + }; + yl,CPLD-351-TM-data { + yl,batt-full-capa = <2500>; + yl,batt-id-kohm = <1000>; + yl,battery-type = "CPLD-351-TM"; + yl,battery-appli = <0x002D>; + }; + }; + }; + aw2013@45 { + compatible = "awinic,aw2013"; + reg = <0x45>; + vdd-supply = <&pm8916_l17>; + vcc-supply = <&pm8916_l6>; + + aw2013,red { + aw2013,name = "red"; + aw2013,id = <2>; + aw2013,gpio = <1018>; + aw2013,max-brightness = <255>; + aw2013,max-current = <3>; + aw2013,rise-time-ms = <2>; + aw2013,hold-time-ms = <1>; + aw2013,fall-time-ms = <2>; + aw2013,off-time-ms = <1>; + }; + + aw2013,green { + aw2013,name = "green"; + aw2013,id = <1>; + aw2013,gpio = <1018>; + aw2013,max-brightness = <255>; + aw2013,max-current = <3>; + aw2013,rise-time-ms = <2>; + aw2013,hold-time-ms = <1>; + aw2013,fall-time-ms = <2>; + aw2013,off-time-ms = <1>; + }; + + aw2013,blue { + aw2013,name = "blue"; + aw2013,id = <0>; + aw2013,gpio = <1018>; + aw2013,max-brightness = <255>; + aw2013,max-current = <3>; + aw2013,rise-time-ms = <2>; + aw2013,hold-time-ms = <1>; + aw2013,fall-time-ms = <2>; + aw2013,off-time-ms = <1>; + }; + }; + + }; + + hall_sensor { + compatible = "hall_switch"; + switch_name = "hall"; + hall_right { + hall_name = "right"; + gpios = <&msm_gpio 114 0x1>; + wakeup; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + input-name = "gpio-keys"; + pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend"; + pinctrl-0 = <&gpio_key_active>; + pinctrl-1 = <&gpio_key_suspend>; + + vol_up { + label = "volume_up"; + gpios = <&msm_gpio 107 0x1>; + linux,input-type = <1>; + linux,code = <115>; + gpio-key,wakeup; + debounce-interval = <15>; + }; + }; +}; + +&sdhc_1 { + vdd-supply = <&pm8916_l8>; + qcom,vdd-voltage-level = <2900000 2900000>; + qcom,vdd-current-level = <200 400000>; + + vdd-io-supply = <&pm8916_l5>; + qcom,vdd-io-always-on; + qcom,vdd-io-lpm-sup; + qcom,vdd-io-voltage-level = <1800000 1800000>; + qcom,vdd-io-current-level = <200 60000>; + + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; + + qcom,nonremovable; + + status = "ok"; +}; + +&sdhc_2 { + vdd-supply = <&pm8916_l11>; + qcom,vdd-voltage-level = <2800000 2950000>; + qcom,vdd-current-level = <15000 400000>; + + vdd-io-supply = <&pm8916_l12>; + qcom,vdd-io-voltage-level = <1800000 2950000>; + qcom,vdd-io-current-level = <200 50000>; + + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; + + #address-cells = <0>; + interrupt-parent = <&sdhc_2>; + interrupts = <0 1 2>; + #interrupt-cells = <1>; + interrupt-map-mask = <0xffffffff>; + interrupt-map = <0 &intc 0 125 0 + 1 &intc 0 221 0 + 2 &msm_gpio 38 0>; + interrupt-names = "hc_irq", "pwr_irq", "status_irq"; + cd-gpios = <&msm_gpio 38 0x0>; + + status = "ok"; +}; + +&spmi_bus { + qcom,pm8916@0 { + qcom,leds@a100 { + status = "okay"; + qcom,led_mpp_2 { + label = "mpp"; + linux,name = "button-backlight"; + linux,default-trigger = "none"; + qcom,default-state = "off"; + qcom,max-current = <40>; + qcom,current-setting = <5>; + qcom,id = <6>; + qcom,mode = "manual"; + qcom,source-sel = <1>; + qcom,mode-ctrl = <0x60>; + }; + }; + }; + + qcom,pm8916@1 { + qcom,vibrator@c000 { + status = "okay"; + qcom,vib-timeout-ms = <15000>; + qcom,vib-vtg-level-mV = <3100>; + }; + }; +}; + +&pm8916_chg { + status = "disabled"; +}; + +/ { + mtp_batterydata: qcom,battery-data { + qcom,rpull-up-kohm = <100>; + qcom,vref-batt-therm = <1800000>; + + #include "batterydata-CPLD-351-BB.dtsi" + #include "batterydata-CPLD-351-CC.dtsi" + #include "batterydata-CPLD-351-LS.dtsi" + #include "batterydata-CPLD-351-MK.dtsi" + #include "batterydata-CPLD-351-TM.dtsi" + }; +}; + +&pm8916_bms { + status = "disabled"; +}; + +&qcom_tzlog { + status = "okay"; +}; + +&qcom_rng { + status = "okay"; +}; + +&qcom_crypto { + status = "okay"; +}; + +&qcom_cedev { + status = "okay"; +}; + +&qcom_seecom { + status = "okay"; +}; + +&mdss_dsi0 { + pinctrl-names = "mdss_default", "mdss_sleep"; + pinctrl-0 = <&mdss_dsi_active &mdss_te_active>; + pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>; + qcom,dsi-pref-prim-pan = <&dsi_hx8394a_lide_lg_hd>; + + qcom,platform-enable-gpio = <&msm_gpio 97 0>; + qcom,platform-reset-gpio = <&msm_gpio 25 0>; + qcom,platform-bklight-en-gpio = <&msm_gpio 98 0>; +}; + +&apc_vreg_corner { + qcom,cpr-up-threshold = <3>; + qcom,cpr-down-threshold = <6>; +}; + +&usb_otg { + qcom,hsusb-otg-mode = <3>; + qcom,usbid-gpio = <&msm_gpio 110 0>; + pinctrl-names = "default"; + pinctrl-0 = <&usbid_default>; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/msm8939-panels-cp8675.dtsi b/arch/arm/boot/dts/qcom/cp8675/msm8939-panels-cp8675.dtsi new file mode 100644 index 00000000000..87fd86611d5 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/msm8939-panels-cp8675.dtsi @@ -0,0 +1,17 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "dsi-panel-hx8394a-lide-lg-hd-550-video.dtsi" +#include "dsi-panel-otm1283a-boyi-lg-hd-550-video.dtsi" +#include "dsi-panel-otm1283a-lide-cpt-hd-550-video.dtsi" +#include "dsi-panel-nt35596-yashi-otp-id22-auo-fhd-550-video.dtsi" +#include "dsi-panel-r63315-tianma-tm-fhd-550-video.dtsi" diff --git a/arch/arm/boot/dts/qcom/cp8675/msm8939-pinctrl-cp8675.dtsi b/arch/arm/boot/dts/qcom/cp8675/msm8939-pinctrl-cp8675.dtsi new file mode 100644 index 00000000000..e2c3b956497 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/msm8939-pinctrl-cp8675.dtsi @@ -0,0 +1,69 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* Include the original, then override it with ours */ +#include "../msm8939-pinctrl.dtsi" + +&soc { + tlmm_pinmux: pinctrl@1000000 { + + pmx_sdc1_cmd { + sdc1_cmd_on: cmd_on { + drive-strength = <16>; /* 16 MA */ + }; + }; + + pmx_sdc1_data { + sdc1_data_on: data_on { + drive-strength = <16>; /* 16 MA */ + }; + }; + + fan_int_pin { + qcom,pins = <&gp 62>; + qcom,num-grp-pins = <1>; + qcom,pin-func = <0>; + label = "fan5405_int_gpio"; + fan_int_active: fan_int_active { + drive-strength = <2>; /* 2 MA */ + bias-disable = <0>; /* No PULL */ + }; + fan_int_sleep: fan_int_sleep { + drive-strength = <2>; /* 2 MA */ + bias-disable = <0>; /* No PULL */ + }; + }; + + fan_en_pin { + qcom,pins = <&gp 2>; + qcom,num-grp-pins = <1>; + qcom,pin-func = <0>; + label = "fan5405_en_gpio"; + }; + + pa12200001_int_pin { + /* Ambient light and proximity sensor pa12200001 */ + qcom,pins = <&gp 113>; + qcom,pin-func = <0>; + qcom,num-grp-pins = <1>; + label = "pa12200001-irq"; + pa12200001_default: pa12200001_default { + drive-strength = <6>; + bias-pull-up; + }; + pa12200001_sleep: pa12200001_sleep { + drive-strength = <2>; + bias-pull-down; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/qcom/cp8675/msm8939-regulator-cp8675.dtsi b/arch/arm/boot/dts/qcom/cp8675/msm8939-regulator-cp8675.dtsi new file mode 100644 index 00000000000..e4fe625a727 --- /dev/null +++ b/arch/arm/boot/dts/qcom/cp8675/msm8939-regulator-cp8675.dtsi @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* Memory accelerator and CPR controlled regulators */ + +&apc_vreg_corner { + vdd-apc-optional-prim-supply = <&fan53555>; +}; diff --git a/arch/arm/boot/dts/qcom/dsi-panel-hx8394f-720p-video.dtsi b/arch/arm/boot/dts/qcom/dsi-panel-hx8394f-720p-video.dtsi new file mode 100644 index 00000000000..2c6688fd4c8 --- /dev/null +++ b/arch/arm/boot/dts/qcom/dsi-panel-hx8394f-720p-video.dtsi @@ -0,0 +1,122 @@ +/* Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&mdss_mdp { + dsi_hx8394f_720p_video: qcom,mdss_dsi_hx8394f_720p_video { + qcom,mdss-dsi-panel-name = "hx8394f 720p video mode dsi panel"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <720>; + qcom,mdss-dsi-panel-height = <1280>; + qcom,mdss-dsi-h-front-porch = <16>; + qcom,mdss-dsi-h-back-porch = <16>; + qcom,mdss-dsi-h-pulse-width = <8>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <12>; + qcom,mdss-dsi-v-front-porch = <15>; + qcom,mdss-dsi-v-pulse-width = <4>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-on-command = [39 01 00 00 00 00 04 b9 ff 83 94 + 39 01 00 00 00 00 0b + b1 50 14 74 09 31 24 71 31 55 + 2f + 39 01 00 00 00 00 07 + ba 63 03 68 6b b2 c0 + 39 01 00 00 00 00 02 + d2 77 + 39 01 00 00 00 00 06 + b2 00 80 64 10 07 + 39 01 00 00 00 00 16 + b4 01 74 01 74 01 74 01 0c 86 + 75 00 3f 01 74 01 74 01 74 01 + 0c 86 + 39 01 00 00 00 00 22 + d3 00 00 07 07 40 1e 08 00 32 + 10 08 00 08 54 15 10 05 04 02 + 12 10 05 07 23 23 0c 0c 27 10 + 07 07 10 40 + 39 01 00 00 00 00 2d + d5 19 19 18 18 1b 1b 1a 1a 04 + 05 06 07 00 01 02 03 20 21 18 + 18 22 23 18 18 18 18 18 18 18 + 18 18 18 18 18 18 18 18 18 18 + 18 18 18 18 18 + 39 01 00 00 00 00 2d + d6 18 18 19 19 1b 1b 1a 1a 03 + 02 01 00 07 06 05 04 23 22 18 + 18 21 20 18 18 18 18 18 18 18 + 18 18 18 18 18 18 18 18 18 18 + 18 18 18 18 18 + 39 01 00 00 00 00 3b + e0 00 03 09 11 11 14 18 16 2e + 3d 4d 4d 58 6c 72 78 88 8b 86 + a4 b2 58 55 59 5b 5d 60 64 7f + 00 03 09 0f 11 14 18 16 2e 3d + 4d 4d 58 6d 73 78 88 8b 87 a5 + b2 58 55 58 5b 5d 61 65 7f + 39 01 00 00 00 00 02 + cc 0b + 39 01 00 00 00 00 03 + c0 1f 31 + 39 01 00 00 00 00 03 + b6 92 92 + 39 01 00 00 00 00 02 + bd 01 + 39 01 00 00 00 00 02 + b1 00 + 39 01 00 00 00 00 02 + bd 00 + 39 01 00 00 00 00 08 + bf 40 81 50 00 1a fc 01 + 39 01 00 00 00 00 02 + c6 ef + 05 01 00 00 78 00 02 + 11 00 + 05 01 00 00 14 00 02 + 29 00]; + qcom,mdss-dsi-off-command = [05 01 00 00 14 00 02 28 00 + 05 01 00 00 78 00 02 10 00]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "burst_mode"; + qcom,mdss-dsi-lane-map = "lane_map_0123"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings + = [6a 16 0e 00 38 3c 12 1a 10 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x04>; + qcom,mdss-dsi-t-clk-pre = <0x17>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm"; + qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>; + qcom,mdss-dsi-bl-pmic-bank-select = <0>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-reset-sequence = <1 20>, <0 2>, <1 20>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/g36c1h/batterydata-qrd-mp-4v2-2000mah.dtsi b/arch/arm/boot/dts/qcom/g36c1h/batterydata-qrd-mp-4v2-2000mah.dtsi new file mode 100644 index 00000000000..5e0347b8cf7 --- /dev/null +++ b/arch/arm/boot/dts/qcom/g36c1h/batterydata-qrd-mp-4v2-2000mah.dtsi @@ -0,0 +1,119 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +qcom,qrd-hy-4v2-2000mah-data { + qcom,default-rbatt-mohm = <184>; + qcom,max-voltage-uv = <4210000>; + qcom,fcc-mah = <2000>; + qcom,rbatt-capacitive-mohm = <110>; + qcom,v-cutoff-uv = <3550000>; + qcom,chg-term-ua = <50000>; + qcom,batt-id-kohm = <47>; + qcom,flat-ocv-threshold-uv = <3800000>; + qcom,battery-type = "qrd_x1_4v2_2000mah"; + + qcom,fcc-temp-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-data = <2024 2033 2035 2031 2027>; + }; + + qcom,pc-temp-ocv-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1 >, + <0>; + qcom,lut-data = <4186 4186 4195 4195 4185>, + <4108 4106 4142 4142 4130>, + <4031 4038 4058 4057 4055>, + <3972 3990 4016 4016 4014>, + <3932 3952 3980 3980 3977>, + <3897 3917 3946 3946 3944>, + <3865 3886 3912 3916 3914>, + <3838 3857 3876 3886 3884>, + <3814 3832 3844 3850 3850>, + <3793 3810 3821 3820 3818>, + <3776 3790 3803 3802 3800>, + <3762 3774 3788 3788 3786>, + <3748 3763 3776 3777 3774>, + <3733 3752 3766 3766 3764>, + <3716 3744 3756 3754 3746>, + <3694 3734 3744 3738 3726>, + <3668 3721 3726 3720 3708>, + <3640 3706 3704 3700 3686>, + <3616 3692 3687 3679 3666>, + <3595 3678 3680 3672 3660>, + <3582 3669 3678 3670 3658>, + <3567 3660 3674 3668 3656>, + <3550 3647 3669 3664 3652>, + <3531 3632 3662 3657 3644>, + <3507 3610 3644 3642 3628>, + <3480 3581 3609 3608 3592>, + <3446 3542 3559 3560 3543>, + <3402 3488 3492 3495 3480>, + <3340 3406 3401 3410 3396>, + <3236 3263 3259 3281 3270>, + <3000 3000 3000 3015 3000>; + }; + qcom,rbatt-sf-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = < 1214 365 99 69 57>, + <1213 365 99 69 57>, + <1190 367 104 70 58>, + <1177 367 109 72 59>, + <1176 367 115 75 60>, + <1174 366 119 79 63>, + <1174 366 121 85 66>, + <1178 366 112 88 70>, + <1186 367 104 79 68>, + <1195 366 101 70 58>, + <1208 367 102 70 59>, + <1224 370 103 71 60>, + <1242 373 105 73 62>, + <1270 377 105 74 64>, + <1309 385 106 73 61>, + <1395 395 107 71 59>, + <1592 411 107 72 60>, + <1861 427 105 71 60>, + <1968 433 101 68 58>, + <2377 448 102 69 58>, + <2660 448 104 71 59>, + <3034 466 107 72 61>, + <3509 487 112 74 64>, + <4240 527 117 77 65>, + <5272 579 121 78 64>, + <6759 666 120 76 62>, + <9195 805 122 76 62>, + <13555 1037 130 79 64>, + <21792 1618 149 85 68>, + <39904 3237 227 112 91>, + <79808 6474 454 224 183>; + }; + qcom,ibat-acc-lut { + qcom,lut-col-legend = <(-20) 0 25>; + qcom,lut-row-legend = <0 250 500 1000>; + qcom,lut-data = <1911 1958 1999>, + <33 1655 1979>, + <3 947 1930>, + <1 393 1656>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/g36c1h/batterydata-qrd-wk-4v35-2000mah.dtsi b/arch/arm/boot/dts/qcom/g36c1h/batterydata-qrd-wk-4v35-2000mah.dtsi new file mode 100644 index 00000000000..67112022107 --- /dev/null +++ b/arch/arm/boot/dts/qcom/g36c1h/batterydata-qrd-wk-4v35-2000mah.dtsi @@ -0,0 +1,119 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +qcom,qrd-wk-4v35-2000mah-data { + qcom,default-rbatt-mohm = <138>; + qcom,max-voltage-uv = <4360000>; + qcom,fcc-mah = <2000>; + qcom,rbatt-capacitive-mohm = <110>; + qcom,v-cutoff-uv = <3550000>; + qcom,chg-term-ua = <50000>; + qcom,batt-id-kohm = <47>; + qcom,flat-ocv-threshold-uv = <3800000>; + qcom,battery-type = "qrd_x6_4v35_2000mah"; + + qcom,fcc-temp-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-data = <2024 2033 2035 2031 2027>; + }; + + qcom,pc-temp-ocv-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1 >, + <0>; + qcom,lut-data = <4343 4342 4346 4341 4345>, + <4232 4251 4252 4248 4246>, + <4164 4192 4193 4190 4188>, + <4110 4138 4138 4135 4133>, + <4065 4090 4087 4084 4082>, + <3966 4028 4038 4036 4034>, + <3922 3956 3984 3991 3990>, + <3884 3925 3951 3952 3951>, + <3850 3891 3905 3908 3909>, + <3824 3858 3864 3865 3865>, + <3804 3830 3836 3836 3836>, + <3786 3807 3814 3814 3813>, + <3772 3788 3796 3796 3795>, + <3757 3774 3781 3782 3780>, + <3744 3763 3768 3764 3758>, + <3728 3750 3754 3744 3732>, + <3710 3730 3736 3727 3713>, + <3691 3718 3718 3708 3694>, + <3672 3710 3700 3690 3678>, + <3654 3704 3690 3682 3670>, + <3645 3700 3688 3680 3668>, + <3634 3695 3687 3679 3667>, + <3622 3689 3684 3676 3665>, + <3604 3680 3679 3672 3659>, + <3584 3663 3666 3658 3641>, + <3558 3635 3634 3623 3608>, + <3524 3595 3586 3576 3562>, + <3478 3540 3526 3518 3504>, + <3408 3461 3446 3440 3424>, + <3284 3336 3331 3320 3302>, + <3000 3000 3036 3012 3000>; + }; + qcom,rbatt-sf-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <1519 272 100 80 72>, + <1519 272 100 80 72>, + <1430 276 101 81 73>, + <1372 279 104 83 75>, + <1351 280 108 86 76>, + <1246 290 114 90 78>, + <1250 269 121 95 81>, + <1257 271 128 101 84>, + <1271 269 116 99 86>, + <1297 270 102 86 76>, + <1334 274 100 83 73>, + <1377 281 103 83 75>, + <1426 291 106 86 78>, + <1481 304 110 91 82>, + <1551 322 112 88 77>, + <1638 346 109 85 74>, + <1757 375 112 86 75>, + <2036 424 114 88 77>, + <2436 493 113 88 76>, + <2769 549 116 88 77>, + <2915 575 118 91 80>, + <2845 564 120 92 81>, + <3206 596 123 94 83>, + <3678 639 129 97 86>, + <4309 693 131 96 82>, + <5148 763 129 91 80>, + <6335 868 136 95 81>, + <8116 1028 147 100 86>, + <10972 1271 167 113 92>, + <18999 2193 213 132 107>, + <37997 4386 426 264 213>; + }; + qcom,ibat-acc-lut { + qcom,lut-col-legend = <(-20) 0 25>; + qcom,lut-row-legend = <0 250 500 1000>; + qcom,lut-data = <1880 1918 1915>, + <184 1724 1882>, + <24 1334 1852>, + <6 768 1667>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/g36c1h/dsi-panel-ili9806e-fwvga-hsd-helitai-video.dtsi b/arch/arm/boot/dts/qcom/g36c1h/dsi-panel-ili9806e-fwvga-hsd-helitai-video.dtsi new file mode 100644 index 00000000000..259417bea24 --- /dev/null +++ b/arch/arm/boot/dts/qcom/g36c1h/dsi-panel-ili9806e-fwvga-hsd-helitai-video.dtsi @@ -0,0 +1,307 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/*--------------------------------------------------------------------------- + * This file is autogenerated file using gcdb parser. Please do not edit it. + * Update input XML file to add a new entry or update variable in this file + * VERSION = "1.0" + *---------------------------------------------------------------------------*/ +&mdss_mdp { + dsi_ili9806e_fwvga_hsd_hlt_vid: qcom,mdss_dsi_ili9806e_fwvga_hsd_hlt_video { + qcom,mdss-dsi-panel-name = "ILI9806E fwvga hsd helitai video mode dsi panel"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <480>; + qcom,mdss-dsi-panel-height = <854>; + qcom,mdss-dsi-h-front-porch = <80>; + qcom,mdss-dsi-h-back-porch = <80>; + qcom,mdss-dsi-h-pulse-width = <10>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <18>; + qcom,mdss-dsi-v-front-porch = <20>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-on-command = [ + 29 01 00 00 00 00 06 + FF FF 98 06 + 04 01 + 29 01 00 00 00 00 02 + 08 10 + 29 01 00 00 00 00 02 + 21 01 + 29 01 00 00 00 00 02 + 30 01 + 29 01 00 00 00 00 02 + 31 02 + 29 01 00 00 00 00 02 + 40 15 + 29 01 00 00 00 00 02 + 41 33 + 29 01 00 00 00 00 02 + 42 02 + 29 01 00 00 00 00 02 + 43 09 + 29 01 00 00 00 00 02 + 44 07 + 29 01 00 00 00 00 02 + 45 16 + 29 01 00 00 00 00 02 + 50 80 + 29 01 00 00 00 00 02 + 51 80 + 29 01 00 00 00 00 02 + 52 00 + 29 01 00 00 00 00 02 + 53 41 + 29 01 00 00 00 00 02 + 60 07 + 29 01 00 00 00 00 02 + 61 00 + 29 01 00 00 00 00 02 + 62 08 + 29 01 00 00 00 00 02 + 63 00 + 29 01 00 00 00 00 02 + A0 00 + 29 01 00 00 00 00 02 + A1 03 + 29 01 00 00 00 00 02 + A2 09 + 29 01 00 00 00 00 02 + A3 0D + 29 01 00 00 00 00 02 + A4 06 + 29 01 00 00 00 00 02 + A5 16 + 29 01 00 00 00 00 02 + A6 09 + 29 01 00 00 00 00 02 + A7 08 + 29 01 00 00 00 00 02 + A8 03 + 29 01 00 00 00 00 02 + A9 07 + 29 01 00 00 00 00 02 + AA 06 + 29 01 00 00 00 00 02 + AB 05 + 29 01 00 00 00 00 02 + AC 0D + 29 01 00 00 00 00 02 + AD 2C + 29 01 00 00 00 00 02 + AE 26 + 29 01 00 00 00 00 02 + AF 00 + 29 01 00 00 00 00 02 + C0 00 + 29 01 00 00 00 00 02 + C1 04 + 29 01 00 00 00 00 02 + C2 0B + 29 01 00 00 00 00 02 + C3 0F + 29 01 00 00 00 00 02 + C4 09 + 29 01 00 00 00 00 02 + C5 18 + 29 01 00 00 00 00 02 + C6 07 + 29 01 00 00 00 00 02 + C7 08 + 29 01 00 00 00 00 02 + C8 05 + 29 01 00 00 00 00 02 + C9 09 + 29 01 00 00 00 00 02 + CA 07 + 29 01 00 00 00 00 02 + CB 05 + 29 01 00 00 00 00 02 + CC 0C + 29 01 00 00 00 00 02 + CD 2D + 29 01 00 00 00 00 02 + CE 28 + 29 01 00 00 00 00 02 + CF 00 + 29 01 00 00 00 00 06 + FF FF 98 06 + 04 06 + 29 01 00 00 00 00 02 + 00 20 + 29 01 00 00 00 00 02 + 01 0A + 29 01 00 00 00 00 02 + 02 00 + 29 01 00 00 00 00 02 + 03 00 + 29 01 00 00 00 00 02 + 04 01 + 29 01 00 00 00 00 02 + 05 01 + 29 01 00 00 00 00 02 + 06 80 + 29 01 00 00 00 00 02 + 07 06 + 29 01 00 00 00 00 02 + 08 04 + 29 01 00 00 00 00 02 + 09 80 + 29 01 00 00 00 00 02 + 0A 00 + 29 01 00 00 00 00 02 + 0B 00 + 29 01 00 00 00 00 02 + 0C 01 + 29 01 00 00 00 00 02 + 0D 01 + 29 01 00 00 00 00 02 + 0E 00 + 29 01 00 00 00 00 02 + 0F 00 + 29 01 00 00 00 00 02 + 10 F0 + 29 01 00 00 00 00 02 + 11 F4 + 29 01 00 00 00 00 02 + 12 01 + 29 01 00 00 00 00 02 + 13 00 + 29 01 00 00 00 00 02 + 14 00 + 29 01 00 00 00 00 02 + 15 C0 + 29 01 00 00 00 00 02 + 16 08 + 29 01 00 00 00 00 02 + 17 00 + 29 01 00 00 00 00 02 + 18 00 + 29 01 00 00 00 00 02 + 19 00 + 29 01 00 00 00 00 02 + 1A 00 + 29 01 00 00 00 00 02 + 1B 00 + 29 01 00 00 00 00 02 + 1C 00 + 29 01 00 00 00 00 02 + 1D 00 + 29 01 00 00 00 00 02 + 20 01 + 29 01 00 00 00 00 02 + 21 23 + 29 01 00 00 00 00 02 + 22 45 + 29 01 00 00 00 00 02 + 23 67 + 29 01 00 00 00 00 02 + 24 01 + 29 01 00 00 00 00 02 + 25 23 + 29 01 00 00 00 00 02 + 26 45 + 29 01 00 00 00 00 02 + 27 67 + 29 01 00 00 00 00 02 + 30 01 + 29 01 00 00 00 00 02 + 31 11 + 29 01 00 00 00 00 02 + 32 00 + 29 01 00 00 00 00 02 + 33 EE + 29 01 00 00 00 00 02 + 34 FF + 29 01 00 00 00 00 02 + 35 BB + 29 01 00 00 00 00 02 + 36 AA + 29 01 00 00 00 00 02 + 37 DD + 29 01 00 00 00 00 02 + 38 CC + 29 01 00 00 00 00 02 + 39 76 + 29 01 00 00 00 00 02 + 3A 67 + 29 01 00 00 00 00 02 + 3B 22 + 29 01 00 00 00 00 02 + 3C 22 + 29 01 00 00 00 00 02 + 3D 22 + 29 01 00 00 00 00 02 + 3E 22 + 29 01 00 00 00 00 02 + 3F 22 + 29 01 00 00 00 00 02 + 40 22 + 29 01 00 00 00 00 02 + 52 10 + 29 01 00 00 00 00 02 + 53 10 + 29 01 00 00 00 00 06 + FF FF 98 06 + 04 07 + 29 01 00 00 00 00 02 + 18 1D + 29 01 00 00 00 00 02 + 17 22 + 29 01 00 00 00 00 02 + 02 77 + 29 01 00 00 00 00 02 + E1 79 + 29 01 00 00 00 00 06 + FF FF 98 06 + 04 00 + 05 01 00 00 78 00 02 + 11 00 + 05 01 00 00 32 00 02 + 29 00 + ]; + qcom,mdss-dsi-off-command = [05 01 00 00 32 00 02 28 00 + 05 01 00 00 78 00 02 10 00]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_pulse"; + qcom,mdss-dsi-lane-map = "lane_map_3012"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-panel-timings = [72 19 11 00 3C 46 14 1C 1C 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x04>; + qcom,mdss-dsi-t-clk-pre = <0x1b>; + qcom,mdss-dsi-bl-min-level = <26>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm"; + qcom,mdss-dsi-bl-pmic-pwm-frequency = <60>; + qcom,mdss-dsi-bl-pmic-bank-select = <0>; + qcom,mdss-dsi-pwm-gpio = <&pm8916_mpps 4 0>; + qcom,mdss-dsi-reset-sequence = <1 5>, <0 20>, <1 120>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/g36c1h/msm8916-camera-sensor-g36c1h.dtsi b/arch/arm/boot/dts/qcom/g36c1h/msm8916-camera-sensor-g36c1h.dtsi new file mode 100644 index 00000000000..220727a6c52 --- /dev/null +++ b/arch/arm/boot/dts/qcom/g36c1h/msm8916-camera-sensor-g36c1h.dtsi @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&soc { + gpio-leds { + compatible = "gpio-leds"; + status = "ok"; + + gpio_flash: gpio-flash { + gpios = <&pm8916_gpios 3 0>; + label = "gpio-flash"; + linux,default-trigger = "gpio_flash_trigger"; + }; + }; + +}; + +&cci { + + actuator0: qcom,actuator@6e { + cell-index = <3>; + reg = <0x6c>; + compatible = "qcom,actuator"; + qcom,cci-master = <0>; + }; + + led_flash0: qcom,camera-led-flash { + cell-index = <0>; + compatible = "qcom,camera-led-flash"; + qcom,flash-type = <3>; + qcom,flash-source = <&gpio_flash>; + qcom,torch-source = <&gpio_flash>; + }; + + qcom,camera@0 { + cell-index = <0>; + compatible = "qcom,camera"; + reg = <0x0>; + qcom,csiphy-sd-index = <0>; + qcom,csid-sd-index = <0>; + qcom,mount-angle = <90>; + qcom,actuator-src = <&actuator0>; + qcom,led-flash-src = <&led_flash0>; + cam_vdig-supply = <&pm8916_l2>; + cam_vana-supply = <&pm8916_l17>; + cam_vio-supply = <&pm8916_l6>; + cam_vaf-supply = <&pm8916_l10>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana", + "cam_vaf"; + /*qcom,cam-vreg-type = <0 1 0 0>;*/ + qcom,cam-vreg-min-voltage = <1200000 0 2850000 2800000>; + qcom,cam-vreg-max-voltage = <1200000 0 2850000 2800000>; + qcom,cam-vreg-op-mode = <200000 0 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 34 0>, + <&msm_gpio 32 0>, + <&msm_gpio 10 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-vana = <3>; + qcom,gpio-vdig = <4>; + qcom,gpio-req-tbl-num = <0 1 2 3 4>; + qcom,gpio-req-tbl-flags = <1 0 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET1", + "CAM_STANDBY", + "CAM_VANA", + "CAM_VDIG"; + qcom,sensor-position = <0>; + qcom,sensor-mode = <0>; + qcom,cci-master = <0>; + qcom,mclk-23880000; + status = "ok"; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@1 { + cell-index = <1>; + compatible = "qcom,camera"; + reg = <0x1>; + qcom,csiphy-sd-index = <1>; + qcom,csid-sd-index = <1>; + qcom,mount-angle = <90>; + cam_vdig-supply = <&pm8916_l2>; + cam_vana-supply = <&pm8916_l17>; + cam_vio-supply = <&pm8916_l6>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana"; + + /*qcom,cam-vreg-type = <0 1 0>;*/ + qcom,cam-vreg-min-voltage = <1200000 0 2850000>; + qcom,cam-vreg-max-voltage = <1200000 0 2850000>; + qcom,cam-vreg-op-mode = <200000 0 80000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_default &cam_sensor_front_default>; + pinctrl-1 = <&cam_sensor_mclk1_sleep &cam_sensor_front_sleep>; + gpios = <&msm_gpio 27 0>, + <&msm_gpio 28 0>, + <&msm_gpio 33 0>, + <&msm_gpio 32 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-vana = <3>; + qcom,gpio-req-tbl-num = <0 1 2 3>; + qcom,gpio-req-tbl-flags = <1 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET", + "CAM_STANDBY", + "CAM_VANA"; + qcom,sensor-position = <1>; + qcom,sensor-mode = <1>; + qcom,cci-master = <0>; + qcom,mclk-23880000; + status = "ok"; + clocks = <&clock_gcc clk_mclk1_clk_src>, + <&clock_gcc clk_gcc_camss_mclk1_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; +}; + diff --git a/arch/arm/boot/dts/qcom/g36c1h/msm8916-g36c1h.dtsi b/arch/arm/boot/dts/qcom/g36c1h/msm8916-g36c1h.dtsi new file mode 100644 index 00000000000..652fab9e14f --- /dev/null +++ b/arch/arm/boot/dts/qcom/g36c1h/msm8916-g36c1h.dtsi @@ -0,0 +1,328 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "msm8916-camera-sensor-g36c1h.dtsi" +#include "dsi-panel-ili9806e-fwvga-hsd-helitai-video.dtsi" + +&soc { + gpio-leds { + compatible = "gpio-leds"; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&button_backlight_off>; + + keypad-backlight { + gpios = <&msm_gpio 119 0>; + label = "button-backlight"; + linux,default-trigger = "none"; + }; + }; + + sound { + compatible = "qcom,msm8x16-audio-codec"; + qcom,model = "msm8x16-skui-snd-card"; + qcom,msm-snd-card-id = <0>; + qcom,msm-ext-pa = "primary"; + qcom,msm-codec-type = "internal"; + qcom,msm-mbhc-hphl-swh = <1>; + qcom,msm-mbhc-gnd-swh = <0>; + qcom,msm-hs-micbias-type = "internal"; + qcom,audio-routing = + "RX_BIAS", "MCLK", + "SPK_RX_BIAS", "MCLK", + "INT_LDO_H", "MCLK", + "MIC BIAS Internal1", "Handset Mic", + "MIC BIAS Internal2", "Headset Mic", + "MIC BIAS Internal1", "Secondary Mic", + "AMIC1", "MIC BIAS Internal1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS Internal1"; + pinctrl-names = "cdc_lines_act", + "cdc_lines_sus"; + pinctrl-0 = <&cdc_pdm_lines_act>; + pinctrl-1 = <&cdc_pdm_lines_sus>; + asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>, + <&loopback>, <&compress>, <&hostless>, + <&afe>, <&lsm>, <&routing>, <&lpa>; + asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1", + "msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback", + "msm-compress-dsp", "msm-pcm-hostless", "msm-pcm-afe", + "msm-lsm-client", "msm-pcm-routing", "msm-pcm-lpa"; + asoc-cpu = <&dai_pri_auxpcm>, <&dai_hdmi>, + <&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, <&dai_mi2s3>, + <&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>, + <&sb_3_rx>, <&sb_3_tx>, <&sb_4_rx>, <&sb_4_tx>, + <&bt_sco_rx>, <&bt_sco_tx>, <&bt_a2dp_rx>, + <&int_fm_rx>, <&int_fm_tx>, + <&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>, <&afe_proxy_tx>, + <&incall_record_rx>, <&incall_record_tx>, <&incall_music_rx>, + <&incall_music_2_rx>; + asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8", + "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1", + "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3", + "msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385", + "msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387", + "msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391", + "msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393", + "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289", + "msm-dai-q6-dev.12290", "msm-dai-q6-dev.12292", + "msm-dai-q6-dev.12293", "msm-dai-q6-dev.224", + "msm-dai-q6-dev.225", "msm-dai-q6-dev.241", + "msm-dai-q6-dev.240", "msm-dai-q6-dev.32771", + "msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773", + "msm-dai-q6-dev.32770"; + asoc-codec = <&stub_codec>, <&pm8916_tombak_dig>; + asoc-codec-names = "msm-stub-codec.1", "tombak_codec"; + }; + + i2c@78b9000 { /* BLSP1 QUP5 */ + mstar@26{ + compatible = "mstar,msg213xa"; + reg = <0x26>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2>; + vdd-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + mstar,family-id = <0x02>; + mstar,reset-gpio = <&msm_gpio 12 0x00>; + mstar,irq-gpio = <&msm_gpio 13 0x00>; + mstar,display-coords = <0 0 480 854>; + mstar,panel-coords = <0 0 480 946>; + mstar,button-map= <158 102 139>; + mstar,no-force-update; + mstar,i2c-pull-up; + }; + mstar@26{ + compatible = "mstar,msg26xx"; + reg = <0x26>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2>; + vdd-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + mstar,family-id = <0x02>; + mstar,reset-gpio = <&msm_gpio 12 0x00>; + mstar,irq-gpio = <&msm_gpio 13 0x00>; + mstar,display-coords = <0 0 720 1280>; + mstar,panel-coords = <0 0 720 1380>; + mstar,button-map= <139 172 158>; + mstar,no-force-update; + mstar,i2c-pull-up; + }; + mstar@26{ + compatible = "mstar,msg2xxx"; + reg = <0x26>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2>; + vdd-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + mstar,family-id = <0x02>; + mstar,reset-gpio = <&msm_gpio 12 0x00>; + mstar,irq-gpio = <&msm_gpio 13 0x00>; + mstar,display-coords = <0 0 480 854>; + mstar,panel-coords = <0 0 480 946>; + mstar,button-map= <580 158 172>; + mstar,no-force-update; + mstar,i2c-pull-up; + }; + }; + + gen-vkeys { + compatible = "qcom,gen-vkeys"; + label = "ft5x06_ts"; + qcom,disp-maxx = <480>; + qcom,disp-maxy = <854>; + qcom,panel-maxx = <480>; + qcom,panel-maxy = <946>; + qcom,key-codes = <139 172 158>; + qcom,y-offset = <0>; + }; + + gpio-leds { + keypad-backlight { + gpios = <&pm8916_gpios 2 0>; + + }; + }; + + usb_otg: usb@78d9000 { + qcom,hsusb-otg-phy-init-seq = + <0x44 0x80 0x6F 0x81 0x30 0x82 0x33 0x83 0xffffffff>; + }; + + ramoops { + compatible = "ramoops"; + status = "ok"; + + android,ramoops-buffer-start = <0x8c400000>; + android,ramoops-buffer-size = <0x100000>; + android,ramoops-console-size = <0x80000>; + android,ramoops-record-size = <0x20000>; + android,ramoops-dump-oops = <0x1>; + }; +}; + +&pm8916_mpps { + mpp@a300 { /* MPP 4 */ + /* Backlight PWM */ + qcom,mode = <1>; /* Digital output */ + qcom,invert = <0>; /* Disable invert */ + qcom,src-sel = <4>; /* DTEST1 */ + qcom,vin-sel = <0>; /* VPH_PWR */ + qcom,master-en = <1>; /* Enable MPP */ + }; +}; + +&mdss_mdp { + qcom,mdss-pref-prim-intf = "dsi"; +}; + +&pmx_mdss { + qcom,num-grp-pins = <1>; + qcom,pins = <&gp 25>; +}; + +&mdss_dsi0 { + qcom,dsi-pref-prim-pan = <&dsi_otm8019a_fwvga_video>; + pinctrl-names = "mdss_default", "mdss_sleep"; + pinctrl-0 = <&mdss_dsi_active>; + pinctrl-1 = <&mdss_dsi_suspend>; + + qcom,platform-reset-gpio = <&msm_gpio 25 0>; +}; + +&tlmm_pinmux { + bma2x2_int1_pin { + qcom,pins = <&gp 112>; + qcom,num-grp-pins = <1>; + label = "bma2x2_int1_pin"; + bma2x2_int1_default: int1_default { + drive-strength = <6>; + bias-pull-up; + }; + }; + + bma2x2_int2_pin { + qcom,pins = <&gp 114>; + qcom,num-grp-pins = <1>; + label = "bma2x2_int2_pin"; + bma2x2_int2_default: int2_default { + drive-strength = <6>; + bias-pull-up; + }; + }; +}; + +&i2c_0 { /* BLSP1 QUP2 */ + memsic@30 { /* Magnetic field sensor */ + compatible = "memsic,mmc3416x"; + reg = <0x30>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + memsic,dir = "obverse-x-axis-forward"; + memsic,auto-report; + }; + + di_ap3426@1e { + compatible = "di_ap3426"; + reg = <0x1e>; + interrupt-parent = <&msm_gpio>; + interrupts = <113 0x2002>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + ap3426,irq-gpio = <&msm_gpio 113 0x2002>; + ap3426,ps-thdl = <300>; + ap3426,ps-thdh = <450>; + ap3426,ps-calibration-min = <0>; + ap3426,ps-calibration-expected = <0>; + ap3426,ps-calibration-max = <500>; + ap3426,ps-integrated-time = <0x8>; + }; + + kionix@e { + compatible = "kionix,kionix_accel"; + reg = <0x0e>; + interrupt-parent = <&msm_gpio>; + interrupts = <112 0x2>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + kionix,min-interval = <5>; + kionix,poll-interval = <200>; + kionix,accel-direction = <0>; + kionix,accel-irq-use-drdy = <0>; + kionix,accel-res = <12>; + kionix,accel-g-range = <2>; + }; +}; + +&sdc2_cd_on { + /delete-property/ bias-pull-up; + bias-pull-down; +}; + +&sdc2_cd_off { + /delete-property/ bias-disable; + bias-pull-down; +}; + +&sdhc_2 { + interrupts = <0 1>; + interrupt-map = <0 &intc 0 125 0 + 1 &intc 0 221 0>; + interrupt-names = "hc_irq", "pwr_irq"; + /delete-property/ cd-gpios; +}; + +&pm8916_chg { + qcom,vddmax-mv = <4360>; + qcom,vddsafe-mv = <4380>; + qcom,vinmin-mv = <4470>; + qcom,batt-hot-percentage = <25>; + qcom,batt-cold-percentage = <80>; + qcom,tchg-mins = <150>; + qcom,disable-vbatdet-based-recharge; + status = "okay"; +}; + +&pm8916_bms { + status = "okay"; + qcom,force-bms-active-on-charger; + qcom,battery-data = <&qrd_batterydata>; + +}; + +/ { + qrd_batterydata: qcom,battery-data { + qcom,rpull-up-kohm = <68>; + qcom,vref-batt-therm = <1800000>; + + #include "batterydata-qrd-wk-4v35-2000mah.dtsi" + }; +}; + +&pm8916_gpios { + gpio@c200 { /* GPIO 3 */ + /* External regulator control for WTR */ + status = "ok"; + }; +}; + +/ { + memory { + pstore_reserve_mem: pstore_reserve_region@0 { + linux,reserve-contiguous-region; + linux,reserve-region; + linux,remove-completely; + reg = <0x0 0x8c400000 0x0 0x00100000>; + label = "pstore_reserve_mem"; + }; + }; +}; diff --git a/arch/arm/boot/dts/qcom/l8150/batterydata-l8150-jd-4v35-2500mah.dtsi b/arch/arm/boot/dts/qcom/l8150/batterydata-l8150-jd-4v35-2500mah.dtsi new file mode 100755 index 00000000000..56027675acf --- /dev/null +++ b/arch/arm/boot/dts/qcom/l8150/batterydata-l8150-jd-4v35-2500mah.dtsi @@ -0,0 +1,108 @@ +qcom,l8150-jd-4v35-2500mah-data { + qcom,fcc-mah = <2500>; + qcom,default-rbatt-mohm = <161>; + qcom,rbatt-capacitive-mohm = <0>; + qcom,flat-ocv-threshold-uv = <3800000>; + qcom,max-voltage-uv = <4350000>; + qcom,v-cutoff-uv = <3400000>; + qcom,chg-term-ua = <100000>; + qcom,batt-id-kohm = <470>; + qcom,battery-type = "jd_4v35_2500mah"; + + qcom,fcc-temp-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-data = <2601 2590 2588 2581 2551>; + }; + qcom,pc-temp-ocv-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <4336 4332 4330 4326 4322>, + <4264 4267 4265 4262 4259>, + <4205 4210 4208 4205 4201>, + <4151 4155 4153 4150 4146>, + <4099 4102 4100 4097 4093>, + <4049 4056 4049 4047 4044>, + <3965 3992 4001 4002 3998>, + <3925 3956 3962 3960 3957>, + <3893 3912 3919 3918 3916>, + <3860 3869 3872 3871 3869>, + <3832 3839 3839 3838 3838>, + <3810 3816 3817 3815 3814>, + <3791 3798 3798 3797 3795>, + <3778 3783 3783 3782 3779>, + <3768 3771 3767 3762 3756>, + <3756 3759 3747 3738 3725>, + <3739 3742 3729 3719 3703>, + <3721 3722 3709 3698 3684>, + <3707 3701 3688 3678 3664>, + <3700 3693 3681 3673 3660>, + <3696 3691 3680 3672 3659>, + <3693 3690 3679 3670 3657>, + <3688 3688 3677 3669 3656>, + <3681 3685 3674 3666 3652>, + <3668 3679 3666 3657 3638>, + <3635 3657 3641 3629 3604>, + <3583 3614 3597 3585 3557>, + <3511 3555 3537 3520 3497>, + <3408 3475 3457 3439 3418>, + <3239 3356 3336 3311 3299>, + <3000 3000 3000 3000 3044>; + }; + qcom,rbatt-sf-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 16 13 11>, + <10 9 8 7 6>, + <5 4 3 2 1>, + <0>; + qcom,lut-data = <257 126 100 95 93>, + <257 126 100 95 93>, + <265 128 101 96 93>, + <270 131 103 97 93>, + <272 136 104 98 94>, + <278 143 106 100 95>, + <250 145 109 102 96>, + <245 152 114 105 98>, + <241 140 115 106 100>, + <236 125 104 100 94>, + <235 121 100 95 93>, + <235 122 101 96 94>, + <236 122 102 98 95>, + <239 123 104 100 97>, + <245 124 103 98 96>, + <254 124 99 95 93>, + <268 125 100 96 93>, + <281 126 100 96 94>, + <290 124 99 95 92>, + <311 125 99 95 93>, + <326 126 101 97 94>, + <345 129 103 98 96>, + <368 131 104 101 100>, + <396 135 106 103 102>, + <427 139 108 104 99>, + <450 139 105 98 96>, + <508 139 104 100 96>, + <604 145 108 103 100>, + <764 158 116 111 104>, + <1784 194 142 149 118>, + <193225 126232 155340 133021 547>; + }; + + qcom,ibat-acc-lut { + qcom,lut-col-legend = <(-20) 0 25>; + qcom,lut-row-legend = <0 250 500 1000>; + qcom,lut-data = <2549 2564 2536>, + <2139 2493 2492>, + <1829 2461 2481>, + <1028 2253 2427>; + }; + +}; diff --git a/arch/arm/boot/dts/qcom/l8150/dsi-panel-booyiOTM1287-720p-video.dtsi b/arch/arm/boot/dts/qcom/l8150/dsi-panel-booyiOTM1287-720p-video.dtsi new file mode 100755 index 00000000000..23d09ab2e3b --- /dev/null +++ b/arch/arm/boot/dts/qcom/l8150/dsi-panel-booyiOTM1287-720p-video.dtsi @@ -0,0 +1,313 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/*--------------------------------------------------------------------------- + * This file is autogenerated file using gcdb parser. Please do not edit it. + * Update input XML file to add a new entry or update variable in this file + * VERSION = "1.0" + *---------------------------------------------------------------------------*/ +&mdss_mdp { + dsi_booyiOTM1287_720p_vid: qcom,mdss_dsi_booyi_OTM1287_720p_video { + qcom,mdss-dsi-panel-name = "booyi OTM1287 720p video mode dsi panel"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <720>; + qcom,mdss-dsi-panel-height = <1280>; + qcom,mdss-dsi-h-front-porch = <90>; + qcom,mdss-dsi-h-back-porch = <90>; + qcom,mdss-dsi-h-pulse-width = <10>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-front-porch = <20>; + qcom,mdss-dsi-v-back-porch = <16>; + qcom,mdss-dsi-v-pulse-width = <4>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-color-order = "rgb_swap_rgb"; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-pan-physical-width-dimension = <62>; + qcom,mdss-pan-physical-height-dimension = <110>; + qcom,mdss-dsi-on-command = [ + 39 01 00 00 01 00 02 + 00 00 + 39 01 00 00 01 00 04 + ff 12 87 01 + 39 01 00 00 01 00 02 + 00 80 + 39 01 00 00 01 00 03 + ff 12 87 + 39 01 00 00 01 00 02 + 00 92 + 39 01 00 00 01 00 02 + ff 30 + 39 01 00 00 01 00 02 + 00 80 + 39 01 00 00 01 00 0A + c0 00 64 00 0f 11 00 64 0f 11 + 39 01 00 00 01 00 02 + 00 90 + 39 01 00 00 01 00 07 + c0 00 5c 00 01 00 04 + 39 01 00 00 01 00 02 + 00 a4 + 39 01 00 00 01 00 02 + c0 00 + 39 01 00 00 01 00 02 + 00 b3 + 39 01 00 00 01 00 03 + c0 00 55 + 39 01 00 00 01 00 02 + 00 81 + 39 01 00 00 01 00 02 + c1 55 + 39 01 00 00 01 00 02 + 00 90 + 39 01 00 00 01 00 05 + f5 02 11 02 15 + 39 01 00 00 01 00 02 + 00 90 + 39 01 00 00 01 00 02 + c5 50 + 39 01 00 00 01 00 02 + 00 94 + 39 01 00 00 01 00 02 + c5 66 + 39 01 00 00 01 00 02 + 00 b2 + 39 01 00 00 01 00 03 + f5 00 00 + 39 01 00 00 01 00 02 + 00 b6 + 39 01 00 00 01 00 03 + f5 00 00 + 39 01 00 00 01 00 02 + 00 94 + 39 01 00 00 01 00 03 + f5 00 00 + 39 01 00 00 01 00 02 + 00 d2 + 39 01 00 00 01 00 03 + f5 06 15 + 39 01 00 00 01 00 02 + 00 b4 + 39 01 00 00 01 00 02 + c5 cc + 39 01 00 00 01 00 02 + 00 a0 + 39 01 00 00 01 00 0F + c4 05 10 06 02 05 15 10 05 10 07 02 05 15 10 + 39 01 00 00 01 00 02 + 00 b0 + 39 01 00 00 01 00 03 + c4 00 00 + 39 01 00 00 01 00 02 + 00 91 + 39 01 00 00 01 00 03 + c5 19 52 + 39 01 00 00 01 00 02 + 00 00 + 39 01 00 00 01 00 03 + d8 bc bc + 39 01 00 00 01 00 02 + 00 b3 + 39 01 00 00 01 00 02 + c5 84 + 39 01 00 00 01 00 02 + 00 bb + 39 01 00 00 01 00 02 + c5 8a + 39 01 00 00 01 00 02 + 00 82 + 39 01 00 00 01 00 02 + c4 0a + 39 01 00 00 01 00 02 + 00 00 + 39 01 00 00 01 00 15 + E1 05 44 54 61 72 7F 81 A9 98 B0 55 41 56 38 3A 2E 23 19 0C 05 + 39 01 00 00 01 00 02 + 00 00 + 39 01 00 00 01 00 15 + E2 05 44 54 61 72 80 80 A9 99 B0 54 41 56 38 3A 2F 23 1A 0D 05 + 39 01 00 00 01 00 02 + 00 00 + 39 01 00 00 01 00 02 + d9 71 + 39 01 00 00 01 00 02 + 00 80 + 39 01 00 00 01 00 0C + cb 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 90 + 39 01 00 00 01 00 10 + cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 a0 + 39 01 00 00 01 00 10 + cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 b0 + 39 01 00 00 01 00 10 + cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 c0 + 39 01 00 00 01 00 10 + cb 05 05 05 05 05 05 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 d0 + 39 01 00 00 01 00 10 + cb 00 00 00 00 00 05 05 05 05 05 05 05 05 00 00 + 39 01 00 00 01 00 02 + 00 e0 + 39 01 00 00 01 00 0F + cb 00 00 00 00 00 00 00 00 00 00 00 00 05 05 + 39 01 00 00 01 00 02 + 00 f0 + 39 01 00 00 01 00 0C + cb ff ff ff ff ff ff ff ff ff ff ff + 39 01 00 00 01 00 02 + 00 80 + 39 01 00 00 01 00 10 + CC 09 0B 0D 0F 01 03 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 90 + 39 01 00 00 01 00 10 + CC 00 00 00 00 00 2E 2D 0A 0C 0E 10 02 04 00 00 + 39 01 00 00 01 00 02 + 00 A0 + 39 01 00 00 01 00 0F + CC 00 00 00 00 00 00 00 00 00 00 00 00 2E 2D + 39 01 00 00 01 00 02 + 00 B0 + 39 01 00 00 01 00 10 + CC 10 0E 0C 0A 04 02 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 C0 + 39 01 00 00 01 00 10 + CC 00 00 00 00 00 2D 2E 0F 0D 0B 09 03 01 00 00 + 39 01 00 00 01 00 02 + 00 D0 + 39 01 00 00 01 00 0F + CC 00 00 00 00 00 00 00 00 00 00 00 00 2D 2E + 39 01 00 00 01 00 02 + 00 80 + 39 01 00 00 01 00 0D + CE 8B 03 00 8A 03 00 89 03 00 88 03 00 + 39 01 00 00 01 00 02 + 00 90 + 39 01 00 00 01 00 0F + CE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 A0 + 39 01 00 00 01 00 0F + CE 38 07 84 FC 8B 04 00 38 06 84 FD 8B 04 00 + 39 01 00 00 01 00 02 + 00 B0 + 39 01 00 00 01 00 0F + CE 38 05 84 FE 8B 04 00 38 04 84 FF 8B 04 00 + 39 01 00 00 01 00 02 + 00 C0 + 39 01 00 00 01 00 0F + CE 38 03 85 00 8B 04 00 38 02 85 01 8B 04 00 + 39 01 00 00 01 00 02 + 00 D0 + 39 01 00 00 01 00 0F + CE 38 01 85 02 8B 04 00 38 00 85 03 8B 04 00 + 39 01 00 00 01 00 02 + 00 80 + 39 01 00 00 01 00 0F + CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 90 + 39 01 00 00 01 00 0F + CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 A0 + 39 01 00 00 01 00 0F + CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 B0 + 39 01 00 00 01 00 0F + CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 01 00 02 + 00 C0 + 39 01 00 00 01 00 0C + CF 01 01 20 20 00 00 01 01 00 02 02 + 39 01 00 00 01 00 02 + 00 b5 + 39 01 00 00 01 00 07 + c5 33 f1 ff 33 f1 ff + 39 01 00 00 01 00 02 + 00 B1 + 39 01 00 00 01 00 02 + c6 05 + 39 01 00 00 01 00 02 + 00 00 + 39 01 00 00 01 00 02 + 35 01 + 39 01 00 00 01 00 02 + 00 00 + 39 01 00 00 01 00 04 + ff ff ff ff + + 05 01 00 00 78 00 02 + 11 00 + 05 01 00 00 00 00 02 + 29 00 + ]; + qcom,mdss-dsi-off-command = [ + 05 01 00 00 32 00 02 + 28 00 + 05 01 00 00 78 00 02 + 10 00 + ]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-h-sync-pulse = <0>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_pulse"; + qcom,mdss-dsi-lane-map = "lane_map_0123"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [82 1a 12 00 40 42 16 1e 14 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x04>; + qcom,mdss-dsi-t-clk-pre = <0x1b>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm"; + qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>; + qcom,mdss-dsi-bl-pmic-bank-select = <0>; + qcom,mdss-dsi-pwm-gpio = <&pm8916_mpps 4 0>; + qcom,mdss-dsi-reset-sequence = <1 20>, <0 10>, <1 20>; + + //add lcd esd + qcom,mdss-dsi-panel-status-command = [06 01 00 01 05 00 02 AC 08]; + qcom,mdss-dsi-panel-status-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-panel-status-check-mode = "reg_read"; + qcom,mdss-dsi-panel-status-value = <0x00>; + qcom,esd-check-enabled; + //esd end + }; +}; + diff --git a/arch/arm/boot/dts/qcom/l8150/dsi-panel-dijingILI9881C-720p-video.dtsi b/arch/arm/boot/dts/qcom/l8150/dsi-panel-dijingILI9881C-720p-video.dtsi new file mode 100755 index 00000000000..e33ad748e5a --- /dev/null +++ b/arch/arm/boot/dts/qcom/l8150/dsi-panel-dijingILI9881C-720p-video.dtsi @@ -0,0 +1,471 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/*--------------------------------------------------------------------------- + * This file is autogenerated file using gcdb parser. Please do not edit it. + * Update input XML file to add a new entry or update variable in this file + * VERSION = "1.0" + *---------------------------------------------------------------------------*/ +&mdss_mdp { + dsi_dijingILI9881C_720p_vid: qcom,mdss_dsi_dijing_ILI9881C_720p_video { + qcom,mdss-dsi-panel-name = "dijing ILI9881C 720p video mode dsi panel"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <720>; + qcom,mdss-dsi-panel-height = <1280>; + qcom,mdss-dsi-h-front-porch = <150>; + qcom,mdss-dsi-h-back-porch = <150>; + qcom,mdss-dsi-h-pulse-width = <10>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-front-porch = <20>; + qcom,mdss-dsi-v-back-porch = <19>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-color-order = "rgb_swap_rgb"; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-pan-physical-width-dimension = <62>; + qcom,mdss-pan-physical-height-dimension = <110>; + qcom,mdss-dsi-on-command = [ + 29 01 00 00 01 00 04 + FF 98 81 03 + 23 01 00 00 01 00 02 + 01 00 + 23 01 00 00 01 00 02 + 02 00 + 23 01 00 00 01 00 02 + 03 72 + 23 01 00 00 01 00 02 + 04 00 + 23 01 00 00 01 00 02 + 05 00 + 23 01 00 00 01 00 02 + 06 09 + 23 01 00 00 01 00 02 + 07 00 + 23 01 00 00 01 00 02 + 08 00 + 23 01 00 00 01 00 02 + 09 01 + 23 01 00 00 01 00 02 + 0A 00 + 23 01 00 00 01 00 02 + 0B 00 + 23 01 00 00 01 00 02 + 0C 01 + 23 01 00 00 01 00 02 + 0D 00 + 23 01 00 00 01 00 02 + 0E 00 + 23 01 00 00 01 00 02 + 0F 14 + 23 01 00 00 01 00 02 + 10 14 + 23 01 00 00 01 00 02 + 11 00 + 23 01 00 00 01 00 02 + 12 00 + 23 01 00 00 01 00 02 + 13 00 + 23 01 00 00 01 00 02 + 14 00 + 23 01 00 00 01 00 02 + 15 00 + 23 01 00 00 01 00 02 + 16 00 + 23 01 00 00 01 00 02 + 17 00 + 23 01 00 00 01 00 02 + 18 00 + 23 01 00 00 01 00 02 + 19 00 + 23 01 00 00 01 00 02 + 1A 00 + 23 01 00 00 01 00 02 + 1B 00 + 23 01 00 00 01 00 02 + 1C 00 + 23 01 00 00 01 00 02 + 1D 00 + 23 01 00 00 01 00 02 + 1E 40 + 23 01 00 00 01 00 02 + 1F 80 + 23 01 00 00 01 00 02 + 20 05 + 23 01 00 00 01 00 02 + 21 02 + 23 01 00 00 01 00 02 + 22 00 + 23 01 00 00 01 00 02 + 23 00 + 23 01 00 00 01 00 02 + 24 00 + 23 01 00 00 01 00 02 + 25 00 + 23 01 00 00 01 00 02 + 26 00 + 23 01 00 00 01 00 02 + 27 00 + 23 01 00 00 01 00 02 + 28 33 + 23 01 00 00 01 00 02 + 29 02 + 23 01 00 00 01 00 02 + 2A 00 + 23 01 00 00 01 00 02 + 2B 00 + 23 01 00 00 01 00 02 + 2C 00 + 23 01 00 00 01 00 02 + 2D 00 + 23 01 00 00 01 00 02 + 2E 00 + 23 01 00 00 01 00 02 + 2F 00 + 23 01 00 00 01 00 02 + 30 00 + 23 01 00 00 01 00 02 + 31 00 + 23 01 00 00 01 00 02 + 32 00 + 23 01 00 00 01 00 02 + 33 00 + 23 01 00 00 01 00 02 + 34 04 + 23 01 00 00 01 00 02 + 35 00 + 23 01 00 00 01 00 02 + 36 00 + 23 01 00 00 01 00 02 + 37 00 + 23 01 00 00 01 00 02 + 38 78 + 23 01 00 00 01 00 02 + 39 00 + 23 01 00 00 01 00 02 + 3A 40 + 23 01 00 00 01 00 02 + 3B 40 + 23 01 00 00 01 00 02 + 3C 00 + 23 01 00 00 01 00 02 + 3D 00 + 23 01 00 00 01 00 02 + 3E 00 + 23 01 00 00 01 00 02 + 3F 00 + 23 01 00 00 01 00 02 + 40 00 + 23 01 00 00 01 00 02 + 41 00 + 23 01 00 00 01 00 02 + 42 00 + 23 01 00 00 01 00 02 + 43 00 + 23 01 00 00 01 00 02 + 44 00 + 23 01 00 00 01 00 02 + 50 01 + 23 01 00 00 01 00 02 + 51 23 + 23 01 00 00 01 00 02 + 52 45 + 23 01 00 00 01 00 02 + 53 67 + 23 01 00 00 01 00 02 + 54 89 + 23 01 00 00 01 00 02 + 55 AB + 23 01 00 00 01 00 02 + 56 01 + 23 01 00 00 01 00 02 + 57 23 + 23 01 00 00 01 00 02 + 58 45 + 23 01 00 00 01 00 02 + 59 67 + 23 01 00 00 01 00 02 + 5A 89 + 23 01 00 00 01 00 02 + 5B AB + 23 01 00 00 01 00 02 + 5C CD + 23 01 00 00 01 00 02 + 5D EF + 23 01 00 00 01 00 02 + 5E 11 + 23 01 00 00 01 00 02 + 5F 01 + 23 01 00 00 01 00 02 + 60 00 + 23 01 00 00 01 00 02 + 61 15 + 23 01 00 00 01 00 02 + 62 14 + 23 01 00 00 01 00 02 + 63 0E + 23 01 00 00 01 00 02 + 64 0F + 23 01 00 00 01 00 02 + 65 0C + 23 01 00 00 01 00 02 + 66 0D + 23 01 00 00 01 00 02 + 67 06 + 23 01 00 00 01 00 02 + 68 02 + 23 01 00 00 01 00 02 + 69 07 + 23 01 00 00 01 00 02 + 6A 02 + 23 01 00 00 01 00 02 + 6B 02 + 23 01 00 00 01 00 02 + 6C 02 + 23 01 00 00 01 00 02 + 6D 02 + 23 01 00 00 01 00 02 + 6E 02 + 23 01 00 00 01 00 02 + 6F 02 + 23 01 00 00 01 00 02 + 70 02 + 23 01 00 00 01 00 02 + 71 02 + 23 01 00 00 01 00 02 + 72 02 + 23 01 00 00 01 00 02 + 73 02 + 23 01 00 00 01 00 02 + 74 02 + 23 01 00 00 01 00 02 + 75 01 + 23 01 00 00 01 00 02 + 76 00 + 23 01 00 00 01 00 02 + 77 14 + 23 01 00 00 01 00 02 + 78 15 + 23 01 00 00 01 00 02 + 79 0E + 23 01 00 00 01 00 02 + 7A 0F + 23 01 00 00 01 00 02 + 7B 0C + 23 01 00 00 01 00 02 + 7C 0D + 23 01 00 00 01 00 02 + 7D 06 + 23 01 00 00 01 00 02 + 7E 02 + 23 01 00 00 01 00 02 + 7F 07 + 23 01 00 00 01 00 02 + 80 02 + 23 01 00 00 01 00 02 + 81 02 + 23 01 00 00 01 00 02 + 82 02 + 23 01 00 00 01 00 02 + 83 02 + 23 01 00 00 01 00 02 + 84 02 + 23 01 00 00 01 00 02 + 85 02 + 23 01 00 00 01 00 02 + 86 02 + 23 01 00 00 01 00 02 + 87 02 + 23 01 00 00 01 00 02 + 88 02 + 23 01 00 00 01 00 02 + 89 02 + 23 01 00 00 01 00 02 + 8A 02 + 29 01 00 00 01 00 04 + FF 98 81 04 + 23 01 00 00 01 00 02 + 00 80 + 23 01 00 00 01 00 02 + 6C 15 + 23 01 00 00 01 00 02 + 6E 2A + 23 01 00 00 01 00 02 + 6F 33 + 23 01 00 00 01 00 02 + 3A 94 + 23 01 00 00 01 00 02 + 8D 1A + 23 01 00 00 01 00 02 + 87 BA + 23 01 00 00 01 00 02 + 26 76 + 23 01 00 00 01 00 02 + B2 D1 + 23 01 00 00 01 00 02 + B5 06 + 29 01 00 00 01 00 04 + FF 98 81 01 + 23 01 00 00 01 00 02 + 22 0A + 23 01 00 00 01 00 02 + 31 00 + 23 01 00 00 01 00 02 + 53 81 + 23 01 00 00 01 00 02 + 55 8F + 23 01 00 00 01 00 02 + 50 C0 + 23 01 00 00 01 00 02 + 51 C0 + 23 01 00 00 01 00 02 + 60 08 + 23 01 00 00 01 00 02 + A0 08 + 23 01 00 00 01 00 02 + A1 10 + 23 01 00 00 01 00 02 + A2 25 + 23 01 00 00 01 00 02 + A3 00 + 23 01 00 00 01 00 02 + A4 24 + 23 01 00 00 01 00 02 + A5 19 + 23 01 00 00 01 00 02 + A6 12 + 23 01 00 00 01 00 02 + A7 1B + 23 01 00 00 01 00 02 + A8 77 + 23 01 00 00 01 00 02 + A9 19 + 23 01 00 00 01 00 02 + AA 25 + 23 01 00 00 01 00 02 + AB 6E + 23 01 00 00 01 00 02 + AC 20 + 23 01 00 00 01 00 02 + AD 17 + 23 01 00 00 01 00 02 + AE 54 + 23 01 00 00 01 00 02 + AF 24 + 23 01 00 00 01 00 02 + B0 27 + 23 01 00 00 01 00 02 + B1 52 + 23 01 00 00 01 00 02 + B2 63 + 23 01 00 00 01 00 02 + B3 39 + 23 01 00 00 01 00 02 + C0 08 + 23 01 00 00 01 00 02 + C1 20 + 23 01 00 00 01 00 02 + C2 23 + 23 01 00 00 01 00 02 + C3 22 + 23 01 00 00 01 00 02 + C4 06 + 23 01 00 00 01 00 02 + C5 34 + 23 01 00 00 01 00 02 + C6 25 + 23 01 00 00 01 00 02 + C7 20 + 23 01 00 00 01 00 02 + C8 86 + 23 01 00 00 01 00 02 + C9 1F + 23 01 00 00 01 00 02 + CA 2B + 23 01 00 00 01 00 02 + CB 74 + 23 01 00 00 01 00 02 + CC 16 + 23 01 00 00 01 00 02 + CD 1B + 23 01 00 00 01 00 02 + CE 46 + 23 01 00 00 01 00 02 + CF 21 + 23 01 00 00 01 00 02 + D0 29 + 23 01 00 00 01 00 02 + D1 54 + 23 01 00 00 01 00 02 + D2 65 + 23 01 00 00 01 00 02 + D3 39 + 29 01 00 00 01 00 04 + FF 98 81 00 + 23 01 00 00 01 00 02 + 35 00 + + 05 01 00 00 78 00 02 + 11 00 + 05 01 00 00 00 00 02 + 29 00 + ]; + qcom,mdss-dsi-off-command = [ + 05 01 00 00 32 00 02 + 28 00 + 05 01 00 00 78 00 02 + 10 00 + ]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-h-sync-pulse = <0>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_pulse"; + qcom,mdss-dsi-lane-map = "lane_map_0123"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [8b 1e 14 00 44 48 18 4a 19 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x04>; + qcom,mdss-dsi-t-clk-pre = <0x1b>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm"; + qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>; + qcom,mdss-dsi-bl-pmic-bank-select = <0>; + qcom,mdss-dsi-pwm-gpio = <&pm8916_mpps 4 0>; + qcom,mdss-dsi-reset-sequence = <1 20>, <0 10>, <1 20>; + + //add lcd esd + qcom,mdss-dsi-panel-status-command = [06 01 00 01 05 00 02 0A 08]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-check-mode = "reg_read"; + qcom,mdss-dsi-panel-status-value = <0x9c>; + qcom,esd-check-enabled; + //esd end + }; +}; + diff --git a/arch/arm/boot/dts/qcom/l8150/dsi-panel-trulyotm1288a-720p-video.dtsi b/arch/arm/boot/dts/qcom/l8150/dsi-panel-trulyotm1288a-720p-video.dtsi new file mode 100644 index 00000000000..be0beb39291 --- /dev/null +++ b/arch/arm/boot/dts/qcom/l8150/dsi-panel-trulyotm1288a-720p-video.dtsi @@ -0,0 +1,369 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/*--------------------------------------------------------------------------- + * This file is autogenerated file using gcdb parser. Please do not edit it. + * Update input XML file to add a new entry or update variable in this file + * VERSION = "1.0" + *---------------------------------------------------------------------------*/ +&mdss_mdp { + dsi_truly_otm1288a_720p_video_vid: qcom,mdss_dsi_truly_otm1288a_720p_video { + qcom,mdss-dsi-panel-name = "TRULY OTM1288A video mode dsi panel"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <720>; + qcom,mdss-dsi-panel-height = <1280>; + qcom,mdss-dsi-h-front-porch = <44>; + qcom,mdss-dsi-h-back-porch = <42>; + qcom,mdss-dsi-h-pulse-width = <6>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-front-porch = <16>; + qcom,mdss-dsi-v-back-porch = <14>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-color-order = "rgb_swap_rgb"; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-pan-physical-width-dimension = <62>; //the panel physical size : refer to datasheet + qcom,mdss-pan-physical-height-dimension = <111>; + qcom,mdss-dsi-on-command = [ + 23 01 00 00 00 00 02 + 00 00 + 29 01 00 00 00 00 04 + ff 12 88 01 + 23 01 00 00 00 00 02 + 00 80 + 29 01 00 00 00 00 03 + ff 12 88 + 23 01 00 00 00 00 02 + 00 80 + 29 01 00 00 00 00 0A + c0 00 64 00 10 10 00 + 64 10 10 + 23 01 00 00 00 00 02 + 00 90 + 29 01 00 00 00 00 07 + c0 00 00 00 14 00 1b + //set video mode + 23 01 00 00 00 00 02 + 00 00 + 23 01 00 00 00 00 02 + 1C 32 + //end + 23 01 00 00 00 00 02 + 00 A3 + 23 01 00 00 00 00 02 + c0 25 + 23 01 00 00 00 00 02 + 00 b3 + 23 01 00 00 00 00 02 + c0 00 + 23 01 00 00 00 00 02 + 00 80 + 23 01 00 00 00 00 02 + c4 43 + 23 01 00 00 00 00 02 + 00 a2 + 23 01 00 00 00 00 02 + c1 41 + 23 01 00 00 00 00 02 + 00 b6 + 23 01 00 00 00 00 02 + b0 18 + //configure 4 lane + 23 01 00 00 00 00 02 + 00 92 + 29 01 00 00 00 00 03 + FF 30 02 + //end + 23 01 00 00 00 00 02 + 00 80 + 23 01 00 00 00 00 02 + c5 53 + 23 01 00 00 00 00 02 + 00 93 + 23 01 00 00 00 00 02 + c5 66 + 23 01 00 00 00 00 02 + 00 a0 + 29 01 00 00 00 00 0F + c4 05 10 06 02 05 15 + 10 05 10 07 02 05 15 + 10 + 23 01 00 00 00 00 02 + 00 b0 + 29 01 00 00 00 00 04 + c4 00 00 03 + 23 01 00 00 00 00 02 + 00 91 + 29 01 00 00 00 00 03 + c5 3d A6 + 23 01 00 00 00 00 02 + 00 c2 + 23 01 00 00 00 00 02 + c5 b1 + 23 01 00 00 00 00 02 + 00 e1 + 23 01 00 00 00 00 02 + f5 55 + 23 01 00 00 00 00 02 + 00 c2 + 29 01 00 00 00 00 03 + f5 00 00 + 23 01 00 00 00 00 02 + 00 c4 + 29 01 00 00 00 00 03 + f5 00 00 + 23 01 00 00 00 00 02 + 00 c6 + 29 01 00 00 00 00 03 + f5 00 00 + 23 01 00 00 00 00 02 + 00 f3 + 23 01 00 00 00 00 02 + cf 34 + 23 01 00 00 00 00 02 + 00 83 + 23 01 00 00 00 00 02 + c5 30 + 23 01 00 00 00 00 02 + 00 00 + 23 01 00 00 00 00 02 + d0 40 + 23 01 00 00 00 00 02 + 00 00 + 29 01 00 00 00 00 03 + d1 00 00 + 23 01 00 00 00 00 02 + 00 80 + 29 01 00 00 00 00 0C + cb 00 00 00 00 00 00 + 00 00 00 00 00 + 23 01 00 00 00 00 02 + 00 90 + 29 01 00 00 00 00 10 + cb 00 00 00 00 00 00 + 00 00 00 00 00 00 00 + 00 00 + 23 01 00 00 00 00 02 + 00 a0 + 29 01 00 00 00 00 10 + cb 00 00 00 00 00 00 + 00 00 00 00 00 00 00 + 00 00 + 23 01 00 00 00 00 02 + 00 b0 + 29 01 00 00 00 00 10 + cb 00 00 00 00 00 00 + 00 00 00 00 00 00 00 + 00 00 + 23 01 00 00 00 00 02 + 00 c0 + 29 01 00 00 00 00 10 + cb 05 05 05 05 05 05 + 05 05 05 00 05 00 00 + 00 00 + 23 01 00 00 00 00 02 + 00 d0 + 29 01 00 00 00 00 10 + cb 00 00 00 00 05 00 + 00 05 05 05 05 05 05 + 05 05 + 23 01 00 00 00 00 02 + 00 e0 + 29 01 00 00 00 00 0F + cb 05 00 05 00 00 00 + 00 00 00 00 00 05 00 + 00 + 23 01 00 00 00 00 02 + 00 f0 + 29 01 00 00 00 00 0C + cb ff ff ff ff ff ff + ff ff ff ff ff + 23 01 00 00 00 00 02 + 00 80 + 29 01 00 00 00 00 10 + cc 29 2a 0A 0c 0e 10 + 12 14 06 00 08 00 00 + 00 00 + 23 01 00 00 00 00 02 + 00 90 + 29 01 00 00 00 00 10 + cc 00 00 00 00 02 00 + 00 29 2A 09 0b 0d 0f + 11 13 + 23 01 00 00 00 00 02 + 00 a0 + 29 01 00 00 00 00 0F + cc 05 00 07 00 00 00 + 00 00 00 00 00 01 00 + 00 + 23 01 00 00 00 00 02 + 00 b0 + 29 01 00 00 00 00 10 + cc 29 2A 13 11 0F 0D + 0B 09 01 00 07 00 00 + 00 00 + 23 01 00 00 00 00 02 + 00 c0 + 29 01 00 00 00 00 10 + cc 00 00 00 00 05 00 + 00 29 2A 14 12 10 0E + 0C 0A + 23 01 00 00 00 00 02 + 00 d0 + 29 01 00 00 00 00 0F + cc 02 00 08 00 00 00 + 00 00 00 00 00 06 00 + 00 + 23 01 00 00 00 00 02 + 00 80 + 29 01 00 00 00 00 0D + ce 87 05 10 86 05 10 + 00 00 00 00 00 00 + 23 01 00 00 00 00 02 + 00 90 + 29 01 00 00 00 00 0F + ce 54 FF 10 55 00 10 + 55 03 10 55 04 10 00 + 00 + 23 01 00 00 00 00 02 + 00 a0 + 29 01 00 00 00 00 0F + ce 58 05 04 FF 00 10 + 00 58 04 05 00 00 10 + 00 + 23 01 00 00 00 00 02 + 00 b0 + 29 01 00 00 00 00 0F + ce 58 03 05 01 00 10 + 00 58 02 05 02 00 10 + 00 + 23 01 00 00 00 00 02 + 00 c0 + 29 01 00 00 00 00 0F + ce 58 01 05 03 00 10 + 00 58 00 05 04 00 10 + 00 + 23 01 00 00 00 00 02 + 00 d0 + 29 01 00 00 00 00 0F + ce 50 00 05 05 00 10 + 00 50 01 05 06 00 10 + 00 + 23 01 00 00 00 00 02 + 00 80 + 29 01 00 00 00 00 0F + cf 50 02 05 07 00 10 + 00 50 03 05 08 00 10 + 00 + 23 01 00 00 00 00 02 + 00 90 + 29 01 00 00 00 00 0F + cf 50 04 05 09 00 10 + 00 50 05 05 0A 00 10 + 00 + 23 01 00 00 00 00 02 + 00 c0 + 29 01 00 00 00 00 0A + cf 3D 20 00 00 01 00 + 20 00 00 + 23 01 00 00 00 00 02 + 00 80 + 29 01 00 00 00 00 07 + f3 00 00 00 00 00 00 + 23 01 00 00 00 00 02 + 00 92 + 29 01 00 00 00 00 03 + F5 00 00 + 23 01 00 00 00 00 02 + 00 C8 + 29 01 00 00 00 00 03 + F5 0B 15 + 23 01 00 00 00 00 02 + 00 00 + 29 01 00 00 00 00 03 + D8 B6 B6 + 23 01 00 00 00 00 02 + 00 00 + 23 01 00 00 00 00 02 + D9 80 + 23 01 00 00 00 00 02 + 00 00 + 29 01 00 00 00 00 15 + E1 02 25 33 41 50 5E + 5F 86 74 8B 7A 66 78 + 54 52 45 37 2C 27 1F + 23 01 00 00 00 00 02 + 00 00 + 29 01 00 00 00 00 15 + E2 02 25 33 41 50 5E + 5F 86 74 8B 7A 66 78 + 54 52 45 37 2C 27 1F + 23 01 00 00 00 00 02 + 00 00 + 29 01 00 00 00 00 04 + FF FF FF FF + + 05 01 00 00 78 00 02 + 11 00 + 05 01 00 00 00 00 02 + 29 00 + ]; + qcom,mdss-dsi-off-command = [ + 05 01 00 00 32 00 02 + 28 00 + 05 01 00 00 78 00 02 + 10 00 + ]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-h-sync-pulse = <0>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_pulse"; + qcom,mdss-dsi-lane-map = "lane_map_0123"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [b0 23 1b 00 94 93 1e 25 15 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x04>; + qcom,mdss-dsi-t-clk-pre = <0x1b>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm"; + qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>; + qcom,mdss-dsi-bl-pmic-bank-select = <0>; + qcom,mdss-dsi-pwm-gpio = <&pm8916_mpps 4 0>; + qcom,mdss-dsi-reset-sequence = <1 20>, <0 10>, <1 20>; + + //add lcd esd + //qcom,mdss-dsi-panel-status-command = [06 01 00 01 05 00 02 0A 08]; + //qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + //qcom,mdss-dsi-panel-status-check-mode = "reg_read"; + //qcom,mdss-dsi-panel-status-value = <0x9c>; + //qcom,esd-check-enabled; + //esd end + }; +}; diff --git a/arch/arm/boot/dts/qcom/l8150/msm-pm8916-l8150.dtsi b/arch/arm/boot/dts/qcom/l8150/msm-pm8916-l8150.dtsi new file mode 100644 index 00000000000..a3188a91531 --- /dev/null +++ b/arch/arm/boot/dts/qcom/l8150/msm-pm8916-l8150.dtsi @@ -0,0 +1,19 @@ +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&spmi_bus { + qcom,pm8916@0 { + pm8916_rtc: qcom,pm8916_rtc { + qcom,qpnp-rtc-alarm-pwrup = <1>; + }; + }; +}; diff --git a/arch/arm/boot/dts/qcom/l8150/msm8916-camera-sensor-l8150.dtsi b/arch/arm/boot/dts/qcom/l8150/msm8916-camera-sensor-l8150.dtsi new file mode 100644 index 00000000000..3c0d360bf83 --- /dev/null +++ b/arch/arm/boot/dts/qcom/l8150/msm8916-camera-sensor-l8150.dtsi @@ -0,0 +1,329 @@ +/* + * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&tlmm_pinmux { + OCP8110_pins { + qcom,pins = <&gp 31>, <&gp 32>; + qcom,num-grp-pins = <2>; + qcom,pin-func = <0>; + label = "OCP8110_pins"; + OCP8110_default: en_default { + drive-strength = <2>; + bias-pull-down; + }; + }; +}; + +&soc { + flash_OCP8110:flashlight { + compatible = "qcom,leds-gpio-flash"; + pinctrl-names = "flash_default"; + pinctrl-0 = <&OCP8110_default>; + qcom,flash-en = <&msm_gpio 31 0>; + qcom,flash-now = <&msm_gpio 32 0>; + qcom,op-seq = "flash_en", "flash_now"; + qcom,torch-seq-val = <0 1>; + qcom,flash-seq-val = <1 0>; + linux,name = "flashlight"; + linux,default-trigger = "flashlight-trigger"; + }; + + led_flash0: qcom,camera-led-flash { + cell-index = <0>; + compatible = "qcom,camera-led-flash"; + qcom,flash-type = <3>; + qcom,flash-source = <&flash_OCP8110>; + qcom,torch-source = <&flash_OCP8110>; + }; +}; + +&cci { + + actuator0: qcom,actuator@18 { + cell-index = <3>; + reg = <0x18>; + compatible = "qcom,actuator"; + qcom,cci-master = <0>; + }; + + eeprom0: qcom,eeprom@20 { + cell-index = <0>; + reg = <0x20 0>; + qcom,eeprom-name = "s5k3m2_olqba20"; + compatible = "qcom,eeprom"; + qcom,slave-addr = <0x20>; + qcom,cci-master = <0>; + qcom,num-blocks = <12>; + + qcom,page0 = <1 0x0136 2 0x1800 2 1>; + qcom,poll0 = <0 0x0 2 0 1 1>; + qcom,mem0 = <0 0x0 2 0 1 0>; + qcom,page1 = <1 0x0304 2 0x0006 2 1>; + qcom,poll1 = <0 0x0 2 0 1 1>; + qcom,mem1 = <0 0x0 2 0 1 0>; + qcom,page2 = <1 0x0306 2 0x0073 2 1>; + qcom,poll2 = <0 0x0 2 0 1 1>; + qcom,mem2 = <0 0x0 2 0 1 0>; + qcom,page3 = <1 0x030c 2 0x0004 2 1>; + qcom,poll3 = <0 0x0 2 0 1 1>; + qcom,mem3 = <0 0x0 2 0 2 0>; + qcom,page4 = <1 0x030e 2 0x0064 2 1>; + qcom,poll4 = <0 0x0 2 0 1 1>; + qcom,mem4 = <0 0x0 2 0 1 0>; + qcom,page5 = <1 0x0302 2 0x0001 2 1>; + qcom,poll5 = <0 0x0 2 0 1 1>; + qcom,mem5 = <0 0x0 2 0 1 0>; + qcom,page6 = <1 0x0300 2 0x0004 2 1>; + qcom,poll6 = <0 0x0 2 0 1 1>; + qcom,mem6 = <0 0x0 2 0 1 0>; + qcom,page7 = <1 0x030a 2 0x0001 2 1>; + qcom,poll7 = <0 0x0 2 0 1 1>; + qcom,mem7 = <0 0 2 0 1 0>; + qcom,page8 = <1 0x0308 2 0x0008 2 1>; + qcom,poll8 = <0 0x0 2 0 1 1>; + qcom,mem8 = <0 0 2 0 1 0>; + qcom,page9 = <1 0x0100 2 0x0100 2 20>; + qcom,poll9 = <0 0x0 2 0 1 1>; + qcom,mem9 = <0 0 2 0 1 0>; + qcom,page10 = <1 0x0a02 2 0x1f00 2 10>; + qcom,poll10 = <0 0x0 2 0 1 1>; + qcom,mem10 = <0 0 2 0 1 0>; + qcom,page11 = <1 0x0a00 2 0x0100 2 1>; + qcom,poll11 = <0 0x0 2 0 1 1>; + qcom,mem11 = <64 0x0a04 2 0 1 0>; + + cam_vio-supply = <&pm8916_l6>; + qcom,cam-vreg-name = "cam_vio"; + qcom,cam-vreg-type = <0>; + qcom,cam-vreg-min-voltage = <1800000>; + qcom,cam-vreg-max-voltage = <1800000>; + qcom,cam-vreg-op-mode = <100000>; + pinctrl-names = "cam_default", "cam_suspend"; + + pinctrl-0 = <&cam_sensor_mclk0_default &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 119 0>, + <&msm_gpio 118 0>; + qcom,gpio-reset = <1>; + qcom,gpio-vdig = <2>; + qcom,gpio-vana = <3>; + qcom,gpio-req-tbl-num = <0 1 2 3>; + qcom,gpio-req-tbl-flags = <1 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET1", + "CAM_VDIG", + "CAM_VANA"; + + qcom,cam-power-seq-type = "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_clk", + "sensor_i2c_mux"; + qcom,cam-power-seq-val = "sensor_gpio_reset", + "sensor_gpio_vana", + "sensor_gpio_vdig", + "sensor_gpio_vana", + "sensor_gpio_vdig", + "sensor_gpio_reset", + "sensor_cam_mclk", + "none"; + + qcom,cam-power-seq-cfg-val = <0 0 0 1 1 1 1 24000000 0>; + qcom,cam-power-seq-delay = <1 1 1 1 1 30 30 10 1>; + + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + eeprom1: qcom,eeprom@22 { + cell-index = <1>; + reg = <0x22>; + qcom,eeprom-name = "s5k5e2_olq5f19"; + compatible = "qcom,eeprom"; + qcom,slave-addr = <0x20>; + qcom,cci-master = <0>; + qcom,num-blocks = <3>; + + qcom,init0 = <1 0x0A00 2 0x04 1 1>; + qcom,page0 = <1 0x0A02 2 0x02 1 1>; + qcom,pageen0 = <1 0x0A00 2 0x01 1 1>; + qcom,poll0 = <1 0x0A00 2 0x01 1 3>; + qcom,mem0 = <64 0x0A04 2 0x00 1 0>; + + qcom,init1 = <1 0x0A00 2 0x04 1 1>; + qcom,page1 = <1 0x0A02 2 0x03 1 1>; + qcom,pageen1 = <1 0x0A00 2 0x01 1 1>; + qcom,poll1 = <1 0x0A00 2 0x01 1 3>; + qcom,mem1 = <64 0x0A04 2 0x00 1 0>; + + qcom,init2 = <1 0x0A00 2 0x04 1 1>; + qcom,page2 = <1 0x0A02 2 0x0F 1 1>; + qcom,pageen2 = <1 0x0A00 2 0x01 1 1>; + qcom,poll2 = <1 0x0A00 2 0x01 1 3>; + qcom,mem2 = <64 0x0A04 2 0x00 1 0>; + + cam_vio-supply = <&pm8916_l6>; + qcom,cam-vreg-name = "cam_vio"; + qcom,cam-vreg-type = <0>; + qcom,cam-vreg-min-voltage = <1800000>; + qcom,cam-vreg-max-voltage = <1800000>; + qcom,cam-vreg-op-mode = <100000>; + + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_default &cam_sensor_front_default>; + pinctrl-1 = <&cam_sensor_mclk1_sleep &cam_sensor_front_sleep>; + gpios = <&msm_gpio 27 0>, + <&msm_gpio 28 0>, + <&msm_gpio 33 0>, + <&msm_gpio 119 0>, + <&msm_gpio 118 0>, + <&msm_gpio 117 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-vdig = <3>; + qcom,gpio-vana = <4>; + qcom,gpio-custom1 = <5>; + qcom,gpio-req-tbl-num = <0 1 2 3 4 5>; + qcom,gpio-req-tbl-flags = <1 0 0 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET1", + "CAM_STANDBY", + "CAM_VDIG", + "CAM_VANA", + "CAM_V_CUSTOM1"; + qcom,cam-power-seq-type = "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_clk", + "sensor_i2c_mux"; + qcom,cam-power-seq-val = "sensor_gpio_standby", + "sensor_gpio_reset", + "sensor_gpio_vana", + "sensor_gpio_custom1", + "sensor_gpio_vdig", + "sensor_gpio_vana", + "sensor_gpio_custom1", + "sensor_gpio_vdig", + "sensor_gpio_standby", + "sensor_gpio_reset", + "sensor_cam_mclk", + "none"; + + qcom,cam-power-seq-cfg-val = <0 0 0 0 0 1 1 1 1 1 23880000 0>; + qcom,cam-power-seq-delay = <1 1 1 1 1 1 1 1 30 30 10 1>; + qcom,mclk-23880000; + clocks = <&clock_gcc clk_mclk1_clk_src>, + <&clock_gcc clk_gcc_camss_mclk1_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@0 { + cell-index = <0>; + compatible = "qcom,camera"; + reg = <0x0>; + qcom,csiphy-sd-index = <0>; + qcom,csid-sd-index = <0>; + qcom,mount-angle = <270>; + qcom,eeprom-src = <&eeprom0>; + qcom,led-flash-src = <&led_flash0>; + qcom,actuator-src = <&actuator0>; + cam_vio-supply = <&pm8916_l6>; + cam_vaf-supply = <&pm8916_l10>; + qcom,cam-vreg-name = "cam_vio","cam_vaf"; + qcom,cam-vreg-type = <0 0>; + qcom,cam-vreg-min-voltage = <0 2800000>; + qcom,cam-vreg-max-voltage = <0 2800000>; + qcom,cam-vreg-op-mode = <0 80000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default + &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 119 0>, + <&msm_gpio 118 0>; + qcom,gpio-reset = <1>; + qcom,gpio-vdig = <2>; + qcom,gpio-vana = <3>; + qcom,gpio-req-tbl-num = <0 1 2 3>; + qcom,gpio-req-tbl-flags = <1 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET1", + "CAM_VDIG", + "CAM_VANA"; + qcom,sensor-position = <0>; + qcom,sensor-mode = <0>; + qcom,cci-master = <0>; + status = "ok"; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@1 { + cell-index = <1>; + compatible = "qcom,camera"; + reg = <0x1>; + qcom,csiphy-sd-index = <1>; + qcom,csid-sd-index = <1>; + qcom,mount-angle = <270>; + qcom,eeprom-src = <&eeprom1>; + cam_vio-supply = <&pm8916_l6>; + qcom,cam-vreg-name = "cam_vio"; + qcom,cam-vreg-type = <0>; + qcom,cam-vreg-min-voltage = <1800000>; + qcom,cam-vreg-max-voltage = <1800000>; + qcom,cam-vreg-op-mode = <100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_default &cam_sensor_front_default>; + pinctrl-1 = <&cam_sensor_mclk1_sleep &cam_sensor_front_sleep>; + gpios = <&msm_gpio 27 0>, + <&msm_gpio 28 0>, + <&msm_gpio 33 0>, + <&msm_gpio 119 0>, + <&msm_gpio 118 0>, + <&msm_gpio 117 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-vdig = <3>; + qcom,gpio-vana = <4>; + qcom,gpio-custom1 = <5>; + qcom,gpio-req-tbl-num = <0 1 2 3 4 5>; + qcom,gpio-req-tbl-flags = <1 0 0 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET", + "CAM_STANDBY", + "CAM_VDIG", + "CAM_VANA", + "CAM_V_CUSTOM1"; + + qcom,cci-master = <0>; + clocks = <&clock_gcc clk_mclk1_clk_src>, + <&clock_gcc clk_gcc_camss_mclk1_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; +}; + diff --git a/arch/arm/boot/dts/qcom/l8150/msm8916-l8150.dtsi b/arch/arm/boot/dts/qcom/l8150/msm8916-l8150.dtsi new file mode 100644 index 00000000000..d5c315c4db7 --- /dev/null +++ b/arch/arm/boot/dts/qcom/l8150/msm8916-l8150.dtsi @@ -0,0 +1,322 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "msm8916-pinctrl-l8150.dtsi" +#include "msm8916-camera-sensor-l8150.dtsi" +#include "msm-pm8916-l8150.dtsi" +#include "../dsi-panel-otm8019a-fwvga-video.dtsi" +#include "dsi-panel-trulyotm1288a-720p-video.dtsi" +#include "dsi-panel-dijingILI9881C-720p-video.dtsi" +#include "dsi-panel-booyiOTM1287-720p-video.dtsi" + + +/ { + + aliases { + i2c1 = &i2c_1; /* I2C1 controller device */ + i2c3 = &i2c_3; /* I2C3 controller device */ + }; + + memory { + pstore_reserve_mem: pstore_reserve_region@0 { + linux,reserve-contiguous-region; + linux,reserve-region; + linux,remove-completely; + reg = <0x0 0x8c400000 0x0 0x00100000>; + label = "pstore_reserve_mem"; + }; + }; + +}; + + + +&soc { + gpio-leds { + compatible = "gpio-leds"; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&button_backlight_off>; + + keypad-backlight { + gpios = <&msm_gpio 34 0>; + label = "button-backlight"; + linux,default-trigger = "none"; + }; + }; + + sound { + compatible = "qcom,msm8x16-audio-codec"; + qcom,model = "msm8x16-skui-snd-card"; + qcom,msm-snd-card-id = <0>; + qcom,msm-ext-pa = "primary"; + qcom,msm-codec-type = "internal"; + qcom,msm-mbhc-hphl-swh = <1>; + qcom,msm-mbhc-gnd-swh = <0>; + qcom,msm-hs-micbias-type = "internal"; + qcom,audio-routing = + "RX_BIAS", "MCLK", + "SPK_RX_BIAS", "MCLK", + "INT_LDO_H", "MCLK", + "MIC BIAS Internal1", "Handset Mic", + "MIC BIAS Internal2", "Headset Mic", + "MIC BIAS Internal3", "Secondary Mic", + "AMIC1", "MIC BIAS Internal1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS Internal3"; + pinctrl-names = "cdc_lines_act", + "cdc_lines_sus"; + pinctrl-0 = <&cdc_pdm_lines_act>; + pinctrl-1 = <&cdc_pdm_lines_sus>; + asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>, + <&loopback>, <&compress>, <&hostless>, + <&afe>, <&lsm>, <&routing>, <&lpa>; + asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1", + "msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback", + "msm-compress-dsp", "msm-pcm-hostless", "msm-pcm-afe", + "msm-lsm-client", "msm-pcm-routing", "msm-pcm-lpa"; + asoc-cpu = <&dai_pri_auxpcm>, <&dai_hdmi>, + <&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, <&dai_mi2s3>, + <&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>, + <&sb_3_rx>, <&sb_3_tx>, <&sb_4_rx>, <&sb_4_tx>, + <&bt_sco_rx>, <&bt_sco_tx>, <&bt_a2dp_rx>, + <&int_fm_rx>, <&int_fm_tx>, + <&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>, <&afe_proxy_tx>, + <&incall_record_rx>, <&incall_record_tx>, <&incall_music_rx>, + <&incall_music_2_rx>; + asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8", + "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1", + "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3", + "msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385", + "msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387", + "msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391", + "msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393", + "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289", + "msm-dai-q6-dev.12290", "msm-dai-q6-dev.12292", + "msm-dai-q6-dev.12293", "msm-dai-q6-dev.224", + "msm-dai-q6-dev.225", "msm-dai-q6-dev.241", + "msm-dai-q6-dev.240", "msm-dai-q6-dev.32771", + "msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773", + "msm-dai-q6-dev.32770"; + asoc-codec = <&stub_codec>, <&pm8916_tombak_dig>; + asoc-codec-names = "msm-stub-codec.1", "tombak_codec"; + }; + + gpio_keys { + vol_down { + label = "volume_down"; + gpios = <&msm_gpio 108 0x1>; + linux,input-type = <1>; + linux,code = <114>; + gpio-key,wakeup; + debounce-interval = <15>; + }; + }; + + i2c_1: i2c@78b5000 { /* BLSP1 QUP1 */ + compatible = "qcom,i2c-msm-v2"; + #address-cells = <1>; + #size-cells = <0>; + reg-names = "qup_phys_addr"; + reg = <0x78b5000 0x600>; + interrupt-names = "qup_irq"; + interrupts = <0 95 0>; + clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>, + <&clock_gcc clk_gcc_blsp1_qup1_i2c_apps_clk>; + clock-names = "iface_clk", "core_clk"; + qcom,clk-freq-out = <400000>; + qcom,clk-freq-in = <19200000>; + pinctrl-names = "i2c_active", "i2c_sleep"; + pinctrl-0 = <&i2c_1_active>; + pinctrl-1 = <&i2c_1_sleep>; + qcom,noise-rjct-scl = <0>; + qcom,noise-rjct-sda = <0>; + dmas = <&dma_blsp1 4 64 0x20000020 0x20>, + <&dma_blsp1 5 32 0x20000020 0x20>; + dma-names = "tx", "rx"; + qcom,master-id = <86>; + }; + + i2c_3: i2c@78b7000 { /* BLSP3 QUP3 */ + compatible = "qcom,i2c-msm-v2"; + #address-cells = <1>; + #size-cells = <0>; + reg-names = "qup_phys_addr"; + reg = <0x78b7000 0x600>; + interrupt-names = "qup_irq"; + interrupts = <0 97 0>; + clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>, + <&clock_gcc clk_gcc_blsp1_qup3_i2c_apps_clk>; + clock-names = "iface_clk", "core_clk"; + qcom,clk-freq-out = <100000>; + qcom,clk-freq-in = <19200000>; + pinctrl-names = "i2c_active", "i2c_sleep"; + pinctrl-0 = <&i2c_3_active>; + pinctrl-1 = <&i2c_3_sleep>; + qcom,noise-rjct-scl = <0>; + qcom,noise-rjct-sda = <0>; + dmas = <&dma_blsp1 8 64 0x20000020 0x20>, + <&dma_blsp1 9 32 0x20000020 0x20>; + dma-names = "tx", "rx"; + qcom,master-id = <86>; + }; + + ramoops { + compatible = "ramoops"; + status = "ok"; + + /* This is tacked at the end of pheripheral_region@0 */ + android,ramoops-buffer-start = <0x8c400000>; + android,ramoops-buffer-size = <0x100000>; + android,ramoops-console-size = <0x80000>; + android,ramoops-record-size = <0x20000>; + android,ramoops-dump-oops = <0x1>; + }; + +}; + +&pm8916_mpps { + mpp@a300 { /* MPP 4 */ + /* Backlight PWM */ + qcom,mode = <1>; /* Digital output */ + qcom,invert = <0>; /* Disable invert */ + qcom,src-sel = <4>; /* DTEST1 */ + qcom,vin-sel = <0>; /* VPH_PWR */ + qcom,master-en = <1>; /* Enable MPP */ + }; +}; + +&mdss_mdp { + qcom,mdss-pref-prim-intf = "dsi"; +}; + +&pmx_mdss { + qcom,num-grp-pins = <1>; + qcom,pins = <&gp 25>; +}; + +&mdss_dsi0 { + qcom,dsi-pref-prim-pan = <&dsi_otm8019a_fwvga_video>; + pinctrl-names = "mdss_default", "mdss_sleep"; + pinctrl-0 = <&mdss_dsi_active>; + pinctrl-1 = <&mdss_dsi_suspend>; + + qcom,platform-reset-gpio = <&msm_gpio 25 0>; +}; + +&dsi_otm8019a_fwvga_video { + qcom,cont-splash-enabled; +}; + +&tlmm_pinmux { + bma2x2_int1_pin { + qcom,pins = <&gp 112>; + qcom,num-grp-pins = <1>; + label = "bma2x2_int1_pin"; + bma2x2_int1_default: int1_default { + drive-strength = <6>; + bias-pull-up; + }; + }; + + bma2x2_int2_pin { + qcom,pins = <&gp 114>; + qcom,num-grp-pins = <1>; + label = "bma2x2_int2_pin"; + bma2x2_int2_default: int2_default { + drive-strength = <6>; + bias-pull-up; + }; + }; +}; + +&i2c_0 { /* BLSP1 QUP2 */ + /delete-node/ avago@39; + + ltr@23 { /* Ambient light and proximity sensor */ + compatible = "ltr,ltr559"; + reg = <0x23>; + pinctrl-names = "default","sleep"; + pinctrl-0 = <<r_default>; + pinctrl-1 = <<r_sleep>; + interrupt-parent = <&msm_gpio>; + interrupts = <115 0x2002>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + liteon,intr = <115>; + ltr,irq-gpio = <&msm_gpio 115 0x2002>; + ltr,ps-threshold = <120>; + ltr,ps-hysteresis-threshold = <80>; + ltr,als-polling-time = <200>; + }; + + bosch@10 { /* accelerometer sensor */ + compatible = "bosch,bma2x2"; + reg = <0x10>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + bosch,init-interval = <200>; + bosch,place = <3>; + }; + + /delete-node/ memsic@30; + + bosch@12 {/* magnetic sensor */ + compatible = "bosch,bmm050"; + reg = <0x12>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + bosch,init-interval = <200>; + bosch,place = <3>; + bosch,auto-report; + }; + + /delete-node/ mpu6050@68; + + bosch@68 { /* gyroscope sensor */ + compatible = "bosch,bmg160"; + reg = <0x68>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + bosch,init-interval = <200>; + bosch,place = <0>; + }; + + /delete-node/ stk@48; +}; + +&i2c_1{ /* blsp1 qup1 */ + /delete-node/ bosch@10; + /delete-node/ bosch@18; + /delete-node/ bosch@68; +}; + +&sdc2_cd_on { + /delete-property/ bias-pull-up; + bias-pull-down; +}; + +&sdc2_cd_off { + /delete-property/ bias-disable; + bias-pull-down; +}; + +&sdhc_2 { + interrupts = <0 1>; + interrupt-map = <0 &intc 0 125 0 + 1 &intc 0 221 0>; + interrupt-names = "hc_irq", "pwr_irq"; + /delete-property/ cd-gpios; + /delete-property/ vdd-supply; + /delete-property/ qcom,vdd-voltage-level; + /delete-property/ qcom,vdd-current-level; +}; diff --git a/arch/arm/boot/dts/qcom/l8150/msm8916-pinctrl-l8150.dtsi b/arch/arm/boot/dts/qcom/l8150/msm8916-pinctrl-l8150.dtsi new file mode 100644 index 00000000000..9c689dec39c --- /dev/null +++ b/arch/arm/boot/dts/qcom/l8150/msm8916-pinctrl-l8150.dtsi @@ -0,0 +1,86 @@ +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "../msm8916-pinctrl.dtsi" + +&soc { + tlmm_pinmux: pinctrl@1000000 { + + usb-id-pin { + qcom,pins = <&gp 111>; + }; + + pmx_i2c_1 { + /* CLK, DATA */ + qcom,pins = <&gp 3>, <&gp 2>; + qcom,num-grp-pins = <2>; + qcom,pin-func = <3>; + label = "pmx_i2c_1"; + + i2c_1_active: i2c_1_active { + drive-strength = <2>; /* 2 MA */ + bias-disable; /* No PULL */ + }; + + i2c_1_sleep: i2c_1_sleep { + drive-strength = <2>; /* 2 MA */ + bias-disable; /* No PULL */ + }; + }; + + pmx_i2c_3 { + /* CLK, DATA */ + qcom,pins = <&gp 11>, <&gp 10>; + qcom,num-grp-pins = <2>; + qcom,pin-func = <2>; + label = "pmx_i2c_3"; + + i2c_3_active: i2c_3_active { + drive-strength = <2>; /* 2 MA */ + bias-disable; /* No PULL */ + }; + + i2c_3_sleep: i2c_3_sleep { + drive-strength = <2>; /* 2 MA */ + bias-disable; /* No PULL */ + }; + }; + + ovp-id-pin { + qcom,pins = <&gp 110>; + qcom,num-grp-pins = <1>; + qcom,pin-func = <0>; + label = "ovp-id-pin"; + ovp_default: ovp-irq { + drive-strength = <8>; + bias-pull-up; + }; + }; + + ltr559_int_pin { + qcom,pins = <&gp 115>; + qcom,pin-func = <0>; + qcom,num-grp-pins = <1>; + label = "ltr559-irq"; + ltr_default: ltr_default { + drive-strength = <6>; + bias-pull-up; + }; + ltr_sleep: ltr_sleep { + drive-strength = <2>; + bias-pull-down; + }; + }; + + + }; +}; diff --git a/arch/arm/boot/dts/qcom/msm8226-ion.dtsi b/arch/arm/boot/dts/qcom/msm8226-ion.dtsi index b3c25a3cdbf..2b707f98637 100644 --- a/arch/arm/boot/dts/qcom/msm8226-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msm8226-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2012-2014,2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD system_contig_heap: qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed cp_mm_heap: qcom,ion-heap@8 { /* CP_MM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <8>; diff --git a/arch/arm/boot/dts/qcom/msm8226-w-ion.dtsi b/arch/arm/boot/dts/qcom/msm8226-w-ion.dtsi index 1ac36e09404..f2e3a3e0517 100644 --- a/arch/arm/boot/dts/qcom/msm8226-w-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msm8226-w-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014,2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD system_contig_heap: qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qsecom_heap: qcom,ion-heap@27 { /* QSECOM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <27>; diff --git a/arch/arm/boot/dts/qcom/msm8610-ion.dtsi b/arch/arm/boot/dts/qcom/msm8610-ion.dtsi index a7a428bec42..f7704a19af9 100644 --- a/arch/arm/boot/dts/qcom/msm8610-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msm8610-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2012-2014,2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,ion-heap@27 { /* QSECOM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <27>; diff --git a/arch/arm/boot/dts/qcom/msm8909-camera-sensor-skuq.dtsi b/arch/arm/boot/dts/qcom/msm8909-camera-sensor-skuq.dtsi new file mode 100755 index 00000000000..b8e6af402a3 --- /dev/null +++ b/arch/arm/boot/dts/qcom/msm8909-camera-sensor-skuq.dtsi @@ -0,0 +1,255 @@ +/* + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +&tlmm_pinmux { + GPIOFLASH_pins { + qcom,pins = <&gp 31>, <&gp 32>; + qcom,num-grp-pins = <2>; + qcom,pin-func = <0>; + label = "GPIOFLASH_pins"; + GPIOFLASH_default: en_default { + drive-strength = <2>; + bias-pull-down; + }; + }; + + cam_mipi_switch { + qcom,pins = <&gp 9>; + qcom,num-grp-pins = <1>; + qcom,pin-func = <0>; + label = "cam-mipi-switch"; + /* active state */ + cam_mipi_switch_default: default { + drive-strength = <2>; /* 2 MA */ + bias-disable = <0>; /* No PULL */ + }; + }; + + cam_mipi_switch_sleep { + qcom,pins = <&gp 9>; + qcom,num-grp-pins = <1>; + qcom,pin-func = <0>; + label = "cam-mipi-switch"; + /* suspend state */ + cam_mipi_switch_sleep: sleep { + drive-strength = <2>; /* 2 MA */ + bias-pull-down = <0>; /* PULL DOWN */ + }; + }; +}; + +&soc { + flash_GPIOFLASH:flashlight { + compatible = "qcom,leds-gpio-flash"; + status = "okay"; + pinctrl-names = "flash_default"; + pinctrl-0 = <&GPIOFLASH_default>; + qcom,flash-en = <&msm_gpio 31 0>; + qcom,flash-now = <&msm_gpio 32 0>; + qcom,op-seq = "flash_en", "flash_now"; + qcom,torch-seq-val = <1 0>; + qcom,flash-seq-val = <1 1>; + linux,name = "flashlight"; + linux,default-trigger = "flashlight-trigger"; + }; + led_flash0: qcom,camera-led-flash { + cell-index = <0>; + compatible = "qcom,camera-led-flash"; + qcom,flash-type = <3>; + qcom,flash-source = <&flash_GPIOFLASH>; + qcom,torch-source = <&flash_GPIOFLASH>; + }; +}; + +&i2c_3 { + + actuator0: qcom,actuator@0 { + cell-index = <0>; + reg = <0x3>; + compatible = "qcom,actuator"; + qcom,cci-master = <0>; + cam_vaf-supply = <&pm8916_l8>; + qcom,cam-vreg-name = "cam_vaf"; + qcom,cam-vreg-type = <0>; + qcom,cam-vreg-min-voltage = <2850000>; + qcom,cam-vreg-max-voltage = <2900000>; + qcom,cam-vreg-op-mode = <80000>; + }; + + eeprom0: qcom,eeprom@20{ + cell-index = <0>; + reg = <0x20>; + qcom,eeprom-name = "truly_ov8856"; + compatible = "qcom,eeprom"; + qcom,slave-addr = <0x20>; + qcom,cci-master = <0>; + + qcom,num-blocks = <10>; + qcom,page0 = <1 0x0100 2 0x01 1 1>; + qcom,poll0 = <0 0x0 2 0 1 1>; + qcom,mem0 = <0 0x0 2 0 1 0>; + qcom,page1 = <1 0x5002 2 0xa8 1 1>; + qcom,poll1 = <0 0x0 2 0 1 1>; + qcom,mem1 = <0 0x0 2 0 1 0>; + qcom,page2 = <1 0x3d84 2 0xc0 1 1>; + qcom,poll2 = <0 0x0 2 0 1 1>; + qcom,mem2 = <0 0x0 2 0 1 0>; + qcom,page3 = <1 0x3d88 2 0x7010 2 1>; + qcom,poll3 = <0 0x0 2 0 1 1>; + qcom,mem3 = <0 0x3d00 2 0 1 0>; + qcom,page4 = <1 0x3d8a 2 0x720a 2 1>; + qcom,poll4 = <0 0x0 2 0 1 1>; + qcom,mem4 = <0 0x3d00 2 0 1 0>; + qcom,page5 = <1 0x3d81 2 0x01 1 10>; + qcom,poll5 = <0 0x0 2 0 1 1>; + qcom,mem5 = <0 0x3d00 2 0 1 0>; + qcom,page6 = <0 0x0 2 0x0 1 1>; + qcom,poll6 = <0 0x0 2 0 1 1>; + qcom,mem6 = <507 0x7010 2 0 1 0>; + qcom,page7 = <0 0x0 2 0x0 1 1>; + qcom,poll7 = <0 0x0 2 0 1 1>; + qcom,mem7 = <1 0x5000 2 0 1 1>; + qcom,page8 = <1 0x5002 2 0xaa 1 1>; + qcom,poll8 = <0 0x0 2 0 1 1>; + qcom,mem8 = <0 0x0 2 0 1 0>; + qcom,page9 = <1 0x5002 2 0x00 1 1>; + qcom,poll9 = <0 0x0 2 0 1 1>; + qcom,mem9 = <0 0x0 2 0 1 0>; + + cam_vdig-supply = <&pm8916_l2>; + cam_vana-supply = <&pm8916_l17>; + cam_vio-supply = <&pm8916_l6>; + cam_vaf-supply = <&pm8916_l8>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana", + "cam_vaf"; + qcom,cam-vreg-type = <0 1 0 0>; + qcom,cam-vreg-min-voltage = <1200000 0 2800000 2850000>; + qcom,cam-vreg-max-voltage = <1200000 0 2850000 2900000>; + qcom,cam-vreg-op-mode = <200000 0 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default + &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 34 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-req-tbl-num = <0 1 2>; + qcom,gpio-req-tbl-flags = <1 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET1", + "CAM_STANDBY"; + + qcom,cam-power-seq-type = "sensor_vreg", + "sensor_vreg", "sensor_vreg", + "sensor_gpio", "sensor_gpio", + "sensor_clk"; + qcom,cam-power-seq-val = "cam_vio", + "cam_vana", "cam_vdig", + "sensor_gpio_reset", + "sensor_gpio_standby", + "sensor_cam_mclk"; + qcom,cam-power-seq-cfg-val = <1 1 1 1 1 24000000>; + qcom,cam-power-seq-delay = <10 10 10 10 10 5>; + + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@0 { + cell-index = <0>; + compatible = "qcom,camera"; + reg = <0x2>; + qcom,csiphy-sd-index = <0>; + qcom,csid-sd-index = <0>; + qcom,mount-angle = <90>; + qcom,actuator-src = <&actuator0>; + qcom,led-flash-src = <&led_flash0>; + qcom,eeprom-src = <&eeprom0>; + cam_vdig-supply = <&pm8916_l2>; + cam_vana-supply = <&pm8916_l17>; + cam_vio-supply = <&pm8916_l6>; + cam_vaf-supply = <&pm8916_l8>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana", + "cam_vaf"; + qcom,cam-vreg-type = <0 1 0 0>; + qcom,cam-vreg-min-voltage = <1200000 0 2800000 2850000>; + qcom,cam-vreg-max-voltage = <1200000 0 2850000 2900000>; + qcom,cam-vreg-op-mode = <200000 0 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 34 0>, + <&msm_gpio 9 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-custom1 = <3>; + qcom,gpio-req-tbl-num = <0 1 2 3>; + qcom,gpio-req-tbl-flags = <1 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET1", + "CAM_STANDBY", + "CAM_MIPI_SWITCH"; + qcom,sensor-position = <0>; + qcom,sensor-mode = <0>; + qcom,cci-master = <0>; + status = "ok"; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@1 { + cell-index = <1>; + compatible = "qcom,camera"; + reg = <0x1>; + qcom,csiphy-sd-index = <0>; + qcom,csid-sd-index = <0>; + qcom,mount-angle = <90>; + cam_vdig-supply = <&pm8916_l2>; + cam_vio-supply = <&pm8916_l6>; + cam_vana-supply = <&pm8916_l17>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana"; + qcom,cam-vreg-type = <0 1 0>; + qcom,cam-vreg-min-voltage = <1200000 0 2850000>; + qcom,cam-vreg-max-voltage = <1200000 0 2850000>; + qcom,cam-vreg-op-mode = <200000 0 80000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_default &cam_sensor_front_default + &cam_mipi_switch_default>; + pinctrl-1 = <&cam_sensor_mclk1_sleep &cam_sensor_front_sleep + &cam_mipi_switch_sleep>; + gpios = <&msm_gpio 27 0>, + <&msm_gpio 28 0>, + <&msm_gpio 33 0>, + <&msm_gpio 9 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-custom1 = <3>; + qcom,gpio-req-tbl-num = <0 1 2 3>; + qcom,gpio-req-tbl-flags = <1 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET", + "CAM_STANDBY", + "CAM_MIPI_SWITCH"; + qcom,sensor-position = <1>; + qcom,cci-master = <0>; + status = "ok"; + clocks = <&clock_gcc clk_mclk1_clk_src>, + <&clock_gcc clk_gcc_camss_mclk1_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; +}; diff --git a/arch/arm/boot/dts/qcom/msm8909-camera.dtsi b/arch/arm/boot/dts/qcom/msm8909-camera.dtsi index 5e96cb1abaa..fefc6a0e9c9 100644 --- a/arch/arm/boot/dts/qcom/msm8909-camera.dtsi +++ b/arch/arm/boot/dts/qcom/msm8909-camera.dtsi @@ -98,6 +98,11 @@ interrupt-names = "ispif"; clocks = <&clock_gcc clk_gcc_camss_ispif_ahb_clk>, <&clock_gcc clk_gcc_camss_ahb_clk>, +<<<<<<< HEAD +======= + <&clock_gcc clk_gcc_camss_top_ahb_clk>, + <&clock_gcc clk_camss_top_ahb_clk_src>, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed <&clock_gcc clk_csi0_clk_src>, <&clock_gcc clk_gcc_camss_csi0_clk>, <&clock_gcc clk_gcc_camss_csi0pix_clk>, @@ -110,12 +115,20 @@ <&clock_gcc clk_gcc_camss_vfe0_clk>, <&clock_gcc clk_gcc_camss_csi_vfe0_clk>; clock-names = "ispif_ahb_clk","camss_ahb_clk", +<<<<<<< HEAD +======= + "camss_top_ahb_clk", "camss_ahb_src", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed "csi0_src_clk", "csi0_clk", "csi0_pix_clk","csi0_rdi_clk", "csi1_src_clk", "csi1_clk", "csi1_pix_clk", "csi1_rdi_clk", "vfe0_clk_src", "camss_vfe_vfe0_clk", "camss_csi_vfe0_clk"; +<<<<<<< HEAD qcom,clock-rates = <40000000 0 0 0 0 0 0 0 0 0 0 0 0>; +======= + qcom,clock-rates = <40000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0>; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed }; qcom,vfe@1b10000 { diff --git a/arch/arm/boot/dts/qcom/msm8909-ion.dtsi b/arch/arm/boot/dts/qcom/msm8909-ion.dtsi index 6209678ee67..a730f7a0acc 100644 --- a/arch/arm/boot/dts/qcom/msm8909-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msm8909-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014, Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014,2016, Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD system_contig_heap: qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qsecom_heap: qcom,ion-heap@27 { /* QSEECOM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <27>; diff --git a/arch/arm/boot/dts/qcom/msm8909-mdss.dtsi b/arch/arm/boot/dts/qcom/msm8909-mdss.dtsi index b4e26603658..db43e7965d6 100644 --- a/arch/arm/boot/dts/qcom/msm8909-mdss.dtsi +++ b/arch/arm/boot/dts/qcom/msm8909-mdss.dtsi @@ -36,6 +36,18 @@ linux,contiguous-region = <&cont_splash_mem>; }; }; +<<<<<<< HEAD +======= + + mdss_fb1: qcom,mdss_fb_wfd { + cell-index = <1>; + compatible = "qcom,mdss-fb"; + qcom,cont-splash-memory { + linux,contiguous-region = <&wb_mem>; + }; + }; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed }; mdss_dsi0: qcom,mdss_dsi@1ac8000 { diff --git a/arch/arm/boot/dts/qcom/msm8909-pinctrl.dtsi b/arch/arm/boot/dts/qcom/msm8909-pinctrl.dtsi index c33e6bda0f2..20aac2ed2c4 100644 --- a/arch/arm/boot/dts/qcom/msm8909-pinctrl.dtsi +++ b/arch/arm/boot/dts/qcom/msm8909-pinctrl.dtsi @@ -1206,6 +1206,20 @@ }; }; +<<<<<<< HEAD +======= + gpio_led_pins { + qcom,pins = <&gp 91>, <&gp 92>; + qcom,num-grp-pins = <2>; + label = "gpio-led-pins"; + gpio_led_off: led_off { + drive-strength = <2>; + bias-disable; /* no pullup */ + output-low; + }; + }; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* add pingrp for touchscreen */ pmx_ts_int_active { qcom,pins = <&gp 13>; diff --git a/arch/arm/boot/dts/qcom/msm8909-pm8916-qrd-skuq.dts b/arch/arm/boot/dts/qcom/msm8909-pm8916-qrd-skuq.dts new file mode 100644 index 00000000000..b3e2128eed3 --- /dev/null +++ b/arch/arm/boot/dts/qcom/msm8909-pm8916-qrd-skuq.dts @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; + +#include "msm8909-pm8916-qrd-skuq.dtsi" + +/ { + qcom,board-id= <0x6040b 0x0>; +}; diff --git a/arch/arm/boot/dts/qcom/msm8909-pm8916-qrd-skuq.dtsi b/arch/arm/boot/dts/qcom/msm8909-pm8916-qrd-skuq.dtsi new file mode 100644 index 00000000000..d19de8bff98 --- /dev/null +++ b/arch/arm/boot/dts/qcom/msm8909-pm8916-qrd-skuq.dtsi @@ -0,0 +1,286 @@ +/* + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "msm8909-pm8916-qrd.dtsi" +#include "msm8909-camera-sensor-skuq.dtsi" +/ { + model = "Qualcomm Technologies, Inc. MSM8909-PM8916 QSIP SKUQ"; + compatible = "qcom,msm8909-qrd", "qcom,msm8909", "qcom,qrd"; + qcom,msm-id = <245 0>, + <258 0>, + <275 0>, + <300 0>; +}; + +&tlmm_pinmux { + bmi160_int1_pin { + qcom,pins = <&gp 96>; + qcom,num-grp-pins = <1>; + label = "bmi160_int1_pin"; + bmi160_int1_default: int1_default { + drive-strength = <6>; + bias-pull-up; + }; + }; + +}; + +/{ + qrd_batterydata: qcom,battery-data { + qcom,rpull-up-kohm = <0>; + qcom,vref-batt-therm = <1800000>; + + #include "batterydata-qrd-skuq-4v35-2500mah.dtsi" + }; +}; + +&pm8916_chg { + qcom,vddmax-mv = <4350>; + qcom,vddsafe-mv = <4380>; + qcom,vinmin-mv = <4470>; + qcom,tchg-mins = <360>; + qcom,disable-vbatdet-based-recharge; + status = "ok"; +}; + +&pm8916_bms { + qcom,battery-data = <&qrd_batterydata>; + qcom,resume-soc = <95>; + qcom,use-reported-soc; + qcom,force-bms-active-on-charger; + status = "ok"; +}; + +&pm8916_vadc { + chan@30 { + qcom,scale-function = <12>; + }; +}; + +&soc { + sound { + compatible = "qcom,msm8x16-audio-codec"; + qcom,model = "msm8909-skuq-snd-card"; + qcom,msm-snd-card-id = <0>; + qcom,msm-codec-type = "internal"; + qcom,msm-ext-pa = "primary"; + qcom,msm-mclk-freq = <9600000>; + qcom,msm-mbhc-hphl-swh = <1>; + qcom,msm-mbhc-gnd-swh = <0>; + qcom,msm-hs-micbias-type = "internal"; + qcom,msm-micbias1-ext-cap; + qcom,audio-routing = + "RX_BIAS", "MCLK", + "SPK_RX_BIAS", "MCLK", + "INT_LDO_H", "MCLK", + "MIC BIAS External", "Handset Mic", + "MIC BIAS Internal2", "Headset Mic", + "MIC BIAS External", "Secondary Mic", + "AMIC1", "MIC BIAS External", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External"; + pinctrl-names = "cdc_lines_act", + "cdc_lines_sus"; + pinctrl-0 = <&cdc_pdm_lines_act>; + pinctrl-1 = <&cdc_pdm_lines_sus>; + asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>, + <&loopback>, <&compress>, <&hostless>, + <&afe>, <&lsm>, <&routing>, <&lpa>, + <&voice_svc>; + asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1", + "msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback", + "msm-compress-dsp", "msm-pcm-hostless", "msm-pcm-afe", + "msm-lsm-client", "msm-pcm-routing", "msm-pcm-lpa", + "msm-voice-svc"; + asoc-cpu = <&dai_pri_auxpcm>, <&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, + <&dai_mi2s3>, <&bt_sco_rx>, <&bt_sco_tx>, <&bt_a2dp_rx>, + <&int_fm_rx>, <&int_fm_tx>, <&afe_pcm_rx>, <&afe_pcm_tx>, + <&afe_proxy_rx>, <&afe_proxy_tx>, <&incall_record_rx>, + <&incall_record_tx>, <&incall_music_rx>, <&incall_music_2_rx>; + asoc-cpu-names = "msm-dai-q6-auxpcm.1", + "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1", + "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3", + "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289", + "msm-dai-q6-dev.12290", + "msm-dai-q6-dev.12292", "msm-dai-q6-dev.12293", + "msm-dai-q6-dev.224", "msm-dai-q6-dev.225", + "msm-dai-q6-dev.241", "msm-dai-q6-dev.240", + "msm-dai-q6-dev.32771", "msm-dai-q6-dev.32772", + "msm-dai-q6-dev.32773", "msm-dai-q6-dev.32770"; + asoc-codec = <&stub_codec>, <&pm8916_tombak_dig>; + asoc-codec-names = "msm-stub-codec.1", "tombak_codec"; + }; + + gpio-leds { + compatible = "gpio-leds"; + STAtus = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&gpio_led_off>; + + red { + gpios = <&msm_gpio 91 0>; + label = "red"; + linux,default-trigger = "none"; + default-state = "off"; + retain-state-suspended; + }; + + green { + gpios = <&msm_gpio 92 0>; + label = "green"; + linux,default-trigger = "none"; + default-state = "off"; + retain-state-suspended; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + input-name = "gpio-keys"; + pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend"; + pinctrl-0 = <&gpio_key_active>; + pinctrl-1 = <&gpio_key_suspend>; + + vol_up { + label = "volume_up"; + gpios = <&msm_gpio 90 0x1>; + linux,input-type = <1>; + linux,code = <115>; + gpio-key,wakeup; + debounce-interval = <15>; + }; + + /delete-node/ vol_down; + }; + + i2c@78b5000 { + bosch@68 { /* Accelerometer and gyroscope sensor */ + compatible = "bosch,bmi160"; + reg = <0x68>; + pinctrl-names = "default"; + pinctrl-0 = <&bmi160_int1_default>; + interrupt-parent = <&msm_gpio>; + interrupts = <96 0x2002>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + bosch,place = <7>; + bosch,gpio-int1 = <&msm_gpio 96 0x2002>; + }; + + memsic@30 { /* Magnetic field sensor */ + compatible = "memsic,mmc3x30"; + reg = <0x30>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + memsic,dir = "reverse-x-axis-forward"; + memsic,auto-report; + }; + + stk@48 { + compatible = "stk,stk3x1x"; + reg = <0x48>; + interrupt-parent = <&msm_gpio>; + interrupts = <80 0x2>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + stk,irq-gpio = <&msm_gpio 80 0x02>; + stk,transmittance = <340>; + stk,state-reg = <0x00>; + stk,psctrl-reg = <0x71>; + stk,alsctrl-reg = <0x38>; + stk,ledctrl-reg = <0xFF>; + stk,wait-reg = <0x07>; + stk,ps-thdh = <150>; + stk,ps-thdl = <100>; + stk,use-fir; + }; + }; + + i2c@78b9000 { + status = "ok"; + himax-ts@48 { + compatible = "himax,852xes"; + reg = <0x48>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2>; + vdd_ana-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + himax,panel-coords = <0 720 0 1280>; + himax,display-coords = <0 720 0 1280>; + himax,irq-gpio = <&msm_gpio 13 0x00>; + himax,rst-gpio = <&msm_gpio 12 0x00>; + report_type = <1>; + }; + }; +}; + +&pm8916_mpps { + mpp@a300 { /* MPP 4 */ + /* Backlight PWM */ + qcom,mode = <1>; /* Digital output */ + qcom,invert = <0>; /* Disable invert */ + qcom,src-sel = <4>; /* DTEST1 */ + qcom,vin-sel = <0>; /* VPH_PWR */ + qcom,master-en = <1>; /* Enable MPP */ + }; +}; + +#include "dsi-panel-hx8394f-720p-video.dtsi" + +&mdss_mdp { + qcom,mdss-pref-prim-intf = "dsi"; +}; + +&dsi_hx8394f_720p_video { + qcom,cont-splash-enabled; + qcom,mdss-dsi-pwm-gpio = <&pm8916_mpps 4 0>; +}; + +&pmx_mdss { + qcom,num-grp-pins = <3>; + qcom,pins = <&gp 25>, <&gp 11>, <&gp 10>; +}; + +&pmx_mdss_te { + qcom,num-grp-pins = <1>; + qcom,pins = <&gp 24>; +}; + +&mdss_dsi0 { + qcom,dsi-pref-prim-pan = <&dsi_hx8394f_720p_video>; + pinctrl-names = "mdss_default", "mdss_sleep"; + pinctrl-0 = <&mdss_dsi_active &mdss_te_active>; + pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>; + + qcom,platform-reset-gpio = <&msm_gpio 25 0>; +}; + +&sdc2_cd_on { + /delete-property/ bias-pull-up; + bias-pull-down; +}; + +&sdc2_cd_off { + /delete-property/ bias-disable; + bias-pull-down; +}; + +&sdhc_2 { + qcom,nonremovable; + + interrupts = <0 1>; + interrupt-map = <0 &intc 0 125 0 + 1 &intc 0 221 0>; + interrupt-names = "hc_irq", "pwr_irq"; + /delete-property/ cd-gpios; +}; diff --git a/arch/arm/boot/dts/qcom/msm8909.dtsi b/arch/arm/boot/dts/qcom/msm8909.dtsi index cb3cbe258f5..bc9ddfe0a5d 100644 --- a/arch/arm/boot/dts/qcom/msm8909.dtsi +++ b/arch/arm/boot/dts/qcom/msm8909.dtsi @@ -125,6 +125,16 @@ reg = <0x0 0x83000000 0x0 0xc00000>; label = "cont_splash_mem"; }; +<<<<<<< HEAD +======= + + wb_mem: wb_region@83c00000 { + linux,reserve-contiguous-region; + linux,reserve-region; + reg = <0x0 0x83c00000 0x0 0xc00000>; + label = "wb_mem"; + }; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed }; soc: soc { }; @@ -1592,6 +1602,12 @@ qcom,use-sw-aes-cbc-ecb-ctr-algo; qcom,use-sw-aes-xts-algo; qcom,use-sw-ahash-algo; +<<<<<<< HEAD +======= + qcom,use-sw-aes-ccm-algo; + qcom,use-sw-hmac-algo; + qcom,use-sw-aead-algo; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed status = "disabled"; qcom,ce-opp-freq = <100000000>; }; diff --git a/arch/arm/boot/dts/qcom/msm8916-512mb-ion.dtsi b/arch/arm/boot/dts/qcom/msm8916-512mb-ion.dtsi index b688a10a6d8..2816540ed7e 100644 --- a/arch/arm/boot/dts/qcom/msm8916-512mb-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msm8916-512mb-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014, Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014,2016, Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,ion-heap@27 { /* QSEECOM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <27>; diff --git a/arch/arm/boot/dts/qcom/msm8916-g36c1h.dts b/arch/arm/boot/dts/qcom/msm8916-g36c1h.dts new file mode 100644 index 00000000000..facf0db6868 --- /dev/null +++ b/arch/arm/boot/dts/qcom/msm8916-g36c1h.dts @@ -0,0 +1,32 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; + +#include "msm8916-qrd.dtsi" +#include "msm8916-memory.dtsi" +#include "g36c1h/msm8916-g36c1h.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. MSM 8916 QRD SKUI"; + compatible = "qcom,msm8916-qrd-skui", "qcom,msm8916-qrd", "qcom,msm8916", "qcom,qrd"; + qcom,board-id = <0x1000b 5> , <0x1010b 5> , <0x3010b 5>; +}; + + +&mdss_dsi0 { + qcom,dsi-pref-prim-pan = <&dsi_ili9806e_fwvga_hsd_hlt_vid>; +}; + +&dsi_ili9806e_fwvga_hsd_hlt_vid { + qcom,cont-splash-enabled; +}; diff --git a/arch/arm/boot/dts/qcom/msm8916-ion.dtsi b/arch/arm/boot/dts/qcom/msm8916-ion.dtsi index 80baf241df4..208be2860cd 100644 --- a/arch/arm/boot/dts/qcom/msm8916-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msm8916-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014, Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014,2016, Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,ion-heap@8 { /* CP_MM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <8>; diff --git a/arch/arm/boot/dts/qcom/msm8916-ql790.dts b/arch/arm/boot/dts/qcom/msm8916-ql790.dts new file mode 100644 index 00000000000..82f4b605e5d --- /dev/null +++ b/arch/arm/boot/dts/qcom/msm8916-ql790.dts @@ -0,0 +1,23 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; + +#include "msm8916.dtsi" +#include "ql790/msm8916-ql790.dtsi" +#include "msm8916-memory.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. MSM 8916 QRD SKUID"; + compatible = "qcom,msm8916-qrd-skuid", "qcom,msm8916-qrd", "qcom,msm8916", "qcom,qrd"; + qcom,board-id = <0x21010b 5>, <0x22010b 5>, <0x23010b 5>, <0x1000b 5>, <0x1000b 0>; +}; diff --git a/arch/arm/boot/dts/qcom/msm8916-qrd-l8150.dts b/arch/arm/boot/dts/qcom/msm8916-qrd-l8150.dts new file mode 100755 index 00000000000..607de14dffd --- /dev/null +++ b/arch/arm/boot/dts/qcom/msm8916-qrd-l8150.dts @@ -0,0 +1,189 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; + +#include "msm8916-qrd.dtsi" +#include "msm8916-memory.dtsi" +#include "l8150/msm8916-l8150.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. MSM 8916 L8152"; + compatible = "qcom,msm8916-qrd-skui", "qcom,msm8916-qrd", "qcom,msm8916", "qcom,qrd"; + qcom,board-id = <0x1000b 9> , <0x1010b 9> , <0x3010b 9>; +}; + +&soc { + i2c@78b9000 { /* BLSP1 QUP5 */ + + qcom,fs-clk-div = <106>; + qcom,high-time-clk-div = <86>; + + himax@48{ + compatible = "himax,8528d"; + reg = <0x48>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2>; + vcc_i2c-supply = <&pm8916_l6>; + /* pins used by touchscreen */ + himax,family-id = <0x82>; + himax,reset-gpio = <&msm_gpio 12 0x0>; + himax,power_ldo-gpio = <&msm_gpio 17 0x0>; + himax,irq-gpio = <&msm_gpio 13 0x2008>; //IRQF_TRIGGER_LOW + himax,display-coords = <0 720 0 1280>; + himax,panel-coords = <0 720 0 1280>; + himax,button-map= <158 102 139>; + himax,no-force-update; + himax,i2c-pull-up; + report_type = <1>; + }; + + synaptics@20 { + compatible = "synaptics,rmi4"; + reg = <0x20>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2>; + vdd-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + /* pins used by touchscreen */ + pinctrl-names = "pmx_ts_active","pmx_ts_suspend","pmx_ts_release"; + pinctrl-0 = <&ts_int_active &ts_reset_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + pinctrl-2 = <&ts_release>; + synaptics,irq-gpio = <&msm_gpio 13 0x2008>; + synaptics,reset-gpio = <&msm_gpio 12 0x0>; + synaptics,power-ldo-gpio = <&msm_gpio 17 0x0>; + synaptics,i2c-pull-up; + synaptics,power-down; + synaptics,use-external-ldo; + synaptics,display-coords = <0 0 720 1280>; + synaptics,panel-coords = <0 0 720 1280>; + synaptics,fw-image-name = "synaptics_dsx_fw_update.bin"; + }; + }; + + gen-vkeys { + compatible = "qcom,gen-vkeys"; + label = "ft5x06_ts"; + qcom,disp-maxx = <480>; + qcom,disp-maxy = <854>; + qcom,panel-maxx = <480>; + qcom,panel-maxy = <946>; + qcom,key-codes = <139 172 158>; + qcom,y-offset = <0>; + }; +}; + +&i2c_6 { + status = "disabled"; +}; + +&i2c_1 { /* BLSP1 QUP1 */ + aw2013@45 { + compatible = "awinic,aw2013"; + reg = <0x45>; + vdd-supply = <&pm8916_l17>; + vcc-supply = <&pm8916_l6>; + + aw2013,red { + aw2013,name = "red"; + aw2013,id = <0>; + aw2013,max-brightness = <255>; + aw2013,max-current = <1>; + aw2013,rise-time-ms = <2>; + aw2013,hold-time-ms = <1>; + aw2013,fall-time-ms = <2>; + aw2013,off-time-ms = <1>; + }; + + aw2013,green { + aw2013,name = "green"; + aw2013,id = <1>; + aw2013,max-brightness = <255>; + aw2013,max-current = <1>; + aw2013,rise-time-ms = <2>; + aw2013,hold-time-ms = <1>; + aw2013,fall-time-ms = <2>; + aw2013,off-time-ms = <1>; + }; + + aw2013,blue { + aw2013,name = "blue"; + aw2013,id = <2>; + aw2013,max-brightness = <255>; + aw2013,max-current = <1>; + aw2013,rise-time-ms = <2>; + aw2013,hold-time-ms = <1>; + aw2013,fall-time-ms = <2>; + aw2013,off-time-ms = <1>; + }; + }; +}; + +&sdc2_cd_on { + /delete-property/ bias-pull-up; + bias-pull-down; +}; + +&sdc2_cd_off { + /delete-property/ bias-disable; + bias-pull-down; +}; + +&sdhc_2 { + qcom,nonremovable; + + interrupts = <0 1>; + interrupt-map = <0 &intc 0 125 0 + 1 &intc 0 221 0>; + interrupt-names = "hc_irq", "pwr_irq"; + /delete-property/ cd-gpios; +}; + +&pm8916_chg { + qcom,vddmax-mv = <4350>; + qcom,vddsafe-mv = <4370>; + qcom,vinmin-mv = <4470>; + qcom,bms-controlled-charging; + qcom,disable-vbatdet-based-recharge; + qcom,cfg-current-limited = <900>; + + qcom,usbin-ovp-irq = <&msm_gpio 110 0>; + pinctrl-names = "ovp-irq"; + pinctrl-0 = <&ovp_default>; + status = "ok"; +}; + +/ { + l8152_batterydata: qcom,battery-data { + qcom,rpull-up-kohm = <100>; + qcom,vref-batt-therm = <1800000>; + + #include "l8150/batterydata-l8150-jd-4v35-2500mah.dtsi" + }; +}; + +&pm8916_bms { + status = "ok"; + qcom,resume-soc = <95>; + qcom,use-reported-soc; + qcom,force-bms-active-on-charger; + qcom,battery-data = <&l8152_batterydata>; +}; + +&pm8916_vadc { + chan@30 { + // SCALE_QRD_BATT_THERM @ include/linux/qpnp/qpnp-adc.h + qcom,scale-function = <6>; + }; +}; + diff --git a/arch/arm/boot/dts/qcom/msm8916-t86519a1.dts b/arch/arm/boot/dts/qcom/msm8916-t86519a1.dts new file mode 100644 index 00000000000..6024496f590 --- /dev/null +++ b/arch/arm/boot/dts/qcom/msm8916-t86519a1.dts @@ -0,0 +1,98 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; + +#include "msm8916-qrd.dtsi" +#include "msm8916-memory.dtsi" +#include "t86519a1/msm8916-t86519a1.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. MSM 8916 T86519A1"; + compatible = "qcom,msm8916-qrd", "qcom,msm8916", "qcom,qrd"; + qcom,board-id = <0x1010b 7>, <0x1000b 5>, <0x1010b 5>, <0x3010b 5>; +}; + +&soc { + i2c@78b8000 { + smb1360_otg_supply: smb1360-chg-fg@14 { + compatible = "qcom,smb1360-chg-fg"; + reg = <0x14>; + interrupt-parent = <&msm_gpio>; + interrupts = <62 8>; + pinctrl-names = "default"; + pinctrl-0 = <&smb_int_default>; + qcom,chg-inhibit-disabled; + qcom,fg-batt-capacity-mah = <2230>; + qcom,fg-cc-soc-coeff = <0x8359>; + qcom,fg-delta-soc = <1>; + qcom,fg-cutoff-voltage-mv = <3300>; + qcom,fg-iterm-ma = <150>; + qcom,fg-ibatt-standby-ma = <200>; + qcom,fg-cc-to-cv-mv = <4350>; + qcom,fg-auto-recharge-soc = <99>; + qcom,thermistor-c1-coeff = <0x86DA>; + qcom,float-voltage-mv = <4350>; + qcom,chg-pre-to-fast-mv = <3000>; + qcom,iterm-ma = <100>; + qcom,thermal-mitigation = <1500 700 600 0>; + qcom,config-hard-thresholds; + qcom,hot-bat-decidegc = <590>; + qcom,cold-bat-decidegc = <0>; + qcom,soft-jeita-supported; + qcom,warm-bat-decidegc = <510>; + qcom,cool-bat-decidegc = <100>; + qcom,warm-bat-mv = <4350>; + qcom,cool-bat-mv = <4350>; + qcom,warm-bat-ma = <600>; + qcom,cool-bat-ma = <600>; + regulator-name = "smb1360_otg_vreg"; + qcom,shdn-after-pwroff; + }; + }; +}; + +&pm8916_chg { + status = "okay"; + qcom,use-external-charger; +}; + + +&pm8916_bms { + status = "ok"; + qcom,disable-bms; +}; + +&usb_otg { + qcom,hsusb-otg-mode = <3>; + qcom,usbid-gpio = <&msm_gpio 110 0>; + pinctrl-names = "default"; + pinctrl-0 = <&usbid_default>; + vbus_otg-supply = <&smb1360_otg_supply>; +}; + +&spmi_bus { + qcom,pm8916@0 { + pm8916_leds { + status = "disabled"; + }; + }; + + qcom,pm8916@1 { + qcom,vibrator@c000 { + status = "okay"; + qcom,vib-timeout-ms = <15000>; + qcom,vib-vtg-level-mV = <3100>; + }; + }; + }; + diff --git a/arch/arm/boot/dts/qcom/msm8916.dtsi b/arch/arm/boot/dts/qcom/msm8916.dtsi index 8a4ebcb85a9..b03c92ab636 100644 --- a/arch/arm/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm/boot/dts/qcom/msm8916.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -374,7 +378,11 @@ cpubw: qcom,cpubw { compatible = "qcom,devbw"; +<<<<<<< HEAD governor = "performance"; +======= + governor = "cpufreq"; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,src-dst-ports = <1 512>; qcom,active-only; qcom,bw-tbl = @@ -739,6 +747,11 @@ qcom,use-sw-aes-xts-algo; qcom,use-sw-aes-ccm-algo; qcom,use-sw-ahash-algo; +<<<<<<< HEAD +======= + qcom,use-sw-hmac-algo; + qcom,use-sw-aead-algo; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed status = "disabled"; qcom,ce-opp-freq = <100000000>; }; diff --git a/arch/arm/boot/dts/qcom/msm8939-common.dtsi b/arch/arm/boot/dts/qcom/msm8939-common.dtsi index 783c10a3ba5..171d8c900e3 100755 --- a/arch/arm/boot/dts/qcom/msm8939-common.dtsi +++ b/arch/arm/boot/dts/qcom/msm8939-common.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -441,7 +445,11 @@ compatible = "qcom,iris_fm"; }; +<<<<<<< HEAD wcnss_wlan: qcom,wcnss-wlan@0a000000 { +======= + qcom,wcnss-wlan@0a000000 { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed compatible = "qcom,wcnss_wlan"; reg = <0x0a000000 0x280000>, <0xb011008 0x04>, @@ -690,6 +698,11 @@ qcom,use-sw-aes-xts-algo; qcom,use-sw-aes-ccm-algo; qcom,use-sw-ahash-algo; +<<<<<<< HEAD +======= + qcom,use-sw-hmac-algo; + qcom,use-sw-aead-algo; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed status = "disabled"; qcom,ce-opp-freq = <100000000>; }; diff --git a/arch/arm/boot/dts/qcom/msm8939-cp8675-i01-p0.dts b/arch/arm/boot/dts/qcom/msm8939-cp8675-i01-p0.dts new file mode 100644 index 00000000000..5187aa2af11 --- /dev/null +++ b/arch/arm/boot/dts/qcom/msm8939-cp8675-i01-p0.dts @@ -0,0 +1,50 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 and +* only version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +/dts-v1/; + +#include "msm8939.dtsi" +#include "msm8939-audio-internal_codec.dtsi" +#include "cp8675/msm8939-cp8675.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. MSM 8939 CP8675"; + compatible = "qcom,msm8939-mtp", "qcom,msm8939", "qcom,mtp"; + qcom,board-id = <8 0>; + yulong,pcb-id = <0>; + yulong,project-id = "8675_I01"; +}; + +&pm8916_chg { + status = "ok"; +}; + +&pm8916_bms { + status = "ok"; + qcom,disable-bms; +}; + +&cci { + qcom,camera@0 { + qcom,led-flash-src = <&led_flash0>; + }; +}; + +&soc { + qcom,spm@b1d2000 { + qcom,saw2-spm-cmd-pc = [00 60 50 11 07 70 01 50 02 62 72 0f]; + }; + + qcom,lpm-workarounds { + /delete-property/ qcom,lpm-wa-skip-l2-spm; + }; +}; diff --git a/arch/arm/boot/dts/qcom/msm8939-ion.dtsi b/arch/arm/boot/dts/qcom/msm8939-ion.dtsi index f5e70544067..d3874fe8f98 100644 --- a/arch/arm/boot/dts/qcom/msm8939-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msm8939-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014, Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014,2016, Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,ion-heap@8 { /* CP_MM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <8>; diff --git a/arch/arm/boot/dts/qcom/msm8939-mdss.dtsi b/arch/arm/boot/dts/qcom/msm8939-mdss.dtsi index dcee34facb2..b36bb5be4f5 100755 --- a/arch/arm/boot/dts/qcom/msm8939-mdss.dtsi +++ b/arch/arm/boot/dts/qcom/msm8939-mdss.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -34,9 +38,22 @@ qcom,mdss-ib-factor = <2 1>; /* 2 times */ qcom,mdss-ib-factor-cmd = <10 6>; /* 1.6 times */ qcom,mdss-clk-factor = <105 100>; /* 1.05 times */ +<<<<<<< HEAD qcom,max-bandwidth-low-kbps = <2000000>; qcom,max-bandwidth-high-kbps = <2000000>; qcom,max-bandwidth-per-pipe-kbps = <1500000>; +======= + qcom,max-bandwidth-low-kbps = <2500000>; + qcom,max-bandwidth-high-kbps = <2500000>; + qcom,max-bandwidth-per-pipe-kbps = <1 2100000>, /* Default */ + <2 1500000>; /* Camera */ + + /* Bandwidth limit settings */ + qcom,max-bw-settings = <1 2500000>, /* Default */ + <2 2100000>, /* Camera */ + <4 1900000>, /* HFlip */ + <8 1900000>; /* VFlip */ +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* VBIF QoS remapper settings*/ qcom,mdss-vbif-qos-rt-setting = <2 2 2 2>; @@ -148,7 +165,11 @@ qcom,regulator-ldo-mode; qcom,platform-strength-ctrl = [ff 06]; qcom,platform-bist-ctrl = [00 00 b1 ff 00 00]; +<<<<<<< HEAD qcom,platform-regulator-settings = [02 09 03 00 20 00 01]; +======= + qcom,platform-regulator-settings = [00 01 01 00 20 07 00]; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,platform-lane-config = [00 00 00 00 00 00 00 01 97 00 00 00 00 05 00 00 01 97 00 00 00 00 0a 00 00 01 97 @@ -234,7 +255,11 @@ qcom,platform-strength-ctrl = [ff 06]; qcom,platform-bist-ctrl = [00 00 b1 ff 00 00]; qcom,regulator-ldo-mode; +<<<<<<< HEAD qcom,platform-regulator-settings = [02 09 03 00 20 00 01]; +======= + qcom,platform-regulator-settings = [00 01 01 00 20 07 00]; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,platform-lane-config = [00 00 00 00 00 00 00 01 97 00 00 00 00 05 00 00 01 97 00 00 00 00 0a 00 00 01 97 diff --git a/arch/arm/boot/dts/qcom/msm8939-qrd-skuk.dts b/arch/arm/boot/dts/qcom/msm8939-qrd-skuk.dts index c5aac0c5156..2210fede19a 100755 --- a/arch/arm/boot/dts/qcom/msm8939-qrd-skuk.dts +++ b/arch/arm/boot/dts/qcom/msm8939-qrd-skuk.dts @@ -19,7 +19,11 @@ / { model = "Qualcomm Technologies, Inc. MSM8939 QRD SKUK"; compatible = "qcom,msm8939-qrd-skuk", "qcom,msm8939-qrd", "qcom,msm8939", "qcom,qrd"; +<<<<<<< HEAD qcom,board-id = <0x1000b 20>, <0x2000b 20>; +======= + qcom,board-id = <0x1000b 5>, <0x2000b 5>; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed }; &tlmm_pinmux { @@ -111,7 +115,11 @@ qcom,disable-bms; }; +<<<<<<< HEAD /*&mdss_dsi0 { +======= +&mdss_dsi0 { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,dsi-pref-prim-pan = <&dsi_nt35596_1080p_skuk_video>; vsp-supply = <&tps65132_pos>; @@ -150,7 +158,11 @@ qcom,mdss-dsi-pan-enable-dynamic-fps; qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode"; }; +<<<<<<< HEAD */ +======= + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed &usb_otg { qcom,hsusb-otg-mode = <3>; qcom,usbid-gpio = <&msm_gpio 110 0>; diff --git a/arch/arm/boot/dts/qcom/msm8939-qrd.dtsi b/arch/arm/boot/dts/qcom/msm8939-qrd.dtsi index 873506b8b7b..1f1da02fc23 100755 --- a/arch/arm/boot/dts/qcom/msm8939-qrd.dtsi +++ b/arch/arm/boot/dts/qcom/msm8939-qrd.dtsi @@ -22,6 +22,30 @@ pinctrl-0 = <&uart_console_sleep>; }; +<<<<<<< HEAD +======= +&soc { + i2c@78ba000 { /* BLSP1 QUP6 */ + nfc-nci@e { + compatible = "qcom,nfc-nci"; + reg = <0x0e>; + qcom,irq-gpio = <&msm_gpio 21 0x00>; + qcom,dis-gpio = <&msm_gpio 20 0x00>; + qcom,clk-src = "BBCLK2"; + qcom,clk-en-gpio = <&msm_gpio 0 0x00>; + interrupt-parent = <&msm_gpio>; + interrupts = <21 0>; + interrupt-names = "nfc_irq"; + pinctrl-names = "nfc_active","nfc_suspend"; + pinctrl-0 = <&nfc_int_active &nfc_disable_active>; + pinctrl-1 = <&nfc_int_suspend &nfc_disable_suspend>; + qcom,clk-gpio = <&pm8916_gpios 2 0>; + clocks = <&clock_rpm clk_bb_clk2_pin>; + clock-names = "ref_clk"; + }; + }; +}; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed &spmi_bus { qcom,pm8916@1 { diff --git a/arch/arm/boot/dts/qcom/msm8939-spirit.dts b/arch/arm/boot/dts/qcom/msm8939-spirit.dts new file mode 100644 index 00000000000..54b2a26ed23 --- /dev/null +++ b/arch/arm/boot/dts/qcom/msm8939-spirit.dts @@ -0,0 +1,93 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 and +* only version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +/dts-v1/; + +#include "msm8939.dtsi" +#include "msm8939-audio-internal_codec.dtsi" +#include "spirit/msm8939-spirit.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. MSM 8939 SPIRIT"; + compatible = "qcom,msm8939"; + qcom,board-id = <0x1000b 8>, <0x2000b 5>; +}; + +&i2c_4 { + smb1360_otg_supply: smb1360-chg-fg@14 { + compatible = "qcom,smb1360-chg-fg"; + reg = <0x14>; + interrupt-parent = <&msm_gpio>; + interrupts = <62 2>; + pinctrl-names = "default"; + pinctrl-0 = <&smb_int_default>; + qcom,stat-pulsed-irq; + qcom,chg-inhibit-disabled; + qcom,fg-batt-capacity-mah = <2500>; + qcom,fg-cc-soc-coeff = <0x828E>; + qcom,float-voltage-mv = <4350>; + qcom,fg-cc-to-cv-mv = <4330>; + qcom,fg-voltage-min-mv = <3200>; + qcom,fg-voltage-empty-mv = <3200>; + qcom,fg-suspend-voltage-empty-mv = <3400>; + qcom,fg-cutoff-voltage-mv = <3450>; + qcom,ibatt-standby-ma = <200>; + qcom,fg-soc-max = <90>; + qcom,fg-soc-min = <15>; + qcom,fg-auto-recharge-soc = <99>; + qcom,fg-delta-soc = <1>; + qcom,thermistor-c1-coeff = <0x86C2>; + qcom,iterm-ma = <200>; + qcom,recharge-thresh-mv = <100>; + qcom,charging-timeout = <1536>; + qcom,otg-batt-curr-limit = <1500>; + qcom,thermal-mitigation = <1200 900 600 0>; + qcom,empty-soc-disabled; + regulator-name = "smb1360_otg_vreg"; + qcom,fg-reset-at-pon; + qcom,fg-reset-thresold-mv = <250>; + qcom,parallel-charging-enabled; + qcom,max-parallel-current-ma = <0x12c>; + qcom,rsense-10mhom; + qcom,batt-id-disabled; + qcom,shdn-after-pwroff; + qcom,config-hard-thresholds; + qcom,soft-jeita-supported; + qcom,cold-bat-decidegc = <0>; + qcom,cool-bat-decidegc = <100>; + qcom,cool-bat-mv = <4200>; + qcom,cool-bat-ma = <450>; + qcom,warm-bat-decidegc = <450>; + qcom,warm-bat-mv = <0>; + qcom,warm-bat-ma = <0>; + qcom,hot-bat-decidegc = <600>; + }; +}; + +&pm8916_chg { + status = "ok"; +}; + +&pm8916_bms { + status = "ok"; + qcom,disable-bms; +}; + +&pm8916_l17 { + regulator-always-on; +}; + +&soc { + qcom,lpm-workarounds { + /delete-property/ qcom,lpm-wa-skip-l2-spm; + }; +}; diff --git a/arch/arm/boot/dts/qcom/msm8939-v3.0-qrd-skuk.dts b/arch/arm/boot/dts/qcom/msm8939-v3.0-qrd-skuk.dts index 93cdf3a4f17..4158c3c3251 100644 --- a/arch/arm/boot/dts/qcom/msm8939-v3.0-qrd-skuk.dts +++ b/arch/arm/boot/dts/qcom/msm8939-v3.0-qrd-skuk.dts @@ -20,7 +20,11 @@ / { model = "Qualcomm Technologies, Inc. MSM8939v3.0 QRD SKUK"; compatible = "qcom,msm8939-qrd-skuk", "qcom,msm8939-qrd", "qcom,msm8939", "qcom,qrd"; +<<<<<<< HEAD qcom,board-id = <0x1000b 20>, <0x2000b 20>; +======= + qcom,board-id = <0x1000b 5>, <0x2000b 5>; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed }; &tlmm_pinmux { diff --git a/arch/arm/boot/dts/qcom/msm8974-ion.dtsi b/arch/arm/boot/dts/qcom/msm8974-ion.dtsi index de751a0f531..9577ee228c3 100644 --- a/arch/arm/boot/dts/qcom/msm8974-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msm8974-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2012-2014,2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,ion-heap@8 { /* CP_MM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <8>; diff --git a/arch/arm/boot/dts/qcom/msm8992-ion.dtsi b/arch/arm/boot/dts/qcom/msm8992-ion.dtsi index b359777bca1..8c4f67fd1a9 100644 --- a/arch/arm/boot/dts/qcom/msm8992-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msm8992-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014,2016 The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,10 +25,13 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,ion-heap@22 { /* adsp heap */ reg = <22>; diff --git a/arch/arm/boot/dts/qcom/msm8994-ion.dtsi b/arch/arm/boot/dts/qcom/msm8994-ion.dtsi index 16b920e0691..e03f306486c 100644 --- a/arch/arm/boot/dts/qcom/msm8994-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msm8994-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014,2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,ion-heap@8 { /* CP_MM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <8>; diff --git a/arch/arm/boot/dts/qcom/msmtellurium-ion.dtsi b/arch/arm/boot/dts/qcom/msmtellurium-ion.dtsi index 79fc0e41573..d47d764513d 100644 --- a/arch/arm/boot/dts/qcom/msmtellurium-ion.dtsi +++ b/arch/arm/boot/dts/qcom/msmtellurium-ion.dtsi @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014, Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014,2016 Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,11 +25,14 @@ qcom,ion-heap-type = "SYSTEM"; }; +<<<<<<< HEAD qcom,ion-heap@21 { reg = <21>; qcom,ion-heap-type = "SYSTEM_CONTIG"; }; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcom,ion-heap@8 { /* CP_MM HEAP */ compatible = "qcom,msm-ion-reserve"; reg = <8>; diff --git a/arch/arm/boot/dts/qcom/ql790/dsi_panel_dijing_nt35521h_hsd4p7_hd_video.dtsi b/arch/arm/boot/dts/qcom/ql790/dsi_panel_dijing_nt35521h_hsd4p7_hd_video.dtsi new file mode 100644 index 00000000000..29f4a830c05 --- /dev/null +++ b/arch/arm/boot/dts/qcom/ql790/dsi_panel_dijing_nt35521h_hsd4p7_hd_video.dtsi @@ -0,0 +1,270 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/*--------------------------------------------------------------------------- + * This file is autogenerated file using gcdb parser. Please do not edit it. + * Update input XML file to add a new entry or update variable in this file + * VERSION = "1.0" + *---------------------------------------------------------------------------*/ +/* + Date Author IC Module Why +2015-04-24 xingbin nt35521 dijing add dijing lcd for QL790 +2015-04-24 xingbin nt35521 dijing add code version for QL790 +2015-05-18 xingbin nt35521 dijing modify proch for TCLK-TRAIL +2015-06-01 lihuiqin nt35521h dijing update lcd parameter for vendor's require +2015-06-16 wangjiao nt35521h dijing modify lcd parameter for QL790 +2015-07-03 wangjiao nt35521h dijing modify lcd Gamma parameter for QL790 +2015-07-20 wangjiao nt35521h dijing modify lcd VGL Voltage for band + */ +&mdss_mdp { + nt35521_dijing_4p7inch_hd_vid: qcom,mdss_dijing_nt35521_4p7inch_video { + qcom,mdss-dsi-panel-name = "nt35521_dijing_4p7inch_hd_video_panel"; + qcom,mdss-dsi-panel-code-version="_20150720"; + qcom,mdss-dsi-panel-supply = <1>; //primary:1 second:2 + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <720>; + qcom,mdss-dsi-panel-height = <1280>; + qcom,mdss-dsi-h-front-porch = <60>; + qcom,mdss-dsi-h-back-porch = <60>; + qcom,mdss-dsi-h-pulse-width = <12>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-front-porch = <16>; + qcom,mdss-dsi-v-back-porch = <16>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-color-order = <0>; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-pixel-packing = <0>; + qcom,mdss-dsi-on-command = [ + 39 01 00 00 00 00 06 F0 55 AA 52 08 00 + 39 01 00 00 00 00 05 FF AA 55 A5 80 + 39 01 00 00 00 00 03 6F 11 00 + 39 01 00 00 00 00 03 F7 20 00 + 39 01 00 00 00 00 02 6F 01 + 39 01 00 00 00 00 02 B1 21 + 39 01 00 00 00 00 02 C8 80 + 39 01 00 00 00 00 04 D9 00 01 4C + 39 01 00 00 00 00 06 BD 01 A0 0C 08 01 + 39 01 00 00 00 00 02 6F 02 + 39 01 00 00 00 00 02 B8 0C + 39 01 00 00 00 00 03 BB 11 11 + 39 01 00 00 00 00 03 BC 00 00 + 39 01 00 00 00 00 02 B6 01 + 39 01 00 00 00 00 06 F0 55 AA 52 08 01 + 39 01 00 00 00 00 03 B0 0A 0A + 39 01 00 00 00 00 03 B1 0A 0A + 39 01 00 00 00 00 03 BC A0 00 + 39 01 00 00 00 00 03 BD A0 00 + 39 01 00 00 00 00 02 CA 00 + 39 01 00 00 00 00 02 C0 04 + 39 01 00 00 00 00 03 B5 03 03 + 39 01 00 00 00 00 02 BE 7A + 39 01 00 00 00 00 03 B3 28 28 + 39 01 00 00 00 00 03 B4 1C 1C + 39 01 00 00 00 00 03 B8 05 05 + 39 01 00 00 00 00 03 B9 36 36 + 39 01 00 00 00 00 03 BA 15 15 + 39 01 00 00 00 00 06 F0 55 AA 52 08 02 + 39 01 00 00 00 00 02 EE 01 + 39 01 00 00 00 00 11 B0 00 00 00 09 00 1D 00 32 00 41 00 61 00 7E 00 A7 + 39 01 00 00 00 00 11 B1 00 C8 01 01 01 33 01 84 01 C7 01 C9 02 06 02 4C + 39 01 00 00 00 00 11 B2 02 73 02 AC 02 CD 03 01 03 1B 03 44 03 5F 03 78 + 39 01 00 00 00 00 05 B3 03 DF 03 FF + 39 01 00 00 00 00 02 6F 02 + 39 01 00 00 00 00 02 F7 47 + 39 01 00 00 00 00 02 6F 0A + 39 01 00 00 00 00 02 F7 02 + 39 01 00 00 00 00 02 6F 17 + 39 01 00 00 00 00 02 F4 70 + 39 01 00 00 00 00 02 6F 11 + 39 01 00 00 00 00 02 F3 01 + 39 01 00 00 00 00 06 F0 55 AA 52 08 06 + 39 01 00 00 00 00 03 B0 2D 2E + 39 01 00 00 00 00 03 B1 29 2A + 39 01 00 00 00 00 03 B2 16 18 + 39 01 00 00 00 00 03 B3 10 12 + 39 01 00 00 00 00 03 B4 00 31 + 39 01 00 00 00 00 03 B5 31 31 + 39 01 00 00 00 00 03 B6 31 02 + 39 01 00 00 00 00 03 B7 31 31 + 39 01 00 00 00 00 03 B8 31 31 + 39 01 00 00 00 00 03 B9 31 31 + 39 01 00 00 00 00 03 BA 31 31 + 39 01 00 00 00 00 03 BB 31 31 + 39 01 00 00 00 00 03 BC 31 31 + 39 01 00 00 00 00 03 BD 03 31 + 39 01 00 00 00 00 03 BE 31 31 + 39 01 00 00 00 00 03 BF 31 01 + 39 01 00 00 00 00 03 C0 13 11 + 39 01 00 00 00 00 03 C1 19 17 + 39 01 00 00 00 00 03 C2 2A 29 + 39 01 00 00 00 00 03 C3 2E 2D + 39 01 00 00 00 00 03 E5 31 31 + 39 01 00 00 00 00 03 C4 2E 2D + 39 01 00 00 00 00 03 C5 29 2A + 39 01 00 00 00 00 03 C6 13 11 + 39 01 00 00 00 00 03 C7 19 17 + 39 01 00 00 00 00 03 C8 03 31 + 39 01 00 00 00 00 03 C9 31 31 + 39 01 00 00 00 00 03 CA 31 01 + 39 01 00 00 00 00 03 CB 31 31 + 39 01 00 00 00 00 03 CC 31 31 + 39 01 00 00 00 00 03 CD 31 31 + 39 01 00 00 00 00 03 CE 31 31 + 39 01 00 00 00 00 03 CF 31 31 + 39 01 00 00 00 00 03 D0 31 31 + 39 01 00 00 00 00 03 D1 00 31 + 39 01 00 00 00 00 03 D2 31 31 + 39 01 00 00 00 00 03 D3 31 02 + 39 01 00 00 00 00 03 D4 16 18 + 39 01 00 00 00 00 03 D5 10 12 + 39 01 00 00 00 00 03 D6 2A 29 + 39 01 00 00 00 00 03 D7 2D 2E + 39 01 00 00 00 00 03 E6 31 31 + 39 01 00 00 00 00 06 D8 00 00 00 00 00 + 39 01 00 00 00 00 06 D9 00 00 00 00 00 + 39 01 00 00 00 00 02 E7 00 + 39 01 00 00 00 00 06 F0 55 AA 52 08 05 + 39 01 00 00 00 00 02 ED 30 + 39 01 00 00 00 00 06 F0 55 AA 52 08 03 + 39 01 00 00 00 00 03 B1 20 00 + 39 01 00 00 00 00 03 B0 20 00 + 39 01 00 00 00 00 06 F0 55 AA 52 08 05 + 39 01 00 00 00 00 02 E5 00 + 39 01 00 00 00 00 06 F0 55 AA 52 08 05 + 39 01 00 00 00 00 03 B0 17 06 + 39 01 00 00 00 00 02 B8 00 + 39 01 00 00 00 00 03 B1 17 06 + 39 01 00 00 00 00 03 B9 00 03 + 39 01 00 00 00 00 03 B2 17 06 + 39 01 00 00 00 00 03 BA 00 00 + 39 01 00 00 00 00 03 B3 17 06 + 39 01 00 00 00 00 03 BB 02 03 + 39 01 00 00 00 00 03 B4 17 06 + 39 01 00 00 00 00 03 B5 17 06 + 39 01 00 00 00 00 03 B6 17 06 + 39 01 00 00 00 00 03 B7 17 06 + 39 01 00 00 00 00 03 BC 02 03 + 39 01 00 00 00 00 02 E5 06 + 39 01 00 00 00 00 02 E6 06 + 39 01 00 00 00 00 02 E7 00 + 39 01 00 00 00 00 02 E8 06 + 39 01 00 00 00 00 02 E9 06 + 39 01 00 00 00 00 02 EA 06 + 39 01 00 00 00 00 02 EB 00 + 39 01 00 00 00 00 02 EC 00 + 39 01 00 00 00 00 06 F0 55 AA 52 08 05 + 39 01 00 00 00 00 02 C0 0A + 39 01 00 00 00 00 02 C1 08 + 39 01 00 00 00 00 02 C2 A6 + 39 01 00 00 00 00 02 C3 05 + 39 01 00 00 00 00 06 F0 55 AA 52 08 03 + 39 01 00 00 00 00 06 B2 04 00 86 00 00 + 39 01 00 00 00 00 06 B3 04 00 86 00 00 + 39 01 00 00 00 00 06 B4 04 00 17 00 00 + 39 01 00 00 00 00 06 B5 04 00 17 00 00 + 39 01 00 00 00 00 06 F0 55 AA 52 08 05 + 39 01 00 00 00 00 02 C4 00 + 39 01 00 00 00 00 02 C5 02 + 39 01 00 00 00 00 02 C6 22 + 39 01 00 00 00 00 02 C7 03 + 39 01 00 00 00 00 06 F0 55 AA 52 08 03 + 39 01 00 00 00 00 06 B6 02 00 19 00 00 + 39 01 00 00 00 00 06 B7 02 00 19 00 00 + 39 01 00 00 00 00 06 B8 02 00 19 00 00 + 39 01 00 00 00 00 06 B9 02 00 19 00 00 + 39 01 00 00 00 00 06 F0 55 AA 52 08 05 + 39 01 00 00 00 00 03 C8 06 20 + 39 01 00 00 00 00 03 C9 02 20 + 39 01 00 00 00 00 03 CA 01 60 + 39 01 00 00 00 00 03 CB 01 60 + 39 01 00 00 00 00 06 F0 55 AA 52 08 03 + 39 01 00 00 00 00 06 BA 44 00 86 00 00 + 39 01 00 00 00 00 06 BB 44 00 86 00 00 + 39 01 00 00 00 00 06 BC 44 00 1A 00 00 + 39 01 00 00 00 00 06 BD 44 00 1A 00 00 + 39 01 00 00 00 00 06 F0 55 AA 52 08 05 + 39 01 00 00 00 00 06 D1 00 05 01 07 10 + 39 01 00 00 00 00 06 D2 10 05 05 03 10 + 39 01 00 00 00 00 06 D3 20 00 43 07 10 + 39 01 00 00 00 00 06 D4 30 00 43 07 10 + 39 01 00 00 00 00 06 F0 55 AA 52 08 05 + 39 01 00 00 00 00 08 D0 00 00 00 00 00 00 00 + 39 01 00 00 00 00 0c D5 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 00 00 0c D6 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 00 00 0c D7 00 00 00 00 00 00 00 00 00 00 00 + 39 01 00 00 00 00 06 D8 00 00 00 00 00 + 39 01 00 00 00 00 06 F0 55 AA 52 08 05 + 39 01 00 00 00 00 04 CC 00 00 3C + 39 01 00 00 00 00 04 CD 00 00 3C + 39 01 00 00 00 00 04 CE 00 00 3C + 39 01 00 00 00 00 04 CF 00 00 3C + 39 01 00 00 00 00 06 F0 55 AA 52 08 03 + 39 01 00 00 00 00 05 C0 00 34 00 00 + 39 01 00 00 00 00 05 C1 00 00 34 00 + 39 01 00 00 00 00 05 C2 00 00 34 00 + 39 01 00 00 00 00 05 C3 00 00 34 00 + 39 01 00 00 00 00 06 F0 55 AA 52 08 03 + 39 01 00 00 00 00 02 C4 60 + 39 01 00 00 00 00 02 C5 C0 + 39 01 00 00 00 00 02 C6 00 + 39 01 00 00 00 00 02 C7 00 + 39 01 00 00 00 00 02 6F 01 + 39 01 00 00 00 00 02 F9 46 + 39 01 00 00 00 00 06 F0 55 AA 52 08 00 + 05 01 00 00 78 00 02 11 00 + 05 01 00 00 14 00 02 29 00 + 15 01 00 00 01 00 02 53 2c + ]; + qcom,mdss-dsi-off-command = [ + 15 01 00 00 01 00 02 53 24 + 05 01 00 00 14 00 02 28 00 + 05 01 00 00 78 00 02 10 00 + ]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = <2>; + qcom,mdss-dsi-lane-map = <0>; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [76 1A 10 00 3C 3E 14 1C 12 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x04>; + qcom,mdss-dsi-t-clk-pre = <0x19>; + qcom,mdss-dsi-bl-min-level = <0>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,mdss-dsi-dma-trigger = <4>; + qcom,mdss-dsi-mdp-trigger = <0>; + qcom,mdss-pan-bl-levels = <1 255>; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-bl-pmic-bank-select = <3>; + qcom,mdss-dsi-bl-pmic-pwm-frequency = <270>; + qcom,mdss-dsi-pwm-gpio = <&pm8916_gpios 6 0>; + qcom,mdss-dsi-reset-sequence = <1 10>, <0 10>, <1 120>; + }; +}; + diff --git a/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-camera.dtsi b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-camera.dtsi new file mode 100644 index 00000000000..bf65a3960a3 --- /dev/null +++ b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-camera.dtsi @@ -0,0 +1,329 @@ +/* + * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +&soc { + + led_flash0: qcom,camera-led-flash { + cell-index = <0>; + compatible = "qcom,camera-led-flash"; + qcom,flash-type = <3>; + qcom,flash-source = <&flash_sgm3785>; + qcom,torch-source = <&flash_sgm3785>; + }; + + flash_sgm3785:flashlight { + compatible = "qcom,leds-gpio-flash"; + status = "okay"; + pinctrl-names = "flash_default"; + pinctrl-0 = <&cam_sensor_flash_default>; + qcom,flash-en = <&msm_gpio 32 0>; + qcom,flash-now = <&msm_gpio 31 0>; + qcom,op-seq = "flash_en", "flash_now"; + qcom,torch-seq-val = <0 1>; + qcom,flash-seq-val = <1 1>; + linux,name = "flashlight"; + linux,default-trigger = "flashlight-trigger"; + }; + +}; + +&cci { + + actuator0: qcom,actuator@6e { + cell-index = <3>; + reg = <0x6e>; + compatible = "qcom,actuator"; + qcom,cci-master = <0>; + }; + + eeprom0: qcom,eeprom@6c { + cell-index = <0>; + reg = <0x6c>; + qcom,eeprom-name = "qtech_ov8865_f8865bs"; + compatible = "qcom,eeprom"; + qcom,slave-addr = <0x6c>; + qcom,cci-master = <0>; + qcom,num-blocks = <6>; + + qcom,page0 = <1 0x0100 2 0x01 1 1>; + qcom,poll0 = <0 0x0 2 0 1 1>; + qcom,mem0 = <0 0x0 2 0 1 0>; + + qcom,page1 = <1 0x5002 2 0x00 1 1>; + qcom,poll1 = <0 0x0 2 0 1 1>; + qcom,mem1 = <0 0x0 2 0 1 0>; + + qcom,page2 = <1 0x3d84 2 0xc0 1 1>; + qcom,poll2 = <0 0x0 2 0 1 1>; + qcom,mem2 = <0 0x3d00 2 0 1 0>; + + qcom,page3 = <1 0x3d88 2 0x7010 2 1>; + qcom,poll3 = <0 0x0 2 0 1 1>; + qcom,mem3 = <0 0x3d00 2 0 1 0>; + + qcom,page4 = <1 0x3d8A 2 0x7115 2 1>; + qcom,pageen4 = <1 0x3d81 2 0x01 1 10>; + qcom,poll4 = <0 0x0 2 0 1 1>; + qcom,mem4 = <262 0x7010 2 0 1 1>; + + qcom,page5 = <1 0x5002 2 0x08 1 1>; + qcom,poll5 = <0 0x0 2 0 1 1>; + qcom,mem5 = <0 0x0 2 0 1 0>; + + cam_vdig-supply = <&pm8916_l2>; + cam_vio-supply = <&pm8916_l6>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio"; + qcom,cam-vreg-type = <0 1>; + qcom,cam-vreg-min-voltage = <1200000 1800000>; + qcom,cam-vreg-max-voltage = <1200000 1800000>; + qcom,cam-vreg-op-mode = <140000 140000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default + &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + qcom,gpio-no-mux = <0>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 34 0>, + <&msm_gpio 51 0>, + <&msm_gpio 121 0>, + <&msm_gpio 120 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-cameraid = <3>; + qcom,gpio-vana = <4>; + qcom,gpio-vdig = <5>; + qcom,gpio-req-tbl-num = <0 1 2 3 4 5>; + qcom,gpio-req-tbl-flags = <1 0 0 1 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET", + "CAM_STANDBY", + "CAM_ID", + "CAM_VANA", + "CAM_VDIG"; + qcom,cam-power-seq-type = "sensor_gpio", + "sensor_gpio", + "sensor_vreg", + "sensor_gpio", + "sensor_vreg", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_clk", + "sensor_i2c_mux"; + qcom,cam-power-seq-val = "sensor_gpio_standby", + "sensor_gpio_reset", + "cam_vio", + "sensor_gpio_vana", + "cam_vdig", + "sensor_gpio_vdig", + "sensor_gpio_standby", + "sensor_gpio_reset", + "sensor_cam_mclk", + "none"; + qcom,cam-power-seq-cfg-val = <0 0 0 1 0 0 1 1 23880000 0>; + qcom,cam-power-seq-delay = <0 0 1 1 1 1 1 1 10 0>; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + eeprom1: qcom,eeprom@6d { + cell-index = <1>; + reg = <0x6d>; + qcom,eeprom-name = "ofilm_ov8865_ohq8a06"; + compatible = "qcom,eeprom"; + qcom,slave-addr = <0x6c>; + qcom,cci-master = <0>; + qcom,num-blocks = <6>; + + qcom,page0 = <1 0x0100 2 0x01 1 1>; + qcom,poll0 = <0 0x0 2 0 1 1>; + qcom,mem0 = <0 0x0 2 0 1 0>; + + qcom,page1 = <1 0x5002 2 0x00 1 1>; + qcom,poll1 = <0 0x0 2 0 1 1>; + qcom,mem1 = <0 0x0 2 0 1 0>; + + qcom,page2 = <1 0x3d84 2 0xc0 1 1>; + qcom,poll2 = <0 0x0 2 0 1 1>; + qcom,mem2 = <0 0x3d00 2 0 1 0>; + + qcom,page3 = <1 0x3d88 2 0x7010 2 1>; + qcom,poll3 = <0 0x0 2 0 1 1>; + qcom,mem3 = <0 0x3d00 2 0 1 0>; + + qcom,page4 = <1 0x3d8A 2 0x70F4 2 1>; + qcom,pageen4 = <1 0x3d81 2 0x01 1 10>; + qcom,poll4 = <0 0x0 2 0 1 1>; + qcom,mem4 = <229 0x7010 2 0 1 1>; + + qcom,page5 = <1 0x5002 2 0x08 1 1>; + qcom,poll5 = <0 0x0 2 0 1 1>; + qcom,mem5 = <0 0x0 2 0 1 0>; + + cam_vdig-supply = <&pm8916_l2>; + cam_vio-supply = <&pm8916_l6>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio"; + qcom,cam-vreg-type = <0 1>; + qcom,cam-vreg-min-voltage = <1200000 1800000>; + qcom,cam-vreg-max-voltage = <1200000 1800000>; + qcom,cam-vreg-op-mode = <140000 140000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default + &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + qcom,gpio-no-mux = <0>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 34 0>, + <&msm_gpio 51 0>, + <&msm_gpio 121 0>, + <&msm_gpio 120 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-cameraid = <3>; + qcom,gpio-vana = <4>; + qcom,gpio-vdig = <5>; + qcom,gpio-req-tbl-num = <0 1 2 3 4 5>; + qcom,gpio-req-tbl-flags = <1 0 0 1 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET", + "CAM_STANDBY", + "CAM_ID", + "CAM_VANA", + "CAM_VDIG"; + qcom,cam-power-seq-type = "sensor_gpio", + "sensor_gpio", + "sensor_vreg", + "sensor_gpio", + "sensor_vreg", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_clk", + "sensor_i2c_mux"; + qcom,cam-power-seq-val = "sensor_gpio_standby", + "sensor_gpio_reset", + "cam_vio", + "sensor_gpio_vana", + "cam_vdig", + "sensor_gpio_vdig", + "sensor_gpio_standby", + "sensor_gpio_reset", + "sensor_cam_mclk", + "none"; + qcom,cam-power-seq-cfg-val = <0 0 0 1 0 0 1 1 23880000 0>; + qcom,cam-power-seq-delay = <0 0 1 1 1 1 1 1 10 0>; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@0 { + cell-index = <0>; + compatible = "qcom,camera"; + reg = <0x0>; + qcom,csiphy-sd-index = <0>; + qcom,csid-sd-index = <0>; + qcom,mount-angle = <90>; + qcom,actuator-src = <&actuator0>; + qcom,led-flash-src = <&led_flash0>; + qcom,eeprom-src = <&eeprom0 &eeprom1>; + cam_vdig-supply = <&pm8916_l2>; + cam_vio-supply = <&pm8916_l6>; + cam_vaf-supply = <&pm8916_l10>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vaf"; + qcom,cam-vreg-type = <0 0 0>; + qcom,cam-vreg-min-voltage = <1200000 1800000 2700000>; + qcom,cam-vreg-max-voltage = <1200000 1800000 2800000>; + qcom,cam-vreg-op-mode = <140000 140000 140000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default + &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 34 0>, + <&msm_gpio 51 0>, + <&msm_gpio 121 0>, + <&msm_gpio 120 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-cameraid = <3>; + qcom,gpio-vana = <4>; + qcom,gpio-vdig = <5>; + qcom,gpio-req-tbl-num = <0 1 2 3 4 5>; + qcom,gpio-req-tbl-flags = <1 0 0 1 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET", + "CAM_STANDBY", + "CAM_ID", + "CAM_VANA", + "CAM_VDIG"; + qcom,sensor-position = <0>; + qcom,sensor-mode = <0>; + qcom,cci-master = <0>; + qcom,mclk-23880000; + status = "ok"; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@1 { + cell-index = <1>; + compatible = "qcom,camera"; + reg = <0x1>; + qcom,csiphy-sd-index = <1>; + qcom,csid-sd-index = <1>; + qcom,mount-angle = <270>; + cam_vdig-supply = <&pm8916_l2>; + cam_vio-supply = <&pm8916_l6>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio"; + qcom,cam-vreg-type = <0 0>; + qcom,cam-vreg-min-voltage = <1200000 1800000>; + qcom,cam-vreg-max-voltage = <1200000 1800000>; + qcom,cam-vreg-op-mode = <140000 140000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_default &cam_sensor_front_default>; + pinctrl-1 = <&cam_sensor_mclk1_sleep &cam_sensor_front_sleep>; + gpios = <&msm_gpio 27 0>, + <&msm_gpio 28 0>, + <&msm_gpio 33 0>, + <&msm_gpio 50 0>, + <&msm_gpio 121 0>, + <&msm_gpio 120 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-cameraid = <3>; + qcom,gpio-vana = <4>; + qcom,gpio-vdig = <5>; + qcom,gpio-req-tbl-num = <0 1 2 3 4 5>; + qcom,gpio-req-tbl-flags = <1 0 0 1 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET", + "CAM_STANDBY", + "CAM_ID", + "CAM_VANA", + "CAM_VDIG"; + qcom,sensor-position = <1>; + qcom,sensor-mode = <0>; + qcom,cci-master = <0>; + qcom,mclk-23880000; + status = "ok"; + clocks = <&clock_gcc clk_mclk1_clk_src>, + <&clock_gcc clk_gcc_camss_mclk1_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; +}; + diff --git a/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-lcd_panel-settings.dtsi b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-lcd_panel-settings.dtsi new file mode 100644 index 00000000000..78aa39c929c --- /dev/null +++ b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-lcd_panel-settings.dtsi @@ -0,0 +1,50 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * As a general rule, only version-specific property overrides should be placed + * inside this file. However, device definitions should be placed inside the + * yep_product_ql1000_lcd_panel_settings.dtsi file. + */ +/*qcom,dsi-pref-prim-pan is used as default panel if any panel is detected from lk*/ + +/* Date Author Why + 2015-04-14 litao creat + 2015-04-24 lihuiqin add dijing lcd for QL790 + 2015-04-24 lihuiqin modify vsp/vsn gpio for QL790 +*/ +#include "dsi_panel_dijing_nt35521h_hsd4p7_hd_video.dtsi" + +&mdss_mdp { + qcom,mdss-pref-prim-intf = "dsi"; + qcom,mdss-clk-factor = <150 100>; /* 1.5 times */ +}; + +&pmx_mdss { + qcom,num-grp-pins = <1>; + qcom,pins = <&gp 25>; +}; + +&mdss_dsi0 { + qcom,dsi-pref-prim-pan = <&nt35521_dijing_4p7inch_hd_vid>; + pinctrl-names = "mdss_default", "mdss_sleep"; + pinctrl-0 = <&mdss_dsi_active>; + pinctrl-1 = <&mdss_dsi_suspend>; + qcom,platform-enable-gpio = <&msm_gpio 21 0>; + qcom,platform-bklight-en-gpio = <&msm_gpio 20 0>; + qcom,platform-reset-gpio = <&msm_gpio 25 0>; +}; + +&nt35521_dijing_4p7inch_hd_vid{ + qcom,cont-splash-enabled; +}; + diff --git a/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-misc.dtsi b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-misc.dtsi new file mode 100644 index 00000000000..63c938936f1 --- /dev/null +++ b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-misc.dtsi @@ -0,0 +1,178 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "msm8916-ql790-pinctrl.dtsi" + +/ { + aliases { + serial0 = &blsp1_uart2; + }; +}; + +&soc { + i2c@78ba000 { /* BLSP1 QUP6 */ + nfc-nci@e { + compatible = "qcom,nfc-nci"; + reg = <0x0e>; + qcom,clk-src = "BBCLK2"; + qcom,clk-en-gpio = <&msm_gpio 0 0x00>; + interrupt-parent = <&msm_gpio>; + interrupts = <21 0>; + interrupt-names = "nfc_irq"; + pinctrl-names = "nfc_active","nfc_suspend"; + pinctrl-0 = <&nfc_int_active &nfc_disable_active>; + pinctrl-1 = <&nfc_int_suspend &nfc_disable_suspend>; + qcom,clk-gpio = <&pm8916_gpios 2 0>; + clocks = <&clock_rpm clk_bb_clk2_pin>; + clock-names = "ref_clk"; + }; + }; + + +}; + +&android_usb { + qcom,android-usb-cdrom; +}; + +&blsp1_uart2 { + status = "ok"; + pinctrl-names = "default"; + pinctrl-0 = <&uart_console_sleep>; +}; + +&mdss_dsi0 { + qcom,regulator-ldo-mode; + qcom,platform-regulator-settings = [02 09 03 00 20 00 01]; +}; + +&soc { + gpio_keys { + compatible = "gpio-keys"; + input-name = "gpio-keys"; + pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend"; + pinctrl-0 = <&gpio_key_active>; + pinctrl-1 = <&gpio_key_suspend>; + + vol_up { + label = "volume_up"; + gpios = <&msm_gpio 107 0x1>; + linux,input-type = <1>; + linux,code = <115>; + gpio-key,wakeup; + debounce-interval = <15>; + }; + }; +}; + +&pm8916_gpios { + gpio@c000 { /* GPIO 1 */ + /* Battery UICC Alarm */ + status = "disabled"; + }; + + gpio@c100 { /* GPIO 2 */ + /* NFC_CLK_REQ */ + qcom,mode = <0>; /* QPNP_PIN_MODE_DIG_IN */ + qcom,pull = <5>; /* QPNP_PIN_PULL_NO */ + qcom,vin-sel = <2>; /* QPNP_PIN_VIN2 */ + qcom,src-sel = <2>; /* QPNP_PIN_SEL_FUNC_1 */ + qcom,master-en = <1>; + }; + + gpio@c200 { /* GPIO 3 */ + /* External regulator control for WTR */ + status = "disabled"; + }; + + gpio@c300 { /* GPIO 4 */ + /* External regulator control for APC */ + status = "disabled"; + }; +}; + +&sdhc_1 { + vdd-supply = <&pm8916_l8>; + qcom,vdd-voltage-level = <2900000 2900000>; + qcom,vdd-current-level = <200 400000>; + + vdd-io-supply = <&pm8916_l5>; + qcom,vdd-io-always-on; + qcom,vdd-io-lpm-sup; + qcom,vdd-io-voltage-level = <1800000 1800000>; + qcom,vdd-io-current-level = <200 60000>; + + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; + + qcom,nonremovable; + + status = "ok"; +}; + +&sdhc_2 { + vdd-supply = <&pm8916_l11>; + qcom,vdd-voltage-level = <2800000 2950000>; + qcom,vdd-current-level = <15000 400000>; + + vdd-io-supply = <&pm8916_l12>; + qcom,vdd-io-voltage-level = <1800000 2950000>; + qcom,vdd-io-current-level = <200 50000>; + + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; + + #address-cells = <0>; + interrupt-parent = <&sdhc_2>; + interrupts = <0 1 2>; + #interrupt-cells = <1>; + interrupt-map-mask = <0xffffffff>; + interrupt-map = <0 &intc 0 125 0 + 1 &intc 0 221 0 + 2 &msm_gpio 38 0>; + interrupt-names = "hc_irq", "pwr_irq", "status_irq"; + cd-gpios = <&msm_gpio 38 0x0>; + + status = "ok"; +}; + +&spmi_bus { + qcom,pm8916@1 { + qcom,vibrator@c000 { + status = "okay"; + qcom,vib-timeout-ms = <15000>; + qcom,vib-vtg-level-mV = <3100>; + }; + }; +}; + +&qcom_tzlog { + status = "okay"; +}; + +&qcom_rng { + status = "okay"; +}; + +&qcom_crypto { + status = "okay"; +}; + +&qcom_cedev { + status = "okay"; +}; + +&qcom_seecom { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-pinctrl.dtsi b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-pinctrl.dtsi new file mode 100644 index 00000000000..a27d2b4bcc6 --- /dev/null +++ b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-pinctrl.dtsi @@ -0,0 +1,112 @@ +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#include "../msm8916-pinctrl.dtsi" + +&cdc_pdm_lines_sus { + /delete-property/ bias-disable; + bias-pull-down; +}; + +&tlmm_pinmux { + /delete-node/ tpiu_setb_5; + /delete-node/ tpiu_setb_8; + /delete-node/ tpiu_setb_9; + /delete-node/ tpiu_setb_10; + /delete-node/ tpiu_setb_11; + /delete-node/ tpiu_setb_12; + + cam_sensor_rear { + /* RESET, STANDBY ID*/ + qcom,pins = <&gp 35>, <&gp 34>, <&gp 51>; + qcom,num-grp-pins = <3>; + }; + + cam_sensor_rear_sleep { + /* RESET, STANDBY ID*/ + qcom,pins = <&gp 35>, <&gp 34>, <&gp 51>; + qcom,num-grp-pins = <3>; + }; + + cam_sensor_front { + /* RESET, STANDBY ID*/ + qcom,pins = <&gp 28>, <&gp 33>, <&gp 50>; + qcom,num-grp-pins = <3>; + }; + + cam_sensor_front_sleep { + /* RESET, STANDBY ID*/ + qcom,pins = <&gp 28>, <&gp 33>, <&gp 50>; + qcom,num-grp-pins = <3>; + }; + + cam_sensor_flash { + /* FLASH_RESET,FLASH_EN,FLASH_NOW */ + qcom,pins = <&gp 31>,<&gp 32> ; + qcom,num-grp-pins = <2>; + }; + + /delete-node/ apds99xx_int_pin; + + ap3426_int_pin { + qcom,pins = <&gp 113>; + qcom,pin-func = <0>; + qcom,num-grp-pins = <1>; + label = "ap3426-irq"; + ap3426_default: ap3426_default { + drive-strength = <6>; + bias-pull-up; + }; + ap3426_sleep: ap3426_sleep { + drive-strength = <2>; + bias-pull-down; + }; + }; + + bma2x2_int1_pin { + qcom,pins = <&gp 112>; + qcom,num-grp-pins = <1>; + label = "bma2x2_int1_pin"; + bma2x2_int1_default: int1_default { + drive-strength = <6>; + bias-pull-up; + }; + }; + + bma2x2_int2_pin { + qcom,pins = <&gp 114>; + qcom,num-grp-pins = <1>; + label = "bma2x2_int2_pin"; + bma2x2_int2_default: int2_default { + drive-strength = <6>; + bias-pull-up; + }; + }; + + otg_5v_pin { + qcom,pins = <&gp 52>; + qcom,num-grp-pins = <1>; + qcom,pin-func = <0>; + label = "otg-gpio"; + + otg_5v_on: otg_on { + driver-strength = <10>; + bias-pull-up; + output-high; + }; + + otg_5v_off: otg_off { + driver-strength = <2>; + bias-disable; + output-low; + }; + }; +}; diff --git a/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-pm8916.dtsi b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-pm8916.dtsi new file mode 100644 index 00000000000..a3188a91531 --- /dev/null +++ b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-pm8916.dtsi @@ -0,0 +1,19 @@ +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&spmi_bus { + qcom,pm8916@0 { + pm8916_rtc: qcom,pm8916_rtc { + qcom,qpnp-rtc-alarm-pwrup = <1>; + }; + }; +}; diff --git a/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-sunwoda-4v35-2000mah.dtsi b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-sunwoda-4v35-2000mah.dtsi new file mode 100644 index 00000000000..2618fbefb26 --- /dev/null +++ b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-sunwoda-4v35-2000mah.dtsi @@ -0,0 +1,116 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +qcom,qrd-4v35-2000mah-data { + qcom,fcc-mah = <2000>; + qcom,default-rbatt-mohm = <140>; + qcom,rbatt-capacitive-mohm = <40>; + qcom,flat-ocv-threshold-uv = <3800000>; + qcom,max-voltage-uv = <4350000>; + qcom,v-cutoff-uv = <3450000>; + qcom,chg-term-ua = <100000>; + qcom,batt-id-kohm = <130 115>; + qcom,battery-type = "qrd_4v35_2000mah"; + + qcom,rbatt-sf-lut { + qcom,lut-col-legend = <(-20) 0 25 40 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 15 10 9>, + < 8 7 6 5 4>, + < 3 2 1 0>; + qcom,lut-data = + <1535 299 99 81 72>, + <1535 299 99 81 72>, + <1419 304 101 81 73>, + <1359 307 104 83 73>, + <1273 311 107 85 75>, + <1245 309 112 87 76>, + <1238 296 116 90 77>, + <1234 290 123 95 81>, + <1243 285 115 95 82>, + <1263 285 103 84 75>, + <1297 285 99 80 73>, + <1340 287 100 82 73>, + <1393 294 101 83 75>, + <1458 307 103 85 77>, + <1538 325 104 83 73>, + <1633 346 104 81 72>, + <1758 380 104 82 73>,//20 + <1972 425 106 102 73>, + <2295 477 108 102 73>,//10 + <2642 427 100 103 74>, + <2849 458 101 105 75>, + <3094 487 105 97 76>, + <3272 503 98 99 77>, + <4839 542 98 99 76>, + <6001 522 98 99 75>, + <7870 533 107 102 78>, + <7245 504 102 107 83>, + <7465 576 108 105 101>, + <7930 652 246 231 143>; + }; + + qcom,fcc-temp-lut { + qcom,lut-col-legend = <(-20) 0 25 40 45 60>; + qcom,lut-data = <1912 1995 2046 2020 1800 1800>; + }; + + qcom,pc-temp-ocv-lut { + qcom,lut-col-legend = <(-20) 0 25 40 45 60>; + qcom,lut-row-legend = <100 95 90 85 80>, + <75 70 65 60 55>, + <50 45 40 35 30>, + <25 20 15 10 9>, + < 8 7 6 5 4>, + < 3 2 1 0>; + qcom,lut-data = + <4280 4280 4340 4340 4245 4245>, + <4228 4240 4269 4268 4219 4219>, + <4156 4179 4204 4198 4194 4194>, //90 + <4107 4121 4152 4145 4141 4141>, + <4060 4083 4100 4095 4090 4090>, //80 + <3965 4017 4058 4048 4043 4043>, + <3918 3961 3996 4000 3999 3999>, //70 + <3883 3923 3965 3964 3959 3959>, + <3857 3880 3921 3925 3921 3921>, //60 + <3833 3839 3875 3875 3872 3872>, + <3815 3815 3833 3832 3835 3835>, //50 + <3796 3803 3810 3812 3817 3817>, + <3777 3786 3791 3790 3794 3794>, //40 + <3759 3772 3770 3771 3773 3773>, + <3743 3756 3755 3756 3758 3758>, //30 + <3727 3741 3739 3740 3739 3739>, + <3714 3728 3723 3723 3718 3718>, //20 + <3693 3708 3703 3704 3688 3688>, + <3681 3691 3691 3691 3681 3681>, //10 + <3670 3680 3680 3680 3670 3670>, + <3659 3659 3659 3659 3659 3659>, + <3637 3637 3637 3637 3637 3637>, + <3615 3615 3615 3615 3615 3615>, + <3580 3580 3580 3580 3580 3580>, //5 + <3545 3545 3545 3545 3545 3545>, + <3510 3510 3510 3510 3510 3510>, + <3480 3480 3480 3480 3480 3480>, + <3400 3400 3400 3400 3400 3400>, + <3300 3300 3300 3300 3300 3300>; //0 + }; + qcom,ibat-acc-lut { + qcom,lut-col-legend = <(-20) 0 25>; + qcom,lut-row-legend = <0 250 500 1000>; + qcom,lut-data = + <1900 1988 2000>, + <978 1907 1990>, + <78 1659 1954>, + <8 1565 1932>; + }; +}; \ No newline at end of file diff --git a/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-tp.dtsi b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-tp.dtsi new file mode 100644 index 00000000000..8efdf39f4ec --- /dev/null +++ b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790-tp.dtsi @@ -0,0 +1,197 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * As a general rule, only version-specific property overrides should be placed + * inside this file. However, device definitions should be placed inside the + * yep_product_ql1001_flatform.dtsi file. + */ + +/* + Date Author Why + 2014-07-29 aidongdong add 1008 yusun product + 2014-08-11 zengguang add pinctrl + 2014-08-18 chenchen add module name for yusun + 2014-10-16 pangle add hall mod send cfg function + + + Date Author Module Sensor_id Old_ver New_ver + 2014.08.11 zengguang huaxingda 1 0x41 + 2014.08.18 chenchen huaxingda 1 0x41 0x42 + 2014.09.15 chenchen huaxingda 1 0x42 0x43 + 2014.10.09 chenchen huaxingda 1 0x43 0x44 + 2014.10.16 pangle huaxingda 1 0x43 0x44 + 2014.10.21 pangle huaxingda hall cfg 1 0x44 0x45 + 2014.10.22 pangle huaxingda hall cfg 1 0x45 0x46 + 2014.10.31 pangle huaxingda hall cfg 1 0x46 0x47 + 2014.11.03 pangle huaxingda 1 0x43 0x48 + 2014.11.03 pangle huaxingda hall cfg 1 0x47 0x48 + 2014.11.27 zengguang BYD 1 NULL 0x41 + 2014.12.03 zengguang BYD 1 0x41 0x43 + 2014.12.03 zengguang BYD hall 1 NULL 0x43 +*/ + +&soc { + i2c@78b9000 { /* BLSP1 QUP5 */ + Goodix-TS@14 { + compatible = "goodix,Goodix-TS"; + reg = <0x14>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2008>; + vdd-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + pinctrl-names = "pmx_ts_active","pmx_ts_suspend"; + pinctrl-0 = <&ts_int_active &ts_reset_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + goodix,reset-gpio = <&msm_gpio 12 0x00>; + goodix,display-coords = <0 0 720 1080>; + goodix,panel-coords = <0 0 720 1080>; + goodix,irq-gpio = <&msm_gpio 13 0x00>; + goodix,button-map = <139 172 158>; + goodix,i2c-pull-up; + goodix,module-name = "unknow","HuaXingDa","BYD","unknow","unknow","unknow"; + /*gt915,shenyue 20150428 wangkai*/ + goodix,cfg-data0 = [ + 41 D0 02 00 05 0A 35 00 01 08 + 28 05 50 32 03 05 00 00 00 00 + 00 00 00 17 19 1C 14 8B 2B 0C + 30 32 31 0D 00 00 00 22 03 1D + 00 00 00 00 00 00 00 32 00 00 + 00 1E 50 94 C5 02 07 00 00 04 + AD 21 00 94 28 00 7D 31 00 6D + 3B 00 60 48 00 60 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 02 04 06 08 12 0E 18 16 + 14 10 0C 0A FF FF 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 00 02 04 06 08 0A 0C 0F + 10 12 13 26 24 22 21 20 1F 1E + 1D 1C 18 16 FF FF FF FF 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 A2 01]; + /*gt915L,dijing module panel*/ + goodix,cfg-data1 = [ + 43 D0 02 00 05 0A 05 00 01 08 + 19 0A 50 32 03 F5 00 00 FF 7F + 00 00 00 00 00 00 00 8A 2B 0C + 32 34 D3 07 00 00 00 01 33 1D + 00 01 00 00 00 00 00 00 00 00 + 29 1E 46 94 C5 02 07 00 1E 04 + BF 20 00 A3 26 00 8C 2D 00 77 + 36 00 66 40 00 66 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 0A 0F 06 00 + 4B 32 02 04 06 08 0A 0C 0E 10 + 12 14 16 18 FF FF 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 12 10 0F 0C 0A 08 06 04 + 02 00 16 18 1C 1D 1E 1F 20 21 + 22 24 26 FF FF FF FF FF 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 58 01]; + /*gt915L,BYD module panel*/ + goodix,cfg-data2 = [ + 43 D0 02 00 05 0A 35 01 01 0A + 28 0A 50 32 03 05 00 00 FF 7F + 00 00 06 18 1A 1E 14 8C 2D 0D + 36 38 B5 06 00 0A 00 02 33 1D + 00 00 00 00 00 00 00 32 00 00 + 23 2D 57 94 C5 02 07 00 00 04 + 8E 30 00 7F 36 00 71 3E 00 64 + 47 00 59 51 00 59 18 38 58 00 + F0 4A 3A DD DD 27 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 0F 00 00 + 46 2D 1A 18 16 14 12 10 0E 0C + 0A 08 06 04 02 FF 00 00 00 00 + 00 00 00 00 00 FF FF FF FF 0F + FF 00 14 13 12 10 0F 0C 0A 08 + 06 04 02 00 16 18 1C 1D 1E 1F + 20 21 22 24 26 28 29 FF FF 00 + 00 FF FF FF FF FF FF FF FF FF + FF FF FF FF 4A 01]; + /*gt9157,huaxingda hall module panel*/ + goodix,cfg-data7 = [ + 4A D0 02 00 05 0A 35 01 01 08 + 28 0F 4B 32 03 05 00 00 FF 7F + 00 00 0A 18 1A 1D 14 8A 2A 0B + 32 34 0C 08 03 14 00 05 33 1D + 00 01 00 00 00 00 00 00 00 00 + 2D 1E 5A 94 C5 02 00 00 00 04 + AE 21 00 91 29 00 78 34 00 65 + 41 00 57 51 00 57 18 30 48 00 + F0 4A 3A FF FF 27 00 00 00 00 + 00 00 00 00 00 00 00 00 00 0F + 14 03 04 10 42 C8 0F 05 00 00 + 3C 2D 16 14 12 10 0E 0C 0A 08 + 06 04 02 FF FF FF 00 00 00 00 + 00 00 00 00 00 00 00 14 00 00 + FF 00 13 12 10 0F 0A 08 06 04 + 02 00 16 18 1C 1D 1E 1F 20 21 + 22 24 FF FF FF FF FF FF 00 00 + 00 FF FF FF FF FF FF FF FF FF + FF FF FF FF 73 01]; + /*gt9157,BYD hall module panel*/ + goodix,cfg-data8 = [ + 43 D0 02 00 05 0A 35 01 01 0A + 28 0A 50 32 03 05 00 00 FF 7F + 00 00 06 18 1A 1E 14 8C 2D 0D + 36 38 B5 06 00 0A 00 04 33 1D + 00 00 00 00 00 00 00 32 00 00 + 1D 2D 57 94 C5 02 07 00 00 04 + 8E 30 00 7F 36 00 71 3E 00 64 + 47 00 59 51 00 59 18 38 58 00 + F0 4A 3A DD DD 27 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 14 00 00 + 32 26 1A 18 16 14 12 10 0E 0C + 0A 08 06 04 02 FF 00 00 00 00 + 00 00 00 00 00 FF FF FF FF 0F + FF 00 14 13 12 10 0F 0C 0A 08 + 06 04 02 00 16 18 1C 1D 1E 1F + 20 21 22 24 26 28 29 FF FF 00 + 00 FF FF FF FF FF FF FF FF FF + FF FF FF FF 64 01]; + }; + focaltech@38 { + compatible = "focaltech,FT5x36"; + reg = <0x38>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2008>; + vdd-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + focaltech,family-id = <4>; + focaltech,max_touch_point = <2>; + focaltech,reset-gpio = <&msm_gpio 12 0x00>; + focaltech,irq-gpio = <&msm_gpio 13 0x00>; + focaltech,display-coords = <0 0 480 854>; + focaltech,panel-coords = <0 0 480 1000>; + focaltech,button-map= <139 172 158>; + focaltech,no-force-update; + focaltech,i2c-pull-up; + focaltech,auto_clb; + }; + }; + gen-vkeys { + compatible = "qcom,gen-vkeys"; + label = "FT5x36"; + qcom,disp-maxx = <480>; + qcom,disp-maxy = <854>; + qcom,panel-maxx = <480>; + qcom,panel-maxy = <946>; + qcom,key-codes = <139 172 158>; + qcom,y-offset = <0>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/ql790/msm8916-ql790.dtsi b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790.dtsi new file mode 100644 index 00000000000..a22d3772bd5 --- /dev/null +++ b/arch/arm/boot/dts/qcom/ql790/msm8916-ql790.dtsi @@ -0,0 +1,298 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "msm8916-ql790-misc.dtsi" +#include "msm8916-ql790-camera.dtsi" +#include "msm8916-ql790-lcd_panel-settings.dtsi" +#include "msm8916-ql790-pm8916.dtsi" +#include "msm8916-ql790-tp.dtsi" + +&soc { + gpio-leds { + compatible = "gpio-leds"; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&button_backlight_off>; + + keypad-backlight { + gpios = <&msm_gpio 119 0>; + label = "button-backlight"; + linux,default-trigger = "none"; + }; + }; + + sound { + compatible = "qcom,msm8x16-audio-codec"; + qcom,model = "msm8x16-skui-snd-card"; + qcom,msm-snd-card-id = <0>; + qcom,msm-ext-pa = "primary"; + qcom,msm-codec-type = "internal"; + qcom,msm-mbhc-hphl-swh = <1>; + qcom,msm-mbhc-gnd-swh = <0>; + qcom,msm-hs-micbias-type = "internal"; + qcom,audio-routing = + "RX_BIAS", "MCLK", + "SPK_RX_BIAS", "MCLK", + "INT_LDO_H", "MCLK", + "MIC BIAS Internal1", "Handset Mic", + "MIC BIAS Internal2", "Headset Mic", + "MIC BIAS Internal1", "Secondary Mic", + "AMIC1", "MIC BIAS Internal1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS Internal1"; + pinctrl-names = "cdc_lines_act", + "cdc_lines_sus"; + pinctrl-0 = <&cdc_pdm_lines_act>; + pinctrl-1 = <&cdc_pdm_lines_sus>; + qcom,ext-spk-amp-gpio = <&msm_gpio 112 0>; + asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>, + <&loopback>, <&compress>, <&hostless>, + <&afe>, <&lsm>, <&routing>, <&lpa>; + asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1", + "msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback", + "msm-compress-dsp", "msm-pcm-hostless", "msm-pcm-afe", + "msm-lsm-client", "msm-pcm-routing", "msm-pcm-lpa"; + asoc-cpu = <&dai_pri_auxpcm>, <&dai_hdmi>, + <&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, <&dai_mi2s3>, + <&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>, + <&sb_3_rx>, <&sb_3_tx>, <&sb_4_rx>, <&sb_4_tx>, + <&bt_sco_rx>, <&bt_sco_tx>, <&bt_a2dp_rx>, + <&int_fm_rx>, <&int_fm_tx>, + <&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>, <&afe_proxy_tx>, + <&incall_record_rx>, <&incall_record_tx>, <&incall_music_rx>, + <&incall_music_2_rx>; + asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8", + "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1", + "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3", + "msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385", + "msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387", + "msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391", + "msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393", + "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289", + "msm-dai-q6-dev.12290", "msm-dai-q6-dev.12292", + "msm-dai-q6-dev.12293", "msm-dai-q6-dev.224", + "msm-dai-q6-dev.225", "msm-dai-q6-dev.241", + "msm-dai-q6-dev.240", "msm-dai-q6-dev.32771", + "msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773", + "msm-dai-q6-dev.32770"; + asoc-codec = <&stub_codec>, <&pm8916_tombak_dig>; + asoc-codec-names = "msm-stub-codec.1", "tombak_codec"; + }; + + ramoops { + compatible = "ramoops"; + status = "ok"; + + android,ramoops-buffer-start = <0x8c400000>; + android,ramoops-buffer-size = <0x100000>; + android,ramoops-console-size = <0x80000>; + android,ramoops-record-size = <0x20000>; + android,ramoops-dump-oops = <0x1>; + }; + + qcom,msm-thermal { + qcom,limit-temp = <70>; + }; +}; + +&pm8916_chg { + qcom,cool-bat-decidegc = <100>; + qcom,warm-bat-decidegc = <450>; + qcom,vinmin-mv = <4408>; + qcom,cool-bat-mv = <4350>; + qcom,warm-bat-mv = <4250>; + qcom,ibatmax-warm-ma = <630>; + qcom,ibatmax-cool-ma = <630>; + qcom,vddmax-mv = <4370>; + qcom,vddsafe-mv = <4380>; + qcom,batt-hot-percentage = <35>; + qcom,batt-cold-percentage = <70>; + qcom,thermal-mitigation = <810 630 630 0>; + qcom,tchg-mins = <360>; + status = "okay"; +}; +&pm8916_bms { + qcom,max-voltage-uv = <4350000>; + qcom,v-cutoff-uv = <3450000>; + qcom,low-voltage-calculate-soc-ms = <30000>; + qcom,low-soc-calculate-soc-ms = <70000>; + qcom,low-voltage-threshold = <3550000>; + qcom,calculate-soc-ms = <100000>; +}; + +&pm8916_chg { + status = "ok"; + qcom,btc-disabled; +}; + +/ { + qrd_batterydata: qcom,battery-data { + qcom,rpull-up-kohm = <100>; + qcom,vref-batt-therm = <1800000>; + + #include "msm8916-ql790-sunwoda-4v35-2000mah.dtsi" + }; +}; + +&pm8916_bms { + status = "okay"; + qcom,force-bms-active-on-charger; + qcom,battery-data = <&qrd_batterydata>; +}; + +&pm8916_mpps { + mpp@a300 { /* MPP 4 */ + /* Backlight PWM */ + qcom,mode = <1>; /* Digital output */ + qcom,invert = <0>; /* Disable invert */ + qcom,src-sel = <4>; /* DTEST1 */ + qcom,vin-sel = <0>; /* VPH_PWR */ + qcom,master-en = <1>; /* Enable MPP */ + }; +}; + +&i2c_0 { /* BLSP1 QUP2 */ + di_ap3426@1e { + compatible = "di,ap3426"; + reg = <0x1e>; + pinctrl-names = "default","sleep"; + pinctrl-0 = <&ap3426_default>; + pinctrl-1 = <&ap3426_sleep>; + interrupt-parent = <&msm_gpio>; + interrupts = <113 0x2002>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + di,irq-gpio = <&msm_gpio 113 0x2002>; + di,als-cal = <320>; + di,als-gain = <1>; + di,als-persist = <0x1>; + di,ps-gain = <1>; + di,ps-persist = <0x2>; + di,ps-led-driver = <3>; + di,ps-mean-time = <0x2>; + di,ps-integrated-time = <0xc>; + di,wakeup-threshold = <4>; + di,als-sensitivity = <3000 400 100 1>; + di,ps-distance-table = <950 500 250 160 105 75>; + }; + + bosch@18 { /* Accelerometer sensor */ + compatible = "bosch,bma2x2"; + reg = <0x18>; + pinctrl-names = "default"; + pinctrl-0 = <&bma2x2_int1_default &bma2x2_int2_default>; + interrupt-parent = <&msm_gpio>; + interrupts = <112 0x2002>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + bosch,init-interval = <200>; + bosch,place = <4>; + bosch,gpio-int1 = <&msm_gpio 112 0x2002>; + bosch,gpio-int2 = <&msm_gpio 114 0x2002>; + }; + + aw2013@45 { + compatible = "awinic,aw2013"; + reg = <0x45>; + vdd-supply = <&pm8916_l17>; + vcc-supply = <&pm8916_l6>; + + aw2013,red { + aw2013,name = "red"; + aw2013,id = <1>; + aw2013,gpio = <1018>; + aw2013,max-brightness = <255>; + aw2013,max-current = <3>; + aw2013,rise-time-ms = <2>; + aw2013,hold-time-ms = <1>; + aw2013,fall-time-ms = <2>; + aw2013,off-time-ms = <1>; + }; + + aw2013,green { + aw2013,name = "green"; + aw2013,id = <0>; + aw2013,gpio = <1018>; + aw2013,max-brightness = <255>; + aw2013,max-current = <3>; + aw2013,rise-time-ms = <2>; + aw2013,hold-time-ms = <1>; + aw2013,fall-time-ms = <2>; + aw2013,off-time-ms = <1>; + }; + + aw2013,blue { + aw2013,name = "blue"; + aw2013,id = <2>; + aw2013,gpio = <1018>; + aw2013,max-brightness = <255>; + aw2013,max-current = <3>; + aw2013,rise-time-ms = <2>; + aw2013,hold-time-ms = <1>; + aw2013,fall-time-ms = <2>; + aw2013,off-time-ms = <1>; + }; + }; + + kionix@e { + compatible = "kionix,kxtj2-1009"; + reg = <0x0e>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + kionix,min-interval = <5>; + kionix,poll_interval = <100>; + kionix,accel_direction = <6>; + kionix,accel_irq_use_drdy = <0>; + kionix,accel_res = <12>; + kionix,accel_g_range = <2>; + }; +}; + +&sdc2_cd_on { + /delete-property/ bias-pull-up; + bias-pull-down; +}; + +&sdc2_cd_off { + /delete-property/ bias-disable; + bias-pull-down; +}; + +&sdhc_2 { + interrupts = <0 1>; + interrupt-map = <0 &intc 0 125 0 + 1 &intc 0 221 0>; + interrupt-names = "hc_irq", "pwr_irq"; + /delete-property/ cd-gpios; +}; + +/ { + memory { + pstore_reserve_mem: pstore_reserve_region@0 { + linux,reserve-contiguous-region; + linux,reserve-region; + linux,remove-completely; + reg = <0x0 0x8c400000 0x0 0x00100000>; + label = "pstore_reserve_mem"; + }; + }; +}; + +&usb_otg { + qcom,hsusb-otg-mode = <3>; + qcom,usbid-gpio = <&msm_gpio 110 0>; + qcom,otg5v_en-gpio = <&msm_gpio 52 0>; + pinctrl-names = "default", "active", "sleep"; + pinctrl-0 = <&usbid_default>; + pinctrl-1 = <&otg_5v_on>; + pinctrl-2 = <&otg_5v_off>; +}; diff --git a/arch/arm/boot/dts/qcom/spirit/dsi-panel-goworld-1080p-video.dtsi b/arch/arm/boot/dts/qcom/spirit/dsi-panel-goworld-1080p-video.dtsi new file mode 100644 index 00000000000..3ce2e4b01fa --- /dev/null +++ b/arch/arm/boot/dts/qcom/spirit/dsi-panel-goworld-1080p-video.dtsi @@ -0,0 +1,108 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/*--------------------------------------------------------------------------- + * This file is autogenerated file using gcdb parser. Please do not edit it. + * Update input XML file to add a new entry or update variable in this file + * VERSION = "1.0" + *---------------------------------------------------------------------------*/ +&mdss_mdp { + dsi_goworld_1080p_video: qcom,mdss_dsi_goworld_1080p_video { + qcom,mdss-dsi-panel-name = "goworld_1080p_video_mode_dsi_panel"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-pan-physical-width-dimension = <68>; + qcom,mdss-pan-physical-height-dimension = <121>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <120>; + qcom,mdss-dsi-h-back-porch = <60>; + qcom,mdss-dsi-h-pulse-width = <12>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <4>; + qcom,mdss-dsi-v-front-porch = <8>; + qcom,mdss-dsi-v-pulse-width = <3>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-color-order = "rgb_swap_rgb"; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-on-command = [ + 29 01 00 00 00 00 02 B0 04 + 29 01 00 00 00 00 02 D6 01 + 29 01 00 00 00 00 07 B3 14 00 00 00 00 00 + 29 01 00 00 00 00 03 B6 3A C3 + 29 01 00 00 00 00 02 C0 00 + 29 01 00 00 00 00 23 C1 84 60 10 EB FF 6F CE FF FF 17 12 58 73 AE 31 20 C6 FF FF 1F F3 FF 5F 10 10 10 10 00 62 01 22 22 00 01 + 29 01 00 00 00 00 08 C2 31 07 80 06 08 80 00 + 29 01 00 00 00 00 17 C4 70 00 00 00 00 00 00 00 00 0C 06 00 00 00 00 00 00 00 00 00 0C 06 + 29 01 00 00 00 00 29 C6 C8 08 67 08 67 00 00 00 00 00 00 00 00 00 00 00 00 16 18 08 C8 08 67 08 67 00 00 00 00 00 00 00 00 00 00 00 00 16 18 08 + 29 01 00 00 00 00 1F C7 00 0E 15 20 2E 3C 46 55 39 40 4B 58 61 69 70 00 0E 15 20 2E 3C 46 55 39 40 4B 58 61 69 70 + 29 01 00 00 00 00 14 C8 01 00 00 00 00 EC 00 00 00 00 00 FC 00 00 00 00 00 FC 00 + 29 01 00 00 00 00 0A CB 31 FC 3F 8C 00 00 00 00 C0 + 29 01 00 00 00 00 02 CC 0B + 29 01 00 00 00 00 0B D0 11 81 BB 19 99 4C 19 19 0C 00 + 29 01 00 00 00 00 1A D3 1B 33 BB BB B3 33 33 33 01 01 00 A0 D8 A0 0D 48 48 44 3B 22 72 07 3D BF 33 + 29 01 00 00 00 00 08 D5 06 00 00 01 43 01 43 + 29 01 00 00 00 00 03 DD 31 93 + 29 01 00 00 00 00 05 DE 00 3F FF 10 + 15 01 00 00 00 00 02 36 00 + 15 01 00 00 00 00 02 3A 77 + 05 01 00 00 12 00 01 29 + 05 01 00 00 78 00 01 11 + ]; + qcom,mdss-dsi-off-command = [ + 29 01 00 00 00 00 08 D5 06 00 00 00 48 00 48 + 29 01 00 00 00 00 08 D5 06 00 00 00 48 00 48 + 05 01 00 00 12 00 01 28 + 05 01 00 00 78 00 01 10 + ]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "burst_mode"; + qcom,mdss-dsi-lane-map = "lane_map_0123"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [e6 38 26 00 68 6e 2a 3c 2c 03 04 00]; + qcom,mdss-dsi-panel-status-command = [06 01 00 01 05 00 02 0A 08]; + qcom,mdss-dsi-panel-status-command-state ="dsi_lp_mode"; + qcom,mdss-dsi-panel-status-check-mode = "reg_read"; + qcom,mdss-dsi-panel-status-value = <0x1c>; + qcom,mdss-dsi-t-clk-post = <0x02>; + qcom,mdss-dsi-t-clk-pre = <0x2b>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>; + qcom,mdss-dsi-bl-pmic-bank-select = <0>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm"; + qcom,mdss-dsi-reset-sequence = <1 10>, <0 10>, <1 10>; + qcom,cont-splash-enabled; + qcom,mdss-dsi-pan-enable-dynamic-fps; + qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode"; + qcom,mdss-dsi-min-refresh-rate = <30>; + qcom,mdss-dsi-idle-refresh-rate = <48>; + }; +}; diff --git a/arch/arm/boot/dts/qcom/spirit/msm-pm8916-spirit.dtsi b/arch/arm/boot/dts/qcom/spirit/msm-pm8916-spirit.dtsi new file mode 100644 index 00000000000..cac05bb971c --- /dev/null +++ b/arch/arm/boot/dts/qcom/spirit/msm-pm8916-spirit.dtsi @@ -0,0 +1,25 @@ +/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&spmi_bus { + qcom,pm8916@0 { + pm8916_rtc: qcom,pm8916_rtc { + qcom,qpnp-rtc-alarm-pwrup = <1>; + }; + + pm8916_chg: qcom,charger { + qcom,vddmax-mv = <4350>; + qcom,vddsafe-mv = <4350>; + qcom,parallel-charger; + }; + }; +}; diff --git a/arch/arm/boot/dts/qcom/spirit/msm8939-audio-internal_codec-spirit.dtsi b/arch/arm/boot/dts/qcom/spirit/msm8939-audio-internal_codec-spirit.dtsi new file mode 100644 index 00000000000..dcc9fab2e9f --- /dev/null +++ b/arch/arm/boot/dts/qcom/spirit/msm8939-audio-internal_codec-spirit.dtsi @@ -0,0 +1,29 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&soc { + sound { + qcom,model = "msm8939-snd-card"; + qcom,msm-mbhc-hphl-swh = <0x1>; + qcom,audio-routing = + "RX_BIAS", "MCLK", + "SPK_RX_BIAS", "MCLK", + "INT_LDO_H", "MCLK", + "MIC BIAS Internal1", "Handset Mic", + "MIC BIAS Internal2", "Headset Mic", + "MIC BIAS Internal3", "Secondary Mic", + "AMIC1", "MIC BIAS Internal1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS Internal3"; + /delete-property/ qcom,cdc-us-euro-gpios; + }; +}; diff --git a/arch/arm/boot/dts/qcom/spirit/msm8939-camera-sensor-spirit.dtsi b/arch/arm/boot/dts/qcom/spirit/msm8939-camera-sensor-spirit.dtsi new file mode 100644 index 00000000000..16df7619d38 --- /dev/null +++ b/arch/arm/boot/dts/qcom/spirit/msm8939-camera-sensor-spirit.dtsi @@ -0,0 +1,320 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&tlmm_pinmux { + SGM314_pins { + qcom,pins = <&gp 31>, <&gp 32>; + qcom,num-grp-pins = <2>; + qcom,pin-func = <0>; + label = "SGM314_pins"; + SGM314_default: en_default { + drive-strength = <2>; + bias-pull-down; + }; + }; +}; + +&soc { + flash_SGM314: flashlight@0 { + compatible = "qcom,leds-gpio-flash-ckt"; + status = "okay"; + pinctrl-names = "flash_default"; + pinctrl-0 = <&SGM314_default>; + qcom,flash-en = <&msm_gpio 31 0>; + qcom,flash-now = <&msm_gpio 32 0>; + qcom,torch-en = <&msm_gpio 10 0>; + qcom,flash-rear = <&msm_gpio 17 0>; + qcom,flash-front = <&msm_gpio 16 0>; + qcom,op-seq = "flash_en", "flash_now", "torch_en", "flash_select"; + qcom,torch-seq-val = <1 0 1 1>; + qcom,flash-seq-val = <1 1 0 1>; + linux,name = "flashlight"; + linux,default-trigger = "flashlight-trigger"; + }; + + led_flash0: qcom,camera-led-flash@0 { + cell-index = <0>; + reg = <0x00>; + compatible = "qcom,camera-led-flash"; + qcom,flash-type = <3>; + qcom,flash-source = <&flash_SGM314>; + qcom,torch-source = <&flash_SGM314>; + }; +}; + +&cci { + actuator0: qcom,actuator@6e { + cell-index = <0>; + reg = <0x19>; + compatible = "qcom,actuator"; + qcom,cci-master = <0>; + }; + + actuator1: qcom,actuator@8e { + cell-index = <1>; + reg = <0x18>; + compatible = "qcom,actuator"; + qcom,cci-master = <0>; + }; + + eeprom0: qcom,eeprom@0 { + cell-index = <2>; + reg = <0x20>; + qcom,eeprom-name = "sonyimx220"; + compatible = "qcom,eeprom"; + qcom,slave-addr = <0x20>; + qcom,cci-master = <0>; + qcom,num-blocks = <4>; + + qcom,page0 = <0 0x00 2 0x00 1 5>; + qcom,pageen0 = <0 0x00 2 0x01 1 5>; + qcom,poll0 = <0 0x0 2 0 1 5>; + qcom,mem0 = <34 0x00 1 0 1 0>; + qcom,saddr0 = <0xA0>; + qcom,page1 = <0 0x00 2 0x00 1 5>; + qcom,pageen1 = <0 0x00 2 0x01 1 5>; + qcom,poll1 = <0 0x0 2 0 1 5>; + qcom,mem1 = <256 0x00 1 0 1 0>; + qcom,saddr1 = <0xA4>; + qcom,page2 = <0 0x00 2 0x00 1 5>; + qcom,pageen2 = <0 0x00 2 0x01 1 5>; + qcom,poll2 = <0 0x0 2 0 1 5>; + qcom,mem2 = <256 0x00 1 0 1 0>; + qcom,saddr2 = <0xA8>; + qcom,page3 = <0 0x00 2 0x00 1 5>; + qcom,pageen3 = <0 0x00 2 0x01 1 5>; + qcom,poll3 = <0 0x0 2 0 1 5>; + qcom,mem3 = <192 0x00 1 0 1 0>; + qcom,saddr3 = <0xAA>; + + cam_vdig-supply = <&pm8916_l2>; + cam_vana-supply = <&pm8916_l17>; + cam_vio-supply = <&pm8916_l6>; + cam_vaf-supply = <&pm8916_l10>; + qcom,cam-vreg-name = "cam_vdig", "cam_vana","cam_vio","cam_vaf"; + qcom,cam-vreg-type = <0 1 0 0>; + qcom,cam-vreg-min-voltage = <1200000 0 2850000 2800000>; + qcom,cam-vreg-max-voltage = <1200000 0 2850000 2800000>; + qcom,cam-vreg-op-mode = <200000 0 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 34 0>, + <&msm_gpio 8 0>, + <&msm_gpio 9 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-vdig = <3>; + qcom,gpio-vana = <4>; + qcom,gpio-req-tbl-num = <0 1 2 3 4 >; + qcom,gpio-req-tbl-flags = <1 0 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK0", + "MCAM_RESET", + "MCAM_STANDBY", + "MCAM_GPIO_DVDD", + "MCAM_GPIO_AVDD"; + + qcom,cam-power-seq-type = "sensor_vreg", + "sensor_gpio", "sensor_gpio", + "sensor_gpio", "sensor_gpio", + "sensor_clk"; + qcom,cam-power-seq-val = "cam_vio", + "sensor_gpio_vana", "sensor_gpio_vdig", + "sensor_gpio_reset", + "sensor_gpio_standby", + "sensor_cam_mclk" ; + qcom,cam-power-seq-cfg-val = <1 1 1 1 1 24000000>; + qcom,cam-power-seq-delay = <1 1 1 10 10 5>; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + eeprom1: qcom,eeprom@1 { + cell-index = <1>; + reg = <0x01>; + qcom,eeprom-name = "qtech_ov8858"; + compatible = "qcom,eeprom"; + qcom,slave-addr = <0x6c>; + qcom,cci-master = <0>; + + qcom,num-blocks = <7>; + qcom,page0 = <1 0x0100 2 0x01 1 1>; + qcom,pageen0 = <0 0x0 2 0x00 1 1>; + qcom,poll0 = <0 0x0 2 0 1 1>; + qcom,mem0 = <0 0x0 2 0 1 0>; + qcom,page1 = <1 0x5002 2 0x00 1 1>; + qcom,pageen1 = <0 0x0 2 0x00 1 1>; + qcom,poll1 = <0 0x0 2 0 1 1>; + qcom,mem1 = <0 0x0 2 0 1 0>; + qcom,page2 = <1 0x3d84 2 0xc0 1 1>; + qcom,pageen2 = <0 0x00 2 0x0 1 1>; + qcom,poll2 = <0 0x0 2 0 1 1>; + qcom,mem2 = <0 0x0 2 0 1 1>; + qcom,page3 = <1 0x3d88 2 0x7010 2 1>; + qcom,pageen3 = <1 0x3d8a 2 0x720a 2 1>; + qcom,poll3 = <0 0x0 2 0 1 1>; + qcom,mem3 = <0 0x0 2 0 1 0>; + qcom,page4 = <1 0x3d81 2 0x01 1 10>; + qcom,pageen4 = <0 0x0 2 0x00 1 1>; + qcom,poll4 = <0 0x0 2 0 1 1>; + qcom,mem4 = <507 0x7010 2 0 1 1>; + qcom,page5 = <1 0x5002 2 0x08 1 1>; + qcom,pageen5 = <0 0x0 2 0x00 1 1>; + qcom,poll5 = <0 0x0 2 0 1 1>; + qcom,mem5 = <0 0x0 2 0 1 0>; + qcom,page6 = <1 0x0100 2 0x00 1 1>; + qcom,pageen6 = <0 0x0 2 0x00 1 1>; + qcom,poll6 = <0 0x0 2 0 1 1>; + qcom,mem6 = <0 0x0 2 0 1 1>; + + cam_vdig-supply = <&pm8916_l2>; + cam_vana-supply = <&pm8916_l17>; + cam_vio-supply = <&pm8916_l6>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana"; + qcom,cam-vreg-type = <0 1 0>; + qcom,cam-vreg-min-voltage = <1200000 0 2850000>; + qcom,cam-vreg-max-voltage = <1200000 0 2850000>; + qcom,cam-vreg-op-mode = <200000 0 80000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_default &cam_sensor_front_default>; + pinctrl-1 = <&cam_sensor_mclk1_sleep &cam_sensor_front_sleep>; + gpios = <&msm_gpio 27 0>, + <&msm_gpio 28 0>, + <&msm_gpio 33 0>, + <&msm_gpio 8 0>, + <&msm_gpio 9 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-vdig = <3>; + qcom,gpio-vana = <4>; + qcom,gpio-req-tbl-num = <0 1 2 3 4>; + qcom,gpio-req-tbl-flags = <1 0 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK1", + "SCAM_RESET", + "SCAM_STANDBY", + "SCAM_GPIO_DVDD", + "SCAM_GPIO_AVDD"; + + qcom,cam-power-seq-type = "sensor_vreg", + "sensor_gpio", "sensor_gpio", + "sensor_gpio", "sensor_gpio", + "sensor_clk"; + qcom,cam-power-seq-val = "cam_vio", + "sensor_gpio_vana", "sensor_gpio_vdig", + "sensor_gpio_reset", + "sensor_gpio_standby", + "sensor_cam_mclk" ; + qcom,cam-power-seq-cfg-val = <1 1 1 1 1 24000000>; + qcom,cam-power-seq-delay = <10 10 10 10 10 5>; + + clocks = <&clock_gcc clk_mclk1_clk_src>, + <&clock_gcc clk_gcc_camss_mclk1_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@0 { + cell-index = <0>; + compatible = "qcom,camera"; + reg = <0x0>; + qcom,csiphy-sd-index = <0>; + qcom,csid-sd-index = <0>; + qcom,mount-angle = <90>; + qcom,eeprom-src = <&eeprom0>; + qcom,actuator-src = <&actuator0>; + qcom,led-flash-src = <&led_flash0>; + cam_vdig-supply = <&pm8916_l2>; + cam_vana-supply = <&pm8916_l17>; + cam_vio-supply = <&pm8916_l6>; + cam_vaf-supply = <&pm8916_l10>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana", + "cam_vaf"; + qcom,cam-vreg-type = <0 1 0 0>; + qcom,cam-vreg-min-voltage = <1200000 0 2850000 2800000>; + qcom,cam-vreg-max-voltage = <1200000 0 2850000 2800000>; + qcom,cam-vreg-op-mode = <200000 0 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 34 0>, + <&msm_gpio 8 0>, + <&msm_gpio 9 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-vdig = <3>; + qcom,gpio-vana = <4>; + qcom,gpio-req-tbl-num = <0 1 2 3 4>; + qcom,gpio-req-tbl-flags = <1 0 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK0", + "MCAM_RESET", + "MCAM_STANDBY", + "MCAM_GPIO_DVDD", + "MCAM_GPIO_AVDD"; + qcom,sensor-position = <0>; + qcom,sensor-mode = <0>; + qcom,cci-master = <0>; + status = "ok"; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@1 { + cell-index = <1>; + compatible = "qcom,camera"; + reg = <0x1>; + qcom,csiphy-sd-index = <1>; + qcom,csid-sd-index = <1>; + qcom,mount-angle = <90>; + qcom,eeprom-src = <&eeprom1>; + qcom,led-flash-src = <&led_flash0>; + cam_vdig-supply = <&pm8916_l2>; + cam_vana-supply = <&pm8916_l17>; + cam_vio-supply = <&pm8916_l6>; + cam_vaf-supply = <&pm8916_l10>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana", "cam_vaf"; + qcom,cam-vreg-type = <0 1 0 0>; + qcom,cam-vreg-min-voltage = <1200000 0 2850000 2800000>; + qcom,cam-vreg-max-voltage = <1200000 0 2850000 2800000>; + qcom,cam-vreg-op-mode = <200000 0 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_default &cam_sensor_front_default>; + pinctrl-1 = <&cam_sensor_mclk1_sleep &cam_sensor_front_sleep>; + gpios = <&msm_gpio 27 0>, + <&msm_gpio 28 0>, + <&msm_gpio 33 0>, + <&msm_gpio 8 0>, + <&msm_gpio 9 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-vdig = <3>; + qcom,gpio-vana = <4>; + qcom,gpio-req-tbl-num = <0 1 2 3 4>; + qcom,gpio-req-tbl-flags = <1 0 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK1", + "SCAM_RESET", + "SCAM_STANDBY", + "SCAM_GPIO_DVDD", + "SCAM_GPIO_AVDD"; + qcom,sensor-position = <1>; + qcom,sensor-mode = <0>; + qcom,cci-master = <0>; + status = "ok"; + clocks = <&clock_gcc clk_mclk1_clk_src>, + <&clock_gcc clk_gcc_camss_mclk1_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; +}; diff --git a/arch/arm/boot/dts/qcom/spirit/msm8939-pinctrl-spirit.dtsi b/arch/arm/boot/dts/qcom/spirit/msm8939-pinctrl-spirit.dtsi new file mode 100644 index 00000000000..4571ff29c44 --- /dev/null +++ b/arch/arm/boot/dts/qcom/spirit/msm8939-pinctrl-spirit.dtsi @@ -0,0 +1,92 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "../msm8939-pinctrl.dtsi" + +&soc { + tlmm_pinmux: pinctrl@1000000 { + + pmx_i2c_6 { + /delete-property/ qcom,pins; + }; + + pmx_nfc_reset { + /delete-property/ qcom,pins; + }; + + pmx_rd_nfc_int { + /delete-property/ qcom,pins; + }; + + red_led_gpio { + qcom,pins = <&gp 22>; + qcom,pin-func = <0>; + qcom,num-grp-pins = <1>; + label = "red_led_gpio"; + + red_led_gpio_default: default { + drive-strength = <6>; + bias-pull-up; + }; + + red_led_gpio_suspend: suspend { + drive-strength = <6>; + bias-pull-down; + }; + }; + + tlmm_gpio_key { + qcom,pins = <&gp 107>; + qcom,pin-func = <0>; + qcom,num-grp-pins = <1>; + label = "tlmm_gpio_key"; + gpio_key_active: gpio_key_active { + drive-strength = <2>; + bias-pull-up; + }; + gpio_key_suspend: gpio_key_suspend { + drive-strength = <2>; + bias-pull-up; + }; + }; + + ltr553_int_pin { + qcom,pins = <&gp 113>; + qcom,pin-func = <0>; + qcom,num-grp-pins = <1>; + label = "ltr553-irq"; + + ltr553_default: ltr553_default { + drive-strength = <6>; + bias-pull-up; + }; + + ltr553_sleep: ltr553_sleep { + drive-strength = <2>; + bias-pull-down; + }; + }; + + button_backlight_pin { + qcom,pins = <&gp 116>; + qcom,num-grp-pins = <1>; + qcom,pin-func = <0>; + label = "button-backlight-pin"; + + button_backlight_off: button_backlight_off { + drive-strength = <2>; + bias-disable; + output-low; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/qcom/spirit/msm8939-spirit.dtsi b/arch/arm/boot/dts/qcom/spirit/msm8939-spirit.dtsi new file mode 100644 index 00000000000..27aee2f3d42 --- /dev/null +++ b/arch/arm/boot/dts/qcom/spirit/msm8939-spirit.dtsi @@ -0,0 +1,380 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "dsi-panel-goworld-1080p-video.dtsi" +#include "msm8939-audio-internal_codec-spirit.dtsi" +#include "msm8939-pinctrl-spirit.dtsi" +#include "msm8939-camera-sensor-spirit.dtsi" +#include "msm-pm8916-spirit.dtsi" + +/ { + memory { + pstore_reserve_mem: pstore_reserve_region@0 { + linux,reserve-contiguous-region; + linux,reserve-region; + linux,remove-completely; + reg = <0x0 0x8c400000 0x0 0x00100000>; + label = "pstore_reserve_mem"; + }; + }; +}; + +&blsp1_uart1 { + status = "disabled"; +}; + +&blsp1_uart2 { + status = "ok"; + pinctrl-names = "default"; + pinctrl-0 = <&uart_console_sleep>; +}; + +&soc { + gpio_keys { + compatible = "gpio-keys"; + input-name = "gpio-keys"; + pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend"; + pinctrl-0 = <&gpio_key_active>; + pinctrl-1 = <&gpio_key_suspend>; + + vol_up { + label = "volume_up"; + gpios = <&msm_gpio 107 0x1>; + linux,input-type = <1>; + linux,code = <115>; + gpio-key,wakeup; + debounce-interval = <15>; + }; + + switch_lid { + label = "switch_lid"; + gpios = <&msm_gpio 114 0x1>; + linux,input-type = <5>; /* EV_SW */ + linux,code = <0>; /* SW_LID */ + debounce-interval = <1>; + gpio-key,wakeup; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&button_backlight_off>; + + keypad-backlight { + gpios = <&msm_gpio 116 0>; + label = "button-backlight"; + linux,default-trigger = "none"; + }; + }; + + ramoops { + compatible = "ramoops"; + status = "ok"; + + android,ramoops-buffer-start = <0x8c400000>; + android,ramoops-buffer-size = <0x100000>; + android,ramoops-console-size = <0x80000>; + android,ramoops-record-size = <0x20000>; + android,ramoops-dump-oops = <0x1>; + }; + +}; + +&spmi_bus { + qcom,pm8916@1 { + qcom,vibrator@c000 { + status = "okay"; + qcom,vib-timeout-ms = <15000>; + qcom,vib-vtg-level-mV = <3100>; + }; + }; + + qcom,pm8916@0 { + qcom,leds@a100 { + status = "okay"; + qcom,led_mpp_2 { + label = "mpp"; + linux,name = "button-backlight"; + linux,default-trigger = "none"; + qcom,default-state = "off"; + qcom,max-current = <40>; + qcom,current-setting = <5>; + qcom,id = <6>; + qcom,mode = "manual"; + qcom,source-sel = <1>; + qcom,mode-ctrl = <0x60>; + }; + }; + }; +}; + +&i2c_0 { + liteon@23 { + compatible = "liteon,ltr553"; + reg = <0x23>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + interrupt-parent = <&msm_gpio>; + interrupts = <113 0x2002>; + pinctrl-names = "default","sleep"; + pinctrl-0 = <<r553_default>; + pinctrl-1 = <<r553_sleep>; + liteon,irq-gpio = <&msm_gpio 113 0x2002>; + liteon,als-ps-persist = <0>; + liteon,ps-led = <0x7f>; + liteon,ps-pulses = <15>; + liteon,wakeup-threshold = <4>; + liteon,als-integration-time = <0>; + liteon,ps-distance-table = <1700 1200 900 500 320 200 150>; + liteon,als-gain = <0>; + liteon,als-equation-0 = <4 1 7743 1059 44 1>; + liteon,als-equation-1 = <6 1 2785 9548 50 1>; + liteon,als-equation-2 = <2 2 5926 1185 40 1>; + liteon,als-equation-3 = <0 0 0 0 1 1>; + }; + + aw2013@45 { + compatible = "awinic,aw2013"; + reg = <0x45>; + vdd-supply = <&pm8916_l17>; + vcc-supply = <&pm8916_l6>; + pinctrl-names = "aw2013_led_default","aw2013_led_suspend"; + pinctrl-0 = <&red_led_gpio_default>; + pinctrl-1 = <&red_led_gpio_suspend>; + + aw2013,red { + aw2013,name = "red"; + aw2013,id = <1>; + aw2013,max-brightness = <255>; + aw2013,max-current = <3>; + aw2013,gpio = <924>; + aw2013,rise-time-ms = <1>; + aw2013,hold-time-ms = <3>; + aw2013,fall-time-ms = <1>; + aw2013,off-time-ms = <5>; + }; + + aw2013,green { + aw2013,name = "green"; + aw2013,id = <2>; + aw2013,max-brightness = <255>; + aw2013,max-current = <3>; + aw2013,rise-time-ms = <1>; + aw2013,hold-time-ms = <3>; + aw2013,fall-time-ms = <1>; + aw2013,off-time-ms = <5>; + }; + + aw2013,blue { + aw2013,name ="blue"; + aw2013,id = <0>; + aw2013,max-brightness = <255>; + aw2013,max-current = <3>; + aw2013,rise-time-ms = <1>; + aw2013,hold-time-ms = <3>; + aw2013,fall-time-ms = <1>; + aw2013,off-time-ms = <5>; + }; + }; + + st480@0c { + compatible = "senodia,st480"; + reg = <0x0c>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + senodia,axis-map-x = <1>; + senodia,axis-map-y = <0>; + senodia,axis-map-z = <2>; + senodia,negate-y; + }; + + lsm6ds0@6b { + compatible = "st,lsm6dx0"; + reg = <0x6b>; + rot-matrix = /bits/ 16 + <(-1) (0) (0) + (0) (-1) (0) + (0) (0) (1)>; + g-poll-interval = <100>; + g-min-interval = <2>; + g-fs-range = <0>; + x-poll-interval = <100>; + x-min-interval = <1>; + x-fs-range = <0>; + aa-filter-bw = <0>; + }; +}; + +&i2c_5 { + tsc@24 { + compatible = "cy,cyttsp4_i2c_adapter"; + reg = <0x24>; + interrupts = <13 0x2008>; + interrupt-parent = <&msm_gpio>; + vdd-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + pinctrl-names = "pmx_ts_active","pmx_ts_suspend"; + pinctrl-0 = <&ts_int_active &ts_reset_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + cy,adapter_id = "cyttsp4_i2c_adapter"; + + cy,core { + cy,name = "cyttsp4_core"; + cy,id = "main_ttsp_core"; + cy,num-max-touches = <5>; + cy,irq_gpio = <&msm_gpio 13 0x2008>; + cy,rst_gpio = <&msm_gpio 12 0x00>; + cy,flags = <1>; + cy,easy_wakeup_gesture = <3>; + cy,btn_keys = <158 172 580>; + cy,btn_keys-tag = <0>; + + cy,mt { + cy,name = "cyttsp4_mt"; + cy,inp_dev_name = "cyttsp4_mt"; + cy,flags = <0x40>; + cy,abs = <0x35 0 1080 0 0 + 0x36 0 1920 0 0 + 0x3a 0 255 0 0 + 0xffff 0 255 0 0 + 0x39 0 15 0 0 + 0x30 0 255 0 0 + 0x31 0 255 0 0 + 0x34 0xfffffed7 127 0 0>; + cy,vkeys_x = <1080>; + cy,vkeys_y = <1920>; + cy,virtual_keys = <158 180 2009 360 142 + 172 540 2009 360 142 + 139 900 2009 360 142>; + }; + + cy,btn { + cy,name = "cyttsp4_btn"; + cy,inp_dev_name = "cyttsp4_btn"; + }; + }; + }; +}; + +&android_usb { + qcom,android-usb-cdrom; +}; + +&apc_vreg_corner { + vdd-apc-supply = <&fan53555>; + qcom,cpr-step-quotient = <26>; + qcom,cpr-apc-volt-step = <12500>; + qcom,cpr-up-threshold = <2>; +}; + +&mdss_dsi0 { + pinctrl-names = "mdss_default", "mdss_sleep"; + pinctrl-0 = <&mdss_dsi_active>; + pinctrl-1 = <&mdss_dsi_suspend>; + qcom,platform-reset-gpio = <&msm_gpio 25 0>; +}; + +&mdss_mdp { + qcom,mdss-pref-prim-intf = "dsi"; +}; + +&pmx_mdss { + qcom,num-grp-pins = <2>; + qcom,pins = <&gp 1>, <&gp 25>; +}; + +&qcom_tzlog { + status = "okay"; +}; + +&qcom_rng { + status = "okay"; +}; + +&qcom_crypto { + status = "okay"; +}; + +&qcom_cedev { + status = "okay"; +}; + +&qcom_seecom { + status = "okay"; +}; + +&sdhc_1 { + vdd-supply = <&pm8916_l8>; + qcom,vdd-voltage-level = <2900000 2900000>; + qcom,vdd-current-level = <200 400000>; + + vdd-io-supply = <&pm8916_l5>; + qcom,vdd-io-always-on; + qcom,vdd-io-lpm-sup; + qcom,vdd-io-voltage-level = <1800000 1800000>; + qcom,vdd-io-current-level = <200 60000>; + + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; + + qcom,nonremovable; + + status = "ok"; +}; + +&sdc2_cd_on { + /delete-property/ bias-pull-up; + bias-pull-down; +}; + +&sdc2_cd_off { + /delete-property/ bias-disable; + bias-pull-up; +}; + +&sdhc_2 { + vdd-supply = <&pm8916_l11>; + qcom,vdd-voltage-level = <2800000 2950000>; + qcom,vdd-current-level = <15000 400000>; + + vdd-io-supply = <&pm8916_l12>; + qcom,vdd-io-voltage-level = <1800000 2950000>; + qcom,vdd-io-current-level = <200 50000>; + + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; + + #address-cells = <0>; + interrupt-parent = <&sdhc_2>; + interrupts = <0 1>; + #interrupt-cells = <1>; + interrupt-map-mask = <0xffffffff>; + interrupt-map = <0 &intc 0 125 0 + 1 &intc 0 221 0>; + interrupt-names = "hc_irq", "pwr_irq"; + + cd-gpios = <&msm_gpio 38 0>; + + status = "ok"; +}; + +&usb_otg { + qcom,hsusb-otg-mode = <3>; + qcom,usbid-gpio = <&msm_gpio 110 0>; + pinctrl-names = "default"; + pinctrl-0 = <&usbid_default>; + vbus_otg-supply = <&smb1360_otg_supply>; +}; diff --git a/arch/arm/boot/dts/qcom/t86519a1/dsi-panel-ofilm-hx8394d-720p-video.dtsi b/arch/arm/boot/dts/qcom/t86519a1/dsi-panel-ofilm-hx8394d-720p-video.dtsi new file mode 100644 index 00000000000..80e60f6aa56 --- /dev/null +++ b/arch/arm/boot/dts/qcom/t86519a1/dsi-panel-ofilm-hx8394d-720p-video.dtsi @@ -0,0 +1,87 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/*--------------------------------------------------------------------------- + * This file is autogenerated file using gcdb parser. Please do not edit it. + * Update input XML file to add a new entry or update variable in this file + * VERSION = "1.0" + *---------------------------------------------------------------------------*/ +&mdss_mdp { + dsi_ofilm_hx8394d_720p_video: qcom,mdss_dsi_ofilm_hx8394d_720p_video { + qcom,mdss-dsi-panel-name = "ofilm_hx8394d_HD720p_video"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <720>; + qcom,mdss-dsi-panel-height = <1280>; + qcom,mdss-dsi-h-front-porch = <70>; + qcom,mdss-dsi-h-back-porch = <70>; + qcom,mdss-dsi-h-pulse-width = <20>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <9>; + qcom,mdss-dsi-v-front-porch = <12>; + qcom,mdss-dsi-v-pulse-width = <4>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-color-order = "rgb_swap_rgb"; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-on-command = [39 01 00 00 00 00 04 B9 FF 83 94 + 39 01 00 00 00 00 03 BA 73 83 + 39 01 00 00 00 00 10 B1 6C 0E 0E 23 04 11 F1 81 28 95 23 80 C0 D2 58 + 39 01 00 00 00 00 0C B2 00 64 0E 0D 12 23 08 08 1C 4D 00 + 39 01 00 00 00 00 0D B4 00 FF 5C 5A 5C 5A 5C 5A 01 76 01 76 + 39 01 00 00 00 00 1F D3 00 00 00 00 00 10 10 32 10 01 00 01 32 13 C0 00 00 32 10 08 00 00 47 04 05 05 47 04 00 47 + 39 01 00 00 00 00 2D D5 01 00 03 02 05 04 07 06 21 20 23 22 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 19 19 18 18 + 39 01 00 00 00 00 2D D6 06 07 04 05 02 03 00 01 22 23 20 21 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 19 19 + 39 01 00 00 00 00 2B E0 00 10 17 2C 30 3F 27 46 07 0A 0C 17 0E 12 15 13 14 06 10 11 17 00 10 17 2C 30 3F 27 46 07 0A 0C 17 0E 12 15 13 14 06 10 11 17 + 39 01 00 00 00 00 02 CC 05 + 39 01 00 00 00 00 05 C7 00 C0 40 C0 + 39 01 00 00 00 00 03 C0 30 14 + 39 01 00 00 00 00 02 BC 07 + 39 01 00 00 00 00 03 B6 73 73 + 05 01 00 00 82 00 02 11 00 + 05 01 00 00 0A 00 02 29 00]; + qcom,mdss-dsi-off-command = [05 01 00 00 32 00 02 28 00 + 05 01 00 00 78 00 02 10 00]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "burst_mode"; + qcom,mdss-dsi-lane-map = "lane_map_0123"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [48 0c 08 00 2a 2e 0c 10 08 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x05>; + qcom,mdss-dsi-t-clk-pre = <0x12>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>; + qcom,mdss-dsi-bl-pmic-bank-select = <0>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm"; + qcom,mdss-dsi-reset-sequence = <1 20>, <0 10>, <1 100>; + qcom,mdss-dsi-lp11-init; + qcom,suspend-ulps-enabled; + }; +}; diff --git a/arch/arm/boot/dts/qcom/t86519a1/dsi-panel-txd-hx8394d-720p-video.dtsi b/arch/arm/boot/dts/qcom/t86519a1/dsi-panel-txd-hx8394d-720p-video.dtsi new file mode 100644 index 00000000000..66bcff5387c --- /dev/null +++ b/arch/arm/boot/dts/qcom/t86519a1/dsi-panel-txd-hx8394d-720p-video.dtsi @@ -0,0 +1,96 @@ +/* Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/*--------------------------------------------------------------------------- + * This file is autogenerated file using gcdb parser. Please do not edit it. + * Update input XML file to add a new entry or update variable in this file + * VERSION = "1.0" + *---------------------------------------------------------------------------*/ +&mdss_mdp { + dsi_txd_hx8394d_720p_video: qcom,mdss_dsi_txd_hx8394d_720p_video { + qcom,mdss-dsi-panel-name = "txd_hx8394d_HD720p_video"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <58>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <720>; + qcom,mdss-dsi-panel-height = <1280>; + qcom,mdss-dsi-h-front-porch = <100>; + qcom,mdss-dsi-h-back-porch = <100>; + qcom,mdss-dsi-h-pulse-width = <20>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <16>; + qcom,mdss-dsi-v-front-porch = <9>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-color-order = "rgb_swap_rgb"; + qcom,mdss-dsi-underflow-color = <0xff>; + qcom,mdss-dsi-border-color = <0>; + qcom,mdss-dsi-on-command = [39 01 00 00 00 00 04 B9 FF 83 94 + 39 01 00 00 00 00 03 BA 73 83 + 39 01 00 00 00 00 10 B1 6A 15 15 13 04 11 F1 80 EC 55 23 80 C0 D2 58 + 39 01 00 00 00 00 0C B2 00 64 10 07 12 1C 08 08 1C 4D 00 + 39 01 00 00 00 00 0D B4 00 FF 03 5A 03 5A 03 5A 01 6a 01 6a + 39 01 00 00 00 00 02 BC 07 + 39 01 00 00 00 00 02 D2 55 + 39 01 00 00 00 00 1F D3 00 0F 00 40 1A 08 00 32 10 07 00 07 54 15 0F 05 04 02 12 10 05 07 33 33 0B 0B 37 10 07 07 + 39 01 00 00 00 00 2D D5 19 19 18 18 1B 1B 1A 1A 04 05 06 07 00 01 02 03 20 21 18 18 22 23 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 + 39 01 00 00 00 00 2D D6 18 18 19 19 1B 1B 1A 1A 03 02 01 00 07 06 05 04 23 22 18 18 21 20 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 + 39 01 00 00 00 00 03 B6 80 80 + 39 01 00 00 00 00 2B E0 00 03 09 2D 33 3F 16 38 06 0A 0C 18 0D 11 13 11 11 06 10 12 16 00 03 09 2D 33 3f 16 38 06 0A 0C 18 0D 11 13 11 11 06 10 12 16 + 39 01 00 00 00 00 02 BD 00 + 39 01 00 00 00 00 2C C1 01 00 08 0F 16 1D 24 2C 34 3B 41 46 4C 54 5C 64 6B 72 79 80 86 8D 95 9C A2 A8 AF B6 BD C4 CC D4 DA E0 15 69 0A A4 03 C1 90 A2 C0 + 39 01 00 00 00 00 02 BD 01 + 39 01 00 00 00 00 2B C1 00 08 0F 16 1D 24 2C 34 3B 41 46 4C 54 5C 64 6B 72 79 80 86 8D 95 9C A2 A8 AF B6 BD C4 CC D4 DA E0 15 69 0A A4 03 C1 90 A2 C0 + 39 01 00 00 00 00 02 BD 02 + 39 01 00 00 00 00 2B C1 00 09 11 19 21 29 33 3A 41 48 4F 59 61 69 71 79 81 89 91 99 A0 A8 AF B7 C0 C8 D1 D9 E0 E7 EF F7 FF 14 B3 CC FE 97 CE 21 76 C0 + 39 01 00 00 0A 00 03 E4 01 01 + 39 01 00 00 00 00 03 C0 30 14 + 39 01 00 00 00 00 05 C7 00 C0 00 C0 + 39 01 00 00 00 00 02 CC 05 + 39 01 00 00 00 00 02 DF 88 + 05 01 00 00 78 00 02 11 00 + 05 01 00 00 00 00 02 29 00]; + qcom,mdss-dsi-off-command = [05 01 00 00 32 00 02 28 00 + 05 01 00 00 78 00 02 10 00]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "burst_mode"; + qcom,mdss-dsi-lane-map = "lane_map_0123"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [7B 1A 10 00 3E 40 16 1C 15 03 04 00]; + qcom,mdss-dsi-t-clk-post = <0x04>; + qcom,mdss-dsi-t-clk-pre = <0x1A>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>; + qcom,mdss-dsi-bl-pmic-bank-select = <0>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm"; + qcom,mdss-dsi-reset-sequence = <1 20>, <0 10>, <1 100>; + qcom,mdss-dsi-lp11-init; + qcom,suspend-ulps-enabled; + }; +}; diff --git a/arch/arm/boot/dts/qcom/t86519a1/msm-pm8916-t86519a1.dtsi b/arch/arm/boot/dts/qcom/t86519a1/msm-pm8916-t86519a1.dtsi new file mode 100644 index 00000000000..a3188a91531 --- /dev/null +++ b/arch/arm/boot/dts/qcom/t86519a1/msm-pm8916-t86519a1.dtsi @@ -0,0 +1,19 @@ +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&spmi_bus { + qcom,pm8916@0 { + pm8916_rtc: qcom,pm8916_rtc { + qcom,qpnp-rtc-alarm-pwrup = <1>; + }; + }; +}; diff --git a/arch/arm/boot/dts/qcom/t86519a1/msm8916-camera-sensor-t86519a1.dtsi b/arch/arm/boot/dts/qcom/t86519a1/msm8916-camera-sensor-t86519a1.dtsi new file mode 100644 index 00000000000..f8ad0e6dd44 --- /dev/null +++ b/arch/arm/boot/dts/qcom/t86519a1/msm8916-camera-sensor-t86519a1.dtsi @@ -0,0 +1,277 @@ +/* + * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&soc { + led_flash0: qcom,camera-led-flash { + cell-index = <0>; + compatible = "qcom,camera-led-flash"; + qcom,flash-type = <3>; + qcom,flash-source = <&flash_ocp8110>; + qcom,torch-source = <&flash_ocp8110>; + }; +}; + +&cci { + + actuator0: qcom,actuator@6e { + cell-index = <3>; + reg = <0x6e>; + compatible = "qcom,actuator"; + qcom,cci-master = <0>; + }; + + eeprom0: qcom,eeprom@6c { + cell-index = <3>; + reg = <0x6c>; + qcom,eeprom-name = "sunny_q8v18a_t86519a1"; + compatible = "qcom,eeprom"; + qcom,slave-addr = <0x6c>; + qcom,cci-master = <0>; + qcom,num-blocks = <6>; + qcom,page0 = <1 0x0100 2 0x01 1 1>; + qcom,poll0 = <0 0x0 2 0 1 1>; + qcom,mem0 = <0 0x0 2 0 1 0>; + qcom,page1 = <1 0x5002 2 0x00 1 1>; + qcom,poll1 = <0 0x0 2 0 1 1>; + qcom,mem1 = <0 0x0 2 0 1 0>; + qcom,page2 = <1 0x3d84 2 0xc0 1 1>; + qcom,poll2 = <0 0x0 2 0 1 1>; + qcom,mem2 = <0 0x3d00 2 0 1 0>; + qcom,page3 = <1 0x3d88 2 0x7010 2 1>; + qcom,poll3 = <0 0x0 2 0 1 1>; + qcom,mem3 = <0 0x3d00 2 0 1 0>; + qcom,page4 = <1 0x3d8A 2 0x7106 2 1>; + qcom,pageen4 = <1 0x3d81 2 0x01 1 10>; + qcom,poll4 = <0 0x0 2 0 1 1>; + qcom,mem4 = <246 0x7010 2 0 1 1>; + qcom,page5 = <1 0x5002 2 0x08 1 1>; + qcom,poll5 = <0 0x0 2 0 1 1>; + qcom,mem5 = <0 0x0 2 0 1 0>; + cam_vdig-supply = <&pm8916_l2>; + cam_vio-supply = <&pm8916_l6>; + cam_vana-supply = <&pm8916_l10>; + cam_vaf-supply = <&pm8916_l17>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana","cam_vaf"; + qcom,cam-vreg-type = <0 0 0 0>; + qcom,cam-vreg-min-voltage = <1200000 1800000 2800000 2850000>; + qcom,cam-vreg-max-voltage = <1200000 1800000 2800000 2850000>; + qcom,cam-vreg-op-mode = <200000 200000 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 34 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-req-tbl-num = <0 1 2 >; + qcom,gpio-req-tbl-flags = <1 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET1", + "CAM_STANDBY"; + qcom,cam-power-seq-type = "sensor_vreg", + "sensor_vreg", + "sensor_vreg", + "sensor_vreg", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_clk"; + qcom,cam-power-seq-val = "cam_vio", + "cam_vana", + "cam_vdig", + "cam_vaf", + "sensor_gpio_standby", + "sensor_gpio_reset", + "sensor_gpio_standby", + "sensor_gpio_reset", + "sensor_cam_mclk" ; + qcom,cam-power-seq-cfg-val = <1 1 1 1 0 0 1 1 23880000>; + qcom,cam-power-seq-delay = <1 10 10 5 10 10 10 10 10>; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + eeprom1: qcom,eeprom@20 { + cell-index = <4>; + reg = <0x20>; + qcom,eeprom-name = "ov5670"; + compatible = "qcom,eeprom"; + qcom,slave-addr = <0x20>; + qcom,cci-master = <0>; + qcom,num-blocks = <9>; + qcom,page0 = <1 0x100 2 0x01 1 5>; + qcom,pageen0 = <0 0x0A00 2 0x01 1 5>; + qcom,poll0 = <0 0x0 2 0 1 1>; + qcom,mem0 = <0 0x0 2 0 1 1>; + qcom,page1 = <1 0x5002 2 0xa0 1 5>; + qcom,pageen1 = <0 0x0A00 2 0x01 1 5>; + qcom,poll1 = <0 0x0 2 0 1 1>; + qcom,mem1 = <0 0x0 2 0 1 1>; + qcom,page2= <1 0X3D84 2 0XC0 1 1>; + qcom,pageen2 = <0 0X3D88 2 0X70 1 5>; + qcom,poll2 = <0 0x0 2 0 1 1>; + qcom,mem2 = <0 0x0 2 0 1 1>; + qcom,page3= <0 0X3D85 2 0X17 1 1>; + qcom,pageen3 = <0 0X3D88 2 0X70 1 5>; + qcom,poll3 = <0 0x0 2 0 1 1>; + qcom,mem3 = <0 0x0 2 0 1 1>; + qcom,page4= <0 0X3D86 2 0XC0 1 1>; + qcom,pageen4 = <0 0X3D88 2 0X70 1 5>; + qcom,poll4 = <0 0x0 2 0 1 1>; + qcom,mem4 = <0 0x0 2 0 1 1>; + qcom,page5= <1 0X3D88 2 0X70 1 5>; + qcom,pageen5 = <0 0X3D88 2 0X70 1 5>; + qcom,poll5 = <0 0x0 2 0 1 1>; + qcom,mem5 = <0 0x0 2 0 1 1>; + qcom,page6 = <1 0X3D89 2 0X10 1 1>; + qcom,pageen6 = <0 0X3D8A 2 0X70 1 5>; + qcom,poll6 = <0 0x0A23 2 0x01 1 1>; + qcom,mem6 = <0 0x0A04 2 0 1 1>; + qcom,page7 = <1 0X3D8A 2 0X70 1 5>; + qcom,pageen7 = <0 0X3D8A 2 0X70 1 5>; + qcom,poll7 = <0 0x0A23 2 0x01 1 1>; + qcom,mem7 = <0 0x0A04 2 0 1 1>; + qcom,page8 = <1 0X3D8B 2 0X29 1 1>; + qcom,pageen8 = <1 0X3D81 2 0x01 1 5>; + qcom,poll8 = <0 0x0 2 0 1 1>; + qcom,mem8 = <26 0X7010 2 0 1 1>; + cam_vdig-supply = <&pm8916_l2>; + cam_vio-supply = <&pm8916_l6>; + cam_vana-supply = <&pm8916_l17>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana"; + qcom,cam-vreg-type = <0 0 0>; + qcom,cam-vreg-min-voltage = <1200000 1800000 2850000>; + qcom,cam-vreg-max-voltage = <1200000 1800000 2850000>; + qcom,cam-vreg-op-mode = <200000 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_default &cam_sensor_front_default>; + pinctrl-1 = <&cam_sensor_mclk1_sleep &cam_sensor_front_sleep>; + gpios = <&msm_gpio 27 0>, + <&msm_gpio 28 0>, + <&msm_gpio 33 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-req-tbl-num = <0 1 2>; + qcom,gpio-req-tbl-flags = <1 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET", + "CAM_STANDBY"; + qcom,cam-power-seq-type = "sensor_vreg", + "sensor_vreg", + "sensor_vreg", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_gpio", + "sensor_clk"; + qcom,cam-power-seq-val = "cam_vio", + "cam_vana", + "cam_vdig", + "sensor_gpio_standby", + "sensor_gpio_reset", + "sensor_gpio_standby", + "sensor_gpio_reset", + "sensor_cam_mclk" ; + qcom,cam-power-seq-cfg-val = <1 1 1 0 0 1 1 23880000>; + qcom,cam-power-seq-delay = <1 10 10 10 10 10 10 10>; + clocks = <&clock_gcc clk_mclk1_clk_src>, + <&clock_gcc clk_gcc_camss_mclk1_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@0 { + cell-index = <0>; + compatible = "qcom,camera"; + reg = <0x0>; + qcom,csiphy-sd-index = <0>; + qcom,csid-sd-index = <0>; + qcom,mount-angle = <90>; + qcom,actuator-src = <&actuator0>; + qcom,eeprom-src = <&eeprom0>; + qcom,led-flash-src = <&led_flash0>; + cam_vdig-supply = <&pm8916_l2>; + cam_vio-supply = <&pm8916_l6>; + cam_vana-supply = <&pm8916_l10>; + cam_vaf-supply = <&pm8916_l17>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana","cam_vaf"; + qcom,cam-vreg-type = <0 0 0 0>; + qcom,cam-vreg-min-voltage = <1200000 1800000 2800000 2850000>; + qcom,cam-vreg-max-voltage = <1200000 1800000 2800000 2850000>; + qcom,cam-vreg-op-mode = <200000 200000 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_default &cam_sensor_rear_default>; + pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>; + gpios = <&msm_gpio 26 0>, + <&msm_gpio 35 0>, + <&msm_gpio 34 0>, + <&msm_gpio 120 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-af-pwdm = <3>; + qcom,gpio-req-tbl-num = <0 1 2 3>; + qcom,gpio-req-tbl-flags = <1 0 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET1", + "CAM_STANDBY", + "CAM_AF_PWDM"; + qcom,sensor-position = <0>; + qcom,sensor-mode = <0>; + qcom,cci-master = <0>; + qcom,mclk-23880000; + status = "ok"; + clocks = <&clock_gcc clk_mclk0_clk_src>, + <&clock_gcc clk_gcc_camss_mclk0_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; + + qcom,camera@1 { + cell-index = <1>; + compatible = "qcom,camera"; + reg = <0x1>; + qcom,csiphy-sd-index = <1>; + qcom,csid-sd-index = <1>; + qcom,mount-angle = <270>; + qcom,eeprom-src = <&eeprom1>; + cam_vdig-supply = <&pm8916_l2>; + cam_vio-supply = <&pm8916_l6>; + cam_vana-supply = <&pm8916_l17>; + qcom,cam-vreg-name = "cam_vdig", "cam_vio", "cam_vana"; + qcom,cam-vreg-type = <0 0 0>; + qcom,cam-vreg-min-voltage = <1200000 1800000 2850000>; + qcom,cam-vreg-max-voltage = <1200000 1800000 2850000>; + qcom,cam-vreg-op-mode = <200000 80000 100000>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_default &cam_sensor_front_default>; + pinctrl-1 = <&cam_sensor_mclk1_sleep &cam_sensor_front_sleep>; + gpios = <&msm_gpio 27 0>, + <&msm_gpio 28 0>, + <&msm_gpio 33 0>; + qcom,gpio-reset = <1>; + qcom,gpio-standby = <2>; + qcom,gpio-req-tbl-num = <0 1 2>; + qcom,gpio-req-tbl-flags = <1 0 0>; + qcom,gpio-req-tbl-label = "CAMIF_MCLK", + "CAM_RESET", + "CAM_STANDBY"; + qcom,sensor-position = <1>; + qcom,sensor-mode = <0>; + qcom,cci-master = <0>; + status = "ok"; + clocks = <&clock_gcc clk_mclk1_clk_src>, + <&clock_gcc clk_gcc_camss_mclk1_clk>; + clock-names = "cam_src_clk", "cam_clk"; + }; +}; diff --git a/arch/arm/boot/dts/qcom/t86519a1/msm8916-t86519a1.dtsi b/arch/arm/boot/dts/qcom/t86519a1/msm8916-t86519a1.dtsi new file mode 100644 index 00000000000..f6326e53d26 --- /dev/null +++ b/arch/arm/boot/dts/qcom/t86519a1/msm8916-t86519a1.dtsi @@ -0,0 +1,500 @@ +/* Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "msm8916-camera-sensor-t86519a1.dtsi" +#include "msm-pm8916-t86519a1.dtsi" +#include "dsi-panel-txd-hx8394d-720p-video.dtsi" +#include "dsi-panel-ofilm-hx8394d-720p-video.dtsi" + +/ { + aliases { + i2c3 = &i2c_3; /* I2C4 controller device */ + }; + + memory { + pstore_reserve_mem: pstore_reserve_mem_region@0 { + linux,reserve-contiguous-region; + linux,reserve-region; + linux,remove-completely; + reg = <0x0 0x8c300000 0x0 0x00100000>; + label = "pstore_reserve_mem"; + }; + }; +}; + +&soc { + ramoops { + compatible = "ramoops"; + status = "ok"; + + android,ramoops-buffer-start = <0x8c300000>; + android,ramoops-buffer-size = <0x100000>; + android,ramoops-console-size = <0x80000>; + android,ramoops-record-size = <0x7F800>; + android,ramoops-annotate-size = <0x800>; + android,ramoops-dump-oops = <0x1>; + }; + + spi@78b7000 { + status = "disabled"; + }; + + i2c@78ba000 { + nfc-nci@e { + status = "disabled"; + }; + }; + + i2c_3: i2c@78b7000 { /* BLSP1 QUP3 */ + compatible = "qcom,i2c-msm-v2"; + #address-cells = <1>; + #size-cells = <0>; + reg-names = "qup_phys_addr", "bam_phys_addr"; + reg = <0x78b7000 0x600>, + <0x7884000 0x23000>; + interrupt-names = "qup_irq", "bam_irq"; + interrupts = <0 97 0>, <0 238 0>; + clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>, + <&clock_gcc clk_gcc_blsp1_qup3_i2c_apps_clk>; + clock-names = "iface_clk", "core_clk"; + qcom,clk-freq-out = <100000>; + qcom,clk-freq-in = <19200000>; + pinctrl-names = "i2c_active", "i2c_sleep"; + pinctrl-0 = <&i2c_3_active>; + pinctrl-1 = <&i2c_3_sleep>; + qcom,noise-rjct-scl = <0>; + qcom,noise-rjct-sda = <0>; + qcom,bam-pipe-idx-cons = <8>; + qcom,bam-pipe-idx-prod = <9>; + qcom,master-id = <86>; + }; + + i2c@78b9000 { /* BLSP1 QUP5 */ + + goodix@5d { + compatible = "goodix,gt9xx"; + reg = <0x5d>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2008>; + vdd-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + pinctrl-names = "pmx_ts_active","pmx_ts_suspend"; + pinctrl-0 = <&ts_int_active &ts_reset_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + goodix,name = "goodix-ts"; + goodix,family-id = <0x36>; + goodix,rst-gpio = <&msm_gpio 12 0x0>; + goodix,irq-gpio = <&msm_gpio 13 0x2008>; + goodix,display-coords = <0 0 720 1280>; + goodix,panel-coords = <0 0 720 1280>; + goodix,button-map= <139 102 158>; + goodix,no-force-update; + goodix,i2c-pull-up; + goodix,group-id = <1>; + goodix,hard-reset-delay-ms = <20>; + goodix,soft-reset-delay-ms = <200>; + goodix,num-max-touches = <5>; + goodix,fw-delay-aa-ms = <30>; + goodix,fw-delay-55-ms = <30>; + goodix,fw-upgrade-id1 = <0x79>; + goodix,fw-upgrade-id2 = <0x18>; + goodix,fw-delay-readid-ms = <10>; + goodix,fw-delay-era-flsh-ms = <2000>; + goodix,fw-auto-cal; + goodix,ignore-id-check; + goodix,cfg-group1 =[ + 00 D0 02 00 05 05 34 00 01 C8 23 + 05 50 32 03 05 00 00 FF 7F 00 00 + 00 17 1A 1E 14 8B 2B 0D 3C 3E D3 + 07 00 00 02 01 33 11 00 00 00 00 + 00 00 00 32 00 00 29 1E 5A 94 C5 + 02 07 00 00 04 D7 21 00 B1 29 00 + 90 34 00 77 41 00 64 51 00 64 00 + 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 08 19 00 00 + 46 00 02 04 06 08 0A 0C 0E 10 12 + 14 16 18 1A FF 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 13 + 12 10 0F 0C 0A 08 06 04 02 00 16 + 18 1C 1D 1E 1F 20 21 22 24 26 FF + FF FF FF 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 BF 01]; + goodix,cfg-group2 =[ + 41 D0 02 00 05 05 35 20 01 08 28 + 0F 50 32 03 05 00 00 00 00 00 00 + 00 17 19 1E 14 8A 2A 0B 2B 2D 31 + 0D 00 00 00 83 02 1D 00 01 00 00 + 00 00 00 32 00 0A 00 23 4B 94 45 + 02 07 14 00 04 9A 25 00 7A 2C 00 + 5D 33 00 4B 3B 00 3C 45 00 3C 00 + 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 + 00 00 02 04 06 08 0A 0C 0E 10 12 + 14 16 FF FF FF 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 12 + 10 0F 0C 0A 08 06 04 02 00 16 18 + 1C 1D 1E 1F 20 21 22 24 FF FF FF + FF FF FF 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 8D 01]; + }; + + silead@40 { + compatible = "silead,gsl-tp"; + reg = <0x40>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2008>; + vdd-supply = <&pm8916_l17>; + vcc_i2c-supply = <&pm8916_l6>; + /* pins used by touchscreen */ + pinctrl-names = "pmx_ts_active","pmx_ts_suspend"; + pinctrl-0 = <&ts_int_active &ts_reset_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + silead,name = "gsl915"; + silead,family-id = <0x36>; + silead,reset-gpio = <&msm_gpio 12 0x0>; + silead,irq-gpio = <&msm_gpio 13 0x2008>; + silead,display-coords = <0 0 720 1280>; + silead,panel-coords = <0 0 720 1280>; + silead,button-map= <139 102 158>; + silead,no-force-update; + silead,i2c-pull-up; + silead,group-id = <1>; + silead,hard-reset-delay-ms = <20>; + silead,soft-reset-delay-ms = <200>; + silead,num-max-touches = <5>; + silead,fw-delay-aa-ms = <30>; + silead,fw-delay-55-ms = <30>; + silead,fw-upgrade-id1 = <0x79>; + silead,fw-upgrade-id2 = <0x18>; + silead,fw-delay-readid-ms = <10>; + silead,fw-delay-era-flsh-ms = <2000>; + silead,fw-auto-cal; + silead,ignore-id-check; + }; + }; + + flash_ocp8110:flashlight { + compatible = "qcom,leds-gpio-flash"; + status = "okay"; + pinctrl-names = "flash_default"; + pinctrl-0 = <&ocp8110_default>; + qcom,flash-en = <&msm_gpio 21 0>; + qcom,flash-now = <&msm_gpio 32 0>; + qcom,op-seq = "flash_en", "flash_now"; + qcom,torch-seq-val = <1 0>; + qcom,flash-seq-val = <1 1>; + linux,name = "flashlight"; + linux,default-trigger = "flashlight-trigger"; + }; + + sound { + compatible = "qcom,msm8x16-audio-codec"; + qcom,model = "msm8x16-skui-snd-card"; + qcom,msm-snd-card-id = <0>; + qcom,msm-ext-pa = "quaternary"; + qcom,msm-codec-type = "internal"; + qcom,msm-mbhc-hphl-swh = <1>; + qcom,msm-mbhc-gnd-swh = <0>; + qcom,msm-hs-micbias-type = "internal"; + qcom,audio-routing = + "RX_BIAS", "MCLK", + "SPK_RX_BIAS", "MCLK", + "INT_LDO_H", "MCLK", + "MIC BIAS Internal1", "Handset Mic", + "MIC BIAS Internal2", "Headset Mic", + "MIC BIAS Internal3", "Secondary Mic", + "AMIC1", "MIC BIAS Internal1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS Internal3", + "Headphones", "HPOUTL", + "Headphones", "HPOUTR"; + pinctrl-names = "cdc_lines_act", + "cdc_lines_sus", + "cdc_lines_quat_ext_act", + "cdc_lines_quat_ext_sus"; + pinctrl-0 = <&cdc_pdm_lines_act>; + pinctrl-1 = <&cdc_pdm_lines_sus>; + pinctrl-2 = <&cdc_pdm_lines_act &ext_cdc_tlmm_lines_act>; + pinctrl-3 = <&cdc_pdm_lines_sus &ext_cdc_tlmm_lines_sus>; + clocks = <&clock_rpm clk_bb_clk2>; + clock-names = "wm_mclk"; + asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>, + <&loopback>, <&compress>, <&hostless>, + <&afe>, <&lsm>, <&routing>, <&lpa>; + asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1", + "msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback", + "msm-compress-dsp", "msm-pcm-hostless", "msm-pcm-afe", + "msm-lsm-client", "msm-pcm-routing", "msm-pcm-lpa"; + asoc-cpu = <&dai_pri_auxpcm>, <&dai_hdmi>, + <&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, <&dai_mi2s3>, + <&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>, + <&sb_3_rx>, <&sb_3_tx>, <&sb_4_rx>, <&sb_4_tx>, + <&bt_sco_rx>, <&bt_sco_tx>, <&bt_a2dp_rx>, + <&int_fm_rx>, <&int_fm_tx>, + <&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>, <&afe_proxy_tx>, + <&incall_record_rx>, <&incall_record_tx>, <&incall_music_rx>, + <&incall_music_2_rx>; + asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8", + "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1", + "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3", + "msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385", + "msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387", + "msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391", + "msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393", + "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289", + "msm-dai-q6-dev.12290", "msm-dai-q6-dev.12292", + "msm-dai-q6-dev.12293", "msm-dai-q6-dev.224", + "msm-dai-q6-dev.225", "msm-dai-q6-dev.241", + "msm-dai-q6-dev.240", "msm-dai-q6-dev.32771", + "msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773", + "msm-dai-q6-dev.32770"; + asoc-codec = <&stub_codec>, <&pm8916_tombak_dig>; + asoc-codec-names = "msm-stub-codec.1", "tombak_codec"; + }; + + bq2022a { + compatible = "bq2022a"; + status= "okay"; + }; +}; + +&pm8916_mpps { + mpp@a300 { /* MPP 4 */ + /* Backlight PWM */ + qcom,mode = <1>; /* Digital output */ + qcom,invert = <0>; /* Disable Invert */ + qcom,src-sel = <4>; /* DTEST1 */ + qcom,vin-sel = <0>; /* VPH_PWR */ + qcom,master-en = <1>; /* Enable MPP */ + }; +}; + +&mdss_mdp { + qcom,mdss-pref-prim-intf = "dsi"; +}; + +&pmx_mdss { + qcom,num-grp-pins = <1>; + qcom,pins = <&gp 25>; +}; + +&mdss_dsi0 { + qcom,dsi-pref-prim-pan = <&dsi_txd_hx8394d_720p_video>; + qcom,dsi-pref-sub-pan = <&dsi_ofilm_hx8394d_720p_video>; + pinctrl-names = "mdss_default", "mdss_sleep"; + pinctrl-0 = <&mdss_dsi_active>; + pinctrl-1 = <&mdss_dsi_suspend>; + + qcom,platform-reset-gpio = <&msm_gpio 25 0>; + + vsp-supply = <&tps65132_pos>; + vsn-supply = <&tps65132_neg>; + qcom,panel-supply-entries { + #address-cells = <1>; + #size-cells = <0>; + qcom,panel-supply-entry@2 { + reg = <2>; + qcom,supply-name = "vsp"; + qcom,supply-min-voltage = <5400000>; + qcom,supply-max-voltage = <5400000>; + qcom,supply-enable-load = <200>; + qcom,supply-disable-load = <0>; + }; + qcom,panel-supply-entry@3 { + reg = <3>; + qcom,supply-name = "vsn"; + qcom,supply-min-voltage = <5400000>; + qcom,supply-max-voltage = <5400000>; + qcom,supply-enable-load = <40>; + qcom,supply-disable-load = <0>; + }; + }; +}; + +&dsi_txd_hx8394d_720p_video { + qcom,cont-splash-enabled; +}; + +&dsi_ofilm_hx8394d_720p_video { + qcom,cont-splash-enabled; +}; + +&tlmm_pinmux { + ocp8110_pins { + qcom,pins = <&gp 31>, <&gp 32>; + qcom,num-grp-pins = <2>; + qcom,pin-func = <0>; + label = "ocp8110_pins"; + ocp8110_default: en_default { + drive-strength = <2>; + bias-pull-down; + }; + }; + + tps65132-en-pin { + qcom,pins = <&gp 1>, <&gp 0>; + qcom,num-grp-pins = <2>; + label = "tps65132_en_pins"; + qcom,pin-func = <0>; + tps65132_en_default: en-default { + drive-strength = <2>; + bias-pull-down; + }; + }; + + pmx_i2c_3 { + /* CLK, DATA */ + qcom,pins = <&gp 10>, <&gp 11>; + qcom,num-grp-pins = <2>; + qcom,pin-func = <2>; + label = "pmx_i2c_3"; + /* active state */ + i2c_3_active: i2c_3_active { + drive-strength = <2>; /* 2 MA */ + bias-pull-up; + }; + /*suspended state */ + i2c_3_sleep: i2c_3_sleep { + drive-strength = <2>; /* 2 MA */ + bias-pull-up; + }; + }; +}; + +&i2c_0 { /* BLSP1 QUP2 */ + di_ap3426@1e { + compatible = "di_ap3426"; + reg = <0x1e>; + interrupt-parent = <&msm_gpio>; + interrupts = <113 0x2002>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + ap3426,irq-gpio= <&msm_gpio 113 0x2002>; + ap3426,ps-thdl = <100>; + ap3426,ps-thdh = <200>; + ap3426,ps-calibration-min = <0>; + ap3426,ps-calibration-expected = <120>; + ap3426,ps-calibration-max = <500>; + ap3426,ps-integrated-time = <0x0>; + }; + + tps65132@3e { + compatible = "ti,tps65132"; + reg = <0x3e>; + ti,en-gpio-lpm; + pinctrl-names = "default"; + pinctrl-0 = <&tps65132_en_default>; + + regulators { + tps65132_pos: pos-boost { + regulator-name = "tps65132-pos"; + regulator-min-microvolt = <5400000>; + regulator-max-microvolt = <5400000>; + ti,discharge-enable; + ti,enable-time = <800>; + ti,current-limit = <200000>; + ti,en-gpio = <&msm_gpio 0 0>; + }; + + tps65132_neg: neg-boost { + regulator-name = "tps65132-neg"; + regulator-min-microvolt = <5400000>; + regulator-max-microvolt = <5400000>; + ti,discharge-enable; + ti,enable-time = <800>; + ti,current-limit = <40000>; + ti,en-gpio = <&msm_gpio 1 0>; + }; + }; + }; + + mpu6050@68 { + compatible = "invn,mpu6050"; + reg = <0x68>; + pinctrl-names = "mpu_default","mpu_sleep"; + pinctrl-0 = <&mpu6050_default>; + pinctrl-1 = <&mpu6050_sleep>; + interrupt-parent = <&msm_gpio>; + interrupts = <115 0x2>; + vdd-supply = <&pm8916_l17>; + vlogic-supply = <&pm8916_l16>; + vi2c-supply = <&pm8916_l6>; + invn,gpio-int = <&msm_gpio 115 0x2>; + invn,place = "Portrait Down Back Side"; + }; + + akm@c { + compatible = "ak,ak09911"; + reg = <0x0c>; + vdd-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + akm,layout = <0x6>; + akm,auto-report; + }; +}; + +&i2c_3 { + + wm8998@1a { + compatible = "wlf,wm8998"; + reg = <0x1a>; + wlf,clk-src = "BBCLK2"; + wlf,clk-gpio = <&pm8916_gpios 2 0>; + interrupt-parent = <&msm_gpio>; + interrupts = <9 0x2008>; + wlf,irq = <&msm_gpio 9 0x2008>; + wlf,reset = <&msm_gpio 16 0>; + wlf,irq_base = <700>; + AVDD-supply = <&pm8916_l6>; + wlf,AVDD-voltage = <1800000 1800000>; + wlf,AVDD-current = <25000>; + DBVDD1-supply = <&pm8916_l6>; + wlf,DBVDD1-voltage = <1800000 1800000>; + wlf,DBVDD1-current = <25000>; + DBVDD2-supply = <&pm8916_l6>; + wlf,DBVDD2-voltage = <1800000 1800000>; + wlf,DBVDD2-current = <25000>; + DBVDD3-supply = <&pm8916_l6>; + wlf,DBVDD3-voltage = <1800000 1800000>; + wlf,DBVDD3-current = <25000>; + CPVDD-supply = <&pm8916_l6>; + wlf,CPVDD-voltage = <1800000 1800000>; + wlf,CPVDD-current = <25000>; + SPKVDDL-supply = <&pm8916_l6>; + wlf,SPKVDDL-voltage = <1800000 1800000>; + wlf,SPKVDDL-current = <25000>; + SPKVDDR-supply = <&pm8916_l6>; + wlf,SPKVDDR-voltage = <1800000 1800000>; + wlf,SPKVDDR-current = <25000>; + wlf,clk32k_src = <2>; + wlf,micd_bias_start_time = <7>; + wlf,infinite_micd = <1>; + wlf,micd-rate = <6>; + wlf,micd-configs = <0x0000 2 1>; + wlf,micd-detect-debounce = <500>; + wlf,inmode = <0 0 0>; + wlf,micbias1 = <2200 1 1 0 1>; + wlf,micbias2 = <2200 1 1 0 1>; + wlf,micbias3 = <2200 1 1 0 1>; + }; +}; + +&sdhc_2 { + interrupts = <0 1>; + interrupt-map = <0 &intc 0 125 0 + 1 &intc 0 221 0>; + interrupt-names = "hc_irq", "pwr_irq"; + /delete-property/ cd-gpios; +}; + diff --git a/arch/arm/configs/cyanogenmod_rendang_defconfig b/arch/arm/configs/cyanogenmod_rendang_defconfig new file mode 100644 index 00000000000..2cc9a192082 --- /dev/null +++ b/arch/arm/configs/cyanogenmod_rendang_defconfig @@ -0,0 +1,537 @@ +CONFIG_KERNEL_XZ=y +CONFIG_SYSVIPC=y +CONFIG_AUDIT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_IKCONFIG=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_DEBUG=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_SCHED_HMP=y +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_PANIC_TIMEOUT=5 +CONFIG_KALLSYMS_ALL=y +CONFIG_EMBEDDED=y +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_ARCH_MSM=y +CONFIG_ARCH_MSM8916=y +# CONFIG_MSM_STACKED_MEMORY is not set +CONFIG_CPU_HAS_L2_PMU=y +# CONFIG_MSM_DMA_TEST is not set +CONFIG_MSM_SMCMOD=y +CONFIG_MSM_DIRECT_SCLK_ACCESS=y +CONFIG_SENSORS_ADSP=y +CONFIG_MSM_ENABLE_WDOG_DEBUG_CONTROL=y +CONFIG_FORCE_INSTRUCTION_ALIGNMENT=y +CONFIG_SMP=y +CONFIG_SCHED_MC=y +CONFIG_PREEMPT=y +CONFIG_AEABI=y +CONFIG_HIGHMEM=y +CONFIG_BALANCE_ANON_FILE_RECLAIM=y +CONFIG_PROCESS_RECLAIM=y +CONFIG_ZSMALLOC=y +CONFIG_PGTABLE_MAPPING=y +CONFIG_SECCOMP=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_ARM_DECOMPRESSOR_LIMIT=0x3200000 +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_BOOST=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=0 +# CONFIG_PM_WAKELOCKS_GC is not set +CONFIG_PM_RUNTIME=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_INET_AH=y +CONFIG_INET_ESP=y +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=y +CONFIG_INET6_ESP=y +CONFIG_INET6_IPCOMP=y +CONFIG_IPV6_MIP6=y +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_NETFILTER=y +CONFIG_NF_CONNTRACK=y +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CT_PROTO_DCCP=y +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y +CONFIG_NF_CONNTRACK_AMANDA=y +CONFIG_NF_CONNTRACK_FTP=y +CONFIG_NF_CONNTRACK_H323=y +CONFIG_NF_CONNTRACK_IRC=y +CONFIG_NF_CONNTRACK_NETBIOS_NS=y +CONFIG_NF_CONNTRACK_PPTP=y +CONFIG_NF_CONNTRACK_SANE=y +CONFIG_NF_CONNTRACK_SIP=y +CONFIG_NF_CONNTRACK_TFTP=y +CONFIG_NF_CT_NETLINK=y +CONFIG_NETFILTER_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y +CONFIG_NETFILTER_XT_TARGET_CONNMARK=y +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_HARDIDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_LOG=y +CONFIG_NETFILTER_XT_TARGET_MARK=y +CONFIG_NETFILTER_XT_TARGET_NFLOG=y +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y +CONFIG_NETFILTER_XT_TARGET_NOTRACK=y +CONFIG_NETFILTER_XT_TARGET_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_TRACE=y +CONFIG_NETFILTER_XT_TARGET_SECMARK=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=y +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y +CONFIG_NETFILTER_XT_MATCH_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DSCP=y +CONFIG_NETFILTER_XT_MATCH_ESP=y +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y +CONFIG_NETFILTER_XT_MATCH_HELPER=y +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y +CONFIG_NETFILTER_XT_MATCH_LENGTH=y +CONFIG_NETFILTER_XT_MATCH_LIMIT=y +CONFIG_NETFILTER_XT_MATCH_MAC=y +CONFIG_NETFILTER_XT_MATCH_MARK=y +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_POLICY=y +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y +CONFIG_NETFILTER_XT_MATCH_QTAGUID=y +CONFIG_NETFILTER_XT_MATCH_QUOTA=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STATISTIC=y +CONFIG_NETFILTER_XT_MATCH_STRING=y +CONFIG_NETFILTER_XT_MATCH_TIME=y +CONFIG_NETFILTER_XT_MATCH_U32=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=y +CONFIG_IP_NF_MATCH_ECN=y +CONFIG_IP_NF_MATCH_TTL=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_NF_NAT_IPV4=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_RAW=y +CONFIG_IP_NF_SECURITY=y +CONFIG_IP_NF_ARPTABLES=y +CONFIG_IP_NF_ARPFILTER=y +CONFIG_IP_NF_ARP_MANGLE=y +CONFIG_NF_CONNTRACK_IPV6=y +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_FILTER=y +CONFIG_IP6_NF_TARGET_REJECT=y +CONFIG_IP6_NF_MANGLE=y +CONFIG_IP6_NF_RAW=y +CONFIG_BRIDGE_NF_EBTABLES=y +CONFIG_BRIDGE_EBT_BROUTE=y +CONFIG_BRIDGE=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_HTB=y +CONFIG_NET_SCH_PRIO=y +CONFIG_NET_CLS_FW=y +CONFIG_NET_CLS_U32=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_FLOW=y +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=y +CONFIG_NET_EMATCH_NBYTE=y +CONFIG_NET_EMATCH_U32=y +CONFIG_NET_EMATCH_META=y +CONFIG_NET_EMATCH_TEXT=y +CONFIG_NET_CLS_ACT=y +CONFIG_RMNET_DATA=y +CONFIG_RMNET_DATA_FC=y +CONFIG_RMNET_DATA_DEBUG_PKT=y +CONFIG_SOCKEV_NLMCAST=y +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_NFC_QNCI=y +CONFIG_IPC_ROUTER=y +CONFIG_IPC_ROUTER_SECURITY=y +CONFIG_CMA=y +CONFIG_CMA_SIZE_MBYTES=8 +CONFIG_ZRAM=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_APDS9930=y +CONFIG_QSEECOM=y +CONFIG_SCSI=y +CONFIG_SCSI_TGT=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_CRYPT=y +CONFIG_DM_REQ_CRYPT=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +CONFIG_TUN=y +CONFIG_KS8851=y +CONFIG_MSM_RMNET_BAM=y +CONFIG_PPP=y +CONFIG_PPP_BSDCOMP=y +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=y +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=y +CONFIG_PPPOLAC=y +CONFIG_PPPOPNS=y +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_DM9601=y +CONFIG_WCNSS_CORE=y +CONFIG_WCNSS_CORE_PRONTO=y +CONFIG_WCNSS_MEM_PRE_ALLOC=y +CONFIG_WCNSS_REGISTER_DUMP_ON_BITE=y +CONFIG_INPUT_POLLDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_XPAD=y +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_v21 is not set +CONFIG_TOUCHSCREEN_GEN_VKEYS=y +CONFIG_TOUCHSCREEN_MSG2XXX=y +CONFIG_INPUT_MT_WRAPPER=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_HBTP_INPUT=y +CONFIG_INPUT_UINPUT=y +CONFIG_SENSORS_AP3426_CM=y +CONFIG_SENSORS_MMC3416X=y +CONFIG_SENSORS_MMC3416X_ALLOW_OVERFLOW=y +CONFIG_INPUT_KIONIX_ACCEL=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVMEM is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_MSM_SMD=y +CONFIG_HW_RANDOM_MSM=y +CONFIG_MSM_SMD_PKT=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MSM_V2=y +CONFIG_SLIMBUS_MSM_NGD=y +CONFIG_SOUNDWIRE=y +CONFIG_SPI=y +CONFIG_SPI_QUP=y +CONFIG_SPMI=y +CONFIG_SPMI_MSM_PMIC_ARB=y +CONFIG_MSM_QPNP_INT=y +CONFIG_DEBUG_GPIO=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_QPNP_PIN=y +CONFIG_POWER_SUPPLY=y +CONFIG_BATTERY_BCL=y +CONFIG_QPNP_VM_BMS=y +CONFIG_QPNP_LINEAR_CHARGER=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_MSM=y +CONFIG_MSM_PRESERVE_MEM=y +CONFIG_SENSORS_QPNP_ADC_VOLTAGE=y +CONFIG_SENSORS_QPNP_ADC_CURRENT=y +CONFIG_SENSORS_QPNP_CURRENT_MONITOR=y +CONFIG_THERMAL=y +CONFIG_THERMAL_TSENS8974=y +CONFIG_THERMAL_MONITOR=y +CONFIG_THERMAL_QPNP=y +CONFIG_THERMAL_QPNP_ADC_TM=y +CONFIG_WCD9335_CODEC=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_PROXY_CONSUMER=y +CONFIG_REGULATOR_FAN53555=y +CONFIG_REGULATOR_MEM_ACC=y +CONFIG_REGULATOR_ONSEMI_NCP6335D=y +CONFIG_REGULATOR_TPS65132=y +CONFIG_REGULATOR_STUB=y +CONFIG_REGULATOR_RPM_SMD=y +CONFIG_REGULATOR_QPNP=y +CONFIG_REGULATOR_SPM=y +CONFIG_REGULATOR_CPR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_VIDEOBUF2_MSM_MEM=y +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_MSMB_CAMERA=y +CONFIG_MSM_CAMERA_SENSOR=y +CONFIG_MSM_CPP=y +CONFIG_MSM_CCI=y +CONFIG_MSM_CSI30_HEADER=y +CONFIG_MSM_CSIPHY=y +CONFIG_MSM_CSID=y +CONFIG_MSM_EEPROM=y +CONFIG_MSM_ISPIF=y +CONFIG_MT9M114=y +CONFIG_OV5645=y +CONFIG_MSMB_JPEG=y +CONFIG_MSM_VIDC_V4L2=y +CONFIG_RADIO_IRIS=y +CONFIG_RADIO_IRIS_TRANSPORT=y +CONFIG_MSM_KGSL=y +CONFIG_KGSL_PER_PROCESS_PAGE_TABLE=y +CONFIG_FB=y +CONFIG_FB_VIRTUAL=y +CONFIG_FB_MSM=y +# CONFIG_FB_MSM_BACKLIGHT is not set +CONFIG_FB_MSM_MDSS=y +CONFIG_FB_MSM_MDSS_WRITEBACK=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_MSM8X16=y +CONFIG_UHID=y +CONFIG_HID_APPLE=y +CONFIG_HID_ELECOM=y +CONFIG_HID_MAGICMOUSE=y +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MULTITOUCH=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_EHSET=y +CONFIG_USB_EHCI_MSM=y +CONFIG_USB_EHCI_MSM_UICC=y +CONFIG_USB_ICE40_HCD=y +CONFIG_USB_ACM=y +CONFIG_USB_CCID_BRIDGE=y +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_ONETOUCH=y +CONFIG_USB_STORAGE_KARMA=y +CONFIG_USB_STORAGE_CYPRESS_ATACB=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CSVT=y +CONFIG_USB_EHSET_TEST_FIXTURE=y +CONFIG_USB_PHY=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_CI13XXX_MSM=y +CONFIG_USB_G_ANDROID=y +CONFIG_MMC=y +CONFIG_MMC_PERF_PROFILING=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_CLKGATE=y +CONFIG_MMC_EMBEDDED_SDIO=y +CONFIG_MMC_PARANOID_SD_INIT=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BLOCK_DEFERRED_RESUME=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_MSM=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_QPNP=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_SWITCH=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_QPNP=y +CONFIG_DMADEVICES=y +CONFIG_QCOM_SPS_DMA=y +CONFIG_UIO=y +CONFIG_UIO_MSM_SHAREDMEM=y +CONFIG_STAGING=y +CONFIG_ANDROID=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ASHMEM=y +CONFIG_ANDROID_LOGGER=y +CONFIG_ANDROID_TIMED_GPIO=y +CONFIG_ANDROID_LOW_MEMORY_KILLER=y +CONFIG_ANDROID_INTF_ALARM_DEV=y +CONFIG_ONESHOT_SYNC=y +CONFIG_ION=y +CONFIG_ION_MSM=y +CONFIG_ALLOC_BUFFERS_IN_4K_CHUNKS=y +CONFIG_PRONTO_WLAN=y +CONFIG_PRIMA_WLAN_LFR=y +CONFIG_PRIMA_WLAN_OKC=y +CONFIG_PRIMA_WLAN_11AC_HIGH_TP=y +CONFIG_QCOM_TDLS=y +CONFIG_WLAN_FEATURE_11W=y +CONFIG_QCOM_VOWIFI_11R=y +CONFIG_ENABLE_LINUX_REG=y +CONFIG_SPS=y +CONFIG_SPS_SUPPORT_NDP_BAM=y +CONFIG_QPNP_POWER_ON=y +CONFIG_QPNP_VIBRATOR=y +CONFIG_QPNP_REVID=y +CONFIG_MSM_AVTIMER=y +CONFIG_MSM_BUS_SCALING=y +CONFIG_BUS_TOPOLOGY_ADHOC=y +CONFIG_MACH_RENDANG=y +CONFIG_MSM_MDSS_PLL=y +CONFIG_REMOTE_SPINLOCK_MSM=y +CONFIG_MSM_IOMMU_V1=y +CONFIG_PWM=y +CONFIG_PWM_QPNP=y +CONFIG_MOBICORE_SUPPORT=y +CONFIG_MOBICORE_API=y +CONFIG_CORESIGHT=y +CONFIG_CORESIGHT_EVENT=y +CONFIG_CORESIGHT_FUSE=y +CONFIG_CORESIGHT_CTI=y +CONFIG_CORESIGHT_TMC=y +CONFIG_CORESIGHT_TPIU=y +CONFIG_CORESIGHT_FUNNEL=y +CONFIG_CORESIGHT_REPLICATOR=y +CONFIG_CORESIGHT_STM=y +CONFIG_CORESIGHT_HWEVENT=y +CONFIG_CORESIGHT_ETMV4=y +CONFIG_CORESIGHT_MODEM_ETM=y +CONFIG_CORESIGHT_WCN_ETM=y +CONFIG_CORESIGHT_RPM_ETM=y +CONFIG_CORESIGHT_QPDI=y +CONFIG_SENSORS=y +CONFIG_MSM_BAM_DMUX=y +CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y +CONFIG_MSM_QMI_INTERFACE=y +CONFIG_MSM_SMD=y +CONFIG_MSM_SMD_DEBUG=y +CONFIG_MSM_SMEM=y +CONFIG_MSM_SMEM_LOGGING=y +CONFIG_MSM_SMP2P=y +CONFIG_MSM_SMP2P_TEST=y +CONFIG_MSM_SPM=y +CONFIG_MSM_L2_SPM=y +CONFIG_MSM_ADSP_LOADER=y +CONFIG_MSM_MEMORY_DUMP_V2=y +CONFIG_MSM_COMMON_LOG=y +CONFIG_MSM_WATCHDOG_V2=y +CONFIG_MSM_FORCE_WDOG_BITE_ON_PANIC=y +CONFIG_MSM_SUBSYSTEM_RESTART=y +CONFIG_MSM_SYSMON_COMM=y +CONFIG_MSM_PIL=y +CONFIG_MSM_PIL_SSR_GENERIC=y +CONFIG_MSM_PIL_MSS_QDSP6V5=y +CONFIG_MSM_BOOT_STATS=y +CONFIG_MSM_SCM=y +CONFIG_MSM_XPU_ERR_FATAL=y +CONFIG_QCOM_EARLY_RANDOM=y +CONFIG_MSM_PERFORMANCE=y +CONFIG_MEM_SHARE_QMI_SERVICE=y +CONFIG_MSM_TZ_LOG=y +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_FUSE_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_EFS_FS=y +CONFIG_PSTORE=y +CONFIG_PSTORE_CONSOLE=y +CONFIG_PSTORE_PMSG=y +CONFIG_PSTORE_RAM=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_LOCKUP_DETECTOR=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +# CONFIG_DETECT_HUNG_TASK is not set +# CONFIG_SCHED_DEBUG is not set +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_PREEMPT is not set +CONFIG_IPC_LOGGING=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_PANIC_ON_DATA_CORRUPTION=y +CONFIG_KEYS=y +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK=y +CONFIG_LSM_MMAP_MIN_ADDR=4096 +CONFIG_SECURITY_SELINUX=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_XCBC=y +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_SHA1_ARM_NEON=y +CONFIG_CRYPTO_SHA512_ARM_NEON=y +CONFIG_CRYPTO_AES_ARM_BS=y +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_DEV_QCRYPTO=y +CONFIG_CRYPTO_DEV_QCE=y +CONFIG_CRYPTO_DEV_QCEDEV=y +CONFIG_ASYMMETRIC_KEY_TYPE=y +CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y +CONFIG_PUBLIC_KEY_ALGO_RSA=y +CONFIG_X509_CERTIFICATE_PARSER=y diff --git a/arch/arm/configs/lineageos_jalebi_defconfig b/arch/arm/configs/lineageos_jalebi_defconfig new file mode 100644 index 00000000000..dd33ecef95e --- /dev/null +++ b/arch/arm/configs/lineageos_jalebi_defconfig @@ -0,0 +1,591 @@ +CONFIG_LOCALVERSION="-lineageos" +CONFIG_KERNEL_XZ=y +CONFIG_AUDIT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_IKCONFIG=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_MEMCG=y +CONFIG_MEMCG_SWAP=y +CONFIG_CGROUP_SCHED=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_SCHED_HMP=y +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_PID_NS is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_PANIC_TIMEOUT=5 +CONFIG_KALLSYMS_ALL=y +# CONFIG_PCI_QUIRKS is not set +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLUB_DEBUG is not set +CONFIG_PROFILING=y +CONFIG_PARTITION_ADVANCED=y +# CONFIG_IOSCHED_TEST is not set +CONFIG_IOSCHED_BFQ=y +CONFIG_CGROUP_BFQIO=y +CONFIG_DEFAULT_NOOP=y +CONFIG_ARCH_MSM=y +CONFIG_ARCH_MSM8916=y +# CONFIG_MSM_STACKED_MEMORY is not set +CONFIG_CPU_HAS_L2_PMU=y +# CONFIG_MSM_DMA_TEST is not set +CONFIG_MSM_SMCMOD=y +CONFIG_MSM_DIRECT_SCLK_ACCESS=y +CONFIG_SENSORS_ADSP=y +CONFIG_MSM_ENABLE_WDOG_DEBUG_CONTROL=y +CONFIG_FORCE_INSTRUCTION_ALIGNMENT=y +CONFIG_STRICT_MEMORY_RWX=y +CONFIG_SMP=y +CONFIG_SCHED_MC=y +CONFIG_NR_CPUS=4 +CONFIG_PREEMPT=y +CONFIG_AEABI=y +CONFIG_HIGHMEM=y +CONFIG_BALANCE_ANON_FILE_RECLAIM=y +CONFIG_PROCESS_RECLAIM=y +CONFIG_ZSMALLOC=y +CONFIG_PGTABLE_MAPPING=y +CONFIG_UACCESS_WITH_MEMCPY=y +CONFIG_SECCOMP=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_ARM_DECOMPRESSOR_LIMIT=0x3200000 +CONFIG_SCHED_FREQ_INPUT=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_BOOST=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=0 +# CONFIG_PM_WAKELOCKS_GC is not set +CONFIG_PM_RUNTIME=y +CONFIG_SUSPEND_TIME=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_INET_AH=y +CONFIG_INET_ESP=y +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=y +CONFIG_INET6_ESP=y +CONFIG_INET6_IPCOMP=y +CONFIG_IPV6_MIP6=y +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_NETFILTER=y +CONFIG_NF_CONNTRACK=y +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CT_PROTO_DCCP=y +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y +CONFIG_NF_CONNTRACK_AMANDA=y +CONFIG_NF_CONNTRACK_FTP=y +CONFIG_NF_CONNTRACK_H323=y +CONFIG_NF_CONNTRACK_IRC=y +CONFIG_NF_CONNTRACK_NETBIOS_NS=y +CONFIG_NF_CONNTRACK_PPTP=y +CONFIG_NF_CONNTRACK_SANE=y +CONFIG_NF_CONNTRACK_TFTP=y +CONFIG_NF_CT_NETLINK=y +CONFIG_NETFILTER_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y +CONFIG_NETFILTER_XT_TARGET_CONNMARK=y +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_HARDIDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_LOG=y +CONFIG_NETFILTER_XT_TARGET_MARK=y +CONFIG_NETFILTER_XT_TARGET_NFLOG=y +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y +CONFIG_NETFILTER_XT_TARGET_NOTRACK=y +CONFIG_NETFILTER_XT_TARGET_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_TRACE=y +CONFIG_NETFILTER_XT_TARGET_SECMARK=y +CONFIG_NETFILTER_XT_TARGET_TCPMSS=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=y +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y +CONFIG_NETFILTER_XT_MATCH_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DSCP=y +CONFIG_NETFILTER_XT_MATCH_ESP=y +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y +CONFIG_NETFILTER_XT_MATCH_HELPER=y +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y +CONFIG_NETFILTER_XT_MATCH_LENGTH=y +CONFIG_NETFILTER_XT_MATCH_LIMIT=y +CONFIG_NETFILTER_XT_MATCH_MAC=y +CONFIG_NETFILTER_XT_MATCH_MARK=y +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_POLICY=y +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y +CONFIG_NETFILTER_XT_MATCH_QTAGUID=y +CONFIG_NETFILTER_XT_MATCH_QUOTA=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STATISTIC=y +CONFIG_NETFILTER_XT_MATCH_STRING=y +CONFIG_NETFILTER_XT_MATCH_TIME=y +CONFIG_NETFILTER_XT_MATCH_U32=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=y +CONFIG_IP_NF_MATCH_ECN=y +CONFIG_IP_NF_MATCH_TTL=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_REJECT_SKERR=y +CONFIG_NF_NAT_IPV4=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_RAW=y +CONFIG_IP_NF_SECURITY=y +CONFIG_IP_NF_ARPTABLES=y +CONFIG_IP_NF_ARPFILTER=y +CONFIG_IP_NF_ARP_MANGLE=y +CONFIG_NF_CONNTRACK_IPV6=y +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_FILTER=y +CONFIG_IP6_NF_TARGET_REJECT=y +CONFIG_IP6_NF_TARGET_REJECT_SKERR=y +CONFIG_IP6_NF_MANGLE=y +CONFIG_IP6_NF_RAW=y +CONFIG_BRIDGE_NF_EBTABLES=y +CONFIG_BRIDGE_EBT_BROUTE=y +CONFIG_L2TP=y +CONFIG_BRIDGE=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_HTB=y +CONFIG_NET_SCH_PRIO=y +CONFIG_NET_CLS_FW=y +CONFIG_NET_CLS_U32=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_FLOW=y +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=y +CONFIG_NET_EMATCH_NBYTE=y +CONFIG_NET_EMATCH_U32=y +CONFIG_NET_EMATCH_META=y +CONFIG_NET_EMATCH_TEXT=y +CONFIG_NET_CLS_ACT=y +CONFIG_RMNET_DATA=y +CONFIG_RMNET_DATA_FC=y +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_IPC_ROUTER=y +CONFIG_IPC_ROUTER_SECURITY=y +CONFIG_CMA=y +CONFIG_CMA_SIZE_MBYTES=8 +CONFIG_ZRAM=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_QSEECOM=y +CONFIG_UID_CPUTIME=y +CONFIG_SCSI=y +CONFIG_SCSI_TGT=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_CRYPT=y +CONFIG_DM_REQ_CRYPT=y +CONFIG_DM_VERITY=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +CONFIG_TUN=y +CONFIG_MSM_RMNET_BAM=y +CONFIG_PPP=y +CONFIG_PPP_BSDCOMP=y +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=y +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=y +CONFIG_PPPOL2TP=y +CONFIG_PPPOLAC=y +CONFIG_PPPOPNS=y +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +CONFIG_SLIP=y +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_DM9601=y +CONFIG_WCNSS_CORE=y +CONFIG_WCNSS_CORE_PRONTO=y +CONFIG_WCNSS_MEM_PRE_ALLOC=y +CONFIG_WCNSS_REGISTER_DUMP_ON_BITE=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_KEYRESET=y +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_XPAD=y +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_v21 is not set +CONFIG_TOUCHSCREEN_GEN_VKEYS=y +CONFIG_TOUCHSCREEN_GT9XX_HQ=y +CONFIG_TOUCHSCREEN_GT9XX_HQ_DRIVER=y +CONFIG_TOUCHSCREEN_GT9XX_HQ_UPDATE=y +CONFIG_TOUCHSCREEN_GT9XX_HQ_DEBUG=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_KEYCHORD=y +CONFIG_INPUT_KXTJ9_HQ=y +CONFIG_INPUT_UINPUT=y +CONFIG_SENSORS_AP3426=y +CONFIG_SENSORS_BMA2X2=y +# CONFIG_SERIO_I8042 is not set +# CONFIG_VT is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVMEM is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_MSM_SMD=y +CONFIG_HW_RANDOM_MSM=y +CONFIG_MSM_SMD_PKT=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MSM_V2=y +CONFIG_SLIMBUS_MSM_NGD=y +CONFIG_SOUNDWIRE=y +CONFIG_SPI=y +CONFIG_SPI_QUP=y +CONFIG_SPMI=y +CONFIG_SPMI_MSM_PMIC_ARB=y +CONFIG_MSM_QPNP_INT=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_QPNP_PIN=y +CONFIG_BATTERY_BCL=y +CONFIG_QPNP_VM_BMS_HQ=y +CONFIG_QPNP_LINEAR_CHARGER_HQ=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_MSM=y +CONFIG_MSM_PRESERVE_MEM=y +CONFIG_SENSORS_QPNP_ADC_VOLTAGE=y +CONFIG_SENSORS_QPNP_ADC_CURRENT=y +CONFIG_SENSORS_QPNP_CURRENT_MONITOR=y +CONFIG_THERMAL=y +CONFIG_THERMAL_TSENS8974=y +CONFIG_THERMAL_MONITOR=y +CONFIG_THERMAL_QPNP=y +CONFIG_THERMAL_QPNP_ADC_TM=y +CONFIG_WCD9335_CODEC=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_PROXY_CONSUMER=y +CONFIG_REGULATOR_MEM_ACC=y +CONFIG_REGULATOR_STUB=y +CONFIG_REGULATOR_RPM_SMD=y +CONFIG_REGULATOR_QPNP=y +CONFIG_REGULATOR_SPM=y +CONFIG_REGULATOR_CPR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_VIDEOBUF2_MSM_MEM=y +CONFIG_V4L_PLATFORM_DRIVERS=y +# CONFIG_OABI_COMPAT is not set +CONFIG_MSMB_CAMERA=y +CONFIG_MSM_CAMERA_SENSOR=y +CONFIG_MSM_CPP=y +CONFIG_MSM_CCI=y +CONFIG_MSM_CSI30_HEADER=y +CONFIG_MSM_CSIPHY=y +CONFIG_MSM_CSID=y +CONFIG_MSM_EEPROM=y +CONFIG_MSM_ISPIF=y +CONFIG_MSMB_JPEG=y +CONFIG_MSM_VIDC_V4L2=y +CONFIG_RADIO_IRIS=y +CONFIG_RADIO_IRIS_TRANSPORT=y +# CONFIG_VGA_ARB is not set +CONFIG_MSM_KGSL=y +CONFIG_KGSL_PER_PROCESS_PAGE_TABLE=y +CONFIG_FB=y +CONFIG_FB_MSM=y +# CONFIG_FB_MSM_BACKLIGHT is not set +CONFIG_FB_MSM_MDSS=y +CONFIG_FB_MSM_MDSS_WRITEBACK=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_SOUND=y +CONFIG_SND=y +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_PCI is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_USB_AUDIO=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_MSM8X16=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_A4TECH=y +CONFIG_HID_ACRUX=y +CONFIG_HID_ACRUX_FF=y +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +CONFIG_HID_PRODIKEYS=y +CONFIG_HID_CYPRESS=y +CONFIG_HID_DRAGONRISE=y +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EMS_FF=y +CONFIG_HID_ELECOM=y +CONFIG_HID_EZKEY=y +CONFIG_HID_FIIO=y +CONFIG_HID_HOLTEK=y +CONFIG_HID_KEYTOUCH=y +CONFIG_HID_KYE=y +CONFIG_HID_UCLOGIC=y +CONFIG_HID_WALTOP=y +CONFIG_HID_GYRATION=y +CONFIG_HID_TWINHAN=y +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LCPOWER=y +CONFIG_HID_LOGITECH=y +CONFIG_HID_LOGITECH_DJ=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_HID_MAGICMOUSE=y +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MONTEREY=y +CONFIG_HID_MULTITOUCH=y +CONFIG_HID_NTRIG=y +CONFIG_HID_ORTEK=y +CONFIG_HID_PANTHERLORD=y +CONFIG_PANTHERLORD_FF=y +CONFIG_HID_PETALYNX=y +CONFIG_HID_PICOLCD=y +CONFIG_HID_PRIMAX=y +CONFIG_HID_ROCCAT=y +CONFIG_HID_SAITEK=y +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_HID_SPEEDLINK=y +CONFIG_HID_SUNPLUS=y +CONFIG_HID_GREENASIA=y +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=y +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TIVO=y +CONFIG_HID_TOPSEED=y +CONFIG_HID_THRUSTMASTER=y +CONFIG_HID_WACOM=y +CONFIG_HID_WIIMOTE=y +CONFIG_HID_ZEROPLUS=y +CONFIG_HID_ZYDACRON=y +CONFIG_USB_HIDDEV=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_EHSET=y +CONFIG_USB_EHCI_MSM=y +CONFIG_USB_EHCI_MSM_UICC=y +CONFIG_USB_ICE40_HCD=y +CONFIG_USB_ACM=y +CONFIG_USB_CCID_BRIDGE=y +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_KARMA=y +CONFIG_USB_STORAGE_CYPRESS_ATACB=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CSVT=y +CONFIG_USB_EHSET_TEST_FIXTURE=y +CONFIG_USB_PHY=y +CONFIG_USB_OTG_WAKELOCK=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_CI13XXX_MSM=y +CONFIG_USB_G_ANDROID=y +CONFIG_MMC=y +CONFIG_MMC_PERF_PROFILING=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_CLKGATE=y +CONFIG_MMC_EMBEDDED_SDIO=y +CONFIG_MMC_PARANOID_SD_INIT=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BLOCK_DEFERRED_RESUME=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_MSM=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_MSM_GPIO_FLASH=y +CONFIG_LEDS_AW2013=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_SWITCH=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_QPNP=y +CONFIG_DMADEVICES=y +CONFIG_QCOM_SPS_DMA=y +CONFIG_UIO=y +CONFIG_UIO_MSM_SHAREDMEM=y +CONFIG_STAGING=y +CONFIG_ANDROID=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ASHMEM=y +CONFIG_ANDROID_TIMED_GPIO=y +CONFIG_ANDROID_LOW_MEMORY_KILLER=y +CONFIG_ANDROID_INTF_ALARM_DEV=y +CONFIG_ONESHOT_SYNC=y +CONFIG_ION=y +CONFIG_ION_MSM=y +CONFIG_PRONTO_WLAN=y +CONFIG_PRIMA_WLAN_LFR=y +CONFIG_PRIMA_WLAN_OKC=y +CONFIG_PRIMA_WLAN_11AC_HIGH_TP=y +CONFIG_QCOM_TDLS=y +CONFIG_WLAN_FEATURE_11W=y +CONFIG_QCOM_VOWIFI_11R=y +CONFIG_ENABLE_LINUX_REG=y +CONFIG_MACH_JALEBI=y +CONFIG_SPS=y +CONFIG_USB_BAM=y +CONFIG_SPS_SUPPORT_NDP_BAM=y +CONFIG_QPNP_POWER_ON=y +CONFIG_QPNP_VIBRATOR=y +CONFIG_QPNP_REVID=y +CONFIG_MSM_AVTIMER=y +CONFIG_PFT=y +CONFIG_MSM_BUS_SCALING=y +CONFIG_BUS_TOPOLOGY_ADHOC=y +CONFIG_MSM_MDSS_PLL=y +CONFIG_REMOTE_SPINLOCK_MSM=y +CONFIG_MSM_IOMMU_V1=y +CONFIG_MMU500_ACTIVE_PREFETCH_BUG_WITH_SECTION_MAPPING=y +CONFIG_PWM=y +CONFIG_PWM_QPNP=y +CONFIG_SENSORS=y +CONFIG_MSM_BAM_DMUX=y +CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y +CONFIG_MSM_QMI_INTERFACE=y +CONFIG_MSM_SMD=y +CONFIG_MSM_SMEM=y +CONFIG_MSM_SMEM_LOGGING=y +CONFIG_MSM_SMP2P=y +CONFIG_MSM_SMP2P_TEST=y +# CONFIG_MSM_DMA_TEST is not set +CONFIG_MSM_SPM=y +CONFIG_MSM_L2_SPM=y +CONFIG_MSM_ADSP_LOADER=y +CONFIG_MSM_MEMORY_DUMP_V2=y +CONFIG_MSM_COMMON_LOG=y +CONFIG_MSM_WATCHDOG_V2=y +CONFIG_MSM_FORCE_WDOG_BITE_ON_PANIC=y +CONFIG_MSM_SUBSYSTEM_RESTART=y +CONFIG_MSM_SYSMON_COMM=y +CONFIG_MSM_PIL=y +CONFIG_MSM_PIL_SSR_GENERIC=y +CONFIG_MSM_PIL_MSS_QDSP6V5=y +CONFIG_MSM_BOOT_STATS=y +CONFIG_MSM_SCM=y +CONFIG_QCOM_EARLY_RANDOM=y +CONFIG_MSM_PERFORMANCE=y +CONFIG_MEM_SHARE_QMI_SERVICE=y +CONFIG_MSM_TZ_LOG=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_FUSE_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_PSTORE=y +CONFIG_PSTORE_CONSOLE=y +CONFIG_PSTORE_RAM=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_FRAME_POINTER is not set +# CONFIG_RCU_CPU_STALL_VERBOSE is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_IPC_LOGGING=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_PANIC_ON_DATA_CORRUPTION=y +CONFIG_KEYS=y +CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK=y +CONFIG_LSM_MMAP_MIN_ADDR=4096 +CONFIG_SECURITY_SELINUX=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_CTR=y +CONFIG_CRYPTO_XCBC=y +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_SHA1_ARM_NEON=y +CONFIG_CRYPTO_SHA512_ARM_NEON=y +CONFIG_CRYPTO_AES_ARM_BS=y +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_DEV_QCRYPTO=y +CONFIG_CRYPTO_DEV_QCE=y +CONFIG_CRYPTO_DEV_QCEDEV=y diff --git a/arch/arm/configs/msm8909-1gb-perf_defconfig b/arch/arm/configs/msm8909-1gb-perf_defconfig index 3163de0b95d..3007464daf1 100644 --- a/arch/arm/configs/msm8909-1gb-perf_defconfig +++ b/arch/arm/configs/msm8909-1gb-perf_defconfig @@ -311,6 +311,12 @@ CONFIG_TOUCHSCREEN_GEN_VKEYS=y CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=y CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI4_DEV=y CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y +<<<<<<< HEAD +======= +CONFIG_TOUCHSCREEN_HIMAX_HX852xES=y +CONFIG_TOUCHSCREEN_HIMAX_I2C=y +CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_INPUT_MISC=y CONFIG_INPUT_UINPUT=y CONFIG_INPUT_GPIO=m @@ -319,10 +325,24 @@ CONFIG_APDS9930=y CONFIG_SENSORS_LTR553=y CONFIG_SENSORS_MPU6050=y CONFIG_SENSORS_MMC3416X=y +<<<<<<< HEAD +======= +CONFIG_SENSORS_MMC3X30=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_SENSORS_AKM8963=y CONFIG_SENSORS_AKM09911=y CONFIG_SENSORS_BMA2X2=y CONFIG_SENSORS_AP3426=y +<<<<<<< HEAD +======= +CONFIG_SENSORS_STK3X1X=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_SENSORS_BMI160=y +CONFIG_SENSORS_BMI160_I2C=y +# CONFIG_BMI160_MAG_INTERFACE_SUPPORT is not set +CONFIG_SENSORS_BMI160_ENABLE_INT1=y +# CONFIG_SENSORS_BMI160_ENABLE_INT2 is not set +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_SENSORS_HALL=y #CONFIG_SERIAL_MSM_HSL is not set #CONFIG_SERIAL_MSM_HSL_CONSOLE is not set diff --git a/arch/arm/configs/msm8909-1gb_defconfig b/arch/arm/configs/msm8909-1gb_defconfig index 529d1cea2bf..9efdea15265 100644 --- a/arch/arm/configs/msm8909-1gb_defconfig +++ b/arch/arm/configs/msm8909-1gb_defconfig @@ -318,6 +318,12 @@ CONFIG_TOUCHSCREEN_GEN_VKEYS=y CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=y CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI4_DEV=y CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y +<<<<<<< HEAD +======= +CONFIG_TOUCHSCREEN_HIMAX_HX852xES=y +CONFIG_TOUCHSCREEN_HIMAX_I2C=y +CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_INPUT_MISC=y CONFIG_INPUT_UINPUT=y CONFIG_INPUT_GPIO=m @@ -326,10 +332,24 @@ CONFIG_APDS9930=y CONFIG_SENSORS_LTR553=y CONFIG_SENSORS_MPU6050=y CONFIG_SENSORS_MMC3416X=y +<<<<<<< HEAD +======= +CONFIG_SENSORS_MMC3X30=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_SENSORS_AKM8963=y CONFIG_SENSORS_AKM09911=y CONFIG_SENSORS_BMA2X2=y CONFIG_SENSORS_AP3426=y +<<<<<<< HEAD +======= +CONFIG_SENSORS_STK3X1X=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_SENSORS_BMI160=y +CONFIG_SENSORS_BMI160_I2C=y +# CONFIG_BMI160_MAG_INTERFACE_SUPPORT is not set +CONFIG_SENSORS_BMI160_ENABLE_INT1=y +# CONFIG_SENSORS_BMI160_ENABLE_INT2 is not set +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_SENSORS_HALL=y CONFIG_SERIAL_MSM_HSL=y CONFIG_SERIAL_MSM_HSL_CONSOLE=y diff --git a/arch/arm/configs/msm8916-perf_defconfig b/arch/arm/configs/msm8916-perf_defconfig index e477fbeb816..7b2794e6bb8 100644 --- a/arch/arm/configs/msm8916-perf_defconfig +++ b/arch/arm/configs/msm8916-perf_defconfig @@ -531,6 +531,10 @@ CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_USER=y CONFIG_DEBUG_SET_MODULE_RONX=y CONFIG_KEYS=y +<<<<<<< HEAD +======= +CONFIG_DEBUG_SET_MODULE_RONX=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y CONFIG_LSM_MMAP_MIN_ADDR=4096 diff --git a/arch/arm/configs/msm8916_defconfig b/arch/arm/configs/msm8916_defconfig index e4b32ed8b58..ccd840e4505 100755 --- a/arch/arm/configs/msm8916_defconfig +++ b/arch/arm/configs/msm8916_defconfig @@ -572,6 +572,10 @@ CONFIG_DEBUG_LL=y CONFIG_EARLY_PRINTK=y CONFIG_DEBUG_SET_MODULE_RONX=y CONFIG_KEYS=y +<<<<<<< HEAD +======= +CONFIG_DEBUG_SET_MODULE_RONX=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y CONFIG_LSM_MMAP_MIN_ADDR=4096 diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 863b2801552..151fcf0af44 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h @@ -23,6 +23,12 @@ #include #include #include +<<<<<<< HEAD +======= +#include +#include +#include +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #define IOMEM(x) (x) @@ -159,6 +165,19 @@ restore_irqs_notrace \oldcpsr .endm +<<<<<<< HEAD +======= +/* + * Get current thread_info. + */ + .macro get_thread_info, rd + ARM( mov \rd, sp, lsr #THREAD_SIZE_ORDER + PAGE_SHIFT ) + THUMB( mov \rd, sp ) + THUMB( lsr \rd, \rd, #THREAD_SIZE_ORDER + PAGE_SHIFT ) + mov \rd, \rd, lsl #THREAD_SIZE_ORDER + PAGE_SHIFT + .endm + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #define USER(x...) \ 9999: x; \ .pushsection __ex_table,"a"; \ diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 870d7ff9b9e..576b4ce3c50 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h @@ -14,9 +14,21 @@ #include #include +<<<<<<< HEAD #define THREAD_SIZE_ORDER 1 #define THREAD_SIZE 8192 +======= +#include + +#ifndef CONFIG_4KSTACKS +#define THREAD_SIZE_ORDER 1 +#else +#define THREAD_SIZE_ORDER 0 +#endif + +#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #define THREAD_START_SP (THREAD_SIZE - 8) #ifndef __ASSEMBLY__ diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index 160f3376ba6..e3251fbda12 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S @@ -125,11 +125,14 @@ movs pc, lr @ return & move spsr_svc into cpsr .endm +<<<<<<< HEAD .macro get_thread_info, rd mov \rd, sp, lsr #13 mov \rd, \rd, lsl #13 .endm +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed @ @ 32-bit wide "mov pc, reg" @ @@ -182,12 +185,15 @@ movs pc, lr @ return & move spsr_svc into cpsr .endm +<<<<<<< HEAD .macro get_thread_info, rd mov \rd, sp lsr \rd, \rd, #13 mov \rd, \rd, lsl #13 .endm +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed @ @ 32-bit wide "mov pc, reg" @ diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index a0c1e318a79..8d3f5349cdc 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -272,21 +272,44 @@ armpmu_add(struct perf_event *event, int flags) } static int +<<<<<<< HEAD validate_event(struct pmu_hw_events *hw_events, struct perf_event *event) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); +======= +validate_event(struct pmu *pmu, struct pmu_hw_events *hw_events, + struct perf_event *event) +{ + struct arm_pmu *armpmu; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed struct pmu *leader_pmu = event->group_leader->pmu; if (is_software_event(event)) return 1; +<<<<<<< HEAD if (event->pmu != leader_pmu || event->state < PERF_EVENT_STATE_OFF) +======= + /* + * Reject groups spanning multiple HW PMUs (e.g. CPU + CCI). The + * core perf code won't check that the pmu->ctx == leader->ctx + * until after pmu->event_init(event). + */ + if (event->pmu != pmu) + return 0; + + if (event->pmu != leader_pmu || event->state < PERF_EVENT_STATE_OFF) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return 1; if (event->state == PERF_EVENT_STATE_OFF && !event->attr.enable_on_exec) return 1; +<<<<<<< HEAD +======= + armpmu = to_arm_pmu(event->pmu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return armpmu->get_event_idx(hw_events, event) >= 0; } @@ -304,6 +327,7 @@ validate_group(struct perf_event *event) memset(fake_used_mask, 0, sizeof(fake_used_mask)); fake_pmu.used_mask = fake_used_mask; +<<<<<<< HEAD if (!validate_event(&fake_pmu, leader)) return -EINVAL; @@ -313,6 +337,17 @@ validate_group(struct perf_event *event) } if (!validate_event(&fake_pmu, event)) +======= + if (!validate_event(event->pmu, &fake_pmu, leader)) + return -EINVAL; + + list_for_each_entry(sibling, &leader->sibling_list, group_entry) { + if (!validate_event(event->pmu, &fake_pmu, sibling)) + return -EINVAL; + } + + if (!validate_event(event->pmu, &fake_pmu, event)) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return -EINVAL; return 0; diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 27a6abca8df..820c74931d0 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S @@ -30,8 +30,13 @@ * act_mm - get current->active_mm */ .macro act_mm, rd +<<<<<<< HEAD bic \rd, sp, #8128 bic \rd, \rd, #63 +======= + mov \rd, sp, lsr #12 + THREAD_SIZE_ORDER + mov \rd, \rd, lsl #12 + THREAD_SIZE_ORDER +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ldr \rd, [\rd, #TI_TASK] ldr \rd, [\rd, #TSK_ACTIVE_MM] .endm diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index c20fb9702f2..886812b6516 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S @@ -8,9 +8,18 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +<<<<<<< HEAD #include #include #include "../kernel/entry-header.S" +======= +#include +#include +#include +#include +#include +#include +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed @ VFP entry point. @ diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index a6b146d3e2d..7fe163b6de3 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S @@ -14,10 +14,20 @@ * r10 points at the start of the private FP workspace in the thread structure * sp points to a struct pt_regs (as defined in include/asm/proc/ptrace.h) */ +<<<<<<< HEAD #include #include #include #include "../kernel/entry-header.S" +======= +#include +#include +#include +#include +#include +#include +#include +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed .macro DBGSTR, str #ifdef DEBUG diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 69efe1d33c8..38042b0f646 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -12,6 +12,10 @@ config ARM64 select ARM_GIC select AUDIT_ARCH_COMPAT_GENERIC select BUILDTIME_EXTABLE_SORT +<<<<<<< HEAD +======= + select AUDIT_ARCH_COMPAT_GENERIC +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed select CLONE_BACKWARDS select COMMON_CLK if !ARCH_MSM select CPU_PM if (SUSPEND || CPU_IDLE) diff --git a/arch/arm64/configs/lineageos_crackling_defconfig b/arch/arm64/configs/lineageos_crackling_defconfig new file mode 100644 index 00000000000..8b47f052591 --- /dev/null +++ b/arch/arm64/configs/lineageos_crackling_defconfig @@ -0,0 +1,588 @@ +CONFIG_LOCALVERSION="-lineageos" +CONFIG_AUDIT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_IKCONFIG=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_SCHED_HMP=y +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_PID_NS is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_PANIC_TIMEOUT=5 +CONFIG_KALLSYMS_ALL=y +# CONFIG_PCI_QUIRKS is not set +CONFIG_EMBEDDED=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_PROFILING=y +CONFIG_PARTITION_ADVANCED=y +# CONFIG_IOSCHED_TEST is not set +CONFIG_IOSCHED_BFQ=y +CONFIG_CGROUP_BFQIO=y +CONFIG_DEFAULT_NOOP=y +CONFIG_ARCH_MSM=y +CONFIG_ARCH_MSM8916=y +CONFIG_SMP=y +CONFIG_SCHED_MC=y +CONFIG_NR_CPUS=4 +CONFIG_PREEMPT=y +CONFIG_ARMV7_COMPAT=y +CONFIG_BALANCE_ANON_FILE_RECLAIM=y +CONFIG_PROCESS_RECLAIM=y +CONFIG_ZSMALLOC=y +CONFIG_SECCOMP=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_COMPAT=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=0 +# CONFIG_PM_WAKELOCKS_GC is not set +CONFIG_PM_RUNTIME=y +CONFIG_SUSPEND_TIME=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_BOOST=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_INET_AH=y +CONFIG_INET_ESP=y +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=y +CONFIG_INET6_ESP=y +CONFIG_INET6_IPCOMP=y +CONFIG_IPV6_MIP6=y +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_NETFILTER=y +CONFIG_NF_CONNTRACK=y +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CT_PROTO_DCCP=y +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y +CONFIG_NF_CONNTRACK_AMANDA=y +CONFIG_NF_CONNTRACK_FTP=y +CONFIG_NF_CONNTRACK_H323=y +CONFIG_NF_CONNTRACK_IRC=y +CONFIG_NF_CONNTRACK_NETBIOS_NS=y +CONFIG_NF_CONNTRACK_PPTP=y +CONFIG_NF_CONNTRACK_SANE=y +CONFIG_NF_CONNTRACK_TFTP=y +CONFIG_NF_CT_NETLINK=y +CONFIG_NETFILTER_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y +CONFIG_NETFILTER_XT_TARGET_CONNMARK=y +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_HARDIDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_LOG=y +CONFIG_NETFILTER_XT_TARGET_MARK=y +CONFIG_NETFILTER_XT_TARGET_NFLOG=y +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y +CONFIG_NETFILTER_XT_TARGET_NOTRACK=y +CONFIG_NETFILTER_XT_TARGET_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_TRACE=y +CONFIG_NETFILTER_XT_TARGET_SECMARK=y +CONFIG_NETFILTER_XT_TARGET_TCPMSS=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=y +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y +CONFIG_NETFILTER_XT_MATCH_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DSCP=y +CONFIG_NETFILTER_XT_MATCH_ESP=y +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y +CONFIG_NETFILTER_XT_MATCH_HELPER=y +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y +CONFIG_NETFILTER_XT_MATCH_LENGTH=y +CONFIG_NETFILTER_XT_MATCH_LIMIT=y +CONFIG_NETFILTER_XT_MATCH_MAC=y +CONFIG_NETFILTER_XT_MATCH_MARK=y +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_POLICY=y +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y +CONFIG_NETFILTER_XT_MATCH_QTAGUID=y +CONFIG_NETFILTER_XT_MATCH_QUOTA=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STATISTIC=y +CONFIG_NETFILTER_XT_MATCH_STRING=y +CONFIG_NETFILTER_XT_MATCH_TIME=y +CONFIG_NETFILTER_XT_MATCH_U32=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=y +CONFIG_IP_NF_MATCH_ECN=y +CONFIG_IP_NF_MATCH_TTL=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_REJECT_SKERR=y +CONFIG_NF_NAT_IPV4=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_RAW=y +CONFIG_IP_NF_SECURITY=y +CONFIG_IP_NF_ARPTABLES=y +CONFIG_IP_NF_ARPFILTER=y +CONFIG_IP_NF_ARP_MANGLE=y +CONFIG_NF_CONNTRACK_IPV6=y +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_FILTER=y +CONFIG_IP6_NF_TARGET_REJECT=y +CONFIG_IP6_NF_TARGET_REJECT_SKERR=y +CONFIG_IP6_NF_MANGLE=y +CONFIG_IP6_NF_RAW=y +CONFIG_BRIDGE_NF_EBTABLES=y +CONFIG_BRIDGE_EBT_BROUTE=y +CONFIG_L2TP=y +CONFIG_BRIDGE=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_HTB=y +CONFIG_NET_SCH_PRIO=y +CONFIG_NET_CLS_FW=y +CONFIG_NET_CLS_U32=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_FLOW=y +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=y +CONFIG_NET_EMATCH_NBYTE=y +CONFIG_NET_EMATCH_U32=y +CONFIG_NET_EMATCH_META=y +CONFIG_NET_EMATCH_TEXT=y +CONFIG_NET_CLS_ACT=y +CONFIG_RMNET_DATA=y +CONFIG_RMNET_DATA_FC=y +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_RFKILL=y +CONFIG_NFC_QNCI=y +CONFIG_IPC_ROUTER=y +CONFIG_IPC_ROUTER_SECURITY=y +CONFIG_CMA=y +CONFIG_ZRAM=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_APDS9930=y +CONFIG_UID_STAT=y +CONFIG_QSEECOM=y +CONFIG_UID_CPUTIME=y +CONFIG_SCSI=y +CONFIG_SCSI_TGT=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_CRYPT=y +CONFIG_DM_REQ_CRYPT=y +CONFIG_DM_UEVENT=y +CONFIG_DM_VERITY=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +CONFIG_TUN=y +CONFIG_MSM_RMNET_BAM=y +CONFIG_PPP=y +CONFIG_PPP_BSDCOMP=y +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=y +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=y +CONFIG_PPPOL2TP=y +CONFIG_PPPOLAC=y +CONFIG_PPPOPNS=y +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +CONFIG_SLIP=y +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_WCNSS_CORE=y +CONFIG_WCNSS_CORE_PRONTO=y +CONFIG_WCNSS_MEM_PRE_ALLOC=y +CONFIG_WCNSS_REGISTER_DUMP_ON_BITE=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_KEYRESET=y +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_INPUT_TABLET=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_HIMAX852XES=y +CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=y +CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI4_DEV=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_KEYCHORD=y +CONFIG_INPUT_UINPUT=y +CONFIG_INPUT_GPIO=y +CONFIG_SENSORS_LTR559=y +CONFIG_SENSORS_BMA2X2=y +CONFIG_SENSORS_BMA2X2_ENABLE_INT1=y +# CONFIG_SENSORS_BMA2X2_ENABLE_IDENT is not set +CONFIG_SENSORS_BMM050=y +CONFIG_SENSORS_BMG=y +CONFIG_SENSORS_BMG_FIFO=y +# CONFIG_SERIO_I8042 is not set +# CONFIG_VT is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVMEM is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_MSM_SMD=y +CONFIG_HW_RANDOM_MSM=y +CONFIG_MSM_SMD_PKT=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MSM_V2=y +CONFIG_SLIMBUS_MSM_NGD=y +CONFIG_SOUNDWIRE=y +CONFIG_SPI=y +CONFIG_SPI_QUP=y +CONFIG_SPMI=y +CONFIG_SPMI_MSM_PMIC_ARB=y +CONFIG_MSM_QPNP_INT=y +CONFIG_USE_PINCTRL_IRQ=y +CONFIG_PINCTRL_MSM_TLMM=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_QPNP_PIN=y +CONFIG_BATTERY_BCL=y +CONFIG_QPNP_VM_BMS=y +CONFIG_QPNP_LINEAR_CHARGER=y +CONFIG_POWER_RESET_MSM=y +CONFIG_MSM_PRESERVE_MEM=y +CONFIG_MSM_PM=y +CONFIG_SENSORS_QPNP_ADC_VOLTAGE=y +CONFIG_THERMAL=y +CONFIG_THERMAL_TSENS8974=y +CONFIG_THERMAL_MONITOR=y +CONFIG_THERMAL_QPNP=y +CONFIG_THERMAL_QPNP_ADC_TM=y +CONFIG_WCD9335_CODEC=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_PROXY_CONSUMER=y +CONFIG_REGULATOR_FAN53555=y +CONFIG_REGULATOR_MEM_ACC=y +CONFIG_REGULATOR_ONSEMI_NCP6335D=y +CONFIG_REGULATOR_TPS65132=y +CONFIG_REGULATOR_STUB=y +CONFIG_REGULATOR_RPM_SMD=y +CONFIG_REGULATOR_QPNP=y +CONFIG_REGULATOR_SPM=y +CONFIG_REGULATOR_CPR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_VIDEOBUF2_MSM_MEM=y +CONFIG_V4L_PLATFORM_DRIVERS=y +# CONFIG_OABI_COMPAT is not set +CONFIG_MSMB_CAMERA=y +CONFIG_MSM_CAMERA_SENSOR=y +CONFIG_MSM_CPP=y +CONFIG_MSM_CCI=y +CONFIG_MSM_CSI30_HEADER=y +CONFIG_MSM_CSIPHY=y +CONFIG_MSM_CSID=y +CONFIG_MSM_EEPROM=y +CONFIG_MSM_ISPIF=y +CONFIG_MSMB_JPEG=y +CONFIG_MSM_VIDC_V4L2=y +CONFIG_RADIO_IRIS=y +CONFIG_RADIO_IRIS_TRANSPORT=y +# CONFIG_VGA_ARB is not set +CONFIG_MSM_KGSL=y +CONFIG_KGSL_PER_PROCESS_PAGE_TABLE=y +CONFIG_FB=y +CONFIG_FB_MSM=y +# CONFIG_FB_MSM_BACKLIGHT is not set +CONFIG_FB_MSM_MDSS=y +CONFIG_FB_MSM_MDSS_WRITEBACK=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_SOUND=y +CONFIG_SND=y +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_PCI is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_SOC=y +CONFIG_SND_SOC_MSM8X16=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_A4TECH=y +CONFIG_HID_ACRUX=y +CONFIG_HID_ACRUX_FF=y +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +CONFIG_HID_PRODIKEYS=y +CONFIG_HID_CYPRESS=y +CONFIG_HID_DRAGONRISE=y +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EMS_FF=y +CONFIG_HID_ELECOM=y +CONFIG_HID_EZKEY=y +CONFIG_HID_KEYTOUCH=y +CONFIG_HID_KYE=y +CONFIG_HID_UCLOGIC=y +CONFIG_HID_WALTOP=y +CONFIG_HID_GYRATION=y +CONFIG_HID_TWINHAN=y +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LCPOWER=y +CONFIG_HID_LOGITECH=y +CONFIG_HID_LOGITECH_DJ=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_HID_MAGICMOUSE=y +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MONTEREY=y +CONFIG_HID_MULTITOUCH=y +CONFIG_HID_ORTEK=y +CONFIG_HID_PANTHERLORD=y +CONFIG_PANTHERLORD_FF=y +CONFIG_HID_PETALYNX=y +CONFIG_HID_PICOLCD=y +CONFIG_HID_PRIMAX=y +CONFIG_HID_SAITEK=y +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SPEEDLINK=y +CONFIG_HID_SUNPLUS=y +CONFIG_HID_GREENASIA=y +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=y +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TIVO=y +CONFIG_HID_TOPSEED=y +CONFIG_HID_THRUSTMASTER=y +CONFIG_HID_WACOM=y +CONFIG_HID_WIIMOTE=y +CONFIG_HID_ZEROPLUS=y +CONFIG_HID_ZYDACRON=y +CONFIG_USB_HIDDEV=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_EHSET=y +CONFIG_USB_EHCI_MSM=y +CONFIG_USB_EHCI_MSM_UICC=y +CONFIG_USB_ICE40_HCD=y +CONFIG_USB_ACM=y +CONFIG_USB_CCID_BRIDGE=y +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_KARMA=y +CONFIG_USB_STORAGE_CYPRESS_ATACB=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CSVT=y +CONFIG_USB_EHSET_TEST_FIXTURE=y +CONFIG_USB_PHY=y +CONFIG_USB_MSM_SSPHY_QMP=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_CI13XXX_MSM=y +CONFIG_USB_DWC3_MSM=y +CONFIG_USB_G_ANDROID=y +CONFIG_MMC=y +CONFIG_MMC_PERF_PROFILING=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_CLKGATE=y +CONFIG_MMC_PARANOID_SD_INIT=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BLOCK_DEFERRED_RESUME=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_MSM=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_QPNP=y +CONFIG_LEDS_MSM_GPIO_FLASH=y +CONFIG_LEDS_AW2013=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_SWITCH=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_QPNP=y +CONFIG_DMADEVICES=y +CONFIG_QCOM_SPS_DMA=y +CONFIG_UIO=y +CONFIG_UIO_MSM_SHAREDMEM=y +CONFIG_STAGING=y +CONFIG_ANDROID=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ASHMEM=y +CONFIG_ANDROID_TIMED_GPIO=y +CONFIG_ANDROID_LOW_MEMORY_KILLER=y +CONFIG_ANDROID_INTF_ALARM_DEV=y +CONFIG_ONESHOT_SYNC=y +CONFIG_ION=y +CONFIG_ION_MSM=y +CONFIG_ALLOC_BUFFERS_IN_4K_CHUNKS=y +CONFIG_PRONTO_WLAN=y +CONFIG_PRIMA_WLAN_LFR=y +CONFIG_PRIMA_WLAN_OKC=y +CONFIG_PRIMA_WLAN_11AC_HIGH_TP=y +CONFIG_QCOM_TDLS=y +CONFIG_WLAN_FEATURE_11W=y +CONFIG_QCOM_VOWIFI_11R=y +CONFIG_ENABLE_LINUX_REG=y +CONFIG_MACH_CRACKLING=y +CONFIG_SPS=y +CONFIG_SPS_SUPPORT_NDP_BAM=y +CONFIG_QPNP_POWER_ON=y +CONFIG_QPNP_VIBRATOR=y +CONFIG_QPNP_REVID=y +CONFIG_QPNP_COINCELL=y +CONFIG_MSM_AVTIMER=y +CONFIG_PFT=y +CONFIG_MSM_BUS_SCALING=y +CONFIG_BUS_TOPOLOGY_ADHOC=y +CONFIG_MSM_MDSS_PLL=y +CONFIG_REMOTE_SPINLOCK_MSM=y +CONFIG_MSM_IOMMU_V1=y +CONFIG_PWM=y +CONFIG_PWM_QPNP=y +CONFIG_SENSORS=y +CONFIG_SENSORS_SSC=y +CONFIG_MSM_BAM_DMUX=y +CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y +CONFIG_MSM_QMI_INTERFACE=y +CONFIG_MSM_SMD=y +CONFIG_MSM_RPM_SMD=y +CONFIG_MSM_RPM_LOG=y +CONFIG_MSM_RPM_STATS_LOG=y +CONFIG_MSM_RUN_QUEUE_STATS=y +CONFIG_MSM_SMEM=y +CONFIG_MSM_SMEM_LOGGING=y +CONFIG_MSM_SMP2P=y +CONFIG_MSM_SMP2P_TEST=y +# CONFIG_MSM_DMA_TEST is not set +CONFIG_MSM_SPM=y +CONFIG_MSM_L2_SPM=y +CONFIG_MSM_ADSP_LOADER=y +CONFIG_MSM_MEMORY_DUMP_V2=y +CONFIG_MSM_COMMON_LOG=y +CONFIG_MSM_WATCHDOG_V2=y +CONFIG_MSM_FORCE_WDOG_BITE_ON_PANIC=y +CONFIG_MSM_SUBSYSTEM_RESTART=y +CONFIG_MSM_SYSMON_COMM=y +CONFIG_MSM_PIL=y +CONFIG_MSM_PIL_SSR_GENERIC=y +CONFIG_MSM_PIL_MSS_QDSP6V5=y +CONFIG_MSM_OCMEM=y +CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y +CONFIG_MSM_SCM=y +CONFIG_MSM_PERFORMANCE=y +CONFIG_MEM_SHARE_QMI_SERVICE=y +CONFIG_MSM_TZ_LOG=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_FUSE_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_PSTORE=y +CONFIG_PSTORE_CONSOLE=y +CONFIG_PSTORE_RAM=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FRAME_POINTER is not set +# CONFIG_RCU_CPU_STALL_VERBOSE is not set +CONFIG_IPC_LOGGING=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_PANIC_ON_DATA_CORRUPTION=y +CONFIG_KEYS=y +CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK=y +CONFIG_LSM_MMAP_MIN_ADDR=4096 +CONFIG_SECURITY_SELINUX=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_CTR=y +CONFIG_CRYPTO_XCBC=y +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_DEV_QCRYPTO=y +CONFIG_CRYPTO_DEV_QCE=y +CONFIG_CRYPTO_DEV_QCEDEV=y +CONFIG_ASYMMETRIC_KEY_TYPE=y +CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y +CONFIG_PUBLIC_KEY_ALGO_RSA=y +CONFIG_X509_CERTIFICATE_PARSER=y +CONFIG_ARM64_CRYPTO=y +CONFIG_CRYPTO_SHA1_ARM64_CE=y +CONFIG_CRYPTO_SHA2_ARM64_CE=y +CONFIG_CRYPTO_GHASH_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE_CCM=y +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y +CONFIG_QMI_ENCDEC=y diff --git a/arch/arm64/configs/lineageos_kipper_defconfig b/arch/arm64/configs/lineageos_kipper_defconfig new file mode 100644 index 00000000000..8fa8f05509e --- /dev/null +++ b/arch/arm64/configs/lineageos_kipper_defconfig @@ -0,0 +1,646 @@ +CONFIG_LOCALVERSION="-lineageos" +CONFIG_AUDIT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_IKCONFIG=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_SCHED_HMP=y +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_PID_NS is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_PANIC_TIMEOUT=5 +CONFIG_KALLSYMS_ALL=y +# CONFIG_PCI_QUIRKS is not set +CONFIG_EMBEDDED=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_PROFILING=y +CONFIG_PARTITION_ADVANCED=y +# CONFIG_IOSCHED_TEST is not set +CONFIG_IOSCHED_BFQ=y +CONFIG_CGROUP_BFQIO=y +CONFIG_DEFAULT_NOOP=y +CONFIG_ARCH_MSM=y +CONFIG_ARCH_MSM8916=y +CONFIG_SMP=y +CONFIG_SCHED_MC=y +CONFIG_PREEMPT=y +CONFIG_ARMV7_COMPAT=y +CONFIG_BALANCE_ANON_FILE_RECLAIM=y +CONFIG_PROCESS_RECLAIM=y +CONFIG_ZSMALLOC=y +CONFIG_SECCOMP=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_COMPAT=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=0 +# CONFIG_PM_WAKELOCKS_GC is not set +CONFIG_PM_RUNTIME=y +CONFIG_SUSPEND_TIME=y +CONFIG_CPU_FREQ=y +CONFIG_SCHED_FREQ_INPUT=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_BOOST=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_INET_AH=y +CONFIG_INET_ESP=y +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=y +CONFIG_INET6_ESP=y +CONFIG_INET6_IPCOMP=y +CONFIG_IPV6_MIP6=y +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_NETFILTER=y +CONFIG_NF_CONNTRACK=y +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CT_PROTO_DCCP=y +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y +CONFIG_NF_CONNTRACK_AMANDA=y +CONFIG_NF_CONNTRACK_FTP=y +CONFIG_NF_CONNTRACK_H323=y +CONFIG_NF_CONNTRACK_IRC=y +CONFIG_NF_CONNTRACK_NETBIOS_NS=y +CONFIG_NF_CONNTRACK_PPTP=y +CONFIG_NF_CONNTRACK_SANE=y +CONFIG_NF_CONNTRACK_TFTP=y +CONFIG_NF_CT_NETLINK=y +CONFIG_NETFILTER_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y +CONFIG_NETFILTER_XT_TARGET_CONNMARK=y +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_HARDIDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_LOG=y +CONFIG_NETFILTER_XT_TARGET_MARK=y +CONFIG_NETFILTER_XT_TARGET_NFLOG=y +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y +CONFIG_NETFILTER_XT_TARGET_NOTRACK=y +CONFIG_NETFILTER_XT_TARGET_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_TRACE=y +CONFIG_NETFILTER_XT_TARGET_SECMARK=y +CONFIG_NETFILTER_XT_TARGET_TCPMSS=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=y +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y +CONFIG_NETFILTER_XT_MATCH_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DSCP=y +CONFIG_NETFILTER_XT_MATCH_ESP=y +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y +CONFIG_NETFILTER_XT_MATCH_HELPER=y +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y +CONFIG_NETFILTER_XT_MATCH_LENGTH=y +CONFIG_NETFILTER_XT_MATCH_LIMIT=y +CONFIG_NETFILTER_XT_MATCH_MAC=y +CONFIG_NETFILTER_XT_MATCH_MARK=y +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_POLICY=y +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y +CONFIG_NETFILTER_XT_MATCH_QTAGUID=y +CONFIG_NETFILTER_XT_MATCH_QUOTA=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STATISTIC=y +CONFIG_NETFILTER_XT_MATCH_STRING=y +CONFIG_NETFILTER_XT_MATCH_TIME=y +CONFIG_NETFILTER_XT_MATCH_U32=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=y +CONFIG_IP_NF_MATCH_ECN=y +CONFIG_IP_NF_MATCH_TTL=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_REJECT_SKERR=y +CONFIG_NF_NAT_IPV4=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_RAW=y +CONFIG_IP_NF_SECURITY=y +CONFIG_IP_NF_ARPTABLES=y +CONFIG_IP_NF_ARPFILTER=y +CONFIG_IP_NF_ARP_MANGLE=y +CONFIG_NF_CONNTRACK_IPV6=y +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_FILTER=y +CONFIG_IP6_NF_TARGET_REJECT=y +CONFIG_IP6_NF_TARGET_REJECT_SKERR=y +CONFIG_IP6_NF_MANGLE=y +CONFIG_IP6_NF_RAW=y +CONFIG_BRIDGE_NF_EBTABLES=y +CONFIG_BRIDGE_EBT_BROUTE=y +CONFIG_L2TP=y +CONFIG_BRIDGE=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_HTB=y +CONFIG_NET_SCH_PRIO=y +CONFIG_NET_CLS_FW=y +CONFIG_NET_CLS_U32=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_FLOW=y +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=y +CONFIG_NET_EMATCH_NBYTE=y +CONFIG_NET_EMATCH_U32=y +CONFIG_NET_EMATCH_META=y +CONFIG_NET_EMATCH_TEXT=y +CONFIG_NET_CLS_ACT=y +CONFIG_RMNET_DATA=y +CONFIG_RMNET_DATA_FC=y +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_RFKILL=y +CONFIG_NFC_QNCI=y +CONFIG_IPC_ROUTER=y +CONFIG_IPC_ROUTER_SECURITY=y +CONFIG_CMA=y +CONFIG_CMA_SIZE_MBYTES=64 +CONFIG_ZRAM=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_UID_STAT=y +CONFIG_QSEECOM=y +CONFIG_UID_CPUTIME=y +CONFIG_SCSI=y +CONFIG_SCSI_TGT=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_CRYPT=y +CONFIG_DM_REQ_CRYPT=y +CONFIG_DM_UEVENT=y +CONFIG_DM_VERITY=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +CONFIG_TUN=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_ALTEON is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_ATHEROS is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_CISCO is not set +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +# CONFIG_NET_VENDOR_EXAR is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +CONFIG_MSM_RMNET_BAM=y +# CONFIG_NET_VENDOR_MYRI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NVIDIA is not set +# CONFIG_NET_VENDOR_OKI is not set +# CONFIG_NET_PACKET_ENGINE is not set +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_REALTEK is not set +# CONFIG_NET_VENDOR_RDC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PPP=y +CONFIG_PPP_BSDCOMP=y +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=y +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=y +CONFIG_PPPOL2TP=y +CONFIG_PPPOLAC=y +CONFIG_PPPOPNS=y +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +CONFIG_SLIP=y +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_DM9601=y +CONFIG_WCNSS_CORE=y +CONFIG_WCNSS_CORE_PRONTO=y +CONFIG_WCNSS_MEM_PRE_ALLOC=y +CONFIG_WCNSS_REGISTER_DUMP_ON_BITE=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_KEYRESET=y +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_XPAD=y +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_INPUT_TABLET=y +CONFIG_TABLET_USB_ACECAD=y +CONFIG_TABLET_USB_AIPTEK=y +CONFIG_TABLET_USB_GTCO=y +CONFIG_TABLET_USB_HANWANG=y +CONFIG_TABLET_USB_KBTAB=y +CONFIG_TABLET_USB_WACOM=y +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_v21 is not set +CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4=y +CONFIG_CYPRESS_CYTTSP4_BUS=y +CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4_DEVICETREE_SUPPORT=y +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4_SPI is not set +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4_MT_A is not set +CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4_DEVICE_ACCESS_API=y +CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4_BINARY_FW_UPGRADE=y +CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4_PLATFORM_TTCONFIG_UPGRADE=y +CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4_MANUAL_TTCONFIG_UPGRADE=y +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4_DEBUG_MODULE is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_KEYCHORD=y +CONFIG_INPUT_UINPUT=y +CONFIG_INPUT_GPIO=y +CONFIG_SENSORS_LTR553=y +CONFIG_INPUT_LSM6DX0=y +CONFIG_SENSORS_ST480=y +# CONFIG_SERIO_I8042 is not set +# CONFIG_VT is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVMEM is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_MSM_SMD=y +CONFIG_HW_RANDOM_MSM=y +CONFIG_MSM_SMD_PKT=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MSM_V2=y +CONFIG_SLIMBUS_MSM_NGD=y +CONFIG_SOUNDWIRE=y +CONFIG_SPI=y +CONFIG_SPI_QUP=y +CONFIG_SPI_SPIDEV=y +CONFIG_SPMI=y +CONFIG_SPMI_MSM_PMIC_ARB=y +CONFIG_MSM_QPNP_INT=y +CONFIG_USE_PINCTRL_IRQ=y +CONFIG_PINCTRL_MSM_TLMM=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_QPNP_PIN=y +CONFIG_SMB1360_CHARGER_FG=y +CONFIG_BATTERY_BCL=y +CONFIG_QPNP_LINEAR_CHARGER=y +CONFIG_POWER_RESET_MSM=y +CONFIG_MSM_PRESERVE_MEM=y +CONFIG_MSM_PM=y +CONFIG_SENSORS_QPNP_ADC_VOLTAGE=y +CONFIG_THERMAL=y +CONFIG_THERMAL_TSENS8974=y +CONFIG_THERMAL_MONITOR=y +CONFIG_THERMAL_QPNP=y +CONFIG_THERMAL_QPNP_ADC_TM=y +CONFIG_WCD9335_CODEC=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_PROXY_CONSUMER=y +CONFIG_REGULATOR_FAN53555=y +CONFIG_REGULATOR_MEM_ACC=y +CONFIG_REGULATOR_STUB=y +CONFIG_REGULATOR_RPM_SMD=y +CONFIG_REGULATOR_QPNP=y +CONFIG_REGULATOR_SPM=y +CONFIG_REGULATOR_CPR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_VIDEOBUF2_MSM_MEM=y +CONFIG_V4L_PLATFORM_DRIVERS=y +# CONFIG_OABI_COMPAT is not set +CONFIG_MSMB_CAMERA=y +CONFIG_MSM_CAMERA_SENSOR=y +CONFIG_MSM_CPP=y +CONFIG_MSM_CCI=y +CONFIG_MSM_CSI30_HEADER=y +CONFIG_MSM_CSIPHY=y +CONFIG_MSM_CSID=y +CONFIG_MSM_EEPROM=y +CONFIG_MSM_ISPIF=y +CONFIG_MSMB_JPEG=y +CONFIG_MSM_VIDC_V4L2=y +CONFIG_RADIO_IRIS=y +CONFIG_RADIO_IRIS_TRANSPORT=y +# CONFIG_VGA_ARB is not set +CONFIG_MSM_KGSL=y +CONFIG_KGSL_PER_PROCESS_PAGE_TABLE=y +CONFIG_FB=y +CONFIG_FB_MSM=y +# CONFIG_FB_MSM_BACKLIGHT is not set +CONFIG_FB_MSM_MDSS=y +CONFIG_FB_MSM_MDSS_WRITEBACK=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_SOUND=y +CONFIG_SND=y +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_PCI is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_USB_AUDIO=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_MSM8X16=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_A4TECH=y +CONFIG_HID_ACRUX=y +CONFIG_HID_ACRUX_FF=y +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +CONFIG_HID_PRODIKEYS=y +CONFIG_HID_CYPRESS=y +CONFIG_HID_DRAGONRISE=y +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EMS_FF=y +CONFIG_HID_ELECOM=y +CONFIG_HID_EZKEY=y +CONFIG_HID_FIIO=y +CONFIG_HID_HOLTEK=y +CONFIG_HID_KEYTOUCH=y +CONFIG_HID_KYE=y +CONFIG_HID_UCLOGIC=y +CONFIG_HID_WALTOP=y +CONFIG_HID_GYRATION=y +CONFIG_HID_TWINHAN=y +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LCPOWER=y +CONFIG_HID_LOGITECH=y +CONFIG_HID_LOGITECH_DJ=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_HID_MAGICMOUSE=y +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MONTEREY=y +CONFIG_HID_MULTITOUCH=y +CONFIG_HID_NTRIG=y +CONFIG_HID_ORTEK=y +CONFIG_HID_PANTHERLORD=y +CONFIG_PANTHERLORD_FF=y +CONFIG_HID_PETALYNX=y +CONFIG_HID_PICOLCD=y +CONFIG_HID_PRIMAX=y +CONFIG_HID_ROCCAT=y +CONFIG_HID_SAITEK=y +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_HID_SPEEDLINK=y +CONFIG_HID_SUNPLUS=y +CONFIG_HID_GREENASIA=y +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=y +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TIVO=y +CONFIG_HID_TOPSEED=y +CONFIG_HID_THRUSTMASTER=y +CONFIG_HID_WACOM=y +CONFIG_HID_WIIMOTE=y +CONFIG_HID_ZEROPLUS=y +CONFIG_HID_ZYDACRON=y +CONFIG_USB_HIDDEV=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_EHSET=y +CONFIG_USB_EHCI_MSM=y +CONFIG_USB_EHCI_MSM_UICC=y +CONFIG_USB_ICE40_HCD=y +CONFIG_USB_ACM=y +CONFIG_USB_CCID_BRIDGE=y +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_KARMA=y +CONFIG_USB_STORAGE_CYPRESS_ATACB=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CSVT=y +CONFIG_USB_EHSET_TEST_FIXTURE=y +CONFIG_USB_PHY=y +CONFIG_USB_OTG_WAKELOCK=y +CONFIG_USB_MSM_SSPHY_QMP=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_CI13XXX_MSM=y +CONFIG_USB_DWC3_MSM=y +CONFIG_USB_G_ANDROID=y +CONFIG_MMC=y +CONFIG_MMC_PERF_PROFILING=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_CLKGATE=y +CONFIG_MMC_PARANOID_SD_INIT=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BLOCK_DEFERRED_RESUME=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_MSM=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_MSM_GPIO_FLASH_CKT=y +CONFIG_LEDS_AW2013=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_SWITCH=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_QPNP=y +CONFIG_DMADEVICES=y +CONFIG_QCOM_SPS_DMA=y +CONFIG_UIO=y +CONFIG_UIO_MSM_SHAREDMEM=y +CONFIG_STAGING=y +CONFIG_ANDROID=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ASHMEM=y +CONFIG_ANDROID_TIMED_GPIO=y +CONFIG_ANDROID_LOW_MEMORY_KILLER=y +CONFIG_ANDROID_INTF_ALARM_DEV=y +CONFIG_ONESHOT_SYNC=y +CONFIG_ION=y +CONFIG_ION_MSM=y +CONFIG_ALLOC_BUFFERS_IN_4K_CHUNKS=y +CONFIG_PRONTO_WLAN=y +CONFIG_PRIMA_WLAN_LFR=y +CONFIG_PRIMA_WLAN_OKC=y +CONFIG_PRIMA_WLAN_11AC_HIGH_TP=y +CONFIG_QCOM_TDLS=y +CONFIG_WLAN_FEATURE_11W=y +CONFIG_QCOM_VOWIFI_11R=y +CONFIG_ENABLE_LINUX_REG=y +CONFIG_MACH_SPIRIT=y +CONFIG_SPS=y +CONFIG_SPS_SUPPORT_NDP_BAM=y +CONFIG_QPNP_POWER_ON=y +CONFIG_QPNP_VIBRATOR=y +CONFIG_QPNP_REVID=y +CONFIG_QPNP_COINCELL=y +CONFIG_MSM_AVTIMER=y +CONFIG_PFT=y +CONFIG_MSM_BUS_SCALING=y +CONFIG_BUS_TOPOLOGY_ADHOC=y +CONFIG_MSM_MDSS_PLL=y +CONFIG_REMOTE_SPINLOCK_MSM=y +CONFIG_MSM_IOMMU_V1=y +CONFIG_PWM=y +CONFIG_PWM_QPNP=y +CONFIG_SENSORS=y +CONFIG_SENSORS_SSC=y +CONFIG_MSM_BAM_DMUX=y +CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y +CONFIG_MSM_QMI_INTERFACE=y +CONFIG_MSM_SMD=y +CONFIG_MSM_RPM_SMD=y +CONFIG_MSM_RPM_LOG=y +CONFIG_MSM_RPM_STATS_LOG=y +CONFIG_MSM_RUN_QUEUE_STATS=y +CONFIG_MSM_SMEM=y +CONFIG_MSM_SMEM_LOGGING=y +CONFIG_MSM_SMP2P=y +CONFIG_MSM_SMP2P_TEST=y +# CONFIG_MSM_DMA_TEST is not set +CONFIG_MSM_SPM=y +CONFIG_MSM_L2_SPM=y +CONFIG_MSM_ADSP_LOADER=y +CONFIG_MSM_MEMORY_DUMP_V2=y +CONFIG_MSM_COMMON_LOG=y +CONFIG_MSM_WATCHDOG_V2=y +CONFIG_MSM_FORCE_WDOG_BITE_ON_PANIC=y +CONFIG_MSM_SUBSYSTEM_RESTART=y +CONFIG_MSM_SYSMON_COMM=y +CONFIG_MSM_PIL=y +CONFIG_MSM_PIL_SSR_GENERIC=y +CONFIG_MSM_PIL_MSS_QDSP6V5=y +CONFIG_MSM_OCMEM=y +CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y +CONFIG_MSM_SCM=y +CONFIG_MSM_CORE_CTL_HELPER=y +CONFIG_MSM_PERFORMANCE=y +CONFIG_MEM_SHARE_QMI_SERVICE=y +CONFIG_MSM_TZ_LOG=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_FUSE_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_PSTORE=y +CONFIG_PSTORE_CONSOLE=y +CONFIG_PSTORE_RAM=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FRAME_POINTER is not set +# CONFIG_RCU_CPU_STALL_VERBOSE is not set +CONFIG_IPC_LOGGING=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_PANIC_ON_DATA_CORRUPTION=y +CONFIG_KEYS=y +CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK=y +CONFIG_LSM_MMAP_MIN_ADDR=4096 +CONFIG_SECURITY_SELINUX=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_CTR=y +CONFIG_CRYPTO_XCBC=y +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_DEV_QCRYPTO=y +CONFIG_CRYPTO_DEV_QCE=y +CONFIG_CRYPTO_DEV_QCEDEV=y +CONFIG_ASYMMETRIC_KEY_TYPE=y +CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y +CONFIG_PUBLIC_KEY_ALGO_RSA=y +CONFIG_X509_CERTIFICATE_PARSER=y +CONFIG_ARM64_CRYPTO=y +CONFIG_CRYPTO_SHA1_ARM64_CE=y +CONFIG_CRYPTO_SHA2_ARM64_CE=y +CONFIG_CRYPTO_GHASH_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE_CCM=y +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y +CONFIG_QMI_ENCDEC=y diff --git a/arch/arm64/configs/lineageos_lettuce_defconfig b/arch/arm64/configs/lineageos_lettuce_defconfig new file mode 100644 index 00000000000..12f27f9d8c1 --- /dev/null +++ b/arch/arm64/configs/lineageos_lettuce_defconfig @@ -0,0 +1,640 @@ +CONFIG_LOCALVERSION="-lineageos" +CONFIG_AUDIT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_IKCONFIG=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_SCHED_HMP=y +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_PID_NS is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_PANIC_TIMEOUT=5 +CONFIG_KALLSYMS_ALL=y +# CONFIG_PCI_QUIRKS is not set +CONFIG_EMBEDDED=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_PROFILING=y +CONFIG_PARTITION_ADVANCED=y +# CONFIG_IOSCHED_TEST is not set +CONFIG_IOSCHED_BFQ=y +CONFIG_CGROUP_BFQIO=y +CONFIG_DEFAULT_NOOP=y +CONFIG_ARCH_MSM=y +CONFIG_ARCH_MSM8916=y +CONFIG_SMP=y +CONFIG_SCHED_MC=y +CONFIG_NR_CPUS=4 +CONFIG_PREEMPT=y +CONFIG_ARMV7_COMPAT=y +CONFIG_BALANCE_ANON_FILE_RECLAIM=y +CONFIG_PROCESS_RECLAIM=y +CONFIG_ZSMALLOC=y +CONFIG_SECCOMP=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_COMPAT=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=0 +# CONFIG_PM_WAKELOCKS_GC is not set +CONFIG_PM_RUNTIME=y +CONFIG_SUSPEND_TIME=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_BOOST=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_INET_AH=y +CONFIG_INET_ESP=y +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=y +CONFIG_INET6_ESP=y +CONFIG_INET6_IPCOMP=y +CONFIG_IPV6_MIP6=y +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_NETFILTER=y +CONFIG_NF_CONNTRACK=y +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CT_PROTO_DCCP=y +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y +CONFIG_NF_CONNTRACK_AMANDA=y +CONFIG_NF_CONNTRACK_FTP=y +CONFIG_NF_CONNTRACK_H323=y +CONFIG_NF_CONNTRACK_IRC=y +CONFIG_NF_CONNTRACK_NETBIOS_NS=y +CONFIG_NF_CONNTRACK_PPTP=y +CONFIG_NF_CONNTRACK_SANE=y +CONFIG_NF_CONNTRACK_TFTP=y +CONFIG_NF_CT_NETLINK=y +CONFIG_NETFILTER_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y +CONFIG_NETFILTER_XT_TARGET_CONNMARK=y +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_HARDIDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_LOG=y +CONFIG_NETFILTER_XT_TARGET_MARK=y +CONFIG_NETFILTER_XT_TARGET_NFLOG=y +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y +CONFIG_NETFILTER_XT_TARGET_NOTRACK=y +CONFIG_NETFILTER_XT_TARGET_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_TRACE=y +CONFIG_NETFILTER_XT_TARGET_SECMARK=y +CONFIG_NETFILTER_XT_TARGET_TCPMSS=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=y +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y +CONFIG_NETFILTER_XT_MATCH_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DSCP=y +CONFIG_NETFILTER_XT_MATCH_ESP=y +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y +CONFIG_NETFILTER_XT_MATCH_HELPER=y +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y +CONFIG_NETFILTER_XT_MATCH_LENGTH=y +CONFIG_NETFILTER_XT_MATCH_LIMIT=y +CONFIG_NETFILTER_XT_MATCH_MAC=y +CONFIG_NETFILTER_XT_MATCH_MARK=y +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_POLICY=y +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y +CONFIG_NETFILTER_XT_MATCH_QTAGUID=y +CONFIG_NETFILTER_XT_MATCH_QUOTA=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STATISTIC=y +CONFIG_NETFILTER_XT_MATCH_STRING=y +CONFIG_NETFILTER_XT_MATCH_TIME=y +CONFIG_NETFILTER_XT_MATCH_U32=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=y +CONFIG_IP_NF_MATCH_ECN=y +CONFIG_IP_NF_MATCH_TTL=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_REJECT_SKERR=y +CONFIG_NF_NAT_IPV4=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_RAW=y +CONFIG_IP_NF_SECURITY=y +CONFIG_IP_NF_ARPTABLES=y +CONFIG_IP_NF_ARPFILTER=y +CONFIG_IP_NF_ARP_MANGLE=y +CONFIG_NF_CONNTRACK_IPV6=y +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_FILTER=y +CONFIG_IP6_NF_TARGET_REJECT=y +CONFIG_IP6_NF_TARGET_REJECT_SKERR=y +CONFIG_IP6_NF_MANGLE=y +CONFIG_IP6_NF_RAW=y +CONFIG_BRIDGE_NF_EBTABLES=y +CONFIG_BRIDGE_EBT_BROUTE=y +CONFIG_L2TP=y +CONFIG_BRIDGE=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_HTB=y +CONFIG_NET_SCH_PRIO=y +CONFIG_NET_CLS_FW=y +CONFIG_NET_CLS_U32=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_FLOW=y +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=y +CONFIG_NET_EMATCH_NBYTE=y +CONFIG_NET_EMATCH_U32=y +CONFIG_NET_EMATCH_META=y +CONFIG_NET_EMATCH_TEXT=y +CONFIG_NET_CLS_ACT=y +CONFIG_RMNET_DATA=y +CONFIG_RMNET_DATA_FC=y +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_RFKILL=y +CONFIG_IPC_ROUTER=y +CONFIG_IPC_ROUTER_SECURITY=y +CONFIG_CMA=y +CONFIG_CMA_SIZE_MBYTES=8 +CONFIG_ZRAM=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_UID_STAT=y +CONFIG_QSEECOM=y +CONFIG_UID_CPUTIME=y +CONFIG_SCSI=y +CONFIG_SCSI_TGT=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_CRYPT=y +CONFIG_DM_REQ_CRYPT=y +CONFIG_DM_UEVENT=y +CONFIG_DM_VERITY=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +CONFIG_TUN=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_ALTEON is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_ATHEROS is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_CISCO is not set +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +# CONFIG_NET_VENDOR_EXAR is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +CONFIG_MSM_RMNET_BAM=y +# CONFIG_NET_VENDOR_MYRI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NVIDIA is not set +# CONFIG_NET_VENDOR_OKI is not set +# CONFIG_NET_PACKET_ENGINE is not set +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_REALTEK is not set +# CONFIG_NET_VENDOR_RDC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PPP=y +CONFIG_PPP_BSDCOMP=y +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=y +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=y +CONFIG_PPPOL2TP=y +CONFIG_PPPOLAC=y +CONFIG_PPPOPNS=y +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_DM9601=y +CONFIG_SLIP=y +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_WCNSS_CORE=y +CONFIG_WCNSS_CORE_PRONTO=y +CONFIG_WCNSS_MEM_PRE_ALLOC=y +CONFIG_WCNSS_REGISTER_DUMP_ON_BITE=y +CONFIG_INPUT_POLLDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_KEYRESET=y +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_XPAD=y +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_INPUT_TABLET=y +CONFIG_TABLET_USB_ACECAD=y +CONFIG_TABLET_USB_AIPTEK=y +CONFIG_TABLET_USB_GTCO=y +CONFIG_TABLET_USB_HANWANG=y +CONFIG_TABLET_USB_KBTAB=y +CONFIG_TABLET_USB_WACOM=y +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_v21 is not set +CONFIG_TOUCHSCREEN_GSL1688E_ARM64=y +CONFIG_TOUCHSCREEN_GEN_VKEYS=y +CONFIG_INPUT_MISC=y +CONFIG_SENSORS_MPU6050=y +CONFIG_INPUT_KEYCHORD=y +CONFIG_INPUT_UINPUT=y +CONFIG_INPUT_GPIO=y +CONFIG_SENSORS_AP3426_CM=y +CONFIG_SENSORS_AKM09911=y +# CONFIG_SERIO_I8042 is not set +# CONFIG_VT is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVMEM is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_MSM_SMD=y +CONFIG_HW_RANDOM_MSM=y +CONFIG_MSM_SMD_PKT=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MSM_V2=y +CONFIG_SLIMBUS_MSM_NGD=y +CONFIG_SOUNDWIRE=y +CONFIG_SPI=y +CONFIG_SPI_QUP=y +CONFIG_SPMI=y +CONFIG_SPMI_MSM_PMIC_ARB=y +CONFIG_MSM_QPNP_INT=y +CONFIG_USE_PINCTRL_IRQ=y +CONFIG_PINCTRL_MSM_TLMM=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_ARIZONA=y +CONFIG_GPIO_QPNP_PIN=y +CONFIG_SMB1360_CHARGER_FG=y +CONFIG_BATTERY_BCL=y +CONFIG_POWER_RESET_MSM=y +CONFIG_MSM_PRESERVE_MEM=y +CONFIG_MSM_PM=y +CONFIG_SENSORS_QPNP_ADC_VOLTAGE=y +CONFIG_SENSORS_QPNP_ADC_CURRENT=y +CONFIG_SENSORS_QPNP_CURRENT_MONITOR=y +CONFIG_THERMAL=y +CONFIG_THERMAL_TSENS8974=y +CONFIG_THERMAL_MONITOR=y +CONFIG_THERMAL_QPNP=y +CONFIG_THERMAL_QPNP_ADC_TM=y +CONFIG_MFD_ARIZONA_I2C=y +CONFIG_MFD_VEGAS=y +CONFIG_WCD9335_CODEC=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_PROXY_CONSUMER=y +CONFIG_REGULATOR_ARIZONA=y +CONFIG_REGULATOR_FAN53555=y +CONFIG_REGULATOR_MEM_ACC=y +CONFIG_REGULATOR_ONSEMI_NCP6335D=y +CONFIG_REGULATOR_TPS65132=y +CONFIG_REGULATOR_STUB=y +CONFIG_REGULATOR_RPM_SMD=y +CONFIG_REGULATOR_QPNP=y +CONFIG_REGULATOR_SPM=y +CONFIG_REGULATOR_CPR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_VIDEOBUF2_MSM_MEM=y +CONFIG_V4L_PLATFORM_DRIVERS=y +# CONFIG_OABI_COMPAT is not set +CONFIG_MSMB_CAMERA=y +CONFIG_MSM_CAMERA_SENSOR=y +CONFIG_MSM_CPP=y +CONFIG_MSM_CCI=y +CONFIG_MSM_CSI30_HEADER=y +CONFIG_MSM_CSIPHY=y +CONFIG_MSM_CSID=y +CONFIG_MSM_EEPROM=y +CONFIG_MSM_ISPIF=y +CONFIG_MSMB_JPEG=y +CONFIG_MSM_VIDC_V4L2=y +CONFIG_RADIO_IRIS=y +CONFIG_RADIO_IRIS_TRANSPORT=y +# CONFIG_VGA_ARB is not set +CONFIG_MSM_KGSL=y +CONFIG_KGSL_PER_PROCESS_PAGE_TABLE=y +CONFIG_FB=y +CONFIG_FB_MSM=y +# CONFIG_FB_MSM_BACKLIGHT is not set +CONFIG_FB_MSM_MDSS=y +CONFIG_FB_MSM_MDSS_WRITEBACK=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_SOUND=y +CONFIG_SND=y +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_PCI is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_USB_AUDIO=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_MSM8X16=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_A4TECH=y +CONFIG_HID_ACRUX=y +CONFIG_HID_ACRUX_FF=y +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +CONFIG_HID_PRODIKEYS=y +CONFIG_HID_CYPRESS=y +CONFIG_HID_DRAGONRISE=y +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EMS_FF=y +CONFIG_HID_ELECOM=y +CONFIG_HID_EZKEY=y +CONFIG_HID_HOLTEK=y +CONFIG_HID_KEYTOUCH=y +CONFIG_HID_KYE=y +CONFIG_HID_UCLOGIC=y +CONFIG_HID_WALTOP=y +CONFIG_HID_GYRATION=y +CONFIG_HID_TWINHAN=y +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LCPOWER=y +CONFIG_HID_LOGITECH=y +CONFIG_HID_LOGITECH_DJ=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_HID_MAGICMOUSE=y +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MONTEREY=y +CONFIG_HID_MULTITOUCH=y +CONFIG_HID_NTRIG=y +CONFIG_HID_ORTEK=y +CONFIG_HID_PANTHERLORD=y +CONFIG_PANTHERLORD_FF=y +CONFIG_HID_PETALYNX=y +CONFIG_HID_PICOLCD=y +CONFIG_HID_PRIMAX=y +CONFIG_HID_ROCCAT=y +CONFIG_HID_SAITEK=y +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_HID_SPEEDLINK=y +CONFIG_HID_SUNPLUS=y +CONFIG_HID_GREENASIA=y +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=y +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TIVO=y +CONFIG_HID_TOPSEED=y +CONFIG_HID_THRUSTMASTER=y +CONFIG_HID_WACOM=y +CONFIG_HID_WIIMOTE=y +CONFIG_HID_ZEROPLUS=y +CONFIG_HID_ZYDACRON=y +CONFIG_USB_HIDDEV=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_EHSET=y +CONFIG_USB_EHCI_MSM=y +CONFIG_USB_EHCI_MSM_UICC=y +CONFIG_USB_ICE40_HCD=y +CONFIG_USB_ACM=y +CONFIG_USB_CCID_BRIDGE=y +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_KARMA=y +CONFIG_USB_STORAGE_CYPRESS_ATACB=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CSVT=y +CONFIG_USB_EHSET_TEST_FIXTURE=y +CONFIG_USB_PHY=y +CONFIG_USB_OTG_WAKELOCK=y +CONFIG_USB_MSM_SSPHY_QMP=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_CI13XXX_MSM=y +CONFIG_USB_DWC3_MSM=y +CONFIG_USB_G_ANDROID=y +CONFIG_MMC=y +CONFIG_MMC_PERF_PROFILING=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_CLKGATE=y +CONFIG_MMC_PARANOID_SD_INIT=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BLOCK_DEFERRED_RESUME=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_MSM=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_MSM_GPIO_FLASH=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_SWITCH=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_QPNP=y +CONFIG_DMADEVICES=y +CONFIG_QCOM_SPS_DMA=y +CONFIG_UIO=y +CONFIG_UIO_MSM_SHAREDMEM=y +CONFIG_STAGING=y +CONFIG_ANDROID=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ASHMEM=y +CONFIG_ANDROID_TIMED_GPIO=y +CONFIG_ANDROID_LOW_MEMORY_KILLER=y +CONFIG_ANDROID_INTF_ALARM_DEV=y +CONFIG_ONESHOT_SYNC=y +CONFIG_ION=y +CONFIG_ION_MSM=y +CONFIG_ALLOC_BUFFERS_IN_4K_CHUNKS=y +CONFIG_PRONTO_WLAN=y +CONFIG_PRIMA_WLAN_LFR=y +CONFIG_PRIMA_WLAN_OKC=y +CONFIG_PRIMA_WLAN_11AC_HIGH_TP=y +CONFIG_QCOM_TDLS=y +CONFIG_WLAN_FEATURE_11W=y +CONFIG_QCOM_VOWIFI_11R=y +CONFIG_ENABLE_LINUX_REG=y +CONFIG_SPS=y +CONFIG_USB_BAM=y +CONFIG_SPS_SUPPORT_NDP_BAM=y +CONFIG_QPNP_POWER_ON=y +CONFIG_QPNP_VIBRATOR=y +CONFIG_QPNP_REVID=y +CONFIG_MSM_AVTIMER=y +CONFIG_PFT=y +CONFIG_MSM_BUS_SCALING=y +CONFIG_BUS_TOPOLOGY_ADHOC=y +CONFIG_MACH_T86519A1=y +CONFIG_MSM_MDSS_PLL=y +CONFIG_REMOTE_SPINLOCK_MSM=y +CONFIG_MSM_IOMMU_V1=y +CONFIG_PWM=y +CONFIG_PWM_QPNP=y +CONFIG_SENSORS=y +CONFIG_SENSORS_SSC=y +CONFIG_MSM_BAM_DMUX=y +CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y +CONFIG_MSM_QMI_INTERFACE=y +CONFIG_MSM_SMD=y +CONFIG_MSM_RPM_SMD=y +CONFIG_MSM_RPM_LOG=y +CONFIG_MSM_RPM_STATS_LOG=y +CONFIG_MSM_RUN_QUEUE_STATS=y +CONFIG_MSM_SMEM=y +CONFIG_MSM_SMEM_LOGGING=y +CONFIG_MSM_SMP2P=y +CONFIG_MSM_SMP2P_TEST=y +# CONFIG_MSM_DMA_TEST is not set +CONFIG_MSM_SPM=y +CONFIG_MSM_L2_SPM=y +CONFIG_MSM_ADSP_LOADER=y +CONFIG_MSM_MEMORY_DUMP_V2=y +CONFIG_MSM_COMMON_LOG=y +CONFIG_MSM_WATCHDOG_V2=y +CONFIG_MSM_FORCE_WDOG_BITE_ON_PANIC=y +CONFIG_MSM_SUBSYSTEM_RESTART=y +CONFIG_MSM_SYSMON_COMM=y +CONFIG_MSM_PIL=y +CONFIG_MSM_PIL_SSR_GENERIC=y +CONFIG_MSM_PIL_MSS_QDSP6V5=y +CONFIG_MSM_OCMEM=y +CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y +CONFIG_MSM_SCM=y +CONFIG_MSM_PERFORMANCE=y +CONFIG_MEM_SHARE_QMI_SERVICE=y +CONFIG_MSM_TZ_LOG=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_FUSE_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_PSTORE=y +CONFIG_PSTORE_CONSOLE=y +CONFIG_PSTORE_RAM=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FRAME_POINTER is not set +# CONFIG_RCU_CPU_STALL_VERBOSE is not set +CONFIG_IPC_LOGGING=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_PANIC_ON_DATA_CORRUPTION=y +CONFIG_KEYS=y +CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK=y +CONFIG_LSM_MMAP_MIN_ADDR=4096 +CONFIG_SECURITY_SELINUX=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_CTR=y +CONFIG_CRYPTO_XCBC=y +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_DEV_QCRYPTO=y +CONFIG_CRYPTO_DEV_QCE=y +CONFIG_CRYPTO_DEV_QCEDEV=y +CONFIG_ASYMMETRIC_KEY_TYPE=y +CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y +CONFIG_PUBLIC_KEY_ALGO_RSA=y +CONFIG_X509_CERTIFICATE_PARSER=y +CONFIG_ARM64_CRYPTO=y +CONFIG_CRYPTO_SHA1_ARM64_CE=y +CONFIG_CRYPTO_SHA2_ARM64_CE=y +CONFIG_CRYPTO_GHASH_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE_CCM=y +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y +CONFIG_QMI_ENCDEC=y diff --git a/arch/arm64/configs/lineageos_tomato_defconfig b/arch/arm64/configs/lineageos_tomato_defconfig new file mode 100644 index 00000000000..f0126509365 --- /dev/null +++ b/arch/arm64/configs/lineageos_tomato_defconfig @@ -0,0 +1,659 @@ +CONFIG_LOCALVERSION="-lineageos" +CONFIG_AUDIT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_IKCONFIG=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_SCHED_HMP=y +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_PID_NS is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_PANIC_TIMEOUT=5 +CONFIG_KALLSYMS_ALL=y +# CONFIG_PCI_QUIRKS is not set +CONFIG_EMBEDDED=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_PROFILING=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PARTITION_ADVANCED=y +# CONFIG_IOSCHED_TEST is not set +CONFIG_IOSCHED_BFQ=y +CONFIG_CGROUP_BFQIO=y +CONFIG_DEFAULT_NOOP=y +CONFIG_ARCH_MSM=y +CONFIG_ARCH_MSM8916=y +CONFIG_SMP=y +CONFIG_SCHED_MC=y +CONFIG_PREEMPT=y +CONFIG_ARMV7_COMPAT=y +CONFIG_BALANCE_ANON_FILE_RECLAIM=y +CONFIG_PROCESS_RECLAIM=y +CONFIG_ZSMALLOC=y +CONFIG_SECCOMP=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_COMPAT=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=0 +# CONFIG_PM_WAKELOCKS_GC is not set +CONFIG_PM_RUNTIME=y +CONFIG_SUSPEND_TIME=y +CONFIG_CPU_FREQ=y +CONFIG_SCHED_FREQ_INPUT=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_BOOST=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_INET_AH=y +CONFIG_INET_ESP=y +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +CONFIG_IPV6=y +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=y +CONFIG_INET6_ESP=y +CONFIG_INET6_IPCOMP=y +CONFIG_IPV6_MIP6=y +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_NETFILTER=y +CONFIG_NF_CONNTRACK=y +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CT_PROTO_DCCP=y +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y +CONFIG_NF_CONNTRACK_AMANDA=y +CONFIG_NF_CONNTRACK_FTP=y +CONFIG_NF_CONNTRACK_H323=y +CONFIG_NF_CONNTRACK_IRC=y +CONFIG_NF_CONNTRACK_NETBIOS_NS=y +CONFIG_NF_CONNTRACK_PPTP=y +CONFIG_NF_CONNTRACK_SANE=y +CONFIG_NF_CONNTRACK_TFTP=y +CONFIG_NF_CT_NETLINK=y +CONFIG_NETFILTER_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y +CONFIG_NETFILTER_XT_TARGET_CONNMARK=y +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_HARDIDLETIMER=y +CONFIG_NETFILTER_XT_TARGET_LOG=y +CONFIG_NETFILTER_XT_TARGET_MARK=y +CONFIG_NETFILTER_XT_TARGET_NFLOG=y +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y +CONFIG_NETFILTER_XT_TARGET_NOTRACK=y +CONFIG_NETFILTER_XT_TARGET_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_TRACE=y +CONFIG_NETFILTER_XT_TARGET_SECMARK=y +CONFIG_NETFILTER_XT_TARGET_TCPMSS=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=y +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y +CONFIG_NETFILTER_XT_MATCH_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DSCP=y +CONFIG_NETFILTER_XT_MATCH_ESP=y +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y +CONFIG_NETFILTER_XT_MATCH_HELPER=y +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y +CONFIG_NETFILTER_XT_MATCH_LENGTH=y +CONFIG_NETFILTER_XT_MATCH_LIMIT=y +CONFIG_NETFILTER_XT_MATCH_MAC=y +CONFIG_NETFILTER_XT_MATCH_MARK=y +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_POLICY=y +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y +CONFIG_NETFILTER_XT_MATCH_QTAGUID=y +CONFIG_NETFILTER_XT_MATCH_QUOTA=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STATISTIC=y +CONFIG_NETFILTER_XT_MATCH_STRING=y +CONFIG_NETFILTER_XT_MATCH_TIME=y +CONFIG_NETFILTER_XT_MATCH_U32=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=y +CONFIG_IP_NF_MATCH_ECN=y +CONFIG_IP_NF_MATCH_TTL=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_REJECT_SKERR=y +CONFIG_NF_NAT_IPV4=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_RAW=y +CONFIG_IP_NF_SECURITY=y +CONFIG_IP_NF_ARPTABLES=y +CONFIG_IP_NF_ARPFILTER=y +CONFIG_IP_NF_ARP_MANGLE=y +CONFIG_NF_CONNTRACK_IPV6=y +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_FILTER=y +CONFIG_IP6_NF_TARGET_REJECT=y +CONFIG_IP6_NF_TARGET_REJECT_SKERR=y +CONFIG_IP6_NF_MANGLE=y +CONFIG_IP6_NF_RAW=y +CONFIG_BRIDGE_NF_EBTABLES=y +CONFIG_BRIDGE_EBT_BROUTE=y +CONFIG_L2TP=y +CONFIG_BRIDGE=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_HTB=y +CONFIG_NET_SCH_PRIO=y +CONFIG_NET_CLS_FW=y +CONFIG_NET_CLS_U32=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_FLOW=y +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=y +CONFIG_NET_EMATCH_NBYTE=y +CONFIG_NET_EMATCH_U32=y +CONFIG_NET_EMATCH_META=y +CONFIG_NET_EMATCH_TEXT=y +CONFIG_NET_CLS_ACT=y +CONFIG_RMNET_DATA=y +CONFIG_RMNET_DATA_FC=y +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y +CONFIG_MSM_BT_POWER=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_RFKILL=y +CONFIG_NFC_QNCI=y +CONFIG_IPC_ROUTER=y +CONFIG_IPC_ROUTER_SECURITY=y +CONFIG_CMA=y +CONFIG_ZRAM=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_UID_STAT=y +CONFIG_QSEECOM=y +CONFIG_UID_CPUTIME=y +CONFIG_SCSI=y +CONFIG_SCSI_TGT=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_CRYPT=y +CONFIG_DM_REQ_CRYPT=y +CONFIG_DM_UEVENT=y +CONFIG_DM_VERITY=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +CONFIG_TUN=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_ALTEON is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_ATHEROS is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_CISCO is not set +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +# CONFIG_NET_VENDOR_EXAR is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +CONFIG_MSM_RMNET_BAM=y +# CONFIG_NET_VENDOR_MYRI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NVIDIA is not set +# CONFIG_NET_VENDOR_OKI is not set +# CONFIG_NET_PACKET_ENGINE is not set +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_REALTEK is not set +# CONFIG_NET_VENDOR_RDC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PPP=y +CONFIG_PPP_BSDCOMP=y +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=y +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=y +CONFIG_PPPOL2TP=y +CONFIG_PPPOLAC=y +CONFIG_PPPOPNS=y +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +CONFIG_SLIP=y +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_DM9601=y +CONFIG_WCNSS_CORE=y +CONFIG_WCNSS_CORE_PRONTO=y +CONFIG_WCNSS_MEM_PRE_ALLOC=y +CONFIG_WCNSS_REGISTER_DUMP_ON_BITE=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_KEYRESET=y +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_XPAD=y +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_INPUT_TABLET=y +CONFIG_TABLET_USB_ACECAD=y +CONFIG_TABLET_USB_AIPTEK=y +CONFIG_TABLET_USB_GTCO=y +CONFIG_TABLET_USB_HANWANG=y +CONFIG_TABLET_USB_KBTAB=y +CONFIG_TABLET_USB_WACOM=y +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_v21 is not set +CONFIG_TOUCHSCREEN_GT9XX_YL=y +CONFIG_TOUCHSCREEN_GT9XX_YL_COVER_WINDOW_SIZE=y +CONFIG_TOUCHSCREEN_GT9XX_YL_COVER_WINDOW_CFG=y +CONFIG_TOUCHSCREEN_GT9XX_YL_TW_GLOVE_SWITCH=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_KEYCHORD=y +CONFIG_INPUT_UINPUT=y +CONFIG_INPUT_GPIO=y +CONFIG_SENSORS_MPU6880=y +CONFIG_SENSORS_PA12200001=y +CONFIG_SENSORS_YL_HALL=y +CONFIG_SENSORS_YL_PARAMS=y +# CONFIG_SERIO_I8042 is not set +# CONFIG_VT is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVMEM is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_MSM_SMD=y +CONFIG_DIAG_CHAR=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_MSM=y +CONFIG_MSM_SMD_PKT=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MSM_V2=y +CONFIG_SLIMBUS_MSM_NGD=y +CONFIG_SOUNDWIRE=y +CONFIG_SPI=y +CONFIG_SPI_QUP=y +CONFIG_SPI_SPIDEV=y +CONFIG_SPMI=y +CONFIG_SPMI_MSM_PMIC_ARB=y +CONFIG_MSM_QPNP_INT=y +CONFIG_USE_PINCTRL_IRQ=y +CONFIG_PINCTRL_MSM_TLMM=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_QPNP_PIN=y +CONFIG_BATTERY_BCL=y +CONFIG_YL_PM8916_VBUS=y +CONFIG_YL_BQ24157_CHARGER=y +CONFIG_YL_FAN5405_CHARGER=y +CONFIG_YL_LC709203_FUELGAUGE=y +CONFIG_PRIORITIZE_LOAD_LC709203=y +CONFIG_YL_CHARGE_MODE=y +CONFIG_POWER_RESET_MSM=y +CONFIG_MSM_PRESERVE_MEM=y +CONFIG_MSM_PM=y +CONFIG_SENSORS_QPNP_ADC_VOLTAGE=y +CONFIG_SENSORS_QPNP_ADC_CURRENT=y +CONFIG_SENSORS_QPNP_CURRENT_MONITOR=y +CONFIG_THERMAL=y +CONFIG_THERMAL_TSENS8974=y +CONFIG_THERMAL_MONITOR=y +CONFIG_THERMAL_QPNP=y +CONFIG_THERMAL_QPNP_ADC_TM=y +CONFIG_WCD9335_CODEC=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_PROXY_CONSUMER=y +CONFIG_REGULATOR_FAN53555=y +CONFIG_REGULATOR_MEM_ACC=y +CONFIG_REGULATOR_ONSEMI_NCP6335D=y +CONFIG_REGULATOR_TPS65132=y +CONFIG_REGULATOR_TPS65132_YL=y +CONFIG_REGULATOR_STUB=y +CONFIG_REGULATOR_RPM_SMD=y +CONFIG_REGULATOR_QPNP=y +CONFIG_REGULATOR_SPM=y +CONFIG_REGULATOR_CPR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_VIDEOBUF2_MSM_MEM=y +CONFIG_V4L_PLATFORM_DRIVERS=y +# CONFIG_OABI_COMPAT is not set +CONFIG_MSMB_CAMERA=y +CONFIG_MSM_CAMERA_SENSOR=y +CONFIG_MSM_CPP=y +CONFIG_MSM_CCI=y +CONFIG_MSM_CSI30_HEADER=y +CONFIG_MSM_CSIPHY=y +CONFIG_MSM_CSID=y +CONFIG_MSM_EEPROM=y +CONFIG_MSM_ISPIF=y +CONFIG_MSMB_JPEG=y +CONFIG_MSM_VIDC_V4L2=y +CONFIG_RADIO_IRIS=y +CONFIG_RADIO_IRIS_TRANSPORT=y +# CONFIG_VGA_ARB is not set +CONFIG_MSM_KGSL=y +CONFIG_KGSL_PER_PROCESS_PAGE_TABLE=y +CONFIG_FB=y +CONFIG_FB_MSM=y +# CONFIG_FB_MSM_BACKLIGHT is not set +CONFIG_FB_MSM_MDSS=y +CONFIG_FB_MSM_MDSS_WRITEBACK=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_SOUND=y +CONFIG_SND=y +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_PCI is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_USB_AUDIO=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_MSM8X16=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_A4TECH=y +CONFIG_HID_ACRUX=y +CONFIG_HID_ACRUX_FF=y +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +CONFIG_HID_PRODIKEYS=y +CONFIG_HID_CYPRESS=y +CONFIG_HID_DRAGONRISE=y +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EMS_FF=y +CONFIG_HID_ELECOM=y +CONFIG_HID_EZKEY=y +CONFIG_HID_FIIO=y +CONFIG_HID_HOLTEK=y +CONFIG_HID_KEYTOUCH=y +CONFIG_HID_KYE=y +CONFIG_HID_UCLOGIC=y +CONFIG_HID_WALTOP=y +CONFIG_HID_GYRATION=y +CONFIG_HID_TWINHAN=y +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LCPOWER=y +CONFIG_HID_LOGITECH=y +CONFIG_HID_LOGITECH_DJ=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_HID_MAGICMOUSE=y +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MONTEREY=y +CONFIG_HID_MULTITOUCH=y +CONFIG_HID_NTRIG=y +CONFIG_HID_ORTEK=y +CONFIG_HID_PANTHERLORD=y +CONFIG_PANTHERLORD_FF=y +CONFIG_HID_PETALYNX=y +CONFIG_HID_PICOLCD=y +CONFIG_HID_PRIMAX=y +CONFIG_HID_ROCCAT=y +CONFIG_HID_SAITEK=y +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_HID_SPEEDLINK=y +CONFIG_HID_SUNPLUS=y +CONFIG_HID_GREENASIA=y +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=y +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TIVO=y +CONFIG_HID_TOPSEED=y +CONFIG_HID_THRUSTMASTER=y +CONFIG_HID_WACOM=y +CONFIG_HID_WIIMOTE=y +CONFIG_HID_ZEROPLUS=y +CONFIG_HID_ZYDACRON=y +CONFIG_USB_HIDDEV=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_EHSET=y +CONFIG_USB_EHCI_MSM=y +CONFIG_USB_EHCI_MSM_UICC=y +CONFIG_USB_ICE40_HCD=y +CONFIG_USB_ACM=y +CONFIG_USB_CCID_BRIDGE=y +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_KARMA=y +CONFIG_USB_STORAGE_CYPRESS_ATACB=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CSVT=y +CONFIG_USB_EHSET_TEST_FIXTURE=y +CONFIG_USB_PHY=y +CONFIG_USB_OTG_WAKELOCK=y +CONFIG_USB_MSM_SSPHY_QMP=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_CI13XXX_MSM=y +CONFIG_USB_DWC3_MSM=y +CONFIG_USB_G_ANDROID=y +CONFIG_MMC=y +CONFIG_MMC_PERF_PROFILING=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_CLKGATE=y +CONFIG_MMC_PARANOID_SD_INIT=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BLOCK_DEFERRED_RESUME=y +CONFIG_MMC_YL_PARAMS=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_MSM=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_QPNP=y +CONFIG_LEDS_MSM_GPIO_FLASH=y +CONFIG_LEDS_AW2013=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_SWITCH=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_QPNP=y +CONFIG_DMADEVICES=y +CONFIG_QCOM_SPS_DMA=y +CONFIG_UIO=y +CONFIG_UIO_MSM_SHAREDMEM=y +CONFIG_STAGING=y +CONFIG_ANDROID=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ASHMEM=y +CONFIG_ANDROID_TIMED_GPIO=y +CONFIG_ANDROID_LOW_MEMORY_KILLER=y +CONFIG_ANDROID_INTF_ALARM_DEV=y +CONFIG_ONESHOT_SYNC=y +CONFIG_ION=y +CONFIG_ION_MSM=y +CONFIG_ALLOC_BUFFERS_IN_4K_CHUNKS=y +CONFIG_PRONTO_WLAN=m +CONFIG_PRIMA_WLAN_LFR=y +CONFIG_PRIMA_WLAN_OKC=y +CONFIG_PRIMA_WLAN_11AC_HIGH_TP=y +CONFIG_QCOM_TDLS=y +CONFIG_WLAN_FEATURE_11W=y +CONFIG_QCOM_VOWIFI_11R=y +CONFIG_ENABLE_LINUX_REG=y +CONFIG_SPS=y +CONFIG_SPS_SUPPORT_NDP_BAM=y +CONFIG_QPNP_POWER_ON=y +CONFIG_QPNP_VIBRATOR=y +CONFIG_QPNP_REVID=y +CONFIG_QPNP_COINCELL=y +CONFIG_MSM_AVTIMER=y +CONFIG_PFT=y +CONFIG_MSM_BUS_SCALING=y +CONFIG_BUS_TOPOLOGY_ADHOC=y +CONFIG_MACH_CP8675=y +CONFIG_YL_POWEROFF_ALARM=y +CONFIG_MSM_MDSS_PLL=y +CONFIG_REMOTE_SPINLOCK_MSM=y +CONFIG_MSM_IOMMU_V1=y +CONFIG_PWM=y +CONFIG_PWM_QPNP=y +CONFIG_SENSORS=y +CONFIG_SENSORS_SSC=y +CONFIG_MSM_BAM_DMUX=y +CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y +CONFIG_MSM_QMI_INTERFACE=y +CONFIG_MSM_SMD=y +CONFIG_MSM_RPM_SMD=y +CONFIG_MSM_RPM_LOG=y +CONFIG_MSM_RPM_STATS_LOG=y +CONFIG_MSM_RUN_QUEUE_STATS=y +CONFIG_MSM_SMEM=y +CONFIG_MSM_SMEM_LOGGING=y +CONFIG_MSM_SMP2P=y +CONFIG_MSM_SMP2P_TEST=y +# CONFIG_MSM_DMA_TEST is not set +CONFIG_MSM_SPM=y +CONFIG_MSM_L2_SPM=y +CONFIG_MSM_ADSP_LOADER=y +CONFIG_MSM_MEMORY_DUMP_V2=y +CONFIG_MSM_COMMON_LOG=y +CONFIG_MSM_WATCHDOG_V2=y +CONFIG_MSM_FORCE_WDOG_BITE_ON_PANIC=y +CONFIG_MSM_SUBSYSTEM_RESTART=y +CONFIG_MSM_SYSMON_COMM=y +CONFIG_MSM_PIL=y +CONFIG_MSM_PIL_SSR_GENERIC=y +CONFIG_MSM_PIL_MSS_QDSP6V5=y +CONFIG_MSM_OCMEM=y +CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y +CONFIG_MSM_SCM=y +CONFIG_MSM_CORE_CTL_HELPER=y +CONFIG_MSM_PERFORMANCE=y +CONFIG_MEM_SHARE_QMI_SERVICE=y +CONFIG_MSM_TZ_LOG=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_FUSE_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_PSTORE=y +CONFIG_PSTORE_CONSOLE=y +CONFIG_PSTORE_RAM=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FRAME_POINTER is not set +# CONFIG_RCU_CPU_STALL_VERBOSE is not set +CONFIG_IPC_LOGGING=y +CONFIG_PANIC_ON_DATA_CORRUPTION=y +CONFIG_KEYS=y +CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK=y +CONFIG_LSM_MMAP_MIN_ADDR=4096 +CONFIG_SECURITY_SELINUX=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_CTR=y +CONFIG_CRYPTO_XCBC=y +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_ANSI_CPRNG=y +CONFIG_CRYPTO_DEV_QCRYPTO=y +CONFIG_CRYPTO_DEV_QCE=y +CONFIG_CRYPTO_DEV_QCEDEV=y +CONFIG_ASYMMETRIC_KEY_TYPE=y +CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y +CONFIG_PUBLIC_KEY_ALGO_RSA=y +CONFIG_X509_CERTIFICATE_PARSER=y +CONFIG_ARM64_CRYPTO=y +CONFIG_CRYPTO_SHA1_ARM64_CE=y +CONFIG_CRYPTO_SHA2_ARM64_CE=y +CONFIG_CRYPTO_GHASH_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE_CCM=y +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y +CONFIG_QMI_ENCDEC=y diff --git a/arch/arm64/configs/msm-perf_defconfig b/arch/arm64/configs/msm-perf_defconfig index 5b6e5bc61bc..301c21f63d1 100644 --- a/arch/arm64/configs/msm-perf_defconfig +++ b/arch/arm64/configs/msm-perf_defconfig @@ -487,6 +487,10 @@ CONFIG_MSM_SCM=y CONFIG_MSM_CORE_CTL_HELPER=y CONFIG_MSM_PERFORMANCE=y CONFIG_MEM_SHARE_QMI_SERVICE=y +<<<<<<< HEAD +======= +CONFIG_MSM_TZ_LOG=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT3_FS=y @@ -510,6 +514,10 @@ CONFIG_TIMER_STATS=y CONFIG_DEBUG_INFO=y CONFIG_IPC_LOGGING=y CONFIG_KEYS=y +<<<<<<< HEAD +======= +CONFIG_DEBUG_SET_MODULE_RONX=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y CONFIG_LSM_MMAP_MIN_ADDR=4096 diff --git a/arch/arm64/configs/msm_defconfig b/arch/arm64/configs/msm_defconfig index 784e6f855c7..3699ba0fed6 100644 --- a/arch/arm64/configs/msm_defconfig +++ b/arch/arm64/configs/msm_defconfig @@ -260,6 +260,7 @@ CONFIG_INPUT_EVBUG=m CONFIG_KEYBOARD_GPIO=y # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y +<<<<<<< HEAD #CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21=y #CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV_v21=y #CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v21=y @@ -272,6 +273,19 @@ CONFIG_INPUT_TOUCHSCREEN=y #CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y #CONFIG_TOUCHSCREEN_BU21150=y CONFIG_TOUCHSCREEN_MELFAS_MMS449=y +======= +CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21=y +CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV_v21=y +CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v21=y +CONFIG_TOUCHSCREEN_ATMEL_MXT=y +CONFIG_TOUCHSCREEN_FT5X06=y +CONFIG_TOUCHSCREEN_MSTAR21XX=y +CONFIG_TOUCHSCREEN_GEN_VKEYS=y +CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=y +CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI4_DEV=y +CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y +CONFIG_TOUCHSCREEN_BU21150=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_INPUT_MT_WRAPPER=y CONFIG_INPUT_MISC=y CONFIG_INPUT_HBTP_INPUT=y @@ -559,6 +573,10 @@ CONFIG_MSM_RTB_SEPARATE_CPUS=y CONFIG_IPC_LOGGING=y CONFIG_DYNAMIC_DEBUG=y CONFIG_PANIC_ON_DATA_CORRUPTION=y +<<<<<<< HEAD +======= +CONFIG_DEBUG_SET_MODULE_RONX=y +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index 7952914c8fd..aa34e5e200c 100644 --- a/arch/arm64/kernel/perf_event.c +++ b/arch/arm64/kernel/perf_event.c @@ -357,22 +357,44 @@ armpmu_add(struct perf_event *event, int flags) } static int +<<<<<<< HEAD validate_event(struct pmu_hw_events *hw_events, struct perf_event *event) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); +======= +validate_event(struct pmu *pmu, struct pmu_hw_events *hw_events, + struct perf_event *event) +{ + struct arm_pmu *armpmu; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed struct hw_perf_event fake_event = event->hw; struct pmu *leader_pmu = event->group_leader->pmu; if (is_software_event(event)) return 1; +<<<<<<< HEAD +======= + /* + * Reject groups spanning multiple HW PMUs (e.g. CPU + CCI). The + * core perf code won't check that the pmu->ctx == leader->ctx + * until after pmu->event_init(event). + */ + if (event->pmu != pmu) + return 0; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (event->pmu != leader_pmu || event->state < PERF_EVENT_STATE_OFF) return 1; if (event->state == PERF_EVENT_STATE_OFF && !event->attr.enable_on_exec) return 1; +<<<<<<< HEAD +======= + armpmu = to_arm_pmu(event->pmu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return armpmu->get_event_idx(hw_events, &fake_event) >= 0; } @@ -390,6 +412,7 @@ validate_group(struct perf_event *event) memset(fake_used_mask, 0, sizeof(fake_used_mask)); fake_pmu.used_mask = fake_used_mask; +<<<<<<< HEAD if (!validate_event(&fake_pmu, leader)) return -EINVAL; @@ -399,6 +422,17 @@ validate_group(struct perf_event *event) } if (!validate_event(&fake_pmu, event)) +======= + if (!validate_event(event->pmu, &fake_pmu, leader)) + return -EINVAL; + + list_for_each_entry(sibling, &leader->sibling_list, group_entry) { + if (!validate_event(event->pmu, &fake_pmu, sibling)) + return -EINVAL; + } + + if (!validate_event(event->pmu, &fake_pmu, event)) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return -EINVAL; return 0; diff --git a/arch/arm64/kernel/sys.c b/arch/arm64/kernel/sys.c index 3fa98ff14f0..f159f38307f 100644 --- a/arch/arm64/kernel/sys.c +++ b/arch/arm64/kernel/sys.c @@ -50,7 +50,11 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len, * The sys_call_table array must be 4K aligned to be accessible from * kernel/entry.S. */ +<<<<<<< HEAD void *sys_call_table[__NR_syscalls] __aligned(4096) = { +======= +void * const sys_call_table[__NR_syscalls] __aligned(4096) = { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed [0 ... __NR_syscalls - 1] = sys_ni_syscall, #include }; diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h index cd29d2f4e4f..dcee05246cd 100644 --- a/arch/s390/include/asm/syscall.h +++ b/arch/s390/include/asm/syscall.h @@ -89,11 +89,18 @@ static inline void syscall_set_arguments(struct task_struct *task, regs->orig_gpr2 = args[0]; } +<<<<<<< HEAD static inline int syscall_get_arch(struct task_struct *task, struct pt_regs *regs) { #ifdef CONFIG_COMPAT if (test_tsk_thread_flag(task, TIF_31BIT)) +======= +static inline int syscall_get_arch(void) +{ +#ifdef CONFIG_COMPAT + if (test_tsk_thread_flag(current, TIF_31BIT)) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return AUDIT_ARCH_S390; #endif return sizeof(long) == 8 ? AUDIT_ARCH_S390X : AUDIT_ARCH_S390; diff --git a/arch/sh/boot/compressed/vmlinux.scr b/arch/sh/boot/compressed/vmlinux.scr new file mode 100644 index 00000000000..862d7480823 --- /dev/null +++ b/arch/sh/boot/compressed/vmlinux.scr @@ -0,0 +1,10 @@ +SECTIONS +{ + .rodata..compressed : { + input_len = .; + LONG(input_data_end - input_data) input_data = .; + *(.data) + output_len = . - 4; + input_data_end = .; + } +} diff --git a/arch/sh/boot/romimage/vmlinux.scr b/arch/sh/boot/romimage/vmlinux.scr new file mode 100644 index 00000000000..590394e2f5f --- /dev/null +++ b/arch/sh/boot/romimage/vmlinux.scr @@ -0,0 +1,8 @@ +SECTIONS +{ + .text : { + zero_page_pos = .; + *(.data) + end_data = .; + } +} diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h index 2e188d68397..37506df4f20 100644 --- a/arch/x86/include/asm/syscall.h +++ b/arch/x86/include/asm/syscall.h @@ -90,8 +90,12 @@ static inline void syscall_set_arguments(struct task_struct *task, memcpy(®s->bx + i, args, n * sizeof(args[0])); } +<<<<<<< HEAD static inline int syscall_get_arch(struct task_struct *task, struct pt_regs *regs) +======= +static inline int syscall_get_arch(void) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed { return AUDIT_ARCH_I386; } @@ -220,8 +224,12 @@ static inline void syscall_set_arguments(struct task_struct *task, } } +<<<<<<< HEAD static inline int syscall_get_arch(struct task_struct *task, struct pt_regs *regs) +======= +static inline int syscall_get_arch(void) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed { #ifdef CONFIG_IA32_EMULATION /* @@ -233,7 +241,11 @@ static inline int syscall_get_arch(struct task_struct *task, * * x32 tasks should be considered AUDIT_ARCH_X86_64. */ +<<<<<<< HEAD if (task_thread_info(task)->status & TS_COMPAT) +======= + if (task_thread_info(current)->status & TS_COMPAT) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return AUDIT_ARCH_I386; #endif /* Both x32 and x86_64 are considered "64-bit". */ diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched index e35a11526fe..1177a20e999 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched @@ -61,6 +61,31 @@ config CFQ_GROUP_IOSCHED ---help--- Enable group IO scheduling in CFQ. +<<<<<<< HEAD +======= + +config IOSCHED_BFQ + tristate "BFQ I/O scheduler" + default n + ---help--- + The BFQ I/O scheduler tries to distribute bandwidth among + all processes according to their weights. + It aims at distributing the bandwidth as desired, independently of + the disk parameters and with any workload. It also tries to + guarantee low latency to interactive and soft real-time + applications. If compiled built-in (saying Y here), BFQ can + be configured to support hierarchical scheduling. + +config CGROUP_BFQIO + bool "BFQ hierarchical scheduling support" + depends on CGROUPS && IOSCHED_BFQ=y + default n + ---help--- + Enable hierarchical scheduling in BFQ, using the cgroups + filesystem interface. The name of the subsystem will be + bfqio. + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed choice prompt "Default I/O scheduler" default DEFAULT_CFQ @@ -84,6 +109,20 @@ choice config DEFAULT_CFQ bool "CFQ" if IOSCHED_CFQ=y +<<<<<<< HEAD +======= + config DEFAULT_BFQ + bool "BFQ" if IOSCHED_BFQ=y + help + Selects BFQ as the default I/O scheduler which will be + used by default for all block devices. + The BFQ I/O scheduler aims at distributing the bandwidth + as desired, independently of the disk parameters and with + any workload. It also tries to guarantee low latency to + interactive and soft real-time applications. + + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed config DEFAULT_NOOP bool "No-op" @@ -94,6 +133,10 @@ config DEFAULT_IOSCHED default "deadline" if DEFAULT_DEADLINE default "row" if DEFAULT_ROW default "cfq" if DEFAULT_CFQ +<<<<<<< HEAD +======= + default "bfq" if DEFAULT_BFQ +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed default "noop" if DEFAULT_NOOP endmenu diff --git a/block/Makefile b/block/Makefile index b5e663709b3..4c03edcf459 100644 --- a/block/Makefile +++ b/block/Makefile @@ -16,6 +16,10 @@ obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o obj-$(CONFIG_IOSCHED_ROW) += row-iosched.o obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o +<<<<<<< HEAD +======= +obj-$(CONFIG_IOSCHED_BFQ) += bfq-iosched.o +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed obj-$(CONFIG_IOSCHED_TEST) += test-iosched.o obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c new file mode 100644 index 00000000000..e4d7b8a96eb --- /dev/null +++ b/block/bfq-cgroup.c @@ -0,0 +1,913 @@ +/* + * BFQ: CGROUPS support. + * + * Based on ideas and code from CFQ: + * Copyright (C) 2003 Jens Axboe + * + * Copyright (C) 2008 Fabio Checconi + * Paolo Valente + * + * Copyright (C) 2010 Paolo Valente + * + * Licensed under the GPL-2 as detailed in the accompanying COPYING.BFQ + * file. + */ + +#ifdef CONFIG_CGROUP_BFQIO + +static DEFINE_MUTEX(bfqio_mutex); + +static bool bfqio_is_removed(struct cgroup *cgroup) +{ + return test_bit(CGRP_REMOVED, &cgroup->flags); +} + +static struct bfqio_cgroup bfqio_root_cgroup = { + .weight = BFQ_DEFAULT_GRP_WEIGHT, + .ioprio = BFQ_DEFAULT_GRP_IOPRIO, + .ioprio_class = BFQ_DEFAULT_GRP_CLASS, +}; + +static inline void bfq_init_entity(struct bfq_entity *entity, + struct bfq_group *bfqg) +{ + entity->weight = entity->new_weight; + entity->orig_weight = entity->new_weight; + entity->ioprio = entity->new_ioprio; + entity->ioprio_class = entity->new_ioprio_class; + entity->parent = bfqg->my_entity; + entity->sched_data = &bfqg->sched_data; +} + +static struct bfqio_cgroup *cgroup_to_bfqio(struct cgroup *cgroup) +{ + return container_of(cgroup_subsys_state(cgroup, bfqio_subsys_id), + struct bfqio_cgroup, css); +} + +/* + * Search the bfq_group for bfqd into the hash table (by now only a list) + * of bgrp. Must be called under rcu_read_lock(). + */ +static struct bfq_group *bfqio_lookup_group(struct bfqio_cgroup *bgrp, + struct bfq_data *bfqd) +{ + struct bfq_group *bfqg; + void *key; + + hlist_for_each_entry_rcu(bfqg, &bgrp->group_data, group_node) { + key = rcu_dereference(bfqg->bfqd); + if (key == bfqd) + return bfqg; + } + + return NULL; +} + +static inline void bfq_group_init_entity(struct bfqio_cgroup *bgrp, + struct bfq_group *bfqg) +{ + struct bfq_entity *entity = &bfqg->entity; + + /* + * If the weight of the entity has never been set via the sysfs + * interface, then bgrp->weight == 0. In this case we initialize + * the weight from the current ioprio value. Otherwise, the group + * weight, if set, has priority over the ioprio value. + */ + if (bgrp->weight == 0) { + entity->new_weight = bfq_ioprio_to_weight(bgrp->ioprio); + entity->new_ioprio = bgrp->ioprio; + } else { + if (bgrp->weight < BFQ_MIN_WEIGHT || + bgrp->weight > BFQ_MAX_WEIGHT) { + printk(KERN_CRIT "bfq_group_init_entity: " + "bgrp->weight %d\n", bgrp->weight); + BUG(); + } + entity->new_weight = bgrp->weight; + entity->new_ioprio = bfq_weight_to_ioprio(bgrp->weight); + } + entity->orig_weight = entity->weight = entity->new_weight; + entity->ioprio = entity->new_ioprio; + entity->ioprio_class = entity->new_ioprio_class = bgrp->ioprio_class; + entity->my_sched_data = &bfqg->sched_data; + bfqg->active_entities = 0; +} + +static inline void bfq_group_set_parent(struct bfq_group *bfqg, + struct bfq_group *parent) +{ + struct bfq_entity *entity; + + BUG_ON(parent == NULL); + BUG_ON(bfqg == NULL); + + entity = &bfqg->entity; + entity->parent = parent->my_entity; + entity->sched_data = &parent->sched_data; +} + +/** + * bfq_group_chain_alloc - allocate a chain of groups. + * @bfqd: queue descriptor. + * @cgroup: the leaf cgroup this chain starts from. + * + * Allocate a chain of groups starting from the one belonging to + * @cgroup up to the root cgroup. Stop if a cgroup on the chain + * to the root has already an allocated group on @bfqd. + */ +static struct bfq_group *bfq_group_chain_alloc(struct bfq_data *bfqd, + struct cgroup *cgroup) +{ + struct bfqio_cgroup *bgrp; + struct bfq_group *bfqg, *prev = NULL, *leaf = NULL; + + for (; cgroup != NULL; cgroup = cgroup->parent) { + bgrp = cgroup_to_bfqio(cgroup); + + bfqg = bfqio_lookup_group(bgrp, bfqd); + if (bfqg != NULL) { + /* + * All the cgroups in the path from there to the + * root must have a bfq_group for bfqd, so we don't + * need any more allocations. + */ + break; + } + + bfqg = kzalloc(sizeof(*bfqg), GFP_ATOMIC); + if (bfqg == NULL) + goto cleanup; + + bfq_group_init_entity(bgrp, bfqg); + bfqg->my_entity = &bfqg->entity; + + if (leaf == NULL) { + leaf = bfqg; + prev = leaf; + } else { + bfq_group_set_parent(prev, bfqg); + /* + * Build a list of allocated nodes using the bfqd + * filed, that is still unused and will be + * initialized only after the node will be + * connected. + */ + prev->bfqd = bfqg; + prev = bfqg; + } + } + + return leaf; + +cleanup: + while (leaf != NULL) { + prev = leaf; + leaf = leaf->bfqd; + kfree(prev); + } + + return NULL; +} + +/** + * bfq_group_chain_link - link an allocated group chain to a cgroup + * hierarchy. + * @bfqd: the queue descriptor. + * @cgroup: the leaf cgroup to start from. + * @leaf: the leaf group (to be associated to @cgroup). + * + * Try to link a chain of groups to a cgroup hierarchy, connecting the + * nodes bottom-up, so we can be sure that when we find a cgroup in the + * hierarchy that already as a group associated to @bfqd all the nodes + * in the path to the root cgroup have one too. + * + * On locking: the queue lock protects the hierarchy (there is a hierarchy + * per device) while the bfqio_cgroup lock protects the list of groups + * belonging to the same cgroup. + */ +static void bfq_group_chain_link(struct bfq_data *bfqd, struct cgroup *cgroup, + struct bfq_group *leaf) +{ + struct bfqio_cgroup *bgrp; + struct bfq_group *bfqg, *next, *prev = NULL; + unsigned long flags; + + assert_spin_locked(bfqd->queue->queue_lock); + + for (; cgroup != NULL && leaf != NULL; cgroup = cgroup->parent) { + bgrp = cgroup_to_bfqio(cgroup); + next = leaf->bfqd; + + bfqg = bfqio_lookup_group(bgrp, bfqd); + BUG_ON(bfqg != NULL); + + spin_lock_irqsave(&bgrp->lock, flags); + + rcu_assign_pointer(leaf->bfqd, bfqd); + hlist_add_head_rcu(&leaf->group_node, &bgrp->group_data); + hlist_add_head(&leaf->bfqd_node, &bfqd->group_list); + + spin_unlock_irqrestore(&bgrp->lock, flags); + + prev = leaf; + leaf = next; + } + + BUG_ON(cgroup == NULL && leaf != NULL); + if (cgroup != NULL && prev != NULL) { + bgrp = cgroup_to_bfqio(cgroup); + bfqg = bfqio_lookup_group(bgrp, bfqd); + bfq_group_set_parent(prev, bfqg); + } +} + +/** + * bfq_find_alloc_group - return the group associated to @bfqd in @cgroup. + * @bfqd: queue descriptor. + * @cgroup: cgroup being searched for. + * + * Return a group associated to @bfqd in @cgroup, allocating one if + * necessary. When a group is returned all the cgroups in the path + * to the root have a group associated to @bfqd. + * + * If the allocation fails, return the root group: this breaks guarantees + * but is a safe fallback. If this loss becomes a problem it can be + * mitigated using the equivalent weight (given by the product of the + * weights of the groups in the path from @group to the root) in the + * root scheduler. + * + * We allocate all the missing nodes in the path from the leaf cgroup + * to the root and we connect the nodes only after all the allocations + * have been successful. + */ +static struct bfq_group *bfq_find_alloc_group(struct bfq_data *bfqd, + struct cgroup *cgroup) +{ + struct bfqio_cgroup *bgrp = cgroup_to_bfqio(cgroup); + struct bfq_group *bfqg; + + bfqg = bfqio_lookup_group(bgrp, bfqd); + if (bfqg != NULL) + return bfqg; + + bfqg = bfq_group_chain_alloc(bfqd, cgroup); + if (bfqg != NULL) + bfq_group_chain_link(bfqd, cgroup, bfqg); + else + bfqg = bfqd->root_group; + + return bfqg; +} + +/** + * bfq_bfqq_move - migrate @bfqq to @bfqg. + * @bfqd: queue descriptor. + * @bfqq: the queue to move. + * @entity: @bfqq's entity. + * @bfqg: the group to move to. + * + * Move @bfqq to @bfqg, deactivating it from its old group and reactivating + * it on the new one. Avoid putting the entity on the old group idle tree. + * + * Must be called under the queue lock; the cgroup owning @bfqg must + * not disappear (by now this just means that we are called under + * rcu_read_lock()). + */ +static void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq, + struct bfq_entity *entity, struct bfq_group *bfqg) +{ + int busy, resume; + + busy = bfq_bfqq_busy(bfqq); + resume = !RB_EMPTY_ROOT(&bfqq->sort_list); + + BUG_ON(resume && !entity->on_st); + BUG_ON(busy && !resume && entity->on_st && + bfqq != bfqd->in_service_queue); + + if (busy) { + BUG_ON(atomic_read(&bfqq->ref) < 2); + + if (!resume) + bfq_del_bfqq_busy(bfqd, bfqq, 0); + else + bfq_deactivate_bfqq(bfqd, bfqq, 0); + } else if (entity->on_st) + bfq_put_idle_entity(bfq_entity_service_tree(entity), entity); + + /* + * Here we use a reference to bfqg. We don't need a refcounter + * as the cgroup reference will not be dropped, so that its + * destroy() callback will not be invoked. + */ + entity->parent = bfqg->my_entity; + entity->sched_data = &bfqg->sched_data; + + if (busy && resume) + bfq_activate_bfqq(bfqd, bfqq); + + if (bfqd->in_service_queue == NULL && !bfqd->rq_in_driver) + bfq_schedule_dispatch(bfqd); +} + +/** + * __bfq_bic_change_cgroup - move @bic to @cgroup. + * @bfqd: the queue descriptor. + * @bic: the bic to move. + * @cgroup: the cgroup to move to. + * + * Move bic to cgroup, assuming that bfqd->queue is locked; the caller + * has to make sure that the reference to cgroup is valid across the call. + * + * NOTE: an alternative approach might have been to store the current + * cgroup in bfqq and getting a reference to it, reducing the lookup + * time here, at the price of slightly more complex code. + */ +static struct bfq_group *__bfq_bic_change_cgroup(struct bfq_data *bfqd, + struct bfq_io_cq *bic, + struct cgroup *cgroup) +{ + struct bfq_queue *async_bfqq = bic_to_bfqq(bic, 0); + struct bfq_queue *sync_bfqq = bic_to_bfqq(bic, 1); + struct bfq_entity *entity; + struct bfq_group *bfqg; + struct bfqio_cgroup *bgrp; + + bgrp = cgroup_to_bfqio(cgroup); + + bfqg = bfq_find_alloc_group(bfqd, cgroup); + if (async_bfqq != NULL) { + entity = &async_bfqq->entity; + + if (entity->sched_data != &bfqg->sched_data) { + bic_set_bfqq(bic, NULL, 0); + bfq_log_bfqq(bfqd, async_bfqq, + "bic_change_group: %p %d", + async_bfqq, atomic_read(&async_bfqq->ref)); + bfq_put_queue(async_bfqq); + } + } + + if (sync_bfqq != NULL) { + entity = &sync_bfqq->entity; + if (entity->sched_data != &bfqg->sched_data) + bfq_bfqq_move(bfqd, sync_bfqq, entity, bfqg); + } + + return bfqg; +} + +/** + * bfq_bic_change_cgroup - move @bic to @cgroup. + * @bic: the bic being migrated. + * @cgroup: the destination cgroup. + * + * When the task owning @bic is moved to @cgroup, @bic is immediately + * moved into its new parent group. + */ +static void bfq_bic_change_cgroup(struct bfq_io_cq *bic, + struct cgroup *cgroup) +{ + struct bfq_data *bfqd; + unsigned long uninitialized_var(flags); + + bfqd = bfq_get_bfqd_locked(&(bic->icq.q->elevator->elevator_data), + &flags); + if (bfqd != NULL) { + __bfq_bic_change_cgroup(bfqd, bic, cgroup); + bfq_put_bfqd_unlock(bfqd, &flags); + } +} + +/** + * bfq_bic_update_cgroup - update the cgroup of @bic. + * @bic: the @bic to update. + * + * Make sure that @bic is enqueued in the cgroup of the current task. + * We need this in addition to moving bics during the cgroup attach + * phase because the task owning @bic could be at its first disk + * access or we may end up in the root cgroup as the result of a + * memory allocation failure and here we try to move to the right + * group. + * + * Must be called under the queue lock. It is safe to use the returned + * value even after the rcu_read_unlock() as the migration/destruction + * paths act under the queue lock too. IOW it is impossible to race with + * group migration/destruction and end up with an invalid group as: + * a) here cgroup has not yet been destroyed, nor its destroy callback + * has started execution, as current holds a reference to it, + * b) if it is destroyed after rcu_read_unlock() [after current is + * migrated to a different cgroup] its attach() callback will have + * taken care of remove all the references to the old cgroup data. + */ +static struct bfq_group *bfq_bic_update_cgroup(struct bfq_io_cq *bic) +{ + struct bfq_data *bfqd = bic_to_bfqd(bic); + struct bfq_group *bfqg; + struct cgroup *cgroup; + + BUG_ON(bfqd == NULL); + + rcu_read_lock(); + cgroup = task_cgroup(current, bfqio_subsys_id); + bfqg = __bfq_bic_change_cgroup(bfqd, bic, cgroup); + rcu_read_unlock(); + + return bfqg; +} + +/** + * bfq_flush_idle_tree - deactivate any entity on the idle tree of @st. + * @st: the service tree being flushed. + */ +static inline void bfq_flush_idle_tree(struct bfq_service_tree *st) +{ + struct bfq_entity *entity = st->first_idle; + + for (; entity != NULL; entity = st->first_idle) + __bfq_deactivate_entity(entity, 0); +} + +/** + * bfq_reparent_leaf_entity - move leaf entity to the root_group. + * @bfqd: the device data structure with the root group. + * @entity: the entity to move. + */ +static inline void bfq_reparent_leaf_entity(struct bfq_data *bfqd, + struct bfq_entity *entity) +{ + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); + + BUG_ON(bfqq == NULL); + bfq_bfqq_move(bfqd, bfqq, entity, bfqd->root_group); + return; +} + +/** + * bfq_reparent_active_entities - move to the root group all active + * entities. + * @bfqd: the device data structure with the root group. + * @bfqg: the group to move from. + * @st: the service tree with the entities. + * + * Needs queue_lock to be taken and reference to be valid over the call. + */ +static inline void bfq_reparent_active_entities(struct bfq_data *bfqd, + struct bfq_group *bfqg, + struct bfq_service_tree *st) +{ + struct rb_root *active = &st->active; + struct bfq_entity *entity = NULL; + + if (!RB_EMPTY_ROOT(&st->active)) + entity = bfq_entity_of(rb_first(active)); + + for (; entity != NULL; entity = bfq_entity_of(rb_first(active))) + bfq_reparent_leaf_entity(bfqd, entity); + + if (bfqg->sched_data.in_service_entity != NULL) + bfq_reparent_leaf_entity(bfqd, + bfqg->sched_data.in_service_entity); + + return; +} + +/** + * bfq_destroy_group - destroy @bfqg. + * @bgrp: the bfqio_cgroup containing @bfqg. + * @bfqg: the group being destroyed. + * + * Destroy @bfqg, making sure that it is not referenced from its parent. + */ +static void bfq_destroy_group(struct bfqio_cgroup *bgrp, struct bfq_group *bfqg) +{ + struct bfq_data *bfqd; + struct bfq_service_tree *st; + struct bfq_entity *entity = bfqg->my_entity; + unsigned long uninitialized_var(flags); + int i; + + hlist_del(&bfqg->group_node); + + /* + * Empty all service_trees belonging to this group before + * deactivating the group itself. + */ + for (i = 0; i < BFQ_IOPRIO_CLASSES; i++) { + st = bfqg->sched_data.service_tree + i; + + /* + * The idle tree may still contain bfq_queues belonging + * to exited task because they never migrated to a different + * cgroup from the one being destroyed now. No one else + * can access them so it's safe to act without any lock. + */ + bfq_flush_idle_tree(st); + + /* + * It may happen that some queues are still active + * (busy) upon group destruction (if the corresponding + * processes have been forced to terminate). We move + * all the leaf entities corresponding to these queues + * to the root_group. + * Also, it may happen that the group has an entity + * in service, which is disconnected from the active + * tree: it must be moved, too. + * There is no need to put the sync queues, as the + * scheduler has taken no reference. + */ + bfqd = bfq_get_bfqd_locked(&bfqg->bfqd, &flags); + if (bfqd != NULL) { + bfq_reparent_active_entities(bfqd, bfqg, st); + bfq_put_bfqd_unlock(bfqd, &flags); + } + BUG_ON(!RB_EMPTY_ROOT(&st->active)); + BUG_ON(!RB_EMPTY_ROOT(&st->idle)); + } + BUG_ON(bfqg->sched_data.next_in_service != NULL); + BUG_ON(bfqg->sched_data.in_service_entity != NULL); + + /* + * We may race with device destruction, take extra care when + * dereferencing bfqg->bfqd. + */ + bfqd = bfq_get_bfqd_locked(&bfqg->bfqd, &flags); + if (bfqd != NULL) { + hlist_del(&bfqg->bfqd_node); + __bfq_deactivate_entity(entity, 0); + bfq_put_async_queues(bfqd, bfqg); + bfq_put_bfqd_unlock(bfqd, &flags); + } + BUG_ON(entity->tree != NULL); + + /* + * No need to defer the kfree() to the end of the RCU grace + * period: we are called from the destroy() callback of our + * cgroup, so we can be sure that no one is a) still using + * this cgroup or b) doing lookups in it. + */ + kfree(bfqg); +} + +static void bfq_end_wr_async(struct bfq_data *bfqd) +{ + struct hlist_node *tmp; + struct bfq_group *bfqg; + + hlist_for_each_entry_safe(bfqg, tmp, &bfqd->group_list, bfqd_node) + bfq_end_wr_async_queues(bfqd, bfqg); + bfq_end_wr_async_queues(bfqd, bfqd->root_group); +} + +/** + * bfq_disconnect_groups - disconnect @bfqd from all its groups. + * @bfqd: the device descriptor being exited. + * + * When the device exits we just make sure that no lookup can return + * the now unused group structures. They will be deallocated on cgroup + * destruction. + */ +static void bfq_disconnect_groups(struct bfq_data *bfqd) +{ + struct hlist_node *tmp; + struct bfq_group *bfqg; + + bfq_log(bfqd, "disconnect_groups beginning"); + hlist_for_each_entry_safe(bfqg, tmp, &bfqd->group_list, bfqd_node) { + hlist_del(&bfqg->bfqd_node); + + __bfq_deactivate_entity(bfqg->my_entity, 0); + + /* + * Don't remove from the group hash, just set an + * invalid key. No lookups can race with the + * assignment as bfqd is being destroyed; this + * implies also that new elements cannot be added + * to the list. + */ + rcu_assign_pointer(bfqg->bfqd, NULL); + + bfq_log(bfqd, "disconnect_groups: put async for group %p", + bfqg); + bfq_put_async_queues(bfqd, bfqg); + } +} + +static inline void bfq_free_root_group(struct bfq_data *bfqd) +{ + struct bfqio_cgroup *bgrp = &bfqio_root_cgroup; + struct bfq_group *bfqg = bfqd->root_group; + + bfq_put_async_queues(bfqd, bfqg); + + spin_lock_irq(&bgrp->lock); + hlist_del_rcu(&bfqg->group_node); + spin_unlock_irq(&bgrp->lock); + + /* + * No need to synchronize_rcu() here: since the device is gone + * there cannot be any read-side access to its root_group. + */ + kfree(bfqg); +} + +static struct bfq_group *bfq_alloc_root_group(struct bfq_data *bfqd, int node) +{ + struct bfq_group *bfqg; + struct bfqio_cgroup *bgrp; + int i; + + bfqg = kzalloc_node(sizeof(*bfqg), GFP_KERNEL, node); + if (bfqg == NULL) + return NULL; + + bfqg->entity.parent = NULL; + for (i = 0; i < BFQ_IOPRIO_CLASSES; i++) + bfqg->sched_data.service_tree[i] = BFQ_SERVICE_TREE_INIT; + + bgrp = &bfqio_root_cgroup; + spin_lock_irq(&bgrp->lock); + rcu_assign_pointer(bfqg->bfqd, bfqd); + hlist_add_head_rcu(&bfqg->group_node, &bgrp->group_data); + spin_unlock_irq(&bgrp->lock); + + return bfqg; +} + +#define SHOW_FUNCTION(__VAR) \ +static u64 bfqio_cgroup_##__VAR##_read(struct cgroup *cgroup, \ + struct cftype *cftype) \ +{ \ + struct bfqio_cgroup *bgrp; \ + u64 ret = -ENODEV; \ + \ + mutex_lock(&bfqio_mutex); \ + if (bfqio_is_removed(cgroup)) \ + goto out_unlock; \ + \ + bgrp = cgroup_to_bfqio(cgroup); \ + spin_lock_irq(&bgrp->lock); \ + ret = bgrp->__VAR; \ + spin_unlock_irq(&bgrp->lock); \ + \ +out_unlock: \ + mutex_unlock(&bfqio_mutex); \ + return ret; \ +} + +SHOW_FUNCTION(weight); +SHOW_FUNCTION(ioprio); +SHOW_FUNCTION(ioprio_class); +#undef SHOW_FUNCTION + +#define STORE_FUNCTION(__VAR, __MIN, __MAX) \ +static int bfqio_cgroup_##__VAR##_write(struct cgroup *cgroup, \ + struct cftype *cftype, \ + u64 val) \ +{ \ + struct bfqio_cgroup *bgrp; \ + struct bfq_group *bfqg; \ + int ret = -EINVAL; \ + \ + if (val < (__MIN) || val > (__MAX)) \ + return ret; \ + \ + ret = -ENODEV; \ + mutex_lock(&bfqio_mutex); \ + if (bfqio_is_removed(cgroup)) \ + goto out_unlock; \ + ret = 0; \ + \ + bgrp = cgroup_to_bfqio(cgroup); \ + \ + spin_lock_irq(&bgrp->lock); \ + bgrp->__VAR = (unsigned short)val; \ + hlist_for_each_entry(bfqg, &bgrp->group_data, group_node) { \ + /* \ + * Setting the ioprio_changed flag of the entity \ + * to 1 with new_##__VAR == ##__VAR would re-set \ + * the value of the weight to its ioprio mapping. \ + * Set the flag only if necessary. \ + */ \ + if ((unsigned short)val != bfqg->entity.new_##__VAR) { \ + bfqg->entity.new_##__VAR = (unsigned short)val; \ + /* \ + * Make sure that the above new value has been \ + * stored in bfqg->entity.new_##__VAR before \ + * setting the ioprio_changed flag. In fact, \ + * this flag may be read asynchronously (in \ + * critical sections protected by a different \ + * lock than that held here), and finding this \ + * flag set may cause the execution of the code \ + * for updating parameters whose value may \ + * depend also on bfqg->entity.new_##__VAR (in \ + * __bfq_entity_update_weight_prio). \ + * This barrier makes sure that the new value \ + * of bfqg->entity.new_##__VAR is correctly \ + * seen in that code. \ + */ \ + smp_wmb(); \ + bfqg->entity.ioprio_changed = 1; \ + } \ + } \ + spin_unlock_irq(&bgrp->lock); \ + \ +out_unlock: \ + mutex_unlock(&bfqio_mutex); \ + return ret; \ +} + +STORE_FUNCTION(weight, BFQ_MIN_WEIGHT, BFQ_MAX_WEIGHT); +STORE_FUNCTION(ioprio, 0, IOPRIO_BE_NR - 1); +STORE_FUNCTION(ioprio_class, IOPRIO_CLASS_RT, IOPRIO_CLASS_IDLE); +#undef STORE_FUNCTION + +static struct cftype bfqio_files[] = { + { + .name = "weight", + .read_u64 = bfqio_cgroup_weight_read, + .write_u64 = bfqio_cgroup_weight_write, + }, + { + .name = "ioprio", + .read_u64 = bfqio_cgroup_ioprio_read, + .write_u64 = bfqio_cgroup_ioprio_write, + }, + { + .name = "ioprio_class", + .read_u64 = bfqio_cgroup_ioprio_class_read, + .write_u64 = bfqio_cgroup_ioprio_class_write, + }, + { }, /* terminate */ +}; + +static struct cgroup_subsys_state *bfqio_create(struct cgroup *cgroup) +{ + struct bfqio_cgroup *bgrp; + + if (cgroup->parent != NULL) { + bgrp = kzalloc(sizeof(*bgrp), GFP_KERNEL); + if (bgrp == NULL) + return ERR_PTR(-ENOMEM); + } else + bgrp = &bfqio_root_cgroup; + + spin_lock_init(&bgrp->lock); + INIT_HLIST_HEAD(&bgrp->group_data); + bgrp->ioprio = BFQ_DEFAULT_GRP_IOPRIO; + bgrp->ioprio_class = BFQ_DEFAULT_GRP_CLASS; + + return &bgrp->css; +} + +/* + * We cannot support shared io contexts, as we have no means to support + * two tasks with the same ioc in two different groups without major rework + * of the main bic/bfqq data structures. By now we allow a task to change + * its cgroup only if it's the only owner of its ioc; the drawback of this + * behavior is that a group containing a task that forked using CLONE_IO + * will not be destroyed until the tasks sharing the ioc die. + */ +static int bfqio_can_attach(struct cgroup *cgroup, struct cgroup_taskset *tset) +{ + struct task_struct *task; + struct io_context *ioc; + int ret = 0; + + cgroup_taskset_for_each(task, cgroup, tset) { + /* task_lock() is needed to avoid races with exit_io_context() */ + task_lock(task); + ioc = task->io_context; + if (ioc != NULL && atomic_read(&ioc->nr_tasks) > 1) + /* + * ioc == NULL means that the task is either too + * young or exiting: if it has still no ioc the + * ioc can't be shared, if the task is exiting the + * attach will fail anyway, no matter what we + * return here. + */ + ret = -EINVAL; + task_unlock(task); + if (ret) + break; + } + + return ret; +} + +static void bfqio_attach(struct cgroup *cgroup, struct cgroup_taskset *tset) +{ + struct task_struct *task; + struct io_context *ioc; + struct io_cq *icq; + + /* + * IMPORTANT NOTE: The move of more than one process at a time to a + * new group has not yet been tested. + */ + cgroup_taskset_for_each(task, cgroup, tset) { + ioc = get_task_io_context(task, GFP_ATOMIC, NUMA_NO_NODE); + if (ioc) { + /* + * Handle cgroup change here. + */ + rcu_read_lock(); + hlist_for_each_entry_rcu(icq, &ioc->icq_list, ioc_node) + if (!strncmp( + icq->q->elevator->type->elevator_name, + "bfq", ELV_NAME_MAX)) + bfq_bic_change_cgroup(icq_to_bic(icq), + cgroup); + rcu_read_unlock(); + put_io_context(ioc); + } + } +} + +static void bfqio_destroy(struct cgroup *cgroup) +{ + struct bfqio_cgroup *bgrp = cgroup_to_bfqio(cgroup); + struct hlist_node *tmp; + struct bfq_group *bfqg; + + /* + * Since we are destroying the cgroup, there are no more tasks + * referencing it, and all the RCU grace periods that may have + * referenced it are ended (as the destruction of the parent + * cgroup is RCU-safe); bgrp->group_data will not be accessed by + * anything else and we don't need any synchronization. + */ + hlist_for_each_entry_safe(bfqg, tmp, &bgrp->group_data, group_node) + bfq_destroy_group(bgrp, bfqg); + + BUG_ON(!hlist_empty(&bgrp->group_data)); + + kfree(bgrp); +} + +struct cgroup_subsys bfqio_subsys = { + .name = "bfqio", + .css_alloc = bfqio_create, + .can_attach = bfqio_can_attach, + .attach = bfqio_attach, + .css_free = bfqio_destroy, + .subsys_id = bfqio_subsys_id, + .base_cftypes = bfqio_files, +}; +#else +static inline void bfq_init_entity(struct bfq_entity *entity, + struct bfq_group *bfqg) +{ + entity->weight = entity->new_weight; + entity->orig_weight = entity->new_weight; + entity->ioprio = entity->new_ioprio; + entity->ioprio_class = entity->new_ioprio_class; + entity->sched_data = &bfqg->sched_data; +} + +static inline struct bfq_group * +bfq_bic_update_cgroup(struct bfq_io_cq *bic) +{ + struct bfq_data *bfqd = bic_to_bfqd(bic); + return bfqd->root_group; +} + +static inline void bfq_bfqq_move(struct bfq_data *bfqd, + struct bfq_queue *bfqq, + struct bfq_entity *entity, + struct bfq_group *bfqg) +{ +} + +static void bfq_end_wr_async(struct bfq_data *bfqd) +{ + bfq_end_wr_async_queues(bfqd, bfqd->root_group); +} + +static inline void bfq_disconnect_groups(struct bfq_data *bfqd) +{ + bfq_put_async_queues(bfqd, bfqd->root_group); +} + +static inline void bfq_free_root_group(struct bfq_data *bfqd) +{ + kfree(bfqd->root_group); +} + +static struct bfq_group *bfq_alloc_root_group(struct bfq_data *bfqd, int node) +{ + struct bfq_group *bfqg; + int i; + + bfqg = kmalloc_node(sizeof(*bfqg), GFP_KERNEL | __GFP_ZERO, node); + if (bfqg == NULL) + return NULL; + + for (i = 0; i < BFQ_IOPRIO_CLASSES; i++) + bfqg->sched_data.service_tree[i] = BFQ_SERVICE_TREE_INIT; + + return bfqg; +} +#endif diff --git a/block/bfq-ioc.c b/block/bfq-ioc.c new file mode 100644 index 00000000000..7f6b0004ca7 --- /dev/null +++ b/block/bfq-ioc.c @@ -0,0 +1,36 @@ +/* + * BFQ: I/O context handling. + * + * Based on ideas and code from CFQ: + * Copyright (C) 2003 Jens Axboe + * + * Copyright (C) 2008 Fabio Checconi + * Paolo Valente + * + * Copyright (C) 2010 Paolo Valente + */ + +/** + * icq_to_bic - convert iocontext queue structure to bfq_io_cq. + * @icq: the iocontext queue. + */ +static inline struct bfq_io_cq *icq_to_bic(struct io_cq *icq) +{ + /* bic->icq is the first member, %NULL will convert to %NULL */ + return container_of(icq, struct bfq_io_cq, icq); +} + +/** + * bfq_bic_lookup - search into @ioc a bic associated to @bfqd. + * @bfqd: the lookup key. + * @ioc: the io_context of the process doing I/O. + * + * Queue lock must be held. + */ +static inline struct bfq_io_cq *bfq_bic_lookup(struct bfq_data *bfqd, + struct io_context *ioc) +{ + if (ioc) + return icq_to_bic(ioc_lookup_icq(ioc, bfqd->queue)); + return NULL; +} diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c new file mode 100644 index 00000000000..014984d199e --- /dev/null +++ b/block/bfq-iosched.c @@ -0,0 +1,4218 @@ +/* + * Budget Fair Queueing (BFQ) disk scheduler. + * + * Based on ideas and code from CFQ: + * Copyright (C) 2003 Jens Axboe + * + * Copyright (C) 2008 Fabio Checconi + * Paolo Valente + * + * Copyright (C) 2010 Paolo Valente + * + * Licensed under the GPL-2 as detailed in the accompanying COPYING.BFQ + * file. + * + * BFQ is a proportional-share storage-I/O scheduling algorithm based on + * the slice-by-slice service scheme of CFQ. But BFQ assigns budgets, + * measured in number of sectors, to processes instead of time slices. The + * device is not granted to the in-service process for a given time slice, + * but until it has exhausted its assigned budget. This change from the time + * to the service domain allows BFQ to distribute the device throughput + * among processes as desired, without any distortion due to ZBR, workload + * fluctuations or other factors. BFQ uses an ad hoc internal scheduler, + * called B-WF2Q+, to schedule processes according to their budgets. More + * precisely, BFQ schedules queues associated to processes. Thanks to the + * accurate policy of B-WF2Q+, BFQ can afford to assign high budgets to + * I/O-bound processes issuing sequential requests (to boost the + * throughput), and yet guarantee a low latency to interactive and soft + * real-time applications. + * + * BFQ is described in [1], where also a reference to the initial, more + * theoretical paper on BFQ can be found. The interested reader can find + * in the latter paper full details on the main algorithm, as well as + * formulas of the guarantees and formal proofs of all the properties. + * With respect to the version of BFQ presented in these papers, this + * implementation adds a few more heuristics, such as the one that + * guarantees a low latency to soft real-time applications, and a + * hierarchical extension based on H-WF2Q+. + * + * B-WF2Q+ is based on WF2Q+, that is described in [2], together with + * H-WF2Q+, while the augmented tree used to implement B-WF2Q+ with O(log N) + * complexity derives from the one introduced with EEVDF in [3]. + * + * [1] P. Valente and M. Andreolini, ``Improving Application Responsiveness + * with the BFQ Disk I/O Scheduler'', + * Proceedings of the 5th Annual International Systems and Storage + * Conference (SYSTOR '12), June 2012. + * + * http://algogroup.unimo.it/people/paolo/disk_sched/bf1-v1-suite-results.pdf + * + * [2] Jon C.R. Bennett and H. Zhang, ``Hierarchical Packet Fair Queueing + * Algorithms,'' IEEE/ACM Transactions on Networking, 5(5):675-689, + * Oct 1997. + * + * http://www.cs.cmu.edu/~hzhang/papers/TON-97-Oct.ps.gz + * + * [3] I. Stoica and H. Abdel-Wahab, ``Earliest Eligible Virtual Deadline + * First: A Flexible and Accurate Mechanism for Proportional Share + * Resource Allocation,'' technical report. + * + * http://www.cs.berkeley.edu/~istoica/papers/eevdf-tr-95.pdf + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include "bfq.h" +#include "blk.h" + +/* Expiration time of sync (0) and async (1) requests, in jiffies. */ +static const int bfq_fifo_expire[2] = { HZ / 4, HZ / 8 }; + +/* Maximum backwards seek, in KiB. */ +static const int bfq_back_max = 16 * 1024; + +/* Penalty of a backwards seek, in number of sectors. */ +static const int bfq_back_penalty = 2; + +/* Idling period duration, in jiffies. */ +static int bfq_slice_idle = HZ / 125; + +/* Default maximum budget values, in sectors and number of requests. */ +static const int bfq_default_max_budget = 16 * 1024; +static const int bfq_max_budget_async_rq = 4; + +/* + * Async to sync throughput distribution is controlled as follows: + * when an async request is served, the entity is charged the number + * of sectors of the request, multiplied by the factor below + */ +static const int bfq_async_charge_factor = 10; + +/* Default timeout values, in jiffies, approximating CFQ defaults. */ +static const int bfq_timeout_sync = HZ / 8; +static int bfq_timeout_async = HZ / 25; + +struct kmem_cache *bfq_pool; + +/* Below this threshold (in ms), we consider thinktime immediate. */ +#define BFQ_MIN_TT 2 + +/* hw_tag detection: parallel requests threshold and min samples needed. */ +#define BFQ_HW_QUEUE_THRESHOLD 4 +#define BFQ_HW_QUEUE_SAMPLES 32 + +#define BFQQ_SEEK_THR (sector_t)(8 * 1024) +#define BFQQ_SEEKY(bfqq) ((bfqq)->seek_mean > BFQQ_SEEK_THR) + +/* Min samples used for peak rate estimation (for autotuning). */ +#define BFQ_PEAK_RATE_SAMPLES 32 + +/* Shift used for peak rate fixed precision calculations. */ +#define BFQ_RATE_SHIFT 16 + +/* + * By default, BFQ computes the duration of the weight raising for + * interactive applications automatically, using the following formula: + * duration = (R / r) * T, where r is the peak rate of the device, and + * R and T are two reference parameters. + * In particular, R is the peak rate of the reference device (see below), + * and T is a reference time: given the systems that are likely to be + * installed on the reference device according to its speed class, T is + * about the maximum time needed, under BFQ and while reading two files in + * parallel, to load typical large applications on these systems. + * In practice, the slower/faster the device at hand is, the more/less it + * takes to load applications with respect to the reference device. + * Accordingly, the longer/shorter BFQ grants weight raising to interactive + * applications. + * + * BFQ uses four different reference pairs (R, T), depending on: + * . whether the device is rotational or non-rotational; + * . whether the device is slow, such as old or portable HDDs, as well as + * SD cards, or fast, such as newer HDDs and SSDs. + * + * The device's speed class is dynamically (re)detected in + * bfq_update_peak_rate() every time the estimated peak rate is updated. + * + * In the following definitions, R_slow[0]/R_fast[0] and T_slow[0]/T_fast[0] + * are the reference values for a slow/fast rotational device, whereas + * R_slow[1]/R_fast[1] and T_slow[1]/T_fast[1] are the reference values for + * a slow/fast non-rotational device. Finally, device_speed_thresh are the + * thresholds used to switch between speed classes. + * Both the reference peak rates and the thresholds are measured in + * sectors/usec, left-shifted by BFQ_RATE_SHIFT. + */ +static int R_slow[2] = {1536, 10752}; +static int R_fast[2] = {17415, 34791}; +/* + * To improve readability, a conversion function is used to initialize the + * following arrays, which entails that they can be initialized only in a + * function. + */ +static int T_slow[2]; +static int T_fast[2]; +static int device_speed_thresh[2]; + +#define BFQ_SERVICE_TREE_INIT ((struct bfq_service_tree) \ + { RB_ROOT, RB_ROOT, NULL, NULL, 0, 0 }) + +#define RQ_BIC(rq) ((struct bfq_io_cq *) (rq)->elv.priv[0]) +#define RQ_BFQQ(rq) ((rq)->elv.priv[1]) + +static inline void bfq_schedule_dispatch(struct bfq_data *bfqd); + +#include "bfq-ioc.c" +#include "bfq-sched.c" +#include "bfq-cgroup.c" + +#define bfq_class_idle(bfqq) ((bfqq)->entity.ioprio_class ==\ + IOPRIO_CLASS_IDLE) +#define bfq_class_rt(bfqq) ((bfqq)->entity.ioprio_class ==\ + IOPRIO_CLASS_RT) + +#define bfq_sample_valid(samples) ((samples) > 80) + +/* + * The following macro groups conditions that need to be evaluated when + * checking if existing queues and groups form a symmetric scenario + * and therefore idling can be reduced or disabled for some of the + * queues. See the comment to the function bfq_bfqq_must_not_expire() + * for further details. + */ +#ifdef CONFIG_CGROUP_BFQIO +#define symmetric_scenario (!bfqd->active_numerous_groups && \ + !bfq_differentiated_weights(bfqd)) +#else +#define symmetric_scenario (!bfq_differentiated_weights(bfqd)) +#endif + +/* + * We regard a request as SYNC, if either it's a read or has the SYNC bit + * set (in which case it could also be a direct WRITE). + */ +static inline int bfq_bio_sync(struct bio *bio) +{ + if (bio_data_dir(bio) == READ || (bio->bi_rw & REQ_SYNC)) + return 1; + + return 0; +} + +/* + * Scheduler run of queue, if there are requests pending and no one in the + * driver that will restart queueing. + */ +static inline void bfq_schedule_dispatch(struct bfq_data *bfqd) +{ + if (bfqd->queued != 0) { + bfq_log(bfqd, "schedule dispatch"); + kblockd_schedule_work(bfqd->queue, &bfqd->unplug_work); + } +} + +/* + * Lifted from AS - choose which of rq1 and rq2 that is best served now. + * We choose the request that is closesr to the head right now. Distance + * behind the head is penalized and only allowed to a certain extent. + */ +static struct request *bfq_choose_req(struct bfq_data *bfqd, + struct request *rq1, + struct request *rq2, + sector_t last) +{ + sector_t s1, s2, d1 = 0, d2 = 0; + unsigned long back_max; +#define BFQ_RQ1_WRAP 0x01 /* request 1 wraps */ +#define BFQ_RQ2_WRAP 0x02 /* request 2 wraps */ + unsigned wrap = 0; /* bit mask: requests behind the disk head? */ + + if (rq1 == NULL || rq1 == rq2) + return rq2; + if (rq2 == NULL) + return rq1; + + if (rq_is_sync(rq1) && !rq_is_sync(rq2)) + return rq1; + else if (rq_is_sync(rq2) && !rq_is_sync(rq1)) + return rq2; + if ((rq1->cmd_flags & REQ_META) && !(rq2->cmd_flags & REQ_META)) + return rq1; + else if ((rq2->cmd_flags & REQ_META) && !(rq1->cmd_flags & REQ_META)) + return rq2; + + s1 = blk_rq_pos(rq1); + s2 = blk_rq_pos(rq2); + + /* + * By definition, 1KiB is 2 sectors. + */ + back_max = bfqd->bfq_back_max * 2; + + /* + * Strict one way elevator _except_ in the case where we allow + * short backward seeks which are biased as twice the cost of a + * similar forward seek. + */ + if (s1 >= last) + d1 = s1 - last; + else if (s1 + back_max >= last) + d1 = (last - s1) * bfqd->bfq_back_penalty; + else + wrap |= BFQ_RQ1_WRAP; + + if (s2 >= last) + d2 = s2 - last; + else if (s2 + back_max >= last) + d2 = (last - s2) * bfqd->bfq_back_penalty; + else + wrap |= BFQ_RQ2_WRAP; + + /* Found required data */ + + /* + * By doing switch() on the bit mask "wrap" we avoid having to + * check two variables for all permutations: --> faster! + */ + switch (wrap) { + case 0: /* common case for CFQ: rq1 and rq2 not wrapped */ + if (d1 < d2) + return rq1; + else if (d2 < d1) + return rq2; + else { + if (s1 >= s2) + return rq1; + else + return rq2; + } + + case BFQ_RQ2_WRAP: + return rq1; + case BFQ_RQ1_WRAP: + return rq2; + case (BFQ_RQ1_WRAP|BFQ_RQ2_WRAP): /* both rqs wrapped */ + default: + /* + * Since both rqs are wrapped, + * start with the one that's further behind head + * (--> only *one* back seek required), + * since back seek takes more time than forward. + */ + if (s1 <= s2) + return rq1; + else + return rq2; + } +} + +static struct bfq_queue * +bfq_rq_pos_tree_lookup(struct bfq_data *bfqd, struct rb_root *root, + sector_t sector, struct rb_node **ret_parent, + struct rb_node ***rb_link) +{ + struct rb_node **p, *parent; + struct bfq_queue *bfqq = NULL; + + parent = NULL; + p = &root->rb_node; + while (*p) { + struct rb_node **n; + + parent = *p; + bfqq = rb_entry(parent, struct bfq_queue, pos_node); + + /* + * Sort strictly based on sector. Smallest to the left, + * largest to the right. + */ + if (sector > blk_rq_pos(bfqq->next_rq)) + n = &(*p)->rb_right; + else if (sector < blk_rq_pos(bfqq->next_rq)) + n = &(*p)->rb_left; + else + break; + p = n; + bfqq = NULL; + } + + *ret_parent = parent; + if (rb_link) + *rb_link = p; + + bfq_log(bfqd, "rq_pos_tree_lookup %llu: returning %d", + (long long unsigned)sector, + bfqq != NULL ? bfqq->pid : 0); + + return bfqq; +} + +static void bfq_rq_pos_tree_add(struct bfq_data *bfqd, struct bfq_queue *bfqq) +{ + struct rb_node **p, *parent; + struct bfq_queue *__bfqq; + + if (bfqq->pos_root != NULL) { + rb_erase(&bfqq->pos_node, bfqq->pos_root); + bfqq->pos_root = NULL; + } + + if (bfq_class_idle(bfqq)) + return; + if (!bfqq->next_rq) + return; + + bfqq->pos_root = &bfqd->rq_pos_tree; + __bfqq = bfq_rq_pos_tree_lookup(bfqd, bfqq->pos_root, + blk_rq_pos(bfqq->next_rq), &parent, &p); + if (__bfqq == NULL) { + rb_link_node(&bfqq->pos_node, parent, p); + rb_insert_color(&bfqq->pos_node, bfqq->pos_root); + } else + bfqq->pos_root = NULL; +} + +/* + * Tell whether there are active queues or groups with differentiated weights. + */ +static inline bool bfq_differentiated_weights(struct bfq_data *bfqd) +{ + /* + * For weights to differ, at least one of the trees must contain + * at least two nodes. + */ + return (!RB_EMPTY_ROOT(&bfqd->queue_weights_tree) && + (bfqd->queue_weights_tree.rb_node->rb_left || + bfqd->queue_weights_tree.rb_node->rb_right) +#ifdef CONFIG_CGROUP_BFQIO + ) || + (!RB_EMPTY_ROOT(&bfqd->group_weights_tree) && + (bfqd->group_weights_tree.rb_node->rb_left || + bfqd->group_weights_tree.rb_node->rb_right) +#endif + ); +} + +/* + * If the weight-counter tree passed as input contains no counter for + * the weight of the input entity, then add that counter; otherwise just + * increment the existing counter. + * + * Note that weight-counter trees contain few nodes in mostly symmetric + * scenarios. For example, if all queues have the same weight, then the + * weight-counter tree for the queues may contain at most one node. + * This holds even if low_latency is on, because weight-raised queues + * are not inserted in the tree. + * In most scenarios, the rate at which nodes are created/destroyed + * should be low too. + */ +static void bfq_weights_tree_add(struct bfq_data *bfqd, + struct bfq_entity *entity, + struct rb_root *root) +{ + struct rb_node **new = &(root->rb_node), *parent = NULL; + + /* + * Do not insert if the entity is already associated with a + * counter, which happens if: + * 1) the entity is associated with a queue, + * 2) a request arrival has caused the queue to become both + * non-weight-raised, and hence change its weight, and + * backlogged; in this respect, each of the two events + * causes an invocation of this function, + * 3) this is the invocation of this function caused by the + * second event. This second invocation is actually useless, + * and we handle this fact by exiting immediately. More + * efficient or clearer solutions might possibly be adopted. + */ + if (entity->weight_counter) + return; + + while (*new) { + struct bfq_weight_counter *__counter = container_of(*new, + struct bfq_weight_counter, + weights_node); + parent = *new; + + if (entity->weight == __counter->weight) { + entity->weight_counter = __counter; + goto inc_counter; + } + if (entity->weight < __counter->weight) + new = &((*new)->rb_left); + else + new = &((*new)->rb_right); + } + + entity->weight_counter = kzalloc(sizeof(struct bfq_weight_counter), + GFP_ATOMIC); + entity->weight_counter->weight = entity->weight; + rb_link_node(&entity->weight_counter->weights_node, parent, new); + rb_insert_color(&entity->weight_counter->weights_node, root); + +inc_counter: + entity->weight_counter->num_active++; +} + +/* + * Decrement the weight counter associated with the entity, and, if the + * counter reaches 0, remove the counter from the tree. + * See the comments to the function bfq_weights_tree_add() for considerations + * about overhead. + */ +static void bfq_weights_tree_remove(struct bfq_data *bfqd, + struct bfq_entity *entity, + struct rb_root *root) +{ + if (!entity->weight_counter) + return; + + BUG_ON(RB_EMPTY_ROOT(root)); + BUG_ON(entity->weight_counter->weight != entity->weight); + + BUG_ON(!entity->weight_counter->num_active); + entity->weight_counter->num_active--; + if (entity->weight_counter->num_active > 0) + goto reset_entity_pointer; + + rb_erase(&entity->weight_counter->weights_node, root); + kfree(entity->weight_counter); + +reset_entity_pointer: + entity->weight_counter = NULL; +} + +static struct request *bfq_find_next_rq(struct bfq_data *bfqd, + struct bfq_queue *bfqq, + struct request *last) +{ + struct rb_node *rbnext = rb_next(&last->rb_node); + struct rb_node *rbprev = rb_prev(&last->rb_node); + struct request *next = NULL, *prev = NULL; + + BUG_ON(RB_EMPTY_NODE(&last->rb_node)); + + if (rbprev != NULL) + prev = rb_entry_rq(rbprev); + + if (rbnext != NULL) + next = rb_entry_rq(rbnext); + else { + rbnext = rb_first(&bfqq->sort_list); + if (rbnext && rbnext != &last->rb_node) + next = rb_entry_rq(rbnext); + } + + return bfq_choose_req(bfqd, next, prev, blk_rq_pos(last)); +} + +/* see the definition of bfq_async_charge_factor for details */ +static inline unsigned long bfq_serv_to_charge(struct request *rq, + struct bfq_queue *bfqq) +{ + return blk_rq_sectors(rq) * + (1 + ((!bfq_bfqq_sync(bfqq)) * (bfqq->wr_coeff == 1) * + bfq_async_charge_factor)); +} + +/** + * bfq_updated_next_req - update the queue after a new next_rq selection. + * @bfqd: the device data the queue belongs to. + * @bfqq: the queue to update. + * + * If the first request of a queue changes we make sure that the queue + * has enough budget to serve at least its first request (if the + * request has grown). We do this because if the queue has not enough + * budget for its first request, it has to go through two dispatch + * rounds to actually get it dispatched. + */ +static void bfq_updated_next_req(struct bfq_data *bfqd, + struct bfq_queue *bfqq) +{ + struct bfq_entity *entity = &bfqq->entity; + struct bfq_service_tree *st = bfq_entity_service_tree(entity); + struct request *next_rq = bfqq->next_rq; + unsigned long new_budget; + + if (next_rq == NULL) + return; + + if (bfqq == bfqd->in_service_queue) + /* + * In order not to break guarantees, budgets cannot be + * changed after an entity has been selected. + */ + return; + + BUG_ON(entity->tree != &st->active); + BUG_ON(entity == entity->sched_data->in_service_entity); + + new_budget = max_t(unsigned long, bfqq->max_budget, + bfq_serv_to_charge(next_rq, bfqq)); + if (entity->budget != new_budget) { + entity->budget = new_budget; + bfq_log_bfqq(bfqd, bfqq, "updated next rq: new budget %lu", + new_budget); + bfq_activate_bfqq(bfqd, bfqq); + } +} + +static inline unsigned int bfq_wr_duration(struct bfq_data *bfqd) +{ + u64 dur; + + if (bfqd->bfq_wr_max_time > 0) + return bfqd->bfq_wr_max_time; + + dur = bfqd->RT_prod; + do_div(dur, bfqd->peak_rate); + + return dur; +} + +static inline unsigned +bfq_bfqq_cooperations(struct bfq_queue *bfqq) +{ + return bfqq->bic ? bfqq->bic->cooperations : 0; +} + +static inline void +bfq_bfqq_resume_state(struct bfq_queue *bfqq, struct bfq_io_cq *bic) +{ + if (bic->saved_idle_window) + bfq_mark_bfqq_idle_window(bfqq); + else + bfq_clear_bfqq_idle_window(bfqq); + if (bic->saved_IO_bound) + bfq_mark_bfqq_IO_bound(bfqq); + else + bfq_clear_bfqq_IO_bound(bfqq); + /* Assuming that the flag in_large_burst is already correctly set */ + if (bic->wr_time_left && bfqq->bfqd->low_latency && + !bfq_bfqq_in_large_burst(bfqq) && + bic->cooperations < bfqq->bfqd->bfq_coop_thresh) { + /* + * Start a weight raising period with the duration given by + * the raising_time_left snapshot. + */ + if (bfq_bfqq_busy(bfqq)) + bfqq->bfqd->wr_busy_queues++; + bfqq->wr_coeff = bfqq->bfqd->bfq_wr_coeff; + bfqq->wr_cur_max_time = bic->wr_time_left; + bfqq->last_wr_start_finish = jiffies; + bfqq->entity.ioprio_changed = 1; + } + /* + * Clear wr_time_left to prevent bfq_bfqq_save_state() from + * getting confused about the queue's need of a weight-raising + * period. + */ + bic->wr_time_left = 0; +} + +/* Must be called with the queue_lock held. */ +static int bfqq_process_refs(struct bfq_queue *bfqq) +{ + int process_refs, io_refs; + + io_refs = bfqq->allocated[READ] + bfqq->allocated[WRITE]; + process_refs = atomic_read(&bfqq->ref) - io_refs - bfqq->entity.on_st; + BUG_ON(process_refs < 0); + return process_refs; +} + +/* Empty burst list and add just bfqq (see comments to bfq_handle_burst) */ +static inline void bfq_reset_burst_list(struct bfq_data *bfqd, + struct bfq_queue *bfqq) +{ + struct bfq_queue *item; + struct hlist_node *n; + + hlist_for_each_entry_safe(item, n, &bfqd->burst_list, burst_list_node) + hlist_del_init(&item->burst_list_node); + hlist_add_head(&bfqq->burst_list_node, &bfqd->burst_list); + bfqd->burst_size = 1; +} + +/* Add bfqq to the list of queues in current burst (see bfq_handle_burst) */ +static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) +{ + /* Increment burst size to take into account also bfqq */ + bfqd->burst_size++; + + if (bfqd->burst_size == bfqd->bfq_large_burst_thresh) { + struct bfq_queue *pos, *bfqq_item; + struct hlist_node *n; + + /* + * Enough queues have been activated shortly after each + * other to consider this burst as large. + */ + bfqd->large_burst = true; + + /* + * We can now mark all queues in the burst list as + * belonging to a large burst. + */ + hlist_for_each_entry(bfqq_item, &bfqd->burst_list, + burst_list_node) + bfq_mark_bfqq_in_large_burst(bfqq_item); + bfq_mark_bfqq_in_large_burst(bfqq); + + /* + * From now on, and until the current burst finishes, any + * new queue being activated shortly after the last queue + * was inserted in the burst can be immediately marked as + * belonging to a large burst. So the burst list is not + * needed any more. Remove it. + */ + hlist_for_each_entry_safe(pos, n, &bfqd->burst_list, + burst_list_node) + hlist_del_init(&pos->burst_list_node); + } else /* burst not yet large: add bfqq to the burst list */ + hlist_add_head(&bfqq->burst_list_node, &bfqd->burst_list); +} + +/* + * If many queues happen to become active shortly after each other, then, + * to help the processes associated to these queues get their job done as + * soon as possible, it is usually better to not grant either weight-raising + * or device idling to these queues. In this comment we describe, firstly, + * the reasons why this fact holds, and, secondly, the next function, which + * implements the main steps needed to properly mark these queues so that + * they can then be treated in a different way. + * + * As for the terminology, we say that a queue becomes active, i.e., + * switches from idle to backlogged, either when it is created (as a + * consequence of the arrival of an I/O request), or, if already existing, + * when a new request for the queue arrives while the queue is idle. + * Bursts of activations, i.e., activations of different queues occurring + * shortly after each other, are typically caused by services or applications + * that spawn or reactivate many parallel threads/processes. Examples are + * systemd during boot or git grep. + * + * These services or applications benefit mostly from a high throughput: + * the quicker the requests of the activated queues are cumulatively served, + * the sooner the target job of these queues gets completed. As a consequence, + * weight-raising any of these queues, which also implies idling the device + * for it, is almost always counterproductive: in most cases it just lowers + * throughput. + * + * On the other hand, a burst of activations may be also caused by the start + * of an application that does not consist in a lot of parallel I/O-bound + * threads. In fact, with a complex application, the burst may be just a + * consequence of the fact that several processes need to be executed to + * start-up the application. To start an application as quickly as possible, + * the best thing to do is to privilege the I/O related to the application + * with respect to all other I/O. Therefore, the best strategy to start as + * quickly as possible an application that causes a burst of activations is + * to weight-raise all the queues activated during the burst. This is the + * exact opposite of the best strategy for the other type of bursts. + * + * In the end, to take the best action for each of the two cases, the two + * types of bursts need to be distinguished. Fortunately, this seems + * relatively easy to do, by looking at the sizes of the bursts. In + * particular, we found a threshold such that bursts with a larger size + * than that threshold are apparently caused only by services or commands + * such as systemd or git grep. For brevity, hereafter we call just 'large' + * these bursts. BFQ *does not* weight-raise queues whose activations occur + * in a large burst. In addition, for each of these queues BFQ performs or + * does not perform idling depending on which choice boosts the throughput + * most. The exact choice depends on the device and request pattern at + * hand. + * + * Turning back to the next function, it implements all the steps needed + * to detect the occurrence of a large burst and to properly mark all the + * queues belonging to it (so that they can then be treated in a different + * way). This goal is achieved by maintaining a special "burst list" that + * holds, temporarily, the queues that belong to the burst in progress. The + * list is then used to mark these queues as belonging to a large burst if + * the burst does become large. The main steps are the following. + * + * . when the very first queue is activated, the queue is inserted into the + * list (as it could be the first queue in a possible burst) + * + * . if the current burst has not yet become large, and a queue Q that does + * not yet belong to the burst is activated shortly after the last time + * at which a new queue entered the burst list, then the function appends + * Q to the burst list + * + * . if, as a consequence of the previous step, the burst size reaches + * the large-burst threshold, then + * + * . all the queues in the burst list are marked as belonging to a + * large burst + * + * . the burst list is deleted; in fact, the burst list already served + * its purpose (keeping temporarily track of the queues in a burst, + * so as to be able to mark them as belonging to a large burst in the + * previous sub-step), and now is not needed any more + * + * . the device enters a large-burst mode + * + * . if a queue Q that does not belong to the burst is activated while + * the device is in large-burst mode and shortly after the last time + * at which a queue either entered the burst list or was marked as + * belonging to the current large burst, then Q is immediately marked + * as belonging to a large burst. + * + * . if a queue Q that does not belong to the burst is activated a while + * later, i.e., not shortly after, than the last time at which a queue + * either entered the burst list or was marked as belonging to the + * current large burst, then the current burst is deemed as finished and: + * + * . the large-burst mode is reset if set + * + * . the burst list is emptied + * + * . Q is inserted in the burst list, as Q may be the first queue + * in a possible new burst (then the burst list contains just Q + * after this step). + */ +static void bfq_handle_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq, + bool idle_for_long_time) +{ + /* + * If bfqq happened to be activated in a burst, but has been idle + * for at least as long as an interactive queue, then we assume + * that, in the overall I/O initiated in the burst, the I/O + * associated to bfqq is finished. So bfqq does not need to be + * treated as a queue belonging to a burst anymore. Accordingly, + * we reset bfqq's in_large_burst flag if set, and remove bfqq + * from the burst list if it's there. We do not decrement instead + * burst_size, because the fact that bfqq does not need to belong + * to the burst list any more does not invalidate the fact that + * bfqq may have been activated during the current burst. + */ + if (idle_for_long_time) { + hlist_del_init(&bfqq->burst_list_node); + bfq_clear_bfqq_in_large_burst(bfqq); + } + + /* + * If bfqq is already in the burst list or is part of a large + * burst, then there is nothing else to do. + */ + if (!hlist_unhashed(&bfqq->burst_list_node) || + bfq_bfqq_in_large_burst(bfqq)) + return; + + /* + * If bfqq's activation happens late enough, then the current + * burst is finished, and related data structures must be reset. + * + * In this respect, consider the special case where bfqq is the very + * first queue being activated. In this case, last_ins_in_burst is + * not yet significant when we get here. But it is easy to verify + * that, whether or not the following condition is true, bfqq will + * end up being inserted into the burst list. In particular the + * list will happen to contain only bfqq. And this is exactly what + * has to happen, as bfqq may be the first queue in a possible + * burst. + */ + if (time_is_before_jiffies(bfqd->last_ins_in_burst + + bfqd->bfq_burst_interval)) { + bfqd->large_burst = false; + bfq_reset_burst_list(bfqd, bfqq); + return; + } + + /* + * If we get here, then bfqq is being activated shortly after the + * last queue. So, if the current burst is also large, we can mark + * bfqq as belonging to this large burst immediately. + */ + if (bfqd->large_burst) { + bfq_mark_bfqq_in_large_burst(bfqq); + return; + } + + /* + * If we get here, then a large-burst state has not yet been + * reached, but bfqq is being activated shortly after the last + * queue. Then we add bfqq to the burst. + */ + bfq_add_to_burst(bfqd, bfqq); +} + +static void bfq_add_request(struct request *rq) +{ + struct bfq_queue *bfqq = RQ_BFQQ(rq); + struct bfq_entity *entity = &bfqq->entity; + struct bfq_data *bfqd = bfqq->bfqd; + struct request *next_rq, *prev; + unsigned long old_wr_coeff = bfqq->wr_coeff; + bool interactive = false; + + bfq_log_bfqq(bfqd, bfqq, "add_request %d", rq_is_sync(rq)); + bfqq->queued[rq_is_sync(rq)]++; + bfqd->queued++; + + elv_rb_add(&bfqq->sort_list, rq); + + /* + * Check if this request is a better next-serve candidate. + */ + prev = bfqq->next_rq; + next_rq = bfq_choose_req(bfqd, bfqq->next_rq, rq, bfqd->last_position); + BUG_ON(next_rq == NULL); + bfqq->next_rq = next_rq; + + /* + * Adjust priority tree position, if next_rq changes. + */ + if (prev != bfqq->next_rq) + bfq_rq_pos_tree_add(bfqd, bfqq); + + if (!bfq_bfqq_busy(bfqq)) { + bool soft_rt, coop_or_in_burst, + idle_for_long_time = time_is_before_jiffies( + bfqq->budget_timeout + + bfqd->bfq_wr_min_idle_time); + + if (bfq_bfqq_sync(bfqq)) { + bool already_in_burst = + !hlist_unhashed(&bfqq->burst_list_node) || + bfq_bfqq_in_large_burst(bfqq); + bfq_handle_burst(bfqd, bfqq, idle_for_long_time); + /* + * If bfqq was not already in the current burst, + * then, at this point, bfqq either has been + * added to the current burst or has caused the + * current burst to terminate. In particular, in + * the second case, bfqq has become the first + * queue in a possible new burst. + * In both cases last_ins_in_burst needs to be + * moved forward. + */ + if (!already_in_burst) + bfqd->last_ins_in_burst = jiffies; + } + + coop_or_in_burst = bfq_bfqq_in_large_burst(bfqq) || + bfq_bfqq_cooperations(bfqq) >= bfqd->bfq_coop_thresh; + soft_rt = bfqd->bfq_wr_max_softrt_rate > 0 && + !coop_or_in_burst && + time_is_before_jiffies(bfqq->soft_rt_next_start); + interactive = !coop_or_in_burst && idle_for_long_time; + entity->budget = max_t(unsigned long, bfqq->max_budget, + bfq_serv_to_charge(next_rq, bfqq)); + + if (!bfq_bfqq_IO_bound(bfqq)) { + if (time_before(jiffies, + RQ_BIC(rq)->ttime.last_end_request + + bfqd->bfq_slice_idle)) { + bfqq->requests_within_timer++; + if (bfqq->requests_within_timer >= + bfqd->bfq_requests_within_timer) + bfq_mark_bfqq_IO_bound(bfqq); + } else + bfqq->requests_within_timer = 0; + } + + if (!bfqd->low_latency) + goto add_bfqq_busy; + + if (bfq_bfqq_just_split(bfqq)) + goto set_ioprio_changed; + + /* + * If the queue: + * - is not being boosted, + * - has been idle for enough time, + * - is not a sync queue or is linked to a bfq_io_cq (it is + * shared "for its nature" or it is not shared and its + * requests have not been redirected to a shared queue) + * start a weight-raising period. + */ + if (old_wr_coeff == 1 && (interactive || soft_rt) && + (!bfq_bfqq_sync(bfqq) || bfqq->bic != NULL)) { + bfqq->wr_coeff = bfqd->bfq_wr_coeff; + if (interactive) + bfqq->wr_cur_max_time = bfq_wr_duration(bfqd); + else + bfqq->wr_cur_max_time = + bfqd->bfq_wr_rt_max_time; + bfq_log_bfqq(bfqd, bfqq, + "wrais starting at %lu, rais_max_time %u", + jiffies, + jiffies_to_msecs(bfqq->wr_cur_max_time)); + } else if (old_wr_coeff > 1) { + if (interactive) + bfqq->wr_cur_max_time = bfq_wr_duration(bfqd); + else if (coop_or_in_burst || + (bfqq->wr_cur_max_time == + bfqd->bfq_wr_rt_max_time && + !soft_rt)) { + bfqq->wr_coeff = 1; + bfq_log_bfqq(bfqd, bfqq, + "wrais ending at %lu, rais_max_time %u", + jiffies, + jiffies_to_msecs(bfqq-> + wr_cur_max_time)); + } else if (time_before( + bfqq->last_wr_start_finish + + bfqq->wr_cur_max_time, + jiffies + + bfqd->bfq_wr_rt_max_time) && + soft_rt) { + /* + * + * The remaining weight-raising time is lower + * than bfqd->bfq_wr_rt_max_time, which means + * that the application is enjoying weight + * raising either because deemed soft-rt in + * the near past, or because deemed interactive + * a long ago. + * In both cases, resetting now the current + * remaining weight-raising time for the + * application to the weight-raising duration + * for soft rt applications would not cause any + * latency increase for the application (as the + * new duration would be higher than the + * remaining time). + * + * In addition, the application is now meeting + * the requirements for being deemed soft rt. + * In the end we can correctly and safely + * (re)charge the weight-raising duration for + * the application with the weight-raising + * duration for soft rt applications. + * + * In particular, doing this recharge now, i.e., + * before the weight-raising period for the + * application finishes, reduces the probability + * of the following negative scenario: + * 1) the weight of a soft rt application is + * raised at startup (as for any newly + * created application), + * 2) since the application is not interactive, + * at a certain time weight-raising is + * stopped for the application, + * 3) at that time the application happens to + * still have pending requests, and hence + * is destined to not have a chance to be + * deemed soft rt before these requests are + * completed (see the comments to the + * function bfq_bfqq_softrt_next_start() + * for details on soft rt detection), + * 4) these pending requests experience a high + * latency because the application is not + * weight-raised while they are pending. + */ + bfqq->last_wr_start_finish = jiffies; + bfqq->wr_cur_max_time = + bfqd->bfq_wr_rt_max_time; + } + } +set_ioprio_changed: + if (old_wr_coeff != bfqq->wr_coeff) + entity->ioprio_changed = 1; +add_bfqq_busy: + bfqq->last_idle_bklogged = jiffies; + bfqq->service_from_backlogged = 0; + bfq_clear_bfqq_softrt_update(bfqq); + bfq_add_bfqq_busy(bfqd, bfqq); + } else { + if (bfqd->low_latency && old_wr_coeff == 1 && !rq_is_sync(rq) && + time_is_before_jiffies( + bfqq->last_wr_start_finish + + bfqd->bfq_wr_min_inter_arr_async)) { + bfqq->wr_coeff = bfqd->bfq_wr_coeff; + bfqq->wr_cur_max_time = bfq_wr_duration(bfqd); + + bfqd->wr_busy_queues++; + entity->ioprio_changed = 1; + bfq_log_bfqq(bfqd, bfqq, + "non-idle wrais starting at %lu, rais_max_time %u", + jiffies, + jiffies_to_msecs(bfqq->wr_cur_max_time)); + } + if (prev != bfqq->next_rq) + bfq_updated_next_req(bfqd, bfqq); + } + + if (bfqd->low_latency && + (old_wr_coeff == 1 || bfqq->wr_coeff == 1 || interactive)) + bfqq->last_wr_start_finish = jiffies; +} + +static struct request *bfq_find_rq_fmerge(struct bfq_data *bfqd, + struct bio *bio) +{ + struct task_struct *tsk = current; + struct bfq_io_cq *bic; + struct bfq_queue *bfqq; + + bic = bfq_bic_lookup(bfqd, tsk->io_context); + if (bic == NULL) + return NULL; + + bfqq = bic_to_bfqq(bic, bfq_bio_sync(bio)); + if (bfqq != NULL) + return elv_rb_find(&bfqq->sort_list, bio_end_sector(bio)); + + return NULL; +} + +static void bfq_activate_request(struct request_queue *q, struct request *rq) +{ + struct bfq_data *bfqd = q->elevator->elevator_data; + + bfqd->rq_in_driver++; + bfqd->last_position = blk_rq_pos(rq) + blk_rq_sectors(rq); + bfq_log(bfqd, "activate_request: new bfqd->last_position %llu", + (long long unsigned)bfqd->last_position); +} + +static inline void bfq_deactivate_request(struct request_queue *q, + struct request *rq) +{ + struct bfq_data *bfqd = q->elevator->elevator_data; + + BUG_ON(bfqd->rq_in_driver == 0); + bfqd->rq_in_driver--; +} + +static void bfq_remove_request(struct request *rq) +{ + struct bfq_queue *bfqq = RQ_BFQQ(rq); + struct bfq_data *bfqd = bfqq->bfqd; + const int sync = rq_is_sync(rq); + + if (bfqq->next_rq == rq) { + bfqq->next_rq = bfq_find_next_rq(bfqd, bfqq, rq); + bfq_updated_next_req(bfqd, bfqq); + } + + if (rq->queuelist.prev != &rq->queuelist) + list_del_init(&rq->queuelist); + BUG_ON(bfqq->queued[sync] == 0); + bfqq->queued[sync]--; + bfqd->queued--; + elv_rb_del(&bfqq->sort_list, rq); + + if (RB_EMPTY_ROOT(&bfqq->sort_list)) { + if (bfq_bfqq_busy(bfqq) && bfqq != bfqd->in_service_queue) + bfq_del_bfqq_busy(bfqd, bfqq, 1); + /* + * Remove queue from request-position tree as it is empty. + */ + if (bfqq->pos_root != NULL) { + rb_erase(&bfqq->pos_node, bfqq->pos_root); + bfqq->pos_root = NULL; + } + } + + if (rq->cmd_flags & REQ_META) { + BUG_ON(bfqq->meta_pending == 0); + bfqq->meta_pending--; + } +} + +static int bfq_merge(struct request_queue *q, struct request **req, + struct bio *bio) +{ + struct bfq_data *bfqd = q->elevator->elevator_data; + struct request *__rq; + + __rq = bfq_find_rq_fmerge(bfqd, bio); + if (__rq != NULL && elv_rq_merge_ok(__rq, bio)) { + *req = __rq; + return ELEVATOR_FRONT_MERGE; + } + + return ELEVATOR_NO_MERGE; +} + +static void bfq_merged_request(struct request_queue *q, struct request *req, + int type) +{ + if (type == ELEVATOR_FRONT_MERGE && + rb_prev(&req->rb_node) && + blk_rq_pos(req) < + blk_rq_pos(container_of(rb_prev(&req->rb_node), + struct request, rb_node))) { + struct bfq_queue *bfqq = RQ_BFQQ(req); + struct bfq_data *bfqd = bfqq->bfqd; + struct request *prev, *next_rq; + + /* Reposition request in its sort_list */ + elv_rb_del(&bfqq->sort_list, req); + elv_rb_add(&bfqq->sort_list, req); + /* Choose next request to be served for bfqq */ + prev = bfqq->next_rq; + next_rq = bfq_choose_req(bfqd, bfqq->next_rq, req, + bfqd->last_position); + BUG_ON(next_rq == NULL); + bfqq->next_rq = next_rq; + /* + * If next_rq changes, update both the queue's budget to + * fit the new request and the queue's position in its + * rq_pos_tree. + */ + if (prev != bfqq->next_rq) { + bfq_updated_next_req(bfqd, bfqq); + bfq_rq_pos_tree_add(bfqd, bfqq); + } + } +} + +static void bfq_merged_requests(struct request_queue *q, struct request *rq, + struct request *next) +{ + struct bfq_queue *bfqq = RQ_BFQQ(rq), *next_bfqq = RQ_BFQQ(next); + + /* + * If next and rq belong to the same bfq_queue and next is older + * than rq, then reposition rq in the fifo (by substituting next + * with rq). Otherwise, if next and rq belong to different + * bfq_queues, never reposition rq: in fact, we would have to + * reposition it with respect to next's position in its own fifo, + * which would most certainly be too expensive with respect to + * the benefits. + */ + if (bfqq == next_bfqq && + !list_empty(&rq->queuelist) && !list_empty(&next->queuelist) && + time_before(rq_fifo_time(next), rq_fifo_time(rq))) { + list_del_init(&rq->queuelist); + list_replace_init(&next->queuelist, &rq->queuelist); + rq_set_fifo_time(rq, rq_fifo_time(next)); + } + + if (bfqq->next_rq == next) + bfqq->next_rq = rq; + + bfq_remove_request(next); +} + +/* Must be called with bfqq != NULL */ +static inline void bfq_bfqq_end_wr(struct bfq_queue *bfqq) +{ + BUG_ON(bfqq == NULL); + if (bfq_bfqq_busy(bfqq)) + bfqq->bfqd->wr_busy_queues--; + bfqq->wr_coeff = 1; + bfqq->wr_cur_max_time = 0; + /* Trigger a weight change on the next activation of the queue */ + bfqq->entity.ioprio_changed = 1; +} + +static void bfq_end_wr_async_queues(struct bfq_data *bfqd, + struct bfq_group *bfqg) +{ + int i, j; + + for (i = 0; i < 2; i++) + for (j = 0; j < IOPRIO_BE_NR; j++) + if (bfqg->async_bfqq[i][j] != NULL) + bfq_bfqq_end_wr(bfqg->async_bfqq[i][j]); + if (bfqg->async_idle_bfqq != NULL) + bfq_bfqq_end_wr(bfqg->async_idle_bfqq); +} + +static void bfq_end_wr(struct bfq_data *bfqd) +{ + struct bfq_queue *bfqq; + + spin_lock_irq(bfqd->queue->queue_lock); + + list_for_each_entry(bfqq, &bfqd->active_list, bfqq_list) + bfq_bfqq_end_wr(bfqq); + list_for_each_entry(bfqq, &bfqd->idle_list, bfqq_list) + bfq_bfqq_end_wr(bfqq); + bfq_end_wr_async(bfqd); + + spin_unlock_irq(bfqd->queue->queue_lock); +} + +static inline sector_t bfq_io_struct_pos(void *io_struct, bool request) +{ + if (request) + return blk_rq_pos(io_struct); + else + return ((struct bio *)io_struct)->bi_sector; +} + +static inline sector_t bfq_dist_from(sector_t pos1, + sector_t pos2) +{ + if (pos1 >= pos2) + return pos1 - pos2; + else + return pos2 - pos1; +} + +static inline int bfq_rq_close_to_sector(void *io_struct, bool request, + sector_t sector) +{ + return bfq_dist_from(bfq_io_struct_pos(io_struct, request), sector) <= + BFQQ_SEEK_THR; +} + +static struct bfq_queue *bfqq_close(struct bfq_data *bfqd, sector_t sector) +{ + struct rb_root *root = &bfqd->rq_pos_tree; + struct rb_node *parent, *node; + struct bfq_queue *__bfqq; + + if (RB_EMPTY_ROOT(root)) + return NULL; + + /* + * First, if we find a request starting at the end of the last + * request, choose it. + */ + __bfqq = bfq_rq_pos_tree_lookup(bfqd, root, sector, &parent, NULL); + if (__bfqq != NULL) + return __bfqq; + + /* + * If the exact sector wasn't found, the parent of the NULL leaf + * will contain the closest sector (rq_pos_tree sorted by + * next_request position). + */ + __bfqq = rb_entry(parent, struct bfq_queue, pos_node); + if (bfq_rq_close_to_sector(__bfqq->next_rq, true, sector)) + return __bfqq; + + if (blk_rq_pos(__bfqq->next_rq) < sector) + node = rb_next(&__bfqq->pos_node); + else + node = rb_prev(&__bfqq->pos_node); + if (node == NULL) + return NULL; + + __bfqq = rb_entry(node, struct bfq_queue, pos_node); + if (bfq_rq_close_to_sector(__bfqq->next_rq, true, sector)) + return __bfqq; + + return NULL; +} + +/* + * bfqd - obvious + * cur_bfqq - passed in so that we don't decide that the current queue + * is closely cooperating with itself + * sector - used as a reference point to search for a close queue + */ +static struct bfq_queue *bfq_close_cooperator(struct bfq_data *bfqd, + struct bfq_queue *cur_bfqq, + sector_t sector) +{ + struct bfq_queue *bfqq; + + if (bfq_class_idle(cur_bfqq)) + return NULL; + if (!bfq_bfqq_sync(cur_bfqq)) + return NULL; + if (BFQQ_SEEKY(cur_bfqq)) + return NULL; + + /* If device has only one backlogged bfq_queue, don't search. */ + if (bfqd->busy_queues == 1) + return NULL; + + /* + * We should notice if some of the queues are cooperating, e.g. + * working closely on the same area of the disk. In that case, + * we can group them together and don't waste time idling. + */ + bfqq = bfqq_close(bfqd, sector); + if (bfqq == NULL || bfqq == cur_bfqq) + return NULL; + + /* + * Do not merge queues from different bfq_groups. + */ + if (bfqq->entity.parent != cur_bfqq->entity.parent) + return NULL; + + /* + * It only makes sense to merge sync queues. + */ + if (!bfq_bfqq_sync(bfqq)) + return NULL; + if (BFQQ_SEEKY(bfqq)) + return NULL; + + /* + * Do not merge queues of different priority classes. + */ + if (bfq_class_rt(bfqq) != bfq_class_rt(cur_bfqq)) + return NULL; + + return bfqq; +} + +static struct bfq_queue * +bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq) +{ + int process_refs, new_process_refs; + struct bfq_queue *__bfqq; + + /* + * If there are no process references on the new_bfqq, then it is + * unsafe to follow the ->new_bfqq chain as other bfqq's in the chain + * may have dropped their last reference (not just their last process + * reference). + */ + if (!bfqq_process_refs(new_bfqq)) + return NULL; + + /* Avoid a circular list and skip interim queue merges. */ + while ((__bfqq = new_bfqq->new_bfqq)) { + if (__bfqq == bfqq) + return NULL; + new_bfqq = __bfqq; + } + + process_refs = bfqq_process_refs(bfqq); + new_process_refs = bfqq_process_refs(new_bfqq); + /* + * If the process for the bfqq has gone away, there is no + * sense in merging the queues. + */ + if (process_refs == 0 || new_process_refs == 0) + return NULL; + + bfq_log_bfqq(bfqq->bfqd, bfqq, "scheduling merge with queue %d", + new_bfqq->pid); + + /* + * Merging is just a redirection: the requests of the process + * owning one of the two queues are redirected to the other queue. + * The latter queue, in its turn, is set as shared if this is the + * first time that the requests of some process are redirected to + * it. + * + * We redirect bfqq to new_bfqq and not the opposite, because we + * are in the context of the process owning bfqq, hence we have + * the io_cq of this process. So we can immediately configure this + * io_cq to redirect the requests of the process to new_bfqq. + * + * NOTE, even if new_bfqq coincides with the in-service queue, the + * io_cq of new_bfqq is not available, because, if the in-service + * queue is shared, bfqd->in_service_bic may not point to the + * io_cq of the in-service queue. + * Redirecting the requests of the process owning bfqq to the + * currently in-service queue is in any case the best option, as + * we feed the in-service queue with new requests close to the + * last request served and, by doing so, hopefully increase the + * throughput. + */ + bfqq->new_bfqq = new_bfqq; + atomic_add(process_refs, &new_bfqq->ref); + return new_bfqq; +} + +/* + * Attempt to schedule a merge of bfqq with the currently in-service queue + * or with a close queue among the scheduled queues. + * Return NULL if no merge was scheduled, a pointer to the shared bfq_queue + * structure otherwise. + * + * The OOM queue is not allowed to participate to cooperation: in fact, since + * the requests temporarily redirected to the OOM queue could be redirected + * again to dedicated queues at any time, the state needed to correctly + * handle merging with the OOM queue would be quite complex and expensive + * to maintain. Besides, in such a critical condition as an out of memory, + * the benefits of queue merging may be little relevant, or even negligible. + */ +static struct bfq_queue * +bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, + void *io_struct, bool request) +{ + struct bfq_queue *in_service_bfqq, *new_bfqq; + + if (bfqq->new_bfqq) + return bfqq->new_bfqq; + + if (!io_struct || unlikely(bfqq == &bfqd->oom_bfqq)) + return NULL; + + in_service_bfqq = bfqd->in_service_queue; + + if (in_service_bfqq == NULL || in_service_bfqq == bfqq || + !bfqd->in_service_bic || + unlikely(in_service_bfqq == &bfqd->oom_bfqq)) + goto check_scheduled; + + if (bfq_class_idle(in_service_bfqq) || bfq_class_idle(bfqq)) + goto check_scheduled; + + if (bfq_class_rt(in_service_bfqq) != bfq_class_rt(bfqq)) + goto check_scheduled; + + if (in_service_bfqq->entity.parent != bfqq->entity.parent) + goto check_scheduled; + + if (bfq_rq_close_to_sector(io_struct, request, bfqd->last_position) && + bfq_bfqq_sync(in_service_bfqq) && bfq_bfqq_sync(bfqq)) { + new_bfqq = bfq_setup_merge(bfqq, in_service_bfqq); + if (new_bfqq != NULL) + return new_bfqq; /* Merge with in-service queue */ + } + + /* + * Check whether there is a cooperator among currently scheduled + * queues. The only thing we need is that the bio/request is not + * NULL, as we need it to establish whether a cooperator exists. + */ +check_scheduled: + new_bfqq = bfq_close_cooperator(bfqd, bfqq, + bfq_io_struct_pos(io_struct, request)); + if (new_bfqq && likely(new_bfqq != &bfqd->oom_bfqq)) + return bfq_setup_merge(bfqq, new_bfqq); + + return NULL; +} + +static inline void +bfq_bfqq_save_state(struct bfq_queue *bfqq) +{ + /* + * If bfqq->bic == NULL, the queue is already shared or its requests + * have already been redirected to a shared queue; both idle window + * and weight raising state have already been saved. Do nothing. + */ + if (bfqq->bic == NULL) + return; + if (bfqq->bic->wr_time_left) + /* + * This is the queue of a just-started process, and would + * deserve weight raising: we set wr_time_left to the full + * weight-raising duration to trigger weight-raising when + * and if the queue is split and the first request of the + * queue is enqueued. + */ + bfqq->bic->wr_time_left = bfq_wr_duration(bfqq->bfqd); + else if (bfqq->wr_coeff > 1) { + unsigned long wr_duration = + jiffies - bfqq->last_wr_start_finish; + /* + * It may happen that a queue's weight raising period lasts + * longer than its wr_cur_max_time, as weight raising is + * handled only when a request is enqueued or dispatched (it + * does not use any timer). If the weight raising period is + * about to end, don't save it. + */ + if (bfqq->wr_cur_max_time <= wr_duration) + bfqq->bic->wr_time_left = 0; + else + bfqq->bic->wr_time_left = + bfqq->wr_cur_max_time - wr_duration; + /* + * The bfq_queue is becoming shared or the requests of the + * process owning the queue are being redirected to a shared + * queue. Stop the weight raising period of the queue, as in + * both cases it should not be owned by an interactive or + * soft real-time application. + */ + bfq_bfqq_end_wr(bfqq); + } else + bfqq->bic->wr_time_left = 0; + bfqq->bic->saved_idle_window = bfq_bfqq_idle_window(bfqq); + bfqq->bic->saved_IO_bound = bfq_bfqq_IO_bound(bfqq); + bfqq->bic->saved_in_large_burst = bfq_bfqq_in_large_burst(bfqq); + bfqq->bic->was_in_burst_list = !hlist_unhashed(&bfqq->burst_list_node); + bfqq->bic->cooperations++; + bfqq->bic->failed_cooperations = 0; +} + +static inline void +bfq_get_bic_reference(struct bfq_queue *bfqq) +{ + /* + * If bfqq->bic has a non-NULL value, the bic to which it belongs + * is about to begin using a shared bfq_queue. + */ + if (bfqq->bic) + atomic_long_inc(&bfqq->bic->icq.ioc->refcount); +} + +static void +bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic, + struct bfq_queue *bfqq, struct bfq_queue *new_bfqq) +{ + bfq_log_bfqq(bfqd, bfqq, "merging with queue %lu", + (long unsigned)new_bfqq->pid); + /* Save weight raising and idle window of the merged queues */ + bfq_bfqq_save_state(bfqq); + bfq_bfqq_save_state(new_bfqq); + if (bfq_bfqq_IO_bound(bfqq)) + bfq_mark_bfqq_IO_bound(new_bfqq); + bfq_clear_bfqq_IO_bound(bfqq); + /* + * Grab a reference to the bic, to prevent it from being destroyed + * before being possibly touched by a bfq_split_bfqq(). + */ + bfq_get_bic_reference(bfqq); + bfq_get_bic_reference(new_bfqq); + /* + * Merge queues (that is, let bic redirect its requests to new_bfqq) + */ + bic_set_bfqq(bic, new_bfqq, 1); + bfq_mark_bfqq_coop(new_bfqq); + /* + * new_bfqq now belongs to at least two bics (it is a shared queue): + * set new_bfqq->bic to NULL. bfqq either: + * - does not belong to any bic any more, and hence bfqq->bic must + * be set to NULL, or + * - is a queue whose owning bics have already been redirected to a + * different queue, hence the queue is destined to not belong to + * any bic soon and bfqq->bic is already NULL (therefore the next + * assignment causes no harm). + */ + new_bfqq->bic = NULL; + bfqq->bic = NULL; + bfq_put_queue(bfqq); +} + +static inline void bfq_bfqq_increase_failed_cooperations(struct bfq_queue *bfqq) +{ + struct bfq_io_cq *bic = bfqq->bic; + struct bfq_data *bfqd = bfqq->bfqd; + + if (bic && bfq_bfqq_cooperations(bfqq) >= bfqd->bfq_coop_thresh) { + bic->failed_cooperations++; + if (bic->failed_cooperations >= bfqd->bfq_failed_cooperations) + bic->cooperations = 0; + } +} + +static int bfq_allow_merge(struct request_queue *q, struct request *rq, + struct bio *bio) +{ + struct bfq_data *bfqd = q->elevator->elevator_data; + struct bfq_io_cq *bic; + struct bfq_queue *bfqq, *new_bfqq; + + /* + * Disallow merge of a sync bio into an async request. + */ + if (bfq_bio_sync(bio) && !rq_is_sync(rq)) + return 0; + + /* + * Lookup the bfqq that this bio will be queued with. Allow + * merge only if rq is queued there. + * Queue lock is held here. + */ + bic = bfq_bic_lookup(bfqd, current->io_context); + if (bic == NULL) + return 0; + + bfqq = bic_to_bfqq(bic, bfq_bio_sync(bio)); + /* + * We take advantage of this function to perform an early merge + * of the queues of possible cooperating processes. + */ + if (bfqq != NULL) { + new_bfqq = bfq_setup_cooperator(bfqd, bfqq, bio, false); + if (new_bfqq != NULL) { + bfq_merge_bfqqs(bfqd, bic, bfqq, new_bfqq); + /* + * If we get here, the bio will be queued in the + * shared queue, i.e., new_bfqq, so use new_bfqq + * to decide whether bio and rq can be merged. + */ + bfqq = new_bfqq; + } else + bfq_bfqq_increase_failed_cooperations(bfqq); + } + + return bfqq == RQ_BFQQ(rq); +} + +static void __bfq_set_in_service_queue(struct bfq_data *bfqd, + struct bfq_queue *bfqq) +{ + if (bfqq != NULL) { + bfq_mark_bfqq_must_alloc(bfqq); + bfq_mark_bfqq_budget_new(bfqq); + bfq_clear_bfqq_fifo_expire(bfqq); + + bfqd->budgets_assigned = (bfqd->budgets_assigned*7 + 256) / 8; + + bfq_log_bfqq(bfqd, bfqq, + "set_in_service_queue, cur-budget = %lu", + bfqq->entity.budget); + } + + bfqd->in_service_queue = bfqq; +} + +/* + * Get and set a new queue for service. + */ +static struct bfq_queue *bfq_set_in_service_queue(struct bfq_data *bfqd) +{ + struct bfq_queue *bfqq = bfq_get_next_queue(bfqd); + + __bfq_set_in_service_queue(bfqd, bfqq); + return bfqq; +} + +/* + * If enough samples have been computed, return the current max budget + * stored in bfqd, which is dynamically updated according to the + * estimated disk peak rate; otherwise return the default max budget + */ +static inline unsigned long bfq_max_budget(struct bfq_data *bfqd) +{ + if (bfqd->budgets_assigned < 194) + return bfq_default_max_budget; + else + return bfqd->bfq_max_budget; +} + +/* + * Return min budget, which is a fraction of the current or default + * max budget (trying with 1/32) + */ +static inline unsigned long bfq_min_budget(struct bfq_data *bfqd) +{ + if (bfqd->budgets_assigned < 194) + return bfq_default_max_budget / 32; + else + return bfqd->bfq_max_budget / 32; +} + +static void bfq_arm_slice_timer(struct bfq_data *bfqd) +{ + struct bfq_queue *bfqq = bfqd->in_service_queue; + struct bfq_io_cq *bic; + unsigned long sl; + + BUG_ON(!RB_EMPTY_ROOT(&bfqq->sort_list)); + + /* Processes have exited, don't wait. */ + bic = bfqd->in_service_bic; + if (bic == NULL || atomic_read(&bic->icq.ioc->active_ref) == 0) + return; + + bfq_mark_bfqq_wait_request(bfqq); + + /* + * We don't want to idle for seeks, but we do want to allow + * fair distribution of slice time for a process doing back-to-back + * seeks. So allow a little bit of time for him to submit a new rq. + * + * To prevent processes with (partly) seeky workloads from + * being too ill-treated, grant them a small fraction of the + * assigned budget before reducing the waiting time to + * BFQ_MIN_TT. This happened to help reduce latency. + */ + sl = bfqd->bfq_slice_idle; + /* + * Unless the queue is being weight-raised or the scenario is + * asymmetric, grant only minimum idle time if the queue either + * has been seeky for long enough or has already proved to be + * constantly seeky. + */ + if (bfq_sample_valid(bfqq->seek_samples) && + ((BFQQ_SEEKY(bfqq) && bfqq->entity.service > + bfq_max_budget(bfqq->bfqd) / 8) || + bfq_bfqq_constantly_seeky(bfqq)) && bfqq->wr_coeff == 1 && + symmetric_scenario) + sl = min(sl, msecs_to_jiffies(BFQ_MIN_TT)); + else if (bfqq->wr_coeff > 1) + sl = sl * 3; + bfqd->last_idling_start = ktime_get(); + mod_timer(&bfqd->idle_slice_timer, jiffies + sl); + bfq_log(bfqd, "arm idle: %u/%u ms", + jiffies_to_msecs(sl), jiffies_to_msecs(bfqd->bfq_slice_idle)); +} + +/* + * Set the maximum time for the in-service queue to consume its + * budget. This prevents seeky processes from lowering the disk + * throughput (always guaranteed with a time slice scheme as in CFQ). + */ +static void bfq_set_budget_timeout(struct bfq_data *bfqd) +{ + struct bfq_queue *bfqq = bfqd->in_service_queue; + unsigned int timeout_coeff; + if (bfqq->wr_cur_max_time == bfqd->bfq_wr_rt_max_time) + timeout_coeff = 1; + else + timeout_coeff = bfqq->entity.weight / bfqq->entity.orig_weight; + + bfqd->last_budget_start = ktime_get(); + + bfq_clear_bfqq_budget_new(bfqq); + bfqq->budget_timeout = jiffies + + bfqd->bfq_timeout[bfq_bfqq_sync(bfqq)] * timeout_coeff; + + bfq_log_bfqq(bfqd, bfqq, "set budget_timeout %u", + jiffies_to_msecs(bfqd->bfq_timeout[bfq_bfqq_sync(bfqq)] * + timeout_coeff)); +} + +/* + * Move request from internal lists to the request queue dispatch list. + */ +static void bfq_dispatch_insert(struct request_queue *q, struct request *rq) +{ + struct bfq_data *bfqd = q->elevator->elevator_data; + struct bfq_queue *bfqq = RQ_BFQQ(rq); + + /* + * For consistency, the next instruction should have been executed + * after removing the request from the queue and dispatching it. + * We execute instead this instruction before bfq_remove_request() + * (and hence introduce a temporary inconsistency), for efficiency. + * In fact, in a forced_dispatch, this prevents two counters related + * to bfqq->dispatched to risk to be uselessly decremented if bfqq + * is not in service, and then to be incremented again after + * incrementing bfqq->dispatched. + */ + bfqq->dispatched++; + bfq_remove_request(rq); + elv_dispatch_sort(q, rq); + + if (bfq_bfqq_sync(bfqq)) + bfqd->sync_flight++; +} + +/* + * Return expired entry, or NULL to just start from scratch in rbtree. + */ +static struct request *bfq_check_fifo(struct bfq_queue *bfqq) +{ + struct request *rq = NULL; + + if (bfq_bfqq_fifo_expire(bfqq)) + return NULL; + + bfq_mark_bfqq_fifo_expire(bfqq); + + if (list_empty(&bfqq->fifo)) + return NULL; + + rq = rq_entry_fifo(bfqq->fifo.next); + + if (time_before(jiffies, rq_fifo_time(rq))) + return NULL; + + return rq; +} + +static inline unsigned long bfq_bfqq_budget_left(struct bfq_queue *bfqq) +{ + struct bfq_entity *entity = &bfqq->entity; + return entity->budget - entity->service; +} + +static void __bfq_bfqq_expire(struct bfq_data *bfqd, struct bfq_queue *bfqq) +{ + BUG_ON(bfqq != bfqd->in_service_queue); + + __bfq_bfqd_reset_in_service(bfqd); + + /* + * If this bfqq is shared between multiple processes, check + * to make sure that those processes are still issuing I/Os + * within the mean seek distance. If not, it may be time to + * break the queues apart again. + */ + if (bfq_bfqq_coop(bfqq) && BFQQ_SEEKY(bfqq)) + bfq_mark_bfqq_split_coop(bfqq); + + if (RB_EMPTY_ROOT(&bfqq->sort_list)) { + /* + * Overloading budget_timeout field to store the time + * at which the queue remains with no backlog; used by + * the weight-raising mechanism. + */ + bfqq->budget_timeout = jiffies; + bfq_del_bfqq_busy(bfqd, bfqq, 1); + } else { + bfq_activate_bfqq(bfqd, bfqq); + /* + * Resort priority tree of potential close cooperators. + */ + bfq_rq_pos_tree_add(bfqd, bfqq); + } +} + +/** + * __bfq_bfqq_recalc_budget - try to adapt the budget to the @bfqq behavior. + * @bfqd: device data. + * @bfqq: queue to update. + * @reason: reason for expiration. + * + * Handle the feedback on @bfqq budget. See the body for detailed + * comments. + */ +static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, + struct bfq_queue *bfqq, + enum bfqq_expiration reason) +{ + struct request *next_rq; + unsigned long budget, min_budget; + + budget = bfqq->max_budget; + min_budget = bfq_min_budget(bfqd); + + BUG_ON(bfqq != bfqd->in_service_queue); + + bfq_log_bfqq(bfqd, bfqq, "recalc_budg: last budg %lu, budg left %lu", + bfqq->entity.budget, bfq_bfqq_budget_left(bfqq)); + bfq_log_bfqq(bfqd, bfqq, "recalc_budg: last max_budg %lu, min budg %lu", + budget, bfq_min_budget(bfqd)); + bfq_log_bfqq(bfqd, bfqq, "recalc_budg: sync %d, seeky %d", + bfq_bfqq_sync(bfqq), BFQQ_SEEKY(bfqd->in_service_queue)); + + if (bfq_bfqq_sync(bfqq)) { + switch (reason) { + /* + * Caveat: in all the following cases we trade latency + * for throughput. + */ + case BFQ_BFQQ_TOO_IDLE: + /* + * This is the only case where we may reduce + * the budget: if there is no request of the + * process still waiting for completion, then + * we assume (tentatively) that the timer has + * expired because the batch of requests of + * the process could have been served with a + * smaller budget. Hence, betting that + * process will behave in the same way when it + * becomes backlogged again, we reduce its + * next budget. As long as we guess right, + * this budget cut reduces the latency + * experienced by the process. + * + * However, if there are still outstanding + * requests, then the process may have not yet + * issued its next request just because it is + * still waiting for the completion of some of + * the still outstanding ones. So in this + * subcase we do not reduce its budget, on the + * contrary we increase it to possibly boost + * the throughput, as discussed in the + * comments to the BUDGET_TIMEOUT case. + */ + if (bfqq->dispatched > 0) /* still outstanding reqs */ + budget = min(budget * 2, bfqd->bfq_max_budget); + else { + if (budget > 5 * min_budget) + budget -= 4 * min_budget; + else + budget = min_budget; + } + break; + case BFQ_BFQQ_BUDGET_TIMEOUT: + /* + * We double the budget here because: 1) it + * gives the chance to boost the throughput if + * this is not a seeky process (which may have + * bumped into this timeout because of, e.g., + * ZBR), 2) together with charge_full_budget + * it helps give seeky processes higher + * timestamps, and hence be served less + * frequently. + */ + budget = min(budget * 2, bfqd->bfq_max_budget); + break; + case BFQ_BFQQ_BUDGET_EXHAUSTED: + /* + * The process still has backlog, and did not + * let either the budget timeout or the disk + * idling timeout expire. Hence it is not + * seeky, has a short thinktime and may be + * happy with a higher budget too. So + * definitely increase the budget of this good + * candidate to boost the disk throughput. + */ + budget = min(budget * 4, bfqd->bfq_max_budget); + break; + case BFQ_BFQQ_NO_MORE_REQUESTS: + /* + * Leave the budget unchanged. + */ + default: + return; + } + } else /* async queue */ + /* async queues get always the maximum possible budget + * (their ability to dispatch is limited by + * @bfqd->bfq_max_budget_async_rq). + */ + budget = bfqd->bfq_max_budget; + + bfqq->max_budget = budget; + + if (bfqd->budgets_assigned >= 194 && bfqd->bfq_user_max_budget == 0 && + bfqq->max_budget > bfqd->bfq_max_budget) + bfqq->max_budget = bfqd->bfq_max_budget; + + /* + * Make sure that we have enough budget for the next request. + * Since the finish time of the bfqq must be kept in sync with + * the budget, be sure to call __bfq_bfqq_expire() after the + * update. + */ + next_rq = bfqq->next_rq; + if (next_rq != NULL) + bfqq->entity.budget = max_t(unsigned long, bfqq->max_budget, + bfq_serv_to_charge(next_rq, bfqq)); + else + bfqq->entity.budget = bfqq->max_budget; + + bfq_log_bfqq(bfqd, bfqq, "head sect: %u, new budget %lu", + next_rq != NULL ? blk_rq_sectors(next_rq) : 0, + bfqq->entity.budget); +} + +static unsigned long bfq_calc_max_budget(u64 peak_rate, u64 timeout) +{ + unsigned long max_budget; + + /* + * The max_budget calculated when autotuning is equal to the + * amount of sectors transfered in timeout_sync at the + * estimated peak rate. + */ + max_budget = (unsigned long)(peak_rate * 1000 * + timeout >> BFQ_RATE_SHIFT); + + return max_budget; +} + +/* + * In addition to updating the peak rate, checks whether the process + * is "slow", and returns 1 if so. This slow flag is used, in addition + * to the budget timeout, to reduce the amount of service provided to + * seeky processes, and hence reduce their chances to lower the + * throughput. See the code for more details. + */ +static int bfq_update_peak_rate(struct bfq_data *bfqd, struct bfq_queue *bfqq, + int compensate, enum bfqq_expiration reason) +{ + u64 bw, usecs, expected, timeout; + ktime_t delta; + int update = 0; + + if (!bfq_bfqq_sync(bfqq) || bfq_bfqq_budget_new(bfqq)) + return 0; + + if (compensate) + delta = bfqd->last_idling_start; + else + delta = ktime_get(); + delta = ktime_sub(delta, bfqd->last_budget_start); + usecs = ktime_to_us(delta); + + /* Don't trust short/unrealistic values. */ + if (usecs < 100 || usecs >= LONG_MAX) + return 0; + + /* + * Calculate the bandwidth for the last slice. We use a 64 bit + * value to store the peak rate, in sectors per usec in fixed + * point math. We do so to have enough precision in the estimate + * and to avoid overflows. + */ + bw = (u64)bfqq->entity.service << BFQ_RATE_SHIFT; + do_div(bw, (unsigned long)usecs); + + timeout = jiffies_to_msecs(bfqd->bfq_timeout[BLK_RW_SYNC]); + + /* + * Use only long (> 20ms) intervals to filter out spikes for + * the peak rate estimation. + */ + if (usecs > 20000) { + if (bw > bfqd->peak_rate || + (!BFQQ_SEEKY(bfqq) && + reason == BFQ_BFQQ_BUDGET_TIMEOUT)) { + bfq_log(bfqd, "measured bw =%llu", bw); + /* + * To smooth oscillations use a low-pass filter with + * alpha=7/8, i.e., + * new_rate = (7/8) * old_rate + (1/8) * bw + */ + do_div(bw, 8); + if (bw == 0) + return 0; + bfqd->peak_rate *= 7; + do_div(bfqd->peak_rate, 8); + bfqd->peak_rate += bw; + update = 1; + bfq_log(bfqd, "new peak_rate=%llu", bfqd->peak_rate); + } + + update |= bfqd->peak_rate_samples == BFQ_PEAK_RATE_SAMPLES - 1; + + if (bfqd->peak_rate_samples < BFQ_PEAK_RATE_SAMPLES) + bfqd->peak_rate_samples++; + + if (bfqd->peak_rate_samples == BFQ_PEAK_RATE_SAMPLES && + update) { + int dev_type = blk_queue_nonrot(bfqd->queue); + if (bfqd->bfq_user_max_budget == 0) { + bfqd->bfq_max_budget = + bfq_calc_max_budget(bfqd->peak_rate, + timeout); + bfq_log(bfqd, "new max_budget=%lu", + bfqd->bfq_max_budget); + } + if (bfqd->device_speed == BFQ_BFQD_FAST && + bfqd->peak_rate < device_speed_thresh[dev_type]) { + bfqd->device_speed = BFQ_BFQD_SLOW; + bfqd->RT_prod = R_slow[dev_type] * + T_slow[dev_type]; + } else if (bfqd->device_speed == BFQ_BFQD_SLOW && + bfqd->peak_rate > device_speed_thresh[dev_type]) { + bfqd->device_speed = BFQ_BFQD_FAST; + bfqd->RT_prod = R_fast[dev_type] * + T_fast[dev_type]; + } + } + } + + /* + * If the process has been served for a too short time + * interval to let its possible sequential accesses prevail on + * the initial seek time needed to move the disk head on the + * first sector it requested, then give the process a chance + * and for the moment return false. + */ + if (bfqq->entity.budget <= bfq_max_budget(bfqd) / 8) + return 0; + + /* + * A process is considered ``slow'' (i.e., seeky, so that we + * cannot treat it fairly in the service domain, as it would + * slow down too much the other processes) if, when a slice + * ends for whatever reason, it has received service at a + * rate that would not be high enough to complete the budget + * before the budget timeout expiration. + */ + expected = bw * 1000 * timeout >> BFQ_RATE_SHIFT; + + /* + * Caveat: processes doing IO in the slower disk zones will + * tend to be slow(er) even if not seeky. And the estimated + * peak rate will actually be an average over the disk + * surface. Hence, to not be too harsh with unlucky processes, + * we keep a budget/3 margin of safety before declaring a + * process slow. + */ + return expected > (4 * bfqq->entity.budget) / 3; +} + +/* + * To be deemed as soft real-time, an application must meet two + * requirements. First, the application must not require an average + * bandwidth higher than the approximate bandwidth required to playback or + * record a compressed high-definition video. + * The next function is invoked on the completion of the last request of a + * batch, to compute the next-start time instant, soft_rt_next_start, such + * that, if the next request of the application does not arrive before + * soft_rt_next_start, then the above requirement on the bandwidth is met. + * + * The second requirement is that the request pattern of the application is + * isochronous, i.e., that, after issuing a request or a batch of requests, + * the application stops issuing new requests until all its pending requests + * have been completed. After that, the application may issue a new batch, + * and so on. + * For this reason the next function is invoked to compute + * soft_rt_next_start only for applications that meet this requirement, + * whereas soft_rt_next_start is set to infinity for applications that do + * not. + * + * Unfortunately, even a greedy application may happen to behave in an + * isochronous way if the CPU load is high. In fact, the application may + * stop issuing requests while the CPUs are busy serving other processes, + * then restart, then stop again for a while, and so on. In addition, if + * the disk achieves a low enough throughput with the request pattern + * issued by the application (e.g., because the request pattern is random + * and/or the device is slow), then the application may meet the above + * bandwidth requirement too. To prevent such a greedy application to be + * deemed as soft real-time, a further rule is used in the computation of + * soft_rt_next_start: soft_rt_next_start must be higher than the current + * time plus the maximum time for which the arrival of a request is waited + * for when a sync queue becomes idle, namely bfqd->bfq_slice_idle. + * This filters out greedy applications, as the latter issue instead their + * next request as soon as possible after the last one has been completed + * (in contrast, when a batch of requests is completed, a soft real-time + * application spends some time processing data). + * + * Unfortunately, the last filter may easily generate false positives if + * only bfqd->bfq_slice_idle is used as a reference time interval and one + * or both the following cases occur: + * 1) HZ is so low that the duration of a jiffy is comparable to or higher + * than bfqd->bfq_slice_idle. This happens, e.g., on slow devices with + * HZ=100. + * 2) jiffies, instead of increasing at a constant rate, may stop increasing + * for a while, then suddenly 'jump' by several units to recover the lost + * increments. This seems to happen, e.g., inside virtual machines. + * To address this issue, we do not use as a reference time interval just + * bfqd->bfq_slice_idle, but bfqd->bfq_slice_idle plus a few jiffies. In + * particular we add the minimum number of jiffies for which the filter + * seems to be quite precise also in embedded systems and KVM/QEMU virtual + * machines. + */ +static inline unsigned long bfq_bfqq_softrt_next_start(struct bfq_data *bfqd, + struct bfq_queue *bfqq) +{ + return max(bfqq->last_idle_bklogged + + HZ * bfqq->service_from_backlogged / + bfqd->bfq_wr_max_softrt_rate, + jiffies + bfqq->bfqd->bfq_slice_idle + 4); +} + +/* + * Return the largest-possible time instant such that, for as long as possible, + * the current time will be lower than this time instant according to the macro + * time_is_before_jiffies(). + */ +static inline unsigned long bfq_infinity_from_now(unsigned long now) +{ + return now + ULONG_MAX / 2; +} + +/** + * bfq_bfqq_expire - expire a queue. + * @bfqd: device owning the queue. + * @bfqq: the queue to expire. + * @compensate: if true, compensate for the time spent idling. + * @reason: the reason causing the expiration. + * + * + * If the process associated to the queue is slow (i.e., seeky), or in + * case of budget timeout, or, finally, if it is async, we + * artificially charge it an entire budget (independently of the + * actual service it received). As a consequence, the queue will get + * higher timestamps than the correct ones upon reactivation, and + * hence it will be rescheduled as if it had received more service + * than what it actually received. In the end, this class of processes + * will receive less service in proportion to how slowly they consume + * their budgets (and hence how seriously they tend to lower the + * throughput). + * + * In contrast, when a queue expires because it has been idling for + * too much or because it exhausted its budget, we do not touch the + * amount of service it has received. Hence when the queue will be + * reactivated and its timestamps updated, the latter will be in sync + * with the actual service received by the queue until expiration. + * + * Charging a full budget to the first type of queues and the exact + * service to the others has the effect of using the WF2Q+ policy to + * schedule the former on a timeslice basis, without violating the + * service domain guarantees of the latter. + */ +static void bfq_bfqq_expire(struct bfq_data *bfqd, + struct bfq_queue *bfqq, + int compensate, + enum bfqq_expiration reason) +{ + int slow; + BUG_ON(bfqq != bfqd->in_service_queue); + + /* Update disk peak rate for autotuning and check whether the + * process is slow (see bfq_update_peak_rate). + */ + slow = bfq_update_peak_rate(bfqd, bfqq, compensate, reason); + + /* + * As above explained, 'punish' slow (i.e., seeky), timed-out + * and async queues, to favor sequential sync workloads. + * + * Processes doing I/O in the slower disk zones will tend to be + * slow(er) even if not seeky. Hence, since the estimated peak + * rate is actually an average over the disk surface, these + * processes may timeout just for bad luck. To avoid punishing + * them we do not charge a full budget to a process that + * succeeded in consuming at least 2/3 of its budget. + */ + if (slow || (reason == BFQ_BFQQ_BUDGET_TIMEOUT && + bfq_bfqq_budget_left(bfqq) >= bfqq->entity.budget / 3)) + bfq_bfqq_charge_full_budget(bfqq); + + bfqq->service_from_backlogged += bfqq->entity.service; + + if (BFQQ_SEEKY(bfqq) && reason == BFQ_BFQQ_BUDGET_TIMEOUT && + !bfq_bfqq_constantly_seeky(bfqq)) { + bfq_mark_bfqq_constantly_seeky(bfqq); + if (!blk_queue_nonrot(bfqd->queue)) + bfqd->const_seeky_busy_in_flight_queues++; + } + + if (reason == BFQ_BFQQ_TOO_IDLE && + bfqq->entity.service <= 2 * bfqq->entity.budget / 10 ) + bfq_clear_bfqq_IO_bound(bfqq); + + if (bfqd->low_latency && bfqq->wr_coeff == 1) + bfqq->last_wr_start_finish = jiffies; + + if (bfqd->low_latency && bfqd->bfq_wr_max_softrt_rate > 0 && + RB_EMPTY_ROOT(&bfqq->sort_list)) { + /* + * If we get here, and there are no outstanding requests, + * then the request pattern is isochronous (see the comments + * to the function bfq_bfqq_softrt_next_start()). Hence we + * can compute soft_rt_next_start. If, instead, the queue + * still has outstanding requests, then we have to wait + * for the completion of all the outstanding requests to + * discover whether the request pattern is actually + * isochronous. + */ + if (bfqq->dispatched == 0) + bfqq->soft_rt_next_start = + bfq_bfqq_softrt_next_start(bfqd, bfqq); + else { + /* + * The application is still waiting for the + * completion of one or more requests: + * prevent it from possibly being incorrectly + * deemed as soft real-time by setting its + * soft_rt_next_start to infinity. In fact, + * without this assignment, the application + * would be incorrectly deemed as soft + * real-time if: + * 1) it issued a new request before the + * completion of all its in-flight + * requests, and + * 2) at that time, its soft_rt_next_start + * happened to be in the past. + */ + bfqq->soft_rt_next_start = + bfq_infinity_from_now(jiffies); + /* + * Schedule an update of soft_rt_next_start to when + * the task may be discovered to be isochronous. + */ + bfq_mark_bfqq_softrt_update(bfqq); + } + } + + bfq_log_bfqq(bfqd, bfqq, + "expire (%d, slow %d, num_disp %d, idle_win %d)", reason, + slow, bfqq->dispatched, bfq_bfqq_idle_window(bfqq)); + + /* + * Increase, decrease or leave budget unchanged according to + * reason. + */ + __bfq_bfqq_recalc_budget(bfqd, bfqq, reason); + __bfq_bfqq_expire(bfqd, bfqq); +} + +/* + * Budget timeout is not implemented through a dedicated timer, but + * just checked on request arrivals and completions, as well as on + * idle timer expirations. + */ +static int bfq_bfqq_budget_timeout(struct bfq_queue *bfqq) +{ + if (bfq_bfqq_budget_new(bfqq) || + time_before(jiffies, bfqq->budget_timeout)) + return 0; + return 1; +} + +/* + * If we expire a queue that is waiting for the arrival of a new + * request, we may prevent the fictitious timestamp back-shifting that + * allows the guarantees of the queue to be preserved (see [1] for + * this tricky aspect). Hence we return true only if this condition + * does not hold, or if the queue is slow enough to deserve only to be + * kicked off for preserving a high throughput. +*/ +static inline int bfq_may_expire_for_budg_timeout(struct bfq_queue *bfqq) +{ + bfq_log_bfqq(bfqq->bfqd, bfqq, + "may_budget_timeout: wait_request %d left %d timeout %d", + bfq_bfqq_wait_request(bfqq), + bfq_bfqq_budget_left(bfqq) >= bfqq->entity.budget / 3, + bfq_bfqq_budget_timeout(bfqq)); + + return (!bfq_bfqq_wait_request(bfqq) || + bfq_bfqq_budget_left(bfqq) >= bfqq->entity.budget / 3) + && + bfq_bfqq_budget_timeout(bfqq); +} + +/* + * Device idling is allowed only for the queues for which this function + * returns true. For this reason, the return value of this function plays a + * critical role for both throughput boosting and service guarantees. The + * return value is computed through a logical expression. In this rather + * long comment, we try to briefly describe all the details and motivations + * behind the components of this logical expression. + * + * First, the expression is false if bfqq is not sync, or if: bfqq happened + * to become active during a large burst of queue activations, and the + * pattern of requests bfqq contains boosts the throughput if bfqq is + * expired. In fact, queues that became active during a large burst benefit + * only from throughput, as discussed in the comments to bfq_handle_burst. + * In this respect, expiring bfqq certainly boosts the throughput on NCQ- + * capable flash-based devices, whereas, on rotational devices, it boosts + * the throughput only if bfqq contains random requests. + * + * On the opposite end, if (a) bfqq is sync, (b) the above burst-related + * condition does not hold, and (c) bfqq is being weight-raised, then the + * expression always evaluates to true, as device idling is instrumental + * for preserving low-latency guarantees (see [1]). If, instead, conditions + * (a) and (b) do hold, but (c) does not, then the expression evaluates to + * true only if: (1) bfqq is I/O-bound and has a non-null idle window, and + * (2) at least one of the following two conditions holds. + * The first condition is that the device is not performing NCQ, because + * idling the device most certainly boosts the throughput if this condition + * holds and bfqq is I/O-bound and has been granted a non-null idle window. + * The second compound condition is made of the logical AND of two components. + * + * The first component is true only if there is no weight-raised busy + * queue. This guarantees that the device is not idled for a sync non- + * weight-raised queue when there are busy weight-raised queues. The former + * is then expired immediately if empty. Combined with the timestamping + * rules of BFQ (see [1] for details), this causes sync non-weight-raised + * queues to get a lower number of requests served, and hence to ask for a + * lower number of requests from the request pool, before the busy weight- + * raised queues get served again. + * + * This is beneficial for the processes associated with weight-raised + * queues, when the request pool is saturated (e.g., in the presence of + * write hogs). In fact, if the processes associated with the other queues + * ask for requests at a lower rate, then weight-raised processes have a + * higher probability to get a request from the pool immediately (or at + * least soon) when they need one. Hence they have a higher probability to + * actually get a fraction of the disk throughput proportional to their + * high weight. This is especially true with NCQ-capable drives, which + * enqueue several requests in advance and further reorder internally- + * queued requests. + * + * In the end, mistreating non-weight-raised queues when there are busy + * weight-raised queues seems to mitigate starvation problems in the + * presence of heavy write workloads and NCQ, and hence to guarantee a + * higher application and system responsiveness in these hostile scenarios. + * + * If the first component of the compound condition is instead true, i.e., + * there is no weight-raised busy queue, then the second component of the + * compound condition takes into account service-guarantee and throughput + * issues related to NCQ (recall that the compound condition is evaluated + * only if the device is detected as supporting NCQ). + * + * As for service guarantees, allowing the drive to enqueue more than one + * request at a time, and hence delegating de facto final scheduling + * decisions to the drive's internal scheduler, causes loss of control on + * the actual request service order. In this respect, when the drive is + * allowed to enqueue more than one request at a time, the service + * distribution enforced by the drive's internal scheduler is likely to + * coincide with the desired device-throughput distribution only in the + * following, perfectly symmetric, scenario: + * 1) all active queues have the same weight, + * 2) all active groups at the same level in the groups tree have the same + * weight, + * 3) all active groups at the same level in the groups tree have the same + * number of children. + * + * Even in such a scenario, sequential I/O may still receive a preferential + * treatment, but this is not likely to be a big issue with flash-based + * devices, because of their non-dramatic loss of throughput with random + * I/O. Things do differ with HDDs, for which additional care is taken, as + * explained after completing the discussion for flash-based devices. + * + * Unfortunately, keeping the necessary state for evaluating exactly the + * above symmetry conditions would be quite complex and time-consuming. + * Therefore BFQ evaluates instead the following stronger sub-conditions, + * for which it is much easier to maintain the needed state: + * 1) all active queues have the same weight, + * 2) all active groups have the same weight, + * 3) all active groups have at most one active child each. + * In particular, the last two conditions are always true if hierarchical + * support and the cgroups interface are not enabled, hence no state needs + * to be maintained in this case. + * + * According to the above considerations, the second component of the + * compound condition evaluates to true if any of the above symmetry + * sub-condition does not hold, or the device is not flash-based. Therefore, + * if also the first component is true, then idling is allowed for a sync + * queue. These are the only sub-conditions considered if the device is + * flash-based, as, for such a device, it is sensible to force idling only + * for service-guarantee issues. In fact, as for throughput, idling + * NCQ-capable flash-based devices would not boost the throughput even + * with sequential I/O; rather it would lower the throughput in proportion + * to how fast the device is. In the end, (only) if all the three + * sub-conditions hold and the device is flash-based, the compound + * condition evaluates to false and therefore no idling is performed. + * + * As already said, things change with a rotational device, where idling + * boosts the throughput with sequential I/O (even with NCQ). Hence, for + * such a device the second component of the compound condition evaluates + * to true also if the following additional sub-condition does not hold: + * the queue is constantly seeky. Unfortunately, this different behavior + * with respect to flash-based devices causes an additional asymmetry: if + * some sync queues enjoy idling and some other sync queues do not, then + * the latter get a low share of the device throughput, simply because the + * former get many requests served after being set as in service, whereas + * the latter do not. As a consequence, to guarantee the desired throughput + * distribution, on HDDs the compound expression evaluates to true (and + * hence device idling is performed) also if the following last symmetry + * condition does not hold: no other queue is benefiting from idling. Also + * this last condition is actually replaced with a simpler-to-maintain and + * stronger condition: there is no busy queue which is not constantly seeky + * (and hence may also benefit from idling). + * + * To sum up, when all the required symmetry and throughput-boosting + * sub-conditions hold, the second component of the compound condition + * evaluates to false, and hence no idling is performed. This helps to + * keep the drives' internal queues full on NCQ-capable devices, and hence + * to boost the throughput, without causing 'almost' any loss of service + * guarantees. The 'almost' follows from the fact that, if the internal + * queue of one such device is filled while all the sub-conditions hold, + * but at some point in time some sub-condition stops to hold, then it may + * become impossible to let requests be served in the new desired order + * until all the requests already queued in the device have been served. + */ +static inline bool bfq_bfqq_must_not_expire(struct bfq_queue *bfqq) +{ + struct bfq_data *bfqd = bfqq->bfqd; +#define cond_for_seeky_on_ncq_hdd (bfq_bfqq_constantly_seeky(bfqq) && \ + bfqd->busy_in_flight_queues == \ + bfqd->const_seeky_busy_in_flight_queues) + +#define cond_for_expiring_in_burst (bfq_bfqq_in_large_burst(bfqq) && \ + bfqd->hw_tag && \ + (blk_queue_nonrot(bfqd->queue) || \ + bfq_bfqq_constantly_seeky(bfqq))) + +/* + * Condition for expiring a non-weight-raised queue (and hence not idling + * the device). + */ +#define cond_for_expiring_non_wr (bfqd->hw_tag && \ + (bfqd->wr_busy_queues > 0 || \ + (blk_queue_nonrot(bfqd->queue) || \ + cond_for_seeky_on_ncq_hdd))) + + return bfq_bfqq_sync(bfqq) && + !cond_for_expiring_in_burst && + (bfqq->wr_coeff > 1 || !symmetric_scenario || + (bfq_bfqq_IO_bound(bfqq) && bfq_bfqq_idle_window(bfqq) && + !cond_for_expiring_non_wr) + ); +} + +/* + * If the in-service queue is empty but sync, and the function + * bfq_bfqq_must_not_expire returns true, then: + * 1) the queue must remain in service and cannot be expired, and + * 2) the disk must be idled to wait for the possible arrival of a new + * request for the queue. + * See the comments to the function bfq_bfqq_must_not_expire for the reasons + * why performing device idling is the best choice to boost the throughput + * and preserve service guarantees when bfq_bfqq_must_not_expire itself + * returns true. + */ +static inline bool bfq_bfqq_must_idle(struct bfq_queue *bfqq) +{ + struct bfq_data *bfqd = bfqq->bfqd; + + return RB_EMPTY_ROOT(&bfqq->sort_list) && bfqd->bfq_slice_idle != 0 && + bfq_bfqq_must_not_expire(bfqq); +} + +/* + * Select a queue for service. If we have a current queue in service, + * check whether to continue servicing it, or retrieve and set a new one. + */ +static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) +{ + struct bfq_queue *bfqq; + struct request *next_rq; + enum bfqq_expiration reason = BFQ_BFQQ_BUDGET_TIMEOUT; + + bfqq = bfqd->in_service_queue; + if (bfqq == NULL) + goto new_queue; + + bfq_log_bfqq(bfqd, bfqq, "select_queue: already in-service queue"); + + if (bfq_may_expire_for_budg_timeout(bfqq) && + !timer_pending(&bfqd->idle_slice_timer) && + !bfq_bfqq_must_idle(bfqq)) + goto expire; + + next_rq = bfqq->next_rq; + /* + * If bfqq has requests queued and it has enough budget left to + * serve them, keep the queue, otherwise expire it. + */ + if (next_rq != NULL) { + if (bfq_serv_to_charge(next_rq, bfqq) > + bfq_bfqq_budget_left(bfqq)) { + reason = BFQ_BFQQ_BUDGET_EXHAUSTED; + goto expire; + } else { + /* + * The idle timer may be pending because we may + * not disable disk idling even when a new request + * arrives. + */ + if (timer_pending(&bfqd->idle_slice_timer)) { + /* + * If we get here: 1) at least a new request + * has arrived but we have not disabled the + * timer because the request was too small, + * 2) then the block layer has unplugged + * the device, causing the dispatch to be + * invoked. + * + * Since the device is unplugged, now the + * requests are probably large enough to + * provide a reasonable throughput. + * So we disable idling. + */ + bfq_clear_bfqq_wait_request(bfqq); + del_timer(&bfqd->idle_slice_timer); + } + goto keep_queue; + } + } + + /* + * No requests pending. However, if the in-service queue is idling + * for a new request, or has requests waiting for a completion and + * may idle after their completion, then keep it anyway. + */ + if (timer_pending(&bfqd->idle_slice_timer) || + (bfqq->dispatched != 0 && bfq_bfqq_must_not_expire(bfqq))) { + bfqq = NULL; + goto keep_queue; + } + + reason = BFQ_BFQQ_NO_MORE_REQUESTS; +expire: + bfq_bfqq_expire(bfqd, bfqq, 0, reason); +new_queue: + bfqq = bfq_set_in_service_queue(bfqd); + bfq_log(bfqd, "select_queue: new queue %d returned", + bfqq != NULL ? bfqq->pid : 0); +keep_queue: + return bfqq; +} + +static void bfq_update_wr_data(struct bfq_data *bfqd, struct bfq_queue *bfqq) +{ + struct bfq_entity *entity = &bfqq->entity; + if (bfqq->wr_coeff > 1) { /* queue is being weight-raised */ + bfq_log_bfqq(bfqd, bfqq, + "raising period dur %u/%u msec, old coeff %u, w %d(%d)", + jiffies_to_msecs(jiffies - bfqq->last_wr_start_finish), + jiffies_to_msecs(bfqq->wr_cur_max_time), + bfqq->wr_coeff, + bfqq->entity.weight, bfqq->entity.orig_weight); + + BUG_ON(bfqq != bfqd->in_service_queue && entity->weight != + entity->orig_weight * bfqq->wr_coeff); + if (entity->ioprio_changed) + bfq_log_bfqq(bfqd, bfqq, "WARN: pending prio change"); + + /* + * If the queue was activated in a burst, or + * too much time has elapsed from the beginning + * of this weight-raising period, or the queue has + * exceeded the acceptable number of cooperations, + * then end weight raising. + */ + if (bfq_bfqq_in_large_burst(bfqq) || + bfq_bfqq_cooperations(bfqq) >= bfqd->bfq_coop_thresh || + time_is_before_jiffies(bfqq->last_wr_start_finish + + bfqq->wr_cur_max_time)) { + bfqq->last_wr_start_finish = jiffies; + bfq_log_bfqq(bfqd, bfqq, + "wrais ending at %lu, rais_max_time %u", + bfqq->last_wr_start_finish, + jiffies_to_msecs(bfqq->wr_cur_max_time)); + bfq_bfqq_end_wr(bfqq); + } + } + /* Update weight both if it must be raised and if it must be lowered */ + if ((entity->weight > entity->orig_weight) != (bfqq->wr_coeff > 1)) + __bfq_entity_update_weight_prio( + bfq_entity_service_tree(entity), + entity); +} + +/* + * Dispatch one request from bfqq, moving it to the request queue + * dispatch list. + */ +static int bfq_dispatch_request(struct bfq_data *bfqd, + struct bfq_queue *bfqq) +{ + int dispatched = 0; + struct request *rq; + unsigned long service_to_charge; + + BUG_ON(RB_EMPTY_ROOT(&bfqq->sort_list)); + + /* Follow expired path, else get first next available. */ + rq = bfq_check_fifo(bfqq); + if (rq == NULL) + rq = bfqq->next_rq; + service_to_charge = bfq_serv_to_charge(rq, bfqq); + + if (service_to_charge > bfq_bfqq_budget_left(bfqq)) { + /* + * This may happen if the next rq is chosen in fifo order + * instead of sector order. The budget is properly + * dimensioned to be always sufficient to serve the next + * request only if it is chosen in sector order. The reason + * is that it would be quite inefficient and little useful + * to always make sure that the budget is large enough to + * serve even the possible next rq in fifo order. + * In fact, requests are seldom served in fifo order. + * + * Expire the queue for budget exhaustion, and make sure + * that the next act_budget is enough to serve the next + * request, even if it comes from the fifo expired path. + */ + bfqq->next_rq = rq; + /* + * Since this dispatch is failed, make sure that + * a new one will be performed + */ + if (!bfqd->rq_in_driver) + bfq_schedule_dispatch(bfqd); + goto expire; + } + + /* Finally, insert request into driver dispatch list. */ + bfq_bfqq_served(bfqq, service_to_charge); + bfq_dispatch_insert(bfqd->queue, rq); + + bfq_update_wr_data(bfqd, bfqq); + + bfq_log_bfqq(bfqd, bfqq, + "dispatched %u sec req (%llu), budg left %lu", + blk_rq_sectors(rq), + (long long unsigned)blk_rq_pos(rq), + bfq_bfqq_budget_left(bfqq)); + + dispatched++; + + if (bfqd->in_service_bic == NULL) { + atomic_long_inc(&RQ_BIC(rq)->icq.ioc->refcount); + bfqd->in_service_bic = RQ_BIC(rq); + } + + if (bfqd->busy_queues > 1 && ((!bfq_bfqq_sync(bfqq) && + dispatched >= bfqd->bfq_max_budget_async_rq) || + bfq_class_idle(bfqq))) + goto expire; + + return dispatched; + +expire: + bfq_bfqq_expire(bfqd, bfqq, 0, BFQ_BFQQ_BUDGET_EXHAUSTED); + return dispatched; +} + +static int __bfq_forced_dispatch_bfqq(struct bfq_queue *bfqq) +{ + int dispatched = 0; + + while (bfqq->next_rq != NULL) { + bfq_dispatch_insert(bfqq->bfqd->queue, bfqq->next_rq); + dispatched++; + } + + BUG_ON(!list_empty(&bfqq->fifo)); + return dispatched; +} + +/* + * Drain our current requests. + * Used for barriers and when switching io schedulers on-the-fly. + */ +static int bfq_forced_dispatch(struct bfq_data *bfqd) +{ + struct bfq_queue *bfqq, *n; + struct bfq_service_tree *st; + int dispatched = 0; + + bfqq = bfqd->in_service_queue; + if (bfqq != NULL) + __bfq_bfqq_expire(bfqd, bfqq); + + /* + * Loop through classes, and be careful to leave the scheduler + * in a consistent state, as feedback mechanisms and vtime + * updates cannot be disabled during the process. + */ + list_for_each_entry_safe(bfqq, n, &bfqd->active_list, bfqq_list) { + st = bfq_entity_service_tree(&bfqq->entity); + + dispatched += __bfq_forced_dispatch_bfqq(bfqq); + bfqq->max_budget = bfq_max_budget(bfqd); + + bfq_forget_idle(st); + } + + BUG_ON(bfqd->busy_queues != 0); + + return dispatched; +} + +static int bfq_dispatch_requests(struct request_queue *q, int force) +{ + struct bfq_data *bfqd = q->elevator->elevator_data; + struct bfq_queue *bfqq; + int max_dispatch; + + bfq_log(bfqd, "dispatch requests: %d busy queues", bfqd->busy_queues); + if (bfqd->busy_queues == 0) + return 0; + + if (unlikely(force)) + return bfq_forced_dispatch(bfqd); + + bfqq = bfq_select_queue(bfqd); + if (bfqq == NULL) + return 0; + + if (bfq_class_idle(bfqq)) + max_dispatch = 1; + + if (!bfq_bfqq_sync(bfqq)) + max_dispatch = bfqd->bfq_max_budget_async_rq; + + if (!bfq_bfqq_sync(bfqq) && bfqq->dispatched >= max_dispatch) { + if (bfqd->busy_queues > 1) + return 0; + if (bfqq->dispatched >= 4 * max_dispatch) + return 0; + } + + if (bfqd->sync_flight != 0 && !bfq_bfqq_sync(bfqq)) + return 0; + + bfq_clear_bfqq_wait_request(bfqq); + BUG_ON(timer_pending(&bfqd->idle_slice_timer)); + + if (!bfq_dispatch_request(bfqd, bfqq)) + return 0; + + bfq_log_bfqq(bfqd, bfqq, "dispatched %s request", + bfq_bfqq_sync(bfqq) ? "sync" : "async"); + + return 1; +} + +/* + * Task holds one reference to the queue, dropped when task exits. Each rq + * in-flight on this queue also holds a reference, dropped when rq is freed. + * + * Queue lock must be held here. + */ +static void bfq_put_queue(struct bfq_queue *bfqq) +{ + struct bfq_data *bfqd = bfqq->bfqd; + + BUG_ON(atomic_read(&bfqq->ref) <= 0); + + bfq_log_bfqq(bfqd, bfqq, "put_queue: %p %d", bfqq, + atomic_read(&bfqq->ref)); + if (!atomic_dec_and_test(&bfqq->ref)) + return; + + BUG_ON(rb_first(&bfqq->sort_list) != NULL); + BUG_ON(bfqq->allocated[READ] + bfqq->allocated[WRITE] != 0); + BUG_ON(bfqq->entity.tree != NULL); + BUG_ON(bfq_bfqq_busy(bfqq)); + BUG_ON(bfqd->in_service_queue == bfqq); + + if (bfq_bfqq_sync(bfqq)) + /* + * The fact that this queue is being destroyed does not + * invalidate the fact that this queue may have been + * activated during the current burst. As a consequence, + * although the queue does not exist anymore, and hence + * needs to be removed from the burst list if there, + * the burst size has not to be decremented. + */ + hlist_del_init(&bfqq->burst_list_node); + + bfq_log_bfqq(bfqd, bfqq, "put_queue: %p freed", bfqq); + + kmem_cache_free(bfq_pool, bfqq); +} + +static void bfq_put_cooperator(struct bfq_queue *bfqq) +{ + struct bfq_queue *__bfqq, *next; + + /* + * If this queue was scheduled to merge with another queue, be + * sure to drop the reference taken on that queue (and others in + * the merge chain). See bfq_setup_merge and bfq_merge_bfqqs. + */ + __bfqq = bfqq->new_bfqq; + while (__bfqq) { + if (__bfqq == bfqq) + break; + next = __bfqq->new_bfqq; + bfq_put_queue(__bfqq); + __bfqq = next; + } +} + +static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq) +{ + if (bfqq == bfqd->in_service_queue) { + __bfq_bfqq_expire(bfqd, bfqq); + bfq_schedule_dispatch(bfqd); + } + + bfq_log_bfqq(bfqd, bfqq, "exit_bfqq: %p, %d", bfqq, + atomic_read(&bfqq->ref)); + + bfq_put_cooperator(bfqq); + + bfq_put_queue(bfqq); +} + +static inline void bfq_init_icq(struct io_cq *icq) +{ + struct bfq_io_cq *bic = icq_to_bic(icq); + + bic->ttime.last_end_request = jiffies; + /* + * A newly created bic indicates that the process has just + * started doing I/O, and is probably mapping into memory its + * executable and libraries: it definitely needs weight raising. + * There is however the possibility that the process performs, + * for a while, I/O close to some other process. EQM intercepts + * this behavior and may merge the queue corresponding to the + * process with some other queue, BEFORE the weight of the queue + * is raised. Merged queues are not weight-raised (they are assumed + * to belong to processes that benefit only from high throughput). + * If the merge is basically the consequence of an accident, then + * the queue will be split soon and will get back its old weight. + * It is then important to write down somewhere that this queue + * does need weight raising, even if it did not make it to get its + * weight raised before being merged. To this purpose, we overload + * the field raising_time_left and assign 1 to it, to mark the queue + * as needing weight raising. + */ + bic->wr_time_left = 1; +} + +static void bfq_exit_icq(struct io_cq *icq) +{ + struct bfq_io_cq *bic = icq_to_bic(icq); + struct bfq_data *bfqd = bic_to_bfqd(bic); + + if (bic->bfqq[BLK_RW_ASYNC]) { + bfq_exit_bfqq(bfqd, bic->bfqq[BLK_RW_ASYNC]); + bic->bfqq[BLK_RW_ASYNC] = NULL; + } + + if (bic->bfqq[BLK_RW_SYNC]) { + /* + * If the bic is using a shared queue, put the reference + * taken on the io_context when the bic started using a + * shared bfq_queue. + */ + if (bfq_bfqq_coop(bic->bfqq[BLK_RW_SYNC])) + put_io_context(icq->ioc); + bfq_exit_bfqq(bfqd, bic->bfqq[BLK_RW_SYNC]); + bic->bfqq[BLK_RW_SYNC] = NULL; + } +} + +/* + * Update the entity prio values; note that the new values will not + * be used until the next (re)activation. + */ +static void bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic) +{ + struct task_struct *tsk = current; + int ioprio_class; + + ioprio_class = IOPRIO_PRIO_CLASS(bic->ioprio); + switch (ioprio_class) { + default: + dev_err(bfqq->bfqd->queue->backing_dev_info.dev, + "bfq: bad prio class %d\n", ioprio_class); + case IOPRIO_CLASS_NONE: + /* + * No prio set, inherit CPU scheduling settings. + */ + bfqq->entity.new_ioprio = task_nice_ioprio(tsk); + bfqq->entity.new_ioprio_class = task_nice_ioclass(tsk); + break; + case IOPRIO_CLASS_RT: + bfqq->entity.new_ioprio = IOPRIO_PRIO_DATA(bic->ioprio); + bfqq->entity.new_ioprio_class = IOPRIO_CLASS_RT; + break; + case IOPRIO_CLASS_BE: + bfqq->entity.new_ioprio = IOPRIO_PRIO_DATA(bic->ioprio); + bfqq->entity.new_ioprio_class = IOPRIO_CLASS_BE; + break; + case IOPRIO_CLASS_IDLE: + bfqq->entity.new_ioprio_class = IOPRIO_CLASS_IDLE; + bfqq->entity.new_ioprio = 7; + bfq_clear_bfqq_idle_window(bfqq); + break; + } + + if (bfqq->entity.new_ioprio < 0 || + bfqq->entity.new_ioprio >= IOPRIO_BE_NR) { + printk(KERN_CRIT "bfq_set_next_ioprio_data: new_ioprio %d\n", + bfqq->entity.new_ioprio); + BUG(); + } + + bfqq->entity.new_weight = bfq_ioprio_to_weight(bfqq->entity.new_ioprio); + bfqq->entity.ioprio_changed = 1; +} + +static void bfq_check_ioprio_change(struct bfq_io_cq *bic) +{ + struct bfq_data *bfqd; + struct bfq_queue *bfqq, *new_bfqq; + struct bfq_group *bfqg; + unsigned long uninitialized_var(flags); + int ioprio = bic->icq.ioc->ioprio; + + bfqd = bfq_get_bfqd_locked(&(bic->icq.q->elevator->elevator_data), + &flags); + /* + * This condition may trigger on a newly created bic, be sure to + * drop the lock before returning. + */ + if (unlikely(bfqd == NULL) || likely(bic->ioprio == ioprio)) + goto out; + + bic->ioprio = ioprio; + + bfqq = bic->bfqq[BLK_RW_ASYNC]; + if (bfqq != NULL) { + bfqg = container_of(bfqq->entity.sched_data, struct bfq_group, + sched_data); + new_bfqq = bfq_get_queue(bfqd, bfqg, BLK_RW_ASYNC, bic, + GFP_ATOMIC); + if (new_bfqq != NULL) { + bic->bfqq[BLK_RW_ASYNC] = new_bfqq; + bfq_log_bfqq(bfqd, bfqq, + "check_ioprio_change: bfqq %p %d", + bfqq, atomic_read(&bfqq->ref)); + bfq_put_queue(bfqq); + } + } + + bfqq = bic->bfqq[BLK_RW_SYNC]; + if (bfqq != NULL) + bfq_set_next_ioprio_data(bfqq, bic); + +out: + bfq_put_bfqd_unlock(bfqd, &flags); +} + +static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, + struct bfq_io_cq *bic, pid_t pid, int is_sync) +{ + RB_CLEAR_NODE(&bfqq->entity.rb_node); + INIT_LIST_HEAD(&bfqq->fifo); + INIT_HLIST_NODE(&bfqq->burst_list_node); + + atomic_set(&bfqq->ref, 0); + bfqq->bfqd = bfqd; + + if (bic) + bfq_set_next_ioprio_data(bfqq, bic); + + if (is_sync) { + if (!bfq_class_idle(bfqq)) + bfq_mark_bfqq_idle_window(bfqq); + bfq_mark_bfqq_sync(bfqq); + } + bfq_mark_bfqq_IO_bound(bfqq); + + /* Tentative initial value to trade off between thr and lat */ + bfqq->max_budget = (2 * bfq_max_budget(bfqd)) / 3; + bfqq->pid = pid; + + bfqq->wr_coeff = 1; + bfqq->last_wr_start_finish = 0; + /* + * Set to the value for which bfqq will not be deemed as + * soft rt when it becomes backlogged. + */ + bfqq->soft_rt_next_start = bfq_infinity_from_now(jiffies); +} + +static struct bfq_queue *bfq_find_alloc_queue(struct bfq_data *bfqd, + struct bfq_group *bfqg, + int is_sync, + struct bfq_io_cq *bic, + gfp_t gfp_mask) +{ + struct bfq_queue *bfqq, *new_bfqq = NULL; + +retry: + /* bic always exists here */ + bfqq = bic_to_bfqq(bic, is_sync); + + /* + * Always try a new alloc if we fall back to the OOM bfqq + * originally, since it should just be a temporary situation. + */ + if (bfqq == NULL || bfqq == &bfqd->oom_bfqq) { + bfqq = NULL; + if (new_bfqq != NULL) { + bfqq = new_bfqq; + new_bfqq = NULL; + } else if (gfp_mask & __GFP_WAIT) { + spin_unlock_irq(bfqd->queue->queue_lock); + new_bfqq = kmem_cache_alloc_node(bfq_pool, + gfp_mask | __GFP_ZERO, + bfqd->queue->node); + spin_lock_irq(bfqd->queue->queue_lock); + if (new_bfqq != NULL) + goto retry; + } else { + bfqq = kmem_cache_alloc_node(bfq_pool, + gfp_mask | __GFP_ZERO, + bfqd->queue->node); + } + + if (bfqq != NULL) { + bfq_init_bfqq(bfqd, bfqq, bic, current->pid, + is_sync); + bfq_init_entity(&bfqq->entity, bfqg); + bfq_log_bfqq(bfqd, bfqq, "allocated"); + } else { + bfqq = &bfqd->oom_bfqq; + bfq_log_bfqq(bfqd, bfqq, "using oom bfqq"); + } + } + + if (new_bfqq != NULL) + kmem_cache_free(bfq_pool, new_bfqq); + + return bfqq; +} + +static struct bfq_queue **bfq_async_queue_prio(struct bfq_data *bfqd, + struct bfq_group *bfqg, + int ioprio_class, int ioprio) +{ + switch (ioprio_class) { + case IOPRIO_CLASS_RT: + return &bfqg->async_bfqq[0][ioprio]; + case IOPRIO_CLASS_NONE: + ioprio = IOPRIO_NORM; + /* fall through */ + case IOPRIO_CLASS_BE: + return &bfqg->async_bfqq[1][ioprio]; + case IOPRIO_CLASS_IDLE: + return &bfqg->async_idle_bfqq; + default: + BUG(); + } +} + +static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd, + struct bfq_group *bfqg, int is_sync, + struct bfq_io_cq *bic, gfp_t gfp_mask) +{ + const int ioprio = IOPRIO_PRIO_DATA(bic->ioprio); + const int ioprio_class = IOPRIO_PRIO_CLASS(bic->ioprio); + struct bfq_queue **async_bfqq = NULL; + struct bfq_queue *bfqq = NULL; + + if (!is_sync) { + async_bfqq = bfq_async_queue_prio(bfqd, bfqg, ioprio_class, + ioprio); + bfqq = *async_bfqq; + } + + if (bfqq == NULL) + bfqq = bfq_find_alloc_queue(bfqd, bfqg, is_sync, bic, gfp_mask); + + /* + * Pin the queue now that it's allocated, scheduler exit will + * prune it. + */ + if (!is_sync && *async_bfqq == NULL) { + atomic_inc(&bfqq->ref); + bfq_log_bfqq(bfqd, bfqq, "get_queue, bfqq not in async: %p, %d", + bfqq, atomic_read(&bfqq->ref)); + *async_bfqq = bfqq; + } + + atomic_inc(&bfqq->ref); + bfq_log_bfqq(bfqd, bfqq, "get_queue, at end: %p, %d", bfqq, + atomic_read(&bfqq->ref)); + return bfqq; +} + +static void bfq_update_io_thinktime(struct bfq_data *bfqd, + struct bfq_io_cq *bic) +{ + unsigned long elapsed = jiffies - bic->ttime.last_end_request; + unsigned long ttime = min(elapsed, 2UL * bfqd->bfq_slice_idle); + + bic->ttime.ttime_samples = (7*bic->ttime.ttime_samples + 256) / 8; + bic->ttime.ttime_total = (7*bic->ttime.ttime_total + 256*ttime) / 8; + bic->ttime.ttime_mean = (bic->ttime.ttime_total + 128) / + bic->ttime.ttime_samples; +} + +static void bfq_update_io_seektime(struct bfq_data *bfqd, + struct bfq_queue *bfqq, + struct request *rq) +{ + sector_t sdist; + u64 total; + + if (bfqq->last_request_pos < blk_rq_pos(rq)) + sdist = blk_rq_pos(rq) - bfqq->last_request_pos; + else + sdist = bfqq->last_request_pos - blk_rq_pos(rq); + + /* + * Don't allow the seek distance to get too large from the + * odd fragment, pagein, etc. + */ + if (bfqq->seek_samples == 0) /* first request, not really a seek */ + sdist = 0; + else if (bfqq->seek_samples <= 60) /* second & third seek */ + sdist = min(sdist, (bfqq->seek_mean * 4) + 2*1024*1024); + else + sdist = min(sdist, (bfqq->seek_mean * 4) + 2*1024*64); + + bfqq->seek_samples = (7*bfqq->seek_samples + 256) / 8; + bfqq->seek_total = (7*bfqq->seek_total + (u64)256*sdist) / 8; + total = bfqq->seek_total + (bfqq->seek_samples/2); + do_div(total, bfqq->seek_samples); + bfqq->seek_mean = (sector_t)total; + + bfq_log_bfqq(bfqd, bfqq, "dist=%llu mean=%llu", (u64)sdist, + (u64)bfqq->seek_mean); +} + +/* + * Disable idle window if the process thinks too long or seeks so much that + * it doesn't matter. + */ +static void bfq_update_idle_window(struct bfq_data *bfqd, + struct bfq_queue *bfqq, + struct bfq_io_cq *bic) +{ + int enable_idle; + + /* Don't idle for async or idle io prio class. */ + if (!bfq_bfqq_sync(bfqq) || bfq_class_idle(bfqq)) + return; + + /* Idle window just restored, statistics are meaningless. */ + if (bfq_bfqq_just_split(bfqq)) + return; + + enable_idle = bfq_bfqq_idle_window(bfqq); + + if (atomic_read(&bic->icq.ioc->active_ref) == 0 || + bfqd->bfq_slice_idle == 0 || + (bfqd->hw_tag && BFQQ_SEEKY(bfqq) && + bfqq->wr_coeff == 1)) + enable_idle = 0; + else if (bfq_sample_valid(bic->ttime.ttime_samples)) { + if (bic->ttime.ttime_mean > bfqd->bfq_slice_idle && + bfqq->wr_coeff == 1) + enable_idle = 0; + else + enable_idle = 1; + } + bfq_log_bfqq(bfqd, bfqq, "update_idle_window: enable_idle %d", + enable_idle); + + if (enable_idle) + bfq_mark_bfqq_idle_window(bfqq); + else + bfq_clear_bfqq_idle_window(bfqq); +} + +/* + * Called when a new fs request (rq) is added to bfqq. Check if there's + * something we should do about it. + */ +static void bfq_rq_enqueued(struct bfq_data *bfqd, struct bfq_queue *bfqq, + struct request *rq) +{ + struct bfq_io_cq *bic = RQ_BIC(rq); + + if (rq->cmd_flags & REQ_META) + bfqq->meta_pending++; + + bfq_update_io_thinktime(bfqd, bic); + bfq_update_io_seektime(bfqd, bfqq, rq); + if (!BFQQ_SEEKY(bfqq) && bfq_bfqq_constantly_seeky(bfqq)) { + bfq_clear_bfqq_constantly_seeky(bfqq); + if (!blk_queue_nonrot(bfqd->queue)) { + BUG_ON(!bfqd->const_seeky_busy_in_flight_queues); + bfqd->const_seeky_busy_in_flight_queues--; + } + } + if (bfqq->entity.service > bfq_max_budget(bfqd) / 8 || + !BFQQ_SEEKY(bfqq)) + bfq_update_idle_window(bfqd, bfqq, bic); + bfq_clear_bfqq_just_split(bfqq); + + bfq_log_bfqq(bfqd, bfqq, + "rq_enqueued: idle_window=%d (seeky %d, mean %llu)", + bfq_bfqq_idle_window(bfqq), BFQQ_SEEKY(bfqq), + (long long unsigned)bfqq->seek_mean); + + bfqq->last_request_pos = blk_rq_pos(rq) + blk_rq_sectors(rq); + + if (bfqq == bfqd->in_service_queue && bfq_bfqq_wait_request(bfqq)) { + int small_req = bfqq->queued[rq_is_sync(rq)] == 1 && + blk_rq_sectors(rq) < 32; + int budget_timeout = bfq_bfqq_budget_timeout(bfqq); + + /* + * There is just this request queued: if the request + * is small and the queue is not to be expired, then + * just exit. + * + * In this way, if the disk is being idled to wait for + * a new request from the in-service queue, we avoid + * unplugging the device and committing the disk to serve + * just a small request. On the contrary, we wait for + * the block layer to decide when to unplug the device: + * hopefully, new requests will be merged to this one + * quickly, then the device will be unplugged and + * larger requests will be dispatched. + */ + if (small_req && !budget_timeout) + return; + + /* + * A large enough request arrived, or the queue is to + * be expired: in both cases disk idling is to be + * stopped, so clear wait_request flag and reset + * timer. + */ + bfq_clear_bfqq_wait_request(bfqq); + del_timer(&bfqd->idle_slice_timer); + + /* + * The queue is not empty, because a new request just + * arrived. Hence we can safely expire the queue, in + * case of budget timeout, without risking that the + * timestamps of the queue are not updated correctly. + * See [1] for more details. + */ + if (budget_timeout) + bfq_bfqq_expire(bfqd, bfqq, 0, BFQ_BFQQ_BUDGET_TIMEOUT); + + /* + * Let the request rip immediately, or let a new queue be + * selected if bfqq has just been expired. + */ + __blk_run_queue(bfqd->queue); + } +} + +static void bfq_insert_request(struct request_queue *q, struct request *rq) +{ + struct bfq_data *bfqd = q->elevator->elevator_data; + struct bfq_queue *bfqq = RQ_BFQQ(rq), *new_bfqq; + + assert_spin_locked(bfqd->queue->queue_lock); + + /* + * An unplug may trigger a requeue of a request from the device + * driver: make sure we are in process context while trying to + * merge two bfq_queues. + */ + if (!in_interrupt()) { + new_bfqq = bfq_setup_cooperator(bfqd, bfqq, rq, true); + if (new_bfqq != NULL) { + if (bic_to_bfqq(RQ_BIC(rq), 1) != bfqq) + new_bfqq = bic_to_bfqq(RQ_BIC(rq), 1); + /* + * Release the request's reference to the old bfqq + * and make sure one is taken to the shared queue. + */ + new_bfqq->allocated[rq_data_dir(rq)]++; + bfqq->allocated[rq_data_dir(rq)]--; + atomic_inc(&new_bfqq->ref); + bfq_put_queue(bfqq); + if (bic_to_bfqq(RQ_BIC(rq), 1) == bfqq) + bfq_merge_bfqqs(bfqd, RQ_BIC(rq), + bfqq, new_bfqq); + rq->elv.priv[1] = new_bfqq; + bfqq = new_bfqq; + } else + bfq_bfqq_increase_failed_cooperations(bfqq); + } + + bfq_add_request(rq); + + /* + * Here a newly-created bfq_queue has already started a weight-raising + * period: clear raising_time_left to prevent bfq_bfqq_save_state() + * from assigning it a full weight-raising period. See the detailed + * comments about this field in bfq_init_icq(). + */ + if (bfqq->bic != NULL) + bfqq->bic->wr_time_left = 0; + rq_set_fifo_time(rq, jiffies + bfqd->bfq_fifo_expire[rq_is_sync(rq)]); + list_add_tail(&rq->queuelist, &bfqq->fifo); + + bfq_rq_enqueued(bfqd, bfqq, rq); +} + +static void bfq_update_hw_tag(struct bfq_data *bfqd) +{ + bfqd->max_rq_in_driver = max(bfqd->max_rq_in_driver, + bfqd->rq_in_driver); + + if (bfqd->hw_tag == 1) + return; + + /* + * This sample is valid if the number of outstanding requests + * is large enough to allow a queueing behavior. Note that the + * sum is not exact, as it's not taking into account deactivated + * requests. + */ + if (bfqd->rq_in_driver + bfqd->queued < BFQ_HW_QUEUE_THRESHOLD) + return; + + if (bfqd->hw_tag_samples++ < BFQ_HW_QUEUE_SAMPLES) + return; + + bfqd->hw_tag = bfqd->max_rq_in_driver > BFQ_HW_QUEUE_THRESHOLD; + bfqd->max_rq_in_driver = 0; + bfqd->hw_tag_samples = 0; +} + +static void bfq_completed_request(struct request_queue *q, struct request *rq) +{ + struct bfq_queue *bfqq = RQ_BFQQ(rq); + struct bfq_data *bfqd = bfqq->bfqd; + bool sync = bfq_bfqq_sync(bfqq); + + bfq_log_bfqq(bfqd, bfqq, "completed one req with %u sects left (%d)", + blk_rq_sectors(rq), sync); + + bfq_update_hw_tag(bfqd); + + BUG_ON(!bfqd->rq_in_driver); + BUG_ON(!bfqq->dispatched); + bfqd->rq_in_driver--; + bfqq->dispatched--; + + if (!bfqq->dispatched && !bfq_bfqq_busy(bfqq)) { + bfq_weights_tree_remove(bfqd, &bfqq->entity, + &bfqd->queue_weights_tree); + if (!blk_queue_nonrot(bfqd->queue)) { + BUG_ON(!bfqd->busy_in_flight_queues); + bfqd->busy_in_flight_queues--; + if (bfq_bfqq_constantly_seeky(bfqq)) { + BUG_ON(!bfqd-> + const_seeky_busy_in_flight_queues); + bfqd->const_seeky_busy_in_flight_queues--; + } + } + } + + if (sync) { + bfqd->sync_flight--; + RQ_BIC(rq)->ttime.last_end_request = jiffies; + } + + /* + * If we are waiting to discover whether the request pattern of the + * task associated with the queue is actually isochronous, and + * both requisites for this condition to hold are satisfied, then + * compute soft_rt_next_start (see the comments to the function + * bfq_bfqq_softrt_next_start()). + */ + if (bfq_bfqq_softrt_update(bfqq) && bfqq->dispatched == 0 && + RB_EMPTY_ROOT(&bfqq->sort_list)) + bfqq->soft_rt_next_start = + bfq_bfqq_softrt_next_start(bfqd, bfqq); + + /* + * If this is the in-service queue, check if it needs to be expired, + * or if we want to idle in case it has no pending requests. + */ + if (bfqd->in_service_queue == bfqq) { + if (bfq_bfqq_budget_new(bfqq)) + bfq_set_budget_timeout(bfqd); + + if (bfq_bfqq_must_idle(bfqq)) { + bfq_arm_slice_timer(bfqd); + goto out; + } else if (bfq_may_expire_for_budg_timeout(bfqq)) + bfq_bfqq_expire(bfqd, bfqq, 0, BFQ_BFQQ_BUDGET_TIMEOUT); + else if (RB_EMPTY_ROOT(&bfqq->sort_list) && + (bfqq->dispatched == 0 || + !bfq_bfqq_must_not_expire(bfqq))) + bfq_bfqq_expire(bfqd, bfqq, 0, + BFQ_BFQQ_NO_MORE_REQUESTS); + } + + if (!bfqd->rq_in_driver) + bfq_schedule_dispatch(bfqd); + +out: + return; +} + +static inline int __bfq_may_queue(struct bfq_queue *bfqq) +{ + if (bfq_bfqq_wait_request(bfqq) && bfq_bfqq_must_alloc(bfqq)) { + bfq_clear_bfqq_must_alloc(bfqq); + return ELV_MQUEUE_MUST; + } + + return ELV_MQUEUE_MAY; +} + +static int bfq_may_queue(struct request_queue *q, int rw) +{ + struct bfq_data *bfqd = q->elevator->elevator_data; + struct task_struct *tsk = current; + struct bfq_io_cq *bic; + struct bfq_queue *bfqq; + + /* + * Don't force setup of a queue from here, as a call to may_queue + * does not necessarily imply that a request actually will be + * queued. So just lookup a possibly existing queue, or return + * 'may queue' if that fails. + */ + bic = bfq_bic_lookup(bfqd, tsk->io_context); + if (bic == NULL) + return ELV_MQUEUE_MAY; + + bfqq = bic_to_bfqq(bic, rw_is_sync(rw)); + if (bfqq != NULL) + return __bfq_may_queue(bfqq); + + return ELV_MQUEUE_MAY; +} + +/* + * Queue lock held here. + */ +static void bfq_put_request(struct request *rq) +{ + struct bfq_queue *bfqq = RQ_BFQQ(rq); + + if (bfqq != NULL) { + const int rw = rq_data_dir(rq); + + BUG_ON(!bfqq->allocated[rw]); + bfqq->allocated[rw]--; + + rq->elv.priv[0] = NULL; + rq->elv.priv[1] = NULL; + + bfq_log_bfqq(bfqq->bfqd, bfqq, "put_request %p, %d", + bfqq, atomic_read(&bfqq->ref)); + bfq_put_queue(bfqq); + } +} + +/* + * Returns NULL if a new bfqq should be allocated, or the old bfqq if this + * was the last process referring to said bfqq. + */ +static struct bfq_queue * +bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq) +{ + bfq_log_bfqq(bfqq->bfqd, bfqq, "splitting queue"); + + put_io_context(bic->icq.ioc); + + if (bfqq_process_refs(bfqq) == 1) { + bfqq->pid = current->pid; + bfq_clear_bfqq_coop(bfqq); + bfq_clear_bfqq_split_coop(bfqq); + return bfqq; + } + + bic_set_bfqq(bic, NULL, 1); + + bfq_put_cooperator(bfqq); + + bfq_put_queue(bfqq); + return NULL; +} + +/* + * Allocate bfq data structures associated with this request. + */ +static int bfq_set_request(struct request_queue *q, struct request *rq, + struct bio *bio, gfp_t gfp_mask) +{ + struct bfq_data *bfqd = q->elevator->elevator_data; + struct bfq_io_cq *bic = icq_to_bic(rq->elv.icq); + const int rw = rq_data_dir(rq); + const int is_sync = rq_is_sync(rq); + struct bfq_queue *bfqq; + struct bfq_group *bfqg; + unsigned long flags; + bool split = false; + + might_sleep_if(gfp_mask & __GFP_WAIT); + + bfq_check_ioprio_change(bic); + + spin_lock_irqsave(q->queue_lock, flags); + + if (bic == NULL) + goto queue_fail; + + bfqg = bfq_bic_update_cgroup(bic); + +new_queue: + bfqq = bic_to_bfqq(bic, is_sync); + if (bfqq == NULL || bfqq == &bfqd->oom_bfqq) { + bfqq = bfq_get_queue(bfqd, bfqg, is_sync, bic, gfp_mask); + bic_set_bfqq(bic, bfqq, is_sync); + if (split && is_sync) { + if ((bic->was_in_burst_list && bfqd->large_burst) || + bic->saved_in_large_burst) + bfq_mark_bfqq_in_large_burst(bfqq); + else { + bfq_clear_bfqq_in_large_burst(bfqq); + if (bic->was_in_burst_list) + hlist_add_head(&bfqq->burst_list_node, + &bfqd->burst_list); + } + } + } else { + /* If the queue was seeky for too long, break it apart. */ + if (bfq_bfqq_coop(bfqq) && bfq_bfqq_split_coop(bfqq)) { + bfq_log_bfqq(bfqd, bfqq, "breaking apart bfqq"); + bfqq = bfq_split_bfqq(bic, bfqq); + split = true; + if (!bfqq) + goto new_queue; + } + } + + bfqq->allocated[rw]++; + atomic_inc(&bfqq->ref); + bfq_log_bfqq(bfqd, bfqq, "set_request: bfqq %p, %d", bfqq, + atomic_read(&bfqq->ref)); + + rq->elv.priv[0] = bic; + rq->elv.priv[1] = bfqq; + + /* + * If a bfq_queue has only one process reference, it is owned + * by only one bfq_io_cq: we can set the bic field of the + * bfq_queue to the address of that structure. Also, if the + * queue has just been split, mark a flag so that the + * information is available to the other scheduler hooks. + */ + if (likely(bfqq != &bfqd->oom_bfqq) && bfqq_process_refs(bfqq) == 1) { + bfqq->bic = bic; + if (split) { + bfq_mark_bfqq_just_split(bfqq); + /* + * If the queue has just been split from a shared + * queue, restore the idle window and the possible + * weight raising period. + */ + bfq_bfqq_resume_state(bfqq, bic); + } + } + + spin_unlock_irqrestore(q->queue_lock, flags); + + return 0; + +queue_fail: + bfq_schedule_dispatch(bfqd); + spin_unlock_irqrestore(q->queue_lock, flags); + + return 1; +} + +static void bfq_kick_queue(struct work_struct *work) +{ + struct bfq_data *bfqd = + container_of(work, struct bfq_data, unplug_work); + struct request_queue *q = bfqd->queue; + + spin_lock_irq(q->queue_lock); + __blk_run_queue(q); + spin_unlock_irq(q->queue_lock); +} + +/* + * Handler of the expiration of the timer running if the in-service queue + * is idling inside its time slice. + */ +static void bfq_idle_slice_timer(unsigned long data) +{ + struct bfq_data *bfqd = (struct bfq_data *)data; + struct bfq_queue *bfqq; + unsigned long flags; + enum bfqq_expiration reason; + + spin_lock_irqsave(bfqd->queue->queue_lock, flags); + + bfqq = bfqd->in_service_queue; + /* + * Theoretical race here: the in-service queue can be NULL or + * different from the queue that was idling if the timer handler + * spins on the queue_lock and a new request arrives for the + * current queue and there is a full dispatch cycle that changes + * the in-service queue. This can hardly happen, but in the worst + * case we just expire a queue too early. + */ + if (bfqq != NULL) { + bfq_log_bfqq(bfqd, bfqq, "slice_timer expired"); + if (bfq_bfqq_budget_timeout(bfqq)) + /* + * Also here the queue can be safely expired + * for budget timeout without wasting + * guarantees + */ + reason = BFQ_BFQQ_BUDGET_TIMEOUT; + else if (bfqq->queued[0] == 0 && bfqq->queued[1] == 0) + /* + * The queue may not be empty upon timer expiration, + * because we may not disable the timer when the + * first request of the in-service queue arrives + * during disk idling. + */ + reason = BFQ_BFQQ_TOO_IDLE; + else + goto schedule_dispatch; + + bfq_bfqq_expire(bfqd, bfqq, 1, reason); + } + +schedule_dispatch: + bfq_schedule_dispatch(bfqd); + + spin_unlock_irqrestore(bfqd->queue->queue_lock, flags); +} + +static void bfq_shutdown_timer_wq(struct bfq_data *bfqd) +{ + del_timer_sync(&bfqd->idle_slice_timer); + cancel_work_sync(&bfqd->unplug_work); +} + +static inline void __bfq_put_async_bfqq(struct bfq_data *bfqd, + struct bfq_queue **bfqq_ptr) +{ + struct bfq_group *root_group = bfqd->root_group; + struct bfq_queue *bfqq = *bfqq_ptr; + + bfq_log(bfqd, "put_async_bfqq: %p", bfqq); + if (bfqq != NULL) { + bfq_bfqq_move(bfqd, bfqq, &bfqq->entity, root_group); + bfq_log_bfqq(bfqd, bfqq, "put_async_bfqq: putting %p, %d", + bfqq, atomic_read(&bfqq->ref)); + bfq_put_queue(bfqq); + *bfqq_ptr = NULL; + } +} + +/* + * Release all the bfqg references to its async queues. If we are + * deallocating the group these queues may still contain requests, so + * we reparent them to the root cgroup (i.e., the only one that will + * exist for sure until all the requests on a device are gone). + */ +static void bfq_put_async_queues(struct bfq_data *bfqd, struct bfq_group *bfqg) +{ + int i, j; + + for (i = 0; i < 2; i++) + for (j = 0; j < IOPRIO_BE_NR; j++) + __bfq_put_async_bfqq(bfqd, &bfqg->async_bfqq[i][j]); + + __bfq_put_async_bfqq(bfqd, &bfqg->async_idle_bfqq); +} + +static void bfq_exit_queue(struct elevator_queue *e) +{ + struct bfq_data *bfqd = e->elevator_data; + struct request_queue *q = bfqd->queue; + struct bfq_queue *bfqq, *n; + + bfq_shutdown_timer_wq(bfqd); + + spin_lock_irq(q->queue_lock); + + BUG_ON(bfqd->in_service_queue != NULL); + list_for_each_entry_safe(bfqq, n, &bfqd->idle_list, bfqq_list) + bfq_deactivate_bfqq(bfqd, bfqq, 0); + + bfq_disconnect_groups(bfqd); + spin_unlock_irq(q->queue_lock); + + bfq_shutdown_timer_wq(bfqd); + + synchronize_rcu(); + + BUG_ON(timer_pending(&bfqd->idle_slice_timer)); + + bfq_free_root_group(bfqd); + kfree(bfqd); +} + +static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) +{ + struct bfq_group *bfqg; + struct bfq_data *bfqd; + struct elevator_queue *eq; + + eq = elevator_alloc(q, e); + if (eq == NULL) + return -ENOMEM; + + bfqd = kzalloc_node(sizeof(*bfqd), GFP_KERNEL, q->node); + if (bfqd == NULL) { + kobject_put(&eq->kobj); + return -ENOMEM; + } + eq->elevator_data = bfqd; + + /* + * Our fallback bfqq if bfq_find_alloc_queue() runs into OOM issues. + * Grab a permanent reference to it, so that the normal code flow + * will not attempt to free it. + */ + bfq_init_bfqq(bfqd, &bfqd->oom_bfqq, NULL, 1, 0); + atomic_inc(&bfqd->oom_bfqq.ref); + bfqd->oom_bfqq.entity.new_ioprio = BFQ_DEFAULT_QUEUE_IOPRIO; + bfqd->oom_bfqq.entity.new_ioprio_class = IOPRIO_CLASS_BE; + bfqd->oom_bfqq.entity.new_weight = + bfq_ioprio_to_weight(bfqd->oom_bfqq.entity.new_ioprio); + /* + * Trigger weight initialization, according to ioprio, at the + * oom_bfqq's first activation. The oom_bfqq's ioprio and ioprio + * class won't be changed any more. + */ + bfqd->oom_bfqq.entity.ioprio_changed = 1; + + bfqd->queue = q; + + spin_lock_irq(q->queue_lock); + q->elevator = eq; + spin_unlock_irq(q->queue_lock); + + bfqg = bfq_alloc_root_group(bfqd, q->node); + if (bfqg == NULL) { + kfree(bfqd); + kobject_put(&eq->kobj); + return -ENOMEM; + } + + bfqd->root_group = bfqg; + bfq_init_entity(&bfqd->oom_bfqq.entity, bfqd->root_group); +#ifdef CONFIG_CGROUP_BFQIO + bfqd->active_numerous_groups = 0; +#endif + + init_timer(&bfqd->idle_slice_timer); + bfqd->idle_slice_timer.function = bfq_idle_slice_timer; + bfqd->idle_slice_timer.data = (unsigned long)bfqd; + + bfqd->rq_pos_tree = RB_ROOT; + bfqd->queue_weights_tree = RB_ROOT; + bfqd->group_weights_tree = RB_ROOT; + + INIT_WORK(&bfqd->unplug_work, bfq_kick_queue); + + INIT_LIST_HEAD(&bfqd->active_list); + INIT_LIST_HEAD(&bfqd->idle_list); + INIT_HLIST_HEAD(&bfqd->burst_list); + + bfqd->hw_tag = -1; + + bfqd->bfq_max_budget = bfq_default_max_budget; + + bfqd->bfq_fifo_expire[0] = bfq_fifo_expire[0]; + bfqd->bfq_fifo_expire[1] = bfq_fifo_expire[1]; + bfqd->bfq_back_max = bfq_back_max; + bfqd->bfq_back_penalty = bfq_back_penalty; + bfqd->bfq_slice_idle = bfq_slice_idle; + bfqd->bfq_class_idle_last_service = 0; + bfqd->bfq_max_budget_async_rq = bfq_max_budget_async_rq; + bfqd->bfq_timeout[BLK_RW_ASYNC] = bfq_timeout_async; + bfqd->bfq_timeout[BLK_RW_SYNC] = bfq_timeout_sync; + + bfqd->bfq_coop_thresh = 2; + bfqd->bfq_failed_cooperations = 7000; + bfqd->bfq_requests_within_timer = 120; + + bfqd->bfq_large_burst_thresh = 11; + bfqd->bfq_burst_interval = msecs_to_jiffies(500); + + bfqd->low_latency = true; + + bfqd->bfq_wr_coeff = 20; + bfqd->bfq_wr_rt_max_time = msecs_to_jiffies(300); + bfqd->bfq_wr_max_time = 0; + bfqd->bfq_wr_min_idle_time = msecs_to_jiffies(2000); + bfqd->bfq_wr_min_inter_arr_async = msecs_to_jiffies(500); + bfqd->bfq_wr_max_softrt_rate = 7000; /* + * Approximate rate required + * to playback or record a + * high-definition compressed + * video. + */ + bfqd->wr_busy_queues = 0; + bfqd->busy_in_flight_queues = 0; + bfqd->const_seeky_busy_in_flight_queues = 0; + + /* + * Begin by assuming, optimistically, that the device peak rate is + * equal to the highest reference rate. + */ + bfqd->RT_prod = R_fast[blk_queue_nonrot(bfqd->queue)] * + T_fast[blk_queue_nonrot(bfqd->queue)]; + bfqd->peak_rate = R_fast[blk_queue_nonrot(bfqd->queue)]; + bfqd->device_speed = BFQ_BFQD_FAST; + + return 0; +} + +static void bfq_slab_kill(void) +{ + if (bfq_pool != NULL) + kmem_cache_destroy(bfq_pool); +} + +static int __init bfq_slab_setup(void) +{ + bfq_pool = KMEM_CACHE(bfq_queue, 0); + if (bfq_pool == NULL) + return -ENOMEM; + return 0; +} + +static ssize_t bfq_var_show(unsigned int var, char *page) +{ + return sprintf(page, "%d\n", var); +} + +static ssize_t bfq_var_store(unsigned long *var, const char *page, + size_t count) +{ + unsigned long new_val; + int ret = kstrtoul(page, 10, &new_val); + + if (ret == 0) + *var = new_val; + + return count; +} + +static ssize_t bfq_wr_max_time_show(struct elevator_queue *e, char *page) +{ + struct bfq_data *bfqd = e->elevator_data; + return sprintf(page, "%d\n", bfqd->bfq_wr_max_time > 0 ? + jiffies_to_msecs(bfqd->bfq_wr_max_time) : + jiffies_to_msecs(bfq_wr_duration(bfqd))); +} + +static ssize_t bfq_weights_show(struct elevator_queue *e, char *page) +{ + struct bfq_queue *bfqq; + struct bfq_data *bfqd = e->elevator_data; + ssize_t num_char = 0; + + num_char += sprintf(page + num_char, "Tot reqs queued %d\n\n", + bfqd->queued); + + spin_lock_irq(bfqd->queue->queue_lock); + + num_char += sprintf(page + num_char, "Active:\n"); + list_for_each_entry(bfqq, &bfqd->active_list, bfqq_list) { + num_char += sprintf(page + num_char, + "pid%d: weight %hu, nr_queued %d %d, dur %d/%u\n", + bfqq->pid, + bfqq->entity.weight, + bfqq->queued[0], + bfqq->queued[1], + jiffies_to_msecs(jiffies - bfqq->last_wr_start_finish), + jiffies_to_msecs(bfqq->wr_cur_max_time)); + } + + num_char += sprintf(page + num_char, "Idle:\n"); + list_for_each_entry(bfqq, &bfqd->idle_list, bfqq_list) { + num_char += sprintf(page + num_char, + "pid%d: weight %hu, dur %d/%u\n", + bfqq->pid, + bfqq->entity.weight, + jiffies_to_msecs(jiffies - + bfqq->last_wr_start_finish), + jiffies_to_msecs(bfqq->wr_cur_max_time)); + } + + spin_unlock_irq(bfqd->queue->queue_lock); + + return num_char; +} + +#define SHOW_FUNCTION(__FUNC, __VAR, __CONV) \ +static ssize_t __FUNC(struct elevator_queue *e, char *page) \ +{ \ + struct bfq_data *bfqd = e->elevator_data; \ + unsigned int __data = __VAR; \ + if (__CONV) \ + __data = jiffies_to_msecs(__data); \ + return bfq_var_show(__data, (page)); \ +} +SHOW_FUNCTION(bfq_fifo_expire_sync_show, bfqd->bfq_fifo_expire[1], 1); +SHOW_FUNCTION(bfq_fifo_expire_async_show, bfqd->bfq_fifo_expire[0], 1); +SHOW_FUNCTION(bfq_back_seek_max_show, bfqd->bfq_back_max, 0); +SHOW_FUNCTION(bfq_back_seek_penalty_show, bfqd->bfq_back_penalty, 0); +SHOW_FUNCTION(bfq_slice_idle_show, bfqd->bfq_slice_idle, 1); +SHOW_FUNCTION(bfq_max_budget_show, bfqd->bfq_user_max_budget, 0); +SHOW_FUNCTION(bfq_max_budget_async_rq_show, + bfqd->bfq_max_budget_async_rq, 0); +SHOW_FUNCTION(bfq_timeout_sync_show, bfqd->bfq_timeout[BLK_RW_SYNC], 1); +SHOW_FUNCTION(bfq_timeout_async_show, bfqd->bfq_timeout[BLK_RW_ASYNC], 1); +SHOW_FUNCTION(bfq_low_latency_show, bfqd->low_latency, 0); +SHOW_FUNCTION(bfq_wr_coeff_show, bfqd->bfq_wr_coeff, 0); +SHOW_FUNCTION(bfq_wr_rt_max_time_show, bfqd->bfq_wr_rt_max_time, 1); +SHOW_FUNCTION(bfq_wr_min_idle_time_show, bfqd->bfq_wr_min_idle_time, 1); +SHOW_FUNCTION(bfq_wr_min_inter_arr_async_show, bfqd->bfq_wr_min_inter_arr_async, + 1); +SHOW_FUNCTION(bfq_wr_max_softrt_rate_show, bfqd->bfq_wr_max_softrt_rate, 0); +#undef SHOW_FUNCTION + +#define STORE_FUNCTION(__FUNC, __PTR, MIN, MAX, __CONV) \ +static ssize_t \ +__FUNC(struct elevator_queue *e, const char *page, size_t count) \ +{ \ + struct bfq_data *bfqd = e->elevator_data; \ + unsigned long uninitialized_var(__data); \ + int ret = bfq_var_store(&__data, (page), count); \ + if (__data < (MIN)) \ + __data = (MIN); \ + else if (__data > (MAX)) \ + __data = (MAX); \ + if (__CONV) \ + *(__PTR) = msecs_to_jiffies(__data); \ + else \ + *(__PTR) = __data; \ + return ret; \ +} +STORE_FUNCTION(bfq_fifo_expire_sync_store, &bfqd->bfq_fifo_expire[1], 1, + INT_MAX, 1); +STORE_FUNCTION(bfq_fifo_expire_async_store, &bfqd->bfq_fifo_expire[0], 1, + INT_MAX, 1); +STORE_FUNCTION(bfq_back_seek_max_store, &bfqd->bfq_back_max, 0, INT_MAX, 0); +STORE_FUNCTION(bfq_back_seek_penalty_store, &bfqd->bfq_back_penalty, 1, + INT_MAX, 0); +STORE_FUNCTION(bfq_slice_idle_store, &bfqd->bfq_slice_idle, 0, INT_MAX, 1); +STORE_FUNCTION(bfq_max_budget_async_rq_store, &bfqd->bfq_max_budget_async_rq, + 1, INT_MAX, 0); +STORE_FUNCTION(bfq_timeout_async_store, &bfqd->bfq_timeout[BLK_RW_ASYNC], 0, + INT_MAX, 1); +STORE_FUNCTION(bfq_wr_coeff_store, &bfqd->bfq_wr_coeff, 1, INT_MAX, 0); +STORE_FUNCTION(bfq_wr_max_time_store, &bfqd->bfq_wr_max_time, 0, INT_MAX, 1); +STORE_FUNCTION(bfq_wr_rt_max_time_store, &bfqd->bfq_wr_rt_max_time, 0, INT_MAX, + 1); +STORE_FUNCTION(bfq_wr_min_idle_time_store, &bfqd->bfq_wr_min_idle_time, 0, + INT_MAX, 1); +STORE_FUNCTION(bfq_wr_min_inter_arr_async_store, + &bfqd->bfq_wr_min_inter_arr_async, 0, INT_MAX, 1); +STORE_FUNCTION(bfq_wr_max_softrt_rate_store, &bfqd->bfq_wr_max_softrt_rate, 0, + INT_MAX, 0); +#undef STORE_FUNCTION + +/* do nothing for the moment */ +static ssize_t bfq_weights_store(struct elevator_queue *e, + const char *page, size_t count) +{ + return count; +} + +static inline unsigned long bfq_estimated_max_budget(struct bfq_data *bfqd) +{ + u64 timeout = jiffies_to_msecs(bfqd->bfq_timeout[BLK_RW_SYNC]); + + if (bfqd->peak_rate_samples >= BFQ_PEAK_RATE_SAMPLES) + return bfq_calc_max_budget(bfqd->peak_rate, timeout); + else + return bfq_default_max_budget; +} + +static ssize_t bfq_max_budget_store(struct elevator_queue *e, + const char *page, size_t count) +{ + struct bfq_data *bfqd = e->elevator_data; + unsigned long uninitialized_var(__data); + int ret = bfq_var_store(&__data, (page), count); + + if (__data == 0) + bfqd->bfq_max_budget = bfq_estimated_max_budget(bfqd); + else { + if (__data > INT_MAX) + __data = INT_MAX; + bfqd->bfq_max_budget = __data; + } + + bfqd->bfq_user_max_budget = __data; + + return ret; +} + +static ssize_t bfq_timeout_sync_store(struct elevator_queue *e, + const char *page, size_t count) +{ + struct bfq_data *bfqd = e->elevator_data; + unsigned long uninitialized_var(__data); + int ret = bfq_var_store(&__data, (page), count); + + if (__data < 1) + __data = 1; + else if (__data > INT_MAX) + __data = INT_MAX; + + bfqd->bfq_timeout[BLK_RW_SYNC] = msecs_to_jiffies(__data); + if (bfqd->bfq_user_max_budget == 0) + bfqd->bfq_max_budget = bfq_estimated_max_budget(bfqd); + + return ret; +} + +static ssize_t bfq_low_latency_store(struct elevator_queue *e, + const char *page, size_t count) +{ + struct bfq_data *bfqd = e->elevator_data; + unsigned long uninitialized_var(__data); + int ret = bfq_var_store(&__data, (page), count); + + if (__data > 1) + __data = 1; + if (__data == 0 && bfqd->low_latency != 0) + bfq_end_wr(bfqd); + bfqd->low_latency = __data; + + return ret; +} + +#define BFQ_ATTR(name) \ + __ATTR(name, S_IRUGO|S_IWUSR, bfq_##name##_show, bfq_##name##_store) + +static struct elv_fs_entry bfq_attrs[] = { + BFQ_ATTR(fifo_expire_sync), + BFQ_ATTR(fifo_expire_async), + BFQ_ATTR(back_seek_max), + BFQ_ATTR(back_seek_penalty), + BFQ_ATTR(slice_idle), + BFQ_ATTR(max_budget), + BFQ_ATTR(max_budget_async_rq), + BFQ_ATTR(timeout_sync), + BFQ_ATTR(timeout_async), + BFQ_ATTR(low_latency), + BFQ_ATTR(wr_coeff), + BFQ_ATTR(wr_max_time), + BFQ_ATTR(wr_rt_max_time), + BFQ_ATTR(wr_min_idle_time), + BFQ_ATTR(wr_min_inter_arr_async), + BFQ_ATTR(wr_max_softrt_rate), + BFQ_ATTR(weights), + __ATTR_NULL +}; + +static struct elevator_type iosched_bfq = { + .ops = { + .elevator_merge_fn = bfq_merge, + .elevator_merged_fn = bfq_merged_request, + .elevator_merge_req_fn = bfq_merged_requests, + .elevator_allow_merge_fn = bfq_allow_merge, + .elevator_dispatch_fn = bfq_dispatch_requests, + .elevator_add_req_fn = bfq_insert_request, + .elevator_activate_req_fn = bfq_activate_request, + .elevator_deactivate_req_fn = bfq_deactivate_request, + .elevator_completed_req_fn = bfq_completed_request, + .elevator_former_req_fn = elv_rb_former_request, + .elevator_latter_req_fn = elv_rb_latter_request, + .elevator_init_icq_fn = bfq_init_icq, + .elevator_exit_icq_fn = bfq_exit_icq, + .elevator_set_req_fn = bfq_set_request, + .elevator_put_req_fn = bfq_put_request, + .elevator_may_queue_fn = bfq_may_queue, + .elevator_init_fn = bfq_init_queue, + .elevator_exit_fn = bfq_exit_queue, + }, + .icq_size = sizeof(struct bfq_io_cq), + .icq_align = __alignof__(struct bfq_io_cq), + .elevator_attrs = bfq_attrs, + .elevator_name = "bfq", + .elevator_owner = THIS_MODULE, +}; + +static int __init bfq_init(void) +{ + /* + * Can be 0 on HZ < 1000 setups. + */ + if (bfq_slice_idle == 0) + bfq_slice_idle = 1; + + if (bfq_timeout_async == 0) + bfq_timeout_async = 1; + + if (bfq_slab_setup()) + return -ENOMEM; + + /* + * Times to load large popular applications for the typical systems + * installed on the reference devices (see the comments before the + * definitions of the two arrays). + */ + T_slow[0] = msecs_to_jiffies(2600); + T_slow[1] = msecs_to_jiffies(1000); + T_fast[0] = msecs_to_jiffies(5500); + T_fast[1] = msecs_to_jiffies(2000); + + /* + * Thresholds that determine the switch between speed classes (see + * the comments before the definition of the array). + */ + device_speed_thresh[0] = (R_fast[0] + R_slow[0]) / 2; + device_speed_thresh[1] = (R_fast[1] + R_slow[1]) / 2; + + elv_register(&iosched_bfq); + pr_info("BFQ I/O-scheduler: v7r8"); + + return 0; +} + +static void __exit bfq_exit(void) +{ + elv_unregister(&iosched_bfq); + bfq_slab_kill(); +} + +module_init(bfq_init); +module_exit(bfq_exit); + +MODULE_AUTHOR("Fabio Checconi, Paolo Valente"); +MODULE_LICENSE("GPL"); diff --git a/block/bfq-sched.c b/block/bfq-sched.c new file mode 100644 index 00000000000..d0890c6d4c1 --- /dev/null +++ b/block/bfq-sched.c @@ -0,0 +1,1180 @@ +/* + * BFQ: Hierarchical B-WF2Q+ scheduler. + * + * Based on ideas and code from CFQ: + * Copyright (C) 2003 Jens Axboe + * + * Copyright (C) 2008 Fabio Checconi + * Paolo Valente + * + * Copyright (C) 2010 Paolo Valente + */ + +#ifdef CONFIG_CGROUP_BFQIO +#define for_each_entity(entity) \ + for (; entity != NULL; entity = entity->parent) + +#define for_each_entity_safe(entity, parent) \ + for (; entity && ({ parent = entity->parent; 1; }); entity = parent) + +static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd, + int extract, + struct bfq_data *bfqd); + +static inline void bfq_update_budget(struct bfq_entity *next_in_service) +{ + struct bfq_entity *bfqg_entity; + struct bfq_group *bfqg; + struct bfq_sched_data *group_sd; + + BUG_ON(next_in_service == NULL); + + group_sd = next_in_service->sched_data; + + bfqg = container_of(group_sd, struct bfq_group, sched_data); + /* + * bfq_group's my_entity field is not NULL only if the group + * is not the root group. We must not touch the root entity + * as it must never become an in-service entity. + */ + bfqg_entity = bfqg->my_entity; + if (bfqg_entity != NULL) + bfqg_entity->budget = next_in_service->budget; +} + +static int bfq_update_next_in_service(struct bfq_sched_data *sd) +{ + struct bfq_entity *next_in_service; + + if (sd->in_service_entity != NULL) + /* will update/requeue at the end of service */ + return 0; + + /* + * NOTE: this can be improved in many ways, such as returning + * 1 (and thus propagating upwards the update) only when the + * budget changes, or caching the bfqq that will be scheduled + * next from this subtree. By now we worry more about + * correctness than about performance... + */ + next_in_service = bfq_lookup_next_entity(sd, 0, NULL); + sd->next_in_service = next_in_service; + + if (next_in_service != NULL) + bfq_update_budget(next_in_service); + + return 1; +} + +static inline void bfq_check_next_in_service(struct bfq_sched_data *sd, + struct bfq_entity *entity) +{ + BUG_ON(sd->next_in_service != entity); +} +#else +#define for_each_entity(entity) \ + for (; entity != NULL; entity = NULL) + +#define for_each_entity_safe(entity, parent) \ + for (parent = NULL; entity != NULL; entity = parent) + +static inline int bfq_update_next_in_service(struct bfq_sched_data *sd) +{ + return 0; +} + +static inline void bfq_check_next_in_service(struct bfq_sched_data *sd, + struct bfq_entity *entity) +{ +} + +static inline void bfq_update_budget(struct bfq_entity *next_in_service) +{ +} +#endif + +/* + * Shift for timestamp calculations. This actually limits the maximum + * service allowed in one timestamp delta (small shift values increase it), + * the maximum total weight that can be used for the queues in the system + * (big shift values increase it), and the period of virtual time + * wraparounds. + */ +#define WFQ_SERVICE_SHIFT 22 + +/** + * bfq_gt - compare two timestamps. + * @a: first ts. + * @b: second ts. + * + * Return @a > @b, dealing with wrapping correctly. + */ +static inline int bfq_gt(u64 a, u64 b) +{ + return (s64)(a - b) > 0; +} + +static inline struct bfq_queue *bfq_entity_to_bfqq(struct bfq_entity *entity) +{ + struct bfq_queue *bfqq = NULL; + + BUG_ON(entity == NULL); + + if (entity->my_sched_data == NULL) + bfqq = container_of(entity, struct bfq_queue, entity); + + return bfqq; +} + + +/** + * bfq_delta - map service into the virtual time domain. + * @service: amount of service. + * @weight: scale factor (weight of an entity or weight sum). + */ +static inline u64 bfq_delta(unsigned long service, + unsigned long weight) +{ + u64 d = (u64)service << WFQ_SERVICE_SHIFT; + + do_div(d, weight); + return d; +} + +/** + * bfq_calc_finish - assign the finish time to an entity. + * @entity: the entity to act upon. + * @service: the service to be charged to the entity. + */ +static inline void bfq_calc_finish(struct bfq_entity *entity, + unsigned long service) +{ + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); + + BUG_ON(entity->weight == 0); + + entity->finish = entity->start + + bfq_delta(service, entity->weight); + + if (bfqq != NULL) { + bfq_log_bfqq(bfqq->bfqd, bfqq, + "calc_finish: serv %lu, w %d", + service, entity->weight); + bfq_log_bfqq(bfqq->bfqd, bfqq, + "calc_finish: start %llu, finish %llu, delta %llu", + entity->start, entity->finish, + bfq_delta(service, entity->weight)); + } +} + +/** + * bfq_entity_of - get an entity from a node. + * @node: the node field of the entity. + * + * Convert a node pointer to the relative entity. This is used only + * to simplify the logic of some functions and not as the generic + * conversion mechanism because, e.g., in the tree walking functions, + * the check for a %NULL value would be redundant. + */ +static inline struct bfq_entity *bfq_entity_of(struct rb_node *node) +{ + struct bfq_entity *entity = NULL; + + if (node != NULL) + entity = rb_entry(node, struct bfq_entity, rb_node); + + return entity; +} + +/** + * bfq_extract - remove an entity from a tree. + * @root: the tree root. + * @entity: the entity to remove. + */ +static inline void bfq_extract(struct rb_root *root, + struct bfq_entity *entity) +{ + BUG_ON(entity->tree != root); + + entity->tree = NULL; + rb_erase(&entity->rb_node, root); +} + +/** + * bfq_idle_extract - extract an entity from the idle tree. + * @st: the service tree of the owning @entity. + * @entity: the entity being removed. + */ +static void bfq_idle_extract(struct bfq_service_tree *st, + struct bfq_entity *entity) +{ + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); + struct rb_node *next; + + BUG_ON(entity->tree != &st->idle); + + if (entity == st->first_idle) { + next = rb_next(&entity->rb_node); + st->first_idle = bfq_entity_of(next); + } + + if (entity == st->last_idle) { + next = rb_prev(&entity->rb_node); + st->last_idle = bfq_entity_of(next); + } + + bfq_extract(&st->idle, entity); + + if (bfqq != NULL) + list_del(&bfqq->bfqq_list); +} + +/** + * bfq_insert - generic tree insertion. + * @root: tree root. + * @entity: entity to insert. + * + * This is used for the idle and the active tree, since they are both + * ordered by finish time. + */ +static void bfq_insert(struct rb_root *root, struct bfq_entity *entity) +{ + struct bfq_entity *entry; + struct rb_node **node = &root->rb_node; + struct rb_node *parent = NULL; + + BUG_ON(entity->tree != NULL); + + while (*node != NULL) { + parent = *node; + entry = rb_entry(parent, struct bfq_entity, rb_node); + + if (bfq_gt(entry->finish, entity->finish)) + node = &parent->rb_left; + else + node = &parent->rb_right; + } + + rb_link_node(&entity->rb_node, parent, node); + rb_insert_color(&entity->rb_node, root); + + entity->tree = root; +} + +/** + * bfq_update_min - update the min_start field of a entity. + * @entity: the entity to update. + * @node: one of its children. + * + * This function is called when @entity may store an invalid value for + * min_start due to updates to the active tree. The function assumes + * that the subtree rooted at @node (which may be its left or its right + * child) has a valid min_start value. + */ +static inline void bfq_update_min(struct bfq_entity *entity, + struct rb_node *node) +{ + struct bfq_entity *child; + + if (node != NULL) { + child = rb_entry(node, struct bfq_entity, rb_node); + if (bfq_gt(entity->min_start, child->min_start)) + entity->min_start = child->min_start; + } +} + +/** + * bfq_update_active_node - recalculate min_start. + * @node: the node to update. + * + * @node may have changed position or one of its children may have moved, + * this function updates its min_start value. The left and right subtrees + * are assumed to hold a correct min_start value. + */ +static inline void bfq_update_active_node(struct rb_node *node) +{ + struct bfq_entity *entity = rb_entry(node, struct bfq_entity, rb_node); + + entity->min_start = entity->start; + bfq_update_min(entity, node->rb_right); + bfq_update_min(entity, node->rb_left); +} + +/** + * bfq_update_active_tree - update min_start for the whole active tree. + * @node: the starting node. + * + * @node must be the deepest modified node after an update. This function + * updates its min_start using the values held by its children, assuming + * that they did not change, and then updates all the nodes that may have + * changed in the path to the root. The only nodes that may have changed + * are the ones in the path or their siblings. + */ +static void bfq_update_active_tree(struct rb_node *node) +{ + struct rb_node *parent; + +up: + bfq_update_active_node(node); + + parent = rb_parent(node); + if (parent == NULL) + return; + + if (node == parent->rb_left && parent->rb_right != NULL) + bfq_update_active_node(parent->rb_right); + else if (parent->rb_left != NULL) + bfq_update_active_node(parent->rb_left); + + node = parent; + goto up; +} + +static void bfq_weights_tree_add(struct bfq_data *bfqd, + struct bfq_entity *entity, + struct rb_root *root); + +static void bfq_weights_tree_remove(struct bfq_data *bfqd, + struct bfq_entity *entity, + struct rb_root *root); + + +/** + * bfq_active_insert - insert an entity in the active tree of its + * group/device. + * @st: the service tree of the entity. + * @entity: the entity being inserted. + * + * The active tree is ordered by finish time, but an extra key is kept + * per each node, containing the minimum value for the start times of + * its children (and the node itself), so it's possible to search for + * the eligible node with the lowest finish time in logarithmic time. + */ +static void bfq_active_insert(struct bfq_service_tree *st, + struct bfq_entity *entity) +{ + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); + struct rb_node *node = &entity->rb_node; +#ifdef CONFIG_CGROUP_BFQIO + struct bfq_sched_data *sd = NULL; + struct bfq_group *bfqg = NULL; + struct bfq_data *bfqd = NULL; +#endif + + bfq_insert(&st->active, entity); + + if (node->rb_left != NULL) + node = node->rb_left; + else if (node->rb_right != NULL) + node = node->rb_right; + + bfq_update_active_tree(node); + +#ifdef CONFIG_CGROUP_BFQIO + sd = entity->sched_data; + bfqg = container_of(sd, struct bfq_group, sched_data); + BUG_ON(!bfqg); + bfqd = (struct bfq_data *)bfqg->bfqd; +#endif + if (bfqq != NULL) + list_add(&bfqq->bfqq_list, &bfqq->bfqd->active_list); +#ifdef CONFIG_CGROUP_BFQIO + else { /* bfq_group */ + BUG_ON(!bfqd); + bfq_weights_tree_add(bfqd, entity, &bfqd->group_weights_tree); + } + if (bfqg != bfqd->root_group) { + BUG_ON(!bfqg); + BUG_ON(!bfqd); + bfqg->active_entities++; + if (bfqg->active_entities == 2) + bfqd->active_numerous_groups++; + } +#endif +} + +/** + * bfq_ioprio_to_weight - calc a weight from an ioprio. + * @ioprio: the ioprio value to convert. + */ +static inline unsigned short bfq_ioprio_to_weight(int ioprio) +{ + BUG_ON(ioprio < 0 || ioprio >= IOPRIO_BE_NR); + return IOPRIO_BE_NR - ioprio; +} + +/** + * bfq_weight_to_ioprio - calc an ioprio from a weight. + * @weight: the weight value to convert. + * + * To preserve as mush as possible the old only-ioprio user interface, + * 0 is used as an escape ioprio value for weights (numerically) equal or + * larger than IOPRIO_BE_NR + */ +static inline unsigned short bfq_weight_to_ioprio(int weight) +{ + BUG_ON(weight < BFQ_MIN_WEIGHT || weight > BFQ_MAX_WEIGHT); + return IOPRIO_BE_NR - weight < 0 ? 0 : IOPRIO_BE_NR - weight; +} + +static inline void bfq_get_entity(struct bfq_entity *entity) +{ + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); + + if (bfqq != NULL) { + atomic_inc(&bfqq->ref); + bfq_log_bfqq(bfqq->bfqd, bfqq, "get_entity: %p %d", + bfqq, atomic_read(&bfqq->ref)); + } +} + +/** + * bfq_find_deepest - find the deepest node that an extraction can modify. + * @node: the node being removed. + * + * Do the first step of an extraction in an rb tree, looking for the + * node that will replace @node, and returning the deepest node that + * the following modifications to the tree can touch. If @node is the + * last node in the tree return %NULL. + */ +static struct rb_node *bfq_find_deepest(struct rb_node *node) +{ + struct rb_node *deepest; + + if (node->rb_right == NULL && node->rb_left == NULL) + deepest = rb_parent(node); + else if (node->rb_right == NULL) + deepest = node->rb_left; + else if (node->rb_left == NULL) + deepest = node->rb_right; + else { + deepest = rb_next(node); + if (deepest->rb_right != NULL) + deepest = deepest->rb_right; + else if (rb_parent(deepest) != node) + deepest = rb_parent(deepest); + } + + return deepest; +} + +/** + * bfq_active_extract - remove an entity from the active tree. + * @st: the service_tree containing the tree. + * @entity: the entity being removed. + */ +static void bfq_active_extract(struct bfq_service_tree *st, + struct bfq_entity *entity) +{ + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); + struct rb_node *node; +#ifdef CONFIG_CGROUP_BFQIO + struct bfq_sched_data *sd = NULL; + struct bfq_group *bfqg = NULL; + struct bfq_data *bfqd = NULL; +#endif + + node = bfq_find_deepest(&entity->rb_node); + bfq_extract(&st->active, entity); + + if (node != NULL) + bfq_update_active_tree(node); + +#ifdef CONFIG_CGROUP_BFQIO + sd = entity->sched_data; + bfqg = container_of(sd, struct bfq_group, sched_data); + BUG_ON(!bfqg); + bfqd = (struct bfq_data *)bfqg->bfqd; +#endif + if (bfqq != NULL) + list_del(&bfqq->bfqq_list); +#ifdef CONFIG_CGROUP_BFQIO + else { /* bfq_group */ + BUG_ON(!bfqd); + bfq_weights_tree_remove(bfqd, entity, + &bfqd->group_weights_tree); + } + if (bfqg != bfqd->root_group) { + BUG_ON(!bfqg); + BUG_ON(!bfqd); + BUG_ON(!bfqg->active_entities); + bfqg->active_entities--; + if (bfqg->active_entities == 1) { + BUG_ON(!bfqd->active_numerous_groups); + bfqd->active_numerous_groups--; + } + } +#endif +} + +/** + * bfq_idle_insert - insert an entity into the idle tree. + * @st: the service tree containing the tree. + * @entity: the entity to insert. + */ +static void bfq_idle_insert(struct bfq_service_tree *st, + struct bfq_entity *entity) +{ + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); + struct bfq_entity *first_idle = st->first_idle; + struct bfq_entity *last_idle = st->last_idle; + + if (first_idle == NULL || bfq_gt(first_idle->finish, entity->finish)) + st->first_idle = entity; + if (last_idle == NULL || bfq_gt(entity->finish, last_idle->finish)) + st->last_idle = entity; + + bfq_insert(&st->idle, entity); + + if (bfqq != NULL) + list_add(&bfqq->bfqq_list, &bfqq->bfqd->idle_list); +} + +/** + * bfq_forget_entity - remove an entity from the wfq trees. + * @st: the service tree. + * @entity: the entity being removed. + * + * Update the device status and forget everything about @entity, putting + * the device reference to it, if it is a queue. Entities belonging to + * groups are not refcounted. + */ +static void bfq_forget_entity(struct bfq_service_tree *st, + struct bfq_entity *entity) +{ + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); + struct bfq_sched_data *sd; + + BUG_ON(!entity->on_st); + + entity->on_st = 0; + st->wsum -= entity->weight; + if (bfqq != NULL) { + sd = entity->sched_data; + bfq_log_bfqq(bfqq->bfqd, bfqq, "forget_entity: %p %d", + bfqq, atomic_read(&bfqq->ref)); + bfq_put_queue(bfqq); + } +} + +/** + * bfq_put_idle_entity - release the idle tree ref of an entity. + * @st: service tree for the entity. + * @entity: the entity being released. + */ +static void bfq_put_idle_entity(struct bfq_service_tree *st, + struct bfq_entity *entity) +{ + bfq_idle_extract(st, entity); + bfq_forget_entity(st, entity); +} + +/** + * bfq_forget_idle - update the idle tree if necessary. + * @st: the service tree to act upon. + * + * To preserve the global O(log N) complexity we only remove one entry here; + * as the idle tree will not grow indefinitely this can be done safely. + */ +static void bfq_forget_idle(struct bfq_service_tree *st) +{ + struct bfq_entity *first_idle = st->first_idle; + struct bfq_entity *last_idle = st->last_idle; + + if (RB_EMPTY_ROOT(&st->active) && last_idle != NULL && + !bfq_gt(last_idle->finish, st->vtime)) { + /* + * Forget the whole idle tree, increasing the vtime past + * the last finish time of idle entities. + */ + st->vtime = last_idle->finish; + } + + if (first_idle != NULL && !bfq_gt(first_idle->finish, st->vtime)) + bfq_put_idle_entity(st, first_idle); +} + +static struct bfq_service_tree * +__bfq_entity_update_weight_prio(struct bfq_service_tree *old_st, + struct bfq_entity *entity) +{ + struct bfq_service_tree *new_st = old_st; + + if (entity->ioprio_changed) { + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); + unsigned short prev_weight, new_weight; + struct bfq_data *bfqd = NULL; + struct rb_root *root; +#ifdef CONFIG_CGROUP_BFQIO + struct bfq_sched_data *sd; + struct bfq_group *bfqg; +#endif + + if (bfqq != NULL) + bfqd = bfqq->bfqd; +#ifdef CONFIG_CGROUP_BFQIO + else { + sd = entity->my_sched_data; + bfqg = container_of(sd, struct bfq_group, sched_data); + BUG_ON(!bfqg); + bfqd = (struct bfq_data *)bfqg->bfqd; + BUG_ON(!bfqd); + } +#endif + + BUG_ON(old_st->wsum < entity->weight); + old_st->wsum -= entity->weight; + + if (entity->new_weight != entity->orig_weight) { + if (entity->new_weight < BFQ_MIN_WEIGHT || + entity->new_weight > BFQ_MAX_WEIGHT) { + printk(KERN_CRIT "update_weight_prio: " + "new_weight %d\n", + entity->new_weight); + BUG(); + } + entity->orig_weight = entity->new_weight; + entity->ioprio = + bfq_weight_to_ioprio(entity->orig_weight); + } + + entity->ioprio_class = entity->new_ioprio_class; + entity->ioprio_changed = 0; + + /* + * NOTE: here we may be changing the weight too early, + * this will cause unfairness. The correct approach + * would have required additional complexity to defer + * weight changes to the proper time instants (i.e., + * when entity->finish <= old_st->vtime). + */ + new_st = bfq_entity_service_tree(entity); + + prev_weight = entity->weight; + new_weight = entity->orig_weight * + (bfqq != NULL ? bfqq->wr_coeff : 1); + /* + * If the weight of the entity changes, remove the entity + * from its old weight counter (if there is a counter + * associated with the entity), and add it to the counter + * associated with its new weight. + */ + if (prev_weight != new_weight) { + root = bfqq ? &bfqd->queue_weights_tree : + &bfqd->group_weights_tree; + bfq_weights_tree_remove(bfqd, entity, root); + } + entity->weight = new_weight; + /* + * Add the entity to its weights tree only if it is + * not associated with a weight-raised queue. + */ + if (prev_weight != new_weight && + (bfqq ? bfqq->wr_coeff == 1 : 1)) + /* If we get here, root has been initialized. */ + bfq_weights_tree_add(bfqd, entity, root); + + new_st->wsum += entity->weight; + + if (new_st != old_st) + entity->start = new_st->vtime; + } + + return new_st; +} + +/** + * bfq_bfqq_served - update the scheduler status after selection for + * service. + * @bfqq: the queue being served. + * @served: bytes to transfer. + * + * NOTE: this can be optimized, as the timestamps of upper level entities + * are synchronized every time a new bfqq is selected for service. By now, + * we keep it to better check consistency. + */ +static void bfq_bfqq_served(struct bfq_queue *bfqq, unsigned long served) +{ + struct bfq_entity *entity = &bfqq->entity; + struct bfq_service_tree *st; + + for_each_entity(entity) { + st = bfq_entity_service_tree(entity); + + entity->service += served; + BUG_ON(entity->service > entity->budget); + BUG_ON(st->wsum == 0); + + st->vtime += bfq_delta(served, st->wsum); + bfq_forget_idle(st); + } + bfq_log_bfqq(bfqq->bfqd, bfqq, "bfqq_served %lu secs", served); +} + +/** + * bfq_bfqq_charge_full_budget - set the service to the entity budget. + * @bfqq: the queue that needs a service update. + * + * When it's not possible to be fair in the service domain, because + * a queue is not consuming its budget fast enough (the meaning of + * fast depends on the timeout parameter), we charge it a full + * budget. In this way we should obtain a sort of time-domain + * fairness among all the seeky/slow queues. + */ +static inline void bfq_bfqq_charge_full_budget(struct bfq_queue *bfqq) +{ + struct bfq_entity *entity = &bfqq->entity; + + bfq_log_bfqq(bfqq->bfqd, bfqq, "charge_full_budget"); + + bfq_bfqq_served(bfqq, entity->budget - entity->service); +} + +/** + * __bfq_activate_entity - activate an entity. + * @entity: the entity being activated. + * + * Called whenever an entity is activated, i.e., it is not active and one + * of its children receives a new request, or has to be reactivated due to + * budget exhaustion. It uses the current budget of the entity (and the + * service received if @entity is active) of the queue to calculate its + * timestamps. + */ +static void __bfq_activate_entity(struct bfq_entity *entity) +{ + struct bfq_sched_data *sd = entity->sched_data; + struct bfq_service_tree *st = bfq_entity_service_tree(entity); + + if (entity == sd->in_service_entity) { + BUG_ON(entity->tree != NULL); + /* + * If we are requeueing the current entity we have + * to take care of not charging to it service it has + * not received. + */ + bfq_calc_finish(entity, entity->service); + entity->start = entity->finish; + sd->in_service_entity = NULL; + } else if (entity->tree == &st->active) { + /* + * Requeueing an entity due to a change of some + * next_in_service entity below it. We reuse the + * old start time. + */ + bfq_active_extract(st, entity); + } else if (entity->tree == &st->idle) { + /* + * Must be on the idle tree, bfq_idle_extract() will + * check for that. + */ + bfq_idle_extract(st, entity); + entity->start = bfq_gt(st->vtime, entity->finish) ? + st->vtime : entity->finish; + } else { + /* + * The finish time of the entity may be invalid, and + * it is in the past for sure, otherwise the queue + * would have been on the idle tree. + */ + entity->start = st->vtime; + st->wsum += entity->weight; + bfq_get_entity(entity); + + BUG_ON(entity->on_st); + entity->on_st = 1; + } + + st = __bfq_entity_update_weight_prio(st, entity); + bfq_calc_finish(entity, entity->budget); + bfq_active_insert(st, entity); +} + +/** + * bfq_activate_entity - activate an entity and its ancestors if necessary. + * @entity: the entity to activate. + * + * Activate @entity and all the entities on the path from it to the root. + */ +static void bfq_activate_entity(struct bfq_entity *entity) +{ + struct bfq_sched_data *sd; + + for_each_entity(entity) { + __bfq_activate_entity(entity); + + sd = entity->sched_data; + if (!bfq_update_next_in_service(sd)) + /* + * No need to propagate the activation to the + * upper entities, as they will be updated when + * the in-service entity is rescheduled. + */ + break; + } +} + +/** + * __bfq_deactivate_entity - deactivate an entity from its service tree. + * @entity: the entity to deactivate. + * @requeue: if false, the entity will not be put into the idle tree. + * + * Deactivate an entity, independently from its previous state. If the + * entity was not on a service tree just return, otherwise if it is on + * any scheduler tree, extract it from that tree, and if necessary + * and if the caller did not specify @requeue, put it on the idle tree. + * + * Return %1 if the caller should update the entity hierarchy, i.e., + * if the entity was in service or if it was the next_in_service for + * its sched_data; return %0 otherwise. + */ +static int __bfq_deactivate_entity(struct bfq_entity *entity, int requeue) +{ + struct bfq_sched_data *sd = entity->sched_data; + struct bfq_service_tree *st = bfq_entity_service_tree(entity); + int was_in_service = entity == sd->in_service_entity; + int ret = 0; + + if (!entity->on_st) + return 0; + + BUG_ON(was_in_service && entity->tree != NULL); + + if (was_in_service) { + bfq_calc_finish(entity, entity->service); + sd->in_service_entity = NULL; + } else if (entity->tree == &st->active) + bfq_active_extract(st, entity); + else if (entity->tree == &st->idle) + bfq_idle_extract(st, entity); + else if (entity->tree != NULL) + BUG(); + + if (was_in_service || sd->next_in_service == entity) + ret = bfq_update_next_in_service(sd); + + if (!requeue || !bfq_gt(entity->finish, st->vtime)) + bfq_forget_entity(st, entity); + else + bfq_idle_insert(st, entity); + + BUG_ON(sd->in_service_entity == entity); + BUG_ON(sd->next_in_service == entity); + + return ret; +} + +/** + * bfq_deactivate_entity - deactivate an entity. + * @entity: the entity to deactivate. + * @requeue: true if the entity can be put on the idle tree + */ +static void bfq_deactivate_entity(struct bfq_entity *entity, int requeue) +{ + struct bfq_sched_data *sd; + struct bfq_entity *parent; + + for_each_entity_safe(entity, parent) { + sd = entity->sched_data; + + if (!__bfq_deactivate_entity(entity, requeue)) + /* + * The parent entity is still backlogged, and + * we don't need to update it as it is still + * in service. + */ + break; + + if (sd->next_in_service != NULL) + /* + * The parent entity is still backlogged and + * the budgets on the path towards the root + * need to be updated. + */ + goto update; + + /* + * If we reach there the parent is no more backlogged and + * we want to propagate the dequeue upwards. + */ + requeue = 1; + } + + return; + +update: + entity = parent; + for_each_entity(entity) { + __bfq_activate_entity(entity); + + sd = entity->sched_data; + if (!bfq_update_next_in_service(sd)) + break; + } +} + +/** + * bfq_update_vtime - update vtime if necessary. + * @st: the service tree to act upon. + * + * If necessary update the service tree vtime to have at least one + * eligible entity, skipping to its start time. Assumes that the + * active tree of the device is not empty. + * + * NOTE: this hierarchical implementation updates vtimes quite often, + * we may end up with reactivated processes getting timestamps after a + * vtime skip done because we needed a ->first_active entity on some + * intermediate node. + */ +static void bfq_update_vtime(struct bfq_service_tree *st) +{ + struct bfq_entity *entry; + struct rb_node *node = st->active.rb_node; + + entry = rb_entry(node, struct bfq_entity, rb_node); + if (bfq_gt(entry->min_start, st->vtime)) { + st->vtime = entry->min_start; + bfq_forget_idle(st); + } +} + +/** + * bfq_first_active_entity - find the eligible entity with + * the smallest finish time + * @st: the service tree to select from. + * + * This function searches the first schedulable entity, starting from the + * root of the tree and going on the left every time on this side there is + * a subtree with at least one eligible (start >= vtime) entity. The path on + * the right is followed only if a) the left subtree contains no eligible + * entities and b) no eligible entity has been found yet. + */ +static struct bfq_entity *bfq_first_active_entity(struct bfq_service_tree *st) +{ + struct bfq_entity *entry, *first = NULL; + struct rb_node *node = st->active.rb_node; + + while (node != NULL) { + entry = rb_entry(node, struct bfq_entity, rb_node); +left: + if (!bfq_gt(entry->start, st->vtime)) + first = entry; + + BUG_ON(bfq_gt(entry->min_start, st->vtime)); + + if (node->rb_left != NULL) { + entry = rb_entry(node->rb_left, + struct bfq_entity, rb_node); + if (!bfq_gt(entry->min_start, st->vtime)) { + node = node->rb_left; + goto left; + } + } + if (first != NULL) + break; + node = node->rb_right; + } + + BUG_ON(first == NULL && !RB_EMPTY_ROOT(&st->active)); + return first; +} + +/** + * __bfq_lookup_next_entity - return the first eligible entity in @st. + * @st: the service tree. + * + * Update the virtual time in @st and return the first eligible entity + * it contains. + */ +static struct bfq_entity *__bfq_lookup_next_entity(struct bfq_service_tree *st, + bool force) +{ + struct bfq_entity *entity, *new_next_in_service = NULL; + + if (RB_EMPTY_ROOT(&st->active)) + return NULL; + + bfq_update_vtime(st); + entity = bfq_first_active_entity(st); + BUG_ON(bfq_gt(entity->start, st->vtime)); + + /* + * If the chosen entity does not match with the sched_data's + * next_in_service and we are forcedly serving the IDLE priority + * class tree, bubble up budget update. + */ + if (unlikely(force && entity != entity->sched_data->next_in_service)) { + new_next_in_service = entity; + for_each_entity(new_next_in_service) + bfq_update_budget(new_next_in_service); + } + + return entity; +} + +/** + * bfq_lookup_next_entity - return the first eligible entity in @sd. + * @sd: the sched_data. + * @extract: if true the returned entity will be also extracted from @sd. + * + * NOTE: since we cache the next_in_service entity at each level of the + * hierarchy, the complexity of the lookup can be decreased with + * absolutely no effort just returning the cached next_in_service value; + * we prefer to do full lookups to test the consistency of * the data + * structures. + */ +static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd, + int extract, + struct bfq_data *bfqd) +{ + struct bfq_service_tree *st = sd->service_tree; + struct bfq_entity *entity; + int i = 0; + + BUG_ON(sd->in_service_entity != NULL); + + if (bfqd != NULL && + jiffies - bfqd->bfq_class_idle_last_service > BFQ_CL_IDLE_TIMEOUT) { + entity = __bfq_lookup_next_entity(st + BFQ_IOPRIO_CLASSES - 1, + true); + if (entity != NULL) { + i = BFQ_IOPRIO_CLASSES - 1; + bfqd->bfq_class_idle_last_service = jiffies; + sd->next_in_service = entity; + } + } + for (; i < BFQ_IOPRIO_CLASSES; i++) { + entity = __bfq_lookup_next_entity(st + i, false); + if (entity != NULL) { + if (extract) { + bfq_check_next_in_service(sd, entity); + bfq_active_extract(st + i, entity); + sd->in_service_entity = entity; + sd->next_in_service = NULL; + } + break; + } + } + + return entity; +} + +/* + * Get next queue for service. + */ +static struct bfq_queue *bfq_get_next_queue(struct bfq_data *bfqd) +{ + struct bfq_entity *entity = NULL; + struct bfq_sched_data *sd; + struct bfq_queue *bfqq; + + BUG_ON(bfqd->in_service_queue != NULL); + + if (bfqd->busy_queues == 0) + return NULL; + + sd = &bfqd->root_group->sched_data; + for (; sd != NULL; sd = entity->my_sched_data) { + entity = bfq_lookup_next_entity(sd, 1, bfqd); + BUG_ON(entity == NULL); + entity->service = 0; + } + + bfqq = bfq_entity_to_bfqq(entity); + BUG_ON(bfqq == NULL); + + return bfqq; +} + +static void __bfq_bfqd_reset_in_service(struct bfq_data *bfqd) +{ + if (bfqd->in_service_bic != NULL) { + put_io_context(bfqd->in_service_bic->icq.ioc); + bfqd->in_service_bic = NULL; + } + + bfqd->in_service_queue = NULL; + del_timer(&bfqd->idle_slice_timer); +} + +static void bfq_deactivate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, + int requeue) +{ + struct bfq_entity *entity = &bfqq->entity; + + if (bfqq == bfqd->in_service_queue) + __bfq_bfqd_reset_in_service(bfqd); + + bfq_deactivate_entity(entity, requeue); +} + +static void bfq_activate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq) +{ + struct bfq_entity *entity = &bfqq->entity; + + bfq_activate_entity(entity); +} + +/* + * Called when the bfqq no longer has requests pending, remove it from + * the service tree. + */ +static void bfq_del_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq, + int requeue) +{ + BUG_ON(!bfq_bfqq_busy(bfqq)); + BUG_ON(!RB_EMPTY_ROOT(&bfqq->sort_list)); + + bfq_log_bfqq(bfqd, bfqq, "del from busy"); + + bfq_clear_bfqq_busy(bfqq); + + BUG_ON(bfqd->busy_queues == 0); + bfqd->busy_queues--; + + if (!bfqq->dispatched) { + bfq_weights_tree_remove(bfqd, &bfqq->entity, + &bfqd->queue_weights_tree); + if (!blk_queue_nonrot(bfqd->queue)) { + BUG_ON(!bfqd->busy_in_flight_queues); + bfqd->busy_in_flight_queues--; + if (bfq_bfqq_constantly_seeky(bfqq)) { + BUG_ON(!bfqd-> + const_seeky_busy_in_flight_queues); + bfqd->const_seeky_busy_in_flight_queues--; + } + } + } + if (bfqq->wr_coeff > 1) + bfqd->wr_busy_queues--; + + bfq_deactivate_bfqq(bfqd, bfqq, requeue); +} + +/* + * Called when an inactive queue receives a new request. + */ +static void bfq_add_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq) +{ + BUG_ON(bfq_bfqq_busy(bfqq)); + BUG_ON(bfqq == bfqd->in_service_queue); + + bfq_log_bfqq(bfqd, bfqq, "add to busy"); + + bfq_activate_bfqq(bfqd, bfqq); + + bfq_mark_bfqq_busy(bfqq); + bfqd->busy_queues++; + + if (!bfqq->dispatched) { + if (bfqq->wr_coeff == 1) + bfq_weights_tree_add(bfqd, &bfqq->entity, + &bfqd->queue_weights_tree); + if (!blk_queue_nonrot(bfqd->queue)) { + bfqd->busy_in_flight_queues++; + if (bfq_bfqq_constantly_seeky(bfqq)) + bfqd->const_seeky_busy_in_flight_queues++; + } + } + if (bfqq->wr_coeff > 1) + bfqd->wr_busy_queues++; +} diff --git a/block/bfq.h b/block/bfq.h new file mode 100644 index 00000000000..aeb9bb4bbce --- /dev/null +++ b/block/bfq.h @@ -0,0 +1,805 @@ +/* + * BFQ-v7r8 for 3.10.8+: data structures and common functions prototypes. + * + * Based on ideas and code from CFQ: + * Copyright (C) 2003 Jens Axboe + * + * Copyright (C) 2008 Fabio Checconi + * Paolo Valente + * + * Copyright (C) 2010 Paolo Valente + */ + +#ifndef _BFQ_H +#define _BFQ_H + +#include +#include +#include +#include + +#define BFQ_IOPRIO_CLASSES 3 +#define BFQ_CL_IDLE_TIMEOUT (HZ/5) + +#define BFQ_MIN_WEIGHT 1 +#define BFQ_MAX_WEIGHT 1000 + +#define BFQ_DEFAULT_QUEUE_IOPRIO 4 + +#define BFQ_DEFAULT_GRP_WEIGHT 10 +#define BFQ_DEFAULT_GRP_IOPRIO 0 +#define BFQ_DEFAULT_GRP_CLASS IOPRIO_CLASS_BE + +struct bfq_entity; + +/** + * struct bfq_service_tree - per ioprio_class service tree. + * @active: tree for active entities (i.e., those backlogged). + * @idle: tree for idle entities (i.e., those not backlogged, with V <= F_i). + * @first_idle: idle entity with minimum F_i. + * @last_idle: idle entity with maximum F_i. + * @vtime: scheduler virtual time. + * @wsum: scheduler weight sum; active and idle entities contribute to it. + * + * Each service tree represents a B-WF2Q+ scheduler on its own. Each + * ioprio_class has its own independent scheduler, and so its own + * bfq_service_tree. All the fields are protected by the queue lock + * of the containing bfqd. + */ +struct bfq_service_tree { + struct rb_root active; + struct rb_root idle; + + struct bfq_entity *first_idle; + struct bfq_entity *last_idle; + + u64 vtime; + unsigned long wsum; +}; + +/** + * struct bfq_sched_data - multi-class scheduler. + * @in_service_entity: entity in service. + * @next_in_service: head-of-the-line entity in the scheduler. + * @service_tree: array of service trees, one per ioprio_class. + * + * bfq_sched_data is the basic scheduler queue. It supports three + * ioprio_classes, and can be used either as a toplevel queue or as + * an intermediate queue on a hierarchical setup. + * @next_in_service points to the active entity of the sched_data + * service trees that will be scheduled next. + * + * The supported ioprio_classes are the same as in CFQ, in descending + * priority order, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE. + * Requests from higher priority queues are served before all the + * requests from lower priority queues; among requests of the same + * queue requests are served according to B-WF2Q+. + * All the fields are protected by the queue lock of the containing bfqd. + */ +struct bfq_sched_data { + struct bfq_entity *in_service_entity; + struct bfq_entity *next_in_service; + struct bfq_service_tree service_tree[BFQ_IOPRIO_CLASSES]; +}; + +/** + * struct bfq_weight_counter - counter of the number of all active entities + * with a given weight. + * @weight: weight of the entities that this counter refers to. + * @num_active: number of active entities with this weight. + * @weights_node: weights tree member (see bfq_data's @queue_weights_tree + * and @group_weights_tree). + */ +struct bfq_weight_counter { + short int weight; + unsigned int num_active; + struct rb_node weights_node; +}; + +/** + * struct bfq_entity - schedulable entity. + * @rb_node: service_tree member. + * @weight_counter: pointer to the weight counter associated with this entity. + * @on_st: flag, true if the entity is on a tree (either the active or + * the idle one of its service_tree). + * @finish: B-WF2Q+ finish timestamp (aka F_i). + * @start: B-WF2Q+ start timestamp (aka S_i). + * @tree: tree the entity is enqueued into; %NULL if not on a tree. + * @min_start: minimum start time of the (active) subtree rooted at + * this entity; used for O(log N) lookups into active trees. + * @service: service received during the last round of service. + * @budget: budget used to calculate F_i; F_i = S_i + @budget / @weight. + * @weight: weight of the queue + * @parent: parent entity, for hierarchical scheduling. + * @my_sched_data: for non-leaf nodes in the cgroup hierarchy, the + * associated scheduler queue, %NULL on leaf nodes. + * @sched_data: the scheduler queue this entity belongs to. + * @ioprio: the ioprio in use. + * @new_weight: when a weight change is requested, the new weight value. + * @orig_weight: original weight, used to implement weight boosting + * @new_ioprio: when an ioprio change is requested, the new ioprio value. + * @ioprio_class: the ioprio_class in use. + * @new_ioprio_class: when an ioprio_class change is requested, the new + * ioprio_class value. + * @ioprio_changed: flag, true when the user requested a weight, ioprio or + * ioprio_class change. + * + * A bfq_entity is used to represent either a bfq_queue (leaf node in the + * cgroup hierarchy) or a bfq_group into the upper level scheduler. Each + * entity belongs to the sched_data of the parent group in the cgroup + * hierarchy. Non-leaf entities have also their own sched_data, stored + * in @my_sched_data. + * + * Each entity stores independently its priority values; this would + * allow different weights on different devices, but this + * functionality is not exported to userspace by now. Priorities and + * weights are updated lazily, first storing the new values into the + * new_* fields, then setting the @ioprio_changed flag. As soon as + * there is a transition in the entity state that allows the priority + * update to take place the effective and the requested priority + * values are synchronized. + * + * Unless cgroups are used, the weight value is calculated from the + * ioprio to export the same interface as CFQ. When dealing with + * ``well-behaved'' queues (i.e., queues that do not spend too much + * time to consume their budget and have true sequential behavior, and + * when there are no external factors breaking anticipation) the + * relative weights at each level of the cgroups hierarchy should be + * guaranteed. All the fields are protected by the queue lock of the + * containing bfqd. + */ +struct bfq_entity { + struct rb_node rb_node; + struct bfq_weight_counter *weight_counter; + + int on_st; + + u64 finish; + u64 start; + + struct rb_root *tree; + + u64 min_start; + + unsigned long service, budget; + unsigned short weight, new_weight; + unsigned short orig_weight; + + struct bfq_entity *parent; + + struct bfq_sched_data *my_sched_data; + struct bfq_sched_data *sched_data; + + unsigned short ioprio, new_ioprio; + unsigned short ioprio_class, new_ioprio_class; + + int ioprio_changed; +}; + +struct bfq_group; + +/** + * struct bfq_queue - leaf schedulable entity. + * @ref: reference counter. + * @bfqd: parent bfq_data. + * @new_bfqq: shared bfq_queue if queue is cooperating with + * one or more other queues. + * @pos_node: request-position tree member (see bfq_data's @rq_pos_tree). + * @pos_root: request-position tree root (see bfq_data's @rq_pos_tree). + * @sort_list: sorted list of pending requests. + * @next_rq: if fifo isn't expired, next request to serve. + * @queued: nr of requests queued in @sort_list. + * @allocated: currently allocated requests. + * @meta_pending: pending metadata requests. + * @fifo: fifo list of requests in sort_list. + * @entity: entity representing this queue in the scheduler. + * @max_budget: maximum budget allowed from the feedback mechanism. + * @budget_timeout: budget expiration (in jiffies). + * @dispatched: number of requests on the dispatch list or inside driver. + * @flags: status flags. + * @bfqq_list: node for active/idle bfqq list inside our bfqd. + * @burst_list_node: node for the device's burst list. + * @seek_samples: number of seeks sampled + * @seek_total: sum of the distances of the seeks sampled + * @seek_mean: mean seek distance + * @last_request_pos: position of the last request enqueued + * @requests_within_timer: number of consecutive pairs of request completion + * and arrival, such that the queue becomes idle + * after the completion, but the next request arrives + * within an idle time slice; used only if the queue's + * IO_bound has been cleared. + * @pid: pid of the process owning the queue, used for logging purposes. + * @last_wr_start_finish: start time of the current weight-raising period if + * the @bfq-queue is being weight-raised, otherwise + * finish time of the last weight-raising period + * @wr_cur_max_time: current max raising time for this queue + * @soft_rt_next_start: minimum time instant such that, only if a new + * request is enqueued after this time instant in an + * idle @bfq_queue with no outstanding requests, then + * the task associated with the queue it is deemed as + * soft real-time (see the comments to the function + * bfq_bfqq_softrt_next_start()) + * @last_idle_bklogged: time of the last transition of the @bfq_queue from + * idle to backlogged + * @service_from_backlogged: cumulative service received from the @bfq_queue + * since the last transition from idle to + * backlogged + * @bic: pointer to the bfq_io_cq owning the bfq_queue, set to %NULL if the + * queue is shared + * + * A bfq_queue is a leaf request queue; it can be associated with an + * io_context or more, if it is async or shared between cooperating + * processes. @cgroup holds a reference to the cgroup, to be sure that it + * does not disappear while a bfqq still references it (mostly to avoid + * races between request issuing and task migration followed by cgroup + * destruction). + * All the fields are protected by the queue lock of the containing bfqd. + */ +struct bfq_queue { + atomic_t ref; + struct bfq_data *bfqd; + + /* fields for cooperating queues handling */ + struct bfq_queue *new_bfqq; + struct rb_node pos_node; + struct rb_root *pos_root; + + struct rb_root sort_list; + struct request *next_rq; + int queued[2]; + int allocated[2]; + int meta_pending; + struct list_head fifo; + + struct bfq_entity entity; + + unsigned long max_budget; + unsigned long budget_timeout; + + int dispatched; + + unsigned int flags; + + struct list_head bfqq_list; + + struct hlist_node burst_list_node; + + unsigned int seek_samples; + u64 seek_total; + sector_t seek_mean; + sector_t last_request_pos; + + unsigned int requests_within_timer; + + pid_t pid; + struct bfq_io_cq *bic; + + /* weight-raising fields */ + unsigned long wr_cur_max_time; + unsigned long soft_rt_next_start; + unsigned long last_wr_start_finish; + unsigned int wr_coeff; + unsigned long last_idle_bklogged; + unsigned long service_from_backlogged; +}; + +/** + * struct bfq_ttime - per process thinktime stats. + * @ttime_total: total process thinktime + * @ttime_samples: number of thinktime samples + * @ttime_mean: average process thinktime + */ +struct bfq_ttime { + unsigned long last_end_request; + + unsigned long ttime_total; + unsigned long ttime_samples; + unsigned long ttime_mean; +}; + +/** + * struct bfq_io_cq - per (request_queue, io_context) structure. + * @icq: associated io_cq structure + * @bfqq: array of two process queues, the sync and the async + * @ttime: associated @bfq_ttime struct + * @wr_time_left: snapshot of the time left before weight raising ends + * for the sync queue associated to this process; this + * snapshot is taken to remember this value while the weight + * raising is suspended because the queue is merged with a + * shared queue, and is used to set @raising_cur_max_time + * when the queue is split from the shared queue and its + * weight is raised again + * @saved_idle_window: same purpose as the previous field for the idle + * window + * @saved_IO_bound: same purpose as the previous two fields for the I/O + * bound classification of a queue + * @saved_in_large_burst: same purpose as the previous fields for the + * value of the field keeping the queue's belonging + * to a large burst + * @was_in_burst_list: true if the queue belonged to a burst list + * before its merge with another cooperating queue + * @cooperations: counter of consecutive successful queue merges underwent + * by any of the process' @bfq_queues + * @failed_cooperations: counter of consecutive failed queue merges of any + * of the process' @bfq_queues + */ +struct bfq_io_cq { + struct io_cq icq; /* must be the first member */ + struct bfq_queue *bfqq[2]; + struct bfq_ttime ttime; + int ioprio; + + unsigned int wr_time_left; + bool saved_idle_window; + bool saved_IO_bound; + + bool saved_in_large_burst; + bool was_in_burst_list; + + unsigned int cooperations; + unsigned int failed_cooperations; +}; + +enum bfq_device_speed { + BFQ_BFQD_FAST, + BFQ_BFQD_SLOW, +}; + +/** + * struct bfq_data - per device data structure. + * @queue: request queue for the managed device. + * @root_group: root bfq_group for the device. + * @rq_pos_tree: rbtree sorted by next_request position, used when + * determining if two or more queues have interleaving + * requests (see bfq_close_cooperator()). + * @active_numerous_groups: number of bfq_groups containing more than one + * active @bfq_entity. + * @queue_weights_tree: rbtree of weight counters of @bfq_queues, sorted by + * weight. Used to keep track of whether all @bfq_queues + * have the same weight. The tree contains one counter + * for each distinct weight associated to some active + * and not weight-raised @bfq_queue (see the comments to + * the functions bfq_weights_tree_[add|remove] for + * further details). + * @group_weights_tree: rbtree of non-queue @bfq_entity weight counters, sorted + * by weight. Used to keep track of whether all + * @bfq_groups have the same weight. The tree contains + * one counter for each distinct weight associated to + * some active @bfq_group (see the comments to the + * functions bfq_weights_tree_[add|remove] for further + * details). + * @busy_queues: number of bfq_queues containing requests (including the + * queue in service, even if it is idling). + * @busy_in_flight_queues: number of @bfq_queues containing pending or + * in-flight requests, plus the @bfq_queue in + * service, even if idle but waiting for the + * possible arrival of its next sync request. This + * field is updated only if the device is rotational, + * but used only if the device is also NCQ-capable. + * The reason why the field is updated also for non- + * NCQ-capable rotational devices is related to the + * fact that the value of @hw_tag may be set also + * later than when busy_in_flight_queues may need to + * be incremented for the first time(s). Taking also + * this possibility into account, to avoid unbalanced + * increments/decrements, would imply more overhead + * than just updating busy_in_flight_queues + * regardless of the value of @hw_tag. + * @const_seeky_busy_in_flight_queues: number of constantly-seeky @bfq_queues + * (that is, seeky queues that expired + * for budget timeout at least once) + * containing pending or in-flight + * requests, including the in-service + * @bfq_queue if constantly seeky. This + * field is updated only if the device + * is rotational, but used only if the + * device is also NCQ-capable (see the + * comments to @busy_in_flight_queues). + * @wr_busy_queues: number of weight-raised busy @bfq_queues. + * @queued: number of queued requests. + * @rq_in_driver: number of requests dispatched and waiting for completion. + * @sync_flight: number of sync requests in the driver. + * @max_rq_in_driver: max number of reqs in driver in the last + * @hw_tag_samples completed requests. + * @hw_tag_samples: nr of samples used to calculate hw_tag. + * @hw_tag: flag set to one if the driver is showing a queueing behavior. + * @budgets_assigned: number of budgets assigned. + * @idle_slice_timer: timer set when idling for the next sequential request + * from the queue in service. + * @unplug_work: delayed work to restart dispatching on the request queue. + * @in_service_queue: bfq_queue in service. + * @in_service_bic: bfq_io_cq (bic) associated with the @in_service_queue. + * @last_position: on-disk position of the last served request. + * @last_budget_start: beginning of the last budget. + * @last_idling_start: beginning of the last idle slice. + * @peak_rate: peak transfer rate observed for a budget. + * @peak_rate_samples: number of samples used to calculate @peak_rate. + * @bfq_max_budget: maximum budget allotted to a bfq_queue before + * rescheduling. + * @group_list: list of all the bfq_groups active on the device. + * @active_list: list of all the bfq_queues active on the device. + * @idle_list: list of all the bfq_queues idle on the device. + * @bfq_fifo_expire: timeout for async/sync requests; when it expires + * requests are served in fifo order. + * @bfq_back_penalty: weight of backward seeks wrt forward ones. + * @bfq_back_max: maximum allowed backward seek. + * @bfq_slice_idle: maximum idling time. + * @bfq_user_max_budget: user-configured max budget value + * (0 for auto-tuning). + * @bfq_max_budget_async_rq: maximum budget (in nr of requests) allotted to + * async queues. + * @bfq_timeout: timeout for bfq_queues to consume their budget; used to + * to prevent seeky queues to impose long latencies to well + * behaved ones (this also implies that seeky queues cannot + * receive guarantees in the service domain; after a timeout + * they are charged for the whole allocated budget, to try + * to preserve a behavior reasonably fair among them, but + * without service-domain guarantees). + * @bfq_coop_thresh: number of queue merges after which a @bfq_queue is + * no more granted any weight-raising. + * @bfq_failed_cooperations: number of consecutive failed cooperation + * chances after which weight-raising is restored + * to a queue subject to more than bfq_coop_thresh + * queue merges. + * @bfq_requests_within_timer: number of consecutive requests that must be + * issued within the idle time slice to set + * again idling to a queue which was marked as + * non-I/O-bound (see the definition of the + * IO_bound flag for further details). + * @last_ins_in_burst: last time at which a queue entered the current + * burst of queues being activated shortly after + * each other; for more details about this and the + * following parameters related to a burst of + * activations, see the comments to the function + * @bfq_handle_burst. + * @bfq_burst_interval: reference time interval used to decide whether a + * queue has been activated shortly after + * @last_ins_in_burst. + * @burst_size: number of queues in the current burst of queue activations. + * @bfq_large_burst_thresh: maximum burst size above which the current + * queue-activation burst is deemed as 'large'. + * @large_burst: true if a large queue-activation burst is in progress. + * @burst_list: head of the burst list (as for the above fields, more details + * in the comments to the function bfq_handle_burst). + * @low_latency: if set to true, low-latency heuristics are enabled. + * @bfq_wr_coeff: maximum factor by which the weight of a weight-raised + * queue is multiplied. + * @bfq_wr_max_time: maximum duration of a weight-raising period (jiffies). + * @bfq_wr_rt_max_time: maximum duration for soft real-time processes. + * @bfq_wr_min_idle_time: minimum idle period after which weight-raising + * may be reactivated for a queue (in jiffies). + * @bfq_wr_min_inter_arr_async: minimum period between request arrivals + * after which weight-raising may be + * reactivated for an already busy queue + * (in jiffies). + * @bfq_wr_max_softrt_rate: max service-rate for a soft real-time queue, + * sectors per seconds. + * @RT_prod: cached value of the product R*T used for computing the maximum + * duration of the weight raising automatically. + * @device_speed: device-speed class for the low-latency heuristic. + * @oom_bfqq: fallback dummy bfqq for extreme OOM conditions. + * + * All the fields are protected by the @queue lock. + */ +struct bfq_data { + struct request_queue *queue; + + struct bfq_group *root_group; + struct rb_root rq_pos_tree; + +#ifdef CONFIG_CGROUP_BFQIO + int active_numerous_groups; +#endif + + struct rb_root queue_weights_tree; + struct rb_root group_weights_tree; + + int busy_queues; + int busy_in_flight_queues; + int const_seeky_busy_in_flight_queues; + int wr_busy_queues; + int queued; + int rq_in_driver; + int sync_flight; + + int max_rq_in_driver; + int hw_tag_samples; + int hw_tag; + + int budgets_assigned; + + struct timer_list idle_slice_timer; + struct work_struct unplug_work; + + struct bfq_queue *in_service_queue; + struct bfq_io_cq *in_service_bic; + + sector_t last_position; + + ktime_t last_budget_start; + ktime_t last_idling_start; + int peak_rate_samples; + u64 peak_rate; + unsigned long bfq_max_budget; + + struct hlist_head group_list; + struct list_head active_list; + struct list_head idle_list; + + unsigned int bfq_fifo_expire[2]; + unsigned int bfq_back_penalty; + unsigned int bfq_back_max; + unsigned int bfq_slice_idle; + u64 bfq_class_idle_last_service; + + unsigned int bfq_user_max_budget; + unsigned int bfq_max_budget_async_rq; + unsigned int bfq_timeout[2]; + + unsigned int bfq_coop_thresh; + unsigned int bfq_failed_cooperations; + unsigned int bfq_requests_within_timer; + + unsigned long last_ins_in_burst; + unsigned long bfq_burst_interval; + int burst_size; + unsigned long bfq_large_burst_thresh; + bool large_burst; + struct hlist_head burst_list; + + bool low_latency; + + /* parameters of the low_latency heuristics */ + unsigned int bfq_wr_coeff; + unsigned int bfq_wr_max_time; + unsigned int bfq_wr_rt_max_time; + unsigned int bfq_wr_min_idle_time; + unsigned long bfq_wr_min_inter_arr_async; + unsigned int bfq_wr_max_softrt_rate; + u64 RT_prod; + enum bfq_device_speed device_speed; + + struct bfq_queue oom_bfqq; +}; + +enum bfqq_state_flags { + BFQ_BFQQ_FLAG_busy = 0, /* has requests or is in service */ + BFQ_BFQQ_FLAG_wait_request, /* waiting for a request */ + BFQ_BFQQ_FLAG_must_alloc, /* must be allowed rq alloc */ + BFQ_BFQQ_FLAG_fifo_expire, /* FIFO checked in this slice */ + BFQ_BFQQ_FLAG_idle_window, /* slice idling enabled */ + BFQ_BFQQ_FLAG_sync, /* synchronous queue */ + BFQ_BFQQ_FLAG_budget_new, /* no completion with this budget */ + BFQ_BFQQ_FLAG_IO_bound, /* + * bfqq has timed-out at least once + * having consumed at most 2/10 of + * its budget + */ + BFQ_BFQQ_FLAG_in_large_burst, /* + * bfqq activated in a large burst, + * see comments to bfq_handle_burst. + */ + BFQ_BFQQ_FLAG_constantly_seeky, /* + * bfqq has proved to be slow and + * seeky until budget timeout + */ + BFQ_BFQQ_FLAG_softrt_update, /* + * may need softrt-next-start + * update + */ + BFQ_BFQQ_FLAG_coop, /* bfqq is shared */ + BFQ_BFQQ_FLAG_split_coop, /* shared bfqq will be split */ + BFQ_BFQQ_FLAG_just_split, /* queue has just been split */ +}; + +#define BFQ_BFQQ_FNS(name) \ +static inline void bfq_mark_bfqq_##name(struct bfq_queue *bfqq) \ +{ \ + (bfqq)->flags |= (1 << BFQ_BFQQ_FLAG_##name); \ +} \ +static inline void bfq_clear_bfqq_##name(struct bfq_queue *bfqq) \ +{ \ + (bfqq)->flags &= ~(1 << BFQ_BFQQ_FLAG_##name); \ +} \ +static inline int bfq_bfqq_##name(const struct bfq_queue *bfqq) \ +{ \ + return ((bfqq)->flags & (1 << BFQ_BFQQ_FLAG_##name)) != 0; \ +} + +BFQ_BFQQ_FNS(busy); +BFQ_BFQQ_FNS(wait_request); +BFQ_BFQQ_FNS(must_alloc); +BFQ_BFQQ_FNS(fifo_expire); +BFQ_BFQQ_FNS(idle_window); +BFQ_BFQQ_FNS(sync); +BFQ_BFQQ_FNS(budget_new); +BFQ_BFQQ_FNS(IO_bound); +BFQ_BFQQ_FNS(in_large_burst); +BFQ_BFQQ_FNS(constantly_seeky); +BFQ_BFQQ_FNS(coop); +BFQ_BFQQ_FNS(split_coop); +BFQ_BFQQ_FNS(just_split); +BFQ_BFQQ_FNS(softrt_update); +#undef BFQ_BFQQ_FNS + +/* Logging facilities. */ +#define bfq_log_bfqq(bfqd, bfqq, fmt, args...) \ + blk_add_trace_msg((bfqd)->queue, "bfq%d " fmt, (bfqq)->pid, ##args) + +#define bfq_log(bfqd, fmt, args...) \ + blk_add_trace_msg((bfqd)->queue, "bfq " fmt, ##args) + +/* Expiration reasons. */ +enum bfqq_expiration { + BFQ_BFQQ_TOO_IDLE = 0, /* + * queue has been idling for + * too long + */ + BFQ_BFQQ_BUDGET_TIMEOUT, /* budget took too long to be used */ + BFQ_BFQQ_BUDGET_EXHAUSTED, /* budget consumed */ + BFQ_BFQQ_NO_MORE_REQUESTS, /* the queue has no more requests */ +}; + +#ifdef CONFIG_CGROUP_BFQIO +/** + * struct bfq_group - per (device, cgroup) data structure. + * @entity: schedulable entity to insert into the parent group sched_data. + * @sched_data: own sched_data, to contain child entities (they may be + * both bfq_queues and bfq_groups). + * @group_node: node to be inserted into the bfqio_cgroup->group_data + * list of the containing cgroup's bfqio_cgroup. + * @bfqd_node: node to be inserted into the @bfqd->group_list list + * of the groups active on the same device; used for cleanup. + * @bfqd: the bfq_data for the device this group acts upon. + * @async_bfqq: array of async queues for all the tasks belonging to + * the group, one queue per ioprio value per ioprio_class, + * except for the idle class that has only one queue. + * @async_idle_bfqq: async queue for the idle class (ioprio is ignored). + * @my_entity: pointer to @entity, %NULL for the toplevel group; used + * to avoid too many special cases during group creation/ + * migration. + * @active_entities: number of active entities belonging to the group; + * unused for the root group. Used to know whether there + * are groups with more than one active @bfq_entity + * (see the comments to the function + * bfq_bfqq_must_not_expire()). + * + * Each (device, cgroup) pair has its own bfq_group, i.e., for each cgroup + * there is a set of bfq_groups, each one collecting the lower-level + * entities belonging to the group that are acting on the same device. + * + * Locking works as follows: + * o @group_node is protected by the bfqio_cgroup lock, and is accessed + * via RCU from its readers. + * o @bfqd is protected by the queue lock, RCU is used to access it + * from the readers. + * o All the other fields are protected by the @bfqd queue lock. + */ +struct bfq_group { + struct bfq_entity entity; + struct bfq_sched_data sched_data; + + struct hlist_node group_node; + struct hlist_node bfqd_node; + + void *bfqd; + + struct bfq_queue *async_bfqq[2][IOPRIO_BE_NR]; + struct bfq_queue *async_idle_bfqq; + + struct bfq_entity *my_entity; + + int active_entities; +}; + +/** + * struct bfqio_cgroup - bfq cgroup data structure. + * @css: subsystem state for bfq in the containing cgroup. + * @weight: cgroup weight. + * @ioprio: cgroup ioprio. + * @ioprio_class: cgroup ioprio_class. + * @lock: spinlock that protects @ioprio, @ioprio_class and @group_data. + * @group_data: list containing the bfq_group belonging to this cgroup. + * + * @group_data is accessed using RCU, with @lock protecting the updates, + * @ioprio and @ioprio_class are protected by @lock. + */ +struct bfqio_cgroup { + struct cgroup_subsys_state css; + + unsigned short weight, ioprio, ioprio_class; + + spinlock_t lock; + struct hlist_head group_data; +}; +#else +struct bfq_group { + struct bfq_sched_data sched_data; + + struct bfq_queue *async_bfqq[2][IOPRIO_BE_NR]; + struct bfq_queue *async_idle_bfqq; +}; +#endif + +static inline struct bfq_service_tree * +bfq_entity_service_tree(struct bfq_entity *entity) +{ + struct bfq_sched_data *sched_data = entity->sched_data; + unsigned int idx = entity->ioprio_class - 1; + + BUG_ON(idx >= BFQ_IOPRIO_CLASSES); + BUG_ON(sched_data == NULL); + + return sched_data->service_tree + idx; +} + +static inline struct bfq_queue *bic_to_bfqq(struct bfq_io_cq *bic, + bool is_sync) +{ + return bic->bfqq[is_sync]; +} + +static inline void bic_set_bfqq(struct bfq_io_cq *bic, + struct bfq_queue *bfqq, bool is_sync) +{ + bic->bfqq[is_sync] = bfqq; +} + +static inline struct bfq_data *bic_to_bfqd(struct bfq_io_cq *bic) +{ + return bic->icq.q->elevator->elevator_data; +} + +/** + * bfq_get_bfqd_locked - get a lock to a bfqd using a RCU protected pointer. + * @ptr: a pointer to a bfqd. + * @flags: storage for the flags to be saved. + * + * This function allows bfqg->bfqd to be protected by the + * queue lock of the bfqd they reference; the pointer is dereferenced + * under RCU, so the storage for bfqd is assured to be safe as long + * as the RCU read side critical section does not end. After the + * bfqd->queue->queue_lock is taken the pointer is rechecked, to be + * sure that no other writer accessed it. If we raced with a writer, + * the function returns NULL, with the queue unlocked, otherwise it + * returns the dereferenced pointer, with the queue locked. + */ +static inline struct bfq_data *bfq_get_bfqd_locked(void **ptr, + unsigned long *flags) +{ + struct bfq_data *bfqd; + + rcu_read_lock(); + bfqd = rcu_dereference(*(struct bfq_data **)ptr); + + if (bfqd != NULL) { + spin_lock_irqsave(bfqd->queue->queue_lock, *flags); + if (*ptr == bfqd) + goto out; + spin_unlock_irqrestore(bfqd->queue->queue_lock, *flags); + } + + bfqd = NULL; +out: + rcu_read_unlock(); + return bfqd; +} + +static inline void bfq_put_bfqd_unlock(struct bfq_data *bfqd, + unsigned long *flags) +{ + spin_unlock_irqrestore(bfqd->queue->queue_lock, *flags); +} + +static void bfq_check_ioprio_change(struct bfq_io_cq *bic); +static void bfq_put_queue(struct bfq_queue *bfqq); +static void bfq_dispatch_insert(struct request_queue *q, struct request *rq); +static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd, + struct bfq_group *bfqg, int is_sync, + struct bfq_io_cq *bic, gfp_t gfp_mask); +static void bfq_end_wr_async_queues(struct bfq_data *bfqd, + struct bfq_group *bfqg); +static void bfq_put_async_queues(struct bfq_data *bfqd, struct bfq_group *bfqg); +static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq); + +#endif /* _BFQ_H */ diff --git a/block/genhd.c b/block/genhd.c index 6f612a74781..dff19f4cb49 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -828,6 +828,10 @@ static void disk_seqf_stop(struct seq_file *seqf, void *v) if (iter) { class_dev_iter_exit(iter); kfree(iter); +<<<<<<< HEAD +======= + seqf->private = NULL; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } } diff --git a/block/partition-generic.c b/block/partition-generic.c index c7942acf137..822bd5eb168 100644 --- a/block/partition-generic.c +++ b/block/partition-generic.c @@ -20,6 +20,12 @@ #include "partitions/check.h" +<<<<<<< HEAD +======= +#ifdef CONFIG_MMC_YL_PARAMS +extern void notify_ylparams(struct hd_struct *part); +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #ifdef CONFIG_BLK_DEV_MD extern void md_autodetect_dev(dev_t dev); #endif @@ -531,6 +537,12 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev) disk->disk_name, p, -PTR_ERR(part)); continue; } +<<<<<<< HEAD +======= +#ifdef CONFIG_MMC_YL_PARAMS + notify_ylparams(part); +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #ifdef CONFIG_BLK_DEV_MD if (state->parts[p].flags & ADDPART_FLAG_RAID) md_autodetect_dev(part_to_dev(part)->devt); diff --git a/build.sh b/build.sh new file mode 100755 index 00000000000..e1299c71ac4 --- /dev/null +++ b/build.sh @@ -0,0 +1,123 @@ +# +# Copyright © 2016, Varun Chitre "varun.chitre15" +# Copyright © 2017, Ritesh Saxena +# Copyright © 2018, Mohd Faraz +# +# Custom build script +# +# This software is licensed under the terms of the GNU General Public +# License version 2, as published by the Free Software Foundation, and +# may be copied, distributed, and modified under those terms. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# Please maintain this if you use this script or any part of it +# +KERNEL_DIR=$PWD +KERN_IMG=$KERNEL_DIR/out/arch/arm64/boot/Image.gz-dtb +BUILD_START=$(date +"%s") +blue='\033[0;34m' +cyan='\033[0;36m' +green='\e[0;32m' +yellow='\033[0;33m' +red='\033[0;31m' +nocol='\033[0m' +purple='\e[0;35m' +white='\e[0;37m' +DEVICE="LS-5015" +J="-j$(grep -c ^processor /proc/cpuinfo)" +rm -rf $KERNEL_DIR/out +mkdir $KERNEL_DIR/out + +# Get Toolchain + +UBER=$KERNEL_DIR/../uber + +function TC() { + +if [[ -d ${UBER} ]]; then + if [[ -d ${UBER}/.git ]]; then + cd ${UBER} + git fetch origin + git reset --hard origin/master + git clean -fxd > /dev/null 2>&1 + cd ${KERNEL_DIR} + else + rm -rf ${UBER} + fi +else + git clone https://bitbucket.org/UBERTC/aarch64-linux-android-4.9-kernel.git $UBER +fi +} + +# Modify the following variable if you want to build +export CROSS_COMPILE=$UBER/bin/aarch64-linux-android- +export ARCH=arm64 +export SUBARCH=arm64 +export KBUILD_BUILD_USER="Faraz" +export KBUILD_BUILD_HOST="TimeMachine" +export USE_CCACHE=1 +BUILD_DIR=$KERNEL_DIR/build +VERSION="X4" +DATE=$(date -u +%Y%m%d-%H%M) +ZIP_NAME=Nichrome-$DEVICE-$VERSION-$DATE + +compile_kernel () +{ +echo -e "$cyan****************************************************" +echo " Compiling Nichrome kernel " +echo -e "****************************************************" +echo -e "$nocol" +rm -f $KERN_IMG +make O=out LS5015_defconfig +make O=out $J +if ! [ -a $KERN_IMG ]; +then +echo -e "$red Kernel Compilation failed! Fix the errors! $nocol" +exit 1 +fi + + +make_zip +} + +make_zip () +{ +if [[ $( ls ${KERNEL_DIR}/out/arch/arm64/boot/Image.gz-dtb 2>/dev/null | wc -l ) != "0" ]]; then + BUILD_RESULT_STRING="BUILD SUCCESSFUL" + echo "Making Zip" + rm $BUILD_DIR/*.zip + rm $BUILD_DIR/zImage + cp $KERNEL_DIR/out/arch/arm64/boot/Image.gz-dtb $BUILD_DIR/zImage + cd $BUILD_DIR + zip -r ${ZIP_NAME}.zip * + cd $KERNEL_DIR + rm -rf $KERNEL_DIR/out + rm $BUILD_DIR/zImage +else + BUILD_RESULT_STRING="BUILD FAILED" +fi +} + +case $1 in +clean) +make ARCH=arm64 O=out-j8 clean mrproper +;; +*) +TC +compile_kernel +;; +esac +BUILD_END=$(date +"%s") +DIFF=$(($BUILD_END - $BUILD_START)) +if [[ "${BUILD_RESULT_STRING}" = "BUILD SUCCESSFUL" ]]; then +echo -e "$cyan****************************************************************************************$nocol" +echo -e "$cyan*$nocol${red} ${BUILD_RESULT_STRING}$nocol" +echo -e "$cyan*$nocol$yellow Build completed in $(($DIFF / 60)) minute(s) and $(($DIFF % 60)) seconds.$nocol" +echo -e "$cyan*$nocol${green} ZIP LOCATION: ${BUILD_DIR}/${ZIP_NAME}.zip$nocol" +echo -e "$cyan*$nocol${green} SIZE: $( du -h ${BUILD_DIR}/${ZIP_NAME}.zip | awk '{print $1}' )$nocol" +echo -e "$cyan****************************************************************************************$nocol" +fi diff --git a/build/META-INF/CERT.RSA b/build/META-INF/CERT.RSA new file mode 100644 index 00000000000..8a87016ac8a Binary files /dev/null and b/build/META-INF/CERT.RSA differ diff --git a/build/META-INF/CERT.SF b/build/META-INF/CERT.SF new file mode 100644 index 00000000000..7e866dc5d3b --- /dev/null +++ b/build/META-INF/CERT.SF @@ -0,0 +1,10328 @@ +Signature-Version: 1.0 +Created-By: 1.0 (Android SignApk) +SHA1-Digest-Manifest: R69yePm1P1DzfmkNMZoGywQMbz0= + +Name: system/media/audio/Bob Dylan - Duquesne Whistle.mp3 +SHA1-Digest: u3Z0ucA+InJ04+IrABlmV6Wc8p0= + +Name: system/vendor/camera/SOI08BN1.dat +SHA1-Digest: sO7b0IIt5U0F3PM+18Hi8g1jxm0= + +Name: system/media/pictures/chuxi_tulou_cluster_01.jpg +SHA1-Digest: e0FOJIfZrfHw4KWFYNu3RI1CpO4= + +Name: system/lib/libhwcexternal.so +SHA1-Digest: FBAD2aLcI+KbmQJZt+/tawZgqNw= + +Name: system/lib/libpf.so +SHA1-Digest: eUH7KqtDxuMahECqYx/sV8W0I0A= + +Name: system/etc/legal/leaflet/ru/Personal-medical-devices.html +SHA1-Digest: HP2a4vnQGR/1QTucvaCvObLsdis= + +Name: system/media/audio/ringtones/RomancingTheTone.ogg +SHA1-Digest: vWOeZbHxqiBc6El1J95d4J2MpJo= + +Name: system/lib/libpowermanager.so +SHA1-Digest: cil4ma+WH5c6KM7V0tQrlio2VX0= + +Name: system/lib/libstagefright_soft_aacdec.so +SHA1-Digest: bF9BuObcYI+Yuvh9aMUp5YbtD4o= + +Name: system/lib/libnjname.so +SHA1-Digest: sTY2dDEsw0UnzqJgXO1mHaO3SoU= + +Name: system/etc/legal/leaflet/pt/Our-warranty---12.html +SHA1-Digest: eoMpIHVReowobpvk5v53J5zppYk= + +Name: system/lib/libTimeService.so +SHA1-Digest: ZMYPiYKlCSQTv9AcBTjFJ1i/M3k= + +Name: system/fonts/SoMCSans-Regular.ttf +SHA1-Digest: 05QLe85Ocer2cRsi+2B79AOHWmw= + +Name: system/vendor/pittpatt/models/detection/multi_pose_face_landmark + _detectors.7/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin +SHA1-Digest: QWTMOw4GkuzG+r1zay8B6MxuB8M= + +Name: system/app/SEMCSetupWizard.apk +SHA1-Digest: fk3weIsJdLR/a+rVIdUpG08T4Wc= + +Name: system/app/Chrome.apk +SHA1-Digest: /hJRGpfo8d8F3raCOAWOFNJ3HxM= + +Name: system/media/audio/ringtones/Aquila.ogg +SHA1-Digest: 76lX0+5ulsy6f92QS6Lp2EAGpNY= + +Name: system/etc/legal/leaflet/vi/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: yQrzm4o/tOzbgZFACsr940btODU= + +Name: system/media/audio/ringtones/breeze.ogg +SHA1-Digest: 3K7Z2gU7Ni13+G9658+TNUH1+ag= + +Name: system/lib/libusbhost.so +SHA1-Digest: EN9JHA/sd+tQcTyvTuUGwVXSCGo= + +Name: system/etc/legal/leaflet/uk/SIM-card.html +SHA1-Digest: cvwKVG4eb2KxITHwwjQ59r/eJmc= + +Name: system/usr/srec/en-US/embed_phone_nn_model +SHA1-Digest: OvLDxuz3u6qqRppHXnxe+P+HgZw= + +Name: system/etc/security/cacerts/81b9768f.0 +SHA1-Digest: Abtfwk1XW6grFct1OuViAxz88dE= + +Name: system/etc/legal/leaflet/ae/Conditions.html +SHA1-Digest: i9peuvNjvV2FeNGtMp5y+w4HF9E= + +Name: system/etc/legal/leaflet/cf/GPSLocation-based-functions.html +SHA1-Digest: XhGLY7alDBIES6532hUMUk2iO2k= + +Name: system/app/SecureClockJava.apk +SHA1-Digest: bcfcdl508Wq92myfD5gCoT62hdw= + +Name: system/etc/permissions/SemcGenericUxpRes.xml +SHA1-Digest: vJsHVzpRDCQ4CHAUOTHRa8hvd2k= + +Name: system/media/audio/alarms/mechanical_bell.ogg +SHA1-Digest: 5yJcveePPgfp8a9J4P7PurJJDcc= + +Name: system/app/SmartSearch.apk +SHA1-Digest: BhsP4Q2Xe3ObNUxNe7gWOSgEkzc= + +Name: system/bin/sdcard +SHA1-Digest: dFPruqBMk2WWyeqSRMVTqPD7A98= + +Name: system/etc/legal/leaflet/vi/Warning!.html +SHA1-Digest: daGV+V3sC3k31qRAbi4FeiSu74c= + +Name: system/etc/legal/leaflet/vi/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: K/MfUVqGCs83JYGi9hb5gLRWmj8= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Service-and-support.html +SHA1-Digest: Y8DmIUp9jLtMFex0NclZCPub5J0= + +Name: system/media/pictures/plitvice_lakes_01.jpg +SHA1-Digest: 40GpMI9i3wgfjcJsGLMRRd2CxcE= + +Name: system/app/FBMusicLike.apk +SHA1-Digest: Al6kf5JU8cJkiPp49QH2vk7Fyxc= + +Name: system/app/Phonesky.apk +SHA1-Digest: PrsRH5zu5ZXnn/sLeyvTZeORqnw= + +Name: system/etc/security/cacerts/a3896b44.0 +SHA1-Digest: Lt7IRY6srSXDk8xe/2MpiiNof+U= + +Name: system/lib/libennjubase3.so +SHA1-Digest: dc4H8u2lS6kA9jTU0KgDeBXu+DQ= + +Name: system/vendor/overlay/com.sonyericsson.home-res.apk +SHA1-Digest: J6zaRc1nkpGCXXUIOzuGbZfL0Ug= + +Name: system/etc/legal/leaflet/mk/Precautions-on-Memory-Card-Use.html +SHA1-Digest: 7o4eijbFpSVCQuVq1uccSrsmM0E= + +Name: system/app/UsbTransportService.apk +SHA1-Digest: CNT2c/2NqV4nMeeVkL8opzzPk4U= + +Name: system/etc/legal/leaflet/ae/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: +Ek4a9K9PWeYE0QAND3tFJZHD+s= + +Name: system/etc/legal/leaflet/ms/Emergency-calls.html +SHA1-Digest: Ob4KthYEUswl3qnIT2DAUZW3+bs= + +Name: system/media/audio/ringtones/Scarabaeus.ogg +SHA1-Digest: MdBj4snPgwNrx26ozX9qXaHP1uo= + +Name: system/bin/crda +SHA1-Digest: 9RYGg+KXmACbXPd3sBvH7eiuh9g= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_white_small.jpg +SHA1-Digest: AG+P5NbVgBFzyRwjy/cX9uJ4NDY= + +Name: system/etc/legal/leaflet/hr/Antenna.html +SHA1-Digest: gvIaOR4k0Do3RFRb2hxabpKIJdc= + +Name: system/etc/legal/leaflet/zh-HK/Important-information.html +SHA1-Digest: BPk8ikb9UDqxnY9fGMoBrgl5MA4= + +Name: system/etc/legal/leaflet/hi/Flight-mode.html +SHA1-Digest: XyEmXBqrFoGATfcztR9gpCucB1g= + +Name: system/etc/legal/leaflet/en-PB/Conditions.html +SHA1-Digest: fRkba5RltIo4V5ysjjSHlcusygI= + +Name: system/etc/permissions/com.sonyericsson.android.omacp.xml +SHA1-Digest: +oE65grOMmsIww80ZmbSGPNLScc= + +Name: system/etc/legal/leaflet/ko/Loudness-warning!.html +SHA1-Digest: Q21XQPsRykiy8oYYa6cRnu2zkF8= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blown_dandelion_hd1080p_small.png +SHA1-Digest: zJrwTFGqT2ObmhrlB389ZHT+j58= + +Name: system/etc/legal/leaflet/pb/no-title.html +SHA1-Digest: RMh3EDCmAZy/TiV6PQSpnW07Cdg= + +Name: system/etc/permissions/android.hardware.usb.accessory.xml +SHA1-Digest: lKVhbliD+5NmYq61xsHEVEZTfsE= + +Name: system/etc/legal/leaflet/fa/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: lih5K/VnY3yHu1IRsej6u1VCWG0= + +Name: system/media/audio/notifications/SpaceSeed.ogg +SHA1-Digest: tzJsHqrVli93b+0Fxbnn6SZ8HmE= + +Name: system/etc/legal/leaflet/images/arrow-rtl.png +SHA1-Digest: oIJO5N/LGkv01Xxp9sndk22aQOQ= + +Name: system/lib/libDivxDrm.so +SHA1-Digest: H3bjfn+1J9UcpQOu3nGPQ6fP2ng= + +Name: system/etc/legal/leaflet/xl/Conditions.html +SHA1-Digest: mZaUs+dxEsPbOuofZ56XcnXfiII= + +Name: system/bin/mtpd +SHA1-Digest: 1mKUaEAsik8FVn/8Fc9K/v4Lj0c= + +Name: system/etc/legal/leaflet/ms/What-we-will-do.html +SHA1-Digest: 64tDuEhQeQFSyEhXunhVH0DyT/Y= + +Name: system/lib/libchromeview.so +SHA1-Digest: ldCNVhG1vDuvt+h6bE3n72QQ7fE= + +Name: system/etc/legal/leaflet/zh-TW/Emergency-calls.html +SHA1-Digest: 5nPH/kuRA5i9lP9zaQOIIuEgtL8= + +Name: system/etc/legal/leaflet/zh-CN/Malware.html +SHA1-Digest: 34N037hNeopllSqTMfSH+pIPTkI= + +Name: system/etc/firmware/apps.mbn +SHA1-Digest: hGgJNyI7VDovlhN6f+9GTTdtfAs= + +Name: system/etc/security/cacerts/635ccfd5.0 +SHA1-Digest: iOfrRlIkQ9CJR88NZ3FS2RQ+icw= + +Name: system/etc/legal/leaflet/ru/Important-information.html +SHA1-Digest: kr3LkIV7g27TFadcJAIJBoOm9NY= + +Name: system/vendor/camera/SEM13BS0_WV570.dat +SHA1-Digest: yu4mSatQiYaM759UbhuNMr45lMU= + +Name: system/media/audio/notifications/Fluorine.ogg +SHA1-Digest: pYJhY2zf8yHtuU50KuDSxr/jx+o= + +Name: system/etc/security/cacerts/2e8714cb.0 +SHA1-Digest: pN27bgE5+KCmhIkYxNaJ83eT1rI= + +Name: system/etc/legal/leaflet/zh-HK/Publication-number.html +SHA1-Digest: MyeOCF2BVhCnqAikwElliALDrjc= + +Name: system/etc/hw_config.sh +SHA1-Digest: LZLpzAfZfRmS17qoaXb7je+sVsY= + +Name: system/etc/legal/leaflet/uk/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: RLku1c5rFVZzYTg9ZzFe/v6OQnA= + +Name: system/lib/libSSEPKCS11.so +SHA1-Digest: U9ZW0tWREUxdHbv290SzuRFFZqk= + +Name: system/media/audio/notifications/signature.ogg +SHA1-Digest: 3aEsDOAbvw1Aqs4w/ziAdSuxZX8= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Guidelines-for-Safe-and-Eff + icient-Use.html +SHA1-Digest: dXLwps7X9rh1oqZ49mhQpmqptvs= + +Name: system/etc/permissions/android.hardware.location.gps.xml +SHA1-Digest: 5BoPvzraABvx8iNcW0s9BCY42l4= + +Name: system/etc/permissions/com.sonymobile.facebook.proxy.api.xml +SHA1-Digest: 3K9QlpqCD4W9cqtqUwq88LMZMxE= + +Name: system/etc/UserPolicy.xml +SHA1-Digest: fdd22J++EjonomoJ7PnUrIkBDwk= + +Name: system/media/audio/ringtones/NewPlayer.ogg +SHA1-Digest: Uf0E/jmb19A0xXT6CtfiT3ph1e0= + +Name: system/framework/com.sonymobile.mediacontent.jar +SHA1-Digest: q5vELuNsSo+9Ew26c3lEiVLTMcY= + +Name: system/app/PackageInstaller.apk +SHA1-Digest: gT8bUMcP+kEfcXIMbngozSBjyYE= + +Name: system/lib/libcsd-client.so +SHA1-Digest: hXIKNZjISBRynRSr/dPoADlIrjg= + +Name: system/app/SemcEmail.apk +SHA1-Digest: Yp8s+K6Bj62raM8ic1snNt7dF7g= + +Name: system/etc/security/otacerts.zip +SHA1-Digest: R/58TZJqusdqBcocvX9BY+N4mhI= + +Name: system/app/Skin1.apk +SHA1-Digest: eT9fQolBL7U5eDWvVreapor71VY= + +Name: system/etc/legal/leaflet/images/LEGAL-CHILDREN-low.jpg +SHA1-Digest: /rAXwXJ7fDM5Tmd+p3JFCVpG/QM= + +Name: system/app/SimContacts.apk +SHA1-Digest: LoQw2SsIelrswjzSKYmd4k8wxsk= + +Name: system/etc/legal/leaflet/fr/Conditions.html +SHA1-Digest: dbTgGV2YJRYV/cNelI9ET8YMDpk= + +Name: system/lib/bluez-plugin/audio.so +SHA1-Digest: gCm+pQvIOGe1pGuYke/vFs/H7/E= + +Name: system/lib/hw/audio_policy.default.so +SHA1-Digest: Gh22xC7UdiVyqMEwCLvB8C8LzoA= + +Name: system/media/audio/ringtones/Backroad.ogg +SHA1-Digest: wJg8iCX8vSdPY4gKeSvDvESello= + +Name: system/etc/legal/leaflet/vi/Precautions-on-Memory-Card-Use.html +SHA1-Digest: kxOsCQUL8O6T/8Xhg3rn6ZfXkmI= + +Name: system/usr/keylayout/qwerty.kl +SHA1-Digest: bEFA2skAr7Gbvbp0UGQQs0ob2kI= + +Name: system/lib/libstagefrighthw.so +SHA1-Digest: FLaB5R1NpT1McXHGJ8c4ssQthzc= + +Name: system/etc/legal/leaflet/images/CE-ALERT-low.jpg +SHA1-Digest: +8TOxXAW+kCCDZ5CzY9P1QLJdEE= + +Name: system/lib/libmtp.so +SHA1-Digest: dcvnzILzyfDaOREM/ElzdNgYBlg= + +Name: system/etc/legal/leaflet/images/arrow_turnpage_r.png +SHA1-Digest: deqyexYdnnFHw4x5whPjvgWJfmI= + +Name: system/etc/legal/leaflet/en/Battery.html +SHA1-Digest: yK4d93NJle0ZXOGJ49yeZyXh4zg= + +Name: system/etc/flashled_calc_parameters.cfg +SHA1-Digest: w7wChYXaRgaQaEA+CyWcHmds+qM= + +Name: system/app/SomcConnectivityCenter.apk +SHA1-Digest: bxs+uIUquzitvG5WAw/DZQWs2Co= + +Name: system/lib/libstagefright_soft_vpxdec.so +SHA1-Digest: qJTy6UvsC6ZkOyIEdEojTRuHZJU= + +Name: system/etc/legal/leaflet/hi/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: Qi3j+qlIBt854V2G+6hcS2X3ekw= + +Name: system/lib/liboemcamera.so +SHA1-Digest: 26eQS91H92AzluYGg52Qh3yJTt4= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_green_small.jpg +SHA1-Digest: aa3TudvxzVf6VQvl3vRS/JQoyk8= + +Name: system/app/livewaremanager.apk +SHA1-Digest: HsBWnt272e4SoCBK3ShiAoy4DDE= + +Name: system/lib/libmtpip.so +SHA1-Digest: mhIEPKJNvS/MNKMDo3+0DPyHTfE= + +Name: system/etc/legal/leaflet/pt/Malware.html +SHA1-Digest: OvDY3friliNULRPdxgvQeSZIYzw= + +Name: system/etc/legal/leaflet/fa/Export-regulations.html +SHA1-Digest: Mp1ZyYI9nxDYVWCH/p6sEMPgqaA= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Precautions-on-Memory-Card- + Use.html +SHA1-Digest: uKhu629Vz6KHLDQLo46PYF4N8nc= + +Name: system/etc/be_movie_setting +SHA1-Digest: LcPMEfsFK7f3m03Lh6VHQ+iXFIE= + +Name: system/bin/mm-jpeg-dec-test-client +SHA1-Digest: LiSF3Oify5vVbkVbNrOgx16RBXw= + +Name: system/bin/ATFWD-daemon +SHA1-Digest: 55YSltknHlA1SAJ63c3b2ul3pBs= + +Name: system/media/audio/notifications/pop.ogg +SHA1-Digest: gwAf0pB94IvQhxMwv7bKzMQGRBU= + +Name: system/lib/libCommandSvc.so +SHA1-Digest: z+SGmmFm0XPQWmCgyuFO7FV9Yl0= + +Name: system/etc/legal/leaflet/pt/Driving.html +SHA1-Digest: LFeIxKLVAqGjEPcTxUfk15f1egg= + +Name: system/etc/legal/leaflet/ae/Personal-medical-devices.html +SHA1-Digest: UnkaxEyY2FgXRJbimS5k+dDhGYM= + +Name: system/bin/startup-prober +SHA1-Digest: 3jXsJkH1OxaTZzoGN3K/XZ2XolU= + +Name: system/etc/legal/leaflet/ko/no-title.html +SHA1-Digest: sHEcLYVmhV2yqrrxBSTrogRo43M= + +Name: system/lib/libpixelflinger.so +SHA1-Digest: 8hbr/x8QgXv4+Y2cnilJ691RkZI= + +Name: system/etc/legal/leaflet/cf/What-we-will-do.html +SHA1-Digest: ll5O9iKyknxygaIkr4lyf3of3z8= + +Name: system/lib/libmm-omxcore.so +SHA1-Digest: hKBNIj33yRHPXBLYCBcHEOGeYyk= + +Name: system/media/audio/notifications/Proxima.ogg +SHA1-Digest: LGKrWlUADhw0KgUCKoJZa3Y8XZc= + +Name: system/bin/idd-logreader +SHA1-Digest: jLIpNhKSs3dNpvsu0Sn3gw9SDZM= + +Name: system/lib/libMiscTaAccessor.so +SHA1-Digest: AqmHDxzIKC6+OMYGsij1Mcjgaf4= + +Name: system/etc/legal/leaflet/th/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: WlRVx+8wss82NHq3TBnQO12+Iaw= + +Name: system/lib/hw/audio.primary.msm8960.so +SHA1-Digest: Fg13VwJyqz93ONL7mRY8nY0RMDc= + +Name: system/lib/liblights-core.so +SHA1-Digest: fegtZC7Ra/QDRfxjGxfPdWSi21E= + +Name: system/etc/legal/leaflet/ko/Emergency-calls.html +SHA1-Digest: WetA2sXcjrBuOFk7HESaylqjDMc= + +Name: system/lib/libext4_utils.so +SHA1-Digest: 3a3SFwZXYjzj6uYQWvyxEH0SYyg= + +Name: system/lib/libhwcservice.so +SHA1-Digest: lwK0wjzvDY+ZRyoms/9fruQwSOs= + +Name: system/etc/legal/leaflet/en-HK/Malware.html +SHA1-Digest: rYjjL7aeyEqSMbk5jMcQoWjaukc= + +Name: system/lib/libOpenMAXAL.so +SHA1-Digest: 1Z3ZGeGdm/0QV72RYtkab88oafw= + +Name: system/etc/security/cacerts/1df5ec47.0 +SHA1-Digest: Qxp979sc7+YKhsMsGesH1DjUOJI= + +Name: system/etc/legal/leaflet/zh-HK/Precautions-on-Memory-Card-Use.ht + ml +SHA1-Digest: SDsdytlS8kIFHC/NqpCXWHeJUQw= + +Name: system/usr/xt9/SEMC_810_r1-3_KKlsUN_xt9.ldb +SHA1-Digest: Pk+dH1L4ph211oRN2G5c7TAJcFE= + +Name: system/lib/libmmipstreamaal.so +SHA1-Digest: TCdPz7tSI0mgb+Grtz43FkpYwn8= + +Name: system/media/audio/ringtones/Andromeda.ogg +SHA1-Digest: QRGP5SgnFNkfSgZqMnZ8Pj/ymlI= + +Name: system/etc/dhcpcd/dhcpcd-hooks/95-configured +SHA1-Digest: LPfGqg4IjtrXjyeB5gaz7mhURFM= + +Name: system/etc/legal/leaflet/en/Limited-Warranty.html +SHA1-Digest: lkT9/2fgfmk+mThQcj9C23DLAyQ= + +Name: system/tts/lang_pico/en-US_lh0_sg.bin +SHA1-Digest: OmEWL+G/OLXlfcQXpILKeHbEpwQ= + +Name: system/etc/legal/leaflet/zh-HK/Memory-Card---legal.html +SHA1-Digest: z4AKhC1bBA7fZnOAx9Ay+1wKEkA= + +Name: system/media/audio/ringtones/Paradise_Island.ogg +SHA1-Digest: CU5cvUx4bpJIFEMAcyh6+JmyI3o= + +Name: system/app/LocationBasedWifi.apk +SHA1-Digest: 7OMuXiY85g/CrZC+BgeH5OTI560= + +Name: system/lib/libstagefright_soft_amrnbenc.so +SHA1-Digest: U/+wlZ+POoPFwe+B+zSq8iHzpG8= + +Name: system/etc/default-capability.xml +SHA1-Digest: I86YSvfdYoQR/4ixHnzK4zRfjPM= + +Name: system/etc/legal/leaflet/ru/Protection-of-personal-information.h + tml +SHA1-Digest: KtLwJUULdszO67aUnfhpMAp6rLk= + +Name: system/framework/SemcGenericUxpRes.apk +SHA1-Digest: G6+dNFt1E/Su9j5keRBh5KqiZQU= + +Name: system/etc/legal/leaflet/fr/Malware.html +SHA1-Digest: Rm9SdqDPJ0s/HA0DTiQj2FksJno= + +Name: system/etc/legal/leaflet/ms/GPSLocation-based-functions.html +SHA1-Digest: XSwF7RIFAjcORTyDp85oXf/BX0E= + +Name: system/etc/legal/leaflet/zh-CN/index.html +SHA1-Digest: UbrUzpAB+llP3k/6a7534N6ZyUc= + +Name: system/etc/legal/leaflet/ko/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: JZOm5vIShZi6+4MJkW7wq2tEjiI= + +Name: system/etc/legal/leaflet/ae/Children.html +SHA1-Digest: O2/TGdao6yiu0zY4sqGgx+84iZQ= + +Name: system/lib/libqdp.so +SHA1-Digest: iTKYMWVb/oA1MGV7yFliVuYHrUk= + +Name: system/etc/firmware/a225p5_pm4.fw +SHA1-Digest: sba24S30AufSofmhtdabjmMQTa0= + +Name: system/etc/legal/leaflet/zh-CN/Personal-medical-devices.html +SHA1-Digest: nDrDFw2k0GvsEn56gDDbHy+t3Vw= + +Name: system/etc/legal/leaflet/ru/Accessories.html +SHA1-Digest: wFb9/jhUqIO3uHXKM29o+t1dCRU= + +Name: system/lib/libdsucsd.so +SHA1-Digest: iV5HRF6BtdH9ymSoku8nGGZVAFk= + +Name: system/etc/legal/leaflet/ms/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: nJmwdixqXVk0YVm2b+H98MdRCPo= + +Name: system/etc/legal/leaflet/xl/Important-information.html +SHA1-Digest: vXOpP456kvXC1Nwz7dk6KteKaYw= + +Name: system/app/device-monitor.apk +SHA1-Digest: QSLbVx++a8+HbL2oiGzScrPuJUo= + +Name: system/app/InfiniteView.apk +SHA1-Digest: C6Bike7D+upMW4hJ1U2ksb+hjUI= + +Name: system/lib/libdrm1.so +SHA1-Digest: mSJWxtUmpzEPQvL2yqUa08NmyCo= + +Name: system/app/Videos.apk +SHA1-Digest: Gw/za4eZEoRK0OJqXelGuF1EXfU= + +Name: system/lib/soundfx/libposteffectwrapper.so +SHA1-Digest: m50Bbc/ne3j/kHeMZm2H1LyCY70= + +Name: system/lib/libOmxEvrcEnc.so +SHA1-Digest: dQp9hCwmAb2M29/FNMl5xtu3agU= + +Name: system/media/audio/notifications/exemplify.ogg +SHA1-Digest: abGVPi8xP2OyQrQIrz5xAMDFZgU= + +Name: system/etc/legal/leaflet/iw/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: WmOor1WCrsEUd8OmWKqLUuo/j+U= + +Name: system/etc/security/cacerts/46b2fd3b.0 +SHA1-Digest: ncfFJuS33zLgLepbQtRcOp1nNTU= + +Name: system/etc/legal/leaflet/fr/Antenna.html +SHA1-Digest: 33ruFuvTuuoYcWTthkLa+XB0ifM= + +Name: system/usr/xt9/SEMC_810_r1-17_FIusUN_xt9_2.ldb +SHA1-Digest: Drs/5N4ge4H7qQYj2yQdSsGEG7Q= + +Name: system/etc/legal/leaflet/images/Warning.jpg +SHA1-Digest: Amj3WE3VjrZR7K+wXULbW4yE25A= + +Name: system/bin/qrngd +SHA1-Digest: Iwr5CYgCNDrqIay1h7m0bhpnjuc= + +Name: system/etc/permissions/android.software.sip.voip.xml +SHA1-Digest: qPho8aR6qQ+pK8ybcLgZiHGkyEo= + +Name: system/lib/libmmQSM.so +SHA1-Digest: XnlBnyZEauqVAhZNVP1i/8RrbvI= + +Name: system/media/audio/ringtones/Rigel.ogg +SHA1-Digest: /YfQhPna/zBPoAyxZc1M+EDFOXw= + +Name: system/media/audio/ringtones/Perseus.ogg +SHA1-Digest: WY0yhIluVwsomj5LRF9XXWNLr4E= + +Name: system/etc/legal/leaflet/kk/Loudness-warning!.html +SHA1-Digest: oIynHE1eMg5UH1PR8p67wBQMi2E= + +Name: system/bin/ping +SHA1-Digest: cPBlN2jliHTMzLTnMEQGwy2rG/s= + +Name: system/app/GoogleBackupTransport.apk +SHA1-Digest: CjiGbnlF4f3hBwrMZi2hsFVSWPo= + +Name: system/etc/firmware/dsp3.mbn +SHA1-Digest: Rh0af4yiTKBuoOkOvGfUtSJ9T0g= + +Name: system/media/audio/ringtones/CrayonRock.ogg +SHA1-Digest: 7HGDQ/+DQJHGxd5FJfDT3VhnPEc= + +Name: system/media/audio/ui/Undock.ogg +SHA1-Digest: BBcFdB339/wAGsS1Pvy1YDnFCQo= + +Name: system/etc/security/cacerts/a0bc6fbb.0 +SHA1-Digest: V0mHojd9hDTNmkRMn2gBBUc//E4= + +Name: system/media/audio/notifications/pixiedust.ogg +SHA1-Digest: 7X0VYwWxtmkvLurVI/sKzXS22RA= + +Name: system/lib/lib_dic_ja_JP.conf.so +SHA1-Digest: DMjOzvFPLgW55ZU1wSacxYVWVxM= + +Name: system/etc/security/cacerts/cf701eeb.0 +SHA1-Digest: YIKVSOwnG2XtUxSGW9n6w3exUq4= + +Name: system/etc/legal/leaflet/hr/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: ihZDr3akykZdywRmybccsOfgNXk= + +Name: system/etc/security/cacerts/67495436.0 +SHA1-Digest: ZVlG1by+ahNsQ6Uv4zmahjj+oCw= + +Name: system/lib/libext2_e2p.so +SHA1-Digest: VW00aANOFwJyQDlfuZxA5UuebBY= + +Name: system/etc/legal/leaflet/zh-HK/For-Devices-Supporting-3D-Viewing + -capabilities.html +SHA1-Digest: f7MlWO3iQZTlcBO/lB6vccAsPTU= + +Name: system/etc/legal/leaflet/sr/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: DQx4DRr+8dmtw9s9gzUVaQ9RTx8= + +Name: system/lib/libqdMetaData.so +SHA1-Digest: ORjBKV8nQnbh7A01mSzRze2ZV5s= + +Name: system/etc/security/cacerts/bcdd5959.0 +SHA1-Digest: wUXicMukZB4UlU9/xSoCKEwh6jo= + +Name: system/etc/legal/leaflet/th/no-title.html +SHA1-Digest: UNVf7MmnXzBMyD0cpc8v+LzImu8= + +Name: system/etc/legal/leaflet/bs/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: n7T5+fyQgD89CFjKqk3pvcFUkh4= + +Name: system/lib/libsolsengine.so +SHA1-Digest: 6Q9sXyXGCC/qCL2zH4Z1rOmiSog= + +Name: system/framework/com.sonyericsson.video.jar +SHA1-Digest: WompKP+S51A1mNHwD+v9GXQwtZ0= + +Name: system/bin/keystore +SHA1-Digest: lQyAJz51g8QSS6mZAJZ0hDD4UaI= + +Name: system/bin/StoreKeybox +SHA1-Digest: 9WHBRf6n0HQUMNpgmtZBnK09q7c= + +Name: system/etc/legal/leaflet/en/Warning!.html +SHA1-Digest: SQCH7U1lC8T8iWvHjlQwjC67AlU= + +Name: system/media/audio/ui/Unlock.ogg +SHA1-Digest: hWWwovRm8CrwVv/wUD4smnOGBm0= + +Name: system/fonts/Clockopia.ttf +SHA1-Digest: +vgYgkUemnpjfwZ99j4TWmseawE= + +Name: system/lib/libfilterfw.so +SHA1-Digest: HuqIhi9SOePgRPjsPhFUWWTXzYA= + +Name: system/media/audio/ringtones/Noises1.ogg +SHA1-Digest: VtJ1gg/nZMSnrkJ/+VaBIKbeJ5I= + +Name: system/app/MusicWidget.apk +SHA1-Digest: HEnSz6l96t7g+3e9lQxC3UZ22xY= + +Name: system/etc/legal/leaflet/hi/Publication-number.html +SHA1-Digest: iE+N+ZkO4PQgbGQY1wnYRXs1Dl0= + +Name: system/etc/legal/leaflet/hr/End-User-License-Agreement.html +SHA1-Digest: QduMg3oUp2PHmrTS7nNUkUc9Bvo= + +Name: system/etc/legal/leaflet/vi/no-title.html +SHA1-Digest: 2GSzXaB1cmPPu7lLa5XtOCmXgZM= + +Name: system/usr/xt9/SEMC_810_r1-28_ENubUN_xt9_3.ldb +SHA1-Digest: WYD2x72fIgegXMrsKtpaxAynEbg= + +Name: system/etc/legal/leaflet/fr/Accessories.html +SHA1-Digest: 3ixs7lqOsXPwsc/ERN4QNqQEQ50= + +Name: system/etc/legal/leaflet/iw/Publication-number.html +SHA1-Digest: /6mit9zKsZDYfrnRXvs51hwOeig= + +Name: system/lib/libnetutils.so +SHA1-Digest: gnXaLu8MxN1hKPGkdZoB7J0tJv4= + +Name: system/lib/libprotobuf-c.so +SHA1-Digest: xyBlTQbz5DZk8hjXtwaLIxKThkY= + +Name: system/etc/legal/leaflet/sr/Limited-Warranty.html +SHA1-Digest: L2TFyesJg0zZyBgMowCm4g24K4E= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Geographical-scope-of-the-w + arranty.html +SHA1-Digest: /dlP2WS+HsVUh5rm4VlmYG/483E= + +Name: system/etc/security/cacerts/23f4c490.0 +SHA1-Digest: swYiy1QiVyTMlhy6V0v0qzD1Ty0= + +Name: system/etc/legal/leaflet/bs/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: LGtcAWgL2qBo2iZY+tFy5CJpdYI= + +Name: system/lib/modules/gspca_main.ko +SHA1-Digest: PFc3xwhlLqQxFnIePjWc/mpK+1E= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Power-supply-(Charger).html +SHA1-Digest: g3Ru5pU/HOztR4Rs0RGnJKpu6Sw= + +Name: system/app/CdfInfoAccessor.apk +SHA1-Digest: gvXYvZhOQzXF4iDX8s531g/LOLs= + +Name: system/etc/bluetooth/auto_pairing.conf +SHA1-Digest: /PhE2lB+9lDzb26wIESqIVtB/u8= + +Name: system/etc/legal/leaflet/iw/index.html +SHA1-Digest: pxQJVKms1OLClLnf3SC56+1ws4I= + +Name: system/etc/firmware/efs2.mbn +SHA1-Digest: NniiC3CJ5p+AjX5Ahd1inU+b5zs= + +Name: system/usr/xt9/SEMC_810_r1-5_HIlsUN_xt9.ldb +SHA1-Digest: NuvMO9LqAgn8+xX8STk1MU090WA= + +Name: system/lib/libnjubase1.so +SHA1-Digest: kDKKdAUw/9E05VJ2JDYMS1w2w0Q= + +Name: system/etc/security/cacerts/9d6523ce.0 +SHA1-Digest: vE5/LZQwY6jpSaq4Tnfywc0Nf6Q= + +Name: system/etc/legal/leaflet/hr/Protection-of-personal-information.h + tml +SHA1-Digest: OrrZ5RfMxziqqFiu70P/pfSrOL0= + +Name: system/lib/libnjcon.so +SHA1-Digest: KKu5+KuOyHzkZgicil7C0KghOfk= + +Name: system/app/POBoxSknSelector.apk +SHA1-Digest: mdN75frgroUeVzI8fLiXpgUdnMY= + +Name: system/lib/libpajni.so +SHA1-Digest: VjBNOdTa5mn6pVj6WDu/2uNEJ0s= + +Name: system/etc/legal/leaflet/in/Warning!.html +SHA1-Digest: /SKyHjomENzf1G4+Aa/mbjnt33M= + +Name: system/etc/legal/leaflet/en-PB/Export-regulations.html +SHA1-Digest: iiJMS7HDLHmR4RWaJLf0Mh6orMY= + +Name: system/app/VoiceDialer.apk +SHA1-Digest: 1ydaA2mljwg9UM0M+Cf1mRltimo= + +Name: system/etc/legal/leaflet/ms/Memory-Card---legal.html +SHA1-Digest: lBIn0+N/t4vGzeR5RfAntoNe6U8= + +Name: system/app/SemcSettings.apk +SHA1-Digest: mM89bSXmeO7/STzZfWQXUfa6FlM= + +Name: system/etc/firmware/ta.mbn +SHA1-Digest: wo/qeSrmOPLqLdrg2RKusaSzkX0= + +Name: system/app/SemcCamera3D.apk +SHA1-Digest: ER5AsBTkyte0pQO8c7PlT/GnYLY= + +Name: system/etc/legal/leaflet/zh-HK/ERROR=0.html +SHA1-Digest: njWPIplaDlWas8Afvz1SWZgCUxg= + +Name: system/etc/security/cacerts/3c58f906.0 +SHA1-Digest: TfWYQv3pjUCWxBCz5mSQzgH9OKk= + +Name: system/lib/libvideoeditor_osal.so +SHA1-Digest: M9KN6MZEW+Wyawc6LMR5aDX/h6o= + +Name: system/media/audio/alarms/soft_harp.ogg +SHA1-Digest: YAc+l9pSegXSan8GaIar7AhbEu0= + +Name: system/media/audio/notifications/Cricket.ogg +SHA1-Digest: F+Lh3iN/UwLe6hyzV0y4fFC6BFM= + +Name: system/etc/legal/leaflet/images/next.png +SHA1-Digest: 8Jn97xKb6o35J7cIakNGFXmx+98= + +Name: system/etc/legal/leaflet/en-HK/Warning!.html +SHA1-Digest: /TZDFSdbaa+sd/bxRDOBSSaVx3Q= + +Name: system/media/audio/alarms/Alarm_Buzzer.ogg +SHA1-Digest: hQCM62arLTWWXYDH/rvXHo8FCOY= + +Name: system/etc/legal/leaflet/mk/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: MMoZ7FAyzIDjKlLz5hnX+9w7/tg= + +Name: system/vendor/camera/LGI02BN0.dat +SHA1-Digest: 8ukwCWpaii+Z6OfPTnt9XLR1X68= + +Name: system/etc/legal/leaflet/sr/index.html +SHA1-Digest: vpcX4RpewSxXfj/LkW0zGp9STbA= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/autumnal_lake_hd1080p.png +SHA1-Digest: sbiwFu1qVV2tDHrU5MRxS1yiY6U= + +Name: system/media/audio/notifications/Voila.ogg +SHA1-Digest: 8k2ncBzwwD2NoWUvRt/+U/BMgGE= + +Name: system/etc/legal/leaflet/xl/Emergency-calls.html +SHA1-Digest: h/wdzi22xsI9HOISFFp1NhS1JBA= + +Name: system/etc/legal/leaflet/images/btn_search_black_BIG.png +SHA1-Digest: /AHcXrlDPhj8BA2jYXkTKqLj7dE= + +Name: system/etc/permissions/com.sonymobile.photoanalyzer.xml +SHA1-Digest: G+lcfbfgnrLXFQkalU23z4bR86Q= + +Name: system/bin/drmdiagapp +SHA1-Digest: RW55lJIEMuki3zj/cjHxhPCZHig= + +Name: system/etc/legal/leaflet/fr/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: o1pMEPm3bNKXMoUB2hD3KoSw+ho= + +Name: system/etc/legal/leaflet/iw/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: sEX3BEhkCVZ1ATm9AXGZXw63vRk= + +Name: system/lib/libqmi_common_so.so +SHA1-Digest: gach3Ovy3fH42qnI1gHJNqzwoSw= + +Name: system/lib/libmm-audio-resampler.so +SHA1-Digest: CfTQptNTJGO/Dt0IJ1asSpCHpCc= + +Name: system/app/MagicSmokeWallpapers.apk +SHA1-Digest: ud6MWELWkEQ0EqaSd3LaeAyLRu4= + +Name: system/bin/bmgr +SHA1-Digest: bBpREmgN5x0uzCxgS8dQhyklSCA= + +Name: system/bin/mm-gs-camctrl-test +SHA1-Digest: Ed8BBhs7V4fZSUdV9L/gDmiRrXg= + +Name: system/framework/com.sonyericsson.dtcpctrl_protected_impl.jar +SHA1-Digest: Imcgl2oaOTMzeXdJxvwd1a64/ms= + +Name: system/etc/firmware/acdb.mbn +SHA1-Digest: qTZHOjTjxiUD36dyCjQKYEaYnu8= + +Name: system/media/audio/ringtones/Pegasus.ogg +SHA1-Digest: 3g2VFIkRtB/yK7b2Ik/rcqLkp/w= + +Name: system/etc/legal/leaflet/ru/SIM-card.html +SHA1-Digest: 9OSt9rpyRXoPNIOItcVYwoK57bs= + +Name: system/etc/security/cacerts/1dac3003.0 +SHA1-Digest: xqnEkR4Urw+Mekb6eWImjmF2AMM= + +Name: system/app/OmaV1AgentDownloadServices.apk +SHA1-Digest: 9f8/CqXciePb45SGDAVPS+kuPPw= + +Name: system/etc/legal/leaflet/zh-TW/Children.html +SHA1-Digest: 3o5k0FvHoByu5E6lTRC+7mIHuWI= + +Name: system/etc/legal/leaflet/en-PB/Emergency-calls.html +SHA1-Digest: QXif4ohEjsCs5WU3vSFqVedr5iI= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Memory-Card---legal.html +SHA1-Digest: wRkIpPYr1qYWcMhoDgJZlThjn70= + +Name: system/tts/lang_pico/en-GB_ta.bin +SHA1-Digest: TGjQaftHbT9P3ccVS8/RkyyqkmI= + +Name: system/etc/legal/leaflet/fr/Memory-Card---legal.html +SHA1-Digest: SdAPYCDn32wCshRt6QdZV0uDHPI= + +Name: system/etc/legal/leaflet/ms/Accessories.html +SHA1-Digest: 680ehL68Ty4Dqg9jh5Ya7GBHKbc= + +Name: system/etc/permissions/platform.xml +SHA1-Digest: hmpYso99MuExM3pnSGOpSDi2/T8= + +Name: system/etc/legal/leaflet/cf/Children.html +SHA1-Digest: dyZwT1kTC1BGII2oJPRJ7PNRnDs= + +Name: system/etc/legal/leaflet/th/Emergency-calls.html +SHA1-Digest: MOZ7r5cVz2ZPi0eOr8awLp5nxno= + +Name: system/etc/security/cacerts/c3a6a9ad.0 +SHA1-Digest: fbdLZbwmByGAC1L8jv9+TWtc61s= + +Name: system/lib/libaah_rtp.so +SHA1-Digest: TRloK1bfGZCr3eE6jX2eQJCRIqs= + +Name: system/etc/NOTICE.html.gz +SHA1-Digest: fcJEdiFEx8PI3b+mek9ofpvvl2I= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Emergency-calls.html +SHA1-Digest: EKknFFqO2ItA1ZDfF8xyFVCsRiE= + +Name: system/lib/libstagefright_pf.so +SHA1-Digest: pmCH4G8XjkAFF24STzmRT90x2sQ= + +Name: system/etc/legal/leaflet/in/Memory-Card---legal.html +SHA1-Digest: rEQxc1D6CRbc2OWJfwkkP4iXShc= + +Name: system/etc/legal/leaflet/hi/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: oNTyQMauudjS531jNotWGcHn34o= + +Name: system/media/audio/ringtones/BOOTES.ogg +SHA1-Digest: ZjJ5EZ8DSLf7HiGoMNkr6ufv3ng= + +Name: system/media/audio/alarms/pond.ogg +SHA1-Digest: 1hyEcaPQSQzGljrcIG4gpEEqZcA= + +Name: system/etc/legal/leaflet/in/Publication-number.html +SHA1-Digest: UBqZsNf/pmZ/+SjvYr4blXjQcmk= + +Name: system/lib/libksn.so +SHA1-Digest: plflUH0DfiUhL1Jc7hnpvQYaovo= + +Name: system/etc/legal/leaflet/zh-HK/Guidelines-for-Safe-and-Efficient + -Use.html +SHA1-Digest: 2RbCWzz6OfUiaxtRra6pWsnHTt0= + +Name: system/media/audio/ringtones/magnifico.ogg +SHA1-Digest: 7GXetWawfLb10yBAGv644U+Od70= + +Name: system/media/audio/notifications/luxury.ogg +SHA1-Digest: YIzl1apaPp5Aqsjm2KF5SsbKCmM= + +Name: system/etc/legal/leaflet/images/Orange-logo.jpg +SHA1-Digest: ISDbNGxJPA+D7KxOmubIqvoyQts= + +Name: system/etc/legal/leaflet/en/Flight-mode.html +SHA1-Digest: qnuLx4CWsS+NT/aregb6O67bPKk= + +Name: system/etc/legal/leaflet/ru/no-title.html +SHA1-Digest: gQ2XPAiG1Y3J6ZDy8onSjEvWvvA= + +Name: system/lib/libETC1.so +SHA1-Digest: ZVJtwNVK38JnU5JcNuvTLtb7/+Y= + +Name: system/media/audio/notifications/F1_New_SMS.ogg +SHA1-Digest: a6PaKmVHQ3ldqiKT9cb1lEXKi7A= + +Name: system/etc/legal/leaflet/zh-CN/Children.html +SHA1-Digest: 0V3Iq4f5i6Nhq0RG3Ik4z39Xa9c= + +Name: system/media/audio/alarms/rise_up.ogg +SHA1-Digest: 3RS0zfuxwzJ+ScaNkQ9rY/+/6H8= + +Name: system/etc/legal/leaflet/pb/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: oITPU9sh4hoW83oIyzxnevbvKkM= + +Name: system/media/audio/ringtones/Zeta.ogg +SHA1-Digest: HmFS/0BDeTFiEBTg3tp5dFNzJok= + +Name: system/lib/lib_get_rooting_status.so +SHA1-Digest: iPM2GctEvbhIBO1Y4RTk5hVwoXY= + +Name: system/lib/libmmiipstreammmihttp.so +SHA1-Digest: 35vGrjE9pAkPrL3m+TTtN9aTwHo= + +Name: system/lib/libvideoeditor_core.so +SHA1-Digest: M4YpjrWr9NQcJbUhjhA50MWuw64= + +Name: system/lib/libexpat.so +SHA1-Digest: Rb0vWNk69RbealZadCYx0Dy8Gm0= + +Name: system/bin/thermald +SHA1-Digest: f+V+kXUiN25e9wZbwy5EmGW5U2A= + +Name: system/etc/legal/leaflet/sr/Accessories.html +SHA1-Digest: JoTWr5JLpo/Ucqeh7FXIBlK0h1Y= + +Name: system/lib/libcameraextensionclient.so +SHA1-Digest: xjmsT9a8AtSRPrxGYzU9lhpBmp0= + +Name: system/app/SemcContactsProvider.apk +SHA1-Digest: 6soSUWNAgNhWHplh3LNG4PfYzrk= + +Name: system/etc/legal/leaflet/ko/Children.html +SHA1-Digest: r6HdxuJ7rWQt31pMhpQZ97QMO5M= + +Name: system/vendor/pittpatt/models/detection/yaw_roll_face_detectors. + 6/head-y0-yi45-p0-pi45-rn30-ri30.5-v24/full_model.bin +SHA1-Digest: MK+pzoM4WfbE9qVi0dNWTVqG4fk= + +Name: system/lib/libsqlite_jni.so +SHA1-Digest: /dp3RYPLyOeNkZF85oSVSQOpkZk= + +Name: system/bin/ndc +SHA1-Digest: y0Yn8jDkwciNBAWHlg4wXDfbgow= + +Name: system/etc/legal/leaflet/hr/Limited-Warranty.html +SHA1-Digest: TMZsvsnZ54AY3uAL6zdo3oKJdq0= + +Name: system/lib/libdrmframework.so +SHA1-Digest: kwFMGN1Zjzn1bkX9CZNvkktWGGw= + +Name: system/usr/keylayout/cyttsp-i2c.kl +SHA1-Digest: qawwkctR1GgoDBOsvH1cr0z6Yac= + +Name: system/etc/legal/leaflet/sq/Conditions.html +SHA1-Digest: MoywdBZSz9a886xypiQPDZSLVpU= + +Name: system/lib/libandroid_runtime.so +SHA1-Digest: l9Iz+oQj8X4EUUXEebjPi88jLo0= + +Name: system/etc/permissions/com.sonyericsson.uxp.xml +SHA1-Digest: X86/leHD+tf/0EFY0467/ydkXr8= + +Name: system/lib/libgabi++.so +SHA1-Digest: tvlZmxwNOKHVV9wzmrczWHrQT5E= + +Name: system/media/audio/ringtones/LoveFlute.ogg +SHA1-Digest: OcMeITbz82PnJZUhBm5Z1vEPL4U= + +Name: system/etc/legal/leaflet/hi/Conditions.html +SHA1-Digest: 7s0G+mI+82DWEJ0UHB1WyDs2qUw= + +Name: system/etc/firmware/tzlibasb.flist +SHA1-Digest: 5oOwx1oyzwZckolDHtNtty4XZt8= + +Name: system/etc/legal/leaflet/ru/Antenna.html +SHA1-Digest: WOI1LNe+3nt4hKsmcbrMoapVczw= + +Name: system/media/audio/notifications/whisper.ogg +SHA1-Digest: 2WO0ClPWKDfjEUKSOwU5RWnaYR0= + +Name: system/framework/com.sonyericsson.dlna_impl.jar +SHA1-Digest: /heGAENGivOrYU2ee7AcSjcD164= + +Name: system/etc/firmware/wcnss.flist +SHA1-Digest: nRxs15po+n+5+X26ZautE5ARFBQ= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Warning!.html +SHA1-Digest: J7t91OfVb6cbv0IK1W7bTAcabDY= + +Name: system/etc/legal/leaflet/hi/Limited-Warranty.html +SHA1-Digest: 3Ytyrzs5joJNhKgGe/Z8DubgSrA= + +Name: system/etc/firmware/dsps.mdt +SHA1-Digest: UCIA32G2zCo221F4tNe6XKV0ibE= + +Name: system/etc/legal/leaflet/hi/Driving.html +SHA1-Digest: PXRiTiQyvWKNIlebXeLddcVKIHY= + +Name: system/app/OneTimeInitializer.apk +SHA1-Digest: Z2NLwUx4Od2/+ml2LDjo5ke8TzQ= + +Name: system/etc/legal/leaflet/fr/What-we-will-do.html +SHA1-Digest: 0d8gPIurlfT0EToeVJ02RWZCze4= + +Name: system/etc/permissions/com.android.location.provider.xml +SHA1-Digest: amS9x3HUOepZjI/MyRzFmoDrRd0= + +Name: system/etc/permissions/com.sonymobile.cameracommon.xml +SHA1-Digest: kqZw2dlfq+Uc7lEanH/qiikAHo8= + +Name: system/bin/ptt_socket_app +SHA1-Digest: 0SkxuPQCD9lHC+OTglVs+pT8h98= + +Name: system/etc/legal/leaflet/zh-CN/Flight-mode.html +SHA1-Digest: WB3Y8K14DXbX8/DS45zFM28JDq0= + +Name: system/bin/mksh +SHA1-Digest: BWD6Pcf0qMUBqcT6mPZ1HrjQp/Q= + +Name: system/vendor/overlay/com.android.providers.partnerbookmarks-res + .apk +SHA1-Digest: y0WXAND3v9WcNPvZDc9kzUAt7KE= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/red_rock_hd1080p_small.jpg +SHA1-Digest: PpcxPai0j+4h5i6ReJ7KYrGA99g= + +Name: system/etc/legal/leaflet/pt/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: AHg1MDbcSxFLNCoWW2V3EHiOzf4= + +Name: system/media/audio/ringtones/Shes_All_That.ogg +SHA1-Digest: E19SHFyaTl3gLreM4EppL4K0x4k= + +Name: system/lib/libalarmservice_jni.so +SHA1-Digest: J068+J+Iq1zVY5VoUzrOcQmGvao= + +Name: system/lib/libhdminativecontrol.so +SHA1-Digest: x3/PhLbFE9HysjOXjTjfpy4Gno0= + +Name: system/lib/libm.so +SHA1-Digest: 0fY2xDEtyemq405b93Lm8/daDak= + +Name: system/lib/libdrmdecrypt.so +SHA1-Digest: TgcRObY+t0/v9eAdrOsLO7qCGyI= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/SIM-card.html +SHA1-Digest: i1+p4SINi6ZZbozm4G88EVoY9Sw= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Publication-number.html +SHA1-Digest: ewxj6HED6XsHCUZSJUl+TTROkzk= + +Name: system/app/GpsSatellitesNotification.apk +SHA1-Digest: /aHtAVDdm0mP4drprQaYTeaAQEI= + +Name: system/etc/legal/leaflet/ms/Personal-medical-devices.html +SHA1-Digest: xqoMicTshvcF6LvME/Djsvu+WdI= + +Name: system/etc/legal/leaflet/ms/Children.html +SHA1-Digest: dn6Xxr4oMxkGaZQTZ7WU2ze1ELw= + +Name: system/tts/lang_pico/de-DE_ta.bin +SHA1-Digest: UxOTX6s/ImMF3+i9MWBJSPZ52Hs= + +Name: system/media/audio/notifications/Rubidium.ogg +SHA1-Digest: 8yrjz91z5e/eBaJp19dj4dQn9JA= + +Name: system/lib/libmm-abl-oem.so +SHA1-Digest: X70m4r3Nd7A+4ymbHBWaCf4Vms4= + +Name: system/etc/legal/leaflet/images/button_search_active.png +SHA1-Digest: kwPwbjqjfcn2xDqFgTFjLALwkyM= + +Name: system/usr/srec/en-US/offensive_word_normalizer +SHA1-Digest: JlWzqRWPoWw50GU8zCZrADdDH+E= + +Name: system/lib/sysmon/sysmon_corelimit.so +SHA1-Digest: SOOflJWDSJHEngx67lEIIOpo6Bc= + +Name: system/etc/permissions/com.sonyericsson.idd.xml +SHA1-Digest: DgPTEC5dpxNP5Zb+Kf7KbXdDbAQ= + +Name: system/media/audio/ringtones/Centaurus.ogg +SHA1-Digest: PKY02eigblYBnvor0bsdntpIE/4= + +Name: system/media/PFFprec_600.emd +SHA1-Digest: tY5XAqhHwXuMXM5dlnwKhnKvt/A= + +Name: system/media/audio/notifications/Beryllium.ogg +SHA1-Digest: Oua990VMXulTZxJsZDlLnlVT2NY= + +Name: system/etc/firmware/tzlibasb.mdt +SHA1-Digest: 5Ia1oHyZWm2FyoNdM3XmVINfZ34= + +Name: system/lib/libcamera_clientsemc.so +SHA1-Digest: 8zKTLR7JnlAplFh7BYtwPXJRZlY= + +Name: system/etc/legal/leaflet/hi/Important-information.html +SHA1-Digest: w0PTq8sYrvOqI2oC6+jjVFGxuiA= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Guidelines-for-Safe-and-E + fficient-Use.html +SHA1-Digest: qXbrBGle0RVQmV6gR21H2/PDaAY= + +Name: system/etc/legal/leaflet/hi/Antenna.html +SHA1-Digest: Ni6M3oEb2q2vh8AjPSFleaUpwCw= + +Name: system/lib/libjavacore.so +SHA1-Digest: D0EPzlr7nP8XmZZ52sq26O0XfvI= + +Name: system/etc/legal/leaflet/sr/What-we-will-do.html +SHA1-Digest: 0tEtDalDLl2jf8b1s0I/P4Td9Mo= + +Name: system/etc/legal/leaflet/ae/Precautions-on-Memory-Card-Use.html +SHA1-Digest: 38gozTXPV3YPtNj1Fe48PH0xrzw= + +Name: system/lib/modules/mcdrvmodule.ko +SHA1-Digest: NJW3IxmLbNZ2td9pTQ91Ve+9QRA= + +Name: system/etc/security/cacerts/7651b327.0 +SHA1-Digest: XHbRZvJn9XfMIFtTqDSXFV3AzRM= + +Name: system/etc/legal/leaflet/mk/End-User-License-Agreement.html +SHA1-Digest: /i2JNrpcIMM3aAq5bFHY2xrPqRU= + +Name: system/etc/firmware/cyttsp_8064_mtp.hex +SHA1-Digest: 9khFxE7T7ZQs4yWkbMx/IAAP5AY= + +Name: system/etc/legal/leaflet/uk/Malware.html +SHA1-Digest: rTCE9ZXknzdmooKokOZYNucPUjQ= + +Name: system/etc/legal/leaflet/fa/Power-supply-(Charger).html +SHA1-Digest: 5ab+VFoVH4XeruRjddbGhXW5cpc= + +Name: system/etc/security/cacerts/60afe812.0 +SHA1-Digest: ttJEIPTia8N+uVOS3mUfCJzhFvI= + +Name: system/etc/legal/leaflet/en-HK/Sony-Ericsson-Consumer-Web-site.h + tml +SHA1-Digest: O02nAhAazrgjz5ftagFLktVHAqA= + +Name: system/usr/srec/en-US/hotword_symbols +SHA1-Digest: dbEFacb+0FC8zwiG1opgbrzcACQ= + +Name: system/etc/legal/leaflet/uk/Important-information.html +SHA1-Digest: AnuTqHUiJngL9VwQIwpgPBRCBSU= + +Name: system/etc/legal/leaflet/ko/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: RXUaxPRfsL0gBnUDQKmTk/VMS4A= + +Name: system/vendor/pittpatt/models/detection/yaw_roll_face_detectors. + 6/head-y0-yi45-p0-pi45-rp30-ri30.5-v24/full_model.bin +SHA1-Digest: zylgR6Y3XLkv3CWuB04/XsCJjbE= + +Name: system/lib/hw/power.default.so +SHA1-Digest: tN3SujJIGPPXk9Ca8eTqttzjCBw= + +Name: system/lib/soundfx/libfnrwrapper.so +SHA1-Digest: dRsc3XdtUXDwSvE1K9gnDOWYRn8= + +Name: system/app/PhotoSlideshow.apk +SHA1-Digest: A3elttoUpctN00UYg/1cMcNEkhg= + +Name: system/etc/legal/leaflet/bs/Malware.html +SHA1-Digest: oZCgfWPThmjI1urE8TPlJNzjz2g= + +Name: system/lib/libmmwfdinterface.so +SHA1-Digest: tYQ74gGUNhhOanfCrdGAv8+KJkM= + +Name: system/app/SemcCameraUI.apk +SHA1-Digest: wAixpY+8jPCXUYo3KOTRz+8Th+Y= + +Name: system/bin/mm-mpo-enc-test +SHA1-Digest: dCEVip5YoyyXtw5fQo9XfL6vsKU= + +Name: system/etc/firmware/a300_pm4.fw +SHA1-Digest: O0kj4F4w6KWhtem40wWeKFCgELs= + +Name: system/bin/taimport +SHA1-Digest: Fgf0bZai1YfKTkEechQOBvodw8c= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/green_jungle_hd1080p_small.jpg +SHA1-Digest: ocup92WpdWxlJR/huU/kBd8wviE= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/butterfly_and_wildflower_hd1080p.png +SHA1-Digest: 2iHPTf3O3ibGkn0npj8romleN50= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor5.so +SHA1-Digest: 8rcRp4897QvUjCa/s2RP+DPOSgs= + +Name: system/etc/legal/leaflet/pb/Our-warranty---12.html +SHA1-Digest: i37sBPKkLn0XNMMn3uY4R4rH0eo= + +Name: system/bin/port-bridge +SHA1-Digest: Ss1thlQ/B9JCWBOpbS99mbTcauE= + +Name: system/app/SemcPhotoEditor.apk +SHA1-Digest: m75w9XoE44GCbEjA1pR34G5I9Xg= + +Name: system/etc/legal/leaflet/hr/Publication-number.html +SHA1-Digest: V7KVXObhSB+v7s2DVTnZvPWv+/A= + +Name: system/etc/legal/leaflet/zh-HK/Personal-medical-devices.html +SHA1-Digest: tQSRb8HUomu/2/KAfcHV934DMZQ= + +Name: system/etc/legal/leaflet/cf/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: d1KC85IVjv1eFZO4YC4AP8WOnFI= + +Name: system/lib/libasahi_playnow_red_brown.so +SHA1-Digest: qQmUMG6keWDXHhiN/sZroPbr3Dc= + +Name: system/lib/libstagefright_enc_common.so +SHA1-Digest: eFMlMpgGo0Bgj3a7FEBdneQBIaM= + +Name: system/lib/libwnndict.so +SHA1-Digest: 9Rdc3TO66FmSYe+V75lqpYvnlig= + +Name: system/etc/legal/leaflet/images/form_search.png +SHA1-Digest: jh09VeYKZHDTtoNs4LZ3Ma86Rug= + +Name: system/media/audio/ringtones/classic_phone.ogg +SHA1-Digest: tRX9CEgO7hVXNz6Q+3ki3/PCBDk= + +Name: system/media/audio/camera/common/af_success.m4a +SHA1-Digest: JAoAmIz/PFLK/hJgE8rQTUI/42s= + +Name: system/etc/legal/leaflet/bs/Service-and-support.html +SHA1-Digest: F2W8x/wNl4haSZHXbLb3gP8te8Y= + +Name: system/media/audio/notifications/Electra.ogg +SHA1-Digest: npotxhbD0RnqPgh5DweDR48Qb80= + +Name: system/etc/legal/leaflet/cf/Protection-of-personal-information.h + tml +SHA1-Digest: MteB0/z7YlJQ1y8YfOeqIe8ZjMI= + +Name: system/etc/legal/leaflet/cf/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: QmoqeA7dLBu62+aJnmPdTaDJ/u0= + +Name: system/etc/legal/leaflet/en-PB/Driving.html +SHA1-Digest: 6rX8l6FzMeDrIML0ax+lxlQY6EA= + +Name: system/semc/chargemon/data/non-charging_animation_02.png +SHA1-Digest: zvIkZSicBl1CacN6R/xyF3t/JsE= + +Name: system/etc/legal/leaflet/ar/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: bxjhITJ4pN03492N9lAT/VEi4aM= + +Name: system/fonts/MTLmr3m.ttf +SHA1-Digest: lq6qXjY2kKKL6Rf1iBi0b5nkumA= + +Name: system/lib/libsysinfo_modules/clearpad.so +SHA1-Digest: RHzqQDAuo5JfN3g7wLIqhiNGd8s= + +Name: system/etc/security/cacerts/a15b3b6b.0 +SHA1-Digest: Ga8+gSid8GucSUYQ4UcWClt0eZI= + +Name: system/framework/qcrilhook.jar +SHA1-Digest: ozuLa5PcQZJhJ/FTZg0UJckC1Lw= + +Name: system/etc/legal/leaflet/iw/Limited-Warranty.html +SHA1-Digest: kJhHx2thh3W/9BvVJ/Ug5597Lts= + +Name: system/etc/legal/leaflet/pt/Publication-number.html +SHA1-Digest: OxjX4LnPf2GkrBZvoBF9mkOiCEY= + +Name: system/lib/libstagefright_soft_amrwbenc.so +SHA1-Digest: jsukIPj5MjfEupDdf0tyUG8oU7o= + +Name: system/media/video/Sunset.480p.mp4 +SHA1-Digest: 7hP+NIHbzevodWJ5LF9l7knIao8= + +Name: system/media/audio/notifications/message_alert.ogg +SHA1-Digest: NGqZKNbMmrQOA+NRnw6TnVTNcQs= + +Name: system/etc/fast-dormancy/fd_custm_conf.txt +SHA1-Digest: mpk8Ts97gOtbKhGQ0i9NFa5agSg= + +Name: system/etc/legal/leaflet/mk/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: +K2Y/OoCYGI4l9qDNqF5an+qIdI= + +Name: system/lib/libOpenSLES.so +SHA1-Digest: Kl1FYgKYPFTqSUR/wBupW0kxyS0= + +Name: system/etc/legal/leaflet/ae/Driving.html +SHA1-Digest: V94USHjpmw8HXwoaAf1DkbucwNk= + +Name: system/media/pictures/iguazu_falls_03.jpg +SHA1-Digest: lqfOj9M+F8FoshoKmc4/xYvUctU= + +Name: system/lib/libhwui.so +SHA1-Digest: SPPnjnBhVwOf38VZCSGGNIkQaec= + +Name: system/lib/drm/libfwdlockengine-semc.so +SHA1-Digest: Je1pb8EvMDkyQASCPIsIwtkvceU= + +Name: system/lib/libsrec_jni.so +SHA1-Digest: whEaY+D7Dx5eRuyzTbFQnBHOgGo= + +Name: system/etc/legal/leaflet/uk/Export-regulations.html +SHA1-Digest: VRm4gRo5XKR038UHKbkVhKvjS58= + +Name: system/etc/legal/leaflet/ru/GPSLocation-based-functions.html +SHA1-Digest: 1z8Tcb2MtpM9P3OO4HM/5h7nLzM= + +Name: system/etc/bluetooth/iop_device_list.conf +SHA1-Digest: xG6KhsSk1M37vhgS0VwaOvK4XyU= + +Name: system/etc/firmware/dsp1.mbn +SHA1-Digest: 3FvpR2v2sfRT0RGqRBLHLYNs2xQ= + +Name: system/etc/legal/leaflet/in/Limited-Warranty.html +SHA1-Digest: sjE6Sa1XQyloqPZFNKgke/QBWUE= + +Name: system/app/WallpaperPicker.apk +SHA1-Digest: R5tBr3xCcZcj2F9MP4O03mKLQLk= + +Name: system/lib/libkaomoji_kihon.so +SHA1-Digest: ywLOj/in5HE7wtqFheSheE2yFbU= + +Name: system/etc/security/cacerts/10531352.0 +SHA1-Digest: y9ENJVY4/0yK+jqASHt1m0dczag= + +Name: system/lib/soundfx/libaudiopreprocessing.so +SHA1-Digest: J3PZzmI92nIVHQN18bI/3ZdazOg= + +Name: system/media/audio/ringtones/No_Limits.ogg +SHA1-Digest: 5skJUZ9GZHPeSneCQAWFXA1scWA= + +Name: system/bin/dhcpcd +SHA1-Digest: RH9P5HQcGZoIeeamT2CBusswoAQ= + +Name: system/etc/legal/leaflet/pt/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: fx1meHdvkow3btMkCW9pbIsCc50= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Malware.html +SHA1-Digest: O9tjE6hMjI/wz85VhBoNbhVyIEg= + +Name: system/etc/legal/leaflet/zh-CN/Important-information.html +SHA1-Digest: IoFs57nlAAcVVtunIuGOBCgxTuU= + +Name: system/etc/legal/leaflet/ms/Limited-Warranty.html +SHA1-Digest: l50Tbs0ocKuQ/LyDqzei9tNqCwU= + +Name: system/lib/libgoogle_endpointer_jni.so +SHA1-Digest: K1wXzd9qotSo3gwAdcKZtlthrro= + +Name: system/etc/legal/leaflet/ae/Emergency-calls.html +SHA1-Digest: uqlc2kctr5dqdGDlYxSy9TgK+rk= + +Name: system/etc/legal/leaflet/cf/Our-warranty---12.html +SHA1-Digest: AbAnDFuEJR41pBEOuWBdbsi7H7s= + +Name: system/app/WeatherWidget.apk +SHA1-Digest: 9F7iMFodBpYznjLiCJDZCQyVA+0= + +Name: system/framework/requestsync.jar +SHA1-Digest: 4NdtPzMoRQixx85tbpuZUw8iRWw= + +Name: system/etc/permissions/android.hardware.nfc.xml +SHA1-Digest: HUIRpkagOLqayoGvTHbaDrcSTdc= + +Name: system/media/audio/notifications/Bellatrix.ogg +SHA1-Digest: WoxsmxUxiNids1w2Vpe1vn1meng= + +Name: system/etc/legal/leaflet/pt/Warning!.html +SHA1-Digest: SewDutaOD4hQZMv6xE9FVBvIDuA= + +Name: system/etc/legal/leaflet/ru/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: cmk0++wckX0Q8IL0Bqlbsgvk15k= + +Name: system/app/SoundRecorder.apk +SHA1-Digest: yOGOttxKX7WUqdZVZG0B1qLRt54= + +Name: system/lib/libdvm.so +SHA1-Digest: SAtthvP+8UAHLwlcCm3IHX9hquo= + +Name: system/media/audio/ringtones/BirdLoop.ogg +SHA1-Digest: tyacfsy342or13y6VoNIQ+eoiXk= + +Name: system/etc/legal/leaflet/uk/Accessories.html +SHA1-Digest: 3lAEZuhUKdBSsHWQz1b9iztozAs= + +Name: system/lib/libaudioparsers.so +SHA1-Digest: nzVevek740KHMoug37GGsPgw37Y= + +Name: system/etc/legal/leaflet/zh-HK/Limited-Warranty.html +SHA1-Digest: 5aY1qjrtviHDIEQOEGhfUGkazZc= + +Name: system/framework/com.sonymobile.playanywhere.jar +SHA1-Digest: Zj+u4L3PyWkjNxUqhf+KDVv8WFA= + +Name: system/media/audio/notifications/Spica.ogg +SHA1-Digest: p4ocX2dd8+x7ajE2UUgZiUCHP7U= + +Name: system/lib/libconfigdb.so +SHA1-Digest: UlNGqldXmDQEHWYWhKcXi72raek= + +Name: system/etc/security/cacerts/c8763593.0 +SHA1-Digest: +gdb++qnd0mWyTgp0LJzn5wDIrE= + +Name: system/usr/idc/qwerty.idc +SHA1-Digest: XSU+bbgHHEbEG/bF1WUYrQ9Nj/A= + +Name: system/etc/firmware/tzsuntory.flist +SHA1-Digest: aJBR+L9miMb10N9KDPhTuyI1kc4= + +Name: system/vendor/camera/LGI02BN0_IMX132.dat +SHA1-Digest: YUkShWYyWjJpraLNZ2lSanopPH4= + +Name: system/media/audio/notifications/Procyon.ogg +SHA1-Digest: WWOYbvBg+DIKYQQQ82yCWw1N50M= + +Name: system/etc/legal/leaflet/en-HK/For-Devices-Supporting-3D-Viewing + -capabilities.html +SHA1-Digest: MYKgSs5eTtPV6zdrGYAk/30Oexg= + +Name: system/etc/firmware/touch_module_id_0x42.img +SHA1-Digest: //0ct+1kcoEf78OVeDzZpErBruM= + +Name: system/etc/legal/leaflet/sq/Warning!.html +SHA1-Digest: csGLayaN5CDvDMgo70W3jaEkaiA= + +Name: system/etc/legal/leaflet/ae/Important-information.html +SHA1-Digest: ulJrmtZysfUb0Nq5dUdSDGrOpsY= + +Name: system/etc/legal/leaflet/bs/Accessories.html +SHA1-Digest: wITZZOqLjBwxHe2iptEyN8PID1Q= + +Name: system/etc/legal/leaflet/bs/Important-information.html +SHA1-Digest: paXpdk1lsza7M6VvGG/QzIHsM58= + +Name: system/app/usb-mtp-update-wrapper.apk +SHA1-Digest: trRw9kvKtC1EGcAWxmjr1zTY7rc= + +Name: system/bin/mm-jpeg-dec-test +SHA1-Digest: wo8OAAaFcQsaj4aIaSxivImMaXU= + +Name: system/app/VisualizationWallpapers.apk +SHA1-Digest: bgZcaSHwufGTt3NIrG52OtiF3+o= + +Name: system/media/audio/ringtones/HalfwayHome.ogg +SHA1-Digest: wyrYCffeViie8bRhm/IRXnw6lYo= + +Name: system/media/audio/notifications/Thallium.ogg +SHA1-Digest: labxWBN5qUXN0Ur4m3XOUMgkod0= + +Name: system/etc/legal/leaflet/zh-HK/Disposal-of-old-electrical-and-el + ectronic-equipment.html +SHA1-Digest: OoteOliDfnHVLeSxrqoA4iPjTtI= + +Name: system/app/PhaseBeam.apk +SHA1-Digest: f/hccVyaRd1B1Y2wr/NZVQZZoKI= + +Name: system/etc/security/cacerts/5e4e69e7.0 +SHA1-Digest: OPYnMzF7mxzqxH56G6+9Io0+wns= + +Name: system/lib/libaudioparameter.so +SHA1-Digest: ErmDKtQxOiJFExpLdyzDnJejEkI= + +Name: system/etc/legal/leaflet/sr/Warning!.html +SHA1-Digest: xieuerSiobiOmpUxD/os1UGrcJI= + +Name: system/etc/hostapd/hostapd_default.conf +SHA1-Digest: v4yzmBKD75UpIxL0cuppUuwBHbM= + +Name: system/lib/libaudioalsa.so +SHA1-Digest: O96xSh28k3R4BftUxXN2nqp/Ff8= + +Name: system/etc/legal/leaflet/kk/Accessories.html +SHA1-Digest: frlDHYSkL4kT0Ct6HZ8NDfeYcEk= + +Name: system/bin/system_server +SHA1-Digest: 7ggdt9+XJho1VAS9TnDXBT+2ZLA= + +Name: system/app/Books.apk +SHA1-Digest: pHNa3I3+ezIz8ehoddGf5VKWhdw= + +Name: system/vendor/camera/SOI13BS2_IMX135.dat +SHA1-Digest: fjR3LzoKBLTBc0MJNL34NRtGZmA= + +Name: system/etc/legal/leaflet/uk/Driving.html +SHA1-Digest: DsJfKVzXYNqvkfPKKwii/FPOmsw= + +Name: system/etc/legal/leaflet/in/index.html +SHA1-Digest: 39g/Z/zVkLwcd+zcny7iK5kxM+4= + +Name: system/etc/legal/leaflet/hi/Precautions-on-Memory-Card-Use.html +SHA1-Digest: IZpOGJPum54Qfl2Duu3UCDxyWN0= + +Name: system/app/GoogleFeedback.apk +SHA1-Digest: 8COmOj9UQaEVOcHJXUKBU5IfWsk= + +Name: system/app/Settings.apk +SHA1-Digest: uiGSbC5keQZ9TlZRBr5oOG+CIv8= + +Name: system/etc/security/cacerts/b39cd941.0 +SHA1-Digest: 3YRfX+sM/EvG18tNe5V63dGWDGA= + +Name: system/media/audio/alarms/Barium.ogg +SHA1-Digest: MnvyDc3f0xcVS5TVjE+T5mcad3c= + +Name: system/media/audio/ringtones/DreamTheme.ogg +SHA1-Digest: gpRdfHQK+kjh5oWDLAM9klVlWQM= + +Name: system/lib/libnfc.so +SHA1-Digest: 77DiKyEzT3lhnbKBKKoCmS0ygRg= + +Name: system/usr/xt9/SEMC_810_r1-5_SKlsUN_xt9_2.ldb +SHA1-Digest: IHrhx4Br6YDIllS9mEKEbK7lCxg= + +Name: system/app/TaskSwitcher.apk +SHA1-Digest: JIZHO8fqb/s9a0r3acQsyp3ZAlw= + +Name: system/etc/legal/leaflet/th/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: HPDaee1SEjp5OdTtvDa+W2hTcWU= + +Name: system/lib/libals.so +SHA1-Digest: 4T5ArrTi2PTlLDEZTnDhi1shVw4= + +Name: system/etc/legal/leaflet/sr/Protection-of-personal-information.h + tml +SHA1-Digest: jKt7h3orGS70tlHHhyF7qaZKL2k= + +Name: system/etc/legal/leaflet/hr/Conditions.html +SHA1-Digest: YEn7d009TpbaA1v8TKovzX0n/4Q= + +Name: system/etc/legal/leaflet/ar/Driving.html +SHA1-Digest: 9a3V4KE85nSLsOpfU6JzXDKBe1I= + +Name: system/lib/soundfx/libpreeffectwrapper.so +SHA1-Digest: kf2IEgbHkwmj2PcPjayNBwcKUAQ= + +Name: system/etc/legal/leaflet/en-HK/en-CN/What-we-will-do.html +SHA1-Digest: BiEGOSARutNx2356JmuJ8oEpBuQ= + +Name: system/lib/libqmi_client_qmux.so +SHA1-Digest: 8tQWFGxe2qBYUPylvDcuwwEyZSA= + +Name: system/bin/cal_data_manager +SHA1-Digest: kV2uOOSLLgA5kzwIk2oWA0yUWKE= + +Name: system/etc/security/cacerts/48478734.0 +SHA1-Digest: DD+Jf/xyWUb9vB7awEI1t/6+AM0= + +Name: system/etc/security/cacerts/76579174.0 +SHA1-Digest: pzzaX91VWO/hKUAL6vLTr/M9//8= + +Name: system/lib/libvorbisidec.so +SHA1-Digest: HpuJ4g4HT01NWdMVqzVxB/BG7o8= + +Name: system/etc/legal/leaflet/ar/Our-warranty---12.html +SHA1-Digest: gxA1tPG+j+8WXqOzH9WRUSIPq7g= + +Name: system/app/SemcDlna.apk +SHA1-Digest: KgqnFpw5ipB/YyN/oZ3i2vKCVCc= + +Name: system/etc/permissions/com.sonyericsson.android.semcrilextension + .xml +SHA1-Digest: EaGEsOnxhHi0lkvIWrEl+yn3Vqw= + +Name: system/media/audio/alarms/stars.ogg +SHA1-Digest: OSYSESCOyI2LJ3zMVa3+OV+8IHg= + +Name: system/media/pictures/prague_02.jpg +SHA1-Digest: XNeiZpXyrwMJGp6BHs3LH3zOtP8= + +Name: system/etc/legal/leaflet/sr/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: XB+OZlGoTryRUarvqnZe55m/7tA= + +Name: system/bin/pand +SHA1-Digest: LYZpoiUWr6FuK4MlJWc4a7X7E30= + +Name: system/lib/libAsahiJniNative.so +SHA1-Digest: zVn9MCGebtbO7R1nVTg7+Advzbs= + +Name: system/etc/legal/leaflet/pb/Service-and-support.html +SHA1-Digest: fWTFIm1zpsw8St6hfhXzwmvokFo= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/For-Devices-Supporting-3D + -Viewing-capabilities.html +SHA1-Digest: dy1SC34eHiKriMFBZf/0fhs43Zo= + +Name: system/framework/com.sonyericsson.android.omacp.jar +SHA1-Digest: Tjm0VSYp+COExnMrl8bJqRNmeqk= + +Name: system/etc/legal/leaflet/en/Export-regulations.html +SHA1-Digest: gtpkBgdsQBvOQhItMDh46sREi5U= + +Name: system/lib/libstdc++.so +SHA1-Digest: MRzKLx3PiQUa3JWLShNO/ktKHO0= + +Name: system/lib/libtcpfinaggr.so +SHA1-Digest: S3S3va4JKfjjXOfPO3g6drl5TdI= + +Name: system/etc/legal/leaflet/sq/Driving.html +SHA1-Digest: JKNLzhkKOy9OOA8n42ql6P8KBFg= + +Name: system/etc/permissions/com.sonymobile.mediacontent.xml +SHA1-Digest: i2YXEHQy3x0aW8hisNVft/ZAR1U= + +Name: system/lib/hw/camera.msm8960.so +SHA1-Digest: ZgNZV8D9pyAETyZ8lwrGWIwMotQ= + +Name: system/etc/legal/leaflet/bs/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: nScOMJ+5QDuvEiZu/9Hg390poew= + +Name: system/etc/legal/leaflet/ko/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: NZUfgyWlGyJ5cA7pvKG92RE9/yY= + +Name: system/etc/legal/leaflet/zh-CN/Sony-Ericsson-Consumer-Web-site.h + tml +SHA1-Digest: m+b9BNZ8rfimNyWIVVzJx++KTyg= + +Name: system/usr/share/zoneinfo/zoneinfo.dat +SHA1-Digest: 3bNLXP6MzuugMmpyUxw5kRipvbc= + +Name: system/etc/legal/leaflet/iw/Conditions.html +SHA1-Digest: 57WnkVLwtu0J0xQU8tWp6Jz35yY= + +Name: system/lib/libmmgesture_services.so +SHA1-Digest: Sudux3/718C3P5YdYUN2D0UtpYM= + +Name: system/framework/com.quicinc.cne.jar +SHA1-Digest: kfZH6EkYKkFQqoctTLIuKxqDbqE= + +Name: system/etc/legal/leaflet/zh-TW/Geographical-scope-of-the-warrant + y---zh-zt.html +SHA1-Digest: VntEnk/f//IXzf8w091sVoLVw0M= + +Name: system/framework/uiautomator.jar +SHA1-Digest: jM6VldBsEwuvUcQgHT5A6zwoOm4= + +Name: system/etc/legal/leaflet/pt/Flight-mode.html +SHA1-Digest: BgbVxm1mDpgE/X708RMoKJ3B8JU= + +Name: system/lib/libhardware.so +SHA1-Digest: N+5tBToBQt+BML40IojztX5aXRk= + +Name: system/etc/legal/leaflet/iw/Malware.html +SHA1-Digest: dGelV64JWd7Njzpx4s0pgptePes= + +Name: system/media/audio/notifications/Krypton.ogg +SHA1-Digest: aHmdh+Mp17nXRfM4HFTOH84xJ8o= + +Name: system/etc/legal/leaflet/ae/Accessories.html +SHA1-Digest: M1t5iOg5IuQ9A3Z/oPpwvuTAVjA= + +Name: system/etc/legal/leaflet/uk/Warning!.html +SHA1-Digest: KIg+1jcR9X+tUS2/9ArIVvuOQ40= + +Name: system/lib/libext2_profile.so +SHA1-Digest: cy63T6xVxSx/WV4qP2BznWzZaxk= + +Name: system/etc/legal/leaflet/pt/SIM-card.html +SHA1-Digest: zw09r+MG80hbYdsoU/fLDUDtLMU= + +Name: system/etc/legal/leaflet/vi/Conditions.html +SHA1-Digest: FVk3iB63/U+iuq7b8b80Tq5z/es= + +Name: system/lib/libgui.so +SHA1-Digest: v56bup4bvNfdIl4ZWmSflViyhuA= + +Name: system/bin/sysro +SHA1-Digest: jZIezYQzN2ReCRWX60J821RRf44= + +Name: system/etc/legal/leaflet/ru/Loudness-warning!.html +SHA1-Digest: Jdse2caloYEiXKokiZFRLN+4dbQ= + +Name: system/etc/be2_album +SHA1-Digest: LThthviJo4EBw/BVlrxem5dCPFw= + +Name: system/etc/legal/leaflet/cf/Memory-Card---legal.html +SHA1-Digest: 6zCuweRDIAF+dKxnYVBMOMa8IMM= + +Name: system/bin/sysrw +SHA1-Digest: JQAQ8P6ZkqDmidmg0YPCBvxvimQ= + +Name: system/etc/legal/leaflet/kk/Export-regulations.html +SHA1-Digest: Ir9olIpPfsi3VnV/s6sFpjm4jTM= + +Name: system/etc/legal/leaflet/ae/Malware.html +SHA1-Digest: zRPFHmezq4sRHO6LI2uhRDmZeyU= + +Name: system/lib/libinput.so +SHA1-Digest: LTwWeeqEDPh8426SttdVGMo9fl4= + +Name: system/framework/semc_cdfinfoaccessorif.jar +SHA1-Digest: 425/s4/75aofNYnilnwlqYdSMaM= + +Name: system/lib/libgoogle_recognizer_jni.so +SHA1-Digest: 7ri4BbwNSD99TrYEyU/7PrsKklE= + +Name: system/etc/legal/leaflet/styling/mBWltr.css +SHA1-Digest: +V7qZlgP3zTXFzn8NUpJPhD67/I= + +Name: system/etc/security/idd_config.pem +SHA1-Digest: h9r3qmWxq5aLYuzJz9xG/3LEGkY= + +Name: system/app/Street.apk +SHA1-Digest: SiYWWmxdwXJhoCpq6Px0oLJjpr8= + +Name: system/etc/legal/leaflet/fa/Antenna.html +SHA1-Digest: kpT1KdfH7c1kENzfVfyD4FZ8aXM= + +Name: system/media/audio/notifications/Lalande.ogg +SHA1-Digest: TpM9FkQ4P934DUP62QgJpUw5uMY= + +Name: system/usr/srec/en-US/symbols +SHA1-Digest: X3eWxk+MQsrhAd6FOn03af84C5I= + +Name: system/etc/firmware/vidc.mdt +SHA1-Digest: Ea7okyrPey5KlFbVTl4wFvagmh0= + +Name: system/lib/libmedia_jni.so +SHA1-Digest: RgUI3S7WomddPHK7IKmZndnKmZg= + +Name: system/semc/chargemon/data/charging_animation_01.png +SHA1-Digest: i39Rm0SteJsYPv8S92WYVVzYEGw= + +Name: system/etc/legal/leaflet/fa/Memory-Card---legal.html +SHA1-Digest: 80ILbfQwe/7hLapiVS26VSjyS58= + +Name: system/media/audio/alarms/Alarm_Beep_01.ogg +SHA1-Digest: VfGVvIg+rMhK4o1UthmYDw2xG24= + +Name: system/app/SomcMusicSlideshow.apk +SHA1-Digest: MX3iyABfxGx+aZGsXVh6HRbTQMQ= + +Name: system/app/UseragentProvider.apk +SHA1-Digest: TU3hTUSYJkFCyG688YLvwfzKbeI= + +Name: system/media/audio/ringtones/Carina.ogg +SHA1-Digest: Y8IZCyqyNbYoShyJ0ikjXQV/oto= + +Name: system/etc/legal/leaflet/xl/Warning!.html +SHA1-Digest: GKCWd4N7gKcr4lv4ryjhcNRvmkI= + +Name: system/etc/permissions/com.sony.snei.vu.api.install.xml +SHA1-Digest: ibdYj6oSnGBr/8yTPK53goy7adk= + +Name: system/etc/legal/leaflet/ru/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: t1WYgb9BsxB+h/39DHLkXxvHM94= + +Name: system/usr/srec/en-US/dict +SHA1-Digest: AXBx0Bz53vO1Keed7lCO425AmBc= + +Name: system/etc/legal/leaflet/ar/Accessories.html +SHA1-Digest: nx12Icty0zDzP9qxGRpoTHkIIDQ= + +Name: system/media/audio/ringtones/xperia.ogg +SHA1-Digest: avYo1+NeCm0RCH/NZdh6bXADHHE= + +Name: system/etc/legal/leaflet/xl/Our-warranty---12.html +SHA1-Digest: sv0qvFv6B4R1XGrWmSncIKDUQf4= + +Name: system/etc/legal/leaflet/xl/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: M3sLt5bAwCK3TvfLmwUjNiYSBOI= + +Name: system/etc/legal/leaflet/ae/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: siyDe3LmBVU5+YvazG7rWdm5+98= + +Name: system/etc/security/cacerts/d777342d.0 +SHA1-Digest: KqcaEKbpbxK/ZskNhdSlNwqFbY4= + +Name: system/lib/libgcomm_jni.so +SHA1-Digest: AuW1pIpLRd0cytmJS9rdzByKm0A= + +Name: system/etc/security/cacerts/399e7759.0 +SHA1-Digest: C7nniIwXMNqhQza0pF0/S/7ALuk= + +Name: system/app/PhotoWidget.apk +SHA1-Digest: swKcEpRg+pnWiAbRBLrweOpmG00= + +Name: system/lib/libmedia_native.so +SHA1-Digest: jx/9VAk+0ec9OQjl4AFvAr6Cdtw= + +Name: system/etc/legal/leaflet/pt/Emergency-calls.html +SHA1-Digest: B759Kc+wAhs+3kbxKSosRNAIzjk= + +Name: system/app/KeyChain.apk +SHA1-Digest: hlEzp6H7hZFCyV8vfu33+OQQwes= + +Name: system/etc/security/cacerts/c33a80d4.0 +SHA1-Digest: j+oS/ELhscXEs8jsZgH1YZdo0Yk= + +Name: system/app/CameraExtensionPermission.apk +SHA1-Digest: 4BxSitEVQMEtwGx5p++uIJF1+Hs= + +Name: system/media/audio/ringtones/DonMessWivIt.ogg +SHA1-Digest: SFRCKLwlXvC0uzVSPXdpurHt2b4= + +Name: system/app/UserDictionaryProvider.apk +SHA1-Digest: l0xFCchAll+uVeLNxurupqXYHZA= + +Name: system/etc/legal/leaflet/iw/Service-and-support.html +SHA1-Digest: G/9tNBR3IZSPpzR8lwCI/zkAY0Q= + +Name: system/etc/legal/leaflet/uk/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: GkXypzHFjylTMjpSMv7HEXfel+U= + +Name: system/app/LiveWallpapers.apk +SHA1-Digest: 2rPGY61a4lPn0PN/+wcEeWPslyI= + +Name: system/bin/mm-qcamera-app +SHA1-Digest: Ups4Fl6WfB6SdGw3ey/wdx5kz+s= + +Name: system/etc/legal/leaflet/en-HK/Antenna.html +SHA1-Digest: bZYcUbgKACEoEZcAqJ5FwFktNEc= + +Name: system/app/OnOffTools.apk +SHA1-Digest: gm/36ELrCDdjxfevKuLORx89XmQ= + +Name: system/framework/framework_ext.jar +SHA1-Digest: pwbUPdddg4F1ntOjrm1RgiPhvw4= + +Name: system/etc/legal/leaflet/th/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: pwepPr4ciCzOclK45U8mJuvVenw= + +Name: system/app/OMAClientProvisioning.apk +SHA1-Digest: E1aOW0EKdmrx6QqDsykRWRW4RDY= + +Name: system/lib/libsuspend.so +SHA1-Digest: w7XR3CC21WHSvjjIYlMXmjYqrGY= + +Name: system/etc/legal/leaflet/images/btn_search_cherry-BIG.gif +SHA1-Digest: rOW0qJAZYOUqBFH+zXOGiPTTiEc= + +Name: system/etc/legal/leaflet/ko/index.html +SHA1-Digest: v3Jg9iIuewYV4jM7CD/8Vbom5hU= + +Name: system/bin/run-as +SHA1-Digest: vv0XB9PuCuGrYGXPDZzrSTR0XcY= + +Name: system/etc/security/cacerts/73da149b.0 +SHA1-Digest: 7cmlEdkiJbcZT7yljZ32CLuOb+w= + +Name: system/media/audio/notifications/F1_MissedCall.ogg +SHA1-Digest: 3eJDD9HL51MrAII1wqkIBbIFyxE= + +Name: system/media/audio/ringtones/FriendlyGhost.ogg +SHA1-Digest: 9olSawoPWK5zDyrzPiQ5tCvZkdE= + +Name: system/framework/svc.jar +SHA1-Digest: MEGSLs+LIryF7+Nk8yLo/Cwlqzc= + +Name: system/fonts/DroidSerif-Italic.ttf +SHA1-Digest: aCx+e4yyj8kOYcR5otukddlLoMo= + +Name: system/lib/libbluetooth.so +SHA1-Digest: 19I2EnCIDyND5FMJT9/VIDIikJc= + +Name: system/etc/legal/leaflet/fa/Driving.html +SHA1-Digest: +uH9wGTRW71tthFUmAYRURhQs5M= + +Name: system/etc/xtra_root_cert.pem +SHA1-Digest: g1xViaJnw8WtpwCgdqrvqdkqFOA= + +Name: system/etc/legal/leaflet/bs/Personal-medical-devices.html +SHA1-Digest: l4sHocnZ6J8RzLKL9FRoZp1WPaI= + +Name: system/etc/legal/leaflet/mk/Publication-number.html +SHA1-Digest: Gph3AL3xjN02FDEL1L1WbH2Ri1E= + +Name: system/etc/legal/leaflet/en-HK/en-CN/SIM-card.html +SHA1-Digest: UXstIwBu5jNdfPbntfojF2Jnui0= + +Name: system/etc/legal/leaflet/images/button_search_foot.png +SHA1-Digest: cCju6Bwm9HMIHgkwLYu/g/kwF0g= + +Name: system/app/SettingsProvider.apk +SHA1-Digest: Epp7i/EkKPrrINTZggANygc9vy0= + +Name: system/etc/legal/leaflet/iw/What-we-will-do.html +SHA1-Digest: mc6H6ou89NLMZUVuCanE3vCZ0wE= + +Name: system/etc/legal/leaflet/kk/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: r/+9xr0OpxHpVkI/uFrcP1LG90A= + +Name: system/etc/legal/leaflet/fr/Power-supply-(Charger).html +SHA1-Digest: tA/HVQQo12DWTjGhjPAXUKM7RGw= + +Name: system/lib/libnativehelper.so +SHA1-Digest: UI++LXAwsbKx9q/ynCOKPrJ5DTM= + +Name: system/etc/legal/leaflet/ko/Power-supply-(Charger).html +SHA1-Digest: X+jpus8UcLEx66WrqApRNTQtElI= + +Name: system/etc/legal/leaflet/mk/Personal-medical-devices.html +SHA1-Digest: mXQqztYSgNQub77GSWXgERAsfp4= + +Name: system/etc/firmware/touch_module_id_0x41.img +SHA1-Digest: ZZYUStnik2uAbRtCr2NHS9o6Seo= + +Name: system/etc/legal/leaflet/ar/GPSLocation-based-functions.html +SHA1-Digest: WfnE1dcrlPCmMGaZZQuTKInw6bE= + +Name: system/etc/legal/leaflet/vi/Memory-Card---legal.html +SHA1-Digest: WijaaH8BWGtfBVrcOtD/o4Pb4iQ= + +Name: system/usr/xt9/SEMC_810_r1-3_HElsUN_xt9_2.ldb +SHA1-Digest: za7LIP+OE83CNIy2tl5T6jzB3O4= + +Name: system/media/audio/alarms/string_ensemble.ogg +SHA1-Digest: 2BsaTrk0zfrgImAfW0Jmejnpz3g= + +Name: system/usr/idc/qwerty2.idc +SHA1-Digest: CxeFAjbR656/zttheEGexLMYZio= + +Name: system/vendor/etc/audio_effects.conf +SHA1-Digest: yjxsxefmdZTXxq0AnqGluqAQrc4= + +Name: system/etc/legal/leaflet/zh-TW/Loudness-warning!.html +SHA1-Digest: hIPajhmVv6hBq72KfL42TtwZBBU= + +Name: system/app/Galaxy4.apk +SHA1-Digest: tTqsR6MvUKJlhPGLgM676ciAN6Q= + +Name: system/etc/legal/leaflet/cf/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: mZilHB8vdT5hvGHK1GR1+s5hPNI= + +Name: system/etc/legal/leaflet/kk/Power-supply-(Charger).html +SHA1-Digest: WWvwsPx2WKDZKrfWBdufYOrD4ig= + +Name: system/etc/legal/leaflet/ko/SIM-card.html +SHA1-Digest: be7xd68Wj9aTg+mmJJhJX9XlaYE= + +Name: system/lib/libDxHdcp.so +SHA1-Digest: qUfYNKkuIXO1NVs5YwxwqWoSlHQ= + +Name: system/etc/legal/leaflet/images/p_cover.png +SHA1-Digest: VtblZYj4MaATI2wY+gMnppsE5E8= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Memory-Card---legal.html +SHA1-Digest: s+YiLSZG7PPCyNq2R+SgTZMt6Ss= + +Name: system/etc/legal/leaflet/mk/Memory-Card---legal.html +SHA1-Digest: PEDaSD5J614+GW48FWntobzH3FE= + +Name: system/media/audio/alarms/2_cents.ogg +SHA1-Digest: 0wAFJ/6Xcdpn2qoUPofjGbxPTxs= + +Name: system/etc/legal/leaflet/en-PB/What-we-will-do.html +SHA1-Digest: YZ8LHHSoR2wC0qdzUyyNLHOx3OA= + +Name: system/framework/framework.jar +SHA1-Digest: NfKXCqIP5ZbXXVyNYUi1tkDOgPM= + +Name: system/fonts/SoMABold.ttf +SHA1-Digest: 0aGq7tXXDHl5DZo9kkWylGu6Tlg= + +Name: system/lib/hw/audio.usb.default.so +SHA1-Digest: 6/cLk7oMjJMTlNvU0XhRFCLS1c4= + +Name: system/media/audio/notifications/Vega.ogg +SHA1-Digest: AXkmetkgFa/GiXrWjdR/hUR6FTQ= + +Name: system/etc/security/cacerts/1dbdda5b.0 +SHA1-Digest: Z8P5gTMftWn5WsxGoaWi5Ewsbjc= + +Name: system/etc/firmware/a225_pfp.fw +SHA1-Digest: JXnk+hLjb41rBPpvRTxNe6dba2Q= + +Name: system/etc/legal/leaflet/xl/Malware.html +SHA1-Digest: y1N1XJcv3jaqlfOIPeJf5KJgi5E= + +Name: system/etc/legal/leaflet/en/Emergency-calls.html +SHA1-Digest: 2WBsDStM6otgioS82Y/LxX+3i/I= + +Name: system/etc/legal/leaflet/hr/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: 2sNJutN8z6FbmRIGzwZZionJ/vs= + +Name: system/lib/libqdi.so +SHA1-Digest: nwfDjDTQzZ0X+T4H3eb/UgcXADg= + +Name: system/etc/legal/leaflet/ru/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: QP2LsTOPnQ3M0ljVTxIfhndfpkU= + +Name: system/etc/security/cacerts/75680d2e.0 +SHA1-Digest: zmqh8h2o8Hm6tDQfcCh8iNtUuUc= + +Name: system/etc/legal/leaflet/sr/Battery.html +SHA1-Digest: I1qZDF/4weGyliRR4nBLjWvNdxY= + +Name: system/etc/firmware/sbl1.mbn +SHA1-Digest: 1bkv40STVJaHi/nZNihtSZ/sbgc= + +Name: system/etc/legal/leaflet/ko/Memory-Card---legal.html +SHA1-Digest: a54EiCC4gOlIelaj/D6PetM6P30= + +Name: system/lib/libmemalloc.so +SHA1-Digest: llqwS5hu7CkmoKWaMPNVJXZpA7E= + +Name: system/media/audio/notifications/Iridium.ogg +SHA1-Digest: DU9VigzfsaBvoojPYEv6XE4VY78= + +Name: system/app/InputDevices.apk +SHA1-Digest: CrQUQ2sDSJrpQfIsgxzQpY7t3SY= + +Name: system/bin/qseecom_security_test +SHA1-Digest: M8ZbplhhO/xzkFweyRcQTIe4BWM= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/cloudy_mountain_hd1080p_small.png +SHA1-Digest: 5JRfRR9NrDT3Y0N0KImvxMzS7/8= + +Name: system/fonts/DroidSerif-Bold.ttf +SHA1-Digest: MlOUKslixMSZJEtMW5rgRjkfMq4= + +Name: system/etc/legal/leaflet/ru/Our-warranty---12.html +SHA1-Digest: 8wLIR4WKT+k9W2s/WJR58sg3inE= + +Name: system/etc/permissions/com.sonyericsson.media.infinite.extension + _1.xml +SHA1-Digest: vNjpxERSxZJwIHiFNcagzF0itLA= + +Name: system/etc/legal/leaflet/styling/legal_mcommon.css +SHA1-Digest: Hra3hQ6+ZoYHrvDqKgi1msqxoHw= + +Name: system/bin/mm-jps-enc-test +SHA1-Digest: e4RcF7h/0UVzSDmrNPOI2wopHuU= + +Name: system/framework/bmgr.jar +SHA1-Digest: QVFmk4n5MwVfCYlXqoeaxc02J6o= + +Name: system/etc/security/cacerts/7672ac4b.0 +SHA1-Digest: ZvDdi25zaHa3+F+HBUDiaEjzgrA= + +Name: system/vendor/camera/SOI13BS2_DW9735.dat +SHA1-Digest: KpmHvib++s6JGitEYnI9M1qppFk= + +Name: system/etc/security/cacerts/00673b5b.0 +SHA1-Digest: bC6baGqpg7WySAQXIdpwsoA9xLA= + +Name: system/lib/libexif.so +SHA1-Digest: 8WUmar5LAr1gAmTKYA+V4WLuIWM= + +Name: system/etc/legal/leaflet/ru/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: hTgrCFELz5mP629oeZHNLR4GUew= + +Name: system/etc/legal/leaflet/in/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: F414JVpohmR9wFNshdKQm5LrSTY= + +Name: system/lib/drm/libodekakeplugin.so +SHA1-Digest: 26Hw7RNvw0L8dQE9DH3X5w5akvE= + +Name: system/etc/security/cacerts/6e8bf996.0 +SHA1-Digest: VlozgKv+QbW1H/99/nImmPiyEOI= + +Name: system/lib/libwfdhdcpcp.so +SHA1-Digest: NH9/pmv4ujbDp4zwcv6ZPMpN/lg= + +Name: system/app/SomcPhotoAnalyzer.apk +SHA1-Digest: prL2dtS6LT4RBp+dqAC/3NDCOAM= + +Name: system/etc/legal/leaflet/hi/Emergency-calls.html +SHA1-Digest: YbEN3Sf7iMyDzQ/fMGejtOpJmCU= + +Name: system/etc/security/cacerts/5021a0a2.0 +SHA1-Digest: OsZKswcn/xRvpTKd7JaZpcHdR+o= + +Name: system/etc/legal/leaflet/hr/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: 7kcfniL2fyA5yPXaAZ2qMrFnGLc= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Recommendations-for-care-an + d-safe-use-of-our-products.html +SHA1-Digest: 6fwxBFvkhb1BwtsIfmMUin/RUx8= + +Name: system/app/GoogleTTS.apk +SHA1-Digest: Qi/GuQ4Pgl5yEMQwDgP1lif+HFc= + +Name: system/bin/wiperiface_v02 +SHA1-Digest: EBWROA5OSX9V+UNdBeyCZ9TtagM= + +Name: system/etc/init.qcom.modem_links.sh +SHA1-Digest: Wkzs+lk5AGH/J4R+RYARLt012kk= + +Name: system/lib/qnet-plugin.so +SHA1-Digest: 0yiaSHlm5BZW05t2Jz95YeKqnAs= + +Name: system/etc/legal/leaflet/sr/Personal-medical-devices.html +SHA1-Digest: D6zxj4IzBJUywNVXIXeu0dtRRFE= + +Name: system/etc/legal/leaflet/uk/What-we-will-do.html +SHA1-Digest: ftBYFYZJDaRbzxIChGYnZ03M5Mo= + +Name: system/media/audio/alarms/Hassium.ogg +SHA1-Digest: J2qXPELtRj2nzNLYBWsueuYL1TY= + +Name: system/bin/make_ext4fs +SHA1-Digest: d22W2tORUjMQDo2kfTpNlatCEPs= + +Name: system/vendor/pittpatt/models/detection/multi_pose_face_landmark + _detectors.7/right_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-2/full_model.bin +SHA1-Digest: Pvsuib7v1Y1CLewHRtiIm/N9W54= + +Name: system/media/pictures/istanbul_03.jpg +SHA1-Digest: 1e7ygAoQ1Uf/jm/0qwaQ4Ttf0JQ= + +Name: system/etc/legal/leaflet/kk/Limited-Warranty.html +SHA1-Digest: eHW2GbzoIDiwCzHVZ/1V25C7AD8= + +Name: system/etc/legal/leaflet/en-PB/Personal-medical-devices.html +SHA1-Digest: 5blYNCEgBHPyxjwNbJqYI32ga7Q= + +Name: system/media/audio/notifications/tweeters.ogg +SHA1-Digest: NMokEXyM2NInXWTLTTPnep9M47U= + +Name: system/usr/xt9/SEMC_810_r1-4_RUlsUN_xt9_2.ldb +SHA1-Digest: /ySzcCG4Gy43qVq50J8Airr5gCY= + +Name: system/bin/xssm +SHA1-Digest: UxdQFUXtsw6vhUIsn0znjpTQDZU= + +Name: system/semc/chargemon/data/non-charging_animation_07.png +SHA1-Digest: qcRMAgku7xkEi0fxTn/U1CFZY9Q= + +Name: system/etc/security/cacerts/bda4cc84.0 +SHA1-Digest: /ZztxwPHRyN202+l2rSGg6udDJE= + +Name: system/media/audio/Chris Young- I Can Take It From There.mp3 +SHA1-Digest: 1voze3/wobSN75yj9P2jiUm4WMk= + +Name: system/usr/srec/en-US/dictation.config +SHA1-Digest: dAG0jruo14Cvr/u888Yg9c8UGMo= + +Name: system/etc/security/cacerts/6adf0799.0 +SHA1-Digest: yOpUlfl7ZFCprMcTVr1bX0nCx28= + +Name: system/media/audio/ringtones/Third_Eye.ogg +SHA1-Digest: HpCcmSiMRV88aI8GvoMCCOnWxfg= + +Name: system/lib/libwebrtc_audio_preprocessing.so +SHA1-Digest: 03HT8KuW3R8C6+uY0jlZwfq8sb0= + +Name: system/etc/security/cacerts/4fbd6bfa.0 +SHA1-Digest: S6TGnIWLIWVHbHri7sRkvgXJHPo= + +Name: system/etc/legal/leaflet/en-HK/Protection-of-personal-informatio + n.html +SHA1-Digest: ireUCtNwVRqQSBfvMA66Rt2G2E8= + +Name: system/media/audio/notifications/cosmic.ogg +SHA1-Digest: PdB4qRJGEXwPp06l5LBnBBSMc00= + +Name: system/etc/legal/leaflet/en-PB/Publication-number.html +SHA1-Digest: f9h/SCj+A4G3G8s81H+mA7qO+zU= + +Name: system/fonts/DroidSans.ttf +SHA1-Digest: wSOvwWcxlSaLZJt7ejhHGZ7eF9E= + +Name: system/lib/libmpqutils.so +SHA1-Digest: 1NdtcOWTVWR96LJ4cDPD5fVW5Yo= + +Name: system/etc/legal/leaflet/in/Protection-of-personal-information.h + tml +SHA1-Digest: +Hpoxw54qmOsWtEf9/PO+GuWKa0= + +Name: system/etc/legal/leaflet/ar/Protection-of-personal-information.h + tml +SHA1-Digest: rVO5xMAvkwEYTezTEDiqij848Fk= + +Name: system/etc/legal/leaflet/en/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: l24Dqj0otYuZOOTtu6OWtU4UdSQ= + +Name: system/etc/legal/leaflet/zh-TW/End-User-License-Agreement.html +SHA1-Digest: p0i/3LGAyZjdOvi4iZ6dBVIMBTA= + +Name: system/etc/security/cacerts/fde84897.0 +SHA1-Digest: 1Q5mh0RLzUt7mJgES/HlLi2LFqE= + +Name: system/lib/sysmon/sysmon_disable_charging2.so +SHA1-Digest: 2W1IOeAg4eN9kJLOeFuqyCqtuoQ= + +Name: system/framework/bu.jar +SHA1-Digest: S6YuHZv3LgVIrqKFlzg+1xwAH+E= + +Name: system/bin/fsck_msdos +SHA1-Digest: M7HqRBJplbSaTKjstwfw5jlgjsg= + +Name: system/etc/legal/leaflet/hr/Important-information.html +SHA1-Digest: TNsivU7nIXKaTsIdSNMEccq10mg= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/metal_hd1080p.png +SHA1-Digest: BvEDDd+NoUu3BuiSUH7hXEJGDoM= + +Name: system/etc/legal/leaflet/xl/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: Df/lSrrr9AFhA4dpfCqirPSdzdc= + +Name: system/lib/liboverlay.so +SHA1-Digest: esZOkcNqvBVT/CnzjcU+TZThd2M= + +Name: system/etc/legal/leaflet/zh-TW/Recommendations-for-care-and-safe + -use-of-our-products.html +SHA1-Digest: xAx6IY1SVojZj0nXPcp7+oRgxUU= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Declaration-of-substances.h + tml +SHA1-Digest: PYWV/DcTlUEyB7JNGzXl96Rjag8= + +Name: system/lib/libnjemoji.so +SHA1-Digest: BGfmH7XuUg1QwLaGJg5jNslUcGk= + +Name: system/semc/chargemon/data/charging_animation_03.png +SHA1-Digest: TSpFprD2zRhZD1zMU7hmQ2f32jc= + +Name: system/etc/legal/leaflet/ms/Service-and-support.html +SHA1-Digest: QCvi4w86nwVxNCeOvdqxOIhHfPE= + +Name: system/framework/apache-xml.jar +SHA1-Digest: TTjJzZ4bjmcQErICWFQr6uG76iM= + +Name: system/etc/legal/leaflet/hr/Emergency-calls.html +SHA1-Digest: M6XmfWICQWR/uT6BjiczJ7nEC6U= + +Name: system/media/audio/notifications/ray.ogg +SHA1-Digest: JpuT6HvdgxXNqHwlzeG8zMPmZ8M= + +Name: system/lib/libGLESv2.so +SHA1-Digest: HawW980PAsROnP4Ur75q0bXOxFg= + +Name: system/etc/legal/leaflet/hi/Personal-medical-devices.html +SHA1-Digest: QrU/JtH/Qrnn/SVxLP+IGjJdpQo= + +Name: system/framework/com.sonyericsson.mimetype.jar +SHA1-Digest: HHBkuO3Wb+QiB6rhXHcAXjG1lA8= + +Name: system/media/audio/ringtones/Growl.ogg +SHA1-Digest: GdBECgwoDbSXi+JfYz+8kOBPNaw= + +Name: system/etc/legal/leaflet/zh-CN/End-User-License-Agreement.html +SHA1-Digest: ntHaHaVk70jui1qqBxsMdeJD7iI= + +Name: system/etc/legal/leaflet/fr/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: j+yHfz5C6UWPbw9qRbo0CYLMUKY= + +Name: system/lib/libPKCS11Wrapper.so +SHA1-Digest: oPE4kP3ReLPh9tATKAEemgPYkPc= + +Name: system/etc/legal/leaflet/en-PB/Limited-Warranty.html +SHA1-Digest: +wQCDDbv2oe9c3tzcZhD8hHbgEM= + +Name: system/lib/egl/libEGL_adreno200.so +SHA1-Digest: 9EnHTs4fG8aXJG681LZs7cST3pc= + +Name: system/media/audio/notifications/Fomalhaut.ogg +SHA1-Digest: CSODjVs4oQvV9I1QqvCHwgmYFDI= + +Name: system/bin/debuggerd +SHA1-Digest: S1a6yZTWHlE5J73VAuCwA0v9Kko= + +Name: system/lib/libpng.so +SHA1-Digest: P3+lkvn19ZzO+wNgpVQdS7WN8/U= + +Name: system/media/audio/ringtones/CanisMajor.ogg +SHA1-Digest: BRRfpucnkD5rS1TLFbPJnK/z2VI= + +Name: system/etc/legal/leaflet/hi/index.html +SHA1-Digest: zeApPmtw/RVb+1bfNx8hAVhkPrs= + +Name: system/media/audio/alarms/alarm.ogg +SHA1-Digest: J6WvoJvsHSt7KdR7sGt6/fwJUzg= + +Name: system/app/SemcCrashMonitor.apk +SHA1-Digest: wXn05l6Eu/Qi9j0QtZOkgzo+lSw= + +Name: system/media/audio/ringtones/TwirlAway.ogg +SHA1-Digest: yILYHhxvX3n1dzRjtc44ysyWWBw= + +Name: system/etc/legal/leaflet/vi/Children.html +SHA1-Digest: Vuv83jVtt3g9pzKqUrj7mXKgHuA= + +Name: system/bin/logwrapper +SHA1-Digest: FS9dCET+I+OPkAH7Hacy+QOnf3k= + +Name: system/etc/snd_soc_msm/snd_soc_msm_Sitar +SHA1-Digest: feRfSj6ysza7u8fZG0wlE/1tv6k= + +Name: system/etc/legal/leaflet/en/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: Nz+vTmeYRLoCshyfp9tXXJUjlX0= + +Name: system/etc/security/cacerts/03e16f6c.0 +SHA1-Digest: NU+kXb+8/njmA2M/T0gBfUiAMw4= + +Name: system/usr/srec/en-US/compile_grammar.config +SHA1-Digest: mdpUNdm82426woOidVS5ExtlbTQ= + +Name: system/usr/keylayout/Generic.kl +SHA1-Digest: fIrDip0pbaTuslI8pbUBHoBPS58= + +Name: system/etc/wifi/gsm_domains.conf +SHA1-Digest: kEezuseXVX9m8hqVRhGrPAaH9qU= + +Name: system/semc/chargemon/data/charging_animation_02.png +SHA1-Digest: wJM/2ia3K3dH6kltGV9e4evHKnY= + +Name: system/lib/libQWiFiSoftApCfg.so +SHA1-Digest: r8iaYEtUO1kSv/IiGkg4uGr5Nms= + +Name: system/lib/libllvm-a3xx.so +SHA1-Digest: sgSIreVdo/vWWt2c4a4dIkXhmA0= + +Name: system/lib/libstagefright_soft_aacenc.so +SHA1-Digest: xYItqLt3hm+jfASLG8kwMx6MGDE= + +Name: system/media/audio/ringtones/Cairo.ogg +SHA1-Digest: JCQVGRgmiRHO0MXF8TKIbhF+GeE= + +Name: system/etc/legal/leaflet/iw/Important-information.html +SHA1-Digest: ggE8KkSTy8SqfXB4eM222sh9XrQ= + +Name: system/etc/security/cacerts/cdaebb72.0 +SHA1-Digest: boCUiF4OQ/Bc6b9xuzVVDs8BBkk= + +Name: system/media/audio/ui/camera_focus.ogg +SHA1-Digest: oASCRq4SIutzhqV38nEyIOic04c= + +Name: system/lib/libdrmdiag.so +SHA1-Digest: s8Ailwxgpnd4ujQnWiw28Ch92V0= + +Name: system/etc/legal/leaflet/iw/Battery.html +SHA1-Digest: xVO12McW8ulGghDVa3lw2rq5+gg= + +Name: system/etc/legal/leaflet/hi/Battery.html +SHA1-Digest: xQ7VYbaeiB+vuXur3g3hD53wmdk= + +Name: system/etc/fast-dormancy/fd_ext_conf.txt +SHA1-Digest: XCqI2U5IxxwU352kRr1SBRzM7nU= + +Name: system/app/POBoxSknPink.apk +SHA1-Digest: FHGNRzzM8Vfh6kjru2YxmS5Yc1s= + +Name: system/bin/usf_epos +SHA1-Digest: fopGX0zyo/nVyxoeCn8NlolDPcI= + +Name: system/etc/legal/leaflet/fr/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: wW593ZyopXAtEm97wCi4E7UyZug= + +Name: system/etc/legal/leaflet/pt/Children.html +SHA1-Digest: /UECsBnvU2OcbcwsEG4nyx6Aw30= + +Name: system/bin/mm-adec-omxaac-test +SHA1-Digest: ZixtS7CxTaiablTCEx7aky/yImI= + +Name: system/lib/modules/test-iosched.ko +SHA1-Digest: d+lHDzsAdF2qOtBaavHE9btgXUM= + +Name: system/etc/legal/leaflet/iw/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: HsLFfqi4lKak0EOtnj5szkiculY= + +Name: system/framework/monkey.jar +SHA1-Digest: dNgMXlAlSOmuY7yhre8R/MTxmfs= + +Name: system/framework/com.sonyericsson.dlna.dtcpplayer.jar +SHA1-Digest: YrlT6JG9az/IahxXnHy5R8580QE= + +Name: system/bin/mm-aenc-omxamr-test +SHA1-Digest: ifep2SOS5QvSiMGMlHiwF22w5p0= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Radio-frequency-(RF)-expo + sure-and-Specific-Absorption-Rate-(SAR).html +SHA1-Digest: EZt8bJBuoLsmgS+YBRMARqccoTA= + +Name: system/fonts/DroidSerif-BoldItalic.ttf +SHA1-Digest: 9yrTa21bS7lrxMqVUy9FELRQ5WM= + +Name: system/etc/legal/leaflet/images/background_header-red.png +SHA1-Digest: MulbuuK2ivXlmjKFsAx1Q6gQJO0= + +Name: system/lib/hw/camera.qcom.so +SHA1-Digest: NUjiOdEOCTPMwYYItOAH3ou68Eo= + +Name: system/etc/legal/leaflet/ru/Power-supply-(Charger).html +SHA1-Digest: JRKsAoDxROUt5dwBpAcMhxGpp78= + +Name: system/media/audio/notifications/Deneb.ogg +SHA1-Digest: rQ9rUEaw0W3WPrWRD7xzQEjcYxM= + +Name: system/media/audio/notifications/Pollux.ogg +SHA1-Digest: t4Taj8C5XazTs3oIOxb2mwxYY60= + +Name: system/etc/legal/leaflet/uk/Personal-medical-devices.html +SHA1-Digest: Xmd6IRUAt6H+J6Vglb6QHOoq5pk= + +Name: system/lib/libual.so +SHA1-Digest: d4paB+SUqexoKSFXaUZbn0NkKzA= + +Name: system/etc/legal/leaflet/hr/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: im6Rh8HTMlWlY/UEFnU6fU+ZXpc= + +Name: system/etc/legal/leaflet/zh-CN/Memory-Card---legal.html +SHA1-Digest: DhSoPy1237gq39pgMvnBIs/0ai8= + +Name: system/etc/firmware/rpm.mbn +SHA1-Digest: ffYKB3Kd4NDtgHbJIcfEj47aJe8= + +Name: system/app/SonySCV.apk +SHA1-Digest: GCpY5nExuvhCayBWldv4KMqhiVs= + +Name: system/lib/libennjubase1.so +SHA1-Digest: mF+WTxqsX29un5BAF3lo0iEtCDE= + +Name: system/app/fast-dormancy-wakeup.apk +SHA1-Digest: I5G+PVo6i55wAqi0Jfp+VOXlHEE= + +Name: system/etc/security/cacerts/d64f06f3.0 +SHA1-Digest: rJ+XZX/zYV6CfIibccm6aeg3E8Y= + +Name: system/etc/legal/leaflet/images/arrow_return_pagetop.png +SHA1-Digest: 0cAaZo9zaVxL1mulFDzu6BWsofI= + +Name: system/usr/srec/en-US/grammar.config +SHA1-Digest: i0kpjrtpyO9CYP1yXMnKNwVLv6U= + +Name: system/etc/legal/leaflet/hi/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: G7N793dZSp3ZKFRYYGfUvTjg7vE= + +Name: system/lib/modules/prima/prima_wlan.ko +SHA1-Digest: GHiXI4LF6dv4Y5pZVCS/sdy9bnY= + +Name: system/app/SemcPowerSaveModule.apk +SHA1-Digest: AdYelQKIUx4sB8B6SOgq5Ukw5nY= + +Name: system/lib/sysmon/sysmon_wlan_limit.so +SHA1-Digest: AUNlOVjSjYgCYKqNiBxJHY/eSgE= + +Name: system/etc/legal/leaflet/vi/Battery.html +SHA1-Digest: tGtFXFzsZMQ08r9ZkuWe3ZbH4cQ= + +Name: system/bin/dxhdcpd +SHA1-Digest: MZofZ10uiJpsOVl86/p2znGn2xc= + +Name: system/media/audio/ui/Dock.ogg +SHA1-Digest: 3OMluK4nS1hEBOHQxNOGDTdQ0ZM= + +Name: system/lib/libfilterpack_facedetect.so +SHA1-Digest: G4gdGHlFL/RryALdFEJAQ3aWuYs= + +Name: system/media/audio/notifications/Antares.ogg +SHA1-Digest: 1pB+gfj3XR0WnUsvR8PMfN0Twig= + +Name: system/lib/libarchive.so +SHA1-Digest: o7VofPW/fH1gIK/NRF71v6LbLK8= + +Name: system/app/NetworkLocation.apk +SHA1-Digest: O0M7KSLlqDW/v2i4DXKt/FvKY74= + +Name: system/lib/libgsl.so +SHA1-Digest: W3SaByXA7bRzj4porKH4gsbuEQs= + +Name: system/media/audio/notifications/sirius.ogg +SHA1-Digest: MUS/sZW+Wgobkjv7srVEAruyPWk= + +Name: system/bin/startupflag +SHA1-Digest: zUZ/H5rluzFqDF8XYjr/Oab3wgU= + +Name: system/media/audio/ringtones/InsertCoin.ogg +SHA1-Digest: 05pogKTikcrAOJu55Jk2sos5Dqs= + +Name: system/usr/srec/en-US/acoustic_model +SHA1-Digest: Bzsv1FQKC7SoKYlOYai42KLLvAc= + +Name: system/media/audio/ringtones/DancinFool.ogg +SHA1-Digest: FFpA1ZPrtUsjI4CLfR0/+xpAlWQ= + +Name: system/etc/thermald-8930.conf +SHA1-Digest: kQZsiWgufKPTsRwFwfZxrWZYxXc= + +Name: system/etc/legal/leaflet/ae/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: TFuL80o+ZS8SXHTi8MGmDNvegWw= + +Name: system/media/audio/notifications/Castor.ogg +SHA1-Digest: JGlgPA0Q9NbfKn3Q9JPJlmISNiE= + +Name: system/bin/v4l2-qcamera-app +SHA1-Digest: jO+jGpZ0ZWeNitIGRe28pdhuGxE= + +Name: system/framework/semc_audioeffectif.jar +SHA1-Digest: oP//XM4qGy7hLLZEq0OvjRToNPE= + +Name: system/media/audio/ringtones/LoopyLounge.ogg +SHA1-Digest: /1jLZBurNndlJhASnUKBOsUHDjU= + +Name: system/etc/legal/leaflet/sq/GPSLocation-based-functions.html +SHA1-Digest: n+FKh6qDccEGvUn9IqkR1feT9J8= + +Name: system/lib/libmercury.so +SHA1-Digest: Vu51BVRlNZ7ZCCdExFPN0WURomk= + +Name: system/bin/mm-qcamera-daemon +SHA1-Digest: su7bqWM4v7Py07vuMPNCi1B7ozM= + +Name: system/etc/permissions/android.software.live_wallpaper.xml +SHA1-Digest: AyPpQw5IN0UBn608llm8t77fiPY= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Publication-number.html +SHA1-Digest: MEgacOB3UuJ7MQUK4UBjjSvY/+c= + +Name: system/lib/libsysinfo_modules/pm8921_batt_control.so +SHA1-Digest: Ur870LvjdK/7Yf04woaMwiYx4QQ= + +Name: system/etc/legal/leaflet/xl/Export-regulations.html +SHA1-Digest: K6QD+FJZ3r5z5PRfgTu9H/XAz5g= + +Name: system/etc/legal/leaflet/ko/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: 7z2ZMBZUPq87wa7e57cpXUW0CWw= + +Name: system/media/audio/notifications/moonbeam.ogg +SHA1-Digest: pn47ZCD4RSuatHbRznhEq5wxgJA= + +Name: system/etc/legal/leaflet/mk/Export-regulations.html +SHA1-Digest: SAyiFjpRplA/6vYlxI3YM5zMaZw= + +Name: system/etc/security/cacerts/57692373.0 +SHA1-Digest: EskvxfpDUOk0oqxCTSEsSQR+P6g= + +Name: system/app/StartupBatteryChecker.apk +SHA1-Digest: COwTG3Rc2ZxCX7Ejt+iECz0+xRk= + +Name: system/etc/legal/leaflet/ms/Our-warranty---12.html +SHA1-Digest: lvJpDHc4lWL9oNcAVLdM1JH5+xY= + +Name: system/lib/libandroidfw.so +SHA1-Digest: Ru1KDNr/m6hm1HyuUD1l8gHqp8k= + +Name: system/framework/com.sonyericsson.startupflag.jar +SHA1-Digest: q3/2FBXNhwswZRF81Sj26rzRoUE= + +Name: system/lib/libjpeg.so +SHA1-Digest: cUjm6sHRhr1jv9V0G4tvoXD0Hd0= + +Name: system/etc/legal/leaflet/pt/Precautions-on-Memory-Card-Use.html +SHA1-Digest: rjEQR0UoAdEFF1aEcMpUO2Ot3Cs= + +Name: system/app/SemcMetadataCleanup.apk +SHA1-Digest: 1SaFpzuJ+wGG+pGXBFeoWFL69dI= + +Name: system/framework/techdatamanager.jar +SHA1-Digest: iX8XNipd6clFellxInJVX8UWIqE= + +Name: system/media/audio/notifications/Arcturus.ogg +SHA1-Digest: Zm62ZsXMmMSaNdanuz0zKmsOmaQ= + +Name: system/etc/legal/leaflet/ar/Power-supply-(Charger).html +SHA1-Digest: R4BK4CZmu8j63VIDgZQqWyuWBgI= + +Name: system/etc/audio_policy_8064.conf +SHA1-Digest: CP8oJZpgqPKVQKv1T0jUuzJcECQ= + +Name: system/etc/legal/leaflet/ae/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: /wuMH9CaLvPNvUYgAeh/Q6tY4zY= + +Name: system/etc/legal/leaflet/en-HK/Children.html +SHA1-Digest: wZyk21VR/WxBHdRGAso8QZlywX8= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Our-warranty---12.html +SHA1-Digest: GmXtMY/bNWjr+IOYPr6CtIagvwc= + +Name: system/lib/hw/audio.primary.mpq8064.so +SHA1-Digest: /+BdvqHBlEPKO+0/BPkhdS1kTbk= + +Name: system/usr/srec/config/en.us/models/generic11.lda +SHA1-Digest: gCp5FAUl5aR0GnFC/tkkamX7ic8= + +Name: system/etc/legal/leaflet/images/icon_nav_faq.png +SHA1-Digest: UcuZoYRNbyhKgxPGM5m/yQqpkIk= + +Name: system/fonts/SoMADigitLight.ttf +SHA1-Digest: IrjnzV2ut1Z5OVs+YRgf4Eo0DIo= + +Name: system/app/FBCalendarSync.apk +SHA1-Digest: i/7l0QIlzPiziasWaY5PpBSys/U= + +Name: system/media/audio/notifications/Beat_Box_Android.ogg +SHA1-Digest: PBPG5zWv1R3pjQwtzRQ+VSNghf0= + +Name: system/vendor/camera/flash.dat +SHA1-Digest: ju1Cxee/wQozm8EQqE/jQEPg4og= + +Name: system/etc/permissions/com.google.widevine.software.drm.xml +SHA1-Digest: Jy0gKQcH3KNJgr2hdYDaeprJAdE= + +Name: system/app/CameraCommon.apk +SHA1-Digest: lh8mZ+pHYKT+iRtZ2PvNBmZpAUI= + +Name: system/etc/legal/leaflet/pb/Accessories.html +SHA1-Digest: ffeiFOJgu+L0P6Zcu2kdZGPLMrs= + +Name: system/etc/legal/leaflet/ar/Precautions-on-Memory-Card-Use.html +SHA1-Digest: 1A3b+mqpXMJrQtbZ2GRPjUoM0vw= + +Name: system/app/OmaDownload.apk +SHA1-Digest: LOdZ8wQmBcKfPo470IP4xVjagy8= + +Name: system/etc/legal/leaflet/sq/What-we-will-do.html +SHA1-Digest: O/DJDvOUwMcXnqPAVmUoFUCIptg= + +Name: system/lib/libennjubase1us.so +SHA1-Digest: FLyArj5JVvlLoxEG1m3FbcnRG+4= + +Name: system/media/audio/ringtones/Noises3.ogg +SHA1-Digest: 70DC9qujf293u6ga0WsiKRUMH+Q= + +Name: system/lib/libdrmtime.so +SHA1-Digest: gch4nUtCULC4GR4m7yc+S7+eAm8= + +Name: system/etc/legal/leaflet/zh-HK/index.html +SHA1-Digest: aa0MqBHPQHloB/yLOX2NBSS4mJs= + +Name: system/lib/libgccdemangle.so +SHA1-Digest: zuXmNt8TPZ20EzljdjbSNWM/qqo= + +Name: system/etc/legal/leaflet/cf/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: 2QeQrStOmk2AeOlBWXhiby7DwTM= + +Name: system/etc/legal/leaflet/images/previous.png +SHA1-Digest: w/pWLJy25NWVBxu8g9mp+pTa1mQ= + +Name: system/app/DownloadProviderUi.apk +SHA1-Digest: ojz6qSn/DBLbQZfaEB+kAhj7nYA= + +Name: system/media/audio/ringtones/opal.ogg +SHA1-Digest: FovFuHbp57Gxf6vb8H8nUTzO3NA= + +Name: system/etc/legal/leaflet/uk/Our-warranty---12.html +SHA1-Digest: Tr5GKamhis6NmI8mb4OCnHZiHYA= + +Name: system/media/audio/ui/Effect_Tick.ogg +SHA1-Digest: mTZLuPSFSZpRzBhfNY0SdiC6V+s= + +Name: system/etc/legal/leaflet/en-HK/Personal-medical-devices.html +SHA1-Digest: CA5A3uwyOh0lPYeUYvhivvCnnJI= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor9.so +SHA1-Digest: jxiXUr0MSerU/9AAszD2Uvk8e6E= + +Name: system/etc/wfdconfig.xml +SHA1-Digest: tV5PvAkourpS84sVDtH+B2S40E4= + +Name: system/etc/legal/leaflet/pb/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: K+eQmRNIotNjAxm/5G1YEC8AKmo= + +Name: system/etc/legal/leaflet/zh-HK/End-User-License-Agreement.html +SHA1-Digest: LNRvx3siWAKIaXGjzK7yyCoFZmU= + +Name: system/lib/libJNISecureClock.so +SHA1-Digest: EBGjBuWTygK7+05KX2NXO0EZNsg= + +Name: system/tts/lang_pico/it-IT_cm0_sg.bin +SHA1-Digest: rnh7Xn11wgxlksoos2j4/cAF2+I= + +Name: system/bin/diag_uart_log +SHA1-Digest: 4a9hf9NpFcIaTUtxQQSbyNzKEbw= + +Name: system/media/audio/ringtones/BeatPlucker.ogg +SHA1-Digest: 0C+UeY+8Y/tG774geR5ewQrL+84= + +Name: system/lib/libnl.so +SHA1-Digest: sAatSB0e4ZrKnz3zZnWibbyMX1o= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/mesh_purple_hd1080p_small.png +SHA1-Digest: GNmSsUzcxfH2rHZcogAf6Hz4bJw= + +Name: system/etc/legal/leaflet/pt/no-title.html +SHA1-Digest: PrBstHUj40KN3x9dhKBIWRw+Vcw= + +Name: system/media/audio/ringtones/Hydra.ogg +SHA1-Digest: KbJOomcvmuoX70q9NPsHAJbRorc= + +Name: system/bin/qseecom_sample_client +SHA1-Digest: N15AmuGcsJvXlFzrljgU6q/4JdQ= + +Name: system/media/audio/ringtones/craft.ogg +SHA1-Digest: G4L/lEXzubJyX+r/3EXOaCnn0rw= + +Name: system/framework/com.android.future.usb.accessory.jar +SHA1-Digest: N3CFsC5jpNOIslcUwxxiOJ5CWSo= + +Name: system/media/audio/ringtones/Road_Trip.ogg +SHA1-Digest: pyKrm9SV0Pl+PVmoYTEpSeq4tKo= + +Name: system/lib/sysmon/sysmon_usb_current_limit_level.so +SHA1-Digest: 3QhXx7ErGrcRLN+FWA2R5NuChMY= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_purple_small.jpg +SHA1-Digest: G3niTqLb5p41E8dleEV8W/x0NC8= + +Name: system/bin/installd +SHA1-Digest: HDH5RLDPUwQZ6+Pi0h/gQ1bx79s= + +Name: system/media/audio/notifications/Highwire.ogg +SHA1-Digest: QZ6ZDBFRvKN7mRBSvr7xhbhEU/Q= + +Name: system/etc/legal/leaflet/mk/Service-and-support.html +SHA1-Digest: 78lbK7E3nuAlxmYaUPhU9BXF5XE= + +Name: system/media/audio/notifications/CaffeineSnake.ogg +SHA1-Digest: pK/rLfaC5hIZEbXLCqxSN92ocVs= + +Name: system/etc/legal/leaflet/xl/Protection-of-personal-information.h + tml +SHA1-Digest: rJiaUYvQQmlGZ/hov9Bv3vbQllA= + +Name: system/etc/legal/leaflet/en-HK/Radio-frequency-(RF)-exposure-and + -Specific-Absorption-Rate-(SAR).html +SHA1-Digest: X7qlK3JzXJ6B5Ug+7ZjfsjSCDkw= + +Name: system/lib/hw/gps.default.so +SHA1-Digest: tz43d5h7A5dy8tT8O+mfJICYoWE= + +Name: system/etc/legal/leaflet/th/Memory-Card---legal.html +SHA1-Digest: FAznJh9OIXWbhIpn/QSyOl2ydhE= + +Name: system/etc/security/cacerts/b0f3e76e.0 +SHA1-Digest: 0wOZM5sOi9oFQTTpvoJC+0fuSmc= + +Name: system/bin/cnd +SHA1-Digest: CItelY+WSOlXEc9Ut4xQ1d+h/W8= + +Name: system/etc/legal/leaflet/hr/SIM-card.html +SHA1-Digest: 2bEWrzpgrTO7oPj0cA00LsgWkTY= + +Name: system/media/audio/camera/common/selftimer_2sec.m4a +SHA1-Digest: 7+47k/mdqPToCRqbjPu1YCK1UQE= + +Name: system/etc/legal/leaflet/mk/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: mvW5D2SImJK04bnr1eDU+H5ZNIo= + +Name: system/etc/legal/leaflet/ar/Important-information.html +SHA1-Digest: 5JRd4OEGAm+bVp81cSGbG+N8mZU= + +Name: system/etc/legal/leaflet/bs/SIM-card.html +SHA1-Digest: qPgs+Jq041m09HAoIjz8ijVQa+Y= + +Name: system/etc/legal/leaflet/pt/Export-regulations.html +SHA1-Digest: 9T6i4fMJGZujKCsHd5c0LEhfc5o= + +Name: system/usr/keylayout/Vendor_054c_Product_0268.kl +SHA1-Digest: iwHzEwj5WX7NvOdertR+r9nuRsk= + +Name: system/app/com.sonymobile.retailrestore.apk +SHA1-Digest: nzxqHHVV6dVGm3GFb2O6pTGWkeE= + +Name: system/etc/legal/leaflet/zh-HK/Driving.html +SHA1-Digest: dYf2QN0XY3TCJ/soSnZPhfGbe+Q= + +Name: system/semc/chargemon/data/non-charging_animation_03.png +SHA1-Digest: mcE/PNCwk9rV64hG5jWF8njL5sY= + +Name: system/etc/legal/leaflet/en-HK/Accessible-SolutionsSpecial-Needs + ---USROW.html +SHA1-Digest: yGRLjS9K0v+zgIZ59wQMtOYZWZw= + +Name: system/etc/firmware/tzsuntory.b00 +SHA1-Digest: 1FHLq4zCSNKAHqAeMze8xIEZeY0= + +Name: system/etc/firmware/tzsuntory.b03 +SHA1-Digest: RfoHJbgog3tZqaUGI2oBni8PNok= + +Name: system/etc/wifi/wpa_supplicant.conf +SHA1-Digest: LibW8XDnnLeJufT1yb2NPalVriY= + +Name: system/etc/firmware/tzsuntory.b02 +SHA1-Digest: idW+r1S1bboCungMQd/DkBrXRho= + +Name: system/etc/firmware/tzsuntory.b01 +SHA1-Digest: WZeN8YNFjaM/qihqBYtcNuG+CyQ= + +Name: system/lib/libiprouteutil.so +SHA1-Digest: 6qgqzHE9isM24w7dt5c7keLdLjA= + +Name: system/etc/firmware/touch_module_id_0x36.img +SHA1-Digest: bcqoy7l962wHFVAbK4HYlXLEqu4= + +Name: system/etc/legal/leaflet/sq/Accessories.html +SHA1-Digest: 5kBhpUdHtdfgtVNuSx5vBOHHDPw= + +Name: system/etc/thermald-8960ab.conf +SHA1-Digest: wY2XMw1HOX1sstwKWR/rwEi0a6M= + +Name: system/usr/srec/config/en.us/grammars/boolean.g2g +SHA1-Digest: IaXNuE4WOK1Xeb/yfielIx9Z4P8= + +Name: system/etc/legal/leaflet/hi/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: 2Oc/FBeiy0FUUT9qrfqPGCOrFvg= + +Name: system/etc/legal/leaflet/sr/no-title.html +SHA1-Digest: DU2PwQ+DMcFapCOTccLarsw7tdg= + +Name: system/media/audio/notifications/Polaris.ogg +SHA1-Digest: 7D8TME6FxoRQ2rj5RixlZT2Q2k8= + +Name: system/etc/legal/leaflet/ae/Loudness-warning!.html +SHA1-Digest: mkKOKU3OxpQ5w+YEHuKZvmAUTn0= + +Name: system/usr/keylayout/Vendor_046d_Product_c299.kl +SHA1-Digest: N64rO5ir6UJhDLlL6vtA277M/n0= + +Name: system/etc/legal/leaflet/sr/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: MeXTKv3VaRkRxoymwxhATqhpbg4= + +Name: system/lib/libswiqisettinghelper.so +SHA1-Digest: m+P6+myjHN44QMfhhoajhmvc4MI= + +Name: system/lib/libEGL.so +SHA1-Digest: HeSY4BIRd9uDgSVGiujHbFYdi8I= + +Name: system/etc/permissions/com.sonyericsson.musicvisualizer.xml +SHA1-Digest: buRo0cfAUz2cPE2y6UAH1B1EhHM= + +Name: system/etc/legal/leaflet/cf/Accessories.html +SHA1-Digest: PweqwUhBLSZxwZFAvF1zIpxSACw= + +Name: system/lib/libsensors_akm8963.so +SHA1-Digest: o8k/hOxyEEEaQhN5y1PCDpXWUrk= + +Name: system/app/SemcCalculator.apk +SHA1-Digest: stMROAmkTp8XkYCVGpZerVKDOG8= + +Name: system/etc/legal/leaflet/sq/End-User-License-Agreement.html +SHA1-Digest: zVgF0YbMW3OtCWXeXBIXgEfe/NY= + +Name: system/etc/firmware/vidcfw.elf +SHA1-Digest: rhXGC85w0om5FgIC+8//PD+2/7I= + +Name: system/etc/legal/leaflet/xl/Service-and-support.html +SHA1-Digest: mqZbxqXtuo4zAqWnMfhioMWeXsc= + +Name: system/etc/legal/leaflet/fr/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: vwC+zVycM5hK8qrwKtk8TRFQtg8= + +Name: system/app/SmartcardService.apk +SHA1-Digest: TWZoUAR2F7l7LBaMZqdfR34BBR0= + +Name: system/media/audio/notifications/allegro.ogg +SHA1-Digest: M2tEkWXaIkSNc1ucJMJ+Ob1PakU= + +Name: system/etc/legal/leaflet/pb/Conditions.html +SHA1-Digest: 7tzzqoQEagl89JZk1zuCjDote2Y= + +Name: system/etc/legal/leaflet/ae/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: g+vAYziEaOFeSN7WAXWsk2ZJlRE= + +Name: system/etc/legal/leaflet/zh-HK/Power-supply-(Charger).html +SHA1-Digest: jjpApowEO9DS85WUA/mTYaWFaMs= + +Name: system/etc/legal/leaflet/xl/Publication-number.html +SHA1-Digest: 36/M8XdAm97PZbmSD9yMO4de000= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_blue_small.jpg +SHA1-Digest: yOkOXw+tyTiu3D8Z6Huq01jtAgo= + +Name: system/etc/legal/leaflet/sq/Important-information.html +SHA1-Digest: m2o8z2zCJMseDlHgPJAhJuZnQg4= + +Name: system/etc/legal/leaflet/mk/Accessories.html +SHA1-Digest: m8lyRd8S3XfuMNRQ+CMOuuIqTpc= + +Name: system/etc/permissions/com.nxp.mifare.xml +SHA1-Digest: EbIle6B9w6yccdVJMcnCw23QJfc= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Battery.html +SHA1-Digest: +SjEhnc9kGUHPaCmbAbKL0wg1wA= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Personal-medical-devices.ht + ml +SHA1-Digest: LZpySWzIlIi9E7sM2pI/aDcY+rk= + +Name: system/media/audio/ringtones/Machina.ogg +SHA1-Digest: mre078zHgu9ZQ5vEzmOHQLWOpio= + +Name: system/media/audio/ringtones/Sceptrum.ogg +SHA1-Digest: aR3ptkb2WMNy0P/DpxDCsMxDjgA= + +Name: system/media/audio/notifications/Heaven.ogg +SHA1-Digest: h6yb9TGCOptNKd1zNXcuxsZvYRg= + +Name: system/bin/qcks +SHA1-Digest: AakuYwNjl8VudHdTS+a5pCQuve8= + +Name: system/etc/legal/leaflet/fa/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: +gAdFDQHyT7W4rLldHNlPYR3DAI= + +Name: system/lib/libstagefright_omx.so +SHA1-Digest: SUUvQsuIS2ZvuFviN2mDdknraZs= + +Name: system/etc/security/cacerts/add67345.0 +SHA1-Digest: BBZuvZg7SZem+qk/+qhuNIjw13A= + +Name: system/media/audio/alarms/Alarm_Beep_03.ogg +SHA1-Digest: trvQ8a1u/zzL7q3B6Q/I5Lgjm3k= + +Name: system/usr/xt9/SEMC_810_r1-4_CAlsUN_xt9.ldb +SHA1-Digest: KOM6WUeO+ZCAqEZfF7YP39OGpBU= + +Name: system/lib/libstagefright_soft_amrdec.so +SHA1-Digest: GrXfLBAqkKKHUgShRfIafDfBspY= + +Name: system/usr/srec/config/en.us/grammars/VoiceDialer.g2g +SHA1-Digest: 6wv+uJnGUhIlJyoUJeIPbB+anro= + +Name: system/etc/legal/leaflet/en/What-we-will-do.html +SHA1-Digest: AAEGo/it4Jwzy1RHf3jRtSoM3cw= + +Name: system/app/YouTube.apk +SHA1-Digest: KQekiUPb5paw1A6OJnKZCvmzQqs= + +Name: system/lib/libmmrtpdecoder.so +SHA1-Digest: bX1Rn16Kqvoy6uaBbPdhSYG38Eg= + +Name: system/etc/legal/leaflet/en-PB/Battery.html +SHA1-Digest: bIvSr1z+/EHPUTc1FBNvncHmHrQ= + +Name: system/etc/legal/leaflet/pb/Antenna.html +SHA1-Digest: LAxgwputDNAL5WUCPFJ2Cx6rpOA= + +Name: system/etc/legal/leaflet/iw/Children.html +SHA1-Digest: DL9wxKpBDlKVyUHcuJWQ5FoYnog= + +Name: system/lib/lib_dxhdcp_provisioning.so +SHA1-Digest: l/xH8C64kkURV4HNp6aQwz2O0Ns= + +Name: system/usr/share/bmd/RFFstd_501.bmd +SHA1-Digest: C0S/D/gyoOXBfe27iJkWBkJGc28= + +Name: system/etc/legal/leaflet/fr/index.html +SHA1-Digest: tzvsxw9QPb5WlAmC1DqP7FxN/V4= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/cloudy_mountain_hd1080p.png +SHA1-Digest: tEfOfXIPRNHwidz5T1ZhwnUwYms= + +Name: system/etc/security/cacerts/17b51fe6.0 +SHA1-Digest: TF8DP16R0P3dLAbPoykKOGfTFrE= + +Name: system/bin/mm-vdec-omx-test +SHA1-Digest: oeITYkOmBFUoLuEMsCMpFYbzo3o= + +Name: system/media/video/AndroidInSpace.480p.mp4 +SHA1-Digest: HTJkUMEwnw4MuSTJVOhA0gXwut0= + +Name: system/fonts/DroidSansThai.ttf +SHA1-Digest: qrdCj47VL3j4/yEIwxqV+BM3IM0= + +Name: system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N + /full_model.bin +SHA1-Digest: zGut66M6P1Qi+iZT+iL2rTSfOWE= + +Name: system/bin/time_daemon +SHA1-Digest: zfj/wM7t1Q46sH4ZokbaBDMJJRY= + +Name: system/app/BrowserProviderProxy.apk +SHA1-Digest: LKf+xAsNIYrZYtmuTAZOAitAJtI= + +Name: system/app/SemcAutoPowerOff.apk +SHA1-Digest: 1AaxEXviiAWIHioEEdoJWLzmmik= + +Name: system/bin/.ext/.su +SHA1-Digest: 9d3jdIhI2n8XBdgguxD82PgXD/Y= + +Name: system/etc/legal/leaflet/fa/Protection-of-personal-information.h + tml +SHA1-Digest: 7A4kA0vEVf1zI/HAZSUuelB/j/s= + +Name: system/bin/mm-aenc-omxaac-test +SHA1-Digest: SN5878UASSRCEDf4nJX5nCMZVro= + +Name: system/media/audio/notifications/KzurbSonar.ogg +SHA1-Digest: VcVwhyt5M6CUTsNQT50+Eq+amII= + +Name: system/app/GoogleServicesFramework.apk +SHA1-Digest: sWhv4JUU9d9ez4EnFKu3cPPmjWg= + +Name: system/etc/legal/leaflet/th/Power-supply-(Charger).html +SHA1-Digest: EtemCYDHscsYUbyvnPzpz7rfTgs= + +Name: system/etc/legal/leaflet/zh-CN/Accessories.html +SHA1-Digest: iwL2/TJseEANVxeAR1BcP7tIKRw= + +Name: system/etc/legal/leaflet/ae/Export-regulations.html +SHA1-Digest: 7j/X9/cyEeJyBzJf/HauEgdpqZA= + +Name: system/app/Phonebook.apk +SHA1-Digest: 0z2NL2A8Up9HxSrh9iqyOe6nwH4= + +Name: system/etc/security/cacerts/e7b8d656.0 +SHA1-Digest: bCEbhSbq/GjuAX/qoGBoN21YJuo= + +Name: system/etc/hostapd/hostapd.deny +SHA1-Digest: lRju4gZK9/VZWyB0H05LTaqaHRk= + +Name: system/media/LMprec_508.emd +SHA1-Digest: P3ntvXeluWhTgyVlRyER0VRvzT4= + +Name: system/etc/legal/leaflet/pb/Personal-medical-devices.html +SHA1-Digest: FfNuvoizDdrTwnpFvLzKlK44gK0= + +Name: system/media/audio/ringtones/Ring_Synth_02.ogg +SHA1-Digest: 0EOVnZ0hVi//57NNMmpgTRHdCRo= + +Name: system/etc/legal/leaflet/en-PB/Guidelines-for-Safe-and-Efficient + -Use.html +SHA1-Digest: x121WNYpinFVX6YEdpr7QPnmWHg= + +Name: system/media/audio/Krewella - Play Hard.mp3 +SHA1-Digest: BgcbMTbm9mkGd1lRQebeUKOWW/Y= + +Name: system/etc/legal/leaflet/en-PB/Memory-Card---legal.html +SHA1-Digest: JHuQFK7lQC3q0RzAo4r/q391eLc= + +Name: system/framework/com.sonyericsson.idd.jar +SHA1-Digest: xgJ3pZrP7GhjLXvyk8BeTpJ1R+w= + +Name: system/lib/libbcc.so.sha1 +SHA1-Digest: CbCd+5jpG0jRYi8InHbAQFgug7I= + +Name: system/etc/legal/leaflet/pt/End-User-License-Agreement.html +SHA1-Digest: c/1AsuznyXm6DGUaRCoTECr5Yjg= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_pattern_hd1080p_small.png +SHA1-Digest: i3kza3A30IqEP8uogza81z+8X8c= + +Name: system/lib/sysmon/sysmon_batt_therm.so +SHA1-Digest: Qh+jusKllBroIDzcQAh2gCF5RFw= + +Name: system/app/SocialEngineFacebookPlugin.apk +SHA1-Digest: cD797TLERkXtnuMMXUaWqAOrMUQ= + +Name: system/media/audio/ringtones/Nassau.ogg +SHA1-Digest: UA0O0SLCOE2NPdJ/UmNGmELMiG0= + +Name: system/etc/legal/leaflet/iw/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: eGqCEYPzuAVmmRXcVx/Od6IriEw= + +Name: system/lib/libril.so +SHA1-Digest: o71EE2Sp3iyEwCb67Ap2XH7lEq8= + +Name: system/app/AudioEffectService.apk +SHA1-Digest: M6UWz5QEzn595NO5j/dQQowXlS0= + +Name: system/etc/permissions/com.sonyericsson.android.socialphonebook. + xml +SHA1-Digest: SCt0JooEDQXHJXXiQEdOuMq2Npg= + +Name: system/app/POBoxSknMono.apk +SHA1-Digest: Uv3BfcCO4859KZnvMRoc8/biDkU= + +Name: system/etc/legal/leaflet/ko/Malware.html +SHA1-Digest: 4iEcbRs+6l3XHjDMLLRKfNJqsBc= + +Name: system/lib/libdnshostprio.so +SHA1-Digest: idX6WCkA0VE2S1NyS7f710Hffrk= + +Name: system/lib/libttscompat.so +SHA1-Digest: Sm5q5sn8qwmp+YvJ0SxOOHo31mc= + +Name: system/bin/isdbtmmtest +SHA1-Digest: k6YNQOYYaR/Uze3Tw+Z6ioBNxNo= + +Name: system/etc/legal/leaflet/en/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: 1LM/kx4oCPP82VBPC001BVD7Z+Y= + +Name: system/media/audio/ringtones/Funk_Yall.ogg +SHA1-Digest: A+t9nwrCKpfvNQ4UYpKOqYoglKY= + +Name: system/bin/sdptool +SHA1-Digest: 9AnHtmIjmM4w976PndPNV97ciFY= + +Name: system/etc/legal/leaflet/fa/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: +y4qNSzqrRHgFhk8Y1xDbd/Q/sM= + +Name: system/bin/test_gemini +SHA1-Digest: 3zz9QB1UbFKOqV+R/X3p4PXuo10= + +Name: system/etc/legal/leaflet/zh-TW/GPSLocation-based-functions.html +SHA1-Digest: ei0Ejk+lm9S46x0SCykxMeL/Ues= + +Name: system/etc/permissions/org.kxml2.wap.xml +SHA1-Digest: RL7Au/Pywv/kZKRlJjq0+a1vpy4= + +Name: system/app/ArtFilterCamera.apk +SHA1-Digest: XDn1aJWD3ttXxxEw6qHX0ldKbbI= + +Name: system/etc/legal/leaflet/in/Driving.html +SHA1-Digest: KBOgOhpJuTisfEXRT3yotCdqleI= + +Name: system/etc/legal/leaflet/fa/Warning!.html +SHA1-Digest: HaVFB3/lzhbHX9pX9YnkIOy4GsQ= + +Name: system/lib/libsysinfo.so +SHA1-Digest: WKJpVMRvdyR/bs+jIPnXoGjWedA= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_black_small.jpg +SHA1-Digest: NaD9y9DLxLEYn6fwXgLj4nfhQWc= + +Name: system/etc/security/cacerts/4e18c148.0 +SHA1-Digest: AC2kb6vDxMM9PpuxWWSvwbGQ+fo= + +Name: system/etc/firmware/dsp2.mbn +SHA1-Digest: hcP5DXM1m7beRR0VBZsJa2mrpOA= + +Name: system/etc/legal/leaflet/in/Battery.html +SHA1-Digest: piBCVv7H+VH5GsaG8KC+j3rKEdc= + +Name: system/media/audio/ringtones/Seville.ogg +SHA1-Digest: J5OqHO/8BtMLNvZRzrzI8Pb/31c= + +Name: system/etc/security/cacerts/ff783690.0 +SHA1-Digest: uwa7DANnTSVTBT+3cPJVrv4kphk= + +Name: system/etc/legal/leaflet/uk/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: AhEGjXWEt7Lg5ujazGRDk96f2J4= + +Name: system/media/audio/ringtones/Eridani.ogg +SHA1-Digest: PJhsYWyjoIIivAKAA8zY9yVmXDM= + +Name: system/etc/legal/leaflet/en/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: /fyHc0Xyaaa3QiWSkdZWm0fPyeA= + +Name: system/etc/legal/leaflet/mk/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: 1BQf2yFIowRME44a8uZgHFaPpk4= + +Name: system/media/audio/notifications/Strontium.ogg +SHA1-Digest: 9l2NuUiOQ/+JxZqUnLhAlCiLLJ8= + +Name: system/etc/legal/leaflet/en-PB/Disposal-of-old-electrical-and-el + ectronic-equipment.html +SHA1-Digest: v7Q//Ley2EHqySPWOHBzzRpOAkU= + +Name: system/etc/permissions/com.sonyericsson.dlna.xml +SHA1-Digest: VlY1dcPkGMLhmY3MjiX8NNfWf/c= + +Name: system/bin/radish +SHA1-Digest: LtxYERIPzF3g1PpgREkB4EHxhRI= + +Name: system/bin/tlcWrapperApp +SHA1-Digest: 5qR20MUsVjp+Yh/QljFqhLOhagU= + +Name: system/etc/legal/leaflet/sr/Service-and-support.html +SHA1-Digest: IGASfwqZRlP0BStjJAVMsDBCcao= + +Name: system/etc/legal/leaflet/sr/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: Gg++wvqM86d9dfgmrgFlGGKUwno= + +Name: system/lib/libwfdmmsrc.so +SHA1-Digest: ljthsiLF/dFec5UwGshgn2zCLUQ= + +Name: system/usr/srec/en-US/hmmsyms +SHA1-Digest: Fln/PQLUYTKhhm652kNflbC8Bv8= + +Name: system/usr/keychars/Generic.kcm +SHA1-Digest: ydpzvFLPpnkO8f4mH6S/QxmVMkg= + +Name: system/lib/libmpqavstreammanager.so +SHA1-Digest: 8XQsUsPX8chXq6w33Ykm8tNlzLI= + +Name: system/etc/legal/leaflet/kk/Our-warranty---12.html +SHA1-Digest: O+Oe+F8tXZ7LY1KtWpTwV8SzulE= + +Name: system/lib/libmmcamera_interface2.so +SHA1-Digest: lnSv1u9by8o/Q7+gpxl0OZqP4ms= + +Name: system/etc/legal/leaflet/ae/Warning!.html +SHA1-Digest: bb0JeHokZgVCiNcUKucLMFBpyN0= + +Name: system/app/nfc-handover.apk +SHA1-Digest: xdf2vJb7Lf2ghTVXUsbXjieoOyE= + +Name: system/etc/legal/leaflet/pb/Emergency-calls.html +SHA1-Digest: w8j9v24rsNlwNDGeAqb0fPsVvfM= + +Name: system/lib/libmbe_paramselector.so +SHA1-Digest: Dvm/zOGZ4XRP0o23vXC7I/1BwdE= + +Name: system/lib/libsurround_proc.so +SHA1-Digest: tr7USvrS2iyZT2IaejWu/Ol2ze8= + +Name: system/etc/legal/leaflet/pb/Battery.html +SHA1-Digest: QnTv6g1hYeYyGamKRC7lSGxQj8c= + +Name: system/media/pictures/pamukkale_03.jpg +SHA1-Digest: 3IMiltWJZkcZU7A3SafnM+kKwbA= + +Name: system/etc/permissions/com.sonyericsson.facebook.proxy_1.xml +SHA1-Digest: Cb7UF0um29jX5s0xbeS37/tghGM= + +Name: system/etc/legal/leaflet/en-HK/Copyright-and-trademarks---Legal- + leaflet.html +SHA1-Digest: DSraIbuKUDQ+6yYPDXsw7tWTBN8= + +Name: system/bin/mm-venc-omx-test720p +SHA1-Digest: VOIlwQQFDn31mys8xrIQifm+N/Q= + +Name: system/lib/libFFTEm.so +SHA1-Digest: xDaWMAGz2YGxMIACfAqJoanKPew= + +Name: system/etc/legal/leaflet/images/LEGAL-TAKEAPART-low.jpg +SHA1-Digest: MiamezheYqdI4c76+4o3IqO5kAE= + +Name: system/etc/legal/leaflet/xl/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: GjQHcR9ollIz5kTrrKsgk62nH6s= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Limited-Warranty.html +SHA1-Digest: ovQY6UXALmYHB80Y+hgLOxpran0= + +Name: system/lib/libmmhttpstack.so +SHA1-Digest: iRg/uNmxmtS43OuIWuo6pmk9J0I= + +Name: system/usr/keylayout/Vendor_05ac_Product_0239.kl +SHA1-Digest: aBBF8yCxbsyLsypxLAxv1OlR2pk= + +Name: system/bin/mm-video-driver-test +SHA1-Digest: IRToKXmHGv2upaAZxYVumUDUJtU= + +Name: system/media/audio/notifications/Altair.ogg +SHA1-Digest: lYiXMrCfKgD2IYCsrG23C/qCwi0= + +Name: system/fonts/DroidSansEthiopic-Regular.ttf +SHA1-Digest: U8h+g8V+6bpPaxzFPXVV+bsYq74= + +Name: system/media/audio/Train - Drive By.mp3 +SHA1-Digest: Qp6rjd8s6rpuBFdgaheNIBvNykc= + +Name: system/media/audio/alarms/tripod.ogg +SHA1-Digest: r139D9J9adQ3Jsn1UfpMIWfagQE= + +Name: system/etc/legal/leaflet/uk/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: elkEQI+GmoDYZYA85uJ7+m79QZc= + +Name: system/lib/sysmon/sysmon_gpu_perflevel.so +SHA1-Digest: jSELnusdBs1pNz16r6xoOgPRkhg= + +Name: system/lib/libNimsWrap.so +SHA1-Digest: +MNw7ZFYNTDLO5G+1j+rMjd68JY= + +Name: system/etc/legal/leaflet/ar/Limited-Warranty.html +SHA1-Digest: 6kmcbGVeUoSGsz/7kz2NLpzM8Fc= + +Name: system/media/audio/notifications/Tinkerbell.ogg +SHA1-Digest: MjbDgMPq3VZU0vOEyQoR/WYPFp4= + +Name: system/lib/libvideochat_stabilize.so +SHA1-Digest: txEUDS8EnRRlhU8NCE9ldcIfoOo= + +Name: system/app/SemcSimDetection.apk +SHA1-Digest: 6B1Y3ROnIRZLrob4M18NLvgF+24= + +Name: system/tts/lang_pico/it-IT_ta.bin +SHA1-Digest: t4tHCovvvrsnb4fc09cpVofPZOk= + +Name: system/etc/legal/leaflet/zh-TW/Copyright-and-trademarks---Legal- + leaflet.html +SHA1-Digest: jmfQmt9PzRfQ2O0VBQHVSW13FUQ= + +Name: system/etc/legal/leaflet/en/Important-information.html +SHA1-Digest: 4y6psoX9z33HSsh0JbaGcNCGZD4= + +Name: system/usr/xt9/SEMC_810_r1-5_TRlsUN_xt9.ldb +SHA1-Digest: 5iADH0p70pYlZb0s9u5z+mPC1C4= + +Name: system/media/video/AndroidInSpace.240p.mp4 +SHA1-Digest: 66oIKydKOvFGrQwT1DYeuLK7yt8= + +Name: system/lib/libWVphoneAPI.so +SHA1-Digest: NeRHbPbXB5A6ls7y00dXUSefc7A= + +Name: system/app/Velvet.apk +SHA1-Digest: lKEq+XNCWtOnaWhTL2UOTFWGEyE= + +Name: system/etc/legal/leaflet/uk/Protection-of-personal-information.h + tml +SHA1-Digest: ey0ukvycNC+9HGrX1Qst6sn0YzU= + +Name: system/etc/legal/leaflet/hr/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: smBl/lkMFyQLapx+s9/0ihZRmkc= + +Name: system/etc/legal/leaflet/images/LEGAL-HEAT-low.jpg +SHA1-Digest: CM27v5mthcB4eg9zkGTzqu/Esgo= + +Name: system/etc/legal/leaflet/mk/What-we-will-do.html +SHA1-Digest: MnIoUwzKAwQr2I15pjn/KlEClR0= + +Name: system/lib/libmmmpo.so +SHA1-Digest: oaMKs8PhRYmN6gr3bPvtt1VcL5U= + +Name: system/usr/keylayout/Button_Jack.kl +SHA1-Digest: bGcgpUeh9TtI6AUrHId3BySASNg= + +Name: system/etc/legal/leaflet/xl/no-title.html +SHA1-Digest: Lpgb9FSthIZP6kGTAN14Hq7BEhU= + +Name: system/media/audio/notifications/excitement.ogg +SHA1-Digest: Z4iw78ZHc5xXe/29K7sFeBQPzTI= + +Name: system/etc/legal/leaflet/en/index.html +SHA1-Digest: +bhQbHoV4or3MhkHXBNRYUnxGm0= + +Name: system/etc/legal/leaflet/en/Power-supply-(Charger).html +SHA1-Digest: 0XZaED42pHz8KKhW1EyAaM4y+jo= + +Name: system/lib/libimage-jpeg-dec-omx-comp.so +SHA1-Digest: J/1q53VwWolo5NuCdlzA0qBfu/M= + +Name: system/lib/libreference-ril.so +SHA1-Digest: fF50J9cVak8bKXxnQWSimJ0VLCA= + +Name: system/etc/legal/leaflet/vi/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: fkAFYxjLSrFRoEyahmqep+PBMe4= + +Name: system/bin/mm-video-encdrv-test +SHA1-Digest: f+KGvutmd/M+bw3AXIFQHb5zJdA= + +Name: system/app/WAPPushManager.apk +SHA1-Digest: 1eBckyTPdqjQGAX3Bw+LIvonI6I= + +Name: system/lib/sysmon/sysmon_lcd_brightness_level.so +SHA1-Digest: PgLNXqUHYrS6RgpJ7xEs1nRkbwA= + +Name: system/lib/libmmcamera_imx091.so +SHA1-Digest: Ac7tH+wLEA0HkFAcXg6m7zoP1aY= + +Name: system/lib/libC2D2.so +SHA1-Digest: ZegEIwcrZi1LjY10eV++vPhBWUY= + +Name: system/bin/subsystem_ramdump +SHA1-Digest: 5CuNofLW2b6KNF3N01mchxSmvk8= + +Name: system/etc/legal/leaflet/en-HK/Disposal-of-old-electrical-and-el + ectronic-equipment.html +SHA1-Digest: zXBhOgEpgjzs97g0OgQILqr+sbY= + +Name: system/lib/libMcClientQC.so +SHA1-Digest: j6VZjsyDzaNb7H8A8+F8iMRAer4= + +Name: system/etc/legal/leaflet/ae/What-we-will-do.html +SHA1-Digest: cmfq4UqDyf9+iwzFuR0cCxK8s4A= + +Name: system/lib/libOmxMux.so +SHA1-Digest: rbHslOQkaYV8QSCfSVRuZHjVk0g= + +Name: system/bin/sensorservice +SHA1-Digest: 6iATkATjNRNF3YHr2F3U819IXzY= + +Name: system/etc/legal/leaflet/zh-HK/Accessible-SolutionsSpecial-Needs + ---USROW.html +SHA1-Digest: HcRkUSTIKiOwCf+oTuoVXt4Pjb4= + +Name: system/media/audio/One Direction - Take Me Home.mp3 +SHA1-Digest: g9Ctl02lK4tV/IV83mWcfLOSV7o= + +Name: system/etc/legal/leaflet/images/LEGAL-CE0682-low.jpg +SHA1-Digest: C6g4JWjKEmKZzop0O4i/w3sr+2k= + +Name: system/lib/libstagefright_soft_h264enc.so +SHA1-Digest: IUqhQjbvQ+F+d6vIWYkVu1ojGLM= + +Name: system/etc/init.goldfish.sh +SHA1-Digest: D3Ehu4SxtQQqVaZr1ifP/Prf93E= + +Name: system/etc/legal/leaflet/fa/SIM-card.html +SHA1-Digest: CsBD4W67nBZHSe6aZZC+dkuTIRQ= + +Name: system/etc/legal/leaflet/ms/index.html +SHA1-Digest: ADLWQq7SL5o5Yl1qL+f3A1ThZQU= + +Name: system/etc/legal/leaflet/zh-CN/GPSLocation-based-functions.html +SHA1-Digest: IHtAWpsC8GB5jqUGwdt5dEUmtvQ= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/moody_sunset_hd1080p_small.png +SHA1-Digest: etM2bv3WGSq1DSAZXJr6O8t5g+c= + +Name: system/etc/legal/leaflet/pb/Warning!.html +SHA1-Digest: 7ocnoU+G3xWfgfyq9wxMGQEKEB0= + +Name: system/app/SmallApp-Timer.apk +SHA1-Digest: EMcqYJtV6hY8XH0GufY3mrr1ETA= + +Name: system/etc/legal/leaflet/hi/Our-warranty---12.html +SHA1-Digest: 9X2XV2/+iJVNa6E3/6hhWPQVOj4= + +Name: system/bin/vdc +SHA1-Digest: saXSGbXdpyCqYFEbucaKxQmbSOY= + +Name: system/etc/legal/leaflet/hr/Children.html +SHA1-Digest: fnTdK2ayqdR6aSAUClllZs6ksnA= + +Name: system/bin/qmiproxy +SHA1-Digest: Hlp0Q7ClUEYrfMp29ZQ5n5Q0nzk= + +Name: system/etc/security/cacerts/f4996e82.0 +SHA1-Digest: NFib+Gt/85AoEla6GdaHBKkqcA0= + +Name: system/etc/legal/leaflet/kk/SIM-card.html +SHA1-Digest: iE0LezMDTHGr2WUEpu2XCyIPUGg= + +Name: system/etc/legal/leaflet/zh-HK/What-we-will-do.html +SHA1-Digest: AASlc1y2ZoB90ldEId0ztJKv/Ls= + +Name: system/usr/srec/config/en.us/grammars/phone_type_choice.g2g +SHA1-Digest: KPYJAVJTCr7vOBWM2qlErKU+otg= + +Name: system/framework/org.kxml2.wap.jar +SHA1-Digest: JUBWIBXKYnvibWssiyMypnCUW5E= + +Name: system/etc/legal/leaflet/ms/Warning!.html +SHA1-Digest: 1DsexdIAcv8XgVM9DYpFmW0pwuo= + +Name: system/media/audio/alarms/Helium.ogg +SHA1-Digest: 2+MZUNDgNmKdjADfr4+6+GwCqn4= + +Name: system/etc/legal/leaflet/kk/index.html +SHA1-Digest: 94zDnx9h9yRWX0WXgMXE0C/6uJY= + +Name: system/fonts/Roboto-Light.ttf +SHA1-Digest: bpJiUAPuXulTMdeRsm1UuaCcnMo= + +Name: system/lib/libnjtan.so +SHA1-Digest: PjMIdD12d0EWLkXYUL7POVK+vs4= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_flower_hd1080p.png +SHA1-Digest: wK14pMelbP2e4gB7j3IPUY/f5Qs= + +Name: system/etc/legal/leaflet/ar/Personal-medical-devices.html +SHA1-Digest: 2ZLyApUXIYf9/PgWJP5b7es47O0= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Malware.html +SHA1-Digest: vKjUgejbwOaL9MyPVY3rZFbxXXs= + +Name: system/app/SemcClock.apk +SHA1-Digest: ri7yiMOLfs+Ng896g+dxPBLJ1tI= + +Name: system/usr/keylayout/Vendor_046d_Product_c216.kl +SHA1-Digest: 334eygJ7+pqLeyMJvz5L56ffVVY= + +Name: system/lib/libmmjps.so +SHA1-Digest: vl9rc9EYJHQ1U+u1P67i2Krbn4Q= + +Name: system/etc/legal/leaflet/ar/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: dT/O0/gNq5uth2lHgCgVBMhL3yw= + +Name: system/vendor/firmware/libpn544_fw_c3.so +SHA1-Digest: HjqiYXq8JpmagxX3sPp1uH5dQ/0= + +Name: system/fonts/Roboto-Italic.ttf +SHA1-Digest: 5ipbgj463XjLbp5Mgkaxo9XZCDs= + +Name: system/etc/init.d/01zipalign +SHA1-Digest: 6Z7WaBPmy83Uk9Er/QAdu956i2s= + +Name: system/lib/libbcinfo.so +SHA1-Digest: osNL0aqzyhKO/lHdM5oAj62aMdA= + +Name: system/app/SemcPhone.apk +SHA1-Digest: Ve31jCzHxPuCjiECmjTrFhHTip0= + +Name: system/lib/libnfc_ndef.so +SHA1-Digest: 0c3Dddj4fbYCs30w0IFCcJNctBQ= + +Name: system/etc/legal/leaflet/fr/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: yiYEzKg3kXZ457GG0lMTuZHDnJY= + +Name: system/etc/legal/leaflet/uk/Antenna.html +SHA1-Digest: uWvRW38XwuheK9mCry7Cl68e4gs= + +Name: system/app/Initial-boot-setup.apk +SHA1-Digest: f6iGdrXdm1JvfVmZZX1OqipcIl0= + +Name: system/etc/legal/leaflet/in/Emergency-calls.html +SHA1-Digest: Ob9yE0HL6NyIjF3qcP2FhrA7G8c= + +Name: system/etc/legal/leaflet/ae/Battery.html +SHA1-Digest: BHOlakvQj/V8eJfD7r/44sklErs= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Conditions---ZS1.html +SHA1-Digest: 68cMWOhUg9gDwrbG91TTgVAFPgk= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Children.html +SHA1-Digest: uEqitdTCZOwb1VdoFfHM5x+VxtE= + +Name: system/media/audio/camera/sound1/stop_rec.m4a +SHA1-Digest: NmmNJaP3IHhPteKAZHTEec0p3cU= + +Name: system/framework/com.sony.device.jar +SHA1-Digest: XdD3sUZ/4LpdZgklKY+oGttL3JE= + +Name: system/etc/security/cacerts/74c26bd0.0 +SHA1-Digest: JPSZvZ3Tx+8fME4kV3U1NQInDwk= + +Name: system/app/SomcMirrorLinkServer.apk +SHA1-Digest: FG1MxJ4xQRwSCKhhXhJ3DmVLHLs= + +Name: system/etc/legal/leaflet/cf/Limited-Warranty.html +SHA1-Digest: nvhNOXWB5MMOmtV1+dWKN0bfNBM= + +Name: system/etc/legal/leaflet/en-PB/index.html +SHA1-Digest: 4/3xQWiDugm6yykHEonYSLe2/RE= + +Name: system/etc/legal/leaflet/pb/Export-regulations.html +SHA1-Digest: RBpQvt/WappAmizeSyHLECVylxU= + +Name: system/fonts/Lohit-Kannada.ttf +SHA1-Digest: qHTrL92TrDbIdXwjer7+zqQUZf8= + +Name: system/etc/legal/leaflet/fr/Precautions-on-Memory-Card-Use.html +SHA1-Digest: YnMW7bvPq/3+b7EYbFDigky/C2s= + +Name: system/lib/libutils.so +SHA1-Digest: yjqBbtjxd5eiQJIGfNquob4W7I0= + +Name: system/lib/libc2d2_a3xx.so +SHA1-Digest: g5lWOA1hmuBO+bCR8sTix+iPS78= + +Name: system/etc/legal/leaflet/th/Export-regulations.html +SHA1-Digest: qmlDl29fe7u9nkarm3h3K6vKNC8= + +Name: system/etc/legal/leaflet/zh-TW/Disposal-of-old-electrical-and-el + ectronic-equipment.html +SHA1-Digest: 7VNETUZbodeCBtbTaRf8EdVVfRA= + +Name: system/xbin/dexdump +SHA1-Digest: LHwiUHHcz/D8zfj41kdEb0lloBM= + +Name: system/app/LocalContacts.apk +SHA1-Digest: g6RtaASubyMTAe1G4MBNrxOVvlc= + +Name: system/bin/qrngtest +SHA1-Digest: 0yVFJPk2NG9BYEusG20hj0Lz19g= + +Name: system/app/GenieWidget.apk +SHA1-Digest: W3HA8QtNJJaEFve58OJZHRrsDvI= + +Name: system/etc/security/cacerts/a7605362.0 +SHA1-Digest: Z0AbnajZ3GPkGwTegW8+BCjdbFI= + +Name: system/etc/legal/leaflet/vi/Antenna.html +SHA1-Digest: 0xfQf96rI39ys6WRMs3Nnl1WSr4= + +Name: system/etc/security/cacerts/56b8a0b6.0 +SHA1-Digest: BbeXAaF1+TrUH67tzOrpG2PoDbM= + +Name: system/lib/modules/prima/cfg80211.ko +SHA1-Digest: ZqJ3NEWro4FnOHsS4qDJ4/B/vxE= + +Name: system/etc/init.d/11sqlite_optimize +SHA1-Digest: CdYos6jxjzUhef44T9wJiy9lFP0= + +Name: system/app/Magazines.apk +SHA1-Digest: CIV4pzgk7ibgcQRHc3zykGhF+ds= + +Name: system/etc/legal/leaflet/sr/GPSLocation-based-functions.html +SHA1-Digest: KwBSs2eT21Z+ahTPa37WFj7rQRQ= + +Name: system/etc/legal/leaflet/fr/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: oe2PaG7GzsOiwZ3eQByhuSETB94= + +Name: system/etc/legal/leaflet/zh-CN/Guidelines-for-Safe-and-Efficient + -Use.html +SHA1-Digest: 9RWzJQw5pbVRUjrOie2H0p6M55Q= + +Name: system/etc/legal/leaflet/ar/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: 5+hjUNxth/NYX/t3WGmhh3FcIEc= + +Name: system/app/ClockWidgets.apk +SHA1-Digest: OEg9zeTXs+jS6ujrQAfm6OBQu8I= + +Name: system/vendor/camera/SEM13BS1.dat +SHA1-Digest: nDkJ4omsXAKsrqNUVzTkXCFeMnE= + +Name: system/etc/legal/leaflet/bs/Protection-of-personal-information.h + tml +SHA1-Digest: yn/SQunkJZGHwmMKyLKLtx2nSHc= + +Name: system/etc/legal/leaflet/pt/Important-information.html +SHA1-Digest: RbpaJzbrqUn1TazMQ3coKP3GZtg= + +Name: system/etc/legal/leaflet/kk/no-title.html +SHA1-Digest: bTpdzLXCHTzbR2yaoDRQmTZ0z78= + +Name: system/etc/legal/leaflet/en-HK/Export-regulations.html +SHA1-Digest: 1A6qESAoeyideuTb2BZ0XnnDcHA= + +Name: system/etc/legal/leaflet/kk/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: GVuqXtpe/0Me2rK7+HrJtzbgpkg= + +Name: system/lib/libP11Notify.so +SHA1-Digest: TaxaQTjB2L0F0UGXN6bICo8dL8E= + +Name: system/app/ApplicationsProvider.apk +SHA1-Digest: /o7nlwHmMdtXJGpi7wjHNft+TSc= + +Name: system/app/SemcTelephonyProvider.apk +SHA1-Digest: FNNAIQI/9FhUezyfxkDSDeoS96A= + +Name: system/lib/libdsi_netctrl.so +SHA1-Digest: 4l0fNGBQsyEckJk7CnwGFE0FFGo= + +Name: system/media/audio/notifications/Shaula.ogg +SHA1-Digest: OR75aW7jJyyIBSuaNjBeKAlvq58= + +Name: system/etc/legal/leaflet/mk/Conditions.html +SHA1-Digest: cDBk/LLuNC73HUJT5NV/4lGhyiw= + +Name: system/etc/security/cacerts/5a3f0ff8.0 +SHA1-Digest: ZHheT+DD2seVYhDReWK8HQa1FoY= + +Name: system/etc/legal/leaflet/bs/Emergency-calls.html +SHA1-Digest: 3I61kuKohzYfvkkcMJITFei483c= + +Name: system/lib/libGLESv1_CM.so +SHA1-Digest: 0kcTNT8GRMG9AKHtn9nDyE0FZbk= + +Name: system/etc/legal/leaflet/iw/GPSLocation-based-functions.html +SHA1-Digest: j2wwd12MT4NCFty44ExJsJmZOYM= + +Name: system/etc/security/cacerts/4d654d1d.0 +SHA1-Digest: RiffZAyYlk3Z5RE5r3Eimp4hoCQ= + +Name: system/lib/lib_asb_tee.so +SHA1-Digest: bTWPyC2wvnk7gnME6kGz1hp9D9g= + +Name: system/etc/legal/leaflet/xl/Loudness-warning!.html +SHA1-Digest: b/JNLtF2/luQwCrf+vjcqQp8/GE= + +Name: system/etc/legal/leaflet/fa/Children.html +SHA1-Digest: Eu1oGz3y0dj03wvJA/21Firl6wo= + +Name: system/etc/legal/leaflet/images/field_shaded.gif +SHA1-Digest: k7r+aLPuXVIfuYijDRLv6N9y744= + +Name: system/vendor/overlay/com.sonyericsson.thememanager-res.apk +SHA1-Digest: MZqZC2VlBvlZEanlnBAeQdWOmao= + +Name: system/lib/egl/libGLESv2S3D_adreno200.so +SHA1-Digest: UT5NDWyLu2Mt12u5Bg3u5OFOmpo= + +Name: system/app/bootinfo.apk +SHA1-Digest: muZ9mZKF0sk75UDFseE8l0mt2PI= + +Name: system/lib/hw/audio_policy.mpq8064.so +SHA1-Digest: SF/Y3Tj6s5+uVtIi65qyhoM7dpM= + +Name: system/etc/legal/leaflet/zh-HK/Warning!.html +SHA1-Digest: rX8zpNQPA8lXnfrvfuDHPznxPvg= + +Name: system/vendor/camera/KMO08BN0_IMX111.dat +SHA1-Digest: ctpLug83qL74TavN77iDi2JHumM= + +Name: system/app/SomcMirrorLinkManualSwitch.apk +SHA1-Digest: D5c+bXq31Trbi3jH5UtrGPwQMcs= + +Name: system/etc/snd_soc_msm/snd_soc_msm_auxpcm +SHA1-Digest: IIJTVsQD61a6KxyQUccG8rLTEmc= + +Name: system/etc/customization/settings/com/sonyericsson/appextensions + /custom_settings.xml +SHA1-Digest: uxNOzNM+sw1mVUR15o2PAkrodgA= + +Name: system/media/audio/alarms/forest_air.ogg +SHA1-Digest: 4tdOdejIcO5OhO5ly6OoX2RYnh4= + +Name: system/etc/legal/leaflet/en-PB/Our-warranty---12.html +SHA1-Digest: bLuQJuY/fTCujcKduv3Rx4lrojU= + +Name: system/etc/legal/leaflet/iw/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: 8xcm2MrRXikPQNyIM9Y4agFPKnU= + +Name: system/usr/xt9/SEMC_810_r1-15_DEusUN_xt9_2.ldb +SHA1-Digest: 7zjmFYrn7srCegA+jjzb5jeMv4w= + +Name: system/etc/legal/leaflet/in/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: An0oemIETjCbP2jWk0eWMRGRjow= + +Name: system/etc/firmware/wlan/macaddr1 +SHA1-Digest: PwTIMQI0t85m0QX87kcENxWwqjM= + +Name: system/etc/firmware/wlan/macaddr0 +SHA1-Digest: GLO1BhXTQ8dJg0JcS8c+vj7FVr4= + +Name: system/app/SoundEnhancement.apk +SHA1-Digest: Mv5uC6EvB0UfFBGgARfxPp+GZjI= + +Name: system/etc/firmware/wlan/macaddr3 +SHA1-Digest: 8rmEDa7B4KaqKhOxsR9Q1Ai2inI= + +Name: system/etc/firmware/wlan/macaddr2 +SHA1-Digest: i35mAF8HQEtbNRKS2QEaZx3+iwQ= + +Name: system/framework/com.sonymobile.faceeditor.jar +SHA1-Digest: Fez35mkW7nWjAnNx5JtFxsIMAWI= + +Name: system/etc/security/cacerts/6fcc125d.0 +SHA1-Digest: dxoW8n5icyMm+Np/IAxgMBCnnt8= + +Name: system/lib/libcamera_client.so +SHA1-Digest: dcqJLhjR7HZu0bSoydUob0/a7f4= + +Name: system/etc/permissions/com.sonyericsson.audioeffectif.xml +SHA1-Digest: HYag+CQaDNAzqDnm9riwhx/aHyQ= + +Name: system/app/SmallApp-Calculator.apk +SHA1-Digest: CMAJ4Hd1YYdndGcQsTmC9ihIg0g= + +Name: system/etc/security/cacerts/7d3cd826.0 +SHA1-Digest: 9A93UolYEp2zLqOTDQS6H+32euM= + +Name: system/media/audio/ringtones/FreeFlight.ogg +SHA1-Digest: 0q8kCIw7qMnJUaF8q1t3Eo3GAGs= + +Name: system/etc/legal/leaflet/ae/SIM-card.html +SHA1-Digest: 1uRFqZASbtcT/9YBBGv1wZORIcg= + +Name: system/etc/legal/leaflet/xl/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: pFnCQ9aXvXErxeOu1FwJrk3T5NA= + +Name: system/etc/firmware/wlan/5g_high +SHA1-Digest: LNM+ddJV/QKpMAKvcXUs0yivxY4= + +Name: system/lib/libnetlink.so +SHA1-Digest: CdZgduXFsGQz0hNXpGyixf4hWvE= + +Name: system/lib/libOemCryptoJNI.so +SHA1-Digest: 1LSWxei9Vij58PG+zyMpYS9OqZM= + +Name: system/app/BlueTheme.apk +SHA1-Digest: RCUaWM5i2qeeobg0zTmb2yGrSj8= + +Name: system/etc/firmware/touch_module_id_0x37.img +SHA1-Digest: NxVfBQeYFHZQyX8ii+Ie3bwP3o8= + +Name: system/etc/legal/leaflet/ae/Service-and-support.html +SHA1-Digest: 6ARE0NfZMEMQMyrcIXY1xOuIttA= + +Name: system/media/audio/ui/VideoRecord.ogg +SHA1-Digest: op0jkXcHGjUiRs4Ps9209mGlsNE= + +Name: system/app/PinkTheme.apk +SHA1-Digest: FE0Ts3CcmOKD2KAzVWN5MxMXGLk= + +Name: system/etc/legal/leaflet/th/Battery.html +SHA1-Digest: 3QigF+rLz5JtgaEMGk6vx/Krdog= + +Name: system/etc/legal/leaflet/ru/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: oiSAxuzaesgkC8s1x9/Q+3/wKtQ= + +Name: system/etc/security/cacerts/594f1775.0 +SHA1-Digest: b8fylO1vYs50OMpD7EuUt+mZmQs= + +Name: system/bin/bridgemgrd +SHA1-Digest: CMAk//JSfrvXWFG/ZzpbMsUW7nk= + +Name: system/etc/legal/leaflet/zh-TW/index.html +SHA1-Digest: UvNkprnvw/HQsnwcOJNRLsIOAIs= + +Name: system/bin/mm-qcamera-testsuite-client +SHA1-Digest: 9BA2kenPlvvGn5+nafrWhkb7uMI= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Disposal-of-old-electrica + l-and-electronic-equipment.html +SHA1-Digest: FaZKyK4GosMKP6iT+f3YBFXTVIE= + +Name: system/fonts/DroidNaskh-Regular-SystemUI.ttf +SHA1-Digest: bwVSgcJ3NdZfsnHmCZ2QrM7zjB8= + +Name: system/xbin/busybox +SHA1-Digest: tIZgWfv2spklOaQ2rV0gBiYAypI= + +Name: system/media/audio/alarms/Fermium.ogg +SHA1-Digest: NI8Rnq759Hxj0t30Rrft+nBIGcA= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Conditions.html +SHA1-Digest: V7mtOP1dsYjM2+L+lnqqf1/I5aE= + +Name: system/etc/legal/leaflet/ae/Antenna.html +SHA1-Digest: ArDguy3mr23xRPuhOW/gc4Rx4Jk= + +Name: system/etc/legal/leaflet/pb/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: N1+fA1Gfwvv7nwRGhdLJeBsbk4c= + +Name: system/bin/mm-jpeg-enc-test +SHA1-Digest: uMZd5ZOXtx/P5PbNFqW4ssWjs4s= + +Name: system/lib/libqmi_cci.so +SHA1-Digest: GF0cZ2iOJwSubOeDMcomOfqtUEU= + +Name: system/etc/legal/leaflet/en/Children.html +SHA1-Digest: N1UQe0YqLFPvOwvCsLWrHJyjBeY= + +Name: system/bin/fast-dormancy +SHA1-Digest: Zp4OtsrLG5dMbdwGOtYr8VIbDBo= + +Name: system/bin/usbhub +SHA1-Digest: zP3wK6fRWSPheW5h0P/5XZ6XWPw= + +Name: system/usr/xt9/SEMC_810_r1-3_MKlsUN_xt9.ldb +SHA1-Digest: KAFQ+Zi8Hm8iAFxCGk+uOR8NRN4= + +Name: system/bin/vold +SHA1-Digest: Cxp1B2cWyqPXGnpwFT75vUV3sdw= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_purple.jpg +SHA1-Digest: 4ZMNdFkpZQWOEUFLKp+BckoEQlI= + +Name: system/etc/legal/leaflet/fr/Publication-number.html +SHA1-Digest: +MoYJ3B4UixaovC0ryxRCj0Rl9E= + +Name: system/framework/com.sonyericsson.facebook.proxy_1_impl.jar +SHA1-Digest: Se7yANBPM3tZ++n1Izqz6BnxgdY= + +Name: system/framework/com.sonyericsson.cameraextension_impl.jar +SHA1-Digest: /eivAs2hyHU3/ccLKCFeF98oM2k= + +Name: system/media/audio/notifications/Radon.ogg +SHA1-Digest: PSL5MlN8zqZY3z8iyv0HwaUMAtA= + +Name: system/etc/legal/leaflet/cf/Power-supply-(Charger).html +SHA1-Digest: Y0OSes3c1Zx+vhUJgZbulMFc7kc= + +Name: system/etc/legal/leaflet/en-HK/no-title.html +SHA1-Digest: /ErqeLj7T3ar+7nR8JMrJ2Ns/IM= + +Name: system/usr/srec/en-US/google_hotword_clg +SHA1-Digest: LMFoDJ5AhwQs1sYdBn6Cw/fH1cE= + +Name: system/app/SmallApp-Notes.apk +SHA1-Digest: cyDRvdZ8yG54elrkKMUb/o+AXOw= + +Name: system/etc/legal/leaflet/kk/Important-information.html +SHA1-Digest: xUQzXmXZJ3UjqD0RJfEDFj9wfwg= + +Name: system/app/DrmDialogs.apk +SHA1-Digest: M2nhooCT9/mJP/Su88BTLUOM7T8= + +Name: system/etc/legal/leaflet/pt/index.html +SHA1-Digest: xfEdblC7ouTJby7RQWasLHY0fSk= + +Name: system/etc/legal/leaflet/zh-CN/Driving.html +SHA1-Digest: MOxHlhT/T4bCKgOh8gkMKJTNKM8= + +Name: system/etc/legal/leaflet/ar/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: v/2u35UO7PKOa8X12Rukq9n4ly0= + +Name: system/usr/srec/config/en.us/models/generic8.lda +SHA1-Digest: OYQ/W3VpcPHMWi23NHXjTYvQcIM= + +Name: system/etc/legal/leaflet/sq/Protection-of-personal-information.h + tml +SHA1-Digest: bEDYh1fZ0XTRRI7vMwRQjeq92G8= + +Name: system/etc/legal/leaflet/zh-CN/Radio-frequency-(RF)-exposure-and + -Specific-Absorption-Rate-(SAR).html +SHA1-Digest: mpCfgAbdjjsPBee4BERKet83tkg= + +Name: system/etc/security/cacerts/ed524cf5.0 +SHA1-Digest: YUUDaE+eI4AQpO1M9Eel4WIxTGI= + +Name: system/etc/legal/leaflet/fa/index.html +SHA1-Digest: SzNzMKC5t9U6BKrixo3b+Ehpd68= + +Name: system/etc/legal/leaflet/images/LEGAL-ENVIRONMENT-CHINA-20-SMALL + -low.jpg +SHA1-Digest: HG+lWIZIafD8PoWGTKQBliSTS7U= + +Name: system/etc/legal/leaflet/ru/Conditions.html +SHA1-Digest: W9izw708EM+C4/lqdOf+L7UbheY= + +Name: system/etc/legal/leaflet/pb/Limited-Warranty.html +SHA1-Digest: VvAgOE9TogN2PH3+zleGIUA+Z/o= + +Name: system/lib/libcameralight.so +SHA1-Digest: FnDZXLo9+Nnt5X3u9hVhZwlRFlE= + +Name: system/etc/legal/leaflet/cf/Service-and-support.html +SHA1-Digest: 8IFa34vqQE7wQh6jmF5nRxsLlgo= + +Name: system/etc/legal/leaflet/mk/Driving.html +SHA1-Digest: h8ST2JtDqCpHMc7ZXV008knQEPU= + +Name: system/media/audio/alarms/Scandium.ogg +SHA1-Digest: lUJO6+c51augLEooakLRfsyASj4= + +Name: system/lib/libjni_latinime.so +SHA1-Digest: Ho/v7G8X5xEmbtjxTmOJHipzZxc= + +Name: system/framework/AsahiSignature.jar +SHA1-Digest: CefPvjTupyC3KB+Fg1vD8jGnGv0= + +Name: system/lib/libkeystore_client.so +SHA1-Digest: N5NVQhvghbxnQ/vxJ0zt7p9IJm4= + +Name: system/etc/legal/leaflet/images/LEGAL-ENVIRONMENT-CHINA-5-SMALL- + low.jpg +SHA1-Digest: FCT31HnpqKh+y8QT9quR514Fo6A= + +Name: system/lib/libz.so +SHA1-Digest: Fs3dZaHzM87UPD3iacqO/uwNoqc= + +Name: system/etc/legal/leaflet/en-PB/Copyright-and-trademarks---Legal- + leaflet.html +SHA1-Digest: YW/A0/yghcH1l6f0b7wBIkwHPSY= + +Name: system/etc/security/cacerts/111e6273.0 +SHA1-Digest: Ws4Pq966Jvp4ZXfGW5/zAefw3Es= + +Name: system/etc/legal/leaflet/hr/What-we-will-do.html +SHA1-Digest: URzjVxMTQsQVTa0T+iYNzCoT1eI= + +Name: system/lib/libcneapiclient.so +SHA1-Digest: cZAiAcq3nIXcIqbjQwVHiQe+cic= + +Name: system/etc/legal/leaflet/zh-TW/Personal-medical-devices.html +SHA1-Digest: j3acKTmHq6sIZvmULxS3iGNYQ2g= + +Name: system/etc/legal/leaflet/fa/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: j18WPvqUVp22FQpTsiH7UnMcL74= + +Name: system/etc/legal/leaflet/ru/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: BtjxXIG/vfZ63s51Zj7zOXbiOlg= + +Name: system/lib/libP11KeypadJni.so +SHA1-Digest: dKN97DIzUul/9DcRcIH8OydvG6g= + +Name: system/etc/firmware/a300_pfp.fw +SHA1-Digest: 86TWFYp5TL3agOwE0202WJ5Vew4= + +Name: system/media/audio/ringtones/Enter_the_Nexus.ogg +SHA1-Digest: zACA+wwMoEDVgps4LpZPvSgDIUM= + +Name: system/etc/legal/leaflet/in/Accessories.html +SHA1-Digest: Fc7BdQ3COw0G1zNwcrWrmgWBmYo= + +Name: system/app/CustomizationProvider.apk +SHA1-Digest: hIDN1cmQc4vk2teTNVryj+e/w1c= + +Name: system/lib/libmlaudiocap.so +SHA1-Digest: GUyCHjMWIvsJIzjtqEGdv6YnlyE= + +Name: system/etc/legal/leaflet/th/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: IE43ybiWPB6jtG9oPurNsMq+kmY= + +Name: system/lib/libmpl.so +SHA1-Digest: Y18dKaIMOCDtWPj+6RggLOFuqDU= + +Name: system/bin/ta2bin +SHA1-Digest: iKX7UIbSwYLFPgFJnIbluUho/xI= + +Name: system/etc/init.qcom.post_boot.sh +SHA1-Digest: BjUFgMu3AK94talfXe8iHY8133M= + +Name: system/etc/bluetooth/main.conf +SHA1-Digest: vyDt4pE3KoJe+gPgvRAp3TyGORo= + +Name: system/etc/security/cacerts/3c860d51.0 +SHA1-Digest: 3MirMMMxVPDIjrUJzJT9kQaASwQ= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/dewy_grass_hd1080p_small.png +SHA1-Digest: Id9zougFThY4CsN4CbAu08r6cBs= + +Name: system/etc/legal/leaflet/ar/Emergency-calls.html +SHA1-Digest: 54qXyU7kbg35xTQzRwSt9f8JZ/o= + +Name: system/etc/legal/leaflet/cf/Personal-medical-devices.html +SHA1-Digest: 2sJcb821K1f9Z6S4+LICZQg9jlA= + +Name: system/etc/legal/leaflet/en-PB/Children.html +SHA1-Digest: rwIOoBJPPV4ZjxTUSG3dUbrhVb0= + +Name: system/etc/legal/leaflet/zh-CN/Export-regulations.html +SHA1-Digest: OB3R/EcSsIaK6xEhZKSr4rXy20s= + +Name: system/lib/libemoji.so +SHA1-Digest: EtuY/oDNtxajnIHaAlZfoVOEZD0= + +Name: system/etc/legal/leaflet/sr/Conditions.html +SHA1-Digest: +RZWoqAmSNLZY/zHnBoWi2Jo9S4= + +Name: system/etc/legal/leaflet/en-PB/For-Devices-Supporting-3D-Viewing + -capabilities.html +SHA1-Digest: pvW/7Ec0bhIx9spv4JvwYXov4TU= + +Name: system/app/SemcTvLauncher.apk +SHA1-Digest: nraax/D0HkxYmP5XpQO6LgyjgzY= + +Name: system/media/audio/notifications/DontPanic.ogg +SHA1-Digest: ynTP9uC8Tlzn0mvUV9PfHcfBoLg= + +Name: system/etc/permissions/com.sonyericsson.dlna.dtcpplayer.xml +SHA1-Digest: CuTFN8J14mbvE/lW3ByML5HBxmw= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Limited-Warranty.html +SHA1-Digest: d8T+IaGEMYL1wwKWb4hlXt6SAr8= + +Name: system/vendor/camera/LGI08BN2_DW9714.dat +SHA1-Digest: M3vacaxvBEpdu3/3pjA45R7VerA= + +Name: system/etc/legal/leaflet/hr/Driving.html +SHA1-Digest: wWFF6W0ttCzfuCguUUDwEMKwfgc= + +Name: system/usr/xt9/SEMC_810_r1-4_HLlbUN_xt9.ldb +SHA1-Digest: RE+Yzh3PqxEiSQXZg6cQXIQJqpY= + +Name: system/bin/iddd +SHA1-Digest: 8FPeBiOiXUuyGg6C8Z6e53YOodQ= + +Name: system/lib/libsystem_server.so +SHA1-Digest: n806jlC97OhQPoJiLECH5/SqF2A= + +Name: system/lib/libgesture-core.so +SHA1-Digest: nlM7MTByInDgnIqBWO/dkcEob9o= + +Name: system/bin/racoon +SHA1-Digest: 96fbwStoKWHCEu925ZqRu9JHOjE= + +Name: system/etc/permissions/com.sonyericsson.illumination.xml +SHA1-Digest: Hii3eMmErZ6A0tdq9J/aNnt+KYA= + +Name: system/usr/srec/en-US/g2p_fst +SHA1-Digest: l8/XYD+Shc9RuLVFVZjR/GYc/Us= + +Name: system/app/GoogleCalendarSyncAdapter.apk +SHA1-Digest: Pfxp7lbbwwIlxdR51L0L+fkLNLQ= + +Name: system/etc/bluetooth/input.conf +SHA1-Digest: Y/By99uRCUpOsQ7WtQZrnrEoLaI= + +Name: system/etc/legal/leaflet/ko/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: l6BTRWhhygEVwNidT7OiGvbFdkA= + +Name: system/etc/legal/leaflet/sq/Limited-Warranty.html +SHA1-Digest: WgKJRgWoFQ8xhyGeHkaJPfm2inQ= + +Name: system/etc/legal/leaflet/iw/Loudness-warning!.html +SHA1-Digest: Vr3DtB4Wjw4SOfZ1Wz81H9uJbwg= + +Name: system/etc/legal/leaflet/fa/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: CzqBv3/g6LJEYxmNUJPzNSDrJ9o= + +Name: system/lib/hw/audio.a2dp.default.so +SHA1-Digest: T0MStoK227MyaHHkJahJixcGj+I= + +Name: system/etc/legal/leaflet/pt/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: bW8TKM0j648tmGbA7ogDaqsj7sk= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Personal-medical-devices. + html +SHA1-Digest: qIhqPwLVPCxOV62mquv67AO0RoE= + +Name: system/media/audio/notifications/OnTheHunt.ogg +SHA1-Digest: btYib2szrK5TKBS52wvGzYp+z7Y= + +Name: system/lib/libstagefright_soft_vorbisdec.so +SHA1-Digest: oOPsZa6r7ZnlVFsXbAXQ0Jd0K7U= + +Name: system/framework/com.sonyericsson.eventstream.jar +SHA1-Digest: Iic4IDP3yEAY30mkFPrmey3FrSk= + +Name: system/etc/legal/leaflet/en-HK/Our-warranty---12.html +SHA1-Digest: zhDHS0g286yLdREttkrCEiP14U4= + +Name: system/etc/legal/leaflet/mk/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: 47G2tDalwOpFnhjXzyc8sgJCIg8= + +Name: system/bin/clearpad_fwloader +SHA1-Digest: MN8pvLi4WAvT/ThgIxfO8ZQgM40= + +Name: system/lib/modules/mckernelapi.ko +SHA1-Digest: GjUZmZuHqkEM1qd6f/gb03164YA= + +Name: system/lib/modules/cfg80211.ko +SHA1-Digest: mr/QXkWH1LqTmIErISoUcJJ+NvA= + +Name: system/etc/legal/leaflet/uk/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: 7xRsCLkwGkQSWthx2OTWXdaEob0= + +Name: system/etc/legal/leaflet/zh-HK/Accessories.html +SHA1-Digest: uidLbEr8p92WmDEjMpif1VaxLeU= + +Name: system/etc/legal/leaflet/in/Children.html +SHA1-Digest: tYkSOlVd1FFxR/CM59w+aIHBVf8= + +Name: system/lib/libwfdmmsink.so +SHA1-Digest: Qs5ituZLDcIVDacNBQ6zNpC8IJI= + +Name: data/local/placeholder +SHA1-Digest: +OobV2Xxp+YklFnvkblHEuKDTvw= + +Name: system/vendor/camera/SOI13BS1_IMX135.dat +SHA1-Digest: DWaB4OKYYNqy9yaIeENzUzAceg0= + +Name: system/lib/libui.so +SHA1-Digest: 4Ahr/NJHkrB4IiSTX2tIQAdybqc= + +Name: system/media/audio/notifications/soft_bell.ogg +SHA1-Digest: x1haYVWS5n7VE8LTBX20mcuGpmM= + +Name: system/vendor/camera/SOI13BS1.dat +SHA1-Digest: pLptm27/ftmargFNjjcU9LxvJNM= + +Name: system/etc/legal/leaflet/fr/Export-regulations.html +SHA1-Digest: NxJqR781TPKWuXXjPhFfyqfPFgY= + +Name: system/lib/libsysinfo_modules/clearpad_wakeup_gesture.so +SHA1-Digest: SF9bR+4IdqpEsKaoBMhLwF32CcE= + +Name: system/usr/xt9/SEMC_810_r1-1_SUlsUN_xt9.ldb +SHA1-Digest: MyNbakT+r+yC9JKf18UccXmVAbw= + +Name: system/etc/legal/leaflet/ko/Export-regulations.html +SHA1-Digest: 20Vdp2zYbTJJy8ITYLe96iFClUw= + +Name: system/media/audio/ringtones/EtherShake.ogg +SHA1-Digest: f74c9hf6HCtxVDhhzr5RlduAycU= + +Name: system/lib/libmpqvideorenderer.so +SHA1-Digest: ZUNnI/7ylWLYCoydo01uWiEGCo8= + +Name: system/lib/libOpenVG.so +SHA1-Digest: wlUtdCBi6ljjM+IAqjxEf08jY6U= + +Name: system/etc/legal/leaflet/in/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: 8f6fZl238HI1w7ay7mRt7AatWjQ= + +Name: system/etc/legal/leaflet/sr/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: EYrACMR6UUllHmc5xVoV5Nt0q7w= + +Name: system/lib/libllvm-arm.so +SHA1-Digest: G53BE9E6L90fYelajMfMK71dPUU= + +Name: system/media/audio/alarms/Krypton.ogg +SHA1-Digest: cCh1pZlxi7WWdjMwMLFcjB2MPuE= + +Name: system/etc/legal/leaflet/ar/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: u4sPnotKe6ybZo4CbtEJX9X7kJk= + +Name: system/app/textinput-tng.apk +SHA1-Digest: L5FCsRDVMHviRUrxPs0zOQSzRYM= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/What-we-will-do.html +SHA1-Digest: Uuv6EzzVAZsTW3DQhus3+HE/yeY= + +Name: system/etc/legal/leaflet/ae/Limited-Warranty.html +SHA1-Digest: LZgAuorLsjyVAk1rFjUHNhfHbFQ= + +Name: system/app/facebook.apk +SHA1-Digest: ftm+My8j4z2cjkhd11zSUc8mIBo= + +Name: system/etc/permissions/com.sonyericsson.navigationbar.xml +SHA1-Digest: pJShuQ2K9bK6CuxxynCO5V9VGZQ= + +Name: system/lib/egl/eglsubAndroid.so +SHA1-Digest: w3i+qcviKNVcX5mmBjdP1pGVgG8= + +Name: system/app/SemcDlnaHandover.apk +SHA1-Digest: C02/0wwQBx7fiUtliKFiapB4SIA= + +Name: system/media/audio/notifications/Doink.ogg +SHA1-Digest: IyT26D6bxZf8XqiL+VS645K/XE8= + +Name: system/etc/legal/leaflet/fr/Children.html +SHA1-Digest: tVdfBaiTjWEeok6kkVN9oaDqjng= + +Name: system/usr/srec/config/en.us/models/generic11_m.swimdl +SHA1-Digest: REX20baAUwoqpKFT+1FzKuave5I= + +Name: system/media/audio/ringtones/MildlyAlarming.ogg +SHA1-Digest: K9pNtNdBUvccIhC2C/HZozHtRF8= + +Name: system/lib/libqdutils.so +SHA1-Digest: YzbFc1Ex+IdtA13GuI09Ni4z4GU= + +Name: system/media/audio/camera/sound1/shutter.m4a +SHA1-Digest: IhORxJOo8JC9cDyarVsjI+Wp4nY= + +Name: system/etc/legal/leaflet/ru/Memory-Card---legal.html +SHA1-Digest: +kowbaTDkZAVa7GJcI0D1ps/tWk= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/mesh_blue_hd1080p_small.png +SHA1-Digest: krYn0BOURvsy6997btnFnoD4fBk= + +Name: system/etc/legal/leaflet/en/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: j8oqFA2KzX3hgKi1mJW2IyRgLy8= + +Name: system/etc/legal/leaflet/images/list_line.png +SHA1-Digest: lhN7VmynvofZwiA+aIV4/1Kw0Fk= + +Name: system/etc/security/cacerts/72f369af.0 +SHA1-Digest: B0FekN7giev0q4MtHFobsMO8JOw= + +Name: system/media/audio/camera/common/selftimer_10sec.m4a +SHA1-Digest: Vhl3V9BJftvPpa6ZaNInNf0A9Z4= + +Name: system/etc/legal/leaflet/images/ICN-SAR-CONTACT-NUMBERS-low.jpg +SHA1-Digest: yTIpjaCZ3Nd/4r08U6IIM8gyw9E= + +Name: system/etc/firmware/wcd9310/wcd9310_mbhc.bin +SHA1-Digest: IAdemGabU3zNXMtA2ZXRsGXW9RY= + +Name: system/etc/legal/leaflet/sq/Our-warranty---12.html +SHA1-Digest: tx8MW45wWHl9jgNE2PF6pKPsYtU= + +Name: system/etc/permissions/com.sonymobile.media.dashboard.extension. + xml +SHA1-Digest: tIKj0ac6RUkO5H03oJPbxOHNssE= + +Name: system/framework/semc_bootinfoif.jar +SHA1-Digest: cZYHQMZC+5hqjH6P4mGawKMZdPo= + +Name: system/framework/core.jar +SHA1-Digest: p6pM4XpnLUzygBoFC01/R6+VZ1M= + +Name: system/etc/legal/leaflet/hi/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: Y8+/YyJaOC3mgGpYA2NX7VPdMHo= + +Name: system/lib/libwfdnative.so +SHA1-Digest: mDiCqmk0Po1DChEkLnl7g6QV9WQ= + +Name: system/media/audio/ringtones/Savannah.ogg +SHA1-Digest: dOXGuw/jPc8JmclsyvuOnvJ/U4E= + +Name: system/app/SomcMirrorLinkSystem.apk +SHA1-Digest: WwSn0A8W5c3r7CrKo5Fiu52tTls= + +Name: system/app/usb-mtp-vendor-extension-service.apk +SHA1-Digest: Oxvqp6eYgKwoqVwWRh/aUpPapoo= + +Name: system/etc/firmware/q6.mdt +SHA1-Digest: dKwiDobUsomihtOkUn4nKf6ETdU= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Accessories.html +SHA1-Digest: WqUlFE+QSQdVA6LhopctpPlicSM= + +Name: system/app/SharedStorageBackup.apk +SHA1-Digest: dxu3Uf9z3jd/SC0ePaClucSZ5bI= + +Name: system/lib/libstagefright_yuv.so +SHA1-Digest: /dneWpe+d4HS5pAxQ0RGvz5d58E= + +Name: system/lib/libfmradio.so +SHA1-Digest: q+/oRWTYCjCkyBzv2z4QM9bJnT8= + +Name: system/media/audio/ringtones/Thunderfoot.ogg +SHA1-Digest: 07gOIhFF6ls39/dfjISgPQGu2cQ= + +Name: system/etc/legal/leaflet/fa/Important-information.html +SHA1-Digest: A64Ug62xsqxE0wx/jbzIfXXbjx8= + +Name: system/etc/legal/leaflet/th/End-User-License-Agreement.html +SHA1-Digest: SDUkp6hbpY4ubJGRlG7MXpCey6c= + +Name: system/etc/legal/leaflet/vi/Export-regulations.html +SHA1-Digest: 53g+725Q/CaeIQUR5ZsxiOVx/XE= + +Name: system/lib/libspeexwrapper.so +SHA1-Digest: goX7MyYJrrJ5gSf56ChkN/Ecqgc= + +Name: system/bin/dumpstate +SHA1-Digest: DPPfpDRPBDqOYJDI4lgux1FOLGM= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor4.so +SHA1-Digest: 0aZuvITp6VMr3lmrHB6xwKR+I/Y= + +Name: system/media/audio/ringtones/Ding.ogg +SHA1-Digest: BH0N1bzc2+Xt6+PAG/Pb7OlB8Fc= + +Name: system/etc/legal/leaflet/vi/index.html +SHA1-Digest: e7bJJ/AGd/Icms38nYbV0lhBEW0= + +Name: system/etc/legal/leaflet/pb/What-we-will-do.html +SHA1-Digest: hCOA8PSryP0DmzHYD7mQ7YCzeGk= + +Name: system/lib/sysmon/sysmon_perflevel.so +SHA1-Digest: sBWGAuOeDioyEzAz7V+i/0q/8tA= + +Name: system/bin/diag_socket_log +SHA1-Digest: weXHzjBv8WCXifraFg4b5RZQ9kQ= + +Name: system/etc/legal/leaflet/fr/Protection-of-personal-information.h + tml +SHA1-Digest: yA4VcTSLpszyXfBGt+KPRghX2Xo= + +Name: system/framework/com.google.protobuf-2.3.0.jar +SHA1-Digest: cnDhwDKAwUxOuJbUjjHfGcZoQu8= + +Name: system/etc/legal/leaflet/images/form_search_foot.png +SHA1-Digest: Lufxv9YFyVeP1XFJJlJQILjPw+Y= + +Name: system/lib/lib_dic_en_USUK.conf.so +SHA1-Digest: jCbo8bJ700Ev4SjyGzjI/a2PnzE= + +Name: system/media/audio/ringtones/Calypso_Steel.ogg +SHA1-Digest: W3NserGtGJ6PCYi4t+VJpK581M8= + +Name: system/etc/security/cacerts/1920cacb.0 +SHA1-Digest: jnyFPukRwUWlDtLf5/32Yj9FaSY= + +Name: system/lib/liballjoyn.so +SHA1-Digest: fPeoHRSbQbckmakEJ9OZfX0SRDQ= + +Name: system/media/audio/ringtones/Themos.ogg +SHA1-Digest: 5RM/JcMs2Hjb4nftACxQvOBNhYQ= + +Name: system/lib/libbinder.so +SHA1-Digest: POxSZ8xeAr7vk/FL/yE2IBOTRhA= + +Name: system/app/HoloSpiralWallpaper.apk +SHA1-Digest: gQoZbji0AJYyVv4iTPifpJmltQY= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/white_caps_hd1080p.jpg +SHA1-Digest: li6sMYUpj9gtuLQhUIEw87tMwtk= + +Name: system/etc/legal/leaflet/images/LEGAL-UG-low.jpg +SHA1-Digest: FhzqkT9ymvf5WOAh9S1u+hm1uUs= + +Name: system/etc/init.qcom.fm.sh +SHA1-Digest: LeoWQmyE88ihbphuC5VdIhswMHw= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Accessible-SolutionsSpeci + al-Needs---USROW.html +SHA1-Digest: RcVdODwP1CU6/Sd0N0aZRlf+zkg= + +Name: system/etc/legal/leaflet/bs/Conditions.html +SHA1-Digest: 3/eDOlId/OSPgrhPot7dvyf4xaA= + +Name: system/app/SocialEnginePicasaPlugin.apk +SHA1-Digest: RvMJsGPl4gXdIjscpZ34RycUUz8= + +Name: system/etc/security/cacerts/343eb6cb.0 +SHA1-Digest: rYcngakSpBQiNzp/GrZRITUXhlE= + +Name: system/etc/legal/leaflet/sr/SIM-card.html +SHA1-Digest: 2tCCUEv37OxHD0Ywmyp0ZmGrTQw= + +Name: system/app/CalendarProvider.apk +SHA1-Digest: KkluIZqaBTvvvenvG8eQ7UdEHbY= + +Name: system/usr/xt9/SEMC_810_r1-26_FRusUN_xt9_3.ldb +SHA1-Digest: Wmk4e20mOAtayk/1XSTjVJyaew0= + +Name: system/etc/permissions/com.playstation.playstationcertified.xml +SHA1-Digest: PFvZQJi9dc7GlvjjKwSE3aeOs8c= + +Name: system/usr/xt9/SEMC_810_r1-5_ETlsUN_xt9.ldb +SHA1-Digest: 3DD94AK+YDR1fE5op21AVDhAcgk= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Flight-mode.html +SHA1-Digest: wqlCd4+nXof8q0U17Rhs1bJrSG8= + +Name: system/etc/legal/leaflet/sq/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: wWEIwlvpJq43ZxI/AJgwWCdtcBo= + +Name: system/etc/legal/leaflet/en-PB/GPSLocation-based-functions.html +SHA1-Digest: 7M6Ktw8WLWPLF4C9E9jGeQLmdkg= + +Name: system/bin/servicemanager +SHA1-Digest: TRLRLPyNK/8hBsKD6TBlAQ07z+Y= + +Name: system/etc/product/applications/playnowclientarvato.apk +SHA1-Digest: WyHZI2bKyJ7I9fHjUlMtaHns5/k= + +Name: system/media/audio/ui/KeypressSpacebar.ogg +SHA1-Digest: vJK46s6r2X/zJslrzS0KftDoq2E= + +Name: system/usr/share/zoneinfo/zoneinfo.idx +SHA1-Digest: 7SC0/Qh30fU10nBi4b/Fz+ROgsY= + +Name: system/lib/libqmi.so +SHA1-Digest: o1TbHyMQ4dj6US3TygQNf/f45pg= + +Name: system/usr/keylayout/atmel_mxt_ts.kl +SHA1-Digest: SCYDmkPmdjI0LYiUsfj97GCWp7Y= + +Name: system/lib/libvideoeditor_jni.so +SHA1-Digest: VrQOEeaLOaIpqyM0GS9JZSRiOZU= + +Name: system/etc/permissions/com.sonyericsson.android.qcsemcserviceif. + xml +SHA1-Digest: Xv1q0ABX23tFIVBT8OaSmT9pOTM= + +Name: system/etc/legal/leaflet/kk/Memory-Card---legal.html +SHA1-Digest: aNAwEgnxY1VXfMGDSWCAiDn528k= + +Name: system/etc/legal/leaflet/vi/Driving.html +SHA1-Digest: l/PkWO/q0NJdZfofX4R7eoPJFwE= + +Name: system/usr/xt9/SEMC_810_r1-5_SLlsUN_xt9.ldb +SHA1-Digest: caO8cQh52ovysjtTuP5DZdV56i0= + +Name: system/lib/modules/scsi_wait_scan.ko +SHA1-Digest: wdRZZNSSstp58HrvEQeNvPF/Qt0= + +Name: system/lib/hw/gestures.msm8960.so +SHA1-Digest: 8T+Qr1IaGEBd/wmL40pyMh8d0sY= + +Name: system/usr/xt9/SEMC_810_r1-1_TAlsUN_xt9.ldb +SHA1-Digest: maCllAXwrCLmX/z/tE35M50AMB4= + +Name: system/lib/hw/gralloc.msm8960.so +SHA1-Digest: 0H1kJa+AfU6b0bXmKDFJSDL7ONM= + +Name: system/app/HotspotAdvancedSetting.apk +SHA1-Digest: H5jJzFIE78wr01VlINDeNx1BQPI= + +Name: system/etc/legal/leaflet/hi/Children.html +SHA1-Digest: lYy98v+lhMSqpywHZHb1HUpklUw= + +Name: system/app/talkback.apk +SHA1-Digest: pfut3F3cOQUyr9KoopcTw4QY9yE= + +Name: system/usr/srec/en-US/metadata +SHA1-Digest: KGPX1W+FZfaR/73RY0nIPfxsrcQ= + +Name: system/etc/legal/leaflet/xl/Personal-medical-devices.html +SHA1-Digest: e2JnC7qfZmdALJyqQOGZMVRKiGU= + +Name: system/tts/lang_pico/de-DE_gl0_sg.bin +SHA1-Digest: ScYyzXaktqrP2gdGvGwnttbNyVw= + +Name: system/etc/legal/leaflet/bs/Warning!.html +SHA1-Digest: LBAtPgIVJ19G8oFFCuXi9/4Qi0I= + +Name: system/etc/permissions/com.sonymobile.musicslideshow.xml +SHA1-Digest: X5q11iKoR8gYQO2NIbpUSTpnyPk= + +Name: system/usr/xt9/SEMC_810_r1-5_CSlsUN_xt9_2.ldb +SHA1-Digest: 7k8q4N+5RxkG29MjORJDWjmLIc0= + +Name: system/etc/legal/leaflet/bs/Driving.html +SHA1-Digest: ic+kIjL8DKBRGLCn31Ja0+I6QGY= + +Name: system/media/audio/ringtones/air.ogg +SHA1-Digest: Io/n/TYZ4I4mH8Ohd2DUxzEk4jE= + +Name: system/etc/security/cacerts/1155c94b.0 +SHA1-Digest: Itv/d3FpM7SIr1DMDQhBhUgrq+c= + +Name: system/etc/security/cacerts/12d55845.0 +SHA1-Digest: oaj59fzV/q9qjIGZjotc01lpf9A= + +Name: system/lib/libwilhelm.so +SHA1-Digest: 6qswLwtQUSWSt6obH8MtC2TKnmk= + +Name: system/etc/legal/leaflet/vi/Accessories.html +SHA1-Digest: cnHRKckNWmIDmVL3xuG5MaguF0k= + +Name: system/etc/legal/leaflet/en/Conditions.html +SHA1-Digest: 2VSc0D7NLi2HroIngc0u2+p7IBo= + +Name: system/etc/permissions/com.google.android.media.effects.xml +SHA1-Digest: j/P++0UEThlMLHb5ewoUXe96pQ4= + +Name: system/fonts/DroidSansDevanagari-Regular.ttf +SHA1-Digest: YAhglQpSW2PkVPPeXBILe0Nx7BA= + +Name: system/etc/legal/leaflet/zh-TW/Memory-Card---legal.html +SHA1-Digest: QWxQi1lpghr6p0epVWjNlJQjN6E= + +Name: system/etc/legal/leaflet/vi/Malware.html +SHA1-Digest: UcJm3I/MBOwnMMitQ0LOhv2Iul8= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Power-supply-(Charger).ht + ml +SHA1-Digest: Z7dQFA3qOB9zdI5/SNMYwUC9HIA= + +Name: system/etc/legal/leaflet/ar/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: XgeKiQnkFcom7ZVBbzw9K7I2Gug= + +Name: system/lib/libclcore.bc +SHA1-Digest: eGYo8lZPI0FIymouz3SMpLm6zEs= + +Name: system/etc/legal/leaflet/fa/Personal-medical-devices.html +SHA1-Digest: j888Jj52EgQALr66luWeIrsgqYo= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_orange.jpg +SHA1-Digest: aOUsvhIupdNgmVghDcqnURAr738= + +Name: system/app/BlackThemeBlueAccent.apk +SHA1-Digest: NsQP7ACR+sYbDzLlTmQcodclQpE= + +Name: system/lib/libmedia.so +SHA1-Digest: YW0PblT7pRYLpr77k34sLyPOyVI= + +Name: system/lib/libfacelock_jni.so +SHA1-Digest: iqvINeQDiCl1jyNwRsPVsitKnsw= + +Name: system/etc/legal/leaflet/images/arrow-red.png +SHA1-Digest: xqHyTGc/15AhmgRNiKDw8otg53g= + +Name: system/lib/libfilterpack_imageproc.so +SHA1-Digest: lkGtHR8jiy7H2H1mhPWCJcb6COo= + +Name: system/lib/libmm-abl.so +SHA1-Digest: RnL76fE+F3J4QiVMQhoIsh7VWNw= + +Name: system/etc/legal/leaflet/en-HK/Loudness-warning!.html +SHA1-Digest: Y+dQZGfLj/w4uiggdGOVuZG/Glo= + +Name: system/etc/legal/leaflet/cf/Important-information.html +SHA1-Digest: ogpCBFxhYtfkSDdLaVfltexwAxc= + +Name: system/etc/legal/leaflet/zh-TW/Guidelines-for-Safe-and-Efficient + -Use.html +SHA1-Digest: Mw+ywlaPTVm4v7NISwXS8lnUILk= + +Name: system/lib/libmmcamera_interface.so +SHA1-Digest: 4Vj2J9NfSDbBpYG4lh6ejuVSvzM= + +Name: system/lib/libmmcamera_hdr_lib.so +SHA1-Digest: cbsW21EeXhng2BKdmqTwZdfhnxo= + +Name: system/etc/legal/leaflet/iw/no-title.html +SHA1-Digest: ZJe+c4bQcx0h/or4OVg6YpbkfkU= + +Name: system/etc/legal/leaflet/images/bg.png +SHA1-Digest: 6UiBQ16Hhp6uJbvsr+brHeODkkM= + +Name: system/etc/audio_effects.conf +SHA1-Digest: L4bboGHkjs1SP/aOmMW3y/+DG3k= + +Name: system/etc/legal/leaflet/hi/Warning!.html +SHA1-Digest: 4ZM7bO9ZpH51xxZWBHbAJ4X5Iww= + +Name: system/etc/legal/leaflet/bs/Memory-Card---legal.html +SHA1-Digest: CtD6rhpCZFwS0R262poLEM6boww= + +Name: system/framework/pm.jar +SHA1-Digest: HzZ1qwzQg0rlpQA4CSj3eEk0ilw= + +Name: system/app/NoiseField.apk +SHA1-Digest: fhxdRDFm0QGWBalB6n1WOR1zYwo= + +Name: system/etc/legal/leaflet/ms/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: pLmRSHANL75Amq0h2c/Yhg5ODEM= + +Name: system/etc/legal/leaflet/images/field_shaded-BIG.gif +SHA1-Digest: OhYSkfbHC7Fd/gS8FNlbckhhq4k= + +Name: system/etc/legal/leaflet/fr/Loudness-warning!.html +SHA1-Digest: skTGBnTh5XDchctPAdzaSUbUxQA= + +Name: system/etc/legal/leaflet/en-PB/Precautions-on-Memory-Card-Use.ht + ml +SHA1-Digest: 22s0KXB/2wpyRa0hclTTFPHazMU= + +Name: system/etc/legal/leaflet/bs/Antenna.html +SHA1-Digest: BpxxWbfh9l51qwunqJ66U3QQtfk= + +Name: system/etc/legal/leaflet/en/Malware.html +SHA1-Digest: amTDrW2ay4yfpyeNV6vNQvc0pjI= + +Name: system/etc/nfcee_access.xml +SHA1-Digest: EK+WOxvhh6GI5g0WcWPRKGjeFAQ= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/field_at_sunset_hd1080p.jpg +SHA1-Digest: JCOw+d9YJ4DaG1s6MdKnEYOl0IE= + +Name: system/framework/com.google.widevine.software.drm.jar +SHA1-Digest: K5tDBPpybEP4JKU1zKzACnOYIvI= + +Name: system/lib/libmpqvideodecoder.so +SHA1-Digest: L7cURtgRSuuqYrWjArzjlqmT00c= + +Name: system/etc/legal/leaflet/pb/Precautions-on-Memory-Card-Use.html +SHA1-Digest: fscdYccUnQ/C2CRh9fb1XP/qpqs= + +Name: system/etc/legal/leaflet/iw/End-User-License-Agreement.html +SHA1-Digest: Hg7JwcCBq/WbBJLfmw9OcopnCvs= + +Name: system/etc/security/cacerts/3d441de8.0 +SHA1-Digest: kgXAr2tpkHl35rHXGMamr1Cpxd4= + +Name: system/lib/libmmipstreamsourcehttp.so +SHA1-Digest: niS468hx1cF2ERI5LRWqkjgZxm8= + +Name: system/etc/legal/leaflet/fa/Flight-mode.html +SHA1-Digest: rPPQBMNHM+T8Nfb+Snw0IkRJIb0= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor1.so +SHA1-Digest: X/H5wCKzNe02kqatT8m4pAuFI8U= + +Name: system/lib/hw/sensors.default.so +SHA1-Digest: xVViQfBVn41FgLOg5p8TLZC79O4= + +Name: system/lib/libhardware_legacy.so +SHA1-Digest: 2/hRZmBfLbKBdcXVnMc3A5s7cjE= + +Name: system/app/ShutDownAnimation.apk +SHA1-Digest: mvflRlC66gEh0/rG77yW5I+PlBA= + +Name: system/etc/legal/leaflet/ae/Memory-Card---legal.html +SHA1-Digest: c8Cq4+DPjYSmL4bYAdhmuUAeryo= + +Name: system/media/audio/ringtones/Glacial_Groove.ogg +SHA1-Digest: 9M+e83znvBcCe+2hrCHURwSYj8w= + +Name: system/lib/libstagefright_soft_g711dec.so +SHA1-Digest: OyPGbo9snaaujpB25Ztsoi/NvOY= + +Name: system/etc/legal/leaflet/iw/Export-regulations.html +SHA1-Digest: Is80ALyslUOtmu/wh3QB2Do5J4U= + +Name: system/usr/srec/config/en.us/g2p/en-US-ttp.data +SHA1-Digest: TMoAJlQxGPS0YwmkBuVSOTH3Ewg= + +Name: system/lib/libidd.so +SHA1-Digest: yZSU4wyfma7vMmiSaygQWDNhat0= + +Name: system/etc/legal/leaflet/zh-CN/Emergency-calls.html +SHA1-Digest: eEEOKbgKiu4Jvlu4vkYODhq0Dco= + +Name: system/etc/legal/leaflet/zh-TW/Sony-Ericsson-Consumer-Web-site.h + tml +SHA1-Digest: 7Jlg2ream+CJ9sx5pHTsknhUXLU= + +Name: system/etc/legal/leaflet/ru/Export-regulations.html +SHA1-Digest: Qnr6zvk0aXnityAOmd2BTcblHJ8= + +Name: system/lib/libvariablespeed.so +SHA1-Digest: hl7xKWD79EUfcNioEbjM8OV8DL8= + +Name: system/app/Stk.apk +SHA1-Digest: NzQdic7YRxOXUoSmvzhV2xErrDQ= + +Name: system/etc/legal/leaflet/en-PB/no-title.html +SHA1-Digest: Pp245bBxO+oU3DnoG0CPvcfd/bA= + +Name: system/etc/legal/leaflet/pb/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: RL18SX25Ji4d38Y6hKVWGX8IclE= + +Name: system/etc/legal/leaflet/en-HK/en-CN/For-Devices-Supporting-3D-V + iewing-capabilities.html +SHA1-Digest: 1ZK0j1OB9esgpTzWIWd+5/GQA84= + +Name: system/etc/legal/leaflet/sr/Important-information.html +SHA1-Digest: kF3/+ke5srbghzXBWuVd9sBjyeY= + +Name: system/etc/legal/leaflet/hr/Service-and-support.html +SHA1-Digest: uhDiD35e3bmhTOhJb3trovJsaXQ= + +Name: system/app/OemCryptoReceiver.apk +SHA1-Digest: QTkHIPtehubuTcUT7y815P3oPR0= + +Name: system/app/WapPush.apk +SHA1-Digest: B+mhbnWVwupajMgtRRRSlaYUbe8= + +Name: system/usr/xt9/SEMC_810_r1-4_MSlbUN_xt9_2.ldb +SHA1-Digest: kciQUjLVDQB5paZygdPbtKSk7mo= + +Name: system/media/audio/alarms/Oxygen.ogg +SHA1-Digest: gsJoB8qbRb3rlJb3VgsYCI6bq7o= + +Name: system/etc/legal/leaflet/mk/SIM-card.html +SHA1-Digest: DR0SgE+V5hB4vmjOIanqhemW7TA= + +Name: system/etc/legal/leaflet/images/background_header-blue.png +SHA1-Digest: orXGKfLxfsfD8lbZdkux8dmW/TM= + +Name: system/etc/legal/leaflet/images/placeholder.png +SHA1-Digest: xcvjNcMxhpY2Lkm6/DLTQTFn+DQ= + +Name: system/fonts/DroidSansGeorgian.ttf +SHA1-Digest: TcKNYOeiNvn93qI0a4VO4OsezbA= + +Name: system/media/audio/notifications/Mira.ogg +SHA1-Digest: T3YV3JAhoKolk4Gc582ZZOBhEaw= + +Name: system/etc/security/cacerts/c7e2a638.0 +SHA1-Digest: FNY7YX9aUI4JunnbSM/rvcUd32A= + +Name: system/etc/legal/leaflet/ae/End-User-License-Agreement.html +SHA1-Digest: xkUC5/4LX/a5E0tpz7B97N8qQ4M= + +Name: system/app/YouTubeKaraokePlugin.apk +SHA1-Digest: WRtxv/wi7iUYwkRqzxtJGzCIOFg= + +Name: system/etc/legal/leaflet/images/previous-Orange.png +SHA1-Digest: 0j2ncMoMokkDEeXHaqoJxqXYtWw= + +Name: system/etc/legal/leaflet/pt/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: ghg8OqTyYo3pTDrClWgc4WaX5oc= + +Name: system/media/audio/ringtones/Pyxis.ogg +SHA1-Digest: iPiysXLNHxXe9nC5TbhAHsSK4Zo= + +Name: system/lib/libandroid_servers.so +SHA1-Digest: 4P9NLMD4TE1EuZV2eRvMVDI24vQ= + +Name: system/lib/libcredential-manager-service.so +SHA1-Digest: Fn87YPQC+mRbdAogtu0LlZkhlxQ= + +Name: system/bin/hci_qcomm_init +SHA1-Digest: NC+JJbbE8E8pP1SDEFd62fWG/qM= + +Name: system/lib/libmmrtpencoder.so +SHA1-Digest: lz+BJ3BWcsf4MakzpL/c/bbzP2Y= + +Name: system/media/audio/ringtones/Big_Easy.ogg +SHA1-Digest: XwOAShMm4jbw1/ZNB62JjB8iyEo= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_flower_hd1080p_small.png +SHA1-Digest: eZHioZh0ROW5yctgTfuHF9sABMc= + +Name: system/etc/firmware/dxhdcp2.b02 +SHA1-Digest: aERAZxsuY9jBZg3ryi/UKqjr5eA= + +Name: system/etc/legal/leaflet/zh-HK/Battery.html +SHA1-Digest: pX8dVkVdmR4E73xOXiPNn4JXQNc= + +Name: system/etc/firmware/dxhdcp2.b03 +SHA1-Digest: DvgCxlVuDQyhRIwm7QWk8rwwBBs= + +Name: system/lib/libepdsp.so +SHA1-Digest: i/8M6uCABv5Jp1yb1Bh2M0D48P8= + +Name: system/etc/firmware/dxhdcp2.b00 +SHA1-Digest: /cDWr+IIkTL/9aSfmxGouKlWNM0= + +Name: system/etc/legal/leaflet/fr/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: 5md/dN0BkRhQZf94ij4kcWSOcrA= + +Name: system/etc/firmware/dxhdcp2.b01 +SHA1-Digest: 55PzBuDU2Beph3uuCBmFWJzTekc= + +Name: system/bin/mdm_helper +SHA1-Digest: NUKvZXuJyhg7VMNygZt9RgFbgB0= + +Name: system/app/MediaProvider.apk +SHA1-Digest: +Tt6xdkxPrdyTjZ+VyoQ+zVNc0o= + +Name: system/etc/legal/leaflet/kk/Driving.html +SHA1-Digest: x/6A7beNeiftskxMlURU7+FsBr0= + +Name: system/lib/egl/egl.cfg +SHA1-Digest: y/87VoK0H7VIrFPbmtXvdY1n6gA= + +Name: system/etc/legal/leaflet/mk/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: bQ3YSO7P206+o2UPrJxWRF7va/o= + +Name: system/etc/legal/leaflet/fa/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: 4ZNqJGvp10mLPD3n5ViTPgqxSRU= + +Name: system/etc/security/cacerts/c527e4ab.0 +SHA1-Digest: zRMmakm1sS3WLz+jAxVfL05XL0k= + +Name: system/etc/legal/leaflet/hi/Service-and-support.html +SHA1-Digest: 6TJkXIww1n/Kj3jm7xsz64+WdnQ= + +Name: system/etc/legal/leaflet/en-HK/en-CN/End-User-License-Agreement. + html +SHA1-Digest: sdmyp0x+wccv7CA6yE7Nxt+j+mw= + +Name: system/lib/libnetmgr.so +SHA1-Digest: CRz+USWYA+jsRemuCUfYXOqqMjs= + +Name: system/etc/security/cacerts/95aff9e3.0 +SHA1-Digest: 1GRiRyM4dxD3loVZew6tSzCwVBY= + +Name: system/media/audio/ringtones/World.ogg +SHA1-Digest: Jr+ottZZz+L+nulxLv5Swwl7Yow= + +Name: system/lib/libOmxAacDec.so +SHA1-Digest: gQE7OuDZB/eGF3JG6gnkSx+DoBA= + +Name: system/etc/legal/leaflet/th/Protection-of-personal-information.h + tml +SHA1-Digest: DmhkP66v2sGO9PzPz11MQh167ew= + +Name: system/etc/security/cacerts/8f7b96c4.0 +SHA1-Digest: lDZRYJyvALtGjuqSKR0e/O5iFq0= + +Name: system/lib/libext2_blkid.so +SHA1-Digest: 1tVcOJsw0p8+lznLFfN1U2IeE9k= + +Name: system/etc/legal/leaflet/kk/Children.html +SHA1-Digest: jsDwnpMpl8v8xZErSXRewBhvlV0= + +Name: system/etc/legal/leaflet/en/End-User-License-Agreement.html +SHA1-Digest: vSELjiE+/j0UJagJ4/3yBPLwOV4= + +Name: system/etc/legal/leaflet/images/icn-main-touch.jpg +SHA1-Digest: r4wTeg0INqbqgt4X3JVGlmQTvJw= + +Name: system/media/audio/ringtones/SitarVsSitar.ogg +SHA1-Digest: YoXG+H6OGcxAYaZTZ2szh2iCnKY= + +Name: system/etc/legal/leaflet/images/SIGNATURE-DOC-low.jpg +SHA1-Digest: HY+JccVvgwlGnbb65QLQJqxHb24= + +Name: system/lib/libstagefright_avc_common.so +SHA1-Digest: BtTF+4ahI0FVaDiTYk3l3AIXrVY= + +Name: system/etc/permissions/com.sonyericsson.cameraextension.xml +SHA1-Digest: PIcpjGV0fmVlLzaCTkuwtDn3Jd0= + +Name: system/media/audio/notifications/Helium.ogg +SHA1-Digest: 895BCJqtlxi9Bhh0Rz/PyyFQemE= + +Name: system/etc/firmware/efs1.mbn +SHA1-Digest: 5DjTDlC8RJKyBsjBztdaLhby3Yw= + +Name: system/etc/legal/leaflet/iw/SIM-card.html +SHA1-Digest: Gi89bcFqAZ0gJV5FODQ+eYiKyZk= + +Name: system/vendor/camera/SEM02BN0_IMX132.dat +SHA1-Digest: O+Qn0Ba/iOeC9YM+uc/8iu/nfSA= + +Name: system/lib/libdiskconfig.so +SHA1-Digest: 2dvY4oD89vTad+jgEdm5ohBp4vs= + +Name: system/bin/ta_param_loader +SHA1-Digest: W1jyWWVxm2XQw1+FNGStGpN17i4= + +Name: system/etc/legal/leaflet/images/LEGAL-FRENCH-AUDIO-WARNING-low.j + pg +SHA1-Digest: Teg89Z9cd4SjCK9QqESGjDQ6Wx4= + +Name: system/etc/legal/leaflet/hi/What-we-will-do.html +SHA1-Digest: cMDlp9khj4GiyIrvFPUMbS6XIOo= + +Name: system/etc/legal/leaflet/vi/Emergency-calls.html +SHA1-Digest: fJrc2TuMz5g7pFMJnzqdHi4MbnQ= + +Name: system/etc/firmware/wcnss.mdt +SHA1-Digest: t/JIpFQP5qOCssTb9PvlmkX8W+0= + +Name: system/bin/system_monitor +SHA1-Digest: 2figE+Iuy4z7oElBqESgRe5o67s= + +Name: system/etc/legal/leaflet/hi/SIM-card.html +SHA1-Digest: 91DwRk1SulS2PzEHgEHFz0f7e/Y= + +Name: system/etc/legal/leaflet/th/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: DCCZeIGfRtYVADMfejUSvgZxxBw= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Our-warranty---12.html +SHA1-Digest: fJeMWYu3fqsBeuVrXBOdlv2as+k= + +Name: system/fonts/DroidSansTamil-Bold.ttf +SHA1-Digest: oSDuoNatRJoV24tZWDAT4L26Fw0= + +Name: system/etc/legal/leaflet/bs/index.html +SHA1-Digest: RjrveHFeAXcTouwoW9MsL/sD7ZA= + +Name: system/etc/security/cacerts/3a3b02ce.0 +SHA1-Digest: SQgeiwC1dSnuF8xaVn3NAriZV0M= + +Name: system/lib/libennjubase1gb.so +SHA1-Digest: QFS8gH/noBmAxH7fwGci/7cqnEs= + +Name: system/media/audio/camera/sound1/start_rec.m4a +SHA1-Digest: 8z9/mYHA4nsASGsmcUzKegCs8E8= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Disposal-of-old-electrical- + and-electronic-equipment.html +SHA1-Digest: y8+XZ4HLPuLWDQwa+Ncxl5QH0wI= + +Name: system/media/audio/alarms/am_alarm.ogg +SHA1-Digest: Dnvx7B17QtzXGlGwzkwU0ys37SY= + +Name: system/etc/legal/leaflet/sr/Memory-Card---legal.html +SHA1-Digest: MvbVZAZD1BZO+84BDh0AHZiPX5A= + +Name: system/media/audio/notifications/Cobalt.ogg +SHA1-Digest: SeZGH97zAL2SB240pp7TpZY2l8A= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor3.so +SHA1-Digest: ja6seDiusXfHBH47kGJAfE2ahE8= + +Name: system/app/SemcAlbum.apk +SHA1-Digest: 2CHzEVBnEv6At8twVSQEZE3Vm+k= + +Name: system/etc/legal/leaflet/en-PB/Important-information.html +SHA1-Digest: wGV6Di3sQTir76YEYmr2//n9FtQ= + +Name: system/etc/legal/leaflet/uk/Conditions.html +SHA1-Digest: EQYHPL+tJhybQIazY0qyrCDh0CQ= + +Name: system/etc/legal/leaflet/th/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: cSnc6AmEWBkOoP8gmaaOaILxiPY= + +Name: system/etc/legal/leaflet/in/Power-supply-(Charger).html +SHA1-Digest: EAnMxiN3p6biAY6cF3ulf+Thnx0= + +Name: system/etc/legal/leaflet/ae/no-title.html +SHA1-Digest: FLMlAq3pFT6AT1J3hnTgO/LSHzk= + +Name: system/etc/legal/leaflet/fa/Battery.html +SHA1-Digest: RSJfDD1ixmQY2vrqFQc+cK269x8= + +Name: system/app/GreenTheme.apk +SHA1-Digest: DAyhdkdd78+vteXKZ9861qFFxzQ= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor10.so +SHA1-Digest: eY4L2KYUmuh+gYmUYj/Qz/yeR7g= + +Name: system/etc/legal/leaflet/ko/Protection-of-personal-information.h + tml +SHA1-Digest: PGsOwFBHE/BtK87N+v4WV+vbqxQ= + +Name: system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf +SHA1-Digest: VPIIUnYFs4j9yMZ+a+S12pnlS/0= + +Name: system/etc/permissions/qcrilhook.xml +SHA1-Digest: 3Vkj3ZE81t0VRzOFMnCdDmf3d/Q= + +Name: system/etc/legal/leaflet/pt/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: t5m5iWawx7RMjI7ErFkWHcrEOQY= + +Name: system/etc/firmware/cyttsp_8960_cdp.hex +SHA1-Digest: hQeTpk7c838g1NuGni8tvuLSuKU= + +Name: system/framework/com.sonyericsson.uxp.jar +SHA1-Digest: JhVBpwD7DxfUY0gQNTCDC4LJCWg= + +Name: system/lib/libaudioeffect_jni.so +SHA1-Digest: fKImUsu9lLp6KxF0moTD+4q2rAI= + +Name: system/lib/libdrm1_jni.so +SHA1-Digest: lFHyqRgdgYXcNI0uKtG2m8ko5bE= + +Name: system/etc/legal/leaflet/vi/SIM-card.html +SHA1-Digest: UopLd6iO3r5B7lOpGERBb1PPYrA= + +Name: system/app/RecentCallsWidget.apk +SHA1-Digest: 13bxWOknh17LhxVzB1YP2Ig2Cwk= + +Name: system/etc/legal/leaflet/ko/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: JMKrB56dFmiOZzFmwRlrclfxwIg= + +Name: system/lib/libwfduibcinterface.so +SHA1-Digest: uXlwjZpXG9pP2moRMs+foxqJf/U= + +Name: system/etc/legal/leaflet/pb/GPSLocation-based-functions.html +SHA1-Digest: 3LH1Nl7GJISX4AQ+tZstpsAw3fQ= + +Name: system/lib/libOmxAmrEnc.so +SHA1-Digest: I7e44fySAn0BoSbRwG/cTl3omuI= + +Name: system/fonts/AndroidClock_Solid.ttf +SHA1-Digest: PKbiQAyAy5xWcCKKDeM6mpdw3B8= + +Name: system/etc/legal/leaflet/zh-CN/Loudness-warning!.html +SHA1-Digest: ArFvPMgyuPzOZYDhtPL8OPnz224= + +Name: system/lib/libqmi_csvt_srvc.so +SHA1-Digest: K+hufJct5PEvnnDJudg+W4f56qY= + +Name: system/etc/legal/leaflet/zh-HK/Children.html +SHA1-Digest: /C9rjC0JuKjvaa+Xnyexk7CBrAc= + +Name: system/lib/sysmon/sysmon_disable_charging1.so +SHA1-Digest: 85HXeDqSLbmm9sNUkU4izjFsnMo= + +Name: system/media/audio/ringtones/SilkyWay.ogg +SHA1-Digest: skdmmETxcVqBqsT6a/JPwI7Bgh4= + +Name: system/etc/legal/leaflet/zh-TW/What-we-will-do.html +SHA1-Digest: Q5ZpELMbzDeAPhbnYFcmPlV6jmA= + +Name: system/media/pictures/tallinn_01.jpg +SHA1-Digest: E5V1DTpzDeobXar/UTu5hT8Q648= + +Name: system/app/Sound-Picker.apk +SHA1-Digest: 5L64poM/OqPa6Y4ZBV4LXNGGa5s= + +Name: system/etc/legal/leaflet/en-PB/Accessible-SolutionsSpecial-Needs + ---USROW.html +SHA1-Digest: P9Yd67mfGUSdnYDv+DtIne9T0bE= + +Name: system/media/audio/notifications/reminder.ogg +SHA1-Digest: r6s4SNnuH1Xc/31UUGP176dHznM= + +Name: system/etc/legal/leaflet/iw/Personal-medical-devices.html +SHA1-Digest: JNLaWRBGPSZ8kBid1BwULe0C7C8= + +Name: system/framework/ext.jar +SHA1-Digest: KK/B0PjJO9mqge6lvTIUrMvdV/Y= + +Name: system/lib/libsapporo.so +SHA1-Digest: 3x4OvTT/dKAOPXDHCw7ZQTjjA3I= + +Name: system/etc/legal/leaflet/en-HK/Service-and-support.html +SHA1-Digest: LQG9GGNCp3n6KaZOMpoxWj05EtM= + +Name: system/etc/legal/leaflet/ms/Export-regulations.html +SHA1-Digest: 0o3B3XLR+QcARCuestTzN6yBnEs= + +Name: system/media/audio/notifications/dimension.ogg +SHA1-Digest: oKUAZ9b/dm/gSIpMY1NnCAugOR8= + +Name: system/etc/legal/leaflet/zh-HK/GPSLocation-based-functions.html +SHA1-Digest: +egeoGMPlDddbUeOImkQHA3jqrg= + +Name: system/lib/libxml2.so +SHA1-Digest: cUe5TeiUbt82CGlVMhvZPztwqMM= + +Name: system/etc/security/cacerts/ed049835.0 +SHA1-Digest: DvbVqcuD1h/TVMgfyfSYy3n1G0Y= + +Name: system/etc/security/cacerts/9f533518.0 +SHA1-Digest: 2P7X1cWxI3NzjMsygIUOy6dxMCw= + +Name: system/etc/legal/leaflet/hi/Memory-Card---legal.html +SHA1-Digest: gmco1IyzS41S2z0FWg2tFgDZWQI= + +Name: system/lib/libstagefright_soft_mpeg4enc.so +SHA1-Digest: bT/8iUNtnIn491JIY1KVdXmVMWI= + +Name: system/etc/legal/leaflet/uk/Children.html +SHA1-Digest: d8ZeB5NfUpT46OwHYJcyRcUTeP8= + +Name: system/lib/libwpa_client.so +SHA1-Digest: 7lrFqQJzJkN4OTT8AG7Iqn1MB38= + +Name: system/media/audio/ui/LowBattery.ogg +SHA1-Digest: 1UaA9zNnhg53IXetB/ze0AVzvFw= + +Name: system/bin/linker +SHA1-Digest: 3cvuvTheSZQoev5zeCco+49fREk= + +Name: system/vendor/lib/libWVStreamControlAPI_L3.so +SHA1-Digest: 2idRAnR1GhzWEbE3uEHRFczIWII= + +Name: system/lib/libmllite.so +SHA1-Digest: NcyK+bgUtKlSX47URRdd8bto/EY= + +Name: system/etc/legal/leaflet/hr/Flight-mode.html +SHA1-Digest: XKqRHNsynhCkwaNHz8r8BKUmfoI= + +Name: system/etc/legal/leaflet/xl/End-User-License-Agreement.html +SHA1-Digest: mHcD0TWzHpTfDSrass1geT5D41k= + +Name: system/etc/legal/leaflet/mk/Flight-mode.html +SHA1-Digest: 952TZz855h9ARve/XkMdGf/N7z8= + +Name: system/etc/legal/leaflet/images/btn_search_blue-BIG.gif +SHA1-Digest: kITPvJ2AdKI4/+kTV3IScj5sh+s= + +Name: system/etc/legal/leaflet/ru/Emergency-calls.html +SHA1-Digest: cimNY/q8OHGP0i9wesnMfFTiCSI= + +Name: system/lib/libsolsmetadataretriever.so +SHA1-Digest: 3oz/cDnuh06+8jhVqCwW0/JiM+Q= + +Name: system/etc/legal/leaflet/ar/Malware.html +SHA1-Digest: EbPABwLtCCQTs3cUGMEe1GYNFt0= + +Name: system/etc/legal/leaflet/sq/Emergency-calls.html +SHA1-Digest: Efqnm/wLt0w3MEmGxICgZiap6DM= + +Name: system/etc/legal/leaflet/th/Important-information.html +SHA1-Digest: gKodjH9GK8N6QVvgl32j7DM31S8= + +Name: system/etc/permissions/com.sony.smallapp.framework.xml +SHA1-Digest: ElV3VCMkGSSixzOIUiAJxVN9pP8= + +Name: system/fonts/Roboto-Regular.ttf +SHA1-Digest: jlT03ygs6K+WSYdmRK9fhzTkT+Y= + +Name: system/etc/legal/leaflet/cf/Emergency-calls.html +SHA1-Digest: bNw1aiFaIr0gx88qa594rL47Rs8= + +Name: system/app/Nfc.apk +SHA1-Digest: B4aE5AjsEtC5hEUHRoX7yT853g0= + +Name: system/usr/share/bmd/RFFspeed_501.bmd +SHA1-Digest: O4W+YPqIxPg5c57Ny/tsqS1RV8M= + +Name: system/etc/legal/leaflet/iw/Precautions-on-Memory-Card-Use.html +SHA1-Digest: M6FV7/I11hMqeGpg63R44GED1wA= + +Name: system/etc/legal/leaflet/en-HK/Flight-mode.html +SHA1-Digest: 1uHjtJ+FgkNnRC//hRONrCd+32o= + +Name: system/app/ExternalKeyboardJP.apk +SHA1-Digest: r+ItSwF5EVBVGCvvJslPz0/Q1W4= + +Name: system/etc/legal/leaflet/vi/What-we-will-do.html +SHA1-Digest: MmBJiWq8p7X9LEeAnTtzxtpsqJs= + +Name: system/etc/legal/leaflet/ar/Loudness-warning!.html +SHA1-Digest: a/l7R5srz1XOLsVjjQ7CWvjuG8Q= + +Name: system/etc/legal/leaflet/ru/Service-and-support.html +SHA1-Digest: qZnLZd7g9tBUPxYL8Ek0SYsT2Cs= + +Name: system/lib/modules/mmc_test.ko +SHA1-Digest: nAu8WVBy2w+JjKqBOhJDMzykp1I= + +Name: system/fonts/Roboto-Bold.ttf +SHA1-Digest: tohglY0iiJgDoncAZyqqWqBz6XM= + +Name: system/usr/xt9/SEMC_810_r1-2_DAusUN_xt9_2.ldb +SHA1-Digest: HjpJ3Z/Hj5BCcfH8aB/tZ6w+vh0= + +Name: system/app/storefront.apk +SHA1-Digest: lhwCXw0WA7mMJ1E4gz3EoJJJnGU= + +Name: system/lib/libpaadapterjni.so +SHA1-Digest: OTNroP6If627ggzQVzZn3QgddtM= + +Name: system/etc/snd_soc_msm/snd_soc_msm_Taiko +SHA1-Digest: rRFA+PHJPGA4zI3FJEYZyXUtLbQ= + +Name: system/usr/xt9/SEMC_810_r1-5_TLlsUN_xt9_2.ldb +SHA1-Digest: +fxXuKeXA4dYIkdqZhJQJXoyK4Y= + +Name: system/etc/legal/leaflet/en-HK/Geographical-scope-of-the-warrant + y---zh-zt.html +SHA1-Digest: PSgZNZS7M8PoAurHtjjiKfm3uVg= + +Name: system/etc/legal/leaflet/hi/no-title.html +SHA1-Digest: gmSoSdFgW52bpZMQ9YilkJJAnuw= + +Name: system/etc/legal/leaflet/in/GPSLocation-based-functions.html +SHA1-Digest: ZjTm/9wG9gGx8XQcIquFrH8ZT2E= + +Name: system/lib/libpatts_engine_jni_api.so +SHA1-Digest: +rzAJro6Sh+VO647jFXieIgGJps= + +Name: system/app/SemcTvOut.apk +SHA1-Digest: XE8okE2a59Z1DjI32IphZ+c7n0Y= + +Name: system/etc/legal/leaflet/hi/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: bER+h+8NzLb01nbd+w9i+3KLq7k= + +Name: system/etc/legal/leaflet/pb/Important-information.html +SHA1-Digest: AB+EakTItBalT3PdBWJiZgz4ngI= + +Name: system/lib/libsrsprocessing.so +SHA1-Digest: +ueddJYCklwjwKhfNRsFoEU6/D8= + +Name: system/media/audio/alarms/clockwork_music.ogg +SHA1-Digest: SLphba6pVnxPcEHNsbz7i9GBrc0= + +Name: system/media/audio/ringtones/Terminated.ogg +SHA1-Digest: +YxryNPCIPgnrwApbBmIyxPJtA0= + +Name: system/etc/legal/leaflet/sq/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: +SfZ4t3xiJd7mnbFGrJfHwZqoMs= + +Name: system/lib/libicuuc.so +SHA1-Digest: dwM0ZsrGgxB2A3QncaE3OtedXB8= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Copyright-and-trademarks- + --Legal-leaflet.html +SHA1-Digest: Woo1Tyy76+y2Xc+eBQli9rmtrTI= + +Name: system/lib/libwiperjni.so +SHA1-Digest: CBbdee+sg35L8dYgcUeaAvqmQEE= + +Name: system/semc/chargemon/data/charging_animation_05.png +SHA1-Digest: mcFYVEFg5uz6KcdH1lOemhb4sWc= + +Name: system/app/SEMCFacebookProxy.apk +SHA1-Digest: WiRvgotbC7BJQtOWc4LEe25pD8o= + +Name: system/etc/legal/leaflet/fa/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: fVdxTjV+cs3baH++e3sXDCdzcic= + +Name: system/lib/libmpqaudiocomponent.so +SHA1-Digest: OQy+dzFKCNNhtTrTUsIeBOMHuwQ= + +Name: system/app/textinput-chn.apk +SHA1-Digest: d7h1EcqwvO2eh+n9SmfOgtkGbg4= + +Name: system/bin/mcDriverDaemonQC +SHA1-Digest: jzT7AIKn/tx7/sJvMuap0Ybrsrg= + +Name: system/etc/legal/leaflet/xl/Memory-Card---legal.html +SHA1-Digest: WfzjdqP6QkXU7zoSMgxYqyA25zo= + +Name: system/etc/legal/leaflet/xl/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: VQY6dZIZ7am7lmhmtY3H/xbTyLA= + +Name: system/bin/usbhub_init +SHA1-Digest: wEDyTpEclLJFxUWHzxsKwFtLdNk= + +Name: system/usr/srec/config/en.us/dictionary/enroll.ok +SHA1-Digest: RuJqPgJuq9pkqvVscU5w1p03aas= + +Name: system/etc/legal/leaflet/images/Tip.jpg +SHA1-Digest: vo6wYOmnuAV9fVDfZhK9uZ4O/F4= + +Name: system/etc/permissions/com.sonymobile.settings.illumination.xml +SHA1-Digest: Rf6slv8oBgnUuiSpZb2fmPyYF2U= + +Name: system/lib/libmmjpeg_interface.so +SHA1-Digest: wsNPaEPp/YyKBmlA1j7Nn29CCsU= + +Name: system/etc/legal/leaflet/en/no-title.html +SHA1-Digest: 6LLa4gPaKYz4+WaStz9uy6be/HA= + +Name: system/lib/libOmxCore.so +SHA1-Digest: /wRHJH1K7svCvNZR+9rZIXAEWkc= + +Name: system/etc/legal/leaflet/pb/End-User-License-Agreement.html +SHA1-Digest: sXfTGuaEwDk0zw/l3+NWJZLs/JA= + +Name: system/etc/legal/leaflet/ar/Children.html +SHA1-Digest: 3Ar7ynjBOzhSPk3GYw+iTRyFO38= + +Name: system/etc/legal/leaflet/ko/Important-information.html +SHA1-Digest: iCTgyVw8Z2YGhxjPxn55HoESl2s= + +Name: system/etc/legal/leaflet/images/_Tip.png +SHA1-Digest: g5/AJlUsD6G0jZzi9/BTd1DYfu4= + +Name: system/etc/init.netconfig.sh +SHA1-Digest: t+KhdUizb36bJ8vgP4sQxq6GX5U= + +Name: system/etc/ppp/ip-up-vpn +SHA1-Digest: ofvN6+uaD7qiWvshpcwmX5jRU90= + +Name: system/lib/libandroid.so +SHA1-Digest: EZgUJFKl3MSzk+7bt7+i89TzDXk= + +Name: system/usr/xt9/SEMC_810_r1-3_THlsUN_xt9.ldb +SHA1-Digest: yEuGpRUEwwsTirUX52TLQeNOOow= + +Name: system/lib/libcrypto.so +SHA1-Digest: AKxPsRlC+nv7lhNHk+H8J7NvXyE= + +Name: system/etc/legal/leaflet/uk/GPSLocation-based-functions.html +SHA1-Digest: g5zCDG4SSvEOrD6oHMPtXaDRm+M= + +Name: system/lib/modules/dma_test.ko +SHA1-Digest: iE1L+Nhe105aTGPe5aeNHB6CVFA= + +Name: system/etc/legal/leaflet/mk/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: ijufo3SVX+UQf9g8BbntXn5IfXA= + +Name: system/etc/legal/leaflet/zh-CN/Antenna.html +SHA1-Digest: 4oqg2ql10jPQts9LdAmDMzjrO6A= + +Name: system/etc/legal/leaflet/pt/Conditions.html +SHA1-Digest: tXqaJY8w3HEoWY4SZVcA4sNwyQ0= + +Name: system/app/SemcUnplugChargerReminder.apk +SHA1-Digest: Ov+RTWxoN/r17Qfeguwjv/0LANM= + +Name: system/media/audio/alarms/blips.ogg +SHA1-Digest: 8BIxVjOCdVeUSU4JYODVM08dcyA= + +Name: system/lib/egl/libq3dtools_adreno200.so +SHA1-Digest: +jp8aPL21okppK96Q3WFI+YLp04= + +Name: system/etc/legal/leaflet/xl/Limited-Warranty.html +SHA1-Digest: W4XXejF2kE5Yy16V1x2JdBBxmW4= + +Name: system/media/audio/ringtones/CrazyDream.ogg +SHA1-Digest: eX9VX7eX3PDq9cKX6PZR7FOMM/U= + +Name: system/media/audio/notifications/Capella.ogg +SHA1-Digest: wfOeM3JUxqtFbVqpVaacOwM5s/4= + +Name: system/etc/legal/leaflet/ms/Publication-number.html +SHA1-Digest: 7gfx5zWkaE90E2rZJj8CUfzs+24= + +Name: system/framework/input.jar +SHA1-Digest: OYehgUTfUfIF29/NIa2d7BPoYS4= + +Name: system/media/audio/ringtones/Revelation.ogg +SHA1-Digest: j/nuANHX4DpAJPZka+/sxa00tcQ= + +Name: system/etc/legal/leaflet/sr/Malware.html +SHA1-Digest: yhvA5wOsIaszrSC99/0FME0COw0= + +Name: system/etc/security/cacerts/85cde254.0 +SHA1-Digest: vcr8bqyL/bCXu4bxqRiOyJ8rkls= + +Name: system/etc/legal/leaflet/bs/Power-supply-(Charger).html +SHA1-Digest: /2EGpcGBm+eyIFi8S5Aso+XV1Yc= + +Name: system/bin/svc +SHA1-Digest: /1od6413nm4+hNXDHR4zepttND8= + +Name: system/framework/android.test.runner.jar +SHA1-Digest: D5qvun86VNLIwr97L6YN3FqITRw= + +Name: system/usr/keylayout/Vendor_046d_Product_c21d.kl +SHA1-Digest: rpoK2N5hQGGL/FhSJVboaNuy5Tc= + +Name: system/etc/legal/leaflet/kk/Antenna.html +SHA1-Digest: V2hnPM9aKyQiod8jLytjaJWfYdo= + +Name: system/etc/legal/leaflet/ae/index.html +SHA1-Digest: 39bEV15H9y4IqfQo4CIoktvzmqY= + +Name: system/etc/security/cacerts/2fb1850a.0 +SHA1-Digest: tpQ/ebm+s27cmkePsnMxlzdMwcc= + +Name: system/etc/legal/leaflet/en-HK/Power-supply-(Charger).html +SHA1-Digest: tpLChDKW8S4+SD0L+tSZUfBWq2Q= + +Name: system/etc/legal/leaflet/ko/Accessories.html +SHA1-Digest: qBv6hlGifSBCEvajc5x4D70JixQ= + +Name: system/media/audio/ringtones/Nairobi.ogg +SHA1-Digest: jqBOwFqJGRRgL1idGyQAghO0wtA= + +Name: system/lib/libQSEEComAPI.so +SHA1-Digest: VvR5EPL9uJ6Os+hAtb4iE6GkD24= + +Name: system/etc/legal/leaflet/sq/Antenna.html +SHA1-Digest: D08zTtjO4/hANEk5vhAYf6uOE3c= + +Name: system/etc/firmware/leia_pfp_470.fw +SHA1-Digest: MmyTkoBM53apTZk+VQC1uDHQdcE= + +Name: system/tts/lang_pico/es-ES_zl0_sg.bin +SHA1-Digest: dX1TIDkkkvgY3gnXGkcrIO1D/Fs= + +Name: system/etc/legal/leaflet/ms/Driving.html +SHA1-Digest: BusdM8ggcMiWRvfeJYVlaOrLF80= + +Name: system/etc/legal/leaflet/th/SIM-card.html +SHA1-Digest: iQ99POuaAFBoQTvnO2NX34qP39k= + +Name: system/etc/legal/leaflet/in/Flight-mode.html +SHA1-Digest: exdfCpVuzJVr8ortuUDwYQF8Obk= + +Name: system/etc/legal/leaflet/cf/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: aXesVXgDCGj4zYI9lDdcJYRUQgw= + +Name: system/etc/init.qcom.sdio.sh +SHA1-Digest: raSw2z+mZR3QUNA8heYOUy2q/Ys= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Sony-Ericsson-Consumer-We + b-site.html +SHA1-Digest: PNIaXFbVJMBUqm9yP1CEDm1gc7k= + +Name: system/usr/xt9/SEMC_811_r1-4-10-1_PTusUN_xt9_2.ldb +SHA1-Digest: IlqdCE7EIDF4MfJXWYOiOlyp7O8= + +Name: system/lib/libvideoeditorplayer.so +SHA1-Digest: DsLFl6YNeZAuZ+cJVuCfIy+mDFY= + +Name: system/etc/security/cacerts/1e8e7201.0 +SHA1-Digest: KqgVoWSCtWsuVVi9KeH1TTJ4rlU= + +Name: system/etc/legal/leaflet/xl/Flight-mode.html +SHA1-Digest: yXOpCPgEGho8z3qNXAftkkUGtXU= + +Name: system/lib/libsnpvideoextensionjni.so +SHA1-Digest: +Pu97I/e+iEegzYAgMLWrCaN5Fk= + +Name: system/etc/legal/leaflet/fr/Warning!.html +SHA1-Digest: pJtU1IYwoAPlSOVqb1kDMvlD7KA= + +Name: system/etc/legal/leaflet/bs/Limited-Warranty.html +SHA1-Digest: FFgNRDL7HJ4Uey90nn7SciW/JPQ= + +Name: system/lib/libface.so +SHA1-Digest: ypD9GVLtFjU4yvHuSZu/DwpIT9Q= + +Name: system/lib/libmiscta.so +SHA1-Digest: ZtexHWgToOYTgrQ/mfXdUnb3jqo= + +Name: system/lib/libwfduibcsrc.so +SHA1-Digest: 5KdZXf3zgJleldJJyi+73XguLL0= + +Name: system/lib/libstlport.so +SHA1-Digest: oWTzsPHEI7U4QfqNFa1VDwBFqSk= + +Name: system/media/audio/notifications/climb_up.ogg +SHA1-Digest: /JWUJcUxDNeTATqK6gMqCYpl0+Q= + +Name: system/etc/usf_post_boot.sh +SHA1-Digest: zOsRcAzeNZj0UNH0An+Z6hOcwEI= + +Name: system/lib/soundfx/libhearingprotection.so +SHA1-Digest: 1zZNU1gqP9iEIIohYH18eSGLu10= + +Name: system/bin/mdnsd +SHA1-Digest: 6Z8G1tFwVBWep8Eq0EavzvhSsiA= + +Name: system/lib/libjnigraphics.so +SHA1-Digest: y6eXKrFABSLOjwyQNsXHReIOAn0= + +Name: system/media/audio/ringtones/Ring_Digital_02.ogg +SHA1-Digest: WHoq2UDmvxwBCGUE0sD5Ns6UCqg= + +Name: system/etc/legal/leaflet/ar/SIM-card.html +SHA1-Digest: Ka2VQxjumqScNRfhCjFeWLbn6Pg= + +Name: system/app/SimlockUnlockApp.apk +SHA1-Digest: ks+2xS8mI2eKwSnA3MmsFor3+2E= + +Name: system/etc/permissions/org.simalliance.openmobileapi.xml +SHA1-Digest: RYExzDBpmu8O2ugLirAo23VnWGQ= + +Name: system/lib/libsysutils.so +SHA1-Digest: duPLfzeqQSN7jj2egX5Xa7eqmQ8= + +Name: system/bin/mm-audio-alsa-test +SHA1-Digest: xsGFyj2/GsAMiEYRcyx3KHDlOxw= + +Name: system/lib/ssl/engines/libkeystore.so +SHA1-Digest: jKLTuDvLYLsadhMTdTp6m16r/YQ= + +Name: system/etc/legal/leaflet/ms/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: gT5oodd952hQm5Dm4Y/zP3mdHM8= + +Name: system/etc/legal/leaflet/in/End-User-License-Agreement.html +SHA1-Digest: aLTJTiSaGP866Xcrb2bUxBHC5BQ= + +Name: system/etc/sysctl.conf +SHA1-Digest: iVrVltgLdAje7eB0qNge6IZDI18= + +Name: system/lib/libgps.utils.so +SHA1-Digest: 9abf543KecTTJV+/ypCD7wmo2gs= + +Name: system/bin/hciattach +SHA1-Digest: NWhCGbJAOlCNe3/BGGOhkFZUs5c= + +Name: system/etc/legal/leaflet/pb/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: vslLN0oYlh1DM7JreYo0vyQH6LA= + +Name: system/etc/legal/leaflet/hr/Precautions-on-Memory-Card-Use.html +SHA1-Digest: A+rxaqxfd/isX/BukcWYPAjTiEs= + +Name: system/etc/legal/leaflet/th/Service-and-support.html +SHA1-Digest: mzIciFMLrJD9cgCMSBbcyon3gSU= + +Name: system/lib/libaudcal.so +SHA1-Digest: OzerQatitM4F3bzzWBQmUnLquSk= + +Name: system/media/audio/ringtones/MidEvilJaunt.ogg +SHA1-Digest: 7eVWa16lsTOJKF2duDDOC6eSo38= + +Name: system/framework/com.sonymobile.media.dashboard.extension.jar +SHA1-Digest: 6rcELpo6DCngOJhvUw6fEgSwK4o= + +Name: system/lib/libFileMux.so +SHA1-Digest: qiJT/KGbyySu8zB/oTAgojQkwNU= + +Name: system/etc/audio_policy.conf +SHA1-Digest: EMgus0cyEDKqmuRldUxIHx4gelg= + +Name: system/usr/srec/config/en.us/baseline11k.par +SHA1-Digest: LAxT4ug59UO7cj2ezMGlctM/8iM= + +Name: system/etc/legal/leaflet/iw/Memory-Card---legal.html +SHA1-Digest: teqjCQIessmgS8AI+jf8hBkrpbs= + +Name: system/etc/legal/leaflet/ko/Battery.html +SHA1-Digest: 3c1rKcO/DJH+V9ScUfCV/MiZXlw= + +Name: system/etc/legal/leaflet/kk/Warning!.html +SHA1-Digest: 8h+MXGYgyXivqujW2yP6ZHY3Tvg= + +Name: system/lib/libv8.so +SHA1-Digest: IQ7Mw/sOH1aj36fgr5BH+b2roAk= + +Name: system/app/DownloadProvider.apk +SHA1-Digest: CSRuMdypYc540sD2PWmaLFbyyDM= + +Name: system/app/SomcPlayAnywhere.apk +SHA1-Digest: x8yfTK5BN25AROn4XBmyvWAjze0= + +Name: system/lib/libril-qc-qmi-1.so +SHA1-Digest: t8o1RNxolNNbNkgFt3h6jogyK8g= + +Name: system/bin/mm-jpeg-enc-test-client +SHA1-Digest: PsVd0z+kCy31WHVsT53b1zOV3z0= + +Name: system/etc/legal/leaflet/zh-HK/SIM-card.html +SHA1-Digest: ZV1qNZM8qhxKuQk4g++cWrxCGtQ= + +Name: system/lib/libqcci_legacy.so +SHA1-Digest: FtbBT9zZkx+9uxG9d3sus99a9J0= + +Name: system/etc/permissions/com.sonyericsson.eventstream.xml +SHA1-Digest: 0ys2KGwAA3OiuffFoiUsM6ne40g= + +Name: system/app/GenericApplicationInstaller.apk +SHA1-Digest: BN2OgRZpf47wlnBbP4VHvkVlQUQ= + +Name: system/etc/firmware/wlan/5g_mid +SHA1-Digest: nwQB56+feNY/MTSb8Ql+kOZdRDk= + +Name: system/etc/legal/leaflet/styling/mBWcommon.css +SHA1-Digest: I0Q00KVFSVfOOyN+sFZww/iW3QY= + +Name: system/lib/libalsautils.so +SHA1-Digest: d9oSCFyVStx32P1bLjPmU8hbHsw= + +Name: system/media/audio/notifications/Canopus.ogg +SHA1-Digest: nHcoEDdFrcmBIIi9e1aYmFF4Rag= + +Name: system/xbin/su +SHA1-Digest: x8jkiMlX36B1tj+XABuDDQ8lNdc= + +Name: system/media/audio/notifications/Aldebaran.ogg +SHA1-Digest: 4+F/3PFpx8eULQPkdNx0e8+1+xw= + +Name: system/etc/legal/leaflet/zh-CN/For-Devices-Supporting-3D-Viewing + -capabilities.html +SHA1-Digest: dvuDtUmFfU4lQUNo0j03jRnPp1c= + +Name: system/lib/libcutils.so +SHA1-Digest: 8eJGIfC9jpYTNnT6fqTbrjQNLXI= + +Name: system/lib/libmmparser.so +SHA1-Digest: U0b5PRtU+p+n0Zuz1zmvQXbCWfk= + +Name: system/fonts/RobotoCondensed-Bold.ttf +SHA1-Digest: ZCg1lMs131P06MLQgm2d/Hailvs= + +Name: system/etc/legal/leaflet/mk/no-title.html +SHA1-Digest: LAS/QuvlQN+5L2rf0Q6xewi4aEo= + +Name: system/etc/sysmon.cfg +SHA1-Digest: zRumP91v1hxbfeMnkM5JI6IEE5w= + +Name: system/etc/legal/leaflet/hr/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: nSRPX77ChcwXvtEMDBHVpyXgT/0= + +Name: system/etc/legal/leaflet/cf/Conditions.html +SHA1-Digest: 7SiRPjRzUacGWKXD64GGZ7qMu2A= + +Name: system/framework/com.android.nfc_extras.jar +SHA1-Digest: lEK6gYV3eOcskuLeJtStTjo5B6A= + +Name: system/etc/legal/leaflet/images/btn_search.gif +SHA1-Digest: N+VLY6QkT7u697xjJ38cHFbxFew= + +Name: system/etc/permissions/com.sonyericsson.system.xml +SHA1-Digest: +bazSRQ0+diZZ3bPvej1Ds/uZUQ= + +Name: system/etc/legal/leaflet/sq/SIM-card.html +SHA1-Digest: XO7bST1aA6NxyXLkuyVNCUAAdBw= + +Name: system/bin/bu +SHA1-Digest: ssJV8rKixa6InHKnBAhyFrsGwa8= + +Name: system/etc/legal/leaflet/fa/Publication-number.html +SHA1-Digest: TAkzmdRV1MyFzIhH3QZq3mud6Pw= + +Name: system/lib/hw/audio.primary.default.so +SHA1-Digest: 6JzZZHgMdKTPj+1eHrLpMajmz+w= + +Name: system/etc/legal/leaflet/en/Driving.html +SHA1-Digest: xxv4fODAlKYZqu0vW0maRmfkhT4= + +Name: system/etc/legal/leaflet/fa/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: AcPM07VGvR2YGF7BqLGhP3ib6T0= + +Name: system/etc/legal/leaflet/images/arrow_turnpage_l.png +SHA1-Digest: 0BeOvld2pcJLPztCE261SK09uRc= + +Name: system/usr/keylayout/clearpad.kl +SHA1-Digest: WLY4H/Dh0sb97XRsIVU8JJh0AC0= + +Name: system/etc/legal/leaflet/sr/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: 2rJzYk1A6Hx6KYBi5Cl1lrmxwSM= + +Name: system/etc/snd_soc_msm/snd_soc_msm_2x_auxpcm +SHA1-Digest: jOOxSau6yQe+SAGXlQMuHR8nLdY= + +Name: system/lib/libimage-omx-common.so +SHA1-Digest: Gcl42ovD3k9QzUCngA05PvQOXFg= + +Name: system/usr/xt9/SEMC_810_r1-4_GLlsUN_xt9.ldb +SHA1-Digest: 2QXATisOyN9A28YBysRsHDWjwns= + +Name: system/etc/legal/leaflet/sq/no-title.html +SHA1-Digest: SrfKsZFfsavs9jVY53ih+Nh3wXA= + +Name: system/etc/legal/leaflet/ar/What-we-will-do.html +SHA1-Digest: K67uuKfajFdFz6324o4vPJQXq3k= + +Name: system/bin/ftmdaemon +SHA1-Digest: 9zxhN8p9y2fBXzkx00izku0si2c= + +Name: system/app/HTMLViewer.apk +SHA1-Digest: bCpcBKMQJ07LlcvxDCxj+S/YL6o= + +Name: system/etc/legal/leaflet/bs/Precautions-on-Memory-Card-Use.html +SHA1-Digest: o7d3K1meqtgHCgrnjzo1e41WXSY= + +Name: system/etc/permissions/com.google.protobuf-2.3.0.xml +SHA1-Digest: nZE1F5Q6hgKUBwKPM1V0hSSzc14= + +Name: system/bin/mm-qcamera-test +SHA1-Digest: z4kB/V+sbiWDz85NJ08WLuuoJ50= + +Name: system/bin/am +SHA1-Digest: JU7gkgpcGs2BY+uIS5nNG1/nRtY= + +Name: system/app/GoogleLyricsPlugin.apk +SHA1-Digest: mKqmWBAka9/rzFIUB1C7B/8/zPM= + +Name: system/etc/legal/leaflet/th/Accessories.html +SHA1-Digest: IB801+sL/F17R9zaAKv9+wD4OkY= + +Name: system/vendor/camera/SEM13BS1_WV570.dat +SHA1-Digest: kQX5rIM9GI1f63Py/ORYRt0QJ4k= + +Name: system/etc/permissions/com.sonyericsson.privateapis.xml +SHA1-Digest: Ksy6H8ZQjFwyvLztOAmlwgGcpfQ= + +Name: system/bin/ta_qmi_client +SHA1-Digest: 5MkRi2Ge9rY+Bq/6x6auiu4HD6Y= + +Name: system/lib/hw/keystore.default.so +SHA1-Digest: WFgpHlQ3vl7TxW71sjI9Mypc2MY= + +Name: system/lib/lib_get_secure_mode.so +SHA1-Digest: mXZKJrF8MBR6JwXc+j7TG6Y3OCY= + +Name: system/app/CredentialManagerService.apk +SHA1-Digest: dt7svrW/oTefHip78viaVvID6mk= + +Name: system/lib/drm/libmarlinplugin.so +SHA1-Digest: MjGYyVy0sZ2zxZYYwqrNrxsQJko= + +Name: system/bin/bluetoothd +SHA1-Digest: Ing60m+r7Musn1ZPoNnJXk5L+YQ= + +Name: system/etc/qosmgr_rules.xml +SHA1-Digest: I6ChC6y7nEFeVyo43gxTeM16IP0= + +Name: system/lib/libbson.so +SHA1-Digest: hH7D4h1l4CmAWbRolF90wGdQAOg= + +Name: system/lib/libbluetoothd.so +SHA1-Digest: fbHgA9YT40UaqRvml9Cb07Kw/74= + +Name: system/etc/legal/leaflet/ko/Limited-Warranty.html +SHA1-Digest: EoaKTXbqrKXxJdSBo5XQIFhUxu4= + +Name: system/etc/permissions/com.sonyericsson.metadatacleanup.xml +SHA1-Digest: ClfqHqsOJErP2kNBJR5iURUXbTA= + +Name: system/etc/legal/leaflet/en-PB/Radio-frequency-(RF)-exposure-and + -Specific-Absorption-Rate-(SAR).html +SHA1-Digest: AqnvDiYasE2J/7Y6Y5+YqKcX4so= + +Name: system/app/SmallApp-Recorder.apk +SHA1-Digest: IxiBpY6wnV9QCneq5puzcqdBTEM= + +Name: system/fonts/DroidSansHebrew-Bold.ttf +SHA1-Digest: TuR/SCZHlNxWFl5ftrhCebjvNrI= + +Name: system/media/audio/notifications/Merope.ogg +SHA1-Digest: NJMO8M+Gc2cB+/CREvFtm2hSHhg= + +Name: system/etc/legal/leaflet/zh-TW/Accessories.html +SHA1-Digest: Y2jD/6/y9rQTrcpN72ZjpL8nX/s= + +Name: system/media/audio/ringtones/BussaMove.ogg +SHA1-Digest: Cz3gNJTSKQtOWFJaYwwoNLlHwtY= + +Name: system/vendor/lib/libwvm.so +SHA1-Digest: nAEwSIUgRkMcajPxltknq1rgzXQ= + +Name: system/etc/legal/leaflet/pt/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: O+w3WyrGMfENPKcMn/SPM4jB0Q4= + +Name: system/etc/legal/leaflet/cf/no-title.html +SHA1-Digest: gD8tE4m+wK0fRjNIUI1DwsVjiu4= + +Name: system/framework/qcsemcserviceif.jar +SHA1-Digest: Xq1HrF9M7gYXU8nm0okX5CFMWG8= + +Name: system/lib/soundfx/libbundlewrapper.so +SHA1-Digest: GAYYoXeb3xA7bbgymcuD7pRt98U= + +Name: system/media/audio/Miguel - Adorn.mp3 +SHA1-Digest: egIj4RNIPb0pWRhpNW9KuQmTb+Y= + +Name: system/etc/legal/leaflet/hi/GPSLocation-based-functions.html +SHA1-Digest: A/GKARcJHT/aTeM58UocXXz5Nzc= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Protection-of-personal-info + rmation.html +SHA1-Digest: ZVzH/Yrezal0bVXM+l29NvRA/qU= + +Name: system/lib/hw/gralloc.default.so +SHA1-Digest: E30zE+X7ftLFAz8ZBJd6yEWMQSM= + +Name: system/etc/legal/leaflet/sq/index.html +SHA1-Digest: vYguDmcQQmWcJMdZwHbPnGCpvtw= + +Name: system/bin/MPQDvbCTestApp +SHA1-Digest: gAt6o8u5esvWqsS4iK6yRA8GTV8= + +Name: system/usr/srec/config/en.us/models/generic.swiarb +SHA1-Digest: ji4QTXKau8N4AjzzU5UsqY8aQ7c= + +Name: system/etc/legal/leaflet/iw/Flight-mode.html +SHA1-Digest: U0eVu+rEtG+EBaheY2nZV0EjNFA= + +Name: system/etc/bluetooth/audio.conf +SHA1-Digest: QIf4qgMnUBAYpBtd88h75P/Spug= + +Name: system/etc/security/cacerts/a7d2cf64.0 +SHA1-Digest: ue9ZDnsNcXdGKbdrk7MpOk3dLUM= + +Name: system/lib/libbtio.so +SHA1-Digest: 8jv1TfGzkkH5yvSwKepRYw8orH4= + +Name: system/etc/legal/leaflet/mk/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: 59LQYtbXjmY/isUDn2m8e/OqYn0= + +Name: system/etc/security/cacerts/d16a5865.0 +SHA1-Digest: HwEya3RYnDLYdyMkC8yCmJzSKhs= + +Name: system/etc/legal/leaflet/hi/Loudness-warning!.html +SHA1-Digest: i3CigJ/u1fqPlz/bxcsUaJ9pMzc= + +Name: system/lib/libdss.so +SHA1-Digest: PT0TkX6zwAm7LL2KN1BSs6VpLfg= + +Name: system/etc/security/cacerts/882de061.0 +SHA1-Digest: C44riBaYmFJys31UFiqhZTMc7Ig= + +Name: system/etc/security/cacerts/8470719d.0 +SHA1-Digest: 3gm79ScbKCIpUzG6Fq+8xe+sGnw= + +Name: system/etc/security/cacerts/e775ed2d.0 +SHA1-Digest: QnV/erxTCKUTQ8iuLmezodkrswc= + +Name: system/etc/firmware/vidc.b03 +SHA1-Digest: dg6KpFSRatn6L/ugYLCi30+n2Wo= + +Name: system/etc/firmware/vidc.b02 +SHA1-Digest: YSXzJYbrbxurueOJHfDHQ7N5W+Q= + +Name: system/etc/firmware/vidc.b01 +SHA1-Digest: jKHUaG/0rP/BUfjhugUEDsgpY9c= + +Name: system/lib/libmmstereo.so +SHA1-Digest: fKdql0wK0Hjds95V0j2/VoxcRRs= + +Name: system/vendor/camera/KMO08BN0.dat +SHA1-Digest: VE/9OM/yzKmO4UHzzohd/36WT1k= + +Name: system/app/Backup-Restore.apk +SHA1-Digest: sP6luqHlWu6AqMqJPM8JmVm1CNM= + +Name: system/app/RemoteControlService.apk +SHA1-Digest: D9Ow8cMCi5WHi5XJxYiZmTPugps= + +Name: system/etc/legal/leaflet/xl/GPSLocation-based-functions.html +SHA1-Digest: yF7QzMiPOQa55cT95j2xunffcO8= + +Name: system/etc/legal/leaflet/sr/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: UTiD5VNnwpuzkE0IrMnZD+yztsQ= + +Name: system/etc/security/cacerts/895cad1a.0 +SHA1-Digest: ZfoxSCSC3uyNPPMG27Jrd3n1Ej8= + +Name: system/usr/srec/config/en.us/dictionary/cmu6plus.ok.zip +SHA1-Digest: ACsZaiNkJjr+osByDLYlAO7jbjo= + +Name: system/bin/gzip +SHA1-Digest: JyvMJh12ypgvyR830X5HCttpwHQ= + +Name: system/media/audio/camera/sound1/shutter_done.wav +SHA1-Digest: bVxyQbteRf1ocg4RCkKyQxxMUL0= + +Name: system/etc/init.qcom.wifi.sh +SHA1-Digest: qAddEPouPFwTbgMQ8Mvseqzxkwo= + +Name: system/etc/firmware/vidc.b00 +SHA1-Digest: IjPnR58G3n0zo2pkzwzWwDEtkBI= + +Name: system/etc/firmware/wlan/2_4g +SHA1-Digest: 18hul89an76w0rx/bYSPj6vHbKI= + +Name: system/lib/libjni_pinyinime.so +SHA1-Digest: nh9Fxe7b8CXZvKlI27QK5D6G80w= + +Name: system/etc/legal/leaflet/xl/Battery.html +SHA1-Digest: xx/MqIebWtGY3oAYxXJPPZQ5eT8= + +Name: system/lib/lib_dic_morphem_ja_JP.conf.so +SHA1-Digest: MEpUC+n6Ii+z4XODI+2Fy3gD6Yo= + +Name: system/etc/legal/leaflet/kk/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: bmLEXSi/kF7IBLnpOKoA+FbUEnE= + +Name: system/lib/hw/copybit.msm8960.so +SHA1-Digest: XYMCcUsv7ArbEEh71QcPnfpBzWM= + +Name: system/framework/com.sonymobile.nfc_impl.jar +SHA1-Digest: IDjaE4FGFyWNtN8rW6rzkOisI38= + +Name: system/etc/permissions/com.sonyericsson.autopoweroff.xml +SHA1-Digest: 2nQ6WVAMHa6QMQewgaDI4jASKSA= + +Name: system/etc/firmware/wlan/5g_low +SHA1-Digest: 2fkRyF9iao9y8Hj7Fs0k11i65sM= + +Name: system/bin/mm-mpo-dec-test +SHA1-Digest: N7hq2qSqT+0//yEBW8FSRozvAkI= + +Name: system/lib/pp_proc_plugin.so +SHA1-Digest: nIidtgBEJhmDZsCL1sxo1hgU/ro= + +Name: system/bin/chargemon +SHA1-Digest: 2Vr0lnwk2l0UZUZus4HyxF57Fmc= + +Name: system/etc/legal/leaflet/in/Antenna.html +SHA1-Digest: T6Ogk8Y3YXuc8tbvrClPxQLwxP0= + +Name: system/etc/legal/leaflet/pb/Publication-number.html +SHA1-Digest: nJfhZaldwGwbSjnW+O0I6fX+7ec= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor2.so +SHA1-Digest: 1gJRYMqXynRooaGDautMtIALUFY= + +Name: system/etc/legal/leaflet/images/icon_nav_contentslist.png +SHA1-Digest: ejgycXKMQauYADNd1r5zG1YNtbg= + +Name: data/tweaks/ext4/tune2fs +SHA1-Digest: 4Rn2NnVlEDJKCHwbecEbMlx7hhg= + +Name: system/etc/legal/leaflet/en-PB/Protection-of-personal-informatio + n.html +SHA1-Digest: cAvkSxM8YVDuHjMfzeBKOhqJLtw= + +Name: system/etc/legal/leaflet/pt/Accessories.html +SHA1-Digest: NcERStlFf5k4esNWXmYi44TD6ZU= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/purple_sky_hd1080p_small.jpg +SHA1-Digest: zna6Sz59F6mPLzwHxjHQmStqKVM= + +Name: system/usr/keylayout/Vendor_0810_Product_0002.kl +SHA1-Digest: ZQtI01pLI9qMocla1A1N+uddXZ0= + +Name: system/app/VoiceSearchStub.apk +SHA1-Digest: 3cvlMUpBi0UdY41MJGs3tzWMwrI= + +Name: system/etc/permissions/com.sony.sysinfo.xml +SHA1-Digest: PbBkD/AVodjIznnKQHZOrUIya1w= + +Name: system/lib/libstagefright_soft_pv_aacdec.so +SHA1-Digest: yjKv50vO6cs49+1oVWTcvC2rBBY= + +Name: system/app/VerifyCertificatesDummyAppPlatform.apk +SHA1-Digest: UparGGOhvNsMgo74ZRH+VBFG1z4= + +Name: system/lib/libGLES_trace.so +SHA1-Digest: Ttx9t05BoMkfas61As2N8wWr+84= + +Name: META-INF/com/google/android/update-binary +SHA1-Digest: AoEV03Fg+9ESZ2Fqc7fWLysQZ0s= + +Name: system/etc/security/cacerts/3e7271e8.0 +SHA1-Digest: RuWAcBguGdtlhixJYoOZcOECH4g= + +Name: system/etc/legal/leaflet/ms/Protection-of-personal-information.h + tml +SHA1-Digest: 1IbIIDVzGCCRVuD3/JzvjJVZ4Kg= + +Name: system/etc/security/cacerts/89c02a45.0 +SHA1-Digest: loal9vEQNuqt054EQZ5Bc4v5bGE= + +Name: system/app/FBIAppShare.apk +SHA1-Digest: 70KNUBWzq7Rr5mGAze4ARY3F/v4= + +Name: system/etc/legal/leaflet/in/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: wdIazTaljF5BKcMNdR8o//ndxc4= + +Name: system/app/EnchantedForest.apk +SHA1-Digest: 9nm0y+38c8Gq7D5R+XO4k0sCPOA= + +Name: system/fonts/Lohit-Bengali.ttf +SHA1-Digest: OOgd3P/zjaI4o5nk0LihdpZDvWk= + +Name: system/media/audio/ringtones/Girtab.ogg +SHA1-Digest: VzOLmrpnuttFO6ndb4JAVk1bY68= + +Name: system/bin/screenshot +SHA1-Digest: w+54jyGRk5ZzwBVZOTMKvqHYDsg= + +Name: system/etc/legal/leaflet/hr/Our-warranty---12.html +SHA1-Digest: BRyXZTIVFxl7kvWKZggasTeLu+4= + +Name: system/lib/libOpenCL.so +SHA1-Digest: FI4rd369+5FHUBD0Q0DB9dXuamg= + +Name: system/lib/modules/radio-iris-transport.ko +SHA1-Digest: AhsE2t7Ft8ANncW/64ZRcaAp4XY= + +Name: system/lib/bluez-plugin/network.so +SHA1-Digest: H+wwKV61JlpfVIn8leb9R6Yah0s= + +Name: system/etc/security/cacerts/27af790d.0 +SHA1-Digest: 0cY3bpCx4tRkNSVNjHyk12XB36Q= + +Name: system/etc/legal/leaflet/zh-TW/SIM-card.html +SHA1-Digest: jOSOWjPhTpVNqu7fpZ22XZ+nS2M= + +Name: system/lib/libkaomoji_tyukyu.so +SHA1-Digest: L5ZDGHbPdzMTbpYllwbCA/P45fE= + +Name: system/lib/libaudioutils.so +SHA1-Digest: 9ME96z/ihWgHpnRMh6mcBNIauu8= + +Name: system/etc/legal/leaflet/xl/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: esVLAJ73+UgSzWZF+A2A1JaCUpM= + +Name: system/etc/dop.iso +SHA1-Digest: /qh45amOWg/G7TlvOSr0YUzF/Jc= + +Name: system/etc/firmware/wcnss.b00 +SHA1-Digest: NmK752jE97EvyQ4WHgSJtJFsod0= + +Name: system/etc/firmware/wcnss.b02 +SHA1-Digest: wmybXt/weKSrG6ZP5/+2nlg9YAY= + +Name: system/semc/chargemon/data/charging_animation_04.png +SHA1-Digest: rv/rvfzlOtoSbk2t3dgEGtGY2LI= + +Name: system/etc/firmware/wcnss.b01 +SHA1-Digest: SvoWREnb7rcYYO0o8s5oitaFOH4= + +Name: system/lib/libskia.so +SHA1-Digest: PKo7ZshGP2WughTaiJDZhsg7clg= + +Name: system/usr/srec/en-US/google_hotword.config +SHA1-Digest: u15PKfBvK1oxEnD02hPRCZy5Ez4= + +Name: system/etc/firmware/wcnss.b05 +SHA1-Digest: ZG5boPCYJNrT1UHWC0xwiBiIzfU= + +Name: system/media/audio/notifications/Zirconium.ogg +SHA1-Digest: CaK/jcuzJhuvtunYSKai0mNqW6Q= + +Name: system/etc/legal/leaflet/sq/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: 9VMrT2P/Sbxnq+ygScMT42Bhv8g= + +Name: system/etc/legal/leaflet/en-HK/Publication-number.html +SHA1-Digest: hLj9ndtyP+GD4iN7nCRpBiUsnNM= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Sony-Ericsson-Consumer-Web- + site.html +SHA1-Digest: xHwA5HBedhqIhSkDg4QNLhIkIO8= + +Name: system/etc/firmware/wcnss.b04 +SHA1-Digest: 7aFpObzAcNsJ0MFJ1KC8ohW0t3c= + +Name: system/bin/iw +SHA1-Digest: IrD1uFrzn/DFh13AmjIm9lPZSkI= + +Name: system/etc/legal/leaflet/hr/Warning!.html +SHA1-Digest: E2BzYAlqS+5kzQm8kBtL9uLhZ+I= + +Name: system/bin/ip +SHA1-Digest: tEgNrM/KJ8HyB4s3gQWDi8E7ajU= + +Name: system/etc/permissions/android.hardware.camera.flash-autofocus.x + ml +SHA1-Digest: aDfHvVEe0svv+HGWg3e4S1UZY1k= + +Name: system/lib/libstagefright_soft_rawdec.so +SHA1-Digest: 8G+s9aImm6wKxevQoDxofCNwj4w= + +Name: system/etc/legal/leaflet/ar/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: EAbs1JH1RcPmHsBh1DThnPMwbno= + +Name: system/etc/legal/leaflet/uk/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: EyDUtaPFtA8yNLO7jxxNs+1X5So= + +Name: system/lib/libMcRegistryQC.so +SHA1-Digest: N7b1YWWTYG/AiTW5DCg+LdfUKs8= + +Name: system/etc/legal/leaflet/ru/Limited-Warranty.html +SHA1-Digest: 0ABX7u+3wjb6K5yikHy7m7oyb/M= + +Name: system/lib/sysmon/sysmon_bl_therm.so +SHA1-Digest: LH15IFmTq+Wp3kcfjlPmZUpi/Uo= + +Name: system/etc/permissions/com.sonymobile.faceeditor.xml +SHA1-Digest: adA6pID9jA3MA0DZVjn4YfYUxsk= + +Name: system/bin/mm-aenc-omxqcelp13-test +SHA1-Digest: 02wn5rrHMYkBaUxWveqvZt4H1DQ= + +Name: system/etc/legal/leaflet/bs/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: d7q1TZHwhxaChu+5H01GGUOoIEU= + +Name: system/app/Conversations.apk +SHA1-Digest: 00OxN8ZvEDvaQpzr7QLzmoh2F/M= + +Name: system/etc/legal/leaflet/ms/Malware.html +SHA1-Digest: m7bGHrWhX/A4eiBWBhIwvFUi1wg= + +Name: system/bin/ks +SHA1-Digest: wjElOGdC2U3F839InIlgW35W/T8= + +Name: system/etc/legal/leaflet/ru/End-User-License-Agreement.html +SHA1-Digest: ss3ijfs/L5vebKD9GKUSH/GTwE0= + +Name: system/bin/hostapd +SHA1-Digest: ZqKs8k1duaHJWUG/Nf7xzW7pv0M= + +Name: system/lib/libcald_server.so +SHA1-Digest: eGKRX/Hdr+CNqt0/78NZWWDyIO0= + +Name: system/media/audio/ringtones/Ring_Synth_04.ogg +SHA1-Digest: f9iaiYm7beZ4ferroTuqAMeazYg= + +Name: system/etc/legal/leaflet/pt/Battery.html +SHA1-Digest: Z7u4smRlMnMovQsxVivEdthwKd8= + +Name: system/etc/legal/leaflet/ar/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: e806Q4FBptoQGSSCAvSjrFWPdIE= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Antenna.html +SHA1-Digest: nOFyvvr7kErCwtqR9i5tGEXM7gg= + +Name: system/lib/libmpqvideoscheduler.so +SHA1-Digest: +5KlCzu0UZ79088h8CkSBo5zCaY= + +Name: system/app/SemcVideo.apk +SHA1-Digest: PnMrvdwxvRrF3p9dWlxM8ZSLZuo= + +Name: system/etc/legal/leaflet/pt/Limited-Warranty.html +SHA1-Digest: Lu8aPRIvtsCMnJAf4KFeC+naWR8= + +Name: system/etc/legal/leaflet/uk/no-title.html +SHA1-Digest: di8EXF5EJAyAo/OhRd0NYoAZbYs= + +Name: system/app/skin-upholsterer.apk +SHA1-Digest: tt7EQ+OrRWctSnssOr2HDoiPvyM= + +Name: system/app/SemcMusic.apk +SHA1-Digest: qkYy2QsX64HpDPYg46+GFOBhYJI= + +Name: system/media/audio/notifications/Gallium.ogg +SHA1-Digest: CuSZN8YvB/z6gauKtInQOCAfq5k= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_orange_small.jpg +SHA1-Digest: hhDcEvPe4NyiWnsunMEqXPeWBuE= + +Name: system/etc/legal/leaflet/en/Precautions-on-Memory-Card-Use.html +SHA1-Digest: GZK13S9UuYK9UA66SsHXpOuzmqg= + +Name: system/framework/com.sonyericsson.autopoweroff.jar +SHA1-Digest: wKxe4YJLfcplM764bATqbo0A5iU= + +Name: system/lib/hw/lights.default.so +SHA1-Digest: sFpjaEwZBURSJal1ULxMaZMQMNM= + +Name: system/etc/permissions/com.sonyericsson.renren.proxy.xml +SHA1-Digest: oSNTfhh5NMlUCMzz96z6C04C0ls= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/moody_sunset_hd1080p.png +SHA1-Digest: D6FxSWkxqNMppbcwG3roDchUt/Q= + +Name: system/lib/libennjubase2.so +SHA1-Digest: 4efAPBdDUO1+uskZY6xWx/ry9hA= + +Name: system/etc/legal/leaflet/th/Personal-medical-devices.html +SHA1-Digest: 28l88CwgEz65Yw+NieaqsKpIQTI= + +Name: system/etc/security/cacerts/219d9499.0 +SHA1-Digest: h/DoWPK51SL4obNm8yCTilqR0+8= + +Name: system/etc/legal/leaflet/xl/What-we-will-do.html +SHA1-Digest: 5gj53NAk13u5ZdeuOCL5OrjdDqY= + +Name: system/lib/libmmcamera_statsproc31.so +SHA1-Digest: K77+NRzO0K1pF0MElKNJfUtgduA= + +Name: system/usr/icu/icudt48l.dat +SHA1-Digest: pZwMZKy/KNNRbuJOsfqZJ/hLa6k= + +Name: system/framework/com.sonyericsson.android.socialphonebook.dynami + c.jar +SHA1-Digest: 0Iqaal3pxxVOSBLrwzM1j8U99vg= + +Name: system/media/audio/ringtones/Solarium.ogg +SHA1-Digest: 8wnnExgQ1f+eO8qe4lKUwNjh35k= + +Name: system/app/VpnDialogs.apk +SHA1-Digest: eoc0Rje5L2COKUgWptpVUDXU4to= + +Name: system/app/SocialEngineTwitterShareFrwkPlugin.apk +SHA1-Digest: Rp2yNGWSm2g8l/RAHYFyZaOl/ZA= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Warning!.html +SHA1-Digest: VWfEGDIG2G8h1SrVlhIcOmdgnR4= + +Name: system/etc/legal/leaflet/ae/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: e2e1ZSUWaUL4j7VLmMwPKwm850g= + +Name: system/framework/javax.btobex.jar +SHA1-Digest: AIaGsGQC82Wdr+ITMjO9akBjWBM= + +Name: system/lib/libmmwfdsinkinterface.so +SHA1-Digest: xU/aPnJv1r/W4ucLIc26XNVio5s= + +Name: system/lib/libdbus.so +SHA1-Digest: oGJyMHGo+cdswRdadyG+lCeuAS4= + +Name: system/bin/input +SHA1-Digest: fmnGVSPBoXqAUgaTVBG6zdBwPNY= + +Name: system/lib/hw/local_time.default.so +SHA1-Digest: i3zveETJk+c+6Rwy0DmGKNTWUEw= + +Name: system/bin/pm +SHA1-Digest: ZZqEROz0ggs5Pz1SZjKHP/AP6xw= + +Name: system/lib/libext2_com_err.so +SHA1-Digest: nlGhiFxXrsAkf1f4JRzfEC/+DSE= + +Name: system/lib/libmmcamera_plugin.so +SHA1-Digest: sCqNnZzdWb2KkggFBSfbgWA++JY= + +Name: system/etc/legal/leaflet/ko/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: fFxrcPUR1bXwQECggWg/hKeLhbU= + +Name: system/etc/legal/leaflet/uk/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: xCcMw3w8RhKIPkLbwxv1rjfFcAQ= + +Name: system/app/SomcXperiaLink.apk +SHA1-Digest: EXBNY5F+GonpqS5pr0Lew8LGyH8= + +Name: system/etc/legal/leaflet/ms/no-title.html +SHA1-Digest: 3D3tVJHIC1yM11xV+3jHlzcXW+4= + +Name: system/etc/legal/leaflet/sq/Personal-medical-devices.html +SHA1-Digest: wkg9sKXXO8RUyG+j7flmZ7XUIx0= + +Name: system/etc/legal/leaflet/in/Export-regulations.html +SHA1-Digest: jl2xRL+y8LwNWD1FsrjxPIqAPj4= + +Name: system/etc/legal/leaflet/kk/Precautions-on-Memory-Card-Use.html +SHA1-Digest: MbS9zR9SKVfwaqG4UzNjZXVEfWY= + +Name: system/etc/legal/leaflet/ru/Publication-number.html +SHA1-Digest: A6DsgWZYp4UxLSdO7dCv/B68ZWY= + +Name: system/etc/legal/leaflet/sr/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: 8lHEf7QmCX2KWNtNOojNggfs3x8= + +Name: system/usr/idc/clearpad.idc +SHA1-Digest: 6caMjuYEAYcNONmOteERHeQeIWI= + +Name: system/fonts/Lohit-Telugu.ttf +SHA1-Digest: jlQka2bQFA9k2ueumgyqUQXSFaA= + +Name: system/etc/legal/leaflet/zh-TW/Export-regulations.html +SHA1-Digest: pf0zPiUojbsQinmrWuYcjRawalQ= + +Name: system/tts/lang_pico/es-ES_ta.bin +SHA1-Digest: iomlWBJnyeAmuhpPJfKYJkKDUEw= + +Name: system/app/BackupRestoreConfirmation.apk +SHA1-Digest: bheTSqt2QNKE1uzP+lb8VHZGZdI= + +Name: system/lib/libsurfaceflinger.so +SHA1-Digest: 10nVQl2ahit7Rr8wgDwFoX96dls= + +Name: system/etc/legal/leaflet/kk/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: scShZrCkB55OL+jJF59ozS8ccwY= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Export-regulations.html +SHA1-Digest: dCSz75GaS4oE34g2qj+hxYlWo9s= + +Name: system/app/qcsemcservice.apk +SHA1-Digest: ZUIiKaDnrBUPrO9Mv/ac+6MS3Wk= + +Name: system/bin/tc +SHA1-Digest: EK+BjCgltQY5Sbf+vsYliPaQKXo= + +Name: system/etc/updatecmds/google_generic_update.txt +SHA1-Digest: /JTgfNkrdifcko4L7i/FD70eeaA= + +Name: system/lib/libtime_genoff.so +SHA1-Digest: vYZOv/S7ag5ao9N0MecDvV9xiSk= + +Name: system/etc/legal/leaflet/ru/index.html +SHA1-Digest: cgb/JlvXstg/YTYxcQ9rKVMGFX4= + +Name: system/etc/legal/leaflet/pt/GPSLocation-based-functions.html +SHA1-Digest: KsSOLffygaGD+5E9jC0cOBbKnGE= + +Name: system/framework/com.sonyericsson.sysmon.jar +SHA1-Digest: l+ZzH06xKd++PxUiGMZsDz7CnAo= + +Name: system/etc/legal/leaflet/kk/Emergency-calls.html +SHA1-Digest: VPwr4FxF5vxYuYvLG2+0cjuibtE= + +Name: system/etc/legal/leaflet/pt/Antenna.html +SHA1-Digest: 5pwxqe54LmrUKSmlcDlGurqb/gA= + +Name: system/lib/libcneutils.so +SHA1-Digest: HP8v+TluQjqZ9s2gRfbmnCO9KFI= + +Name: system/app/MusicFX.apk +SHA1-Digest: pXNqivpDG34/1d3m1M+A9unE7Wo= + +Name: system/etc/legal/leaflet/zh-TW/Accessible-SolutionsSpecial-Needs + ---USROW.html +SHA1-Digest: FpJ3QZRI7o5ltdV254f1gR7UiNc= + +Name: system/etc/legal/leaflet/pt/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: Z23Ht5xo6HBeOKwR2pL6mQaJN6E= + +Name: system/etc/security/cacerts/33815e15.0 +SHA1-Digest: sxrwaxlAJHZVh6z+sNYj97iZIuA= + +Name: system/usr/srec/en-US/google_hotword_logistic +SHA1-Digest: sYH+W7m9I89ltQfiDWM1Pi6quVg= + +Name: system/lib/libwebcore.so +SHA1-Digest: 59Kscd3NDNvS8eDgRula2UqdfC0= + +Name: system/framework/com.sonyericsson.media.infinite.extension_1.jar +SHA1-Digest: 7RF/R3QCB/pv7N1tKfhNwmTvcDE= + +Name: system/etc/legal/leaflet/zh-CN/What-we-will-do.html +SHA1-Digest: rcEw+33XXCLMEoJqcyI68wCBiU4= + +Name: system/etc/legal/leaflet/vi/Flight-mode.html +SHA1-Digest: Fm+rVC3q4I71QvILHuLiEK/3AEU= + +Name: system/lib/libOmxEvrcDec.so +SHA1-Digest: NpDkr5fW9tKMWAtplKUXI09sG8o= + +Name: system/lib/libnjexyomi.so +SHA1-Digest: DndB/hIbR8dvLlGXg0I1KGs+yqg= + +Name: system/fonts/DroidSans-Bold.ttf +SHA1-Digest: c+wTp8oMLKYwoS0EbWiwH43WqAU= + +Name: system/etc/legal/leaflet/fr/Service-and-support.html +SHA1-Digest: jXN8n3kpMTN61/wSvcAdpv4jVBs= + +Name: system/etc/legal/leaflet/en-HK/start.html +SHA1-Digest: YarIzvt9yOreZh7vfTPEO+m+dEA= + +Name: system/lib/libmmipl.so +SHA1-Digest: VBQNw7FuslO6vXrBpQwtxd6bftU= + +Name: system/etc/permissions/com.sonyericsson.uxpres.xml +SHA1-Digest: aZn2khi7P1nwAZzpmoA0aL0z2Ak= + +Name: system/etc/legal/leaflet/images/logo.png +SHA1-Digest: j8rD8inmYc7BWT4rgpNZzWGcuxA= + +Name: system/etc/legal/leaflet/hi/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: gD/LiX2MD5lcf3+QtYme0ZPysSI= + +Name: system/media/audio/alarms/Alarm_Rooster_02.ogg +SHA1-Digest: dmlZwLMeV0D2AVnm00L8CQQCXXo= + +Name: system/etc/legal/leaflet/zh-HK/Emergency-calls.html +SHA1-Digest: alylpzprsc87At84xrOIojJdlUQ= + +Name: system/lib/libOmxVdec.so +SHA1-Digest: 6hbTTPFhfjWgNsPRoSgHrJyUMAw= + +Name: system/etc/legal/leaflet/en/SIM-card.html +SHA1-Digest: xJ+dnWE7rYCbF8Bgi9aWCDqiOS0= + +Name: system/bin/zipalign +SHA1-Digest: 7mO8RnCzszlkcI1atVbOulN5MOM= + +Name: system/usr/xt9/SEMC_810_r1-4-12-1_SVusUN_xt9_2.ldb +SHA1-Digest: 3CXct0XeD/DBhC7jJd/qy98VBBk= + +Name: system/media/audio/ringtones/Orion.ogg +SHA1-Digest: pIWSRqYb+XD5Kby+iPS590yIi2o= + +Name: system/etc/init.qcom.audio.sh +SHA1-Digest: /BxHr3xAEg3/uVovgo+Ix8Kj9ZU= + +Name: system/etc/legal/leaflet/ru/Battery.html +SHA1-Digest: PwdnrIT5334njtcMaT5l8NmjLgI= + +Name: system/etc/legal/leaflet/zh-CN/Power-supply-(Charger).html +SHA1-Digest: 1C0rF2YleJesEuufJMIEdlofQ10= + +Name: system/fonts/AndroidClock_Highlight.ttf +SHA1-Digest: UpUMgtFG6S4ktliTHrzjzh2Sb2E= + +Name: system/lib/libloc_adapter.so +SHA1-Digest: Y8kQ6YEk62pkJH2RfOF37oqBEGQ= + +Name: system/lib/libcnefeatureconfig.so +SHA1-Digest: o7rhUnlQgBaX1G+Wie7+ZxpdjIo= + +Name: system/etc/legal/leaflet/uk/Precautions-on-Memory-Card-Use.html +SHA1-Digest: Cyv+5c/9Vx2Hj0kC8NBOhGvkt/8= + +Name: system/etc/legal/leaflet/kk/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: 8KQrnSNbvrUL3gXE7g+sM0r/aAA= + +Name: system/etc/legal/leaflet/bs/Our-warranty---12.html +SHA1-Digest: 5SjJqIogYLx4eHyODIXeTI5I5XA= + +Name: system/etc/legal/leaflet/fa/Accessories.html +SHA1-Digest: 8dCGQv27DSLes1Ol6mfi0+Ra9Lc= + +Name: system/etc/legal/leaflet/bs/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: kDLfQuSH/qXd26i1poFVYSF2LxU= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_grey_small.jpg +SHA1-Digest: gv6k+AxAusR0qYqgzghFIAD326A= + +Name: system/app/shutdownlistner.apk +SHA1-Digest: C6yezt4j2canroElnvO7rfuvcx8= + +Name: system/app/Tag.apk +SHA1-Digest: gYGxMoS9/XjD2Ch31ka5VZMjVBo= + +Name: system/etc/legal/leaflet/uk/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: ekkSDknyshU45LS2MMkYRjFFPWM= + +Name: system/lib/hw/nfc.msm8960.so +SHA1-Digest: K2d3dDoyGbhD4ZISDN8P7qIjpPw= + +Name: system/lib/libmdnssd.so +SHA1-Digest: N4JfeZl5m+430YFYP9FtrNybe+A= + +Name: system/app/Backup-wizard.apk +SHA1-Digest: rRJMBIhNInr2sRVCkffnJ4N9joo= + +Name: system/etc/security/cacerts/ee7cd6fb.0 +SHA1-Digest: bkvA4zNXQeEiBJAmk+PXsF/pHKY= + +Name: system/framework/com.sonyericsson.privateapis_impl.jar +SHA1-Digest: dGPVK2f5QZssQNh+TkezRLUAIJk= + +Name: system/media/audio/ringtones/CurveBall.ogg +SHA1-Digest: UQ+QbrebDZH5rcGGV8EyjTSfMsc= + +Name: system/vendor/pittpatt/models/detection/yaw_roll_face_detectors. + 6/head-y0-yi45-p0-pi45-r0-ri30.4a-v24/full_model.bin +SHA1-Digest: CzQS2Q926UpzY1pj03Kjd1YbDNs= + +Name: system/app/SuperStamina.apk +SHA1-Digest: lVktHD3PSQcTrJLA7ibiN95vIYc= + +Name: system/etc/legal/leaflet/uk/Battery.html +SHA1-Digest: 4OBYa8vjPDB6Zwyys867pfvBU7Y= + +Name: system/etc/iddd.conf +SHA1-Digest: Bxyy0FBVyCPR9AGlwp3Wa481A3E= + +Name: system/fonts/DroidSansHebrew-Regular.ttf +SHA1-Digest: vCyI5L4+fY5R89LvPsNi6paN1xU= + +Name: system/etc/legal/leaflet/ko/Driving.html +SHA1-Digest: fV/Xqb602X53dYTZs2hS5OEnguE= + +Name: system/media/audio/ringtones/CASSIOPEIA.ogg +SHA1-Digest: NhiJ6aX02lstiUCAJfCjwadBkoA= + +Name: system/etc/legal/leaflet/mk/Power-supply-(Charger).html +SHA1-Digest: buC6JSGhADXsMxyNS1QwKhO74H8= + +Name: system/media/audio/alarms/wood.ogg +SHA1-Digest: KNaDG0iZjuTgDW/bSOWsyEu6qgM= + +Name: system/app/SemcStorageChecker.apk +SHA1-Digest: 3L0BlvIueEcn/0UYFAyKJvH+ODY= + +Name: system/lib/libiddjni.so +SHA1-Digest: KIHKqjbfcM2gmCHvgrXQnA/2rA8= + +Name: system/lib/libxt_native.so +SHA1-Digest: owK21ES5kW8gYpXm32Liht5Vj0A= + +Name: system/etc/security/cacerts/1dcd6f4c.0 +SHA1-Digest: J/9p1bSc/vj7DXamP+uHmvUOn2c= + +Name: system/etc/security/cacerts/9772ca32.0 +SHA1-Digest: LX2TMuCYXRh8QFOPADSkAjvHbuE= + +Name: system/etc/legal/leaflet/in/Our-warranty---12.html +SHA1-Digest: 2qbMnD8XPvN+NKBu/u69B0ZNKnk= + +Name: system/media/audio/ringtones/Noises2.ogg +SHA1-Digest: Opa4rgd0Ni416aKhJUJJhE0K0w4= + +Name: system/lib/libcald_hal.so +SHA1-Digest: gN9qun9E0fVFBghrn4bFRi3svFY= + +Name: system/lib/libmonkeyprocess.so +SHA1-Digest: AKpQHVOxMaHudCAc43s3aj2gSRs= + +Name: system/app/ContactsImport.apk +SHA1-Digest: Em8hrbkbl3EUmNfS+n4mGAbTlds= + +Name: system/lib/libSR_AudioIn.so +SHA1-Digest: ZvAWqejA31cQtCSogywkwFfe/eY= + +Name: system/lib/libqmi_encdec.so +SHA1-Digest: r8S8/jdbJAmqizRKAMD2mD+u8Ac= + +Name: system/media/audio/alarms/Neptunium.ogg +SHA1-Digest: R/MOcYBFRbK7qWty9bKsskgDvII= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/mesh_purple_hd1080p.png +SHA1-Digest: cm4ZFkXRquuaIrLx/8FcI4BwU/Y= + +Name: system/media/audio/notifications/Drip.ogg +SHA1-Digest: S/niwl+AQfzWR0PgT8tKe/f0skY= + +Name: system/fonts/DroidSerif-Regular.ttf +SHA1-Digest: rdDAMVoPkeYHrAGCh/yUOvTm5UE= + +Name: system/semc/chargemon/data/non-charging_animation_06.png +SHA1-Digest: bcYKeDjLhsicF0BiVxUbyfbqVSQ= + +Name: system/etc/vold.fstab +SHA1-Digest: kkkqpEmj8vlQN52/kB/uo067/X4= + +Name: system/bin/ip6tables +SHA1-Digest: 1BdABpd3EdMUOXG/Ih4Q7EBUhQI= + +Name: system/etc/legal/leaflet/zh-TW/Warning!.html +SHA1-Digest: VvFIHTjDvgU3BaupjlyHMokfoKw= + +Name: system/etc/legal/leaflet/mk/Important-information.html +SHA1-Digest: rD0it1rVg/22NhAiZtV4nPsXb50= + +Name: system/lib/libmmcamera_wavelet_lib.so +SHA1-Digest: 3L/4Zy3faFarYc8Emf+5uaNge0A= + +Name: system/lib/libWnnJpnDic.so +SHA1-Digest: z4QgJ3leaXtRQ2h+ZUm8HHcqGlo= + +Name: system/lib/libmpqsource.so +SHA1-Digest: r4tseXtJc56UIPHYLSfOFZJk9uU= + +Name: system/etc/legal/leaflet/hr/Accessories.html +SHA1-Digest: KHU0F1fm6RdGh7mv1g+DJ8/JYN8= + +Name: system/bin/illumination_service +SHA1-Digest: u+WMwzssuSu/I64IqbPgynW2wFA= + +Name: system/etc/legal/leaflet/cf/Loudness-warning!.html +SHA1-Digest: e6B2y/1pI1JcqJ1N71YRxkMCzKY= + +Name: system/app/ServiceMenu.apk +SHA1-Digest: waBeMRO+8+ARWCtRX/zfXZz5w20= + +Name: system/etc/legal/leaflet/ar/Publication-number.html +SHA1-Digest: RXf0L9mAULZybFGILESaDH78BTg= + +Name: system/etc/security/cacerts/08aef7bb.0 +SHA1-Digest: XVcxHM5N/xsTnkuy9vaaWCBrlTw= + +Name: system/lib/libstagefright_soft_mp3dec.so +SHA1-Digest: K44PsWia2Tcfqg7bA9Wx0K89NIg= + +Name: system/etc/legal/leaflet/zh-TW/ERROR=0.html +SHA1-Digest: JkKn4JVVC5rli6grDUDdaXg4mxY= + +Name: system/lib/libttspico.so +SHA1-Digest: Y1LotCrZl1U1CcSpsga5Sfuc5Ok= + +Name: system/etc/legal/leaflet/zh-CN/Declaration-of-substances.html +SHA1-Digest: FGGS1cvMWQCnD9/f1zCs91mYoMk= + +Name: system/etc/security/cacerts/87753b0d.0 +SHA1-Digest: pDoFkt0ow4oMrnwoJ8V53XXw608= + +Name: system/etc/legal/leaflet/pb/Protection-of-personal-information.h + tml +SHA1-Digest: JGhBuD1wIlOxhrsOLQt0TY2mztI= + +Name: system/etc/legal/leaflet/ko/Flight-mode.html +SHA1-Digest: r0vbQ7bgutRhEaDH6RKK2sS2TWM= + +Name: system/lib/libarchive_fe.so +SHA1-Digest: D7wlqYLjBWritkThYwRvILWGDPQ= + +Name: system/media/audio/ringtones/Club_Cubano.ogg +SHA1-Digest: pBTpYFzvdovd5dDbHiv/rNkcECM= + +Name: system/etc/legal/leaflet/mk/Limited-Warranty.html +SHA1-Digest: NSoorrQZ5Ha3n2HvlK2u0T9FK9k= + +Name: system/etc/legal/leaflet/zh-CN/SIM-card.html +SHA1-Digest: gJIq+k2/iHmcgHTRlzXBTWHf+g4= + +Name: system/usr/keylayout/Vendor_046d_Product_c532.kl +SHA1-Digest: uLc7pyyR3HK7SZbqxNhxTnBjvQU= + +Name: system/etc/legal/leaflet/kk/GPSLocation-based-functions.html +SHA1-Digest: yJ8D/o5lWxuvl3Bc+4OBdemP6Io= + +Name: system/framework/org.simalliance.openmobileapi_impl.jar +SHA1-Digest: 3diq0LRPlYhbSvDbldCPVWX0R3k= + +Name: system/lib/libservicemenu.so +SHA1-Digest: XRUUr/IOp4ax6HmhwsK6t6zjT9I= + +Name: system/media/audio/alarms/xperia.ogg +SHA1-Digest: z4QypCfBsY+AVx4X5XXa5xVjnS4= + +Name: system/lib/libc2d2_z180.so +SHA1-Digest: IeLqkRC7qSBzbWI+f9aP25QhKo4= + +Name: system/usr/xt9/SEMC_810_r1-5_HUlsUN_xt9.ldb +SHA1-Digest: MYRfjz6UXYqyTkXeNiefDYsQxB4= + +Name: system/fonts/AndroidClock.ttf +SHA1-Digest: SwKcMGDzVbbA3ny3+tJbieABH4s= + +Name: system/etc/legal/leaflet/vi/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: LjsyLM37cRD2BKHLE23FHJJN8FA= + +Name: system/etc/legal/leaflet/images/Thumbs.db +SHA1-Digest: OkNwX5+jJsjAup1o04jY8ceRT60= + +Name: system/lib/libSecureClockWrapperJNI.so +SHA1-Digest: ysa9YxO7i/sh2lChjP6cMInFVo4= + +Name: system/usr/xt9/SEMC_810_r1-3_VIlsUN_xt9_2.ldb +SHA1-Digest: TB1/1U9S96f42nhcHFX95oMyJ6Q= + +Name: system/usr/xt9/SEMC_810_r1-5_SRlsUN_xt9.ldb +SHA1-Digest: SKLyWYBIOaM8n3EtxETwohdOqS8= + +Name: system/app/com.sonyericsson.retaildemo.apk +SHA1-Digest: kLRErI1b2IGfF8QZkgMJIqQPiFA= + +Name: system/framework/com.sony.sysinfo.jar +SHA1-Digest: WQ20k7JIy0YZjSUjTYEhL69zVBk= + +Name: system/lib/soundfx/libdownmix.so +SHA1-Digest: Vi3Pv974zsXgNNbkW+K9VqLdscY= + +Name: system/usr/keychars/Virtual.kcm +SHA1-Digest: 9uQOx02FYajtTIKVRSyjp4oMPWM= + +Name: system/lib/libbcc.so +SHA1-Digest: Ej2D7ly/ymwICoxHnXadY44P9Nk= + +Name: system/etc/legal/leaflet/in/Loudness-warning!.html +SHA1-Digest: covNgkAWGUcCJ9kRjK744chZdQw= + +Name: system/lib/libjni_eglfence.so +SHA1-Digest: QIal4jCvpI/303x3Er8QD24qXJ8= + +Name: system/app/SemcCnapProvider.apk +SHA1-Digest: npjMCo21pj8nz3xfRepR8taQBMQ= + +Name: system/etc/firmware/efs3.mbn +SHA1-Digest: DFciLkU5i6dTihIWAL4F0bsKAww= + +Name: system/lib/libcameraservice.so +SHA1-Digest: EdD/9YxC5gEwdgn6shivgVmDan4= + +Name: system/lib/libcald_pal.so +SHA1-Digest: O0FTYEtkDCBbIBY+dlUuavHVJg4= + +Name: system/etc/legal/leaflet/ko/Publication-number.html +SHA1-Digest: 0JKaoj5pEj2yFZEGUUzaOnBPaaE= + +Name: system/usr/xt9/SEMC_810_r1-16_ESusUN_xt9_2.ldb +SHA1-Digest: iRz2JKMRccMfUqds4HQ9RznsnC0= + +Name: system/lib/libSHIMDivxDrm.so +SHA1-Digest: tSxgAS18O/0HLB52y5bqrUew8Gw= + +Name: system/etc/legal/leaflet/pb/Purchaser-and-Product-Information--- + Brazil.html +SHA1-Digest: p8zW4D7S2lj82aX+w26NevYBKY8= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Conditions-zh-zt.html +SHA1-Digest: kSgvuxk6QcprxaOhR194TwUfV0c= + +Name: system/etc/legal/leaflet/zh-TW/Power-supply-(Charger).html +SHA1-Digest: A1KIJYN9WC99FXGddP9qPC0OrN4= + +Name: system/usr/xt9/SEMC_810_r1-7_FAlsUN_xt9_2.ldb +SHA1-Digest: HjyJF1AZYaPOjI4prMqU59YNCT0= + +Name: system/etc/init.qcom.mdm_links.sh +SHA1-Digest: r8aj3kI+NsnmXyRftAcZ0UTyQH0= + +Name: system/media/audio/notifications/F1_New_MMS.ogg +SHA1-Digest: sfSdzxWDOmIedxeONHzhHsK/aeE= + +Name: system/app/MemcardTransportService.apk +SHA1-Digest: ajF0vdXZlQykX/Iwrzf61/m0X3M= + +Name: system/etc/legal/leaflet/sr/Precautions-on-Memory-Card-Use.html +SHA1-Digest: 3DPbBuD3jrXIPzGnqK+BeOftEx8= + +Name: system/etc/legal/leaflet/images/LEGAL-EXPLODE-low.jpg +SHA1-Digest: uIkwTkrnxd9l6IqOv856Fbor4Ek= + +Name: system/usr/xt9/SEMC_811_r1-3-10-1_NLusUN_xt9_2.ldb +SHA1-Digest: CId6RHEXeP7mYbcyDdmaq7ZGmLw= + +Name: system/lib/libc.so +SHA1-Digest: CNT7/YhxffXLC0r/VNMm4q+YGms= + +Name: system/app/SOMCTwitterSetupWizard.apk +SHA1-Digest: VC7Nnrj/fmDFXyit7aAKdX8lCr8= + +Name: system/etc/legal/leaflet/xl/index.html +SHA1-Digest: JBgIC9hn84aiiAB64CDJWs+jdpA= + +Name: system/bin/qseecomd +SHA1-Digest: 0t6lKG5Fj0WzqozDNdJ+iIuFmC4= + +Name: system/media/audio/ringtones/Safari.ogg +SHA1-Digest: lVdLM9Ky9lzogjCPj3L400wibgA= + +Name: system/app/DefaultCapabilities.apk +SHA1-Digest: LBS7nHKcYgWSHrRuI001YjnhOME= + +Name: system/etc/legal/leaflet/fr/Battery.html +SHA1-Digest: URyGy40Br1i/PTMHExi8CHPdg3c= + +Name: system/etc/resolv.conf +SHA1-Digest: zDQ7cypRhst8axwHuxLazcZfpMY= + +Name: system/bin/qosmgr +SHA1-Digest: AivBavbUpCaahQhtllm/dDcI32o= + +Name: system/media/audio/ringtones/GameOverGuitar.ogg +SHA1-Digest: pDKBGPXc21/dqtWj8jjS30H/UjY= + +Name: system/etc/legal/leaflet/ru/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: EWEkcIvZv8nAqBvGyX/utWX+wP4= + +Name: system/etc/security/cacerts/418595b9.0 +SHA1-Digest: EurtZmuo2p5AcFiyeJVA1GXOrHs= + +Name: system/lib/sysmon/sysmon_charge_current_limit_level.so +SHA1-Digest: ct9XqrcrZz+cFmTo/IU7n3646Tc= + +Name: system/etc/bluetooth/blacklist.conf +SHA1-Digest: /NVpapHNK5NICIClWd0zLSqpX2Y= + +Name: system/usr/xt9/SEMC_810_r1-5_HRlsUN_xt9.ldb +SHA1-Digest: YG0UGAmCR6Nj+UF8W0VEQrwPh+A= + +Name: system/bin/applypatch +SHA1-Digest: vnxMGHMxWSpFypLql+TQop2OLuk= + +Name: system/etc/firmware/tzsuntory.mdt +SHA1-Digest: WGt0ZCBclCbNGtvkF91jR40nNac= + +Name: system/bin/btnvtool +SHA1-Digest: nhK/KaId9iHHuZt8+JqWJivhdqQ= + +Name: system/app/SmallAppManagerService.apk +SHA1-Digest: gfPiQ6IuvK+DVSgzQoANHSbmstQ= + +Name: system/etc/mkshrc +SHA1-Digest: AXWBhFfy48EBsMirawoVQJ6RzHI= + +Name: system/lib/libpower.so +SHA1-Digest: W4lfUNawOuoJmIjcErKYeGRncOw= + +Name: system/etc/security/cacerts/d8274e24.0 +SHA1-Digest: ggueFUwteH2USaNRFI+bu48RY2w= + +Name: system/etc/legal/leaflet/cf/Warning!.html +SHA1-Digest: ue2+pPY6NdHiXhUWCalP4sMv0WI= + +Name: system/framework/com.sonyericsson.metadatacleanup.jar +SHA1-Digest: Kjmy1gbrc12XboYJ8d/SaJ+T3sU= + +Name: system/etc/permissions/com.google.android.maps.xml +SHA1-Digest: QaPNB5FUfwkZ5T3fG1bXJpF8pNY= + +Name: system/etc/legal/leaflet/cf/Antenna.html +SHA1-Digest: QVELYJafstLio9owQX3rX5bs+SA= + +Name: system/lib/libsonivox.so +SHA1-Digest: 1n7vSE0zXd79004Az0FTgQYF9LE= + +Name: system/bin/oemwvtest +SHA1-Digest: S7Qj6ZkdAf5X9XYnsu+91FKTFFo= + +Name: system/lib/libstagefright.so +SHA1-Digest: k8Gt3ykquyIftC3ZyUVm0oScLOM= + +Name: system/etc/permissions/android.hardware.sensor.gyroscope.xml +SHA1-Digest: DhtVHxHAeMpMhNawakMGfQRTkR0= + +Name: system/etc/legal/leaflet/th/Loudness-warning!.html +SHA1-Digest: +5TbzZieVHOgu67HbXSDYQDAJc4= + +Name: system/semc/chargemon/data/non-charging_animation_01.png +SHA1-Digest: VcKHcmMZwFCv1EOLO/RNyleza0k= + +Name: system/xbin/sqlite3 +SHA1-Digest: O7fMdT7jonb4h+dIccF6Tu4D77Q= + +Name: system/media/audio/alarms/multi_alarm.ogg +SHA1-Digest: FNOEkHt0nlcR4qAAq9WUi+IvfQc= + +Name: system/media/audio/notifications/synth_chime.ogg +SHA1-Digest: SpTSwbum63hF/LW1/yOnC+kxrGw= + +Name: system/app/SOMCTwitterAccount.apk +SHA1-Digest: gTtvaWTRDPM5MjL7cpb0sn0pv3s= + +Name: system/etc/security/cacerts/84cba82f.0 +SHA1-Digest: RbfVG4qh9BQlLNlkl+9eQ/iwr90= + +Name: system/lib/libwfdcommonutils.so +SHA1-Digest: cHOuFiPTFPxrleWF0OUwIQnoALQ= + +Name: system/lib/sysmon/sysmon_pa_therm.so +SHA1-Digest: PxJ9UGFUD29xc1JYB5vBsPeOHZ0= + +Name: system/framework/am.jar +SHA1-Digest: L57YK6aTN5WPqcl2/ZUUpcOw9g8= + +Name: system/etc/legal/leaflet/zh-TW/Limited-Warranty.html +SHA1-Digest: XOdFWljTMxHcaH+gnNtI88BPjB4= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Important-information.html +SHA1-Digest: KfKmHod2YZ2QAT9Yv7OzluNcvok= + +Name: system/vendor/camera/SEM13BS1_IMX135.dat +SHA1-Digest: gr+enb1CEYzq1vDyQebbvEM+xRI= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_fog_hd1080p.jpg +SHA1-Digest: Y8Wj7vfFPugF7gGG1mVnFDvhRtI= + +Name: system/etc/legal/leaflet/en-HK/Guidelines-for-Safe-and-Efficient + -Use.html +SHA1-Digest: NCF6IdVRhthhBdQdqITKLTuBfCw= + +Name: system/app/Gmail.apk +SHA1-Digest: fzo2OXvwsBxfPGijgYAo3trK+Lk= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/purple_sky_hd1080p.jpg +SHA1-Digest: 8BhZoWmSd+GdVNjukhGZmHUjz5U= + +Name: system/etc/legal/leaflet/images/arrow.png +SHA1-Digest: C4ndwBHMfkCDUsFFzPfpyOecfbA= + +Name: system/lib/librs_jni.so +SHA1-Digest: kocc24UKkTBe/mm+5jTjP6Csabk= + +Name: system/app/enhancedusbux.apk +SHA1-Digest: 2FOkwlaM9rwTViq6okOZkP9ry+4= + +Name: system/etc/legal/leaflet/in/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: MLO3YioCbjV7vBQW+2WQ2OVIKZg= + +Name: system/etc/security/cacerts/bc3f2570.0 +SHA1-Digest: Djn1z26jqNrHK/cY3pNLU/I9bN8= + +Name: system/etc/legal/leaflet/mk/Children.html +SHA1-Digest: ySWuEk6L6d4x8arv3qe81B++0D4= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/butterfly_and_wildflower_hd1080p_small.png +SHA1-Digest: 53yd6P6L8o7e2inWBS+NFwQH8C0= + +Name: system/etc/firmware/dxhdcp2.flist +SHA1-Digest: rhGcOuL7SIDuihxEWQP+5UwaUN4= + +Name: system/lib/libdsutils.so +SHA1-Digest: P8UnDRiV/o65OQzHohDs1MPxqXg= + +Name: system/lib/libgetzip.so +SHA1-Digest: YUmoB2LbHcRtnv/HIsQ1j4ZmBBU= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor6.so +SHA1-Digest: WmA0S/OJ+6hlsrqzjG5k8nXuye8= + +Name: system/app/usb-mtp-backup-transport.apk +SHA1-Digest: VeaHOnPBUGkpfv92IzAEPycHntA= + +Name: system/usr/srec/config/en.us/models/generic8_m.swimdl +SHA1-Digest: XJZq9k/wtjPuUrP1MbJNulTtfGM= + +Name: system/lib/libMPU3050.so +SHA1-Digest: 8UyMZl1vUkv1WsiLqWLKocYPlfg= + +Name: system/etc/legal/leaflet/hr/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: o32dDIFO9BxLam5rMtfbcUrC69g= + +Name: system/etc/firmware/sbl2.mbn +SHA1-Digest: FG8yBO75hdY7B6NDd7ctckW/H1w= + +Name: system/media/audio/ringtones/bingo.ogg +SHA1-Digest: LQveG5a94HwfIDQOBIRBdWJWLxY= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Export-regulations.html +SHA1-Digest: MQOLfOjJlD/OGmgTAAgMSbTj9js= + +Name: system/etc/legal/leaflet/ar/Antenna.html +SHA1-Digest: i/guNkPbE7smAHQvVARL4/eE8kc= + +Name: system/etc/legal/leaflet/kk/Flight-mode.html +SHA1-Digest: 5u34L7eSIb8a/byjv993HBvkTGg= + +Name: system/etc/legal/leaflet/hr/index.html +SHA1-Digest: G34Jzpczg8ks2LqQhsU4TGRh20A= + +Name: system/media/audio/notifications/TaDa.ogg +SHA1-Digest: exgYXFhRaq9mykCzd24GSp+CYk8= + +Name: system/etc/legal/leaflet/mk/index.html +SHA1-Digest: uUJovUsDM7XeFeuP1TT49ztf/Sc= + +Name: system/etc/legal/leaflet/zh-CN/Warning!.html +SHA1-Digest: Dn+T5nYYd6EEW0f61QlhofSBeU8= + +Name: system/etc/snd_soc_msm/snd_soc_msm +SHA1-Digest: I6NQd3S+YakCBteQhsVHCGX71xg= + +Name: system/etc/legal/leaflet/images/btn_search_green-BIG.gif +SHA1-Digest: oFsYdRzrTc0utW5lnhP0a8jzqig= + +Name: system/app/SocialEngineFacebookShareFrwkPlugin.apk +SHA1-Digest: /+kzqFWVTpyzku7u0P1wJJVSh2w= + +Name: system/lib/libPaApiQC.so +SHA1-Digest: aHj9pFZ7h836zeO41wiPt5QnMCA= + +Name: system/etc/legal/leaflet/uk/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: km19WOJNYGiRPO78CY7yNH1Mctc= + +Name: system/etc/security/cacerts/d59297b8.0 +SHA1-Digest: TqrmlyeuzKiljmAPGWKtMKLCpAA= + +Name: system/lib/libqmi_csi.so +SHA1-Digest: qAj+wLHqzCEraZ26ET4xII6KMm0= + +Name: system/media/audio/ringtones/Eastern_Sky.ogg +SHA1-Digest: 50qSb8b9/pJqMgH8FsggDrvK8jM= + +Name: system/etc/permissions/android.hardware.wifi.direct.xml +SHA1-Digest: iPmbEsXxaKyWbEdVZcAxkacBUr0= + +Name: system/etc/legal/leaflet/en-HK/What-we-will-do.html +SHA1-Digest: SspZqRjM5rvrNiNe0F8/mQ/J3QI= + +Name: system/bin/curl +SHA1-Digest: +79Dwyq19tOwwlg0phqocdIC7oU= + +Name: system/etc/legal/leaflet/xl/Antenna.html +SHA1-Digest: Ty/AAzSBGyuzD9no59WEFBvZofI= + +Name: system/etc/legal/leaflet/ko/What-we-will-do.html +SHA1-Digest: J/bqhMvHvgiDJWT0ZcTK72Ewujo= + +Name: system/bin/updatemiscta +SHA1-Digest: +HZhb5JTqGd1MvDWQfkPNlfID2Y= + +Name: system/etc/legal/leaflet/fa/Malware.html +SHA1-Digest: mnzu5gm+WSi8cM/PHuN4JLoalGk= + +Name: system/etc/security/cacerts/d537fba6.0 +SHA1-Digest: 4R+LXj2wGe4iRwjgn1A1cvhf/n8= + +Name: system/lib/libgesture_client.so +SHA1-Digest: q698kzBvYRVf7C0VgqvalsVcguo= + +Name: system/lib/libqsap_sdk.so +SHA1-Digest: RPSiil3j6oizrgkpOrJRaNL4KsE= + +Name: system/framework/com.sonyericsson.colorextraction_impl.jar +SHA1-Digest: JKQpcKACr7/e6TVoXUjSM2m6G5s= + +Name: system/etc/legal/leaflet/sr/Emergency-calls.html +SHA1-Digest: +kXRAFXdOdoDFuJMU6bLL381GTY= + +Name: system/etc/legal/leaflet/zh-TW/Our-warranty---12.html +SHA1-Digest: UAVgDsNvXx+B6gm0Hf/ISRGbKgA= + +Name: system/bin/netcfg +SHA1-Digest: QgnxLUFalIH7f6liBF7mX0S9piE= + +Name: system/etc/legal/leaflet/ms/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: VeXUbxSY9sVYEOWeJAsy6GWHX4w= + +Name: system/app/PlusOne.apk +SHA1-Digest: xf4zHIWaTL1w9hS8hJlqQCWe4Fc= + +Name: system/etc/legal/leaflet/xl/Precautions-on-Memory-Card-Use.html +SHA1-Digest: z+9JZGV5kDlj24rfoOZdw/BTTnQ= + +Name: system/etc/legal/leaflet/en-HK/Precautions-on-Memory-Card-Use.ht + ml +SHA1-Digest: MT+PPRLB0uJUPqCGW6Tl9idXUP8= + +Name: system/etc/security/cacerts/0d188d89.0 +SHA1-Digest: FzoOvFUf3dNV/AEJ20wcfK1JUGk= + +Name: system/etc/firmware/vidc_1080p.fw +SHA1-Digest: xMiduF5B1S7uxiK02V7svtzcnVo= + +Name: system/etc/legal/leaflet/zh-TW/Publication-number.html +SHA1-Digest: EGlcwugB4bD3LEo9god5pAJ2gQk= + +Name: system/etc/legal/leaflet/cf/End-User-License-Agreement.html +SHA1-Digest: 4AHiuMzmYVBFO8z1x6S323HR0N0= + +Name: system/bin/efsks +SHA1-Digest: saZntDgGI8/n+qpwPQQX4WyQXlk= + +Name: system/etc/legal/leaflet/ar/Battery.html +SHA1-Digest: ZP/w+XF4P6QAHpDH72rKsXfCxY8= + +Name: system/usr/xt9/SEMC_810_r1-5_IDlbUN_xt9_2.ldb +SHA1-Digest: 8CIMOEcWQ7dUPf3pyVGy8NaW2qo= + +Name: system/etc/legal/leaflet/en/Memory-Card---legal.html +SHA1-Digest: jBc/eD8HZcvJmMYf2g0Xy6A3qsE= + +Name: system/etc/legal/leaflet/fa/Our-warranty---12.html +SHA1-Digest: itc9yNGpNmKD9Mq4tF7bXL7eKd0= + +Name: system/fonts/RobotoCondensed-Italic.ttf +SHA1-Digest: HjOk01XwQ2PScIy0Q1HS5ekk5+E= + +Name: system/usr/srec/en-US/normalizer +SHA1-Digest: 4iCTB9icELI1BJdqCXr2ZLXF120= + +Name: system/etc/legal/leaflet/hr/Memory-Card---legal.html +SHA1-Digest: swp6T7LJeLRShfOis2zjKQ26VU8= + +Name: system/app/SystemUI.apk +SHA1-Digest: f0IGje44V9mp4cq4pIiV0VAheJ8= + +Name: system/etc/legal/leaflet/th/Conditions.html +SHA1-Digest: RNW7+wlZ/ocw/NeY3B6qKiBJkDE= + +Name: system/framework/digitalpensdk.jar +SHA1-Digest: YFKtFV2m6jwvgzE8U1wSYM85fsE= + +Name: system/media/audio/notifications/Argon.ogg +SHA1-Digest: HhYnnwVC3/jkQY5/qoN5EDEceVo= + +Name: system/framework/com.sonymobile.settings.illumination.jar +SHA1-Digest: PQ4RZyngJCSxsRLgiYBLD4mKVIY= + +Name: system/etc/legal/leaflet/kk/Malware.html +SHA1-Digest: 4IfDU5b8NfKV0Fbemn3Smt+FrqA= + +Name: system/etc/legal/leaflet/zh-HK/Copyright-and-trademarks---Legal- + leaflet.html +SHA1-Digest: b+VlMg+m4yWCcSAgTvFzIZzDbPc= + +Name: system/etc/legal/leaflet/pt/Memory-Card---legal.html +SHA1-Digest: dhPA5aI+sweLZ1fKufn4VyO6IMM= + +Name: system/framework/content.jar +SHA1-Digest: XXWCZ2bklntH06lAvI6VELnD0eY= + +Name: system/framework/com.google.android.media.effects.jar +SHA1-Digest: H2j2wbF+Mw9OO6S9SV6aPUDO3Wg= + +Name: system/etc/legal/leaflet/sq/Export-regulations.html +SHA1-Digest: QYzxWwZdGUbLdowy2EhFUNSDo0E= + +Name: system/etc/legal/leaflet/kk/Conditions.html +SHA1-Digest: /Ec9JALxfy1BdyNACmF7wgw0To8= + +Name: system/etc/legal/leaflet/bs/Loudness-warning!.html +SHA1-Digest: 1tm8LDeFoQG9cdjri1d9Ef8Z1FM= + +Name: system/etc/legal/leaflet/sq/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: OTWN2hPMrkQyhtQSHdufwnxIvjU= + +Name: system/etc/legal/leaflet/uk/Loudness-warning!.html +SHA1-Digest: oXOVHCcbyLVfMH953tG9lwdyxJ4= + +Name: system/vendor/etc/fallback_fonts-ja.xml +SHA1-Digest: wDzUXRGoeUhqFCAkihOfSIn5/jU= + +Name: system/media/audio/alarms/balance_of_power.ogg +SHA1-Digest: NaoCttIGyDusx6llBiS6ygkYee4= + +Name: system/vendor/overlay/com.sonyericsson.r2r.client-res.apk +SHA1-Digest: kom6NcaYBythdb/WBADG5ysC4XM= + +Name: system/lib/libexif_jni.so +SHA1-Digest: 4l8Yi3aKFrYRHLu0H0wNR4Bt5vI= + +Name: system/framework/com.sonyericsson.navigationbar_impl.jar +SHA1-Digest: GOltsmlB5KRFS+U5EfVCOpzV9v0= + +Name: system/usr/xt9/SEMC_810_r1-9_LTlsUN_xt9.ldb +SHA1-Digest: Vht7T9tIg90Y04Xu1Gxh3ZU0zZ4= + +Name: system/app/FBMediaDiscovery.apk +SHA1-Digest: LkraRtpCQ4qQZJJYed8stjVVmVw= + +Name: system/etc/DxHDCP.cfg +SHA1-Digest: KJ9CvUnSdXWF53gQ04A9UTC4cCg= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_green.jpg +SHA1-Digest: XmHuanxDQlXIVwJUL6vtophmajs= + +Name: system/etc/gps.conf +SHA1-Digest: ptugfZ3rb7kgJaz/6DjgnFNZn4s= + +Name: system/bin/dalvikvm +SHA1-Digest: 6M2CFaMsKqhuLaCcVd/AJxxcQcI= + +Name: system/lib/libjni_mosaic.so +SHA1-Digest: tPdXqZpnjRnt72pbzZr9gSnH8V4= + +Name: system/lib/libxml.so +SHA1-Digest: AVRyIpQhjJKu5m+heVH+zbdAP9I= + +Name: system/lib/libdivxdrmdecrypt.so +SHA1-Digest: R6/b+GtVTghUzoWufc57xYusNBg= + +Name: system/lib/libvideoeditor_videofilters.so +SHA1-Digest: GZHqM7U5znS9v5TpC1UWwKikTCw= + +Name: system/etc/legal/leaflet/kk/Personal-medical-devices.html +SHA1-Digest: 6MBIdF9shwgpvTzbF8K3qELcGco= + +Name: system/etc/legal/leaflet/ru/Flight-mode.html +SHA1-Digest: RwJBLtD4fxMPXaA1JJxDsMwAJm0= + +Name: system/media/audio/ringtones/Bollywood.ogg +SHA1-Digest: lp+O3MhWrS1FoZZYuyGBRcHyiz8= + +Name: system/etc/legal/leaflet/images/Note.jpg +SHA1-Digest: OIuds2h8JWaQOmLQtnhzQk/MQg8= + +Name: system/media/audio/ringtones/garden_waltz.ogg +SHA1-Digest: LOzFxOA6JZsguRJybXInimDPoG0= + +Name: system/etc/legal/leaflet/images/button_search.png +SHA1-Digest: d7E1bSwH93CGrVofGbY31As/iWI= + +Name: system/media/audio/notifications/Palladium.ogg +SHA1-Digest: XKfXczaRiqFqDMQb5gUjLHsrLtg= + +Name: system/etc/init.d/07sysctl +SHA1-Digest: hHFDqt+RIEy267fvbTrTJLcTA4w= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/End-User-License-Agreemen + t.html +SHA1-Digest: yyzD4bZtUiHRJHmEDChkQB4SS4o= + +Name: system/usr/keylayout/keypad_8960.kl +SHA1-Digest: Ley2AzzwGujOmwnVSRBEt8mgTX4= + +Name: system/lib/egl/libGLESv1_CM_adreno200.so +SHA1-Digest: Zx9fu3/NWNYn6JW5dizj6RvFmOI= + +Name: system/lib/libmpqavsync.so +SHA1-Digest: Ug9yBniKqv5uRETHsLmRxZOEE8Q= + +Name: system/lib/libfastcvopt.so +SHA1-Digest: GtIP0t+o6cM3YUfcq+AfwoYNuSg= + +Name: system/app/TetherEntitlementCheck.apk +SHA1-Digest: ObLHfIzY4/wWqztSynDWokDouso= + +Name: system/lib/libcald_imageutil.so +SHA1-Digest: asP1BQNskRqBPY+WLOFqTdG0Xk0= + +Name: system/lib/libsoundpool.so +SHA1-Digest: q2cAIz9Oi4vLCDa1h5HfQZAG83g= + +Name: system/usr/xt9/SEMC_810_r1-4_PLlsUN_xt9_2.ldb +SHA1-Digest: C64TskZxdY4Jk67WUxW35izbafU= + +Name: system/etc/legal/leaflet/pb/SIM-card.html +SHA1-Digest: qTo2rkJ7KzqyZjJ70E37ZmeeNJc= + +Name: system/bin/netmgrd +SHA1-Digest: OUwDzdXIb4rZcJCQjEc1PhbaJnc= + +Name: system/etc/fallback_fonts.xml +SHA1-Digest: eta34yp1QIT8go4j5ivJgX8gbjU= + +Name: system/etc/legal/leaflet/ar/index.html +SHA1-Digest: IgoFFACcT3UdU4RZqEOSQvHnMPg= + +Name: system/etc/legal/leaflet/bs/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: NH/Bsuoh2mEenTggn+7K3flBoCM= + +Name: system/etc/legal/leaflet/en-HK/en-CN/index.html +SHA1-Digest: 4JnjHZXQDLk3z4shkn+jKIEydYk= + +Name: system/lib/libtilerenderer.so +SHA1-Digest: 9Q5Hdw45L5ynmc5v3hsXoDjkbiI= + +Name: system/etc/legal/leaflet/ae/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: 9uC2Wr8hhpnjGT6MS4+6DbqB1UM= + +Name: system/etc/legal/leaflet/iw/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: mWjdrOzFTIsIwnCC0PHPaA6Wy4I= + +Name: system/media/audio/notifications/Plastic_Pipe.ogg +SHA1-Digest: 3O4wLzXogChzd65Qlmygs6OzuSI= + +Name: system/etc/legal/leaflet/en-PB/Service-and-support.html +SHA1-Digest: 0BPV+tqs3m7xK9mgoSRt1XwXo6A= + +Name: system/etc/legal/leaflet/fr/Personal-medical-devices.html +SHA1-Digest: vmqTqgjv1dNfB7+98EYMNDT9ybk= + +Name: system/framework/com.sonyericsson.dlna.playanywhere.jar +SHA1-Digest: jddKBVRVo8KznchtE5XAsY4SyCA= + +Name: system/etc/legal/leaflet/pt/Protection-of-personal-information.h + tml +SHA1-Digest: hIw0Aqu9zpa4dreopvz846Va4Kg= + +Name: system/etc/legal/leaflet/images/E-manual_splash-screen.jpg +SHA1-Digest: RAdHOrjCdkNT1UL/rzIYXUBjK60= + +Name: system/etc/hcidump.sh +SHA1-Digest: PD4c8tnl3Z0aMfLIXxEEZrdMNFU= + +Name: system/media/audio/ringtones/Gimme_Mo_Town.ogg +SHA1-Digest: LNVjQUp8VmYJaHeA2fNsKY2ZIgA= + +Name: system/media/audio/ringtones/Steppin_Out.ogg +SHA1-Digest: 8Kxwq5Q0tcw54LWcnM/E97uQQNo= + +Name: system/lib/libharfbuzz.so +SHA1-Digest: AQd3Osm+ZZvIz5jkoN6KbxqVKEY= + +Name: system/tts/lang_pico/fr-FR_ta.bin +SHA1-Digest: xsa/hqJTXz8Rc7l3UTQXz1ikriw= + +Name: system/vendor/firmware/libpn544_fw_c2.so +SHA1-Digest: P+MOHy6whbDXX8YPojL7gt+wtFw= + +Name: system/etc/legal/leaflet/fr/Important-information.html +SHA1-Digest: Plwn+HUpi9vKpLVoGsX0E/CLcIg= + +Name: system/etc/legal/leaflet/en-PB/Loudness-warning!.html +SHA1-Digest: FXUSJ+Hekmyy08kS8Vxr5BdvSOw= + +Name: system/etc/legal/leaflet/sr/Driving.html +SHA1-Digest: 8gpW5bdSVF+zo7RKGdEuevtuyKg= + +Name: system/etc/legal/leaflet/xl/Driving.html +SHA1-Digest: Lcz7ann92Geb7oGlHa677djEzok= + +Name: system/app/POBoxSknWood.apk +SHA1-Digest: //WOr+3O0mfhr+Uwi7j2iJgPffY= + +Name: system/bin/mpdecision +SHA1-Digest: r5oyZ0z8K9RRlKKt2kq2pdYGoJ4= + +Name: system/framework/bouncycastle.jar +SHA1-Digest: zvez2xi1ynmbDUIh1o2PlFELua0= + +Name: system/lib/libctest.so +SHA1-Digest: i5yNDyqNnOIGUEgEDmguoFzcLtU= + +Name: system/etc/legal/leaflet/zh-CN/Precautions-on-Memory-Card-Use.ht + ml +SHA1-Digest: oKmr1xh3AtNnrboLW7WXYJ43jeg= + +Name: system/app/GoogleContactsSyncAdapter.apk +SHA1-Digest: Z8RqYqpHpGAn0+8rhirBYgWeoic= + +Name: system/etc/legal/leaflet/sr/Flight-mode.html +SHA1-Digest: DBOcDLZFcWomoIS6gK0NdQMFPQA= + +Name: system/usr/srec/config/en.us/models/generic11_f.swimdl +SHA1-Digest: 5eK+Uqn7V9+/aGXZDDzZ5MstkII= + +Name: system/etc/permissions/com.sonyericsson.snp.video.xml +SHA1-Digest: flFxPi7WLTO8X2VfrcEtXy8pauw= + +Name: system/media/audio/ringtones/SpringyJalopy.ogg +SHA1-Digest: ASVmjcAYel5//dn1hGDDbA6bvUY= + +Name: system/etc/legal/leaflet/en-HK/Conditions-zh-zt.html +SHA1-Digest: z+73R8nmVpqdlE+qaO4g8EeT1DU= + +Name: system/app/Home.apk +SHA1-Digest: iw6WiZKhNJXWjp6hE+K2+3/c5y8= + +Name: system/lib/libnjfzk.so +SHA1-Digest: K9cnv+camz+tp1U9U6eDaWcysW0= + +Name: META-INF/com/google/android/updater-script +SHA1-Digest: VkYPW5WdBWh7Nul0M1jyC0YYyEw= + +Name: system/lib/libsysinfo_jni.so +SHA1-Digest: /tPN6EzbB22T5OBIbL8R81ofGGE= + +Name: system/etc/legal/leaflet/images/LEGAL-RECYCLEBIN-low.jpg +SHA1-Digest: unjsvqIhYH8BtD9wgdSuJqP8uYs= + +Name: system/etc/legal/leaflet/in/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: /Y68dNoE/Plr5Z4mJENjvGKyCCI= + +Name: system/etc/legal/leaflet/ar/no-title.html +SHA1-Digest: 8rEWHikoq1+ra3kpBoITp+Tmv5g= + +Name: system/etc/product/content/playlist_20121224102100.xml +SHA1-Digest: uwrVoFpPIFdGZfWFzJIg95kD0Sw= + +Name: system/etc/legal/leaflet/ru/What-we-will-do.html +SHA1-Digest: an1mDWGVs4hWaVGAvpHl/il2GyU= + +Name: system/etc/legal/leaflet/zh-TW/Flight-mode.html +SHA1-Digest: 4A6nSZCmXV4w2pR4cqIeA0IWGKI= + +Name: system/etc/permissions/com.sonymobile.playanywhere.xml +SHA1-Digest: nQlMLESA3cn4VbT5jbu2BAYs0BU= + +Name: system/etc/firmware/leia_pm4_470.fw +SHA1-Digest: BFO3gNEnY1H82fEQBZ1FOXmSBYQ= + +Name: system/etc/legal/leaflet/in/no-title.html +SHA1-Digest: v+JRCTRGt6tHA5BRwB+yTW1GZ28= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Accessories.html +SHA1-Digest: CibbztMN4QJY6l3dbFMuZqNxkJg= + +Name: system/etc/legal/leaflet/fa/Loudness-warning!.html +SHA1-Digest: 9KVNbzpGSwFL76m3DBaXsVTY/Pw= + +Name: system/bin/drmserver +SHA1-Digest: AcMVw0dGE4tgatQgesRIc+naT9k= + +Name: system/bin/e2fsck +SHA1-Digest: IInV4DszDKlR6NYO3/FNctOzjaM= + +Name: system/etc/legal/leaflet/ko/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: b4hCBixB6a/AwD2VLV3H5NHksTM= + +Name: system/lib/libvideochat_jni.so +SHA1-Digest: AGchaBSlU7cDNw7bPMCKj7ytmUA= + +Name: system/etc/legal/leaflet/iw/Accessories.html +SHA1-Digest: IdjBzen54YsoEo/r1CYp3KZvjL4= + +Name: system/media/audio/notifications/DearDeer.ogg +SHA1-Digest: PqQWPpaTrtYxRVymXbHHNl4TDcY= + +Name: system/etc/legal/leaflet/in/Conditions.html +SHA1-Digest: t1usBUxHwMWqqzi5TRNW+VBwX2o= + +Name: system/etc/legal/leaflet/ae/GPSLocation-based-functions.html +SHA1-Digest: l2kMkO5EonblsohE3R8sfG7ws44= + +Name: system/etc/legal/leaflet/ae/Publication-number.html +SHA1-Digest: M3sN1sm3tu80fjoX2u730lVzCVQ= + +Name: system/etc/legal/leaflet/ms/Antenna.html +SHA1-Digest: TC7Siwo/TP3u0vf4FWwBpV+NpJ4= + +Name: system/usr/keychars/qwerty2.kcm +SHA1-Digest: daI1+jRsBLH0AaORU4xCM1Bp4/M= + +Name: system/etc/legal/leaflet/xl/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: ingOhHalSJHQVB4u61bpNWYFJac= + +Name: system/etc/legal/leaflet/th/Children.html +SHA1-Digest: KLQZqmoYbOVAFyjPt4GW2lkRzvw= + +Name: system/usr/srec/en-US/lintrans_model +SHA1-Digest: kpgCxKz87KHw265e+HcUMuVMhlQ= + +Name: system/lib/libnjaddress.so +SHA1-Digest: 6Mqh5+vJ0IJEoC7oSCDHm8DLP1c= + +Name: system/build.prop +SHA1-Digest: g1L3wrihf31gR64Qb/cxzfaBZC0= + +Name: system/etc/legal/leaflet/ko/Our-warranty---12.html +SHA1-Digest: 07hFPeW9dZCXKbshtB4i6XR5tBg= + +Name: system/bin/qmuxd +SHA1-Digest: Wm47hSeV0SkXLMzE+ufDAPZvh9Q= + +Name: system/etc/legal/leaflet/en-HK/Memory-Card---legal.html +SHA1-Digest: 4QTZKS0gJLHtv6HNw3JNiTXjwT0= + +Name: system/lib/libcrashmonitornativejni.so +SHA1-Digest: XNFJJCHVknT+KjhXAWMwkieZAkU= + +Name: system/lib/sysmon/sysmon_pm8921_tz.so +SHA1-Digest: XhO4HJckipWruF2V5e885TGdDEU= + +Name: system/etc/legal/leaflet/sq/Children.html +SHA1-Digest: xm2Ndrdw617rQxy1+N1h46Syw9o= + +Name: system/etc/legal/leaflet/sq/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: QXVggt/tl1ty0X1oUDZxazutq5Q= + +Name: system/lib/libcorkscrew.so +SHA1-Digest: rD/hGF3WIGW0FciF3Ac8LG25bQk= + +Name: system/semc/chargemon/data/charging_animation_06.png +SHA1-Digest: F8L3Eez7l54KVZ12q0qYcsUi/1E= + +Name: system/etc/legal/leaflet/iw/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: PLxoRZZgPuAIfsMnivxzQEaWRrs= + +Name: system/bin/fm_qsoc_patches +SHA1-Digest: vxZrcT3UiWxG7aitImGQm76gULM= + +Name: system/framework/com.sonyericsson.dtcpctrl_private_impl.jar +SHA1-Digest: Sr5GxfwqgECrqBmoirZPj6DyzjY= + +Name: system/etc/legal/leaflet/in/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: kTEPvpGdw+HmFFo7thHkuOaCjCU= + +Name: system/etc/legal/leaflet/sq/Battery.html +SHA1-Digest: QQFMtcMhbkDB/CdKlftl9DU0scc= + +Name: system/etc/legal/leaflet/zh-TW/Malware.html +SHA1-Digest: O0moFQPbX6jKgDU1g5TwBRe6yKk= + +Name: system/bin/usf_tester +SHA1-Digest: Ag4Wvtlw9hvkbPklizuyrhl3DDg= + +Name: system/etc/legal/leaflet/th/index.html +SHA1-Digest: M5Rjg+0cQ0jbSAl2K94XkzdiLvo= + +Name: system/etc/security/cacerts/524d9b43.0 +SHA1-Digest: k2297HCYvN3BAhcl4kjnmOImy4g= + +Name: system/etc/security/cacerts/1eb37bdf.0 +SHA1-Digest: iEZtf6Bn7/kWs6HdB0tR9qNkl1I= + +Name: system/etc/permissions/com.sonymobile.nfc.xml +SHA1-Digest: gEyysd5C3ZUZm2BIF4U336wwaJ8= + +Name: system/lib/libRS.so +SHA1-Digest: iHJ6x71hSfGHfnimTo9hZ5jvIng= + +Name: system/etc/security/cacerts/455f1b52.0 +SHA1-Digest: kAWSB8ILogPZzBtuKBpjQvO6wGU= + +Name: system/etc/permissions/android.hardware.touchscreen.multitouch.j + azzhand.xml +SHA1-Digest: +jpP1GhT6HwDfDHhPbF4fqQTwB8= + +Name: system/media/audio/ringtones/Ring_Classic_02.ogg +SHA1-Digest: 3+dDRMcLXTPNRjUBXi0YzTWFjTk= + +Name: system/app/StartupFlagV2.apk +SHA1-Digest: KNh/bFLC7geaBh8XLL6B2T4hbbI= + +Name: system/etc/legal/leaflet/ms/Flight-mode.html +SHA1-Digest: zZLsXp7Vwgc/wzij5ewDyW6XCoI= + +Name: system/lib/libaudioflinger.so +SHA1-Digest: 0Bd61rn1HR2DH2W4A3h5Mp3drzU= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/grey_lake_hd1080p_small.jpg +SHA1-Digest: Us/talx9N6+t1fBY8X6fFmwjres= + +Name: system/etc/legal/leaflet/images/next-Orange.png +SHA1-Digest: j128pAMaxwJdYG5PlMUqoUeYzVo= + +Name: system/etc/firmware/wlan/prima/WCNSS_cfg.dat +SHA1-Digest: MsEg1Oq0IQQEioDS2LknA3EtaOY= + +Name: system/etc/legal/leaflet/sq/Power-supply-(Charger).html +SHA1-Digest: ZztiHQljZokt759Vc61rwVbVkqk= + +Name: system/bin/dbus-daemon +SHA1-Digest: yCBT6QvS32LRWP1VsToFt9OQDqA= + +Name: system/etc/legal/leaflet/vi/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: cLUTAyEfbigQ9I20aXje1juXKbA= + +Name: system/media/audio/ui/camera_click.ogg +SHA1-Digest: V7fhbEaJIXo2h/p1lguCCaLW6qk= + +Name: system/etc/thermald-8064.conf +SHA1-Digest: 9hHnMbIiBBj+K2pqFKa6gzy/FIA= + +Name: system/lib/libext2fs.so +SHA1-Digest: CxQCxSC+FKp9XonLxJ1h1CYUhrg= + +Name: system/etc/legal/leaflet/vi/Power-supply-(Charger).html +SHA1-Digest: aPx5vQdFOggjuN57FigbobsJlVQ= + +Name: system/etc/legal/leaflet/th/Malware.html +SHA1-Digest: j2HudKTE+hKe1CBVcdjNh9qkbtk= + +Name: system/etc/snd_soc_msm/snd_soc_msm_2x_Fusion3 +SHA1-Digest: w4uls/kTG1OEiuTL7M5UaogwOtc= + +Name: system/etc/legal/leaflet/styling/legal_mltr.css +SHA1-Digest: +yyLNWVALOf4vD6MeNyMMAZGAnk= + +Name: system/media/audio/ringtones/Playa.ogg +SHA1-Digest: LFUvtapzPyL03swjeMPtP1FnShk= + +Name: system/usr/keylayout/Vendor_045e_Product_028e.kl +SHA1-Digest: 5vqCZTOVkoSpc0kmFfaNUhf5FbE= + +Name: system/app/Superuser.apk +SHA1-Digest: quC8e9XaZakhD2yF3DkxT8zfBEc= + +Name: system/media/audio/notifications/Adara.ogg +SHA1-Digest: tziXnX9eKHBsJo4Fe1zksDhhAP8= + +Name: system/lib/libcurl.so +SHA1-Digest: R8ZA2OLtIIvKaik2JJ1vss5wvbQ= + +Name: system/etc/legal/leaflet/en/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: tRBFV4+v57KXx6MLe0MKRrFVVYU= + +Name: system/etc/legal/leaflet/ar/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: Ju12WJ3EqtgCGl2gLq/gFwwt1xw= + +Name: system/lib/modules/lcd.ko +SHA1-Digest: 5NL935/LJLBTMr9TUTtgyibmkOM= + +Name: system/etc/legal/leaflet/en-HK/Important-information.html +SHA1-Digest: tAy7TgH4C8v8l/JLqWLgTtMDyLc= + +Name: system/etc/fallback_fonts-ja.xml +SHA1-Digest: 3l/3SdloG+2JLA8O3uH79aSM6bc= + +Name: system/etc/security/cacerts/dbc54cab.0 +SHA1-Digest: mLY39lqUQs7ml8zsoOpALdtZjMk= + +Name: system/lib/libdefcontainer_jni.so +SHA1-Digest: cWiIalJy5TMRfD1GlpcRzIMOwq4= + +Name: system/lib/libmmipstreamutils.so +SHA1-Digest: XdqHsUbXaLvswgt55PhyjescAuQ= + +Name: system/etc/legal/leaflet/uk/Power-supply-(Charger).html +SHA1-Digest: Dl+Q8WZnZc97jw2OcYxE3DKptYM= + +Name: system/etc/permissions/handheld_core_hardware.xml +SHA1-Digest: F4hDcGHqWxsTh4I+siOHqZJtIlQ= + +Name: system/etc/legal/leaflet/in/Personal-medical-devices.html +SHA1-Digest: mND+BabfcWZ10nUuffkjtBj0NDc= + +Name: system/app/BlackTheme.apk +SHA1-Digest: KNrTSG/tifi68AxN82ytMT49aq8= + +Name: system/etc/legal/leaflet/in/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: P7zz3Rg/2AAWy6YtPO6W9sYXZoc= + +Name: system/lib/libmmipstreamnetwork.so +SHA1-Digest: mbXIyqZVUYtIIpxZsHgS2ACBFm8= + +Name: system/media/audio/notifications/Sirrah.ogg +SHA1-Digest: rhPvMnpeyYGPjaw4uh65x5woy5M= + +Name: system/vendor/camera/SEM13BS0_IMX135.dat +SHA1-Digest: RJGSIloyrGWZ5BnIz0LH0Z/Jxd8= + +Name: system/etc/security/cacerts/5046c355.0 +SHA1-Digest: OQH1BPU6CROY/RgHEc+aJJM9Lcs= + +Name: system/bin/surfaceflinger +SHA1-Digest: 8/mSxUrlFyZ+y5PsN0tpo9J0ZeI= + +Name: system/etc/legal/leaflet/en/Antenna.html +SHA1-Digest: 8/u8xUIEKoQbMjhr/3+iC/0TRaU= + +Name: system/etc/security/cacerts/5a5372fc.0 +SHA1-Digest: Fb0tYUiGRziyUpyHHetf0/rTWWU= + +Name: system/lib/modules/oprofile.ko +SHA1-Digest: bCeGzIgRKr1kn0lrAlnX+5DWQnw= + +Name: system/lib/libLightsJni.so +SHA1-Digest: NWX4jcSjfo1NKWB3hbUB/+b67tw= + +Name: system/etc/security/cacerts/9685a493.0 +SHA1-Digest: uQOYnTRtD38Rh9THdcalO+4cPsI= + +Name: system/app/PicoTts.apk +SHA1-Digest: fHwcFk0jgDO9UTdWCZ66YiwC18g= + +Name: system/app/Exchange2.apk +SHA1-Digest: 4WiMW7FYxb7lV6F5hI/+GBTmd5s= + +Name: system/etc/firmware/q6.b03 +SHA1-Digest: 8iZBPP8fm4n1oiGZBgoOMO/pxLY= + +Name: system/lib/libdsprofile.so +SHA1-Digest: jHtfeoTo9TmuvRaWUd/5qphgVyo= + +Name: system/etc/firmware/q6.b05 +SHA1-Digest: 6dZYiuxU2OhdSk3Rc/FwCvp3pG4= + +Name: system/etc/permissions/com.sonyericsson.nfc.handover.xml +SHA1-Digest: c+fFtEhH5R7umAv0FKsA5zrJeYs= + +Name: system/etc/customization/settings/com/sonyericsson/androidapp/st + orefront/custom_settings.xml +SHA1-Digest: Du6hzpGuSnkB/obTKa1myE1Xrig= + +Name: system/etc/firmware/q6.b04 +SHA1-Digest: U5FuNzPJ3VYlwM+dEa7rKDNO6Tc= + +Name: system/etc/permissions/com.sonyericsson.android.cdfinfoaccessori + f.xml +SHA1-Digest: CUYQ/jdKVaRMIdQFM48BskJHEVY= + +Name: system/etc/firmware/q6.b01 +SHA1-Digest: MUnd/ryXnJvFTij9XhTsXbqaXYY= + +Name: system/etc/firmware/q6.b00 +SHA1-Digest: Jctk5/zgVacwgaEfD6chTjx4VIM= + +Name: system/media/audio/ringtones/ArgoNavis.ogg +SHA1-Digest: VFRq6IbQDiS1mDU8r9IzmdprsdI= + +Name: system/usr/xt9/SEMC_810_r1-10_BGlsUN_xt9_2.ldb +SHA1-Digest: GZnB45Eht3+gs8B4e9W+2KIO7Es= + +Name: system/etc/firmware/q6.b06 +SHA1-Digest: ClUhNZSJZQViFzhRtPZbsf/vEGM= + +Name: system/bin/netd +SHA1-Digest: ScZDaEiUhfmD/qjCNdNnbpPErJI= + +Name: system/app/UnlimitedBurst.apk +SHA1-Digest: lorjlMjGh9qPye+t+LkWY7cJhgw= + +Name: system/bin/schedtest +SHA1-Digest: 79TTHeYMFVcsu212JsTCwVPL4qM= + +Name: system/etc/legal/leaflet/vi/Service-and-support.html +SHA1-Digest: oKJia9yap7cOm4oERIbv7GVL5Yk= + +Name: system/app/CertInstaller.apk +SHA1-Digest: kaOgyRrKkIx71K5NgC85aYuH1fc= + +Name: system/usr/keylayout/Vendor_046d_Product_c21a.kl +SHA1-Digest: zRxdHBeasRxARQx/NM2LGMGNsPM= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Emergency-calls.html +SHA1-Digest: cqBYCSgtr/+xMxGwsz3lxIYPD2s= + +Name: system/etc/legal/leaflet/cf/SIM-card.html +SHA1-Digest: 3ltPv0uat2uB6njg6UcB9hyEjME= + +Name: system/lib/sysmon/sysmon_msm_thermal_disable.so +SHA1-Digest: wDyP5clx9Roqb1e6lf6ewJJNyzM= + +Name: system/etc/legal/leaflet/hi/Power-supply-(Charger).html +SHA1-Digest: H3XhKgCgIGCqQKm+4iM/zRQ8SK4= + +Name: system/etc/legal/leaflet/vi/Our-warranty---12.html +SHA1-Digest: HVtV+ECi63av1YcExxm5I/4Lycs= + +Name: system/etc/legal/leaflet/hr/Personal-medical-devices.html +SHA1-Digest: qQ487It8QVVht4cduySIA0WvjYw= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/green_jungle_hd1080p.jpg +SHA1-Digest: V4RDXutAwP1B+Zsa4sXJg8CiwCA= + +Name: system/app/UnsupportedHeadsetNotifier.apk +SHA1-Digest: zmQmSGn73gR4GUD/ngPXa4FGDb4= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_blue.jpg +SHA1-Digest: rtxP5BFHso0FnU+vfgQvLDgGcG0= + +Name: system/etc/legal/leaflet/en/Accessories.html +SHA1-Digest: 9A0fq2UeS+0b+TLnZbcJ+d+nUcc= + +Name: system/lib/libhdmi.so +SHA1-Digest: fAvynjTG7onVpbPGus+qjEF3g08= + +Name: system/lib/libstagefright_soft_flacenc.so +SHA1-Digest: emLg9sqofV8BVtWKx/ut8x8+GQw= + +Name: system/lib/libmmstillomx.so +SHA1-Digest: HEnpNPjB/B2fWUXDhMhNFa+TL5c= + +Name: system/lib/libta.so +SHA1-Digest: 7ZYdZ1+KiLZHTPvvsdF10EjvIRs= + +Name: system/app/DrmProvider.apk +SHA1-Digest: AQyR7EQlQmcqYxB0pRaj75/VLOU= + +Name: system/lib/libmmwfdsrcinterface.so +SHA1-Digest: dsz9mTHL1hsNrclg1iO2MDvDgfc= + +Name: system/bin/idmap +SHA1-Digest: IzvJ1A6EY7Ppzl9a+UM4n4wOjH0= + +Name: system/etc/legal/leaflet/iw/Our-warranty---12.html +SHA1-Digest: VepJTnlOQ8FOmLmqxaWaVXJUJhU= + +Name: system/etc/legal/leaflet/sr/End-User-License-Agreement.html +SHA1-Digest: PK+BrpWL6fxaf5emU1QSUhekoJs= + +Name: system/media/audio/notifications/Xenon.ogg +SHA1-Digest: HnRSqIvJwV/tZLcpvYukT2/xnMA= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Antenna.html +SHA1-Digest: bwD9Y2xNPeBJCGTshoK9AJOifJs= + +Name: system/vendor/overlay/com.sonyericsson.trackid-res.apk +SHA1-Digest: 83E6mn1YW0qk5T7pR4Udr/51s6I= + +Name: system/lib/libwfdrtsp.so +SHA1-Digest: LoeYUtYdzj0TssFKooi5/ytkVfQ= + +Name: system/bin/atrace +SHA1-Digest: 02Ij0nf+IDKxB3iiq+avk6ttwEs= + +Name: system/etc/legal/leaflet/xl/SIM-card.html +SHA1-Digest: Jjwu7HEXlyhPXDNOa4RMfxhrbL4= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blueprint_hd1080p_small.png +SHA1-Digest: 2IC/Y9Vq/vhw09eSJRD3RX4V7tM= + +Name: system/etc/legal/leaflet/fa/Emergency-calls.html +SHA1-Digest: oSFrTrWTwQPNLAeQqbtLvKs/gMA= + +Name: system/fonts/DroidSansArmenian.ttf +SHA1-Digest: ZqNiJp/UISxsUJB+Xj4nlWWRPT8= + +Name: system/media/pictures/mt_huangshan_01.jpg +SHA1-Digest: 1iJWDQf4Z8TGt3WQvUgFJ4RMaMU= + +Name: system/etc/legal/leaflet/fr/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: SE0X0hWAgPSz/6Hzw5QmHz3F7Gs= + +Name: system/etc/legal/leaflet/pb/Loudness-warning!.html +SHA1-Digest: TihHBupU6UPROo51Y0IKg8M5Pb4= + +Name: system/bin/mediaserver +SHA1-Digest: ArNIDmgecoomFwHJNl+cXo3h1DA= + +Name: system/etc/legal/leaflet/ar/Export-regulations.html +SHA1-Digest: Qe6kFcAyTWWTFS/SrO6qDQA3HXo= + +Name: system/etc/legal/leaflet/pt/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: nk8HicCFSViI+uq951JHtHoUbuA= + +Name: system/vendor/camera/SOI13BS1_DW9735.dat +SHA1-Digest: Fw2GNiDc8l31JsTYd9ux12C7syo= + +Name: system/media/audio/ringtones/winning_smile.ogg +SHA1-Digest: 2m2ctZh5xrN07A6YvyJT3Eo/ZWA= + +Name: system/lib/modules/msm-buspm-dev.ko +SHA1-Digest: cyn7I8QpIbS+ivQVU0jvuhyG4pA= + +Name: system/etc/legal/leaflet/zh-HK/Radio-frequency-(RF)-exposure-and + -Specific-Absorption-Rate-(SAR).html +SHA1-Digest: I2PbFw+a5t3J9HjB3QxnGsomMs0= + +Name: system/framework/com.sonyericsson.illumination.jar +SHA1-Digest: mEsvmqlezHmyZyQlQ5elP3xQFBM= + +Name: system/lib/libnpfinal.so +SHA1-Digest: zz+ZPkJ2elH7ANB7FWRMCExFF7Y= + +Name: system/etc/security/cacerts/7a819ef2.0 +SHA1-Digest: Ig0Zi/k4BqWAYNZWWgJjpKVsDHs= + +Name: system/etc/legal/leaflet/ru/Warning!.html +SHA1-Digest: VnejH5ceM1kvqSkNiAbnwrtdy2M= + +Name: system/etc/legal/leaflet/hi/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: D978v2/XIACfRMe9LbCMQV3esEA= + +Name: system/etc/init.qcom.bt.sh +SHA1-Digest: ZdVuMdxA70HlNgg3RSzNrj6z1js= + +Name: system/lib/libext2_uuid.so +SHA1-Digest: KkdKf2CZ1ukuVd4qo0UOgC7EVSQ= + +Name: system/media/audio/notifications/tinkle.ogg +SHA1-Digest: JgLkKX1z8SWXGlur4lIoVHMREYQ= + +Name: system/fonts/AndroidEmoji.ttf +SHA1-Digest: 5ygkuw7zJUNfpUzNMGi/iv9qbbA= + +Name: system/app/JapaneseIME.apk +SHA1-Digest: PNH4rPrTq9NhDodgIpPYNgWdcVo= + +Name: system/media/audio/ringtones/CaribbeanIce.ogg +SHA1-Digest: SQgjv1jT8oPEIVRORsXGVCvZx90= + +Name: system/usr/xt9/SEMC_810_r1-3_BSlsUN_xt9.ldb +SHA1-Digest: 7oyvYlBbk7oUpzhsVXQVIvcTXOY= + +Name: system/etc/legal/leaflet/bs/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: cx99AJ5Ao+3SWBMb0mwpS+fOFkg= + +Name: system/framework/com.sonymobile.photoanalyzer.jar +SHA1-Digest: 0nt2M+hfh1zIMCt+ejBjxvjbsX8= + +Name: system/etc/legal/leaflet/fr/SIM-card.html +SHA1-Digest: UjcjejgH/4f/HW6GISP6TGDb/nc= + +Name: system/app/com.sonymobile.retailwidget.apk +SHA1-Digest: 93CAU++///BpmkHDzBjWn7WArEc= + +Name: system/etc/legal/leaflet/sq/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: 7B9x5Fa18G69YRGWV2y9QMkfg50= + +Name: system/app/helpapp.apk +SHA1-Digest: oERspbFn2Wr9Bt2aTVICdQnge4s= + +Name: system/etc/firmware/tzlibasb.b02 +SHA1-Digest: yWZY3KlN+MaP5xs1NubnA4sjQFw= + +Name: system/lib/libWnnEngDic.so +SHA1-Digest: oDWcCRYDuW3XX0ZArgTI0FYYkLw= + +Name: system/etc/firmware/tzlibasb.b03 +SHA1-Digest: IWMyqkkdScD4Lo7mTKt6jNl8V2k= + +Name: system/etc/legal/leaflet/zh-HK/Antenna.html +SHA1-Digest: 7f1gGxEEN09XFK9yeVWYgGie6h4= + +Name: system/vendor/camera/SEM13BS0.dat +SHA1-Digest: nHKKsdfVe4hVP++7oNMeVNljQxU= + +Name: system/etc/legal/leaflet/en/Protection-of-personal-information.h + tml +SHA1-Digest: Jz5Aab155UM+ND2KkvCjbpvrdl8= + +Name: system/etc/legal/leaflet/zh-CN/Geographical-scope-of-the-warrant + y.html +SHA1-Digest: 30OLnhqxKob9LKIM05Ob/ENfU00= + +Name: system/app/PartnerBookmarksProvider.apk +SHA1-Digest: Qb2156iw/PpP7IdHEGF0FhjQNMU= + +Name: system/etc/legal/leaflet/hr/Malware.html +SHA1-Digest: UiAJevTuoGz0d3nt1RyNG6+Ji/8= + +Name: system/lib/liblog.so +SHA1-Digest: fsHh/lVbf5mQ/+JBqTqqCwmb2xk= + +Name: system/vendor/lib/drm/libdrmwvmplugin.so +SHA1-Digest: y7zc7WfVahIkYpQqN0K/e/p5ctA= + +Name: system/etc/legal/leaflet/vi/Personal-medical-devices.html +SHA1-Digest: 9U4mfulHCvxDCiKexBgS1OzXzOw= + +Name: system/etc/legal/leaflet/zh-TW/Precautions-on-Memory-Card-Use.ht + ml +SHA1-Digest: HunOakFGZhcQ1QMKs8OuPMjcrpg= + +Name: system/semc/chargemon/data/non-charging_animation_04.png +SHA1-Digest: KSH7yK0MVRdv35C+mT1pdJZGNM8= + +Name: system/etc/permissions/com.sonyericsson.appextensions.xml +SHA1-Digest: z9S2I+E3Q6oT6MIrSImczNDo2LA= + +Name: system/lib/modules/qcrypto.ko +SHA1-Digest: XUzzteWlOBvncLvaBIJEKkK2ytA= + +Name: system/bin/iptables +SHA1-Digest: X2UdZhTy1EnML1BGPwt7+7dBpuQ= + +Name: system/media/audio/alarms/Alarm_Beep_02.ogg +SHA1-Digest: 9Cw9s61BeSWhTnvzXxttiBZ1qu0= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor0.so +SHA1-Digest: 6YOjPkehnnuNMEqpwvEgmOMJ898= + +Name: system/etc/legal/leaflet/zh-HK/Loudness-warning!.html +SHA1-Digest: T2UvzR0uAiiA5A4Hg6UnFVT7giw= + +Name: system/lib/libmmcamera_frameproc.so +SHA1-Digest: LEON6svy+YWiZcYbz4CdyCf8NiA= + +Name: system/etc/security/cacerts/bdacca6f.0 +SHA1-Digest: GIoKYjYZDMCLnDmLcIXSPHiDtmc= + +Name: system/etc/legal/leaflet/zh-CN/ERROR=0.html +SHA1-Digest: sKd9yxCAm2PfgQ3alUtprRaTga8= + +Name: system/etc/legal/leaflet/ar/Warning!.html +SHA1-Digest: gFXMoCyKT/MPbX0RLvivogihB0I= + +Name: system/vendor/camera/SOI08BN1_IMX111.dat +SHA1-Digest: dbVtttOLAjBpWn0j3EI7y/QjWcE= + +Name: system/fonts/SoMARegular.ttf +SHA1-Digest: FCQt7dB7e+9PH6nbpyFSXVBiJas= + +Name: system/etc/firmware/a225_pm4.fw +SHA1-Digest: 2U+9QOaC7QXBbOk9R3VXWa+WG4w= + +Name: system/etc/legal/leaflet/ru/Driving.html +SHA1-Digest: ZmmQ6Qx7MvR75F5/fpbtR2BiTyA= + +Name: system/etc/legal/leaflet/ru/Precautions-on-Memory-Card-Use.html +SHA1-Digest: L6xu7bMnk3st9WXUtv2UccT+2XM= + +Name: system/lib/libualutil.so +SHA1-Digest: xCuPP9GLCfo0sWJWXB+KHxvATCU= + +Name: system/usr/xt9/SEMC_810_r1-5_ARlsUN_xt9_2.ldb +SHA1-Digest: Ef19e98DrDdx9Q+heon2XE6YXmM= + +Name: system/lib/libdrmfs.so +SHA1-Digest: ZbjIjPZFQpLI4FrrdwEHW3uudf8= + +Name: system/etc/security/cacerts/86212b19.0 +SHA1-Digest: qWrS3UkHFWMxfILKNINl2lbaHMU= + +Name: system/etc/legal/leaflet/ae/Power-supply-(Charger).html +SHA1-Digest: gTHecgHzXZDFFOq7oJbu4Qhutcg= + +Name: system/etc/permissions/com.sonymobile.mirrorlink.system.xml +SHA1-Digest: CWlTlLFUz2H/agYUJh9wlg+E4PE= + +Name: system/framework/com.sonymobile.cameracommon_impl.jar +SHA1-Digest: aTAW/h1qzliFwP04hRRd2c9exho= + +Name: system/etc/legal/leaflet/vi/Protection-of-personal-information.h + tml +SHA1-Digest: tumtnriR1yIiqOfB+D4TYk8+u4g= + +Name: system/etc/legal/leaflet/en-HK/Accessories.html +SHA1-Digest: xFxlnGn7+FSFMnurUmRebdMs/M8= + +Name: system/etc/apns-conf.xml +SHA1-Digest: Ypb9RB5l+vUpErDq/LWJbDopGh4= + +Name: system/etc/legal/leaflet/ko/Precautions-on-Memory-Card-Use.html +SHA1-Digest: oH2Amcr9oWWgSq5Bq/TUDWH3Rtw= + +Name: system/app/LiveWallpapersPicker.apk +SHA1-Digest: OZJC7sh639ljofn1zNFqGo4EczQ= + +Name: system/lib/modules/ansi_cprng.ko +SHA1-Digest: f8b8PnSH6GxTi6ZEoT7BW/TBSZI= + +Name: system/bin/wdsdaemon +SHA1-Digest: Z4d84NmqM7AH1Deahq4sBf/Dj8c= + +Name: system/media/audio/ringtones/OrganDub.ogg +SHA1-Digest: fA1t9jwv37dc+PhyZu4w68HGLnI= + +Name: system/etc/legal/leaflet/in/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: k/VBkWKtyMmMZe+vS+UkmIz0Bpg= + +Name: system/bin/pppd +SHA1-Digest: YIyEWS5+BGdcm593C6YRS4F9EVU= + +Name: system/etc/legal/leaflet/vi/Publication-number.html +SHA1-Digest: uVlZsAnHXUAS6YrhSWsfmtsLdjU= + +Name: system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini +SHA1-Digest: tCkagIxIfdNLD1hzPqjopBCxRZs= + +Name: system/vendor/etc/system_fonts.xml +SHA1-Digest: VUqj0nZjakh8YpO4bCrxsx5VHBU= + +Name: system/lib/modules/qce40.ko +SHA1-Digest: flE2vUfY422dCVzHI474aI4cF+g= + +Name: system/lib/soundfx/libvisualizer.so +SHA1-Digest: hSR2S+Devf22iToaLm4CoIGla3c= + +Name: system/etc/legal/leaflet/iw/Power-supply-(Charger).html +SHA1-Digest: 83E0IVRO3wDa9v3IcfU/+ZuFSs4= + +Name: system/etc/legal/leaflet/th/Precautions-on-Memory-Card-Use.html +SHA1-Digest: m0mGF2D5jCXcV0BhzrNViaDTDTI= + +Name: system/etc/legal/leaflet/uk/index.html +SHA1-Digest: lKayPMu5yE2veQEYim0F/wfH7K4= + +Name: system/framework/GestureSDK.jar +SHA1-Digest: s6lVpOhSB1MKOA8F/LLr9OaioBs= + +Name: system/etc/legal/leaflet/vi/Important-information.html +SHA1-Digest: NBnGrFjApAatjT3wGdj5ILqdOnY= + +Name: system/lib/libsysinfo_modules/display_plugin.so +SHA1-Digest: Hqi/u6KlUZrrQYCtEiBfQiYQddU= + +Name: system/usr/keychars/qwerty.kcm +SHA1-Digest: Z/WKxPvIkR28R++ZAs/Acj5tvbw= + +Name: system/usr/xt9/SEMC_810_r1-2_JWlsUN_xt9.ldb +SHA1-Digest: waF4mzsbYG2oU6csU+yAi04QDFk= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blueprint_hd1080p.png +SHA1-Digest: dNPZUFQEhI9OnTH2ofL/sDV936M= + +Name: system/etc/permissions/com.google.android.nfc_extras.xml +SHA1-Digest: pprwhc3GDz+dBKsLFhxAn7OXqNA= + +Name: system/etc/permissions/digitalpensdk.xml +SHA1-Digest: Tuq6fj4zEksHXhv6hG8OuVjaWy4= + +Name: system/etc/legal/leaflet/zh-HK/Export-regulations.html +SHA1-Digest: MZAyhYAzLxCA5z3fNgkJ+im0xzM= + +Name: system/framework/com.sonyericsson.nfc.handover_impl.jar +SHA1-Digest: Ik4MHPPZsoIPvfoRNuUdkmR1gEI= + +Name: system/etc/legal/leaflet/fr/no-title.html +SHA1-Digest: Nwy5JYLM8kgqWEie16DGQRbW7Jk= + +Name: system/etc/legal/leaflet/bs/What-we-will-do.html +SHA1-Digest: stqDMFI8I0wpGLJ4GNLIpUFf5VQ= + +Name: system/etc/legal/leaflet/ms/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: dG3KpkiHdu0K00J5Q8OGbrp/eNc= + +Name: system/etc/legal/leaflet/fa/GPSLocation-based-functions.html +SHA1-Digest: fUJiNtiH4Y0NhklZjlNFzpTOyjo= + +Name: system/usr/srec/en-US/endpointer_voicesearch.config +SHA1-Digest: MgyAh0x/DUBKQE/gm2rmLwyDODg= + +Name: system/etc/legal/leaflet/hr/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: ds9Uo9ZSX2z64mfkAhCKuqGKHXo= + +Name: system/etc/legal/leaflet/cf/Flight-mode.html +SHA1-Digest: 6uAaaVmq5KB79KUs/z9mO4ChNvk= + +Name: system/app/CustomizedSettings.apk +SHA1-Digest: oaKOK3hsVHHICYDUmJ0CnVx19tE= + +Name: system/lib/libfmradio.sony-iris.so +SHA1-Digest: DOawOR+7rdqMOI0NuJSPSfJWkGI= + +Name: system/lib/libEnjemailuri.so +SHA1-Digest: ga+/1G/zsCkmId/pS7Appbg45mM= + +Name: system/lib/libmlplatform.so +SHA1-Digest: AK8dVCekJ3c7AeWcb6h+AYUt2OM= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_red.jpg +SHA1-Digest: WIDxqeo/Xpx1fSKguabeY+pUkBI= + +Name: system/etc/legal/leaflet/fa/Precautions-on-Memory-Card-Use.html +SHA1-Digest: 3LPi7jnT3L+4nYKrV7YwySvK+Rg= + +Name: system/lib/libxtwifi_zpp_adaptor.so +SHA1-Digest: WtLp/x9ppUvJuj8CDWweukK0cDo= + +Name: system/etc/legal/leaflet/en-PB/End-User-License-Agreement.html +SHA1-Digest: XLkMOV1Kf3vG4usVQxh8fTMM7e4= + +Name: system/app/ReadyToRun.apk +SHA1-Digest: 6Xd8TljXe2ZimI7KeOcuSOZEp44= + +Name: system/etc/permissions/com.sonyericsson.sysmon.xml +SHA1-Digest: hP4hEZsDGtMiNmLEXgUU0pQGsh0= + +Name: system/lib/libgenlock.so +SHA1-Digest: IbbDXKZHJ0x7So+hk8qOzVeuzjo= + +Name: system/etc/legal/leaflet/uk/Flight-mode.html +SHA1-Digest: jpfQCa7gwHxOdd8XuZ6+q0u40qY= + +Name: system/bin/rild +SHA1-Digest: PPdyvdacHr/QV/HfWZeUHuv25t4= + +Name: system/etc/legal/leaflet/iw/Antenna.html +SHA1-Digest: gwz1bOmVqd6kPGvESw/bYtC7ZC0= + +Name: system/etc/legal/leaflet/ae/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: uZIVlkrFAI++ENUUfMLaJUxLfeg= + +Name: system/etc/legal/leaflet/xl/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: QOhuMzASivFRmQxUYcEoiOM2NN4= + +Name: system/etc/legal/leaflet/pb/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: 69S8DChaVZjVconiqewYmvbFUD4= + +Name: system/fonts/DroidSansTamil-Regular.ttf +SHA1-Digest: d/a5ySWr4uOYlmRQ/GVVxmtcfDk= + +Name: system/etc/legal/leaflet/ko/Warning!.html +SHA1-Digest: OBZHLtthGK4ZW6uXej6HtKE/UiE= + +Name: system/etc/fast-dormancy/fd_int_conf.txt +SHA1-Digest: l01re3ympXI6rL46701fIeWKxxU= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_grey.jpg +SHA1-Digest: q10awRLarz8DkbaDBc+UapE+LyE= + +Name: system/lib/libimage-jpeg-enc-omx-comp.so +SHA1-Digest: SJfoPwBhJA1vUUs4aFmpTCPoW3M= + +Name: system/lib/libmediaplayerservice.so +SHA1-Digest: o36+Oq1PATz+wFwaLHkGC3A71Bg= + +Name: system/lib/libsensorservice.so +SHA1-Digest: YnR4+swKMjGmhNa9XcpLr1fn/ew= + +Name: system/lib/libennjyomi.so +SHA1-Digest: eRmNG+fvUGiMXBqS7Vctp4/9OnE= + +Name: system/bin/dexopt +SHA1-Digest: l4AmUUilQxTGTO6TgYKuLKhIXNA= + +Name: system/etc/legal/leaflet/images/LEGAL-STEN-SIGNATURE-WITH-LINE-l + ow.jpg +SHA1-Digest: 1YaHsmfPNt8eLCJbb/PdGYW+FSM= + +Name: system/app/PSCertifiedSettings.apk +SHA1-Digest: lpCaMIqa3PzHy8A69kWQ5z525ZU= + +Name: system/etc/legal/leaflet/images/btn_search_orange-BIG.gif +SHA1-Digest: CD9G2jkEnr3COit6GqRTksZCCwQ= + +Name: system/app/PrivInit.apk +SHA1-Digest: 6f+YZ8nn8udweccGtZaxsZwcd1A= + +Name: system/etc/legal/leaflet/xl/Power-supply-(Charger).html +SHA1-Digest: ye0VYwxhW1yx87b5YpWi9ZLbeOQ= + +Name: system/etc/legal/leaflet/th/Limited-Warranty.html +SHA1-Digest: SIU6c4aXCRs5gFUvNWlGflFFnqE= + +Name: system/etc/legal/leaflet/zh-HK/Sony-Ericsson-Consumer-Web-site.h + tml +SHA1-Digest: C7NBEqXYISMBKaxtEF9A2kt7J3o= + +Name: system/lib/drm/libomasdengine.so +SHA1-Digest: nHhV3JfVS54edSBHH0hX8bjkNV0= + +Name: system/app/SemcCalendar.apk +SHA1-Digest: UoGV2xXDVSmxrLcWt+gxCY7zTSs= + +Name: system/etc/legal/leaflet/en/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: zXaoZhPxu0cn6nlx1azYGiRA12c= + +Name: system/media/audio/ringtones/Draco.ogg +SHA1-Digest: frYQkENFDHKtG6F2A3nHqoUkhFc= + +Name: system/etc/legal/leaflet/pt/What-we-will-do.html +SHA1-Digest: xsNTYwLxeAYNYrEgEvEMKfhwqrY= + +Name: system/etc/legal/leaflet/th/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: sShwa3rD9xDUgQkVk49A+dOdmUM= + +Name: system/etc/legal/leaflet/fr/Our-warranty---12.html +SHA1-Digest: 3TmFFW1J69tqB++1lVI2PCOVMVE= + +Name: system/etc/security/cacerts/7d453d8f.0 +SHA1-Digest: cA140QKiXig4ceJ7hyHJpuo224E= + +Name: system/lib/libmpqclockrecovery.so +SHA1-Digest: qrh92Lijx4wxB0wWw0rCzDxJRHA= + +Name: system/etc/legal/leaflet/sq/Flight-mode.html +SHA1-Digest: 0pvP5wXB0BMmWASLGz17YL+UngU= + +Name: system/etc/hosts +SHA1-Digest: G6NKW04oiisktHUv8U27kbYatNs= + +Name: system/lib/libstagefright_foundation.so +SHA1-Digest: sPvlJS4J/VPN2lMFWZFK5TJxX4k= + +Name: system/lib/bluez-plugin/bluetooth-health.so +SHA1-Digest: 0zCF1kDRJeK+LLjdi7Wpyvy13q4= + +Name: system/etc/legal/leaflet/zh-TW/Service-and-support.html +SHA1-Digest: GsxTE9doors0XabfdhmmLcUeFu8= + +Name: system/lib/modules/ks8851.ko +SHA1-Digest: XOGlpbBxG8yFRkHtbbpReqMVWXI= + +Name: system/etc/hostapd/hostapd.accept +SHA1-Digest: CzfNoJ9CWfJyXkS7JJV1Qwsi5QA= + +Name: system/etc/legal/leaflet/cf/Export-regulations.html +SHA1-Digest: SYNoyTMbny2mP4rlo+DE0um6U0g= + +Name: system/etc/legal/leaflet/en/Personal-medical-devices.html +SHA1-Digest: YdbEm2smUxgV5FjHTF+lw3plXC0= + +Name: system/framework/com.google.android.maps.jar +SHA1-Digest: jxhE6G9WYLSVVoIMipzL/XI3g7o= + +Name: system/bin/monkey +SHA1-Digest: WfWmGLdcQp2C3BlQ/nd56hRSN4M= + +Name: system/etc/legal/leaflet/uk/Limited-Warranty.html +SHA1-Digest: lJxIOpwPPf7Yi7rnnb4hyiC6GTI= + +Name: system/etc/legal/leaflet/images/LOGO-FCC-low.jpg +SHA1-Digest: d6G4PClxdoWPSi+Eyi6CzEQb0iQ= + +Name: system/etc/legal/leaflet/zh-TW/Driving.html +SHA1-Digest: L83mc0s8ks2bphjc18A9yrnuBJM= + +Name: system/bin/suntrold +SHA1-Digest: ZfzIdnjPBPxqOSzEuJbgbZyI2so= + +Name: system/vendor/camera/LGI08BN2_IMX111.dat +SHA1-Digest: lhT900iEWkQtf4YB0O5u6Hgjoyg= + +Name: system/etc/legal/leaflet/zh-TW/Radio-frequency-(RF)-exposure-and + -Specific-Absorption-Rate-(SAR).html +SHA1-Digest: 61WVLd1auMqHeb0vkRSazC/lEnw= + +Name: system/etc/legal/leaflet/images/button_search_foot_active.png +SHA1-Digest: RSgzUW54yCUjHP1txXcm+Jtj0Gs= + +Name: system/lib/libcommon_time_client.so +SHA1-Digest: aFuEUvD6ivPkSxc1b3YphqwUV+k= + +Name: system/etc/security/cacerts/119afc2e.0 +SHA1-Digest: juMSLklsnjDd89OdzOhmdhh86b0= + +Name: system/app/SomcWifiDisplay.apk +SHA1-Digest: g4qlDerZQyOPikSOBEmsoQ7MbLI= + +Name: system/media/audio/notifications/climb.ogg +SHA1-Digest: sMKF2y4BMJhulRjvSUnC9sSHRD0= + +Name: system/bin/dun-server +SHA1-Digest: qBKRJFmau+qUqgG4cItbL9xQwkM= + +Name: system/vendor/etc/fallback_fonts.xml +SHA1-Digest: 87wqmEnFMK2At75YRJa+kJkfBbI= + +Name: system/media/audio/notifications/happy.ogg +SHA1-Digest: MoLYMsI35QsncW+BfEJZO8eI3ps= + +Name: system/etc/legal/leaflet/ko/Antenna.html +SHA1-Digest: f9G4WP7Tx+ICr2x33u7ZgYaePaU= + +Name: system/framework/digitalpenutil.jar +SHA1-Digest: econbyR6BgX71LMJiOY1aGfa+e4= + +Name: system/lib/libstagefright_amrnb_common.so +SHA1-Digest: vho9Ypch07RLrJ9pTHklac/W88I= + +Name: system/etc/legal/leaflet/en-PB/Recommendations-for-care-and-safe + -use-of-our-products.html +SHA1-Digest: 7aNhCudbTNsZMW9hRWGbToVvYfU= + +Name: system/etc/dhcpcd/dhcpcd-run-hooks +SHA1-Digest: wlZAlg8sJGqNf67T6lXIETPzJxk= + +Name: system/etc/legal/leaflet/mk/Our-warranty---12.html +SHA1-Digest: z2elSJVtmcbAhibksyxNkDAD0G4= + +Name: system/etc/legal/leaflet/uk/Memory-Card---legal.html +SHA1-Digest: GI5HKOdJFFNo5xwvJdLk8jb9GQ4= + +Name: system/etc/legal/leaflet/en/Publication-number.html +SHA1-Digest: SLTAbpogUT6MxBOWlcZdolvbPbU= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Protection-of-personal-in + formation.html +SHA1-Digest: Ry4nHe+sqkqd8LajixQAHx/BTQI= + +Name: system/bin/wpa_supplicant +SHA1-Digest: 5v7unRk90icziIQ38M7oKBCqsZ4= + +Name: system/etc/legal/leaflet/sr/Loudness-warning!.html +SHA1-Digest: KiKxuUPddH9iwPSQAju7mPSu4RA= + +Name: system/etc/legal/leaflet/hi/End-User-License-Agreement.html +SHA1-Digest: gxMHim19OzF06dRNRPpa4F3/uWw= + +Name: system/usr/srec/en-US/norm_fst +SHA1-Digest: yPCdX0EcppUA9o9xNvA5KBY7mUo= + +Name: system/etc/legal/leaflet/fr/GPSLocation-based-functions.html +SHA1-Digest: XiCJOojDkXIwuGUCw8ph/4PJ89c= + +Name: system/bin/battery_shutdown +SHA1-Digest: HnY77jNJ9X0vdvoaQjTVRf1ey3w= + +Name: system/framework/com.sonyericsson.audioeffect.jar +SHA1-Digest: qT0FHMtZMYvjteEDCscCiDVS6b0= + +Name: system/etc/firmware/dxhdcp2.mdt +SHA1-Digest: WUgD8q5atTUZwOSzqLOHPNKUd0I= + +Name: system/etc/legal/leaflet/sr/Our-warranty---12.html +SHA1-Digest: 0jNfEZ4Xvs2fAwP2faNQLFlam9w= + +Name: system/etc/legal/leaflet/mk/Warning!.html +SHA1-Digest: Rf4MIoFTy7SPtcsYxDo0pQ/GIIA= + +Name: system/etc/dbus.conf +SHA1-Digest: d6cc2Bt6sxy6Yzv4CTZl1X6sweY= + +Name: system/etc/legal/leaflet/en-HK/Recommendations-for-care-and-safe + -use-of-our-products.html +SHA1-Digest: UZDe3zL2QGoag6mJbE4iDqqEL/U= + +Name: system/etc/legal/leaflet/zh-HK/no-title.html +SHA1-Digest: ya4iULUKzta6WuqAiVRNfNv7R24= + +Name: system/etc/legal/leaflet/uk/Emergency-calls.html +SHA1-Digest: kl9Dk29gtet1pJNHOlEnD6sAw6E= + +Name: system/framework/com.sonyericsson.musicvisualizer.jar +SHA1-Digest: SUYr8G9E0IjVxMlBwmYoNqJ4Ijc= + +Name: system/lib/libmpqcore.so +SHA1-Digest: T2/fhKFm+qiwgF1PSgiaQ3FWcdw= + +Name: system/lib/libmmcamera_faceproc.so +SHA1-Digest: LyCqbfWUlPrumRmhY3ixT4u2luY= + +Name: system/app/WikipediaPlugin.apk +SHA1-Digest: 9OkBX6Tgse+fvrktUCqo3qPDTVU= + +Name: system/media/audio/ui/KeypressReturn.ogg +SHA1-Digest: iYH8DQ0v9kvYnxCWM4nm70dYz7I= + +Name: system/usr/srec/config/en.us/baseline.par +SHA1-Digest: M4pck9N5JkEe9alJyTrxUpaKRd8= + +Name: system/etc/legal/leaflet/en/GPSLocation-based-functions.html +SHA1-Digest: 18Y2YV6ihmsMnPQ2OMAG03kRsDs= + +Name: system/lib/bluez-plugin/input.so +SHA1-Digest: H8Mkj9J/eumB9zc1tL36gBGwzco= + +Name: system/etc/legal/leaflet/en-PB/Warning!.html +SHA1-Digest: pYHRQ2SxEhA8nenwz0qdLNn8mnY= + +Name: system/tts/lang_pico/en-US_ta.bin +SHA1-Digest: qjfJmQkRg0R5S9AWs1TxY8Dz5+s= + +Name: system/etc/legal/leaflet/sr/Export-regulations.html +SHA1-Digest: NbhajAjNfxZBTs6cPK+i4gow8hc= + +Name: system/etc/legal/leaflet/en-HK/Battery.html +SHA1-Digest: 7yxWOnZzFqNmnE/HBIccRtE5UBA= + +Name: system/fonts/AnjaliNewLipi-light.ttf +SHA1-Digest: TXtkBSsmdd04OAXePzPNnSx+Vdc= + +Name: system/etc/permissions/qcnvitems.xml +SHA1-Digest: PpJKYCYLyA3agVQGkXF1GMIBpAs= + +Name: system/bin/app_process +SHA1-Digest: RykphYkLSXKTFZejrfAB8oESseM= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/dewy_grass_hd1080p.png +SHA1-Digest: 134amBeRdRH5sX94llgo/ePBZuU= + +Name: system/lib/libmpqplatform.so +SHA1-Digest: JzoAC0QoHmDpxZe9E/4L/9LMAII= + +Name: system/lib/libstagefright_soft_h264dec.so +SHA1-Digest: rAn+TZI9KN9giqGZTGo4cew/AiE= + +Name: system/etc/legal/leaflet/en-HK/index.html +SHA1-Digest: mmdLgi45Gw/am2kW6dXUJJ0tb2I= + +Name: system/lib/libssl.so +SHA1-Digest: ueOfAvZYcpT0MWWyQcFXxAhUul0= + +Name: system/vendor/lib/hw/power.qcom.so +SHA1-Digest: gSrSxitFS3M7BI5VJOMPvyjeu7Q= + +Name: system/etc/legal/leaflet/kk/Protection-of-personal-information.h + tml +SHA1-Digest: 9H0bpjbYoQqeUMA83U0FWXE0DDo= + +Name: system/lib/libsc-a2xx.so +SHA1-Digest: ol/oeLf94+bvjwPp+C4k6C9koOc= + +Name: system/lib/libtzplayready.so +SHA1-Digest: P3ZnFcxyfW6wMEmM6H4iTYpVbP8= + +Name: system/media/audio/notifications/pizzicato.ogg +SHA1-Digest: LjgcPA1K6H6qP0BE/Qyau5L6D38= + +Name: system/usr/xt9/SEMC_820_r1-3_NOusUN_xt9_2.ldb +SHA1-Digest: DHvNZaiy/8nZWPFT7O9LvhxeJnM= + +Name: system/lib/tcp-connections.so +SHA1-Digest: RTOmjZcI45bo6D36iIZJ56NGY6M= + +Name: system/app/IddAgent.apk +SHA1-Digest: olXvITjR1Jn4d5iFZJTcLDFgTyY= + +Name: system/etc/legal/leaflet/fa/End-User-License-Agreement.html +SHA1-Digest: kcVoU6LRub2vOVCThdrr+YGJ8+0= + +Name: system/app/VerifyCertificatesDummyAppApplication.apk +SHA1-Digest: xXslW1iTHiQHBYw7Taq8AENzApk= + +Name: system/etc/legal/leaflet/zh-TW/Protection-of-personal-informatio + n.html +SHA1-Digest: jfwV+KsdjCsnOqJf+FAhzVm+YuY= + +Name: system/etc/legal/leaflet/pt/Loudness-warning!.html +SHA1-Digest: pQ4IUc/bxxW16/QaUAtOX9NC3V4= + +Name: system/framework/framework-res.apk +SHA1-Digest: mv3IquL2MDUeSYOP0ITt5Nbs9EA= + +Name: system/etc/legal/leaflet/zh-CN/Protection-of-personal-informatio + n.html +SHA1-Digest: BFZzHTBs5pd3j3cNrkZ6tV7OFZA= + +Name: system/etc/legal/leaflet/pb/index.html +SHA1-Digest: smVZQkukvxIT7bn2imtdGadvA/4= + +Name: system/framework/javax.obex.jar +SHA1-Digest: NOno2Gf8b+bcu3Yl9Bt6V08oiRI= + +Name: system/lib/libicui18n.so +SHA1-Digest: VzBzwvx0JyY495rafK6iTs/Tx6M= + +Name: system/etc/legal/leaflet/th/Publication-number.html +SHA1-Digest: yNfCRx+jfBB6hXhhIIOs2mBdCo0= + +Name: system/etc/security/cacerts/e8651083.0 +SHA1-Digest: pTCqliEJ3Q0TNsBDd6B+1e0I5nU= + +Name: system/bin/dnsmasq +SHA1-Digest: HJqsTLzrfimkLiE2q3H7yC6sGjc= + +Name: system/lib/libglib.so +SHA1-Digest: smpUEzB/adaJwLkTH0GObzhpTkY= + +Name: system/etc/legal/leaflet/fa/Service-and-support.html +SHA1-Digest: 4kBzwU0owXcyc/clYQYIFwPiPxs= + +Name: system/etc/legal/leaflet/hr/no-title.html +SHA1-Digest: Iw2Si6pCUrKtKxHi+tzWO0+dEbs= + +Name: system/etc/legal/leaflet/fa/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: f3etkYwRrcQvJPSIfnDVG0ah1dc= + +Name: system/etc/legal/leaflet/ms/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: 15gkx1I2LnjBoKSt0Yr1Uq+k8hQ= + +Name: system/bin/ssr_diag +SHA1-Digest: MrVYmECbX+xxhzE93+wYsBpgKyw= + +Name: system/lib/lib_dlb_msd.so +SHA1-Digest: lEuxiKklVH7UDpnYGYqwPYFi++w= + +Name: system/etc/legal/leaflet/vi/Limited-Warranty.html +SHA1-Digest: rydrCrzM4PWsiSHxRWYiKe/XOFI= + +Name: system/lib/libgestureservice.so +SHA1-Digest: crS/Fcb0lyeVjVHgkcnmUgdYPJw= + +Name: system/etc/legal/leaflet/images/up.png +SHA1-Digest: /Jco3ZuBl1oXqDM/ajWyHH9Spa8= + +Name: system/etc/legal/leaflet/bs/Children.html +SHA1-Digest: rVUffHaDlQGy1kRgF4XdpCZ6LFM= + +Name: system/bin/content +SHA1-Digest: PyF7E/iuWk4+agaPGfAomR/pre4= + +Name: system/etc/legal/leaflet/uk/End-User-License-Agreement.html +SHA1-Digest: lSO92OtM7/QLyJ/o3hk1f2YDXas= + +Name: system/media/pictures/perito_moreno_02.jpg +SHA1-Digest: jTgWbcs3RqBItSCqkXBtmDwe1QU= + +Name: system/etc/legal/leaflet/iw/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: skkZqdsLcOBebQvlhTAXinsfooE= + +Name: system/etc/legal/leaflet/sq/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: TVeka3rqpOPnjRR2uJN3WTkv3ZE= + +Name: system/lib/libsc-a3xx.so +SHA1-Digest: JqrA5Ko8fL3ZMmXNRJqW9me01sE= + +Name: system/etc/legal/leaflet/th/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: 9DfJNI3AZ+IPb0XxaT8QD8Z18SQ= + +Name: system/etc/legal/leaflet/bs/Publication-number.html +SHA1-Digest: i4GDWb5YsfHeUm54rVc1GrBY81A= + +Name: system/bin/mm-pp-daemon +SHA1-Digest: xi26L2C8ufULBcDASR9vg61aNw4= + +Name: system/framework/core-junit.jar +SHA1-Digest: ZTLBoKRy4v+aGqreY+sFQV0nyPE= + +Name: system/lib/soundfx/libsoundaurawrapper.so +SHA1-Digest: 0MxqYjgzBZfIRXrNvKEb4PH7pfI= + +Name: system/usr/srec/en-US/endpointer_dictation.config +SHA1-Digest: j/ixWk0Vzc1Re76RugKSBPSkHbw= + +Name: system/etc/legal/leaflet/bs/no-title.html +SHA1-Digest: fpPrLryD2HKlSG2BkPrWAj0eDqA= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/red_rock_hd1080p.jpg +SHA1-Digest: YLRQrroKQVp4UmIgd/E7jBlXf+Y= + +Name: system/etc/legal/leaflet/bs/Export-regulations.html +SHA1-Digest: dxL15defAvuYVmjr5WhtqY+HQ7Q= + +Name: system/etc/legal/leaflet/bs/GPSLocation-based-functions.html +SHA1-Digest: DGLxt3TF6IHpsQSSJQ21IzrKyd4= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Precautions-on-Memory-Car + d-Use.html +SHA1-Digest: qllLu4QFiy9P2YQF6oajNynU0k4= + +Name: system/etc/legal/leaflet/cf/Precautions-on-Memory-Card-Use.html +SHA1-Digest: E5qAVhfNLd2hHTEBZYs6oC6Hyls= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_red_small.jpg +SHA1-Digest: F/Wci5HA6X1nbNNH/wf9PgFCwfA= + +Name: system/media/audio/notifications/Hojus.ogg +SHA1-Digest: 19TUZIZI/eJ2TdOlR1slPdtL3uI= + +Name: system/framework/com.sonyericsson.system.jar +SHA1-Digest: SB6fnrivid4lN10X0EDJOOtk+pk= + +Name: system/etc/permissions/com.sonyericsson.bluetooth.a2dp.xml +SHA1-Digest: 0TQ9xwlQA79s+3tR8SNrMhelLSQ= + +Name: system/etc/legal/leaflet/zh-HK/Flight-mode.html +SHA1-Digest: J/wgFIRO2Sv71fgriZuNsc+hjqc= + +Name: system/etc/legal/leaflet/ms/Battery.html +SHA1-Digest: s32vroToAmfuisUUbSadvu+ihSU= + +Name: system/etc/legal/leaflet/hr/GPSLocation-based-functions.html +SHA1-Digest: Ofi6I4zsL3hZn3/+bX/9uKsIoiQ= + +Name: system/etc/legal/leaflet/ko/Conditions.html +SHA1-Digest: jg1UYCI7AJU5Ik46y0WCJNmKqzA= + +Name: system/etc/security/cacerts/aeb67534.0 +SHA1-Digest: ud63QfbrYmZs4yriaRbj9lIsun8= + +Name: system/etc/permissions/android.hardware.sensor.light.xml +SHA1-Digest: Pn0I13jrVn51nOyc4S/jiw/Xw6U= + +Name: system/etc/legal/leaflet/fr/Emergency-calls.html +SHA1-Digest: LgrFHKXjz1NQVsZo1xTM2hlg9+c= + +Name: system/lib/libqmiservices.so +SHA1-Digest: nXYlWtulT/j6wdQt27hrq4UM3MA= + +Name: system/etc/pre_hw_config.sh +SHA1-Digest: 4+N+l2y17MgMe3x33ZriWxAGC9w= + +Name: system/app/GMS_Maps.apk +SHA1-Digest: LxwaQy5uWyJBFV5MEqygrsALNMk= + +Name: system/bin/uiautomator +SHA1-Digest: EiHYAGH42TXmzxcRoUP3lkgEJMg= + +Name: system/etc/security/cacerts/marlin/ca-bundle.crt +SHA1-Digest: dGXFj29c0eywCJh8tzAAjXplY4Y= + +Name: system/etc/security/cacerts/f61bff45.0 +SHA1-Digest: T+qB4/2WaUuV16PYtu7WwP3b0gE= + +Name: system/media/audio/ringtones/VeryAlarmed.ogg +SHA1-Digest: zYiq7CqOHhrF8uBC9lgiZWeJfsM= + +Name: system/etc/legal/leaflet/ru/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: e84bdbNTfDJkUvz+AY9w27tnS5A= + +Name: system/app/PurpleTheme.apk +SHA1-Digest: D6DrZ+IUk8otUXUWRdQDe7rZiHw= + +Name: system/fonts/RobotoCondensed-BoldItalic.ttf +SHA1-Digest: V7BP9MVj0P5pYIh0SmIaP/EMkQo= + +Name: system/etc/legal/leaflet/ms/End-User-License-Agreement.html +SHA1-Digest: rYyZ9lVvAcFEQb/QQonEitvR7bo= + +Name: system/bin/n_smux +SHA1-Digest: 2RRd36Z3Of3R9u0krpvJo4uBXVg= + +Name: system/app/SemcMusicVisualizer.apk +SHA1-Digest: 06tNy2fHGnNb4JJfRzqxWRNX7tk= + +Name: system/framework/com.sonymobile.musicslideshow.jar +SHA1-Digest: fb5E4JfVnOR2Spqfm1bu6kqKPm0= + +Name: system/etc/legal/leaflet/pb/Power-supply-(Charger).html +SHA1-Digest: U6IJpYXoIMNlPckDb59srY9ZvdM= + +Name: system/etc/legal/leaflet/th/What-we-will-do.html +SHA1-Digest: oYU7kjMB2kPXzv5x5Dot8nbu1gs= + +Name: system/lib/libpaexternal.so +SHA1-Digest: MYN2I+m69cutajO7h0y056mJkjI= + +Name: system/app/SemcWarrantyTime.apk +SHA1-Digest: aYZA7UpvbwhVUSlxLRWi3dcn6xY= + +Name: system/etc/permissions/com.sonyericsson.colorextraction.xml +SHA1-Digest: k2xmz9nF65L6DdvkwqlK/WLMxVY= + +Name: system/etc/legal/leaflet/zh-CN/Recommendations-for-care-and-safe + -use-of-our-products.html +SHA1-Digest: HWZvsO7EWZuEmAJR02/CQkQwtb8= + +Name: system/lib/sysmon/sysmon_test_sensor.so +SHA1-Digest: kcOSgZkaLaR/YXsGKWCukkHPf3k= + +Name: system/etc/thermald-8960.conf +SHA1-Digest: j/DWRNlGNxgHBsU4MpO8YemfJVE= + +Name: system/usr/keylayout/Vendor_046d_Product_c294.kl +SHA1-Digest: FEu4tbv/pfG+jZWhYQQVPaclr8Y= + +Name: system/app/SemcNotes.apk +SHA1-Digest: zPWiclTU/iolCxQuvy2cu/bbgRM= + +Name: system/etc/be_movie +SHA1-Digest: gHkwLVA12m++AJoRlgvV//7M88M= + +Name: system/etc/legal/leaflet/pb/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: a9+XzhPM+03At710w9MmRRLpsjo= + +Name: system/etc/init.ath3k.bt.sh +SHA1-Digest: hUftmz7LCkF9w7I0DFjs7en5Npk= + +Name: system/etc/legal/leaflet/th/Warning!.html +SHA1-Digest: zK9w2YnMN4wFLoKcbUxxIns+mYo= + +Name: system/etc/legal/leaflet/sq/Loudness-warning!.html +SHA1-Digest: 0qXv8GhIejXU2XhWOibRi1QF/ng= + +Name: system/lib/libthread_db.so +SHA1-Digest: vPJCBwzilN8TWjh4QlIOZZGMM+M= + +Name: system/lib/sysmon/sysmon_pba_therm.so +SHA1-Digest: fMbQpd3umondW0xzoZwxNqNENKk= + +Name: system/etc/legal/leaflet/en-HK/Limited-Warranty.html +SHA1-Digest: yRmcYVNwx6RaTm0AjxafxzhPllQ= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor8.so +SHA1-Digest: 0jnnIWZ6+cTAPxD3NCEkajM5j/8= + +Name: system/fonts/Roboto-BoldItalic.ttf +SHA1-Digest: b18bhiBhpPwzpvMDiEeVWLwx6Uc= + +Name: system/lib/hw/audio_policy.msm8960.so +SHA1-Digest: XzxDMuEhlaH1jo/H9FThAJEUJEM= + +Name: system/etc/legal/leaflet/ar/Memory-Card---legal.html +SHA1-Digest: oC7yMG3XCjTdkWQZKTmwU2M9mMQ= + +Name: system/etc/legal/leaflet/ru/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: 0r6qnou0+pKdnQsw8ukS/83GvCQ= + +Name: system/bin/fmconfig +SHA1-Digest: jTG3OXpyRuQvuCVYUO8Tys96Mvs= + +Name: system/framework/qcnvitems.jar +SHA1-Digest: oQr9g+T8lKvQLIPzLOTnk/fGHis= + +Name: system/usr/xt9/SEMC_810_r1-3_SQlsUN_xt9.ldb +SHA1-Digest: jUhkf18ZxNt/aJdcLxfPWXkcYIo= + +Name: system/etc/legal/leaflet/ms/Loudness-warning!.html +SHA1-Digest: KBZUJt41ZrxroH/6AUgOy9Kv1ac= + +Name: system/lib/libmpqtsdm.so +SHA1-Digest: LGuO0sW4D2stv5Wikt2lBFLo7gg= + +Name: system/etc/legal/leaflet/hi/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: f3hlk+NdZOXLQ5yQrEIq975j3TY= + +Name: system/media/audio/ringtones/Vespa.ogg +SHA1-Digest: DG8LjUjQCBw2q/LrHgYJy4gHclg= + +Name: system/vendor/overlay/com.sonyericsson.capabilities-res.apk +SHA1-Digest: RumJs98bTmzx4Dnac0E/fsrODMQ= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_pattern_hd1080p.png +SHA1-Digest: /419DhWxjO/k8PDVTATieThDigg= + +Name: system/etc/init.d/05complete +SHA1-Digest: r7Fyki4hX0Ov1qZvuDSCc4GAlxM= + +Name: system/etc/legal/leaflet/vi/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: ww//jueqfT4o35SJOO1mMFKAKlA= + +Name: system/lib/libthai.so +SHA1-Digest: uK5pF6XbPf4vh7tKkvOYGom5Oeo= + +Name: system/etc/legal/leaflet/mk/Antenna.html +SHA1-Digest: aW6PrhrV5Aql9uecfiwzn/AtG2Y= + +Name: system/app/SoundLevelAlert.apk +SHA1-Digest: 9IzHC/ZElPpbLz0WHcSFG9qjHwQ= + +Name: system/lib/libloc_eng.so +SHA1-Digest: vwf9aEX+zfmH6bTS4iPImsr5J5Q= + +Name: system/etc/legal/leaflet/en-PB/Geographical-scope-of-the-warrant + y.html +SHA1-Digest: AAoPVRNdF7/u+Q5HLMW4bRF9HFo= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/autumnal_lake_hd1080p_small.png +SHA1-Digest: KXAHIe5XHaHlUaY+6upU5zWhOUE= + +Name: system/lib/libsysmon_jni.so +SHA1-Digest: iazQqJ71jMoVI/KEkJdqEcqLaH0= + +Name: system/bin/mm-aenc-omxevrc-test +SHA1-Digest: GCiJ0wtGDocq9gvxb/R36c2uZ5k= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/mesh_blue_hd1080p.png +SHA1-Digest: 6lHiH67OEqM78b4jkByM3Nqlc08= + +Name: system/lib/libmmosal.so +SHA1-Digest: Ud4ZIZWtvm0r1BTUVX6vcOjF0YU= + +Name: system/etc/legal/leaflet/iw/Emergency-calls.html +SHA1-Digest: htC4lNoQoronI/Wwww+gPEEAo7I= + +Name: system/app/OrangeTheme.apk +SHA1-Digest: d5fp/MggUmK0HKpvz2WIGWDzLjY= + +Name: system/etc/legal/leaflet/fa/Limited-Warranty.html +SHA1-Digest: YwRYl2dRuo6idtVRPIxmltmJrmo= + +Name: system/bin/acc_cal_data_manager +SHA1-Digest: dRaXjDIYLe+ALlB4it9Ou+XE6UY= + +Name: system/lib/libXT9Engine.so +SHA1-Digest: YzPxXSouoHFG4h+FYCZ7518Flzs= + +Name: system/etc/customization/settings/com/sonyericsson/android/suppo + rt/custom_settings.xml +SHA1-Digest: bZ8ZjQLrAnqD8n8cvI+eMe++vM4= + +Name: system/etc/legal/leaflet/pb/Malware.html +SHA1-Digest: +oS9YY6bmrROoOMvP7qxp5jLNCc= + +Name: system/lib/libalsa-intf.so +SHA1-Digest: mh57drbcEZ/VTxgnOUd4LmZdqVE= + +Name: system/media/audio/notifications/notification.ogg +SHA1-Digest: fzJ5aqGsrnpKO6phWBC4OpU6sbc= + +Name: system/etc/legal/leaflet/ms/Important-information.html +SHA1-Digest: SRumm5w+8ljiLxpJE0Oy3N73eDs= + +Name: system/etc/legal/leaflet/xl/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: NKqaPmippVUaA6fUQfDT9rcVqWs= + +Name: system/lib/libOmxVenc.so +SHA1-Digest: 0N2DKd5g/LkK7BKqWtH8VJsaqnU= + +Name: system/etc/legal/leaflet/zh-TW/no-title.html +SHA1-Digest: p3AsYh4yctvdjvR7/ZNIKwC+dRU= + +Name: system/framework/com.playstation.playstationcertified.jar +SHA1-Digest: BveQFK3OCtsy7oIYRdF3wOwxadg= + +Name: system/etc/legal/leaflet/iw/Warning!.html +SHA1-Digest: X+6HAS/RJCFj/Y+LcJuTeI63NkY= + +Name: system/etc/snd_soc_msm/snd_soc_msm_2x_Fusion3_auxpcm +SHA1-Digest: 4ZG4OIH8BJG1HJdTD1D9oGGvQPA= + +Name: system/vendor/lib/libwvdrm_L3.so +SHA1-Digest: C0/lADylcxqYRYh0ISvWNpB+6Ik= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/index.html +SHA1-Digest: 4iIaSPVp8VWKU+5waQzr/qIDOxI= + +Name: system/app/MediaUploader.apk +SHA1-Digest: jf0lIGqtUlQko4Rq7G6hralZ5FY= + +Name: system/lib/libwifiscanner.so +SHA1-Digest: jt5m2BMqbU6R7HHw+REtXd8DnUc= + +Name: system/media/audio/notifications/deep.ogg +SHA1-Digest: 1Y2VTfUwTFbzHgVyH3csZNUi1aI= + +Name: system/lib/crda/regulatory.bin +SHA1-Digest: IYzPR36G/vW3CG10N1c5g2NAfEo= + +Name: system/etc/legal/leaflet/hi/Malware.html +SHA1-Digest: SY+n6fw10VIpLsEKbYpbgPrN4l0= + +Name: system/lib/libmmgestures-linux.so +SHA1-Digest: 61j88t7ie690EtvrdXRuhpN2P5g= + +Name: system/bin/usbeng +SHA1-Digest: omLWQQeLTkXb9tf2SfuxWMbvQ0I= + +Name: system/etc/legal/leaflet/styling/mrtl.css +SHA1-Digest: HYT8Zyp8Z5HxrszpAhUZTFCTtM4= + +Name: system/media/audio/notifications/Upsilon.ogg +SHA1-Digest: 0xRg1iAo2vdE07toxCpysUkgTDw= + +Name: system/etc/legal/leaflet/en/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: Zuna8S+vfexqQw9zlxW8EwebRvQ= + +Name: system/etc/init.d/04tweaks +SHA1-Digest: IWY0S8ZBEqf6BrZrXhj+jZkBbIA= + +Name: system/lib/libsysmon_idd.so +SHA1-Digest: /zae/a+KqjN+CBTS24pKbJ18VOg= + +Name: system/etc/legal/leaflet/en-HK/SIM-card.html +SHA1-Digest: 0xCSzuQawWgnzHUsETap1C3bfoc= + +Name: system/media/audio/notifications/regulus.ogg +SHA1-Digest: gTmgrHb/ic30F6zXFjA41/l40sE= + +Name: system/etc/legal/leaflet/images/_Warning.png +SHA1-Digest: 8iwXZKtvacy2mkc0vv7L8E1gGQw= + +Name: system/etc/legal/leaflet/iw/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: hUonxzOe+VTN4Df7jQ3qY32pD0E= + +Name: system/etc/legal/leaflet/sr/Children.html +SHA1-Digest: XeE6co+x/Q+60ieF3U7MAd5wmcE= + +Name: system/lib/libbluedroid.so +SHA1-Digest: BCX2JUWDwQ1DDHmdwLh0Q+HcQn0= + +Name: system/bin/sapd +SHA1-Digest: IxGVKHqyHCrIbxBeGL9Kab0GaCI= + +Name: system/lib/libiqe.so +SHA1-Digest: uu7kuSDqtU+vMP0KY0xMWrtUpEI= + +Name: system/fonts/DroidSansMono.ttf +SHA1-Digest: c95nnXS8f3Ki6JMBrBxt2DG/pB4= + +Name: system/media/audio/notifications/harmonics.ogg +SHA1-Digest: uQrrE4BZQKBWedY6HKB/hCYz+Vs= + +Name: system/framework/android.policy.jar +SHA1-Digest: h9DoXUPF6w7rXgpeO8tswjzxDNU= + +Name: system/etc/legal/leaflet/pb/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: 3aspeCTsgtCdGZB4BGfUHuhixYc= + +Name: system/etc/security/cacerts/7a481e66.0 +SHA1-Digest: Qrug23rc7GLUystiW+B7d4bzaJw= + +Name: system/lib/libkeyctrl.so +SHA1-Digest: Dct9W6Vyc60I+qw2PRA65jnQsxI= + +Name: system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin +SHA1-Digest: y75acEg53cgqfOZht+gl8prWf60= + +Name: system/media/audio/camera/sound0/no_sound.m4a +SHA1-Digest: 7HNkq8aqFyZqE7iTZtR8VTeayYs= + +Name: system/etc/legal/leaflet/ru/Children.html +SHA1-Digest: AZ/P3eJYSq0BstUZhzi3Arb5AKk= + +Name: system/media/audio/ui/KeypressStandard.ogg +SHA1-Digest: WSD7VCgtBBhkGoFGei4G/W0G3Kw= + +Name: system/bin/battery_monitor +SHA1-Digest: cXvbrHbQu7p6U7US0ajdOvMlz3Y= + +Name: system/lib/libeffects.so +SHA1-Digest: kQnN9/iQSngFxHI+CEAyZTFkEsk= + +Name: system/media/video/Sunset.240p.mp4 +SHA1-Digest: JVoUckdxqpPa9mkbaboBnyewvZg= + +Name: system/etc/security/cacerts/e48193cf.0 +SHA1-Digest: UXw27ZZFF2Dc7iZjui9EOHuDgpQ= + +Name: system/lib/libmmcamera_image_stab.so +SHA1-Digest: HmikgKuCjmbCGO1pNyjK4KsQcOA= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Driving.html +SHA1-Digest: q3S4Yl3Ot3mbBku9Q5PqUlPPhF4= + +Name: system/lib/libchromium_net.so +SHA1-Digest: MdrbPYNuiZ87vprLFkHCbU/p6II= + +Name: system/media/audio/notifications/ascensions.ogg +SHA1-Digest: kfMTriJwPGw/pHkffbvEdQw1cqM= + +Name: system/framework/com.sony.smallapp.jar +SHA1-Digest: lxi2RFiGQ3qeYkzVaY55vwu3xvI= + +Name: system/app/SocialEngineCore.apk +SHA1-Digest: GRJ760tmluYhby2Ib5jFrgCLOH0= + +Name: system/etc/legal/leaflet/vi/Loudness-warning!.html +SHA1-Digest: 2SrWoIkR6UrNM5FR11Q7exnJx74= + +Name: system/lib/libdrmframework_jni.so +SHA1-Digest: ZHBKDnJuqVczIl0y2rIB2bpsEZA= + +Name: system/lib/libiwnn.so +SHA1-Digest: 6iwgRA1QciQZUwvs8i69Ww2uTtM= + +Name: system/semc/chargemon/data/non-charging_animation_05.png +SHA1-Digest: 7mhfRZabfvwloxVrBrXLjct28n4= + +Name: system/etc/legal/leaflet/hi/Export-regulations.html +SHA1-Digest: DqHNIVyJ82MLD6a8F/55sb+wRQ4= + +Name: system/etc/firmware/dsps.b05 +SHA1-Digest: lmUirD34fj8widS4rAshSjvH7TA= + +Name: system/usr/xt9/SEMC_810_r1-2_ELusUN_xt9_2.ldb +SHA1-Digest: WRZcH2NA2TDWz/awGw47eSajA0A= + +Name: system/etc/firmware/dsps.b02 +SHA1-Digest: IHrKIw4NaiwTj4bt4QB50i9XX5g= + +Name: system/fonts/Roboto-LightItalic.ttf +SHA1-Digest: /WLukeHzJHHKYaWWlSfU7iLz6Ug= + +Name: system/etc/firmware/dsps.b01 +SHA1-Digest: ZF8KzW8Qxu0+rn/VlPGieCgoptw= + +Name: system/lib/modules/qcedev.ko +SHA1-Digest: AY17qDVFd/U7QxDv2S6z5Zfl9zQ= + +Name: system/media/audio/notifications/Selenium.ogg +SHA1-Digest: RbbOxjmU0z7P66MvM/UwU0Unp18= + +Name: system/etc/firmware/dsps.b04 +SHA1-Digest: 8Muz9FXp4BnZmR/yNPilabRehR8= + +Name: system/etc/legal/leaflet/sr/Antenna.html +SHA1-Digest: ikS+snZxBJEvf0pj9yd9N3KpD08= + +Name: system/etc/firmware/dsps.b03 +SHA1-Digest: EA3m2m7Z0MyLqvtpnQBuGBXgnE0= + +Name: system/etc/legal/leaflet/styling/mBWrtl.css +SHA1-Digest: 7RW/rKGLKvvGvdGKf+5/WZrAzl8= + +Name: system/etc/legal/leaflet/images/btn_search_red-BIG.gif +SHA1-Digest: m2Wxk91eUstACrHR0SySDD8O99U= + +Name: system/etc/permissions/android.hardware.telephony.gsm.xml +SHA1-Digest: VedgY17d+3Q4Wvr4BUBh8n6kIt4= + +Name: system/etc/product/applications/trackid.apk +SHA1-Digest: 2wBaJYc3r+oZYvK12Gm6Eg5apm0= + +Name: system/etc/legal/leaflet/ko/Service-and-support.html +SHA1-Digest: 0kP6cdrArtU8aeXX6j6l5SJ1SfM= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Loudness-warning!.html +SHA1-Digest: SdxhhxOPdxr3PMPtyAPy+1dRPP8= + +Name: system/etc/legal/leaflet/th/Our-warranty---12.html +SHA1-Digest: 38AY3sYPRKKaO8ajGVp5aaZTaDA= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/metal_hd1080p_small.png +SHA1-Digest: OedeO5EKz/AEfOp0I4en3pq6EgU= + +Name: system/etc/permissions/com.sonyericsson.android.techdatamanager. + xml +SHA1-Digest: 0YP05rrrGv93m46njHA3/doOgGE= + +Name: system/etc/legal/leaflet/en-HK/Emergency-calls.html +SHA1-Digest: Jzh3ISgA9NPnDenRuLxENUPmgTo= + +Name: system/etc/legal/leaflet/cf/Driving.html +SHA1-Digest: C5iKHgrBzlnSr6IiDLyW2MkIAj8= + +Name: system/lib/libcneqmiutils.so +SHA1-Digest: H0sW3LddH5TO36Opr3AGaXCnwlM= + +Name: system/etc/legal/leaflet/kk/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: v5e+QBCtWFSDtWcXRDJcdAxF4ss= + +Name: system/etc/legal/leaflet/mk/Protection-of-personal-information.h + tml +SHA1-Digest: uWwEiBvfYyn6D4udP54L04phipE= + +Name: system/etc/security/cacerts/ab5346f4.0 +SHA1-Digest: JR31iZjUtae696itSOA/gRp+YY0= + +Name: system/etc/security/cacerts/c215bc69.0 +SHA1-Digest: n3bzg8K5bD8w4yGFJSki+vVIDiw= + +Name: system/etc/legal/leaflet/mk/Malware.html +SHA1-Digest: TLuS1yGjvoJBLQQ4jFHaENM9Ny8= + +Name: system/media/audio/ringtones/Testudo.ogg +SHA1-Digest: 1QqXoSFOYoowOF6khU/mEoHy2po= + +Name: system/etc/legal/leaflet/hr/Power-supply-(Charger).html +SHA1-Digest: gkaKvOyV17Dkm6qnKPwfc2eKnNw= + +Name: system/etc/bluetooth/network.conf +SHA1-Digest: ohG3JTS5q6MFsXRnG157DmRlfOU= + +Name: system/bin/bootanimation +SHA1-Digest: iIfSaGZe134ApGt8aigmftrAszE= + +Name: system/etc/legal/leaflet/zh-CN/Battery---ZS.html +SHA1-Digest: jXoRtN7qwAuJ+PE56xZfCrs/MsE= + +Name: system/etc/legal/leaflet/bs/End-User-License-Agreement.html +SHA1-Digest: JmCgXCtdYME9A5AsH76P5oMMheI= + +Name: system/vendor/camera/SEM02BN0.dat +SHA1-Digest: XMxfpuuJZzmYBi2WslcRe98j9DI= + +Name: system/lib/modules/reset_modem.ko +SHA1-Digest: /r6pY5OXH3rMixXHpjndXwSBwX4= + +Name: system/etc/legal/leaflet/images/arrow-red-rtl.png +SHA1-Digest: fHv5aJQpr5FuFu6o+P66kQtOcjk= + +Name: system/etc/legal/leaflet/th/Flight-mode.html +SHA1-Digest: gcgz8lNQXv/DsJwcHmZNQYBiZQw= + +Name: system/usr/xt9/SEMC_810_r1-22_ITusUN_xt9_2.ldb +SHA1-Digest: uODo+stDECxFbxcMmFyyk8FsLNU= + +Name: system/etc/legal/leaflet/ms/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: EAe63YRcgKJyaXJe8/orXgmz2E0= + +Name: system/lib/libwfdsm.so +SHA1-Digest: qI4Dz5Ehl5cuuFX/CxG4PLb7w3Q= + +Name: system/bin/setup_fs +SHA1-Digest: tRvqHpB4l+JzkGjp9C2ZfQKJitI= + +Name: system/framework/com.sonyericsson.renren.proxy_impl.jar +SHA1-Digest: u5Hm3kKWB7lja9oPVUPi6SA7XbQ= + +Name: system/framework/com.android.location.provider.jar +SHA1-Digest: 1OZd5OOOET3KgyFzFFMITTU87e8= + +Name: system/usr/srec/config/en.us/dictionary/basic.ok +SHA1-Digest: jtEEAE60jUZP6V7Rz23Hu8XXsMo= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/orange_field_hd1080p.jpg +SHA1-Digest: FTglLJlsKoxxfJs17B5rVr487OM= + +Name: system/bin/screencap +SHA1-Digest: 0WFf7kABvcUEqV/6FwP32cbmXKQ= + +Name: system/vendor/camera/product.dat +SHA1-Digest: awmnLnEEP1ZdGTu4rhzkCXWP9yc= + +Name: system/lib/libsysinfo_modules/battery_info.so +SHA1-Digest: j+nJRSI9/tyq1r0i9x9SmMBDaW8= + +Name: system/etc/legal/leaflet/fa/Conditions.html +SHA1-Digest: fL4rs1bUkpTlSNVUQZArXfWC4ZU= + +Name: system/usr/srec/en-US/clg +SHA1-Digest: M1NeTS6D64i9L1/b+048/LDqKe8= + +Name: system/etc/security/cacerts/2fa87019.0 +SHA1-Digest: RI7spWByA4m8BiATKQhVCZPh1kg= + +Name: system/etc/permissions/com.sonyericsson.android.bootinfoif.xml +SHA1-Digest: eAF6r+y4OQWIZxcGoHxUWh/8FyQ= + +Name: system/etc/event-log-tags +SHA1-Digest: 5/07XRuf1UK0VX4reReX6/6L2fg= + +Name: system/lib/libcameraextensionjni.so +SHA1-Digest: tT96uM1MX+XmZl3U+fWOS7J+hFA= + +Name: system/etc/permissions/com.sonyericsson.dtcpctrl_protected.xml +SHA1-Digest: g/HAnVZptvS8wDRAG+Lb/Fkah2E= + +Name: system/usr/keylayout/Vendor_22b8_Product_093d.kl +SHA1-Digest: 94UqYM02uQuqPT7U58C9UD8Plaw= + +Name: system/etc/legal/leaflet/sq/Precautions-on-Memory-Card-Use.html +SHA1-Digest: ZGB6R2x/2kuKJXEXLn+/Niu59d0= + +Name: system/etc/legal/leaflet/fr/End-User-License-Agreement.html +SHA1-Digest: 6CjxHOauEdG2pwvnGluXWtsiqq4= + +Name: system/etc/OperatorPolicy.xml +SHA1-Digest: 0VTm/HqecXq3HAYQyshi7eYNtAk= + +Name: system/usr/srec/config/en.us/models/generic8_f.swimdl +SHA1-Digest: OUQtGxyzBG46RkofSQn8ez34OlE= + +Name: system/etc/security/cacerts/fac084d7.0 +SHA1-Digest: kVbZi1tMnjKCdaDIG1+QC0uymEk= + +Name: system/etc/legal/leaflet/pt/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: rBhEUJPH/TJSe6cpGP97EE4HNfI= + +Name: system/etc/legal/leaflet/fa/no-title.html +SHA1-Digest: yHwGAkNPlyA22nrqKGmMZJD5Uvs= + +Name: system/etc/legal/leaflet/ms/Conditions.html +SHA1-Digest: 3mrcoFkxVQCP1nZy4IyEsnwJqzw= + +Name: system/app/UxpNxtLockScreen.apk +SHA1-Digest: S5G0sNU4K+kH6zwaX7NF5coL8kg= + +Name: system/etc/legal/leaflet/zh-CN/Copyright-and-trademarks---Legal- + leaflet.html +SHA1-Digest: kdc9EkosJodFbDRN/COiSv0Bj7c= + +Name: system/tts/lang_pico/en-GB_kh0_sg.bin +SHA1-Digest: Nvij8RZMnJKFf6AdSk78ZVEEIvE= + +Name: system/app/FaceLock.apk +SHA1-Digest: Czz54g+GB+EYgmmPoXBbHQX8bXw= + +Name: system/fonts/RobotoCondensed-Regular.ttf +SHA1-Digest: mB9hDORpS3N2Odl07kEleF5SRy8= + +Name: system/etc/legal/leaflet/en-PB/SIM-card.html +SHA1-Digest: YrIv/dNQYQ5GzXR6X+O4dIs850U= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Radio-frequency-(RF)-exposu + re-and-Specific-Absorption-Rate-(SAR).html +SHA1-Digest: v/7CW9gJJ0cqPQ0E/dvyYgvwvHc= + +Name: system/app/GmsCore.apk +SHA1-Digest: 8qzPiHiufrmf9j4ASU2YdFwtcJ0= + +Name: system/bin/ime +SHA1-Digest: RpNbbWSd+bvmP5Bk8IPErzl4iN4= + +Name: system/usr/srec/en-US/embed_phone_nn_state_sym +SHA1-Digest: WdfxealU/CvP2D0CmAfrqDt16J0= + +Name: system/lib/libacdbloader.so +SHA1-Digest: dV24N9Zl0G3s/vb8vvebLBJ5rXg= + +Name: system/etc/legal/leaflet/en/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: zjjWOIe2/Rz+g7SKuIAsNvmk5l8= + +Name: system/etc/permissions/com.sonyericsson.mimetype.xml +SHA1-Digest: xkY40pU5y6CTPFIQ6NXoOFl8YHM= + +Name: system/app/socialifeplaceholder.apk +SHA1-Digest: m0sLea5Mp79cItO8WqA1hTG31d4= + +Name: system/etc/security/cacerts/7999be0d.0 +SHA1-Digest: Y1fSp79Il7ssJJxn6Hi1lfyqI5Y= + +Name: system/lib/libcald_client.so +SHA1-Digest: 7Hwp7fe5MGuUu8P3e0SS4Pe2KMY= + +Name: system/etc/legal/leaflet/kk/Service-and-support.html +SHA1-Digest: kZdebyKjL2whQLZLfrGPKA3+tkM= + +Name: system/etc/legal/leaflet/images/icon_print.png +SHA1-Digest: MsSz9RU757ZKkhaBwa33lBE/Wxw= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Driving.html +SHA1-Digest: /uPflungh62Hz4QDvSIgkKKKJGo= + +Name: system/app/DtcpCtrl.apk +SHA1-Digest: p1J1iYZqjlwsAyQf6nJyxmmB8tw= + +Name: system/etc/legal/leaflet/zh-HK/Recommendations-for-care-and-safe + -use-of-our-products.html +SHA1-Digest: R6e2aOc6kXjR5N5U24zzPwhTBJI= + +Name: system/etc/legal/leaflet/kk/End-User-License-Agreement.html +SHA1-Digest: EiuKrBSC64ckiL/QJKbT8GEaRlc= + +Name: system/lib/libgemini.so +SHA1-Digest: GeRWmiCAkBuyU+3tVsGmmweJd88= + +Name: system/app/ShareApplication.apk +SHA1-Digest: 7cDj0Paf0XPqL9c7yjQ4scIVXYk= + +Name: system/bin/requestsync +SHA1-Digest: XkE8EJuMNX9lldXnHHdHoskUaeE= + +Name: system/media/audio/ringtones/UrsaMinor.ogg +SHA1-Digest: uSdK8kCZfVuz+mlm/w8xp7HLIN0= + +Name: system/etc/snd_soc_msm/snd_soc_msm_Sitar_auxpcm +SHA1-Digest: JDkTcbT4GdRkDXK9e5x9Wka946o= + +Name: system/etc/legal/leaflet/en-HK/GPSLocation-based-functions.html +SHA1-Digest: 9unC9sO7fQitL7KbNhAZRSqwY2k= + +Name: system/media/audio/alarms/metro.ogg +SHA1-Digest: MsYlsHNc4JM0e553WnhyzasovDs= + +Name: system/etc/legal/leaflet/zh-HK/Our-warranty---12.html +SHA1-Digest: D54PC/ryeip617cYVgnqBZNJ5KM= + +Name: system/etc/security/cacerts/e60bf0c0.0 +SHA1-Digest: qso/01ui1WfhOpSAedhVrLUBpW0= + +Name: system/etc/legal/leaflet/pb/Driving.html +SHA1-Digest: olWCMxbVz6fpFTcK/7K8yK3jBag= + +Name: system/etc/security/cacerts/3ad48a91.0 +SHA1-Digest: HZXjr9IxEdl/bLsWXl0vBzOswmE= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blown_dandelion_hd1080p.png +SHA1-Digest: nCxGkj6aEmqNqjMu7apLAZiCjc4= + +Name: system/app/PMSservice.apk +SHA1-Digest: eUvAjMy2Xu6Dt0pFGWZkDV5adgI= + +Name: system/etc/legal/leaflet/hr/Export-regulations.html +SHA1-Digest: r+NYWOz+SvXx5NBLcmjVKrgfMA0= + +Name: system/app/YouTubePlugin.apk +SHA1-Digest: CQlqjcRjZiCsFmEvGeVXaf/LsDE= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_black.jpg +SHA1-Digest: kwA7m75XrWrOks+v1OaQo2E1DAk= + +Name: system/etc/legal/leaflet/hr/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: Abvcbu0+8diZ/Y4ba2g1wDjDVwI= + +Name: system/lib/libcameraextensionservice.so +SHA1-Digest: lOZuDMZTmj5Dq1x3eh5Gl1MLfS8= + +Name: system/tts/lang_pico/fr-FR_nk0_sg.bin +SHA1-Digest: uJPDIkoo44Xdhg1IvPQ7n+AiG7M= + +Name: system/media/audio/notifications/CetiAlpha.ogg +SHA1-Digest: LNiMC1qc/7XTuVgbF/U6Nwssyho= + +Name: system/etc/legal/leaflet/kk/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: EDJLUTFXURq9C3EVWEzQ1NGOEe4= + +Name: system/media/pictures/cesky_krumlov_02.jpg +SHA1-Digest: LUBca96dLQb5y93P0w2W3nPWus0= + +Name: system/lib/libstagefright_soft_mpeg4dec.so +SHA1-Digest: XMUM8NGseVE1b+ZW/rAmx8CkLfk= + +Name: system/etc/legal/leaflet/zh-TW/For-Devices-Supporting-3D-Viewing + -capabilities.html +SHA1-Digest: n7cQDKUtCaYGuWQ645eKmsW1kMc= + +Name: system/etc/legal/leaflet/zh-CN/Limited-Warranty.html +SHA1-Digest: YCE8WdAZRre/Q0K53S60Iy/ujtE= + +Name: system/lib/libennjcon.so +SHA1-Digest: n6ixI5NBRbpioFR62z8Zof6IFw8= + +Name: system/etc/legal/leaflet/en-HK/en-CN/GPSLocation-based-functions + .html +SHA1-Digest: biTQU55NLEVwLohq/UUAJtD6Jv0= + +Name: system/app/SomcCameraAutoUpload.apk +SHA1-Digest: cl4yD/n3M6Cm0z9A+N/f1E9kfUk= + +Name: system/etc/legal/leaflet/vi/GPSLocation-based-functions.html +SHA1-Digest: sfHuTRiVVj6UU0inNFwKGuD6c6U= + +Name: system/media/audio/notifications/Betelgeuse.ogg +SHA1-Digest: yH2fE96xczBAqGnhzJlE6JPxS80= + +Name: system/etc/legal/leaflet/sq/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: 7UWytXfXwbwIxnwiYsy3r8Wo7jY= + +Name: system/etc/security/cacerts/9339512a.0 +SHA1-Digest: mQ4WSgNEy6kTq/gCEHGaZMW5sY0= + +Name: system/etc/legal/leaflet/fr/Driving.html +SHA1-Digest: f0ZEVr0pHx3DQlh9HBvTJvobdu4= + +Name: system/etc/permissions/android.hardware.wifi.xml +SHA1-Digest: oHkBECWfFLtDqANIBIPZoPQ2mkU= + +Name: system/etc/security/cacerts/f80cc7f6.0 +SHA1-Digest: W8bDrAuHeemBUG1E6My97G/SuFg= + +Name: system/etc/security/cacerts/69105f4f.0 +SHA1-Digest: jltP5Tn1V+xLjDQLZwAgoHqzxc0= + +Name: system/etc/legal/leaflet/images/LEGAL-SAKAGUCHI-NO-SIGNATURE-WIT + H-LINE56MM-low.jpg +SHA1-Digest: VNHqrQ79mx8GisCKS7T0Mbj/e1Y= + +Name: system/media/audio/alarms/Nobelium.ogg +SHA1-Digest: LrLESOq9CE3s2jIPgfFCWWZRM9c= + +Name: system/etc/legal/leaflet/uk/Service-and-support.html +SHA1-Digest: Tvmg2s2iv6391pxRJfyq6pxRidQ= + +Name: system/lib/libwfduibcsrcinterface.so +SHA1-Digest: G3xF45zGdoed6uRLwrnzZEtnKdc= + +Name: system/etc/security/cacerts/5cf9d536.0 +SHA1-Digest: EX93MpxobY/BeHpdRW+gBO+pVKE= + +Name: system/media/audio/ringtones/Cygnus.ogg +SHA1-Digest: oCYcEomUKGGXCCb2bL4V4dk0UoU= + +Name: system/etc/legal/leaflet/ae/Protection-of-personal-information.h + tml +SHA1-Digest: ZGnZ6UH81M4qQWuyWxD0aNEQuNw= + +Name: system/app/skin-picker.apk +SHA1-Digest: d8U5RAwMx63FEy6tjVKM/MUeqbw= + +Name: system/vendor/pittpatt/models/detection/multi_pose_face_landmark + _detectors.7/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin +SHA1-Digest: dwEn0myGUfjd7vy7JX7yh6urTJU= + +Name: system/etc/legal/leaflet/ko/GPSLocation-based-functions.html +SHA1-Digest: uRGqj/jE/6GJ4g7CaO155hDwwuE= + +Name: system/etc/legal/leaflet/sr/Power-supply-(Charger).html +SHA1-Digest: LD8GeHxSouoQ7+62I2oXpqc8ijE= + +Name: system/etc/security/cacerts/fb126c6d.0 +SHA1-Digest: 7lobtNCl//Q03nIbGlcwTyJqJGc= + +Name: system/usr/srec/en-US/rescoring_lm +SHA1-Digest: 3WHFz2o3uGTMAlgIyQ+ZXBCk66w= + +Name: data/tweaks/ext4/ext4 +SHA1-Digest: 7/8rNtZxVaUHYNH/dn44VJMeBTk= + +Name: system/app/VerifyCertificatesDummyAppMedia.apk +SHA1-Digest: qLHB5VhDW/h4c2s51k5ZiSkAGSk= + +Name: system/bin/grabramdump +SHA1-Digest: zTOUSgQ9YouIx9GfwXvpQDyDZU0= + +Name: system/etc/legal/leaflet/sq/Service-and-support.html +SHA1-Digest: Bt0OT55sE9jQq5oPpbtdxzVP0I8= + +Name: system/usr/srec/en-US/ep_acoustic_model +SHA1-Digest: TRJvr6ElzKlRSjdRODtxGDwejN4= + +Name: system/etc/customization/content/com/sonyericsson/r2r/client/pre + loaded_config.xml +SHA1-Digest: Md1FD7PYfWs/e4rjUw5PwWd3tsE= + +Name: system/etc/legal/leaflet/th/GPSLocation-based-functions.html +SHA1-Digest: HmUd95AaMFMRvI94K8kV4rDd84o= + +Name: system/etc/legal/leaflet/pt/Personal-medical-devices.html +SHA1-Digest: +lwIo+4DNJHcnMP9vupFZN/Mk0Y= + +Name: system/etc/media_codecs.xml +SHA1-Digest: qcWJj02vXeCkTOtaR2+Ytd/RaOE= + +Name: system/etc/legal/leaflet/th/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: Tq9Kv958Oag08XWDq5PdSmkvOyE= + +Name: system/etc/legal/leaflet/zh-TW/Important-information.html +SHA1-Digest: eYagcjizGyFgkXK/7JoljypClzs= + +Name: system/lib/libfrsdk.so +SHA1-Digest: alZ3crgL13yR0dD68lcHixDzRd8= + +Name: system/semc/chargemon/data/charging_animation_07.png +SHA1-Digest: dIYPh0XQDy52zf9cmImPoIQELUI= + +Name: system/etc/security/cacerts/bf64f35b.0 +SHA1-Digest: PatpGMTkqlaTNx343GS4IRRAciA= + +Name: system/etc/legal/leaflet/en/Our-warranty---12.html +SHA1-Digest: xt9icPyGXR6TuBgQUm5VBExAo+I= + +Name: system/lib/libsys-utils.so +SHA1-Digest: bqV77ycWpQgdxCE920BN5M89cfc= + +Name: system/lib/libmm-color-convertor.so +SHA1-Digest: aqY/qa5jGQXl8QctRFTss6Dk2jA= + +Name: system/etc/legal/leaflet/ar/Flight-mode.html +SHA1-Digest: WhnolxFN9/bQ7ccmKN6hSdfnpTQ= + +Name: system/lib/sysmon/sysmon_modem_lagan.so +SHA1-Digest: 5UjCJpblxFR2X5CAiBLmDFRCFSU= + +Name: system/etc/security/cacerts/ddc328ff.0 +SHA1-Digest: UgwJP9g4O1D5SSYH0ozmn6x/BKg= + +Name: system/etc/legal/leaflet/fr/Flight-mode.html +SHA1-Digest: oQKtu+uEAwHXXAa4aTH5ODLtjvY= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/grey_lake_hd1080p.jpg +SHA1-Digest: pPOIcY6uz+pJ5CtA31mCQny8g28= + +Name: system/lib/librtp_jni.so +SHA1-Digest: nl92wtIHENiorE01gbtU3AKl0gc= + +Name: system/etc/init.qcom.efs.sync.sh +SHA1-Digest: LHVNaA2YoDCI7s47Nj/xW79ZxFg= + +Name: system/lib/libwiperjni_v02.so +SHA1-Digest: qAfvCydOkjKqzn+dDxvVJzFblio= + +Name: system/lib/modules/eeprom_93cx6.ko +SHA1-Digest: q0/ZbidWNGWRQF6RyFzzoBiXgHo= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Children.html +SHA1-Digest: u+aPQcTJO24IIGUImoPp3IOgXGk= + +Name: system/etc/legal/leaflet/ar/Service-and-support.html +SHA1-Digest: +u1iIzCYjZqEoVtFZLjkfkzk3eg= + +Name: system/etc/wifi/p2p_supplicant.conf +SHA1-Digest: hqLQYVCjERBFSQ1mW7eOiFurQNM= + +Name: system/etc/legal/leaflet/sr/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: e3SZvTTCTurhs/xLOg45UyrULRI= + +Name: system/etc/media_profiles.xml +SHA1-Digest: XxuMtJf8UYuvCjM8ugJ1Jxr59OE= + +Name: system/media/audio/alarms/Argon.ogg +SHA1-Digest: 0iG4Kw1hBtepq19bGSpS62a1VBI= + +Name: system/etc/legal/leaflet/mk/Emergency-calls.html +SHA1-Digest: VDcQf0FzY0eg8UE/EVdr70rRww4= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Loudness-warning!.html +SHA1-Digest: wz08UbrhT/QfQrmxLd1VJOQFfcA= + +Name: system/etc/legal/leaflet/th/Antenna.html +SHA1-Digest: 7SLc+8/sZAn9x2SKe7wRnYM1ii4= + +Name: system/etc/legal/leaflet/xl/Accessories.html +SHA1-Digest: nVn6nB0S9723gku78UL2h1Mr5/U= + +Name: system/etc/legal/leaflet/en-PB/Sony-Ericsson-Consumer-Web-site.h + tml +SHA1-Digest: xxZitRcfqNz8ax5kMoYXOcb7j30= + +Name: system/etc/legal/leaflet/ar/End-User-License-Agreement.html +SHA1-Digest: 04o8DebfDCmLb7lZH7ljZ/HBLho= + +Name: system/app/Radio3.apk +SHA1-Digest: 1f0McI0nG+xLa+2FE+yJzxN/7FE= + +Name: system/etc/legal/leaflet/kk/Battery.html +SHA1-Digest: xK5kJVKiSQDDbkZRg4egGpNk9lE= + +Name: system/media/audio/ui/Lock.ogg +SHA1-Digest: azNjH9EbWKEBPRTluvexApZNjKQ= + +Name: system/media/audio/notifications/vega.ogg +SHA1-Digest: sFm4dcCj1nOTflgrL2Sy1+PTIlc= + +Name: system/etc/legal/leaflet/zh-HK/Geographical-scope-of-the-warrant + y---zh-zt.html +SHA1-Digest: 1vSrlty5i3wzH28X4+cNJipjNHY= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Battery---ZS.html +SHA1-Digest: 2RL/WkXlYgCmKyXhGQxvFT/GZTk= + +Name: system/framework/ime.jar +SHA1-Digest: RwrrJ3gE7oIf16RoXQOAL74Itms= + +Name: system/etc/legal/leaflet/cf/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: 8vIYxi2F0VQWT5qGDSQqUjJ2S80= + +Name: system/etc/legal/leaflet/pt/Service-and-support.html +SHA1-Digest: rptjXuR4OP3hDq0X0AThDc7te/M= + +Name: system/etc/legal/leaflet/sq/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: mJT2+YG76HrJtaRE9SSpUndd+Os= + +Name: system/etc/legal/leaflet/in/Precautions-on-Memory-Card-Use.html +SHA1-Digest: xhMKzqN44d/jyOqtXS0UpUHKv7o= + +Name: system/etc/security/cacerts/b7db1890.0 +SHA1-Digest: PnsdiNOuklg1r+/IRDgFBHM0gW8= + +Name: system/lib/libloc_api_v02.so +SHA1-Digest: PZ6PXO03WT0M6pnjrtlLNQWyJn0= + +Name: system/etc/legal/leaflet/pt/Power-supply-(Charger).html +SHA1-Digest: /NwKjWZmhaK8nLXJ4dLENbNWZ8U= + +Name: system/framework/modemwarmup.jar +SHA1-Digest: 5qqoT5ANV4Zu9rh3La2RuS6sUek= + +Name: system/etc/legal/leaflet/th/Driving.html +SHA1-Digest: 2fGVaMeXiHDLJsnIvCYiKGI56M0= + +Name: system/bin/crashmonitorns +SHA1-Digest: iDBItCdAW6rCQ2E/8xKBrmJGJZw= + +Name: system/usr/srec/en-US/c_fst +SHA1-Digest: WbnZvDieUD1i8/vibs9Xx1Wx4sk= + +Name: system/framework/org.codeaurora.Performance.jar +SHA1-Digest: evUw9q/rqK3GNzAHLrjKwcLiTUg= + +Name: system/etc/legal/leaflet/mk/Loudness-warning!.html +SHA1-Digest: vCmufAvdedQkCrO3NLotrSiRT7U= + +Name: system/etc/legal/leaflet/pb/Memory-Card---legal.html +SHA1-Digest: N0y9fJdqVsTgHxtWUPiIWkrFFq0= + +Name: system/etc/firmware/wcd9310/wcd9310_anc.bin +SHA1-Digest: ksCANSMi7T+WeRlZS8YuBz/4zQw= + +Name: system/bin/logcat +SHA1-Digest: Gw/s6CQsMlC5ehSz0ZQGXKC4QqE= + +Name: system/etc/legal/leaflet/vi/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: 8l4pppCvQy6Rv/yE0WRpYpTgCnQ= + +Name: system/etc/firmware/dsps.b00 +SHA1-Digest: 0cSpTm/Oh/Wor503mmYWcXOuHNU= + +Name: system/usr/keylayout/Vendor_045e_Product_0719.kl +SHA1-Digest: tHw8H46YULCdxcJ2hb2c0ZhThTY= + +Name: system/app/VerifyCertificatesDummyAppShared.apk +SHA1-Digest: pw7h8FyI0tDm+cMjAJPl5vJZQzQ= + +Name: system/lib/libOmxQcelp13Dec.so +SHA1-Digest: Om6mbFvualbPzUy5tAa0e5X9jRg= + +Name: system/fonts/DroidSansFallback.ttf +SHA1-Digest: AVoIMOYxESTcwCXbQXfPqT6ROIA= + +Name: system/lib/libOmxQcelp13Enc.so +SHA1-Digest: dHMKJ6cFEnYuE2xwGjaKUmONq7k= + +Name: system/etc/legal/leaflet/zh-TW/Battery.html +SHA1-Digest: S32P/CXDd3TTALofadQAZJSzNRg= + +Name: system/bin/diag_dci_client +SHA1-Digest: ImgHgAnb2LZz6Zu1szMX7dpqTf0= + +Name: system/etc/legal/leaflet/zh-HK/Service-and-support.html +SHA1-Digest: LGHSgbp4Sd/ZcybsUep0sScNcWA= + +Name: system/app/DefaultContainerService.apk +SHA1-Digest: KzKWtkELEKxBTE+RA9vU3OeICGk= + +Name: system/etc/legal/leaflet/images/btn_search_purple-BIG.gif +SHA1-Digest: 7BsgoBehAR7sI1XcByJ6/PCsZEg= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/field_at_sunset_hd1080p_small.jpg +SHA1-Digest: AzE9mv6pFituvyTp1mMDIJZLVQw= + +Name: system/etc/legal/leaflet/mk/Battery.html +SHA1-Digest: V5V1g9WTChJnJvK7two3MRF0a6A= + +Name: system/etc/legal/leaflet/fr/Limited-Warranty.html +SHA1-Digest: d/6isQYun6Ri7N+0YLkqqC+/pho= + +Name: system/etc/permissions/com.sonyericsson.dtcpctrl_private.xml +SHA1-Digest: KFbYUjmDDcV9r81kMcYXIjzyMiI= + +Name: system/etc/legal/leaflet/in/SIM-card.html +SHA1-Digest: JZdxVCa8pbOJ67FnehSrbiP1f50= + +Name: system/media/bootanimation.zip +SHA1-Digest: rsjgwVBYWsIh8zEzdr9/SmWiO4Q= + +Name: system/etc/legal/leaflet/sq/Publication-number.html +SHA1-Digest: IEIbQ8rJ61wvn2vmPczbcH2AO5Y= + +Name: system/usr/keylayout/keypad_8960_liquid.kl +SHA1-Digest: r78bDLH0rEerNIxnlhn1wSazDWU= + +Name: system/lib/libmmjpeg.so +SHA1-Digest: 48VrNUc2QzxEZCJ+J20C54ptjvE= + +Name: system/etc/legal/leaflet/en/Loudness-warning!.html +SHA1-Digest: AXllZ6AP7RW0VmIAYjpx8RvMSyY= + +Name: system/etc/legal/leaflet/kk/Publication-number.html +SHA1-Digest: 8FrUecwqO8aUMmZ/Lmeq+Tfa1DA= + +Name: system/etc/security/cacerts/9dbefe7b.0 +SHA1-Digest: yGiY2vyvGY8f13llDmyVgk0uikM= + +Name: system/etc/firmware/dsps.flist +SHA1-Digest: EcwtubYg7HxQH+P/e2AGw9uXdko= + +Name: system/etc/legal/leaflet/cf/Publication-number.html +SHA1-Digest: 6fXEJKWcyRaAA6qgh65gqL3AJao= + +Name: system/etc/permissions/com.sonyericsson.dlna.playanywhere.xml +SHA1-Digest: aJJKVymSjSvFX8Z+LcZoWY7oiZY= + +Name: system/etc/security/cacerts/2afc57aa.0 +SHA1-Digest: nPKWafPr4jvpuNF1YPzwOiNGfjw= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Geographical-scope-of-the + -warranty---zh-zt.html +SHA1-Digest: AFDCTKFY1o+jCxwF0EZzFxIWHls= + +Name: system/usr/keylayout/gpio-keys.kl +SHA1-Digest: nf3UEtVJqEuhqt8l0W1i8HbILH8= + +Name: system/etc/legal/leaflet/ms/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: Oey13xGf5AH4st8axII8u1bH8RQ= + +Name: system/etc/legal/leaflet/pb/Children.html +SHA1-Digest: 0bTbqMBvDIPHiG+blaknXpRyTWU= + +Name: system/bin/service +SHA1-Digest: gzMSCCUOEWohzfaeeu2PvKKz/dw= + +Name: system/lib/libI420colorconvert.so +SHA1-Digest: pKfm0/KBtxRaIGVtLO1QaOvTPIg= + +Name: system/framework/semcrilextension.jar +SHA1-Digest: BZWYUB+3okuxzPKl1DvFPRzu9Bg= + +Name: system/etc/legal/leaflet/hi/Accessories.html +SHA1-Digest: Nqav56o3iHeC5gBQBXr07hAIGnM= + +Name: system/lib/libsysmon.so +SHA1-Digest: W0svq1r4Z9lJmBP9Wq5KUey6+nw= + +Name: system/xbin/zip +SHA1-Digest: qTl+9tggvuAbj47yZ4dVrO0RuMo= + +Name: system/etc/legal/leaflet/ae/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: T2WBcRMmtOSoh/eyNnT6FHj9GIo= + +Name: system/app/GeneralDataDisclaimer.apk +SHA1-Digest: oDydj30oQnoJoPdCZQDWYBXh718= + +Name: system/etc/legal/leaflet/kk/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: g5aV8hcxbOp19dKa8yKxLFGDZdI= + +Name: system/etc/legal/leaflet/en-PB/Flight-mode.html +SHA1-Digest: fJBiMxe3nYfjdZlVfEZ4WsmzCd4= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor7.so +SHA1-Digest: 6tQN2gjtRSeJlsyh5JAJtTuZGi8= + +Name: system/etc/legal/leaflet/en-HK/Driving.html +SHA1-Digest: OJui7NJLTTSekEn/7pmE8bxeZ+g= + +Name: system/etc/permissions/com.sony.device.xml +SHA1-Digest: VbUHQSpgdVBb2CDTuIsn8zVOsfk= + +Name: system/framework/services.jar +SHA1-Digest: CIABE3dPB5/btUc35f6okXh6ieE= + +Name: system/etc/legal/leaflet/iw/Driving.html +SHA1-Digest: AaSqx386AEv8C8pGTr5h+XLLDT0= + +Name: system/usr/srec/en-US/phonelist +SHA1-Digest: S2L0nVL6UG1/1SM58nULzylbpFY= + +Name: system/media/audio/alarms/Alarm_Classic.ogg +SHA1-Digest: o3VRB0mJ2Lu8mY3zQAuPnFcrO+A= + +Name: system/bin/hostapd_cli +SHA1-Digest: WLP6nkcXjON3siLEG0jGDPe95P0= + +Name: system/etc/init.qcom.coex.sh +SHA1-Digest: WSMv6BpVHX2QBLO4NrOlGAvjFZM= + +Name: system/etc/legal/leaflet/vi/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: 3XFTobfiiBp5JVSsJ0Lh1fhpwOY= + +Name: system/media/audio/notifications/Tejat.ogg +SHA1-Digest: Y1lhAFotA2tk8zvmsQpX9rIGviA= + +Name: system/etc/legal/leaflet/in/Malware.html +SHA1-Digest: Frs7yIIh3ifhY/OH3DgTd80FzZ4= + +Name: system/etc/legal/leaflet/hr/Battery.html +SHA1-Digest: e614laJc8C1hOuYXuvuJac8DIV0= + +Name: system/lib/libdl.so +SHA1-Digest: VHNK7fGKavNrBoCdYwXERNwPF9o= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Recommendations-for-care- + and-safe-use-of-our-products.html +SHA1-Digest: wgww3xziqbOWy5JfLpnGZDY2eoM= + +Name: system/etc/legal/leaflet/hi/Protection-of-personal-information.h + tml +SHA1-Digest: 8bjZMvukcxMoPxXbQSEqXkpfy3Y= + +Name: system/app/Talk.apk +SHA1-Digest: OCgeELsUmnbxYqGjVwJ+6yxpybg= + +Name: system/usr/srec/en-US/contacts.abnf +SHA1-Digest: iQQ63Xbl9ApZU2QzQYi80ayVbZA= + +Name: system/etc/legal/leaflet/xl/Children.html +SHA1-Digest: UhxW8qsoaMoInYo9b/lMrc2D0es= + +Name: system/etc/legal/leaflet/mk/GPSLocation-based-functions.html +SHA1-Digest: hZqopmoGMG3gia0/JX81dBCvERw= + +Name: system/usr/share/zoneinfo/zoneinfo.version +SHA1-Digest: 2fI97bQ2ZyWLXtpTWG7caV9Ozzg= + +Name: system/lib/libmmmpod.so +SHA1-Digest: v9mRBk5ROWxJdZJ9DrTXZtw4HqA= + +Name: boot.img +SHA1-Digest: gFIed5a1mhUEUsNpUEydv1Sqw14= + +Name: system/etc/legal/leaflet/en-PB/Accessories.html +SHA1-Digest: 4g11sbsaZDMa7C4R4yIKfN2S8Ec= + +Name: system/lib/libsqlite.so +SHA1-Digest: gghgqM2Aa1VLrWVih57yZtE2CBI= + +Name: system/etc/permissions/android.hardware.camera.front.xml +SHA1-Digest: brba3Lj1cD+5FUB6sCkGYr27DvU= + +Name: system/etc/legal/leaflet/zh-HK/Protection-of-personal-informatio + n.html +SHA1-Digest: S0Nj62t5Gf07GwgiaQhaF18fLJs= + +Name: system/etc/security/cacerts/58a44af1.0 +SHA1-Digest: 4NuW5gozKsdwb1kgkbS9CS2AMzU= + +Name: system/app/GooglePartnerSetup.apk +SHA1-Digest: gaab7/DTvG6pzlPrSV8IhqeXYYI= + +Name: system/etc/legal/leaflet/en-PB/Antenna.html +SHA1-Digest: SR07Itu0AZyDEgSUX2SKYMEuM2o= + +Name: system/lib/sysmon/sysmon_enable_charging.so +SHA1-Digest: rKGiYcZyyy18+atby+nGtnBUTSM= + +Name: system/lib/libclcore_neon.bc +SHA1-Digest: QtYXPxrNPaRw/IsLX5xDWr5V2so= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Flight-mode.html +SHA1-Digest: 1u25O8uNrLmKJz7g4AStLAa8+8o= + +Name: system/etc/legal/leaflet/images/_Note.png +SHA1-Digest: +vYQd8PvCQTkZJxGvrpcbdEsQIY= + +Name: system/etc/legal/leaflet/ms/Power-supply-(Charger).html +SHA1-Digest: vOCfufFRFv827H/4qgsn/faZ6Bw= + +Name: system/media/audio/notifications/Antimony.ogg +SHA1-Digest: D5l76aIRj1GlyI63AESbQyN5QS4= + +Name: system/etc/legal/leaflet/cf/Malware.html +SHA1-Digest: 3AK65AQLuYn39/RryxaA6yZmF5g= + +Name: system/etc/legal/leaflet/uk/Publication-number.html +SHA1-Digest: 7FIayUgFyPr+ajV2YrtNIZT+yC4= + +Name: system/etc/legal/leaflet/ar/Conditions.html +SHA1-Digest: ZlfM2/Vcx2OlpS9zWuvsvl/RT60= + +Name: system/etc/legal/leaflet/zh-CN/Publication-number.html +SHA1-Digest: iKFapAHuKSKJTyuTE6K+3zwhHPQ= + +Name: system/etc/sensors.conf +SHA1-Digest: N8Dluo3KIMP/MPsanavnRvMp1J0= + +Name: system/app/CarHome.apk +SHA1-Digest: rXcdLh9+yepc3uaiL9be88GkcWw= + +Name: system/etc/system_fonts.xml +SHA1-Digest: UGbNbGx2rePKx1EkAsPQwLskWjo= + +Name: system/etc/legal/leaflet/mk/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: Spb3Ov92K4oOozj5Uaggg1mUKf8= + +Name: system/lib/soundfx/libreverbwrapper.so +SHA1-Digest: j4G7RiEvoDuiZVN26wTcHuGtKt4= + +Name: system/etc/legal/leaflet/cf/index.html +SHA1-Digest: 5r0lv3I+PgT1FI3Ley6msBW2LeI= + +Name: system/fonts/DroidNaskh-Regular.ttf +SHA1-Digest: UNiU8/FeO2boS+hjDrvun3Oq3tc= + +Name: system/etc/permissions/android.hardware.usb.host.xml +SHA1-Digest: 4e0iQFffHEDh5vP8Oa9PBa1PxGo= + +Name: system/etc/legal/leaflet/ae/Flight-mode.html +SHA1-Digest: YOhBzzx2GYZLECSRAB4aAxCYewk= + +Name: system/etc/snd_soc_msm/snd_soc_msm_2x +SHA1-Digest: lM1vMZP/g/Js6MgcTAemuuUjDY8= + +Name: system/etc/legal/leaflet/cf/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: qS/Yttnby25RZbJojz98bhGvz6k= + +Name: system/etc/legal/leaflet/in/Service-and-support.html +SHA1-Digest: OsezgEdUm5hS9Z27Zmey9t3P2iU= + +Name: system/etc/legal/leaflet/ko/End-User-License-Agreement.html +SHA1-Digest: pP/EKOQxXGYGJYNKZLI/Ak46TOY= + +Name: system/media/pictures/brugge_05.jpg +SHA1-Digest: Jbd7HF1D9dE1NR9XeX4vqvbfhhc= + +Name: system/etc/legal/leaflet/en-HK/End-User-License-Agreement.html +SHA1-Digest: 9CikPE+clknOLdofA6e8Dmo/1Cw= + +Name: system/usr/xt9/SEMC_810_r1-3_UKlsUN_xt9_2.ldb +SHA1-Digest: MazdXri5H7uFq8+UOOtxEOmpBkA= + +Name: system/media/audio/ringtones/sunbeamz.ogg +SHA1-Digest: 7pFLyUWWFLRtvmgf9cAjky9XpXY= + +Name: system/lib/libdiag.so +SHA1-Digest: 425vLMc97Qat7xefRAn5otnFNDQ= + +Name: system/etc/legal/leaflet/vi/End-User-License-Agreement.html +SHA1-Digest: 4i2YWlU75QcTjM281CzC3mazejw= + +Name: system/bin/rmt_storage +SHA1-Digest: SP/VINt7b13h1zv2Z0JpGreRzj4= + +Name: system/bin/toolbox +SHA1-Digest: XPyOsKXnW0fnhUotXP6RZ6RJgzI= + +Name: system/etc/legal/leaflet/fa/What-we-will-do.html +SHA1-Digest: 1ITiaLZ3r/C7Cd9ZApfZxgGjIGc= + +Name: system/media/pictures/yosemite_21.jpg +SHA1-Digest: TWxB8B4hoivlicgnco9/ULcntkU= + +Name: system/etc/security/cacerts/eb375c3e.0 +SHA1-Digest: 9jrnwjglpn8uhR8xCTFy4wec+Ww= + +Name: system/etc/legal/leaflet/sq/Memory-Card---legal.html +SHA1-Digest: gM0anPzXG6pXUDOyQu/T7nKjbTc= + +Name: system/app/TimeService.apk +SHA1-Digest: zegHgiqHsnQrQrqxrGIBRN5iLWo= + +Name: system/lib/libwfdmmutils.so +SHA1-Digest: /RdLv/VZUADtTlckGzx6BGbyMFc= + +Name: system/etc/legal/leaflet/ms/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: lgpdyEFgO86drZ1oNxs7u3VQooM= + +Name: system/etc/firmware/mdm_acdb.img +SHA1-Digest: L9e/JjIZfCOnpnObLZGHBvRt4PY= + +Name: system/usr/xt9/SEMC_810_r1-4_EUlsUN_xt9.ldb +SHA1-Digest: h6g7Z7af9n0E8pBm2SlaLx6RdGA= + +Name: system/lib/libtinyalsa.so +SHA1-Digest: ZOi1XDzSQVos3BwGpKe3xaWNJ+g= + +Name: system/etc/security/cacerts/ea169617.0 +SHA1-Digest: YCD1HGf7ZhS7lIrL78/hxupCFtA= + +Name: system/lib/hw/hwcomposer.msm8960.so +SHA1-Digest: SHPGiRSiZWTeskSBHVaXilEAJtc= + +Name: system/etc/security/cacerts/72fa7371.0 +SHA1-Digest: sw/ScEhE17ZGzZHg7RJLvGMTN2I= + +Name: system/etc/legal/leaflet/hr/Loudness-warning!.html +SHA1-Digest: jDw5aAzLVJGYVxLYIkeZ9wMTimE= + +Name: system/etc/security/cacerts/facacbc6.0 +SHA1-Digest: bZhsIsflntPIp9DFlV2R0Pc4eqc= + +Name: system/etc/legal/leaflet/zh-CN/Disposal-of-old-electrical-and-el + ectronic-equipment.html +SHA1-Digest: 1DvJ0XOyTrT6sh+y3Kk1fBxBMnE= + +Name: system/media/audio/alarms/Carbon.ogg +SHA1-Digest: 11LymVJ9Ot3UAiBsw3jd65ljD1s= + +Name: system/etc/legal/leaflet/images/Note_Green.jpg +SHA1-Digest: o9rZgcjrDS+ygEydSyX2uETpKAY= + +Name: system/lib/libidl.so +SHA1-Digest: 4D7DzabihSKcYIZENxBjHRVTnKQ= + +Name: system/lib/libcald_util.so +SHA1-Digest: F5KcGISk1rRQY0e8j9pGDOHitXM= + +Name: system/etc/firmware/tzlibasb.b00 +SHA1-Digest: 18yueeeCYKEaz/5IK5h6SpXPvsk= + +Name: system/usr/srec/config/en.us/baseline8k.par +SHA1-Digest: xxkwHYqQ6wMwPFVXTMJScnVstGM= + +Name: system/usr/xt9/SEMC_810_r1-9_LVlsUN_xt9.ldb +SHA1-Digest: 0TQw9d8zY3D+pZAspcsoquxRZJY= + +Name: system/etc/legal/leaflet/bs/Flight-mode.html +SHA1-Digest: gFzTnEbqQgs5QavtvQXTaTJ9mEU= + +Name: system/etc/firmware/tzlibasb.b01 +SHA1-Digest: 2mVjQyfqtIa/Z87EmqmnKU4NM6g= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Copyright-and-trademarks--- + Legal-leaflet.html +SHA1-Digest: 39Z7I9NoqmOqdm1v3Qz990FD+Nw= + +Name: system/etc/legal/leaflet/ru/Malware.html +SHA1-Digest: fl/gKphoA+4XwntRZkdocs1Z5/w= + +Name: system/etc/legal/leaflet/in/Important-information.html +SHA1-Digest: mWrNPeKPQ51rN90rTDWoR/d1hZQ= + +Name: system/etc/legal/leaflet/images/icon_nav_howtouse.png +SHA1-Digest: WWStumbyRsaoWuERAu02gBYsVQc= + +Name: system/lib/modules/wlan.ko +SHA1-Digest: ldFly0yZ3Qmeuza1CcvpX1QCM6k= + +Name: system/etc/permissions/android.hardware.sensor.proximity.xml +SHA1-Digest: XnS+P6QtWXi//4uZhn9zCGLFAOk= + +Name: system/framework/com.sonyericsson.uxpres.jar +SHA1-Digest: gOCohoFe/XClxdYdDXbnir1ppYg= + +Name: system/app/usb-mtp-marlin-wrapper.apk +SHA1-Digest: f6n2Qcpp4F7VfZKIVbVE9eD5XS0= + +Name: system/etc/legal/leaflet/en-PB/Malware.html +SHA1-Digest: fer2aYuNgaeNfFIu/x8feBhbtDI= + +Name: system/lib/libpin-cache.so +SHA1-Digest: tWeAIMsxqASLMvmlZ7vHvZXC0Vk= + +Name: system/lib/modules/spidev.ko +SHA1-Digest: 6RRyfAcjjuCzoBz2wDjam4QiFss= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Important-information.htm + l +SHA1-Digest: gwhSjAUUI2sh0P2DRvJetCxccrY= + +Name: system/bin/nl_listener +SHA1-Digest: SyhVQlLzFaltlpKZoevE8NQv/Gg= + +Name: system/etc/legal/leaflet/pb/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: hezFjwhFRvQ2aQc27mXPwfGaSRU= + +Name: system/lib/libnfc_jni.so +SHA1-Digest: MuCC5o/5ts9h84nlzTwZDL/CsD8= + +Name: system/etc/security/cacerts/ccc52f49.0 +SHA1-Digest: O0+cfSTNAOmAaDWYHOWEHop+Czc= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/GPSLocation-based-functio + ns.html +SHA1-Digest: nRXgKN3AtHD4Mh1aLdDFanmV+sM= + +Name: system/etc/legal/leaflet/fr/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: 5aJVQ/oZ1jaPxvDMM+rOeWEriaQ= + +Name: system/etc/legal/leaflet/ae/Our-warranty---12.html +SHA1-Digest: GFqv9qqJhxOIqOOIJu/x9yoMvfM= + +Name: system/etc/legal/leaflet/sr/Publication-number.html +SHA1-Digest: pG3sv2RJfbs3Via54BChGQO4+Ok= + +Name: system/etc/legal/leaflet/ms/Precautions-on-Memory-Card-Use.html +SHA1-Digest: s0pfTGWbU8j4RWTa+DhS2MCX7Yc= + +Name: system/etc/legal/leaflet/sq/Malware.html +SHA1-Digest: erTSnd8Zy7aE9sAOBYoUDAEOxnc= + +Name: system/media/audio/alarms/surprise.ogg +SHA1-Digest: iIIsgsqWicad0FkQkMfzbbNr9Hg= + +Name: system/app/usbotg.apk +SHA1-Digest: 2JUjfWhSlOi4+Dyi1qzmmbF86aI= + +Name: system/lib/libspeexresampler.so +SHA1-Digest: 7WWvp0/D/bmygY4yvMJUKIJ6Qb4= + +Name: system/framework/com.sonyericsson.snp.video_impl.jar +SHA1-Digest: A8z1HFGbw56mM/CTP79DQ1UYhjA= + +Name: system/vendor/camera/SOI13BS2.dat +SHA1-Digest: a/jH1dpY1EmksLOHdkg4psz+Xrs= + +Name: system/bin/ds_fmc_appd +SHA1-Digest: kcaO+BYNwneDANY+ly5uuJR5MoQ= + +Name: system/etc/legal/leaflet/ko/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: mqaqnNLZToYDvhcUT/038oMBDvc= + +Name: system/media/audio/ringtones/Lyra.ogg +SHA1-Digest: WyUXy6DRYGG/OFhRZNLOtnfUjvg= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/white_caps_hd1080p_small.jpg +SHA1-Digest: KcqrwLPhXo1H+7Qz6gL+nk7B9w8= + +Name: system/etc/legal/leaflet/en/Service-and-support.html +SHA1-Digest: O/YYshTg2qtCnQXi6M8941FuxuE= + +Name: system/framework/com.sonyericsson.bluetooth.a2dp.jar +SHA1-Digest: DaxmHbc3ANm4fCmRaCENtjuFb1U= + +Name: system/etc/legal/leaflet/kk/What-we-will-do.html +SHA1-Digest: ZnYADcvW0gxX5HGWo1n15/AAhf0= + +Name: system/bin/dumpsys +SHA1-Digest: 5qEyeoxvK7IJPvV/AqpyTMZ/eOg= + +Name: system/etc/legal/leaflet/cf/Battery.html +SHA1-Digest: hiB/yVwnEz72nDO3YLP00eFaNNU= + +Name: system/etc/security/idd_report.pem +SHA1-Digest: FuTAsaA3xtSJphJAL29sokHtIcQ= + +Name: system/lib/libtinyxml.so +SHA1-Digest: wztIKCcM2KwapsHlMCQHbM1Jank= + +Name: system/app/GoogleLoginService.apk +SHA1-Digest: dA+qhw7iDCAfGXWc+9xY/o5Y23s= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_fog_hd1080p_small.jpg +SHA1-Digest: JaBikYjucahiNl2Y2lVd+GJgLCs= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_white.jpg +SHA1-Digest: IFsnf8F5cW6zQCnCWuhp1LLv1NI= + +Name: system/framework/com.sonyericsson.appextensions.jar +SHA1-Digest: etlBSA9IrlJIOikiK5lRm59mXsA= + +Name: system/etc/legal/leaflet/ms/SIM-card.html +SHA1-Digest: 4ot/V+LKh3OKIBlFc9toeGjEI8s= + +Name: system/etc/legal/leaflet/bs/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: INT3yKBJTc+bgKOLiLkvWcqVhP4= + +Name: system/media/audio/ui/KeypressDelete.ogg +SHA1-Digest: VPKqb3uV7dbibtW5woFWXBcSN+M= + +Name: system/lib/libmbe.so +SHA1-Digest: +kivvmfCFwRbmFcaYVhPH+KD1yE= + +Name: system/bin/fota-snoop +SHA1-Digest: 58X66NQSeNNsxFam5ExkY4Z4N1A= + +Name: system/etc/legal/leaflet/zh-TW/Antenna.html +SHA1-Digest: c4ja/wyXygx5c+pOSt1vSaKaL3Q= + +Name: system/etc/security/cacerts/11a09b38.0 +SHA1-Digest: R669axPhbXAdwOxMeYoDQernEpI= + +Name: system/etc/permissions/digitalpenutil.xml +SHA1-Digest: LluXVJUhdMY2fiFHkyZ8G+tKDpA= + +Name: system/bin/adb +SHA1-Digest: 5WSAApZoVcDKXagEDWSrS9kcNC4= + +Name: system/etc/legal/leaflet/pb/Flight-mode.html +SHA1-Digest: kAti6caRTZM+oEIwl63IR8KqZfM= + +Name: system/media/audio/ringtones/Champagne_Edition.ogg +SHA1-Digest: KaFzJPyp372kwnqo9vH86gUKibA= + +Name: system/etc/legal/leaflet/ko/Personal-medical-devices.html +SHA1-Digest: EMygaLBcHj+SLQqAHF3o1zTedaU= + +Name: system/etc/legal/leaflet/cf/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: Fssg111TcUlnozfInZXo/UdOAn0= + +Name: system/lib/libqc-opt.so +SHA1-Digest: O5f91XPwgNiY35ObhStnBcKK+Ok= + +Name: system/etc/legal/leaflet/iw/Protection-of-personal-information.h + tml +SHA1-Digest: rEbjKt1i7UTmU6e8xz9EHyLTYsg= + +Name: system/lib/egl/libGLESv2_adreno200.so +SHA1-Digest: r1nU+2AxsEg7ZCtrf/w8WVthyOU= + +Name: system/app/SwiqiSettingsService.apk +SHA1-Digest: /3aSTCbi2kRQWvrcnwp0nuaXC5k= + +Name: system/lib/libnjubase2.so +SHA1-Digest: TGmiDAD3SERp0mRaiyKHO18ExZs= + +Name: system/media/audio/alarms/Neon.ogg +SHA1-Digest: nn9euTJLfQfxmLWCFpRXKoP2/M4= + +Name: system/etc/legal/leaflet/zh-HK/Malware.html +SHA1-Digest: etmESdWRu//bh5nlqqs0Q/sYyqU= + +Name: system/etc/legal/leaflet/bs/Battery.html +SHA1-Digest: ZXGh0CFMA2E4cMeLIbLgoJdt2Ro= + +Name: system/bin/bugreport +SHA1-Digest: RWkx9ZkIkxpY0AEfnnEu+9X1b5I= + +Name: system/lib/libOmxAacEnc.so +SHA1-Digest: sOMzZLVpQosu2tWLqhTokuyvXPY= + +Name: system/etc/legal/leaflet/in/What-we-will-do.html +SHA1-Digest: k/qSjwmYiWxNW5cHED2PzikaRqE= + +Name: system/lib/egl/libGLES_android.so +SHA1-Digest: x1rTqdYnvSWmV3Ed1jY9ThBj7DY= + +Name: system/lib/libmpqplayer.so +SHA1-Digest: tg5b7BhdTpFs4VBF1vTtvcMg6MU= + +Name: system/app/WfdService.apk +SHA1-Digest: TQ2oY/ic5IHbugxIQBqs6u01sAQ= + +Name: system/app/Bluetooth.apk +SHA1-Digest: SKL0qbNstxxNElvYzblSxGpg7gc= + +Name: system/framework/com.sonymobile.facebook.proxy.api.jar +SHA1-Digest: ADG9dYoyyP7G5AzNRv5n0PR/CIk= + +Name: system/usr/xt9/SEMC_810_r1-4_ISlsUN_xt9.ldb +SHA1-Digest: YRUlGcrdy2sMXZNg5BlQeqrOpyc= + +Name: system/app/FBSetupwizard.apk +SHA1-Digest: 6phm+SlkBUVVbhcxUrOtjJCaOBI= + +Name: system/etc/security/cacerts/f58a60fe.0 +SHA1-Digest: 68/j3gHkt1C4pcp35lL5Y5cLsM8= + +Name: system/usr/keylayout/AVRCP.kl +SHA1-Digest: QuW9bT29OeTZExCprXrP8pA3gzE= + +Name: system/etc/legal/leaflet/bs/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: pLuHU1h0b7S25MSEBoDjV9Vhqu0= + +Name: system/etc/legal/leaflet/en-PB/Power-supply-(Charger).html +SHA1-Digest: N9tSgXoqZe8V5545gGMQGRrhxjc= + +Name: system/media/pictures/engadin_01.jpg +SHA1-Digest: gfcUakYVovLROyCdZUEiaPKbzlo= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/orange_field_hd1080p_small.jpg +SHA1-Digest: ntZNWKXtDU4f251Ra+kJdYBYsG8= + +Name: system/usr/xt9/SEMC_810_r1-4_ROlsUN_xt9_2.ldb +SHA1-Digest: 7IlSpJRLRnAhx8MKqIWjdr4C8Ts= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/no-title.html +SHA1-Digest: XBCrgyrVUJc8Z5f8Il6hR1/LAFI= + +Name: system/vendor/overlay/com.android.browser-res.apk +SHA1-Digest: F/mbEC6ul1w1QODnJQvBCqGT9AU= + +Name: system/app/NoteWidget.apk +SHA1-Digest: 1vjp6CFziXgL6Cktv16EudBxgjk= + +Name: system/etc/legal/leaflet/kk/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: GddCpEAzK/aBnkMtX3JAfw5HeUs= + +Name: system/media/audio/ringtones/BentleyDubs.ogg +SHA1-Digest: EJXHjT4q7bkBEuiZruNG4qMzh48= + +Name: system/app/PMSserviceTrigger.apk +SHA1-Digest: fFTJgRzRVZsrKclTF7Shqsc+zzo= + +Name: system/etc/legal/leaflet/cf/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: nwjx2ynZMjbcOySP2kWZl/dT4GM= + +Name: system/etc/legal/leaflet/pb/Sony-Ericsson-Cellular-Phone-Warrant + y-Card---Brazil.html +SHA1-Digest: gZ9YDx0+vOT3IkCOXgAJQWIy0cA= + +Name: system/etc/legal/leaflet/vi/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: j1n9spGs+o0V7t4u66lTdxGVLFg= + diff --git a/build/META-INF/MANIFEST.MF b/build/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..aed8e1c2c62 --- /dev/null +++ b/build/META-INF/MANIFEST.MF @@ -0,0 +1,10327 @@ +Manifest-Version: 1.0 +Created-By: 1.0 (Android SignApk) + +Name: system/media/audio/Bob Dylan - Duquesne Whistle.mp3 +SHA1-Digest: bjcPy5U3qDBlzxzoqPiNoZ1D1oo= + +Name: system/vendor/camera/SOI08BN1.dat +SHA1-Digest: q37BRp/BnVNw/2Wc4vF4Ut/xzr4= + +Name: system/media/pictures/chuxi_tulou_cluster_01.jpg +SHA1-Digest: qyqJ16ob5522DvSHWfpcabRsphY= + +Name: system/lib/libhwcexternal.so +SHA1-Digest: fLwy0JJV1o7u5J3iYYb6+l+rKeY= + +Name: system/lib/libpf.so +SHA1-Digest: DOKQmhcgIgt2jsYRbO7h28UdMv0= + +Name: system/etc/legal/leaflet/ru/Personal-medical-devices.html +SHA1-Digest: 1F3H8UanQO+maVgWBTvPlQLDuAU= + +Name: system/media/audio/ringtones/RomancingTheTone.ogg +SHA1-Digest: 1KjCt72M1Cqk5UEkVYRnRjOEMh4= + +Name: system/lib/libpowermanager.so +SHA1-Digest: MORUwsrDzN0bPdXQKk0uLd+WJkA= + +Name: system/lib/libstagefright_soft_aacdec.so +SHA1-Digest: ljlyQ/peiu9bAU2yc8qwWxajD8Q= + +Name: system/lib/libnjname.so +SHA1-Digest: J4hO23VD3E8OP6nR3pnhNhMu4Qc= + +Name: system/etc/legal/leaflet/pt/Our-warranty---12.html +SHA1-Digest: Zmv9CvsKB5NedQ3IJ4J1kN5be9o= + +Name: system/lib/libTimeService.so +SHA1-Digest: YiMOjSf2b+Pmbxahiz1zh70AoF0= + +Name: system/vendor/pittpatt/models/detection/multi_pose_face_landmark + _detectors.7/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin +SHA1-Digest: eI6ovSLIm3HCCBrDqsxX2Q/Ei2s= + +Name: system/fonts/SoMCSans-Regular.ttf +SHA1-Digest: crPeVwykExZyEjkNYTAAm9VRiSY= + +Name: system/app/Chrome.apk +SHA1-Digest: us1CRuKkeS8I6HydPdsPprsrfeQ= + +Name: system/app/SEMCSetupWizard.apk +SHA1-Digest: LBAFpsaLGX+kLBONPZVEvZ5sEwM= + +Name: system/media/audio/ringtones/Aquila.ogg +SHA1-Digest: vBGesGt9L4V2ef+oEp1iOi6sLa4= + +Name: system/etc/legal/leaflet/vi/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: WT8L4+hkgoX9/8DBMasQ+R//M3A= + +Name: system/media/audio/ringtones/breeze.ogg +SHA1-Digest: 8KtFpUivlhaYVrzxwCK8qcaCvhk= + +Name: system/lib/libusbhost.so +SHA1-Digest: B77lTTk20ByILQ7xbLPQPl/zmJI= + +Name: system/usr/srec/en-US/embed_phone_nn_model +SHA1-Digest: MVunhgmY/DSaOzfB2Xc+O/LHNcs= + +Name: system/etc/legal/leaflet/uk/SIM-card.html +SHA1-Digest: R1yO5W28xgADWnCglSxNyJYui/A= + +Name: system/etc/security/cacerts/81b9768f.0 +SHA1-Digest: 4erTsgDtkF3RUrNOypxOujy6Zeo= + +Name: system/etc/legal/leaflet/ae/Conditions.html +SHA1-Digest: hWmE9vAPl5+cRGYeKrXmAcqS6WM= + +Name: system/etc/legal/leaflet/cf/GPSLocation-based-functions.html +SHA1-Digest: 9/8jK95ooiDw37dRveZf6qn25f8= + +Name: system/app/SecureClockJava.apk +SHA1-Digest: 2I+6OzXCDMTAex4eeKVC53YoHGE= + +Name: system/etc/permissions/SemcGenericUxpRes.xml +SHA1-Digest: zy+1P8STvYljIUzLlAaa9PRlaWQ= + +Name: system/media/audio/alarms/mechanical_bell.ogg +SHA1-Digest: DXQQgXPb3H+h1aHtr2W2/vaLo8s= + +Name: system/app/SmartSearch.apk +SHA1-Digest: i9Ju0trbJLuA+JnaYcdDDtmEe4k= + +Name: system/bin/sdcard +SHA1-Digest: yIeFjhcCnEFSi/PIfAgY6ZTYbQQ= + +Name: system/etc/legal/leaflet/vi/Warning!.html +SHA1-Digest: 3elL7a7mjXLjFFx/pnHSJJQV0gU= + +Name: system/etc/legal/leaflet/vi/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: INOX4l4tl4wf0EZng+KvtAqery4= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Service-and-support.html +SHA1-Digest: gAQFioh9BWza29IVvxOoQg9qLj4= + +Name: system/media/pictures/plitvice_lakes_01.jpg +SHA1-Digest: 02h4vPMlRPfypcg6yXknD06t+lk= + +Name: system/app/FBMusicLike.apk +SHA1-Digest: doj8Naq9MbLbM42fe6f65fFi6ZM= + +Name: system/app/Phonesky.apk +SHA1-Digest: MLQuFxN69wbMD4o9SSz5sPtcsNE= + +Name: system/etc/security/cacerts/a3896b44.0 +SHA1-Digest: ZLbceCx+C2qAgw+u1XPHRG5oKOw= + +Name: system/lib/libennjubase3.so +SHA1-Digest: hJb70vSMZlnGubuE9TcQKOMGaiY= + +Name: system/vendor/overlay/com.sonyericsson.home-res.apk +SHA1-Digest: geJ2VTKHSPvKavRqGGd+2KeaLBM= + +Name: system/etc/legal/leaflet/mk/Precautions-on-Memory-Card-Use.html +SHA1-Digest: EVBEIKc3qzRj4NxMbQxjIKoVHQA= + +Name: system/app/UsbTransportService.apk +SHA1-Digest: 5ax93GspeplHtb4hQgsUkL0ljoY= + +Name: system/etc/legal/leaflet/ae/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: y3H5JGyUjgk827MkQkG5rSP9xhc= + +Name: system/etc/legal/leaflet/ms/Emergency-calls.html +SHA1-Digest: Y0t9aIjEtUD3cQpqkpUy31xMknA= + +Name: system/media/audio/ringtones/Scarabaeus.ogg +SHA1-Digest: cPBo4kY8XQwm+MysA4owD0Dej/0= + +Name: system/bin/crda +SHA1-Digest: KRhHBC8cUl1LBgVDFnxpE7QxmB8= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_white_small.jpg +SHA1-Digest: abCqRx9BSBOcFOgN5pbFFVKa+hs= + +Name: system/etc/legal/leaflet/hr/Antenna.html +SHA1-Digest: 1Q7OjB4izvE51LcBzwvAlgmlVHs= + +Name: system/etc/legal/leaflet/zh-HK/Important-information.html +SHA1-Digest: ptXHm2WD3P5GjwY9l035jqLJ8w0= + +Name: system/etc/legal/leaflet/hi/Flight-mode.html +SHA1-Digest: FqqBpUR2JdmyAWd6TxGMvH3idNI= + +Name: system/etc/legal/leaflet/en-PB/Conditions.html +SHA1-Digest: Z1esOsesoPhIGoen3EaeyM6HCD8= + +Name: system/etc/permissions/com.sonyericsson.android.omacp.xml +SHA1-Digest: 91syjwCAYtl5qwwlvTTE4CYBHos= + +Name: system/etc/legal/leaflet/ko/Loudness-warning!.html +SHA1-Digest: yjUzw3Co1uKhfFsdBN+p/j1sB7Q= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blown_dandelion_hd1080p_small.png +SHA1-Digest: Agzf3ShTR2dp8372jDMWB7a1bKo= + +Name: system/etc/legal/leaflet/pb/no-title.html +SHA1-Digest: oJZMzmGUQC4IRV6c8kr84zKTysE= + +Name: system/etc/permissions/android.hardware.usb.accessory.xml +SHA1-Digest: FqpJrpvkKQ0UpylOSdp44H4smXo= + +Name: system/etc/legal/leaflet/fa/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: WIce3NaaGJuESUYCmQiKYn01u68= + +Name: system/etc/legal/leaflet/images/arrow-rtl.png +SHA1-Digest: TruEoE8TjT7Wj8css/vMvd+1Fvg= + +Name: system/media/audio/notifications/SpaceSeed.ogg +SHA1-Digest: xkyifT2mJnaopxECgJoFmq76mWM= + +Name: system/etc/legal/leaflet/xl/Conditions.html +SHA1-Digest: tcobVTlqMvqRof/CH5EancqAW0c= + +Name: system/lib/libDivxDrm.so +SHA1-Digest: syiNgaJk42ARwTDUtKdcaK7I9hY= + +Name: system/etc/legal/leaflet/ms/What-we-will-do.html +SHA1-Digest: 7tH7yGAWxA0TlxHbwLRV8rgPWEc= + +Name: system/bin/mtpd +SHA1-Digest: Ht32V/kWtKVkn9jGwF9ygWEWiFw= + +Name: system/lib/libchromeview.so +SHA1-Digest: d4Aw+64izqiNqkQXMx7gvOYIiaM= + +Name: system/etc/legal/leaflet/zh-CN/Malware.html +SHA1-Digest: 6qOaNf4FjcQlTdfYNdIGnKREEzc= + +Name: system/etc/legal/leaflet/zh-TW/Emergency-calls.html +SHA1-Digest: WQa5GmBNrM5vLXQIgVLtNs/p04E= + +Name: system/etc/firmware/apps.mbn +SHA1-Digest: UFw/xcELguuoR1rNvT57nD1xPKw= + +Name: system/vendor/camera/SEM13BS0_WV570.dat +SHA1-Digest: 1sFo94HFRBbUhj3Vq27vMIkWJ4U= + +Name: system/etc/legal/leaflet/ru/Important-information.html +SHA1-Digest: 48BoRgYP4Yvlbs8JdSkg988yl4s= + +Name: system/etc/security/cacerts/635ccfd5.0 +SHA1-Digest: fEdbGydFBhoJjXNJXzEVa18unJ0= + +Name: system/media/audio/notifications/Fluorine.ogg +SHA1-Digest: RZ4wWtWzdakZ0zKdKO9HRjN0iyo= + +Name: system/etc/hw_config.sh +SHA1-Digest: LOi512bQqSldvkE3YbGjYm3wdNw= + +Name: system/etc/legal/leaflet/zh-HK/Publication-number.html +SHA1-Digest: NTW7eJa6uFnPI83S4jYAas5wx/c= + +Name: system/etc/security/cacerts/2e8714cb.0 +SHA1-Digest: B52F0B9cohH697PhOwRGCzELdTw= + +Name: system/etc/legal/leaflet/uk/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: EMNDwWJtbmY6AGHK7rNtNulT2Ac= + +Name: system/lib/libSSEPKCS11.so +SHA1-Digest: PSZWZOew/KQPp76Eat09mpwHaJ4= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Guidelines-for-Safe-and-Eff + icient-Use.html +SHA1-Digest: eNKIY4f2QZOkhIBo1dIG/6NCcLI= + +Name: system/media/audio/notifications/signature.ogg +SHA1-Digest: iZvkKp2bYFeV605ntmNQYkAzpAc= + +Name: system/etc/permissions/android.hardware.location.gps.xml +SHA1-Digest: ydG3KogqmSduNEKpFzBYmpQFX1c= + +Name: system/etc/permissions/com.sonymobile.facebook.proxy.api.xml +SHA1-Digest: zkEeAbikMh2/pbffWVZIRmtCzmI= + +Name: system/etc/UserPolicy.xml +SHA1-Digest: CvEUPUijPM3+SqQSABPyEGnv4Ds= + +Name: system/framework/com.sonymobile.mediacontent.jar +SHA1-Digest: RzvsnBrh3XlWtCSuDmq0nNG91Ho= + +Name: system/media/audio/ringtones/NewPlayer.ogg +SHA1-Digest: 25CatlY7tgx/w1kCPh/2CXN3ls8= + +Name: system/app/PackageInstaller.apk +SHA1-Digest: 8mzUgZjjPV80uDIQro90187BaYI= + +Name: system/lib/libcsd-client.so +SHA1-Digest: HTszt+QYB5eQo8F0ANDzPKwiHIQ= + +Name: system/app/SemcEmail.apk +SHA1-Digest: 4Mx9SMOFEst7aAi9gfVw02vPJHQ= + +Name: system/etc/security/otacerts.zip +SHA1-Digest: O618G7Y+q/ITy6dBHOkv/bteOB0= + +Name: system/app/Skin1.apk +SHA1-Digest: 89yngsAQZqEx2m68N8RP1yvd7o4= + +Name: system/etc/legal/leaflet/images/LEGAL-CHILDREN-low.jpg +SHA1-Digest: KO+APkwQPh9krMeJv97cTVmIhv8= + +Name: system/app/SimContacts.apk +SHA1-Digest: LdrZJB3Kk8dFN+qdnujV3nOMCZE= + +Name: system/etc/legal/leaflet/fr/Conditions.html +SHA1-Digest: xxUYkMH6SsMYy/ytpcHRXGI4060= + +Name: system/lib/bluez-plugin/audio.so +SHA1-Digest: SbxpHaI0UOew7y7W7JfoeSWn/ac= + +Name: system/lib/hw/audio_policy.default.so +SHA1-Digest: GM4oCiSgXHisdX98N7T1Ms0dXWc= + +Name: system/media/audio/ringtones/Backroad.ogg +SHA1-Digest: aZLwTqcBx2p0u1zbo93/JP5MMNg= + +Name: system/etc/legal/leaflet/vi/Precautions-on-Memory-Card-Use.html +SHA1-Digest: DrndtdgrzuS9MKXpoyRXv1nen1o= + +Name: system/usr/keylayout/qwerty.kl +SHA1-Digest: uVJBFR9M2iCzhnp+A4rvNqkHFMY= + +Name: system/lib/libstagefrighthw.so +SHA1-Digest: Cpj4bysXshhtZjkBGTHWvhIS084= + +Name: system/etc/legal/leaflet/images/CE-ALERT-low.jpg +SHA1-Digest: 5URDQOYfxBb5RujAQz3r+i1ZQes= + +Name: system/lib/libmtp.so +SHA1-Digest: eFhmKTBEoUFvQVDS8SrAKIp59Vw= + +Name: system/etc/legal/leaflet/images/arrow_turnpage_r.png +SHA1-Digest: nfCa/Y84F7eciJUjlVUulnrfMKU= + +Name: system/etc/legal/leaflet/en/Battery.html +SHA1-Digest: RG3bKCfP0xnuGcwJadp4HjZLsl0= + +Name: system/etc/flashled_calc_parameters.cfg +SHA1-Digest: NkSvafqmUsN9b3TwHcvZ2JeSlqc= + +Name: system/app/SomcConnectivityCenter.apk +SHA1-Digest: plP5vNukCuv2Xg4DodTHnP/e3vE= + +Name: system/lib/libstagefright_soft_vpxdec.so +SHA1-Digest: QzsBOpDHoqbnPOBVjORY3uTl8Q0= + +Name: system/etc/legal/leaflet/hi/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: ymaAhNbWF/WnMxzjzkeiAXhFg9o= + +Name: system/lib/liboemcamera.so +SHA1-Digest: 4i7AOkGHtiCQ7SIfr6pAXmLcyX4= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_green_small.jpg +SHA1-Digest: Hew7+jdbIrFDPWzb4DemOnWR9ug= + +Name: system/app/livewaremanager.apk +SHA1-Digest: zFSchRduhPh4MvcoSgLcOpC7q1Y= + +Name: system/lib/libmtpip.so +SHA1-Digest: K9n6caVl73nHgGN0oYMnzyfqtbk= + +Name: system/etc/legal/leaflet/pt/Malware.html +SHA1-Digest: wZwvNNggj2qTagDOEIgX5GC5SoU= + +Name: system/etc/legal/leaflet/fa/Export-regulations.html +SHA1-Digest: 9ZtTDEjPrzxRYVRsC96bFi6wvRA= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Precautions-on-Memory-Card- + Use.html +SHA1-Digest: aPKtTXjxuLAtvgtnekkWOxRpkAQ= + +Name: system/etc/be_movie_setting +SHA1-Digest: sYknIUPVb0r1xnVIdOa2/ATxMMU= + +Name: system/bin/mm-jpeg-dec-test-client +SHA1-Digest: 5SAlIQJeU6d0BI1LoxzHmnh6nlY= + +Name: system/bin/ATFWD-daemon +SHA1-Digest: C7E+3PhXkWgEomMdWYs2+LN+2+w= + +Name: system/media/audio/notifications/pop.ogg +SHA1-Digest: 6sTbo7Uh06jetWu5fHg8e7s7DEw= + +Name: system/lib/libCommandSvc.so +SHA1-Digest: 1rBWmQihmoe/ab+gDmCATzzNv5g= + +Name: system/etc/legal/leaflet/pt/Driving.html +SHA1-Digest: d913zi2hoGAHyJoYEdh/Y5MGon8= + +Name: system/etc/legal/leaflet/ae/Personal-medical-devices.html +SHA1-Digest: 0jroZUapEopmHbQiEqhdu777/M8= + +Name: system/bin/startup-prober +SHA1-Digest: MG5xy5xOKYp4ixLgbi1o4gL8XYE= + +Name: system/etc/legal/leaflet/ko/no-title.html +SHA1-Digest: 88FPE/FtwA2pdNKoufZ38It0f3c= + +Name: system/lib/libpixelflinger.so +SHA1-Digest: 5ruHppIIWg9h+l7NNxGdE2xcj2M= + +Name: system/etc/legal/leaflet/cf/What-we-will-do.html +SHA1-Digest: hjdREbxWxZ0QoAGxxYZoz1m2reo= + +Name: system/lib/libmm-omxcore.so +SHA1-Digest: pqmwQZ0q5qxsoOeHlV65gX2g2/Q= + +Name: system/media/audio/notifications/Proxima.ogg +SHA1-Digest: hPBVi5WarvD9XgSd5TqA3yqXROM= + +Name: system/bin/idd-logreader +SHA1-Digest: 1munqEkLwTR/Is8ViXlCPmwbWDU= + +Name: system/lib/libMiscTaAccessor.so +SHA1-Digest: CWBsNzaiwOZB/pxrzLytudZ+nwc= + +Name: system/etc/legal/leaflet/th/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: HQiO0bWMwbIV+1uiywR8l+WVnSA= + +Name: system/lib/hw/audio.primary.msm8960.so +SHA1-Digest: zrrF5eb16Sv9nqUokV8vvfIwLkc= + +Name: system/lib/liblights-core.so +SHA1-Digest: c/AXaljs1d7TRadpW2YtI5BM7+M= + +Name: system/etc/legal/leaflet/ko/Emergency-calls.html +SHA1-Digest: NitKto/VvtqqOzrKst6/MKXD0dE= + +Name: system/lib/libext4_utils.so +SHA1-Digest: 06hfcxG4jvKdvkcwPvwC+J9D3bI= + +Name: system/lib/libhwcservice.so +SHA1-Digest: pH+8StgxYR1B6OQHT+Sjio2tBcE= + +Name: system/etc/legal/leaflet/en-HK/Malware.html +SHA1-Digest: Jj4063nznEkOZcVp/vbad+bCEog= + +Name: system/lib/libOpenMAXAL.so +SHA1-Digest: MYgmWEVFSGwXoDXDabC91pANHzQ= + +Name: system/etc/security/cacerts/1df5ec47.0 +SHA1-Digest: UujKW9YI89cjOO6uCaBGaKKEdIQ= + +Name: system/etc/legal/leaflet/zh-HK/Precautions-on-Memory-Card-Use.ht + ml +SHA1-Digest: +roi8MV2cEZWUzit6FbUZTt0wzE= + +Name: system/usr/xt9/SEMC_810_r1-3_KKlsUN_xt9.ldb +SHA1-Digest: Fh004MNlWj7JCPXOO6lxVwNacsE= + +Name: system/lib/libmmipstreamaal.so +SHA1-Digest: 6IV3JM2ASHp7gJ2em+/8pEvbbZk= + +Name: system/media/audio/ringtones/Andromeda.ogg +SHA1-Digest: pfrwzBzXZRglq8LxZA9hkjA3imU= + +Name: system/etc/dhcpcd/dhcpcd-hooks/95-configured +SHA1-Digest: 4nJnKMYcH5dEHG6qdisDTLqMAkw= + +Name: system/etc/legal/leaflet/en/Limited-Warranty.html +SHA1-Digest: GP/JRKt3SrIt3qoSfzGjvN+H94g= + +Name: system/tts/lang_pico/en-US_lh0_sg.bin +SHA1-Digest: Cckpd0CD5uEOlqA3HtczRvaOpJE= + +Name: system/etc/legal/leaflet/zh-HK/Memory-Card---legal.html +SHA1-Digest: 2Jx3UU7zBPv1tLDAyRxvzkdMjKc= + +Name: system/media/audio/ringtones/Paradise_Island.ogg +SHA1-Digest: AOrVuisOvS6TsvHo3oMWYNpVEOs= + +Name: system/app/LocationBasedWifi.apk +SHA1-Digest: WhCvv3ggKoQ5UaGz28iI0s6x+ko= + +Name: system/lib/libstagefright_soft_amrnbenc.so +SHA1-Digest: u/sofmApIfrfaibn7guEnXET+qI= + +Name: system/etc/default-capability.xml +SHA1-Digest: H11FUwyYqBLS4p2HqlLXyChBYuM= + +Name: system/etc/legal/leaflet/ru/Protection-of-personal-information.h + tml +SHA1-Digest: qKHbrvozvJS1yNWzujuwWolcBiQ= + +Name: system/framework/SemcGenericUxpRes.apk +SHA1-Digest: OetXZC+ie2mNhWcOfrKAlyblyQc= + +Name: system/etc/legal/leaflet/fr/Malware.html +SHA1-Digest: ZN9I1lDdDQng6NGvWrx4IWwIBp8= + +Name: system/etc/legal/leaflet/ms/GPSLocation-based-functions.html +SHA1-Digest: pGldoC4Yf9JuoIaosaRckO3BB2c= + +Name: system/etc/legal/leaflet/zh-CN/index.html +SHA1-Digest: Wn2z+x3Gpu6BuJPwpOqcB82DIIY= + +Name: system/etc/legal/leaflet/ko/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: jJHsj8poC1QIiMZE0/3yS/+JK7U= + +Name: system/etc/legal/leaflet/ae/Children.html +SHA1-Digest: Obj2R9xoowuLFF1fpxV/R/Duykg= + +Name: system/lib/libqdp.so +SHA1-Digest: HJb18QRo5OuAMlHZ1tpz+/iQVFQ= + +Name: system/etc/firmware/a225p5_pm4.fw +SHA1-Digest: 82vbr/7E6RV9Sq+hRWcvUoX1+ZI= + +Name: system/etc/legal/leaflet/zh-CN/Personal-medical-devices.html +SHA1-Digest: hJuL9w/HLVlSoUkYB07OeStAJNE= + +Name: system/etc/legal/leaflet/ru/Accessories.html +SHA1-Digest: dOLQNSV5vS3uhRcw0VgByZ83sW4= + +Name: system/lib/libdsucsd.so +SHA1-Digest: X2An1gjfapvrjwG2cTA/Ywzh2Us= + +Name: system/etc/legal/leaflet/ms/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: yzTFAFryViFsZiHKRs+Tl1gbv+M= + +Name: system/etc/legal/leaflet/xl/Important-information.html +SHA1-Digest: 5U6n+j3+waUJ1u/LMCdfVAc0Mxo= + +Name: system/app/device-monitor.apk +SHA1-Digest: RzlooPUYsexeQcprHYIK53TgsTg= + +Name: system/app/InfiniteView.apk +SHA1-Digest: DjMPpZyXM3iI3nDaV9pGqOhcHV4= + +Name: system/lib/libdrm1.so +SHA1-Digest: l+73i4kTMvzk0G22QpPhDFexK9M= + +Name: system/app/Videos.apk +SHA1-Digest: 2jsjPnLn17yPPL0mOqjIRbfk94A= + +Name: system/lib/soundfx/libposteffectwrapper.so +SHA1-Digest: /ZY0Ria3cnK7kvdVOMk5oktfMN4= + +Name: system/lib/libOmxEvrcEnc.so +SHA1-Digest: sZKQeL/yZ2xDM3CFwqo79QirPYs= + +Name: system/media/audio/notifications/exemplify.ogg +SHA1-Digest: 1BXrNMOVml46Mfvz0QR28CwQc1k= + +Name: system/etc/legal/leaflet/iw/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: zB1eMDwpcdXXHiIRWHnat0lcmek= + +Name: system/etc/security/cacerts/46b2fd3b.0 +SHA1-Digest: qcEpnsYeagaaeB94Fmlp1prYt3g= + +Name: system/etc/legal/leaflet/fr/Antenna.html +SHA1-Digest: neoN88SPBRhM6Gng1Bg2xerpeBQ= + +Name: system/usr/xt9/SEMC_810_r1-17_FIusUN_xt9_2.ldb +SHA1-Digest: QxbiPEWsCTAJ1rmsZ63piT1zBrk= + +Name: system/etc/legal/leaflet/images/Warning.jpg +SHA1-Digest: GDrvaOvuQpbmkNwj0iB782nZJhI= + +Name: system/bin/qrngd +SHA1-Digest: dYnV1DtxCNrdX1NAK193WjfhwNk= + +Name: system/etc/permissions/android.software.sip.voip.xml +SHA1-Digest: qrhF2jqAj3LTjMn5u0PyAXph4X8= + +Name: system/lib/libmmQSM.so +SHA1-Digest: JWY04ksBDqgmRZU9qo2SQCE2MfE= + +Name: system/media/audio/ringtones/Rigel.ogg +SHA1-Digest: 3lbZ349u5Fe1ltdZj8mkBEU5SFk= + +Name: system/media/audio/ringtones/Perseus.ogg +SHA1-Digest: h8B8pyJDrrn7ZUPPmuqbaPdpZlQ= + +Name: system/etc/legal/leaflet/kk/Loudness-warning!.html +SHA1-Digest: 8+jiblBSG8IJx2iNwNWslr8ywy8= + +Name: system/bin/ping +SHA1-Digest: yJHj07B6JzloKhXijA49u6rLTUQ= + +Name: system/app/GoogleBackupTransport.apk +SHA1-Digest: DcjE3tt+Qbu3UqzTawmcDVvz1so= + +Name: system/etc/firmware/dsp3.mbn +SHA1-Digest: pJ3Kx2QXnnfmkN8eXmrrCG1Kc9U= + +Name: system/media/audio/ringtones/CrayonRock.ogg +SHA1-Digest: DNaxkL8L38L3top7fT1b4bn+POs= + +Name: system/media/audio/ui/Undock.ogg +SHA1-Digest: 6oAdqdqiX5XZktYY3/svgw5ugpM= + +Name: system/etc/security/cacerts/a0bc6fbb.0 +SHA1-Digest: NWKfQevFapMePZRehJiiL3l2b/A= + +Name: system/media/audio/notifications/pixiedust.ogg +SHA1-Digest: Yq+A5vQcS/Crf5p4QWHtzFUzqeo= + +Name: system/lib/lib_dic_ja_JP.conf.so +SHA1-Digest: kS1aLeG6pSQlzxfC4D7i5PthpA4= + +Name: system/etc/security/cacerts/cf701eeb.0 +SHA1-Digest: EJ+vugw2T3Rx/5SHC912B2Lc1AA= + +Name: system/etc/legal/leaflet/hr/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: tO1tFOtolWhN3LCLukbQQOOdyfI= + +Name: system/etc/security/cacerts/67495436.0 +SHA1-Digest: YTT/bqjqefQaDmHNLvdFEV4CLqE= + +Name: system/lib/libext2_e2p.so +SHA1-Digest: 0wPeqy6bc08psCLyzKgYukEbOOY= + +Name: system/etc/legal/leaflet/zh-HK/For-Devices-Supporting-3D-Viewing + -capabilities.html +SHA1-Digest: V0VplE/a2A+q8TV+xaMReGTC0aw= + +Name: system/etc/legal/leaflet/sr/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: sRyi+RC6C8vk0hczXg96HmgGvhA= + +Name: system/lib/libqdMetaData.so +SHA1-Digest: X5iVnNr16iz3L672gVf3RVZ7oMo= + +Name: system/etc/security/cacerts/bcdd5959.0 +SHA1-Digest: mqSe0pzB0HImT/8Q9HI7sCP7FyQ= + +Name: system/etc/legal/leaflet/th/no-title.html +SHA1-Digest: 2d2SvEbtZil6bHju9MJSxvzqqbI= + +Name: system/etc/legal/leaflet/bs/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: 6yKnG8hw4gvwow7Md717oDw03wU= + +Name: system/lib/libsolsengine.so +SHA1-Digest: BskZ+CHQNOAQqIEPAdNOJOi5G1k= + +Name: system/bin/keystore +SHA1-Digest: AN2ysgEXyupCjwLx5tIjOdNhEs4= + +Name: system/framework/com.sonyericsson.video.jar +SHA1-Digest: ygt8D52mg4c8Z016d/KqrdWGhr8= + +Name: system/bin/StoreKeybox +SHA1-Digest: Aas3D1e6IEMQrDxfuntJ+B/xT/U= + +Name: system/etc/legal/leaflet/en/Warning!.html +SHA1-Digest: Kyb7s+0M97Jg4mWhGPgc8PHSjs8= + +Name: system/media/audio/ui/Unlock.ogg +SHA1-Digest: nInzCyBPfHXHVD/BmMynp9KTJDg= + +Name: system/fonts/Clockopia.ttf +SHA1-Digest: iw96Cm9uf/w/SbVQekBynrfv48I= + +Name: system/lib/libfilterfw.so +SHA1-Digest: 6Rozn8qG29ilK9YG+GuUB4fIud0= + +Name: system/app/MusicWidget.apk +SHA1-Digest: QjCSlYm1V8D8xd6tQksHEBewzu0= + +Name: system/media/audio/ringtones/Noises1.ogg +SHA1-Digest: BJIPaOm9XGNRI4oEoey73tBOG6g= + +Name: system/etc/legal/leaflet/hi/Publication-number.html +SHA1-Digest: EQqmQH2KGZi8IO+aJDSlO+L/q80= + +Name: system/etc/legal/leaflet/hr/End-User-License-Agreement.html +SHA1-Digest: /3/S+NlnVlHDnLkhv0v3x6CDtSw= + +Name: system/usr/xt9/SEMC_810_r1-28_ENubUN_xt9_3.ldb +SHA1-Digest: dUlMz/vXj4QWIx5DpiEyIZXGme0= + +Name: system/etc/legal/leaflet/vi/no-title.html +SHA1-Digest: k/eq4NPsCEm71RD/EurrZc/LPEc= + +Name: system/etc/legal/leaflet/iw/Publication-number.html +SHA1-Digest: EJyk3v+qWPlR05ZdmlovqckMhts= + +Name: system/etc/legal/leaflet/fr/Accessories.html +SHA1-Digest: YV2WZmkvbnrpp64JQxT255jF2Pw= + +Name: system/lib/libnetutils.so +SHA1-Digest: vSD3mCHq1gSYExXJwR56O1RUvkM= + +Name: system/etc/legal/leaflet/sr/Limited-Warranty.html +SHA1-Digest: SUI918DHIEvkyE6rgQHYiQvdDUs= + +Name: system/lib/libprotobuf-c.so +SHA1-Digest: ekT2OZBk9HYu3H9Osfz8+Zbj7mg= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Geographical-scope-of-the-w + arranty.html +SHA1-Digest: fbjulWeRTD9pjBmQBLB6KtEIUK8= + +Name: system/etc/legal/leaflet/bs/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: V0i5Ja2rYZjCVBe9+VGdj7ck9Bc= + +Name: system/etc/security/cacerts/23f4c490.0 +SHA1-Digest: V/L3KgnCcIYZZFFbYbX2T0h9s5o= + +Name: system/lib/modules/gspca_main.ko +SHA1-Digest: xiVJlpOK8v3XZWzbcr06r2vDOKY= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Power-supply-(Charger).html +SHA1-Digest: UMjshK+yh0iRQyWvvpUFqojIp28= + +Name: system/app/CdfInfoAccessor.apk +SHA1-Digest: WgdF6MG9TN3o4n97ptTpocgsTZY= + +Name: system/etc/bluetooth/auto_pairing.conf +SHA1-Digest: tnaO9UEqMPCTRNqKh3ESKqyhyG0= + +Name: system/etc/legal/leaflet/iw/index.html +SHA1-Digest: OPNSNcDmVg+HoBHjkf153295Hk8= + +Name: system/etc/firmware/efs2.mbn +SHA1-Digest: MK2Hj/NxTNhg6RIR63iVyr/Hg54= + +Name: system/usr/xt9/SEMC_810_r1-5_HIlsUN_xt9.ldb +SHA1-Digest: OtiND6VUcE3NsJIFcKN41DaLlHA= + +Name: system/etc/legal/leaflet/hr/Protection-of-personal-information.h + tml +SHA1-Digest: kV5qJCFJ8NYR36Qy21QLbwOeekg= + +Name: system/etc/security/cacerts/9d6523ce.0 +SHA1-Digest: w//rjddcx+4ATCiAMsrJludK9w8= + +Name: system/lib/libnjubase1.so +SHA1-Digest: DuP2ssc4C4fqZC6pdjIgOMtrFkc= + +Name: system/lib/libnjcon.so +SHA1-Digest: DZhNRTAenqi5cxlcs081WTMio78= + +Name: system/app/POBoxSknSelector.apk +SHA1-Digest: xI4NombnCUfJ8/QIYBRTdVpsWEw= + +Name: system/lib/libpajni.so +SHA1-Digest: Rbl0/YDqM5mfszURttx6T4MzVsM= + +Name: system/etc/legal/leaflet/in/Warning!.html +SHA1-Digest: XqKNv7GGsTInd3sj4etGjNpWQ7s= + +Name: system/etc/legal/leaflet/en-PB/Export-regulations.html +SHA1-Digest: oSSJYGqV7ZLJwIEYtelViaO/jsQ= + +Name: system/app/VoiceDialer.apk +SHA1-Digest: zSURuxora2MlDa5YZSgQe3jvQ90= + +Name: system/etc/legal/leaflet/ms/Memory-Card---legal.html +SHA1-Digest: 4GEnkVIo8M903IeAqzcz/7PVnx8= + +Name: system/app/SemcSettings.apk +SHA1-Digest: hGEUgo9ZXnlmO7ABKKwUQVGr/OE= + +Name: system/etc/firmware/ta.mbn +SHA1-Digest: jhlONRa+k4ccMpk7+84JrBqeniU= + +Name: system/app/SemcCamera3D.apk +SHA1-Digest: quCB6sbfgQAU4N5ueQ19LWsSxVk= + +Name: system/etc/legal/leaflet/zh-HK/ERROR=0.html +SHA1-Digest: 0xiOuQYX0WmKp4B6/cpI+vSd+P8= + +Name: system/etc/security/cacerts/3c58f906.0 +SHA1-Digest: /+9N6BT7ZtaVjBA7JzJT/bxXV7w= + +Name: system/lib/libvideoeditor_osal.so +SHA1-Digest: LiCj95XIBHPbxtkhtaNEgl8iBmo= + +Name: system/media/audio/alarms/soft_harp.ogg +SHA1-Digest: 6Q+ag2hcYd5YqRMGUJz877gZRXE= + +Name: system/etc/legal/leaflet/images/next.png +SHA1-Digest: l5C2rJzB5rAkdpBb7w3ol/cxYs8= + +Name: system/media/audio/notifications/Cricket.ogg +SHA1-Digest: NpFveOeUG++Fu9AA2dz90yZ52Bs= + +Name: system/etc/legal/leaflet/en-HK/Warning!.html +SHA1-Digest: Kyb7s+0M97Jg4mWhGPgc8PHSjs8= + +Name: system/vendor/camera/LGI02BN0.dat +SHA1-Digest: KzmzKGgLRlTJ2KuB5CzRV70Ss7A= + +Name: system/etc/legal/leaflet/mk/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: RrpezCoJI14cszkXLNKPoevl2Tk= + +Name: system/media/audio/alarms/Alarm_Buzzer.ogg +SHA1-Digest: VtCKqWvleTvqHgGxm4oVDA0RBfU= + +Name: system/etc/legal/leaflet/sr/index.html +SHA1-Digest: C2Hsr3+lD2lT2PFKpuyPpH1TKhg= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/autumnal_lake_hd1080p.png +SHA1-Digest: GyVg1qKc9zBKxsWmg4vomz0R4KQ= + +Name: system/media/audio/notifications/Voila.ogg +SHA1-Digest: Vgp0tlasszURGzqkpv18KW6052I= + +Name: system/etc/legal/leaflet/xl/Emergency-calls.html +SHA1-Digest: 5+DoJ4o8Ruc2YfXU3HuYJ0oQ1FY= + +Name: system/etc/legal/leaflet/images/btn_search_black_BIG.png +SHA1-Digest: OnEJX0bF41/LfpSN2uPhGK8wDZE= + +Name: system/etc/legal/leaflet/iw/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: lWHhYtlG77Zah1r6mgJ1ofdNbKA= + +Name: system/etc/legal/leaflet/fr/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: g5nyn5FgAlgS+2HjzmMZ3xDIiHQ= + +Name: system/bin/drmdiagapp +SHA1-Digest: NFfNHTWI4J851gnc3VVEwvR6B3I= + +Name: system/etc/permissions/com.sonymobile.photoanalyzer.xml +SHA1-Digest: ifyxzV6mIWfBsg0FBOSzngjC4F0= + +Name: system/lib/libmm-audio-resampler.so +SHA1-Digest: jH0s6906PPRShE4QwUipwmnBkV0= + +Name: system/lib/libqmi_common_so.so +SHA1-Digest: jBuoamOOXTMVFujkXnO30Zg6JvU= + +Name: system/app/MagicSmokeWallpapers.apk +SHA1-Digest: k6Jl6iUMs9RFUQuZgvNQNs4Ux2A= + +Name: system/bin/mm-gs-camctrl-test +SHA1-Digest: EsU6ULt/6T0i4P+WFKwKXZutcNI= + +Name: system/bin/bmgr +SHA1-Digest: txVKgTGjXkxUtbIhsor6EUCfLsM= + +Name: system/framework/com.sonyericsson.dtcpctrl_protected_impl.jar +SHA1-Digest: 2/EeN+RbIwoD7THV9TYQ2pMXMd8= + +Name: system/etc/firmware/acdb.mbn +SHA1-Digest: 4zSmnTfzkJp7M1xFinRKxOsVisQ= + +Name: system/media/audio/ringtones/Pegasus.ogg +SHA1-Digest: gzMYeieI02veXiYBae88WxsnSUs= + +Name: system/etc/legal/leaflet/ru/SIM-card.html +SHA1-Digest: 96y7xQMiIVKIqCW9jDp7egjVyc8= + +Name: system/etc/security/cacerts/1dac3003.0 +SHA1-Digest: mgJ5j9kIbAF3wxCvrgctrBj5mEI= + +Name: system/app/OmaV1AgentDownloadServices.apk +SHA1-Digest: uv0wJ7jetLrVD1oZbfUcCtF/cKE= + +Name: system/etc/legal/leaflet/en-PB/Emergency-calls.html +SHA1-Digest: 0A9DmZTbeDA8UuIev91296L6+og= + +Name: system/etc/legal/leaflet/zh-TW/Children.html +SHA1-Digest: cQaIPiD8QM3tY9H2BpCZoH3UazM= + +Name: system/tts/lang_pico/en-GB_ta.bin +SHA1-Digest: UmIj9FeDDTBi+7Zq9uHQFPHB9G8= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Memory-Card---legal.html +SHA1-Digest: GQnCAtOtbv49C8ciRyue2e1cuD4= + +Name: system/etc/legal/leaflet/fr/Memory-Card---legal.html +SHA1-Digest: 2WtEe+J8i9muYPRdqO1naH+qjUc= + +Name: system/etc/legal/leaflet/ms/Accessories.html +SHA1-Digest: JjKYurF4ZGX8VeLHNxwX7Mx6skk= + +Name: system/etc/permissions/platform.xml +SHA1-Digest: mkqKZh7vNKCNmJo7Ovn/AUXxv8k= + +Name: system/etc/legal/leaflet/cf/Children.html +SHA1-Digest: GPDMr9q6OxwoCKq+LgpNwCTt220= + +Name: system/etc/legal/leaflet/th/Emergency-calls.html +SHA1-Digest: zfJwoBDYap+ZfD84ALTC/KDv09Q= + +Name: system/etc/security/cacerts/c3a6a9ad.0 +SHA1-Digest: fLZHDOpbrGZWvLkuE3qgKE8NxuU= + +Name: system/lib/libaah_rtp.so +SHA1-Digest: 0yb2VmQ/P3ZNn+DEHyMyiJRypLk= + +Name: system/etc/NOTICE.html.gz +SHA1-Digest: Kh8oJxedHVRSSKAW8BgLcC03ykM= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Emergency-calls.html +SHA1-Digest: 0A9DmZTbeDA8UuIev91296L6+og= + +Name: system/lib/libstagefright_pf.so +SHA1-Digest: UMazg8iTYNr8te0gFwbjHJsrfiY= + +Name: system/etc/legal/leaflet/in/Memory-Card---legal.html +SHA1-Digest: z/CzVYGYStwLLqsu7sx31/boGVI= + +Name: system/etc/legal/leaflet/hi/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: kDbhFZ2XVFOHzLxZmJnOu2V70Eg= + +Name: system/media/audio/ringtones/BOOTES.ogg +SHA1-Digest: KHj6/cq+UWMkO2FV7wj65FW2CFU= + +Name: system/etc/legal/leaflet/in/Publication-number.html +SHA1-Digest: FDvnhYrVg9BFDYwGBgh7YVmUk6A= + +Name: system/media/audio/alarms/pond.ogg +SHA1-Digest: 8J8SvXreVLNGmJIx1d7xJIJeEEI= + +Name: system/lib/libksn.so +SHA1-Digest: h+3yqkmXLex5BbXoFuXI+R6pdbU= + +Name: system/etc/legal/leaflet/zh-HK/Guidelines-for-Safe-and-Efficient + -Use.html +SHA1-Digest: jllT1BwuYFGMsu8+QdPtCN7uPfE= + +Name: system/media/audio/ringtones/magnifico.ogg +SHA1-Digest: clePtjC4EL2jyE7FQu/APa3n+a8= + +Name: system/media/audio/notifications/luxury.ogg +SHA1-Digest: x8+k2Xte/JLK74AInqXRMIKkdtA= + +Name: system/etc/legal/leaflet/images/Orange-logo.jpg +SHA1-Digest: t188UPhGbhRgxeG3hitEAchNNLU= + +Name: system/etc/legal/leaflet/en/Flight-mode.html +SHA1-Digest: d8F+bZb+q0+0WbYqCubVFy8Y+GA= + +Name: system/etc/legal/leaflet/ru/no-title.html +SHA1-Digest: Wd6ep50nNYpfMl2JGQOfjxSBOfE= + +Name: system/lib/libETC1.so +SHA1-Digest: DisCtmBA8J/88Xn3Y+OY7EZXTvg= + +Name: system/media/audio/notifications/F1_New_SMS.ogg +SHA1-Digest: CJJKBUbpfCwTi++7C7Jvf5hbJ2Q= + +Name: system/etc/legal/leaflet/zh-CN/Children.html +SHA1-Digest: rLgVZqVkDCyBzempdcaURHQRTEU= + +Name: system/media/audio/alarms/rise_up.ogg +SHA1-Digest: HEL9F0+HtUyeQ9q8SndNdcWnFZM= + +Name: system/etc/legal/leaflet/pb/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: MS3u9SK5ecJAA4J8gWWoWRTBK/0= + +Name: system/lib/lib_get_rooting_status.so +SHA1-Digest: 5Zx/0YjAWqUa3HqJujQHUn2RAfM= + +Name: system/media/audio/ringtones/Zeta.ogg +SHA1-Digest: vNKdJVdJ26xuYppJBzSipAuWoIU= + +Name: system/lib/libmmiipstreammmihttp.so +SHA1-Digest: 29M93RpI7CxCS8FB874xnSEpmB0= + +Name: system/lib/libvideoeditor_core.so +SHA1-Digest: fiBVPGASKVTlenQuosP8LllDvRY= + +Name: system/bin/thermald +SHA1-Digest: xJX9eQhHbCemB4KGgpX/cnRVeNs= + +Name: system/lib/libexpat.so +SHA1-Digest: CIai+dbiAT4X2hD/OBIyBmnPXQY= + +Name: system/etc/legal/leaflet/sr/Accessories.html +SHA1-Digest: FhoCxhinaQ/fhcq7zcJXPKG/fuY= + +Name: system/app/SemcContactsProvider.apk +SHA1-Digest: k9pGwrGY13FHS4YzLyNRjS2bwcE= + +Name: system/lib/libcameraextensionclient.so +SHA1-Digest: TR5WYqY3Aw+EKNFDVjpvrToSD/Y= + +Name: system/etc/legal/leaflet/ko/Children.html +SHA1-Digest: 6bcHHK0tRIMInVDE5bGCyW6Nmd0= + +Name: system/vendor/pittpatt/models/detection/yaw_roll_face_detectors. + 6/head-y0-yi45-p0-pi45-rn30-ri30.5-v24/full_model.bin +SHA1-Digest: zd4aqRFsrWVCg9MMHAQMpm8tWyY= + +Name: system/bin/ndc +SHA1-Digest: ptQhUZJiNw0K/NDHJqcnvlxNh0E= + +Name: system/lib/libsqlite_jni.so +SHA1-Digest: 7wxca+iSFexD8BXG8ula5zZ5P3Y= + +Name: system/etc/legal/leaflet/hr/Limited-Warranty.html +SHA1-Digest: oJ33IdYNMNBLhXlP6kQycZjLf4k= + +Name: system/lib/libdrmframework.so +SHA1-Digest: N7RWeqG2evqRe46+1NvV8EQvkFA= + +Name: system/usr/keylayout/cyttsp-i2c.kl +SHA1-Digest: qI/SceIP231R6Br3C4L12AyJTho= + +Name: system/etc/legal/leaflet/sq/Conditions.html +SHA1-Digest: ADn7z8yZBuJl4L7CxJHU0SEVStw= + +Name: system/etc/permissions/com.sonyericsson.uxp.xml +SHA1-Digest: jgbolUmXitEXC77KHSGeHdNofak= + +Name: system/lib/libandroid_runtime.so +SHA1-Digest: oa0tMKy092xfVpbKimYP+jIOXr4= + +Name: system/lib/libgabi++.so +SHA1-Digest: 5XuI+2FjNoarhaQBX0/mDHFI2gk= + +Name: system/etc/legal/leaflet/hi/Conditions.html +SHA1-Digest: odQev/pU3HBOZhxqsk6ci741rxA= + +Name: system/media/audio/ringtones/LoveFlute.ogg +SHA1-Digest: pFizy1Z0ZkRaHi3MkgwVV3sVuCw= + +Name: system/etc/legal/leaflet/ru/Antenna.html +SHA1-Digest: RzCPV0aAGA0wjyqd8gkQ7dILMmo= + +Name: system/etc/firmware/tzlibasb.flist +SHA1-Digest: DMyS5VKS3HwoKan2hAi68CEhQkU= + +Name: system/media/audio/notifications/whisper.ogg +SHA1-Digest: VGIApgjd0tJuX+nbjfypKGAQQnk= + +Name: system/framework/com.sonyericsson.dlna_impl.jar +SHA1-Digest: ZOb9n9IIomju+Cxh/iIKrL3RQwk= + +Name: system/etc/firmware/wcnss.flist +SHA1-Digest: dGiuLsg4UjfnRHej6yDgRBdXF9M= + +Name: system/etc/legal/leaflet/hi/Limited-Warranty.html +SHA1-Digest: rQ+KAE9ITmakdSRChbpx6vXnj48= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Warning!.html +SHA1-Digest: Kyb7s+0M97Jg4mWhGPgc8PHSjs8= + +Name: system/etc/firmware/dsps.mdt +SHA1-Digest: YfeyFaNrFSuTiaVgL0XGzW3Q5P0= + +Name: system/etc/legal/leaflet/hi/Driving.html +SHA1-Digest: 8I25aRmRAJCrsgtnMYk9s2ZbnzA= + +Name: system/etc/legal/leaflet/fr/What-we-will-do.html +SHA1-Digest: A0dQ1ECz2MRoje4XSiRibwwnL+s= + +Name: system/app/OneTimeInitializer.apk +SHA1-Digest: KB5L+p6/usQesQPg26S33AyDRjk= + +Name: system/etc/permissions/com.android.location.provider.xml +SHA1-Digest: LTdinhy89ODvYRYxUm8yTOSA5VM= + +Name: system/bin/ptt_socket_app +SHA1-Digest: tV8bfZ/2TBcvN5/IyhZotOs8Xvc= + +Name: system/etc/permissions/com.sonymobile.cameracommon.xml +SHA1-Digest: DRgCt2kj1pONsNZhOrTHLLWUx18= + +Name: system/etc/legal/leaflet/zh-CN/Flight-mode.html +SHA1-Digest: nUvJrgsBMZhjb7Z3eBo/Waa9+g0= + +Name: system/bin/mksh +SHA1-Digest: uAqr1VUPvWm8laMl+LHecPXZW0E= + +Name: system/vendor/overlay/com.android.providers.partnerbookmarks-res + .apk +SHA1-Digest: Xo1krkenqQotMIH+GLPPwx9Ypec= + +Name: system/etc/legal/leaflet/pt/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: EWpU5BnjSi/uSq5FV2YsYi3oU5A= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/red_rock_hd1080p_small.jpg +SHA1-Digest: PE23BSjVT5K0GWnqMlClHOdfgTE= + +Name: system/lib/libalarmservice_jni.so +SHA1-Digest: ZJKDAPqN6KX4+hLwWMe0xzyvvUA= + +Name: system/media/audio/ringtones/Shes_All_That.ogg +SHA1-Digest: uBTEc31R1CJoKBCHSn20tvxXHf4= + +Name: system/lib/libhdminativecontrol.so +SHA1-Digest: ZqjmvrFX+ynfQApVUI9BnvS1eF4= + +Name: system/lib/libm.so +SHA1-Digest: OmrEBW5pnXLTquKcOd7mAcs2wvg= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/SIM-card.html +SHA1-Digest: p/1F/Gfr4z9Nd5EBEVI3mBU1AeQ= + +Name: system/lib/libdrmdecrypt.so +SHA1-Digest: VAmRx3FfOAByNMWyoM02oLe4Bjk= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Publication-number.html +SHA1-Digest: 00c4G25lvmo7Sndfl14TM4gIW7Q= + +Name: system/etc/legal/leaflet/ms/Personal-medical-devices.html +SHA1-Digest: xu7Pl/MNqb0UP4zdlOD6zjr3qco= + +Name: system/app/GpsSatellitesNotification.apk +SHA1-Digest: xec46zWoojnfOIefY+M4qdexgMQ= + +Name: system/etc/legal/leaflet/ms/Children.html +SHA1-Digest: 7u1xoCxZ7/hAntlu8x1n8rXWVBo= + +Name: system/tts/lang_pico/de-DE_ta.bin +SHA1-Digest: 4+D9z4UNIRauW5tuRA/6Z8gjRZo= + +Name: system/media/audio/notifications/Rubidium.ogg +SHA1-Digest: GiczGNYvVrxjRQ1sOGOC2O7kAwQ= + +Name: system/lib/libmm-abl-oem.so +SHA1-Digest: T5Kz8j9AzVbYJDX1MZT0N/T1IzY= + +Name: system/usr/srec/en-US/offensive_word_normalizer +SHA1-Digest: RIsPYtNeY/zpfXhd80jm+FtPTEk= + +Name: system/etc/legal/leaflet/images/button_search_active.png +SHA1-Digest: Pv1XPF1xQax2D6uOP5OAOsYzq6Q= + +Name: system/lib/sysmon/sysmon_corelimit.so +SHA1-Digest: rYxsYMgzJ/ycyeIoXkJDXp2KgvA= + +Name: system/etc/permissions/com.sonyericsson.idd.xml +SHA1-Digest: owJoZjNigjbxYrZIvXECPSXD5xc= + +Name: system/media/audio/ringtones/Centaurus.ogg +SHA1-Digest: kPckxh8VjzZSBNILr0rxlQGP1B0= + +Name: system/media/PFFprec_600.emd +SHA1-Digest: Lp6CpxDd7/os6xa7v/mAzUATs9g= + +Name: system/media/audio/notifications/Beryllium.ogg +SHA1-Digest: 5m5rHllimjB64tHq+fBBvKvOiz8= + +Name: system/etc/firmware/tzlibasb.mdt +SHA1-Digest: BHC389CfWX2qZGdxzaOJnIMDzyg= + +Name: system/lib/libcamera_clientsemc.so +SHA1-Digest: fOWY3j2byamOeTAQrIZmy8hX5ro= + +Name: system/etc/legal/leaflet/hi/Important-information.html +SHA1-Digest: cW1ALXZ0Z1fpKc5YcMbMSJLPJ9k= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Guidelines-for-Safe-and-E + fficient-Use.html +SHA1-Digest: bQLOW8C8ZQZp2FV1RXYl3ybzhc0= + +Name: system/etc/legal/leaflet/hi/Antenna.html +SHA1-Digest: CgprmEEgdNuPYbaaTmA+o3AFo2I= + +Name: system/lib/libjavacore.so +SHA1-Digest: M/I5Q+30ZudgesFq4cXaisKHQeo= + +Name: system/etc/legal/leaflet/sr/What-we-will-do.html +SHA1-Digest: q5ZHIaYZHnqXnVO+BgLxuZ8YuxU= + +Name: system/etc/legal/leaflet/ae/Precautions-on-Memory-Card-Use.html +SHA1-Digest: NX615AosJvpLGbmaLnL7TNxb880= + +Name: system/lib/modules/mcdrvmodule.ko +SHA1-Digest: khn0095GPm96KNKMB/tRU8D1aPg= + +Name: system/etc/security/cacerts/7651b327.0 +SHA1-Digest: j/CjK50zYtj/xzaZFhptUghXaPk= + +Name: system/etc/legal/leaflet/mk/End-User-License-Agreement.html +SHA1-Digest: VhQwhYR9H6mkDpu3BkK6ITYeP+8= + +Name: system/etc/firmware/cyttsp_8064_mtp.hex +SHA1-Digest: v2y6EtoxShP10hl6XzAJH3N0zIo= + +Name: system/etc/legal/leaflet/fa/Power-supply-(Charger).html +SHA1-Digest: xyqGFf/EafBmB7SwNt4RfD6BQZ4= + +Name: system/etc/legal/leaflet/uk/Malware.html +SHA1-Digest: 2AHl9c0K1opCNOqjkAhMXvCr/r8= + +Name: system/etc/legal/leaflet/en-HK/Sony-Ericsson-Consumer-Web-site.h + tml +SHA1-Digest: H0aYZ6j/qq2P6xaerpHC0YMxgwU= + +Name: system/etc/security/cacerts/60afe812.0 +SHA1-Digest: q2HXyTTJrYXtlcX9A4n+Smodlco= + +Name: system/usr/srec/en-US/hotword_symbols +SHA1-Digest: 7qeVa2EIhFOtRUo55/SFRc4EIzE= + +Name: system/etc/legal/leaflet/uk/Important-information.html +SHA1-Digest: yh/f8Qvu5GqYtV854yOlVzcyQSo= + +Name: system/vendor/pittpatt/models/detection/yaw_roll_face_detectors. + 6/head-y0-yi45-p0-pi45-rp30-ri30.5-v24/full_model.bin +SHA1-Digest: 759/0Df6xJs4gqdB7a/kA81yX44= + +Name: system/etc/legal/leaflet/ko/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: Rr07+BGOfwPeUaS+FOk2pCPkhfs= + +Name: system/lib/hw/power.default.so +SHA1-Digest: KocExwwT9Wlsko41O/XG5hcJC1M= + +Name: system/app/PhotoSlideshow.apk +SHA1-Digest: y05B8uwiUlvKNQnaqm8bgjq8ECc= + +Name: system/lib/soundfx/libfnrwrapper.so +SHA1-Digest: Zn8if3VFGE0x/gk321KJZbF00PM= + +Name: system/etc/legal/leaflet/bs/Malware.html +SHA1-Digest: bbPZtT39hUyeEd7F0Mkk8ZivUV4= + +Name: system/lib/libmmwfdinterface.so +SHA1-Digest: e1K+IdYrlEgxRKnBxK3zQMt0ZQ8= + +Name: system/app/SemcCameraUI.apk +SHA1-Digest: sCzFOhM6Bk/KhRaBg3k5K2678Ug= + +Name: system/bin/mm-mpo-enc-test +SHA1-Digest: 4iHFihXR9n3FlEQJqToWG9Pa0rc= + +Name: system/etc/firmware/a300_pm4.fw +SHA1-Digest: vjWLS73T7lCRmNeNc5SkitlL3zE= + +Name: system/bin/taimport +SHA1-Digest: M6sFHCukzOeed+guND3FYnkoMsY= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/green_jungle_hd1080p_small.jpg +SHA1-Digest: ZTpLudvwwKXA5QoPdJUl8sPGZZk= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/butterfly_and_wildflower_hd1080p.png +SHA1-Digest: lS7OmvqjpGFBJjJgdvQBEI+1nK8= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor5.so +SHA1-Digest: seMsDXx+T5WjM558r8jqOcSfNdQ= + +Name: system/etc/legal/leaflet/pb/Our-warranty---12.html +SHA1-Digest: qhF5YQZt+mPnKcc1S46L+ESdiTg= + +Name: system/bin/port-bridge +SHA1-Digest: 9i+YlOH3X2nZUQpp11725ngMzJw= + +Name: system/app/SemcPhotoEditor.apk +SHA1-Digest: bcjVJkF3DV/mZEh63y0V5TVXeXE= + +Name: system/etc/legal/leaflet/hr/Publication-number.html +SHA1-Digest: GRwElPOJ7EA8ipEwcrK0iOZCQao= + +Name: system/etc/legal/leaflet/zh-HK/Personal-medical-devices.html +SHA1-Digest: y5taixz/5W3VCKSPRBLl9OyG36I= + +Name: system/etc/legal/leaflet/cf/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: WIEhz3U9wMkJs6lXFhCRsdnQMy4= + +Name: system/lib/libasahi_playnow_red_brown.so +SHA1-Digest: 1ouRQw6CIdzx0NvsUcBfP0tjyw8= + +Name: system/lib/libstagefright_enc_common.so +SHA1-Digest: +uGp308y3njBj1+q+Ez+d+qGcBI= + +Name: system/lib/libwnndict.so +SHA1-Digest: U0nBnb41XZzufUh5uhWozy35x+o= + +Name: system/etc/legal/leaflet/images/form_search.png +SHA1-Digest: CkqdpGt9fRQQm7ZWIbJqHqkcigw= + +Name: system/media/audio/ringtones/classic_phone.ogg +SHA1-Digest: gszERLWzrZP7qPtWC31Mf7Snz1s= + +Name: system/media/audio/camera/common/af_success.m4a +SHA1-Digest: NHyr5tdmSvbSljyqVAsHnvt7vsk= + +Name: system/etc/legal/leaflet/bs/Service-and-support.html +SHA1-Digest: PBcEPGiEtXmcdPdva2kn/GCF7l4= + +Name: system/media/audio/notifications/Electra.ogg +SHA1-Digest: 88ErM6vz/TvAPEroY/DRxkXBI4s= + +Name: system/etc/legal/leaflet/cf/Protection-of-personal-information.h + tml +SHA1-Digest: /+T54E48EDdXVaAHX5Jzek/iMk4= + +Name: system/etc/legal/leaflet/cf/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: 2k98slKaYZH/t8Jpu/nkagK55NQ= + +Name: system/etc/legal/leaflet/en-PB/Driving.html +SHA1-Digest: 2RJnLg5mchEeHykobz1nE4TYoe0= + +Name: system/semc/chargemon/data/non-charging_animation_02.png +SHA1-Digest: NyAr/qQtiSea5RroR4bg0xTnby4= + +Name: system/etc/legal/leaflet/ar/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: 6SxcLV1Yv3wALsTEjAl5EDFdYkI= + +Name: system/fonts/MTLmr3m.ttf +SHA1-Digest: Btnmblk0kwRaZjo2AkofmEVA7Os= + +Name: system/lib/libsysinfo_modules/clearpad.so +SHA1-Digest: /nEbiwhjk9QH9BVG+/VKQIKik6c= + +Name: system/etc/security/cacerts/a15b3b6b.0 +SHA1-Digest: 8ZOob41YQP9QUVzJd/7ktNxnMRw= + +Name: system/framework/qcrilhook.jar +SHA1-Digest: y/K5eE3mXrYxjnS5KvT7KOOm8TI= + +Name: system/etc/legal/leaflet/iw/Limited-Warranty.html +SHA1-Digest: EldLdovm8p7SjQDNn94tlxDHfOs= + +Name: system/etc/legal/leaflet/pt/Publication-number.html +SHA1-Digest: U5kkj5Lcy//NX4pQ516QubJ4jto= + +Name: system/lib/libstagefright_soft_amrwbenc.so +SHA1-Digest: RNU5xdZToFAiDBmRoLjN6xFXrYY= + +Name: system/media/video/Sunset.480p.mp4 +SHA1-Digest: zJCGDbPlXN5dnGe3zVlsydKC8CQ= + +Name: system/media/audio/notifications/message_alert.ogg +SHA1-Digest: BINBdtX5v8QMfsuN9Qs8hDr8cz8= + +Name: system/etc/fast-dormancy/fd_custm_conf.txt +SHA1-Digest: z/f/b0COCDH6Gp/+u6wFSYXbfNE= + +Name: system/etc/legal/leaflet/mk/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: VYfc837PcZAMVqgSdCxQ1i5ElH4= + +Name: system/lib/libOpenSLES.so +SHA1-Digest: Nlrm0ZmW33UuQ232fA7tPULKFGU= + +Name: system/etc/legal/leaflet/ae/Driving.html +SHA1-Digest: kze+cOGbyjxPJXA40cgSvmOdvwM= + +Name: system/media/pictures/iguazu_falls_03.jpg +SHA1-Digest: uqF7IoWwFhJudwE83smbvGvplvA= + +Name: system/lib/libhwui.so +SHA1-Digest: N2raQhfVdOcbmRqNhyzVUEhg/8g= + +Name: system/lib/drm/libfwdlockengine-semc.so +SHA1-Digest: IU1TLV6b3e4hPmEfdollqaZigyM= + +Name: system/lib/libsrec_jni.so +SHA1-Digest: 7Sz04gHgi30KPCor7Ubm+Bi176w= + +Name: system/etc/legal/leaflet/uk/Export-regulations.html +SHA1-Digest: XO8R8u8raMKnE7tfdo3QzFkoJN4= + +Name: system/etc/legal/leaflet/ru/GPSLocation-based-functions.html +SHA1-Digest: L3NV76+Ao7kHJQDz1/SV8Np5X1A= + +Name: system/etc/bluetooth/iop_device_list.conf +SHA1-Digest: vp6mhUjLWgp1vRuUgSJRY7nUm0g= + +Name: system/etc/firmware/dsp1.mbn +SHA1-Digest: XS9hX6ndELJY/8PpU1T8dslof+8= + +Name: system/etc/legal/leaflet/in/Limited-Warranty.html +SHA1-Digest: wAWmnkxveV240NUtKsj9T1WLYE0= + +Name: system/app/WallpaperPicker.apk +SHA1-Digest: VgEcXGc9MVTXO8yHk3v52MHRFqw= + +Name: system/lib/libkaomoji_kihon.so +SHA1-Digest: JyVg7TD5ZhfFrepAwVzmUoKwCK0= + +Name: system/etc/security/cacerts/10531352.0 +SHA1-Digest: x031sSTTrg99nYnqERvbmDu8aP8= + +Name: system/lib/soundfx/libaudiopreprocessing.so +SHA1-Digest: W2zZ+8eHvGOM7sdDWLQa7k1H+BI= + +Name: system/media/audio/ringtones/No_Limits.ogg +SHA1-Digest: XAELJ6mvSSWmVJzcMXqKwsdsZt8= + +Name: system/bin/dhcpcd +SHA1-Digest: 5Nod0ejATmUtLZ6Sz/ryDPLfm90= + +Name: system/etc/legal/leaflet/pt/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: Nt30PfkjCVGHlKmD+CBXnMIV1Zs= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Malware.html +SHA1-Digest: Jj4063nznEkOZcVp/vbad+bCEog= + +Name: system/etc/legal/leaflet/zh-CN/Important-information.html +SHA1-Digest: vohgAvWO8M4MLjispern1M3zYBY= + +Name: system/etc/legal/leaflet/ms/Limited-Warranty.html +SHA1-Digest: cka5bXFREjhUpak/C5DdA1FvC/g= + +Name: system/lib/libgoogle_endpointer_jni.so +SHA1-Digest: kX/O1CZ4pT6phlKrbw58QLLbxfA= + +Name: system/etc/legal/leaflet/ae/Emergency-calls.html +SHA1-Digest: uIfePMhajKJbVKCw9dfEprhb7Gg= + +Name: system/etc/legal/leaflet/cf/Our-warranty---12.html +SHA1-Digest: mUs0DvU05XaO21ynEGa2PuLD1Pw= + +Name: system/app/WeatherWidget.apk +SHA1-Digest: MrV0tuZtKCd47B8M1XTSjg1LKrs= + +Name: system/framework/requestsync.jar +SHA1-Digest: u9Q/xXXtK7uRFBboF1IgPNWRPRM= + +Name: system/etc/permissions/android.hardware.nfc.xml +SHA1-Digest: GIaOjWIx6Re8D6cSufWoe3tSkw4= + +Name: system/media/audio/notifications/Bellatrix.ogg +SHA1-Digest: giOqwuwNkixPfQIMPeKExhc5QAw= + +Name: system/etc/legal/leaflet/pt/Warning!.html +SHA1-Digest: H8/x2XWLQDj7td80BdlHdWc31GY= + +Name: system/etc/legal/leaflet/ru/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: Okjzalrxfl7Oh0Vmt5JgR9Wo1f0= + +Name: system/app/SoundRecorder.apk +SHA1-Digest: pFpQ6F44qd8XDt/WfHNCqV/fHTk= + +Name: system/lib/libdvm.so +SHA1-Digest: zcbhHxBp0+ojTSxELtrt0f/kRh4= + +Name: system/media/audio/ringtones/BirdLoop.ogg +SHA1-Digest: RYVSjXjMHcZg8XPUlE1qk6YYMII= + +Name: system/etc/legal/leaflet/uk/Accessories.html +SHA1-Digest: jy3Bmu+Nlv9YxjX2RaV9Fde3/uY= + +Name: system/lib/libaudioparsers.so +SHA1-Digest: lCsrPbLHKN/zv6YQvNCQR2MMkMo= + +Name: system/etc/legal/leaflet/zh-HK/Limited-Warranty.html +SHA1-Digest: OiSug1MFgDskOaXEKma2SNBKVpA= + +Name: system/framework/com.sonymobile.playanywhere.jar +SHA1-Digest: ThwHnbczbrEaj22YD+gjjjLALbg= + +Name: system/media/audio/notifications/Spica.ogg +SHA1-Digest: QYkZyekhPGmpppRgc9HDU1iRq7s= + +Name: system/lib/libconfigdb.so +SHA1-Digest: YZwj3IeAT2sw0gREwukoLZmfu0Y= + +Name: system/etc/security/cacerts/c8763593.0 +SHA1-Digest: kZMwI4zPBDpymR428YsYQNm4Etw= + +Name: system/usr/idc/qwerty.idc +SHA1-Digest: 5oeOyx5R5vdh3tPnK4A+NyN9jzg= + +Name: system/etc/firmware/tzsuntory.flist +SHA1-Digest: 3GBXQ1cU1/rJu/ziFejg4jpE3AY= + +Name: system/vendor/camera/LGI02BN0_IMX132.dat +SHA1-Digest: 7nxN2zoMNE5pjWP+En8tnQOwM8Q= + +Name: system/media/audio/notifications/Procyon.ogg +SHA1-Digest: N4/vY0+KJHeczrT1yP6eyNwk9eA= + +Name: system/etc/legal/leaflet/en-HK/For-Devices-Supporting-3D-Viewing + -capabilities.html +SHA1-Digest: 8Lg5Ul6k2Svpz16slW7nwNIHcYo= + +Name: system/etc/firmware/touch_module_id_0x42.img +SHA1-Digest: XVKX6xiGMner003sVcz4YbUfChs= + +Name: system/etc/legal/leaflet/sq/Warning!.html +SHA1-Digest: Xn624MYcUY0mWEGuD9jV+AHe5bs= + +Name: system/etc/legal/leaflet/ae/Important-information.html +SHA1-Digest: FXn102VxOwv4EjaRhKCcAERCr0k= + +Name: system/etc/legal/leaflet/bs/Accessories.html +SHA1-Digest: 01oqet/ctxbWMXr8gIvzUccQNEY= + +Name: system/etc/legal/leaflet/bs/Important-information.html +SHA1-Digest: 56s6jyOzsqBvYmHjCvY6Z4ip+ck= + +Name: system/app/usb-mtp-update-wrapper.apk +SHA1-Digest: Sxmv7UpOyJUeBSqzM9GxcSo/CuQ= + +Name: system/bin/mm-jpeg-dec-test +SHA1-Digest: ZMsY3yGEWx19gOj2tggXuAZImKk= + +Name: system/app/VisualizationWallpapers.apk +SHA1-Digest: h50MHEaT1wWd2RaEbc0nXiKNK54= + +Name: system/media/audio/ringtones/HalfwayHome.ogg +SHA1-Digest: WmgmslPp4WieG3XbK6B1cQQV57w= + +Name: system/media/audio/notifications/Thallium.ogg +SHA1-Digest: XODoDGByDNo/EIP3XHRX18r39nY= + +Name: system/etc/legal/leaflet/zh-HK/Disposal-of-old-electrical-and-el + ectronic-equipment.html +SHA1-Digest: Yhe81noERniaoERCZjYVgqxWK6E= + +Name: system/app/PhaseBeam.apk +SHA1-Digest: EMV/yaYA6eTavddkyKa2kzkcANo= + +Name: system/etc/security/cacerts/5e4e69e7.0 +SHA1-Digest: RU4Glj5/5C9MVwUct4nnQREaDf4= + +Name: system/lib/libaudioparameter.so +SHA1-Digest: kVBQioZiSIFUvd7zhp54GXyyqWE= + +Name: system/etc/legal/leaflet/sr/Warning!.html +SHA1-Digest: zm8rfd4LYZ8zbGEsIwvJUkHF4VI= + +Name: system/etc/hostapd/hostapd_default.conf +SHA1-Digest: +tPQoTKD/k07vxLURO42laNuPJE= + +Name: system/lib/libaudioalsa.so +SHA1-Digest: kbcnFEYcXNaHosCmP55ID0LaELQ= + +Name: system/etc/legal/leaflet/kk/Accessories.html +SHA1-Digest: K6RMB+PxJQ7oMct4d5vIP2FZJ0E= + +Name: system/bin/system_server +SHA1-Digest: IdBuE8JuR4krSA9vVlyS8uBlnv8= + +Name: system/app/Books.apk +SHA1-Digest: zX1Ysy+zpiIXpnFHzapGjPaa2xY= + +Name: system/vendor/camera/SOI13BS2_IMX135.dat +SHA1-Digest: kI0onT7CCQaEp5wHYjrV/ChxO4w= + +Name: system/etc/legal/leaflet/uk/Driving.html +SHA1-Digest: 1DZcjx37MeZGs6mriyI9vI5pxQY= + +Name: system/etc/legal/leaflet/in/index.html +SHA1-Digest: /g6ySGUgTRdV1AVlNzvNUs5ZaF0= + +Name: system/etc/legal/leaflet/hi/Precautions-on-Memory-Card-Use.html +SHA1-Digest: bgtOdnA5wHQFfJdjQfzDsLq0Was= + +Name: system/app/GoogleFeedback.apk +SHA1-Digest: jf2QwMW1l+KPgYD98e7J570syBs= + +Name: system/app/Settings.apk +SHA1-Digest: vYRdiww2h8tD3BhPYakDStuE+Lc= + +Name: system/etc/security/cacerts/b39cd941.0 +SHA1-Digest: NZCBJvJpiQ9a7Yn+MsRnte4rD/M= + +Name: system/media/audio/alarms/Barium.ogg +SHA1-Digest: uvMFpl2dTzfhqsAqw5BYwQsxIME= + +Name: system/media/audio/ringtones/DreamTheme.ogg +SHA1-Digest: 2AVJ65kaSfW1NF6hHsvqhEMwQ5Y= + +Name: system/lib/libnfc.so +SHA1-Digest: 1WoQcw+TuMiW3mkQHKlj4tsIFAs= + +Name: system/usr/xt9/SEMC_810_r1-5_SKlsUN_xt9_2.ldb +SHA1-Digest: XeMyVJynfN8Sd0n5qn4eVBSRZkI= + +Name: system/app/TaskSwitcher.apk +SHA1-Digest: Plf5PuFJjkl0RR0jZFLqclrHtoE= + +Name: system/etc/legal/leaflet/th/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: ecLXGCWxn06QAfvwNQUBXUoqE8U= + +Name: system/lib/libals.so +SHA1-Digest: hjti7bdrKcF8mK974PMwV2eM70Y= + +Name: system/etc/legal/leaflet/sr/Protection-of-personal-information.h + tml +SHA1-Digest: R8eIGoJPpwMHrLJKO6RaZcfiAjg= + +Name: system/etc/legal/leaflet/hr/Conditions.html +SHA1-Digest: JMtC8hhg5c53di9SizUXsaYdECg= + +Name: system/etc/legal/leaflet/ar/Driving.html +SHA1-Digest: hv2lToCZ24fFHMZLl8HfyYy4Enc= + +Name: system/lib/soundfx/libpreeffectwrapper.so +SHA1-Digest: R3d03tsjYBzVjZeHWbHZxETltvk= + +Name: system/etc/legal/leaflet/en-HK/en-CN/What-we-will-do.html +SHA1-Digest: O10RcPwsZFV/Oilvk5szciv5ig4= + +Name: system/lib/libqmi_client_qmux.so +SHA1-Digest: w2WSQTBDRDu0PC4iSTJSlOrBMjw= + +Name: system/bin/cal_data_manager +SHA1-Digest: KHCcWU+zwST9HvZNjQLtbeYojt4= + +Name: system/etc/security/cacerts/48478734.0 +SHA1-Digest: CCkvYaE7BOlkHFDTReqBRiiR8II= + +Name: system/etc/security/cacerts/76579174.0 +SHA1-Digest: Uw9KFPBW37XtteEhKlq5eRnOm1w= + +Name: system/lib/libvorbisidec.so +SHA1-Digest: M0x1pISGdE2H9QtBqcfJyv71pBg= + +Name: system/etc/legal/leaflet/ar/Our-warranty---12.html +SHA1-Digest: mdzDlDdMt4niki8vtL/4MiCAk4U= + +Name: system/app/SemcDlna.apk +SHA1-Digest: jDgeQttek3dHIdXGgvd2MSUIJBE= + +Name: system/etc/permissions/com.sonyericsson.android.semcrilextension + .xml +SHA1-Digest: 0VU4gM6tUD1MB/3p7op076zKpC8= + +Name: system/media/audio/alarms/stars.ogg +SHA1-Digest: EQrqx4IbKXGcMmYlP05yqS1jBzc= + +Name: system/media/pictures/prague_02.jpg +SHA1-Digest: +olSRJNw6xQxaxJNuW3C26RTvUE= + +Name: system/etc/legal/leaflet/sr/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: pNJ7mgFQJOWMC+cwsA2ppfdBt2k= + +Name: system/bin/pand +SHA1-Digest: kFW+hLz7TK2uHb4C+8sMKmzBjCc= + +Name: system/lib/libAsahiJniNative.so +SHA1-Digest: ASF6D/vbhocflsFUHVn8jKCM50o= + +Name: system/etc/legal/leaflet/pb/Service-and-support.html +SHA1-Digest: 9vaPsErCMs0LIpQ/MxbSpMZFYTo= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/For-Devices-Supporting-3D + -Viewing-capabilities.html +SHA1-Digest: 8Lg5Ul6k2Svpz16slW7nwNIHcYo= + +Name: system/framework/com.sonyericsson.android.omacp.jar +SHA1-Digest: KA5stpkPpe7Cfh+QL96c9Gr5phI= + +Name: system/etc/legal/leaflet/en/Export-regulations.html +SHA1-Digest: oSSJYGqV7ZLJwIEYtelViaO/jsQ= + +Name: system/lib/libstdc++.so +SHA1-Digest: 3YTMdOtqO+yHg0KoU/wW0upylbs= + +Name: system/lib/libtcpfinaggr.so +SHA1-Digest: 4JL7pg8RInJxPKD/JgDVP7jnmJc= + +Name: system/etc/legal/leaflet/sq/Driving.html +SHA1-Digest: YpNrtWqJeOCfX+BE4LASfMAYabE= + +Name: system/etc/permissions/com.sonymobile.mediacontent.xml +SHA1-Digest: Fu76X0/rgeMsirHUzOpbHfqCDuc= + +Name: system/lib/hw/camera.msm8960.so +SHA1-Digest: pPYUBlQRJKdSje1eeXMCAFEyNAY= + +Name: system/etc/legal/leaflet/bs/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: HKLA/w7IRQf+NUfXXN/qzfTsTqg= + +Name: system/etc/legal/leaflet/ko/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: yhAh6xkimnrxW40BTMfBwuJqBFQ= + +Name: system/etc/legal/leaflet/zh-CN/Sony-Ericsson-Consumer-Web-site.h + tml +SHA1-Digest: Lkrzt1T/NkSxLk9Gi6ww3KLLiGM= + +Name: system/usr/share/zoneinfo/zoneinfo.dat +SHA1-Digest: bShcRYsKQq5TEPhpXvhJMaks+Ns= + +Name: system/etc/legal/leaflet/iw/Conditions.html +SHA1-Digest: nc0CKSenOhdxNMgs6QsWUBlE1N8= + +Name: system/lib/libmmgesture_services.so +SHA1-Digest: BdSeqZBMim8l3gJE6vianYkBFOI= + +Name: system/framework/com.quicinc.cne.jar +SHA1-Digest: /u+I8ZKS+MmMHHy0L4nw1mJvZfo= + +Name: system/etc/legal/leaflet/zh-TW/Geographical-scope-of-the-warrant + y---zh-zt.html +SHA1-Digest: Y4lX0XoT3GRHazL0WWNs/2mL0WU= + +Name: system/framework/uiautomator.jar +SHA1-Digest: D+KZKUHXp9ccsBUUa6xhl0ME0HY= + +Name: system/etc/legal/leaflet/pt/Flight-mode.html +SHA1-Digest: i1IjAUzvMYh51PjDNuRBO9MrDvM= + +Name: system/lib/libhardware.so +SHA1-Digest: d5JTkVa9M3eAj8dAhUFodagGHSM= + +Name: system/etc/legal/leaflet/iw/Malware.html +SHA1-Digest: 4z7gpEgmcaWifZZBU9hBEMbq1Hw= + +Name: system/media/audio/notifications/Krypton.ogg +SHA1-Digest: cUUL9l5aSmwdGnuILteygeN8/z8= + +Name: system/etc/legal/leaflet/ae/Accessories.html +SHA1-Digest: JKIci6Iy37I9wazIKJEekHUYkSY= + +Name: system/etc/legal/leaflet/uk/Warning!.html +SHA1-Digest: r2eKEIL/wuJ1cPScA1Jry2cKizE= + +Name: system/lib/libext2_profile.so +SHA1-Digest: HdOoe5pQH/R0TV4X7RZ04h4ncGM= + +Name: system/etc/legal/leaflet/pt/SIM-card.html +SHA1-Digest: xix/VfHXY11ghazZ0zho7eXkfkg= + +Name: system/etc/legal/leaflet/vi/Conditions.html +SHA1-Digest: s8p3i3hVBQlYYfYaFe0AE5VypHg= + +Name: system/lib/libgui.so +SHA1-Digest: 66SAo/0qCTUOtv5d+vwSUmwWqeI= + +Name: system/bin/sysro +SHA1-Digest: BitbwYDELWqeKkMSQGB7kAg3R8g= + +Name: system/etc/legal/leaflet/ru/Loudness-warning!.html +SHA1-Digest: ueCdFR8Da3o5iq/NI/KqDT8Yv0E= + +Name: system/etc/be2_album +SHA1-Digest: BCm5hNFhJEGVm2HvhMveGTE1j1Q= + +Name: system/etc/legal/leaflet/cf/Memory-Card---legal.html +SHA1-Digest: O3tPF6fBkFsUYd4Xrxc5YaMXn6E= + +Name: system/bin/sysrw +SHA1-Digest: jo/S21xASm3wfIZqLoiDtX8i7C8= + +Name: system/etc/legal/leaflet/kk/Export-regulations.html +SHA1-Digest: 4MPW5ZuA+lbkosVKlv1hF4ABYaM= + +Name: system/etc/legal/leaflet/ae/Malware.html +SHA1-Digest: +K5m3QkZ8tcMHgR/KDKhbDAP1iA= + +Name: system/lib/libinput.so +SHA1-Digest: jVfJ6ODBDmHKglLpjQmX9ZyB5kY= + +Name: system/framework/semc_cdfinfoaccessorif.jar +SHA1-Digest: DQjRG6EH6YeFRfhfcsntdpXUgsU= + +Name: system/lib/libgoogle_recognizer_jni.so +SHA1-Digest: XSsNFriGTcQNVMjgEsK/X5CE0/k= + +Name: system/etc/legal/leaflet/styling/mBWltr.css +SHA1-Digest: w1kjilSbTIhaUvzWJTSNQzMJbjw= + +Name: system/etc/security/idd_config.pem +SHA1-Digest: dMyhuOzaiAEYQLD+d+Xo/mudekw= + +Name: system/app/Street.apk +SHA1-Digest: gy7wRgDM+/QJWcqujoRdJcZFtgM= + +Name: system/etc/legal/leaflet/fa/Antenna.html +SHA1-Digest: jEqgp1ME2dVeHgp08gStUUFxJSs= + +Name: system/media/audio/notifications/Lalande.ogg +SHA1-Digest: 668G08tsV5hkoMYTIFLVRxPRWqE= + +Name: system/usr/srec/en-US/symbols +SHA1-Digest: VssslP42+1LcOram2NHS9Gxlu94= + +Name: system/etc/firmware/vidc.mdt +SHA1-Digest: j7MF0CPvVYw73CeMj0h2vcy4SoI= + +Name: system/lib/libmedia_jni.so +SHA1-Digest: X5nhNohsZCWh2G+eEWAsm2i87mg= + +Name: system/semc/chargemon/data/charging_animation_01.png +SHA1-Digest: +PuzOKCgOF6FfMA9YQol9XZrtNQ= + +Name: system/etc/legal/leaflet/fa/Memory-Card---legal.html +SHA1-Digest: hp+AX3e9G2afBDdKX3VNMVkjDlU= + +Name: system/media/audio/alarms/Alarm_Beep_01.ogg +SHA1-Digest: tyeJsmvjmrcQcal3Ex/JIhCgSC0= + +Name: system/app/SomcMusicSlideshow.apk +SHA1-Digest: zRrQ4F7TT1ZTRNHP7jPHFiFQDzc= + +Name: system/app/UseragentProvider.apk +SHA1-Digest: bfrCAr/0ycpvsXben4U2vBZOOuM= + +Name: system/media/audio/ringtones/Carina.ogg +SHA1-Digest: BDf+X8ssIdcTuWV+oAQDi9AvgpQ= + +Name: system/etc/legal/leaflet/xl/Warning!.html +SHA1-Digest: NaU1/pPpi0IVVqDHQsHbaEOE9c4= + +Name: system/etc/permissions/com.sony.snei.vu.api.install.xml +SHA1-Digest: DPINdFrHOuOmSdg5fN4EFK06Gwg= + +Name: system/etc/legal/leaflet/ru/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: TrMpqbEYK463v8wJAPIav+eBXzc= + +Name: system/usr/srec/en-US/dict +SHA1-Digest: h7Q/ArygyOrwdPMa0NL4+48riLc= + +Name: system/etc/legal/leaflet/ar/Accessories.html +SHA1-Digest: MjURYYjjQTfocQqYcRUNKLBi46c= + +Name: system/media/audio/ringtones/xperia.ogg +SHA1-Digest: YF2rhUUak4m/MiTS/lhCBq4O7/A= + +Name: system/etc/legal/leaflet/xl/Our-warranty---12.html +SHA1-Digest: 0j3xMX/V+NczqmDLDL/I/qha9rQ= + +Name: system/etc/legal/leaflet/xl/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: lxcWXs1OC8VjFunRCtta3x5hbzs= + +Name: system/etc/legal/leaflet/ae/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: TuyYob+fs9vaReexM2cgPuFd/so= + +Name: system/etc/security/cacerts/d777342d.0 +SHA1-Digest: WdQWfF7rZDzaXOGfoJMJS1qOuYU= + +Name: system/lib/libgcomm_jni.so +SHA1-Digest: FIVrSYFQNeO3VojkFMPyI4/qmRo= + +Name: system/etc/security/cacerts/399e7759.0 +SHA1-Digest: UAbvBS8lvF2AOEsEs98fRQGKiwo= + +Name: system/app/PhotoWidget.apk +SHA1-Digest: oKZtB06tbhsC+8wVW86NCbMiEyM= + +Name: system/lib/libmedia_native.so +SHA1-Digest: p09lfRLy/qM3aXb3KXsK2lus15g= + +Name: system/etc/legal/leaflet/pt/Emergency-calls.html +SHA1-Digest: guNx3LUNfTpjGroiZHlRBt6j3Pk= + +Name: system/app/KeyChain.apk +SHA1-Digest: ltJaup6AGA4TeHAC0NsESq6rrKw= + +Name: system/etc/security/cacerts/c33a80d4.0 +SHA1-Digest: rNpc82k59uWEFW5aGR7MLPbTGbI= + +Name: system/app/CameraExtensionPermission.apk +SHA1-Digest: K3eRudQ11qU6mYsuhzvoZO4YdxQ= + +Name: system/media/audio/ringtones/DonMessWivIt.ogg +SHA1-Digest: EDblLh6e8Ftzqsa1MbImc2jtfH0= + +Name: system/app/UserDictionaryProvider.apk +SHA1-Digest: LbhCgDK2H2LPXpd9i7f1kHesMIw= + +Name: system/etc/legal/leaflet/iw/Service-and-support.html +SHA1-Digest: a28gc+8QRVs9vx49LDBVpa3J9/M= + +Name: system/etc/legal/leaflet/uk/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: 4CE11De4IONEQrVAcC3JTNV0Vo0= + +Name: system/app/LiveWallpapers.apk +SHA1-Digest: MxZIpInc+eo0H9w6Ex2gYgIb4/E= + +Name: system/bin/mm-qcamera-app +SHA1-Digest: L2+8XW+94AZJJmt2bSanbPt72U4= + +Name: system/etc/legal/leaflet/en-HK/Antenna.html +SHA1-Digest: fxNZgCsam5YbU6vO8WuwPr7bMNs= + +Name: system/app/OnOffTools.apk +SHA1-Digest: tLY/1cRtMiywWfbZ0aFkP6Dp7Q4= + +Name: system/framework/framework_ext.jar +SHA1-Digest: uyOO7+tCqeRLWAJHJQye7XqIZK4= + +Name: system/etc/legal/leaflet/th/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: QK9TCW4un3tAS3dALx7UvwwPUBQ= + +Name: system/app/OMAClientProvisioning.apk +SHA1-Digest: n6W09Ojxe0JX6BrJEc+ebosK4YA= + +Name: system/lib/libsuspend.so +SHA1-Digest: nBRHwFqm8o2lNojPL0znWnieRW0= + +Name: system/etc/legal/leaflet/images/btn_search_cherry-BIG.gif +SHA1-Digest: fvkHn69IJPXlyL1RiYExC5PZVWw= + +Name: system/etc/legal/leaflet/ko/index.html +SHA1-Digest: 7j0zh/nPGqZZhwqtmZcbZ+VcD0E= + +Name: system/bin/run-as +SHA1-Digest: hx9/aOVvMgtxG66iNmjlU1OfEWY= + +Name: system/etc/security/cacerts/73da149b.0 +SHA1-Digest: ZMH3aJsy2YBcWh1dq/Pq0xRGuAw= + +Name: system/media/audio/notifications/F1_MissedCall.ogg +SHA1-Digest: yknFSdzyGFZj1bYrnuPvZJBZHfM= + +Name: system/media/audio/ringtones/FriendlyGhost.ogg +SHA1-Digest: r+on8FAhBJ/lNr5P/qp3axv0ZOk= + +Name: system/framework/svc.jar +SHA1-Digest: YlmbgraWCkI38vIjz3vq6cw+XEI= + +Name: system/fonts/DroidSerif-Italic.ttf +SHA1-Digest: vdiq1easVG0R5zeL36vqx8y9rfw= + +Name: system/lib/libbluetooth.so +SHA1-Digest: taX/VguCy7wp4587Np2aMh2igEg= + +Name: system/etc/legal/leaflet/fa/Driving.html +SHA1-Digest: uQM5yCo8IYE8j6Q1iFtznK48eyg= + +Name: system/etc/xtra_root_cert.pem +SHA1-Digest: 9Vox7E2c+M4nJKyt7PAMd5+HZ9s= + +Name: system/etc/legal/leaflet/bs/Personal-medical-devices.html +SHA1-Digest: PhIPL0+PDgNA27N04CyepVM+2P4= + +Name: system/etc/legal/leaflet/mk/Publication-number.html +SHA1-Digest: QtaflPnjBPZh4CbEbdbqbAvdXRY= + +Name: system/etc/legal/leaflet/en-HK/en-CN/SIM-card.html +SHA1-Digest: p/1F/Gfr4z9Nd5EBEVI3mBU1AeQ= + +Name: system/etc/legal/leaflet/images/button_search_foot.png +SHA1-Digest: zgzPuWqPdRXVnpf2ruRHvsQXruk= + +Name: system/app/SettingsProvider.apk +SHA1-Digest: coGnXeUQmso8DfEl4OPGd4+iDFA= + +Name: system/etc/legal/leaflet/iw/What-we-will-do.html +SHA1-Digest: /amaSbHFhzxohy+0AOCLZAO2UDA= + +Name: system/etc/legal/leaflet/kk/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: Y9ruZDRJs0Qox8U+Hwm5Ky8rT3U= + +Name: system/etc/legal/leaflet/fr/Power-supply-(Charger).html +SHA1-Digest: lf3C3GrG379PQfZtzEaZ0BPFtn0= + +Name: system/lib/libnativehelper.so +SHA1-Digest: cVfwO+1Ufv2dY80Wc5MU8uDbThQ= + +Name: system/etc/legal/leaflet/ko/Power-supply-(Charger).html +SHA1-Digest: 9e3KjV1E8ocJePrnw8o8feyF2W8= + +Name: system/etc/legal/leaflet/mk/Personal-medical-devices.html +SHA1-Digest: w7lID2rc8FvwUlgd8aMF6D+DQ7I= + +Name: system/etc/firmware/touch_module_id_0x41.img +SHA1-Digest: krEIaH5b5J77WhJ2nMT1k4sDhTk= + +Name: system/etc/legal/leaflet/ar/GPSLocation-based-functions.html +SHA1-Digest: BsDo/1pOabaunjLmfrs81+K9Aa8= + +Name: system/etc/legal/leaflet/vi/Memory-Card---legal.html +SHA1-Digest: xfg2ImKFg2T+5P7j5GYpyyUuOFs= + +Name: system/usr/xt9/SEMC_810_r1-3_HElsUN_xt9_2.ldb +SHA1-Digest: /0WHmiLYDMS/3ExJEfPzClWeUyY= + +Name: system/media/audio/alarms/string_ensemble.ogg +SHA1-Digest: TpFULHnxD1MXa7n6TltmAVGk43M= + +Name: system/usr/idc/qwerty2.idc +SHA1-Digest: /k6dNiHz49smZosdSvGtSb0EYtA= + +Name: system/vendor/etc/audio_effects.conf +SHA1-Digest: bb6pRe0fMrDSG3wn6v6B6U+L8so= + +Name: system/etc/legal/leaflet/zh-TW/Loudness-warning!.html +SHA1-Digest: zOqDKzerhV80msYDabVJlYbc+Zs= + +Name: system/app/Galaxy4.apk +SHA1-Digest: d8eDdGR1Q8z/EuA7WBU4K4P10ko= + +Name: system/etc/legal/leaflet/cf/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: zR/EWSrhiprDp2fZZvrSX5SicvQ= + +Name: system/etc/legal/leaflet/kk/Power-supply-(Charger).html +SHA1-Digest: ehiSN59oPhVsq++pc4RJP2IvQIk= + +Name: system/etc/legal/leaflet/ko/SIM-card.html +SHA1-Digest: 3jr5ehXH1/8p0A4JLBpj+oQiffw= + +Name: system/lib/libDxHdcp.so +SHA1-Digest: HIRun7+h7yPTMZFY6C/UDTrrDgU= + +Name: system/etc/legal/leaflet/images/p_cover.png +SHA1-Digest: 8rVGVGdSRg5Hj92uK+1BLgkXyxk= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Memory-Card---legal.html +SHA1-Digest: GQnCAtOtbv49C8ciRyue2e1cuD4= + +Name: system/etc/legal/leaflet/mk/Memory-Card---legal.html +SHA1-Digest: qIG/3s1wDsf5S+3M07Wnb8VTzUA= + +Name: system/media/audio/alarms/2_cents.ogg +SHA1-Digest: 9cBwy82Oq45jJWtVOpOYpJZP748= + +Name: system/etc/legal/leaflet/en-PB/What-we-will-do.html +SHA1-Digest: cajhNcCCTJE78qFqdx+O4LxWkRY= + +Name: system/framework/framework.jar +SHA1-Digest: YZSo9jT6DIgIUrBpbWVhy+6tRqs= + +Name: system/fonts/SoMABold.ttf +SHA1-Digest: YfMPG3QJke+B03Np/jQyQYyfQG4= + +Name: system/lib/hw/audio.usb.default.so +SHA1-Digest: d5cTkg5G306tOub/Odt4KJ7R5z4= + +Name: system/media/audio/notifications/Vega.ogg +SHA1-Digest: 0KY6i8DzWTMAK9CW55N41LohVTA= + +Name: system/etc/security/cacerts/1dbdda5b.0 +SHA1-Digest: Pvfb+Mx0s9ZkvrdvSJCmchuTHpM= + +Name: system/etc/firmware/a225_pfp.fw +SHA1-Digest: e6QAN5YoXTbBJfq+RTtF1eIYUMw= + +Name: system/etc/legal/leaflet/xl/Malware.html +SHA1-Digest: iDA8MpOGAgAJx5/EXjTtyfgvCt8= + +Name: system/etc/legal/leaflet/en/Emergency-calls.html +SHA1-Digest: 0A9DmZTbeDA8UuIev91296L6+og= + +Name: system/etc/legal/leaflet/hr/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: wyHnT0Ejo9COCBJ/dOxMxBhhcSo= + +Name: system/lib/libqdi.so +SHA1-Digest: gBpNiKq3+MZXf6+4Cd/ZeT4trIw= + +Name: system/etc/legal/leaflet/ru/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: HrotyAebW61nYARbq5dxNjoU8dM= + +Name: system/etc/security/cacerts/75680d2e.0 +SHA1-Digest: xKfC4N5pEuEgXN2tZ44LcEXXY5s= + +Name: system/etc/legal/leaflet/sr/Battery.html +SHA1-Digest: K9zHkJoSG7S8XQkfe+rC2GQMyI8= + +Name: system/etc/firmware/sbl1.mbn +SHA1-Digest: npzrQPUvjlmXCO2eTGl/shKQzXU= + +Name: system/etc/legal/leaflet/ko/Memory-Card---legal.html +SHA1-Digest: T52JoHpNX+AyspsXNiE0L1Gyrl0= + +Name: system/lib/libmemalloc.so +SHA1-Digest: w4/zg/40auZAJGpjt6WV6o7mqAg= + +Name: system/media/audio/notifications/Iridium.ogg +SHA1-Digest: jIvI4WJAWiyeqH+lfhnfiTexSy4= + +Name: system/app/InputDevices.apk +SHA1-Digest: 3yZMfbmJKljILKSHMA+oV2ThHIQ= + +Name: system/bin/qseecom_security_test +SHA1-Digest: nZ+/Ah1KqmOyoRyi3nyMk8FQtE8= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/cloudy_mountain_hd1080p_small.png +SHA1-Digest: AVT0kAJnC/JbevZB2zPX9kv22bk= + +Name: system/fonts/DroidSerif-Bold.ttf +SHA1-Digest: KU+pnOr2B3q2M7Wnx9t2Hi92z4w= + +Name: system/etc/legal/leaflet/ru/Our-warranty---12.html +SHA1-Digest: 9Py4M33Esl8cyrW8U/kdc1aKmNU= + +Name: system/etc/permissions/com.sonyericsson.media.infinite.extension + _1.xml +SHA1-Digest: apkQHtM0y9ijJ/O2dkQ5Z3HwNzc= + +Name: system/etc/legal/leaflet/styling/legal_mcommon.css +SHA1-Digest: t8Ikp9LnpELNvgBjI6f4rBVlwJc= + +Name: system/bin/mm-jps-enc-test +SHA1-Digest: O3uAwCHaa0CuQ58tC4lMQ2VVquE= + +Name: system/framework/bmgr.jar +SHA1-Digest: se61/d61lrTP3a3BFYt2QjiTKQY= + +Name: system/etc/security/cacerts/7672ac4b.0 +SHA1-Digest: rVlRiFPQlGlMwhz5m6Ak2XDc2KM= + +Name: system/vendor/camera/SOI13BS2_DW9735.dat +SHA1-Digest: kXsL9zr/7g8QDhvtwMEzo7DH0Wk= + +Name: system/etc/security/cacerts/00673b5b.0 +SHA1-Digest: G5keTPZotrFLEINobTM5FTRYmLA= + +Name: system/lib/libexif.so +SHA1-Digest: 4QKh7RLeZq4DlxOHVQMEPdlV1Go= + +Name: system/etc/legal/leaflet/ru/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: Arm5+M3F5P/k/Fw+QeYGUArOUao= + +Name: system/etc/legal/leaflet/in/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: E845K6N1xvcLG/Z+XLhXl+wQq9M= + +Name: system/lib/drm/libodekakeplugin.so +SHA1-Digest: KXQ9sGZZOmgUcs/dkHxhCBdMDlA= + +Name: system/etc/security/cacerts/6e8bf996.0 +SHA1-Digest: p7GnxdBahRQFK6WFiKO8zA1I1FA= + +Name: system/lib/libwfdhdcpcp.so +SHA1-Digest: P1LF9Z/Pbn0ST8WkbuBlJux4qnY= + +Name: system/app/SomcPhotoAnalyzer.apk +SHA1-Digest: Qx5ssDgNQv6KqQjmJjWReqn12Hw= + +Name: system/etc/legal/leaflet/hi/Emergency-calls.html +SHA1-Digest: nOL7Bgi3bz+2DpQ3e0JosAdRvKc= + +Name: system/etc/security/cacerts/5021a0a2.0 +SHA1-Digest: CI19Ue/cTwI484BmRLdR5TbCY7I= + +Name: system/etc/legal/leaflet/hr/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: 0ExGbq7wgR8cU/ulyPvhpsa/1DU= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Recommendations-for-care-an + d-safe-use-of-our-products.html +SHA1-Digest: UE0MMpyMdrSSRpvfXzYBUtZxGrg= + +Name: system/app/GoogleTTS.apk +SHA1-Digest: YftrVf3rlNvpLbniUgVX6DwV2EQ= + +Name: system/bin/wiperiface_v02 +SHA1-Digest: YR/VFp/sBi74Q9z26bUJy+bse7Q= + +Name: system/etc/init.qcom.modem_links.sh +SHA1-Digest: VTwABtxOs9Y4ZQhy4McbrnUrQJs= + +Name: system/lib/qnet-plugin.so +SHA1-Digest: r31Gbcnflx16XzLdbtx/0G64wzM= + +Name: system/etc/legal/leaflet/sr/Personal-medical-devices.html +SHA1-Digest: NFK3/o5pWl5in3/8Wo1dMswvYuc= + +Name: system/etc/legal/leaflet/uk/What-we-will-do.html +SHA1-Digest: +W0Wm3TssR2bFc6sgeDilWZn2bc= + +Name: system/media/audio/alarms/Hassium.ogg +SHA1-Digest: 50HYt4tDfIdFwTfIgq6koSsK/Ys= + +Name: system/bin/make_ext4fs +SHA1-Digest: OFxTfJPr8pqwil1R6+bHTsvTgeA= + +Name: system/vendor/pittpatt/models/detection/multi_pose_face_landmark + _detectors.7/right_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-2/full_model.bin +SHA1-Digest: AVjVyo3+d6RuT9gQEL1j2A4yQCA= + +Name: system/media/pictures/istanbul_03.jpg +SHA1-Digest: +Wz2LsfEJtl26/ux7FqaqfCHX04= + +Name: system/etc/legal/leaflet/kk/Limited-Warranty.html +SHA1-Digest: OalXZyDVXAVde/8e0AvcD1B0xOM= + +Name: system/etc/legal/leaflet/en-PB/Personal-medical-devices.html +SHA1-Digest: g6kgmp+jpEgVkxsSHVzlYihSmJs= + +Name: system/media/audio/notifications/tweeters.ogg +SHA1-Digest: Br+2brWDR9+PWPNVtoSFWZHOdao= + +Name: system/usr/xt9/SEMC_810_r1-4_RUlsUN_xt9_2.ldb +SHA1-Digest: Et6CJR0mroMym2drb/yQPiVzpVM= + +Name: system/bin/xssm +SHA1-Digest: L8QCB7tBMOWD3omycLI4HZVlf70= + +Name: system/semc/chargemon/data/non-charging_animation_07.png +SHA1-Digest: saZBuSDWyWWzj4KvBWj2m7d9Kg8= + +Name: system/etc/security/cacerts/bda4cc84.0 +SHA1-Digest: cfrYr6hqVNGZ0HN4nhlR9hRwrPg= + +Name: system/media/audio/Chris Young- I Can Take It From There.mp3 +SHA1-Digest: dTGYSS7W2nvh48dbtST/+7IIfPQ= + +Name: system/usr/srec/en-US/dictation.config +SHA1-Digest: zSaq9OS/+DTEJgF7GYk4324GoCo= + +Name: system/etc/security/cacerts/6adf0799.0 +SHA1-Digest: AdlddUEzDH/iR/px2uzU8RQlpxg= + +Name: system/media/audio/ringtones/Third_Eye.ogg +SHA1-Digest: nlM0uYvrywXGt38Hwrmxc8nh9jc= + +Name: system/lib/libwebrtc_audio_preprocessing.so +SHA1-Digest: sBhu1I3KnP7vXdo4rFcrl53XRO0= + +Name: system/etc/security/cacerts/4fbd6bfa.0 +SHA1-Digest: n3+dvWbE0UcGOz9eUcbG8BT7IdU= + +Name: system/etc/legal/leaflet/en-HK/Protection-of-personal-informatio + n.html +SHA1-Digest: EV2tzvgo/oP/+DxSFeiXkdrfipI= + +Name: system/media/audio/notifications/cosmic.ogg +SHA1-Digest: gd1eg7GluchI1vd69WZTV1oQKXQ= + +Name: system/etc/legal/leaflet/en-PB/Publication-number.html +SHA1-Digest: lt5Ti7nzswLf/5n+hodhF4AuOc4= + +Name: system/fonts/DroidSans.ttf +SHA1-Digest: kFmtLYkPbp7zP0JOZaA4Hry1JUg= + +Name: system/lib/libmpqutils.so +SHA1-Digest: h66DLPR+Ov3K2rIhwiMBaeICKaI= + +Name: system/etc/legal/leaflet/in/Protection-of-personal-information.h + tml +SHA1-Digest: rDeXmJ431bhTo+EaSG/GLMyN5gs= + +Name: system/etc/legal/leaflet/ar/Protection-of-personal-information.h + tml +SHA1-Digest: 4HhEko5XMuGbjDhug4hrAciUcWo= + +Name: system/etc/legal/leaflet/en/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: H0aYZ6j/qq2P6xaerpHC0YMxgwU= + +Name: system/etc/legal/leaflet/zh-TW/End-User-License-Agreement.html +SHA1-Digest: YTLolm9RF1BFkK1nDPUl3gEkp7I= + +Name: system/etc/security/cacerts/fde84897.0 +SHA1-Digest: iUIGZoxaUSmKyq84n5poAuNYHgg= + +Name: system/lib/sysmon/sysmon_disable_charging2.so +SHA1-Digest: enSseLOzatTWEjUqhcqiwimv6h4= + +Name: system/framework/bu.jar +SHA1-Digest: y7KmjFgkWDHV/OCHnPirgBniRXE= + +Name: system/bin/fsck_msdos +SHA1-Digest: FAPCiegVqhmvZbn6YoWbWiZjeqs= + +Name: system/etc/legal/leaflet/hr/Important-information.html +SHA1-Digest: TufoesXVMpBE2o7jWJ8SO1T3e80= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/metal_hd1080p.png +SHA1-Digest: Qg7ZAgszXWo1RUc+8wXT5icVxeM= + +Name: system/etc/legal/leaflet/xl/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: f1m0HqoewZzu77+gQovilGqJG4k= + +Name: system/lib/liboverlay.so +SHA1-Digest: eU2hkM00Jj/VSVvIrmsc5HnLaCs= + +Name: system/etc/legal/leaflet/zh-TW/Recommendations-for-care-and-safe + -use-of-our-products.html +SHA1-Digest: mGD30S4anebOGd3a8hQWgrljqvQ= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Declaration-of-substances.h + tml +SHA1-Digest: arQfEK6a1CceQYAaQvUyWDhWAXw= + +Name: system/lib/libnjemoji.so +SHA1-Digest: 3xkqdeYutSj+f5UNm/oburkgWFc= + +Name: system/semc/chargemon/data/charging_animation_03.png +SHA1-Digest: U9sv/L2VOYwafJduLGht19g8ymE= + +Name: system/etc/legal/leaflet/ms/Service-and-support.html +SHA1-Digest: /v4FUzScQCVeiDcvPPXatgF4h9g= + +Name: system/framework/apache-xml.jar +SHA1-Digest: eXnO6HRBQoLSFtkCvITXwYZXetY= + +Name: system/etc/legal/leaflet/hr/Emergency-calls.html +SHA1-Digest: 9Qqzu5cSpjg1QoooMtOk6THAx0Y= + +Name: system/media/audio/notifications/ray.ogg +SHA1-Digest: UApr9RSgeW+lWQK7uv54qLV6vHw= + +Name: system/lib/libGLESv2.so +SHA1-Digest: mcWW9B4AUh56ak8w1ok1fQ2uwMo= + +Name: system/etc/legal/leaflet/hi/Personal-medical-devices.html +SHA1-Digest: v/pt3la25PlhBYRhA+VGlN4QtGs= + +Name: system/framework/com.sonyericsson.mimetype.jar +SHA1-Digest: 7R3HEY/u1FuJwwOE/vqX1I96FzQ= + +Name: system/media/audio/ringtones/Growl.ogg +SHA1-Digest: Sw2PM10h0ouQLIH8v21n7myXN7I= + +Name: system/etc/legal/leaflet/zh-CN/End-User-License-Agreement.html +SHA1-Digest: fhR7xD6LqIZCIO1C9Vqs+AEN4wg= + +Name: system/etc/legal/leaflet/fr/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: IxyqKG2p35UZT5g9xD3ugxhj50s= + +Name: system/lib/libPKCS11Wrapper.so +SHA1-Digest: byJxCob3ufNOUemuHLJeKic2lc4= + +Name: system/etc/legal/leaflet/en-PB/Limited-Warranty.html +SHA1-Digest: GP/JRKt3SrIt3qoSfzGjvN+H94g= + +Name: system/lib/egl/libEGL_adreno200.so +SHA1-Digest: 0/ab8SBdzNyaHuq/U8ZdGL6os1g= + +Name: system/media/audio/notifications/Fomalhaut.ogg +SHA1-Digest: xhyYEkX3TFVW2wiqCf8U1To7osk= + +Name: system/bin/debuggerd +SHA1-Digest: DMziNtOJgH9+jZuM19shrFGdRSA= + +Name: system/lib/libpng.so +SHA1-Digest: 9YMqekwaDW5qpKa6C2wSI16KOjk= + +Name: system/media/audio/ringtones/CanisMajor.ogg +SHA1-Digest: irS2lfqOON2TPCwHwTVVztFGu9g= + +Name: system/etc/legal/leaflet/hi/index.html +SHA1-Digest: avEfysA7YL+f/b9xdp7tSsCeXtY= + +Name: system/media/audio/alarms/alarm.ogg +SHA1-Digest: YZJYhROCH3UWwWCaaq/wy6IXyJM= + +Name: system/app/SemcCrashMonitor.apk +SHA1-Digest: Bz5BRFdSTgL6BMaCATAOANEXH2c= + +Name: system/media/audio/ringtones/TwirlAway.ogg +SHA1-Digest: blTx6mtBWYYR9LPSijRqEYiANsY= + +Name: system/etc/legal/leaflet/vi/Children.html +SHA1-Digest: 024PyVSg69FgDLahX2VkGtZ1HQE= + +Name: system/bin/logwrapper +SHA1-Digest: j9VjrVw7+10rOBf77U2UijziJ/E= + +Name: system/etc/snd_soc_msm/snd_soc_msm_Sitar +SHA1-Digest: NYc+hb4RBmaQ/10hHiHhUM1k6X0= + +Name: system/etc/legal/leaflet/en/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: n9jmfpJ6founXVQIGqIaG1GtCwY= + +Name: system/etc/security/cacerts/03e16f6c.0 +SHA1-Digest: joMfuOODTdwYLn+o/FBfOobAp90= + +Name: system/usr/srec/en-US/compile_grammar.config +SHA1-Digest: M9bLVAEUN3cV/AB6Ng0mW2ljUGg= + +Name: system/usr/keylayout/Generic.kl +SHA1-Digest: 2Bn3gvxfnE10qV2h0uMsTJ6IRwo= + +Name: system/etc/wifi/gsm_domains.conf +SHA1-Digest: A2T6akJIJz9+jXl7LlUUr10tPuc= + +Name: system/semc/chargemon/data/charging_animation_02.png +SHA1-Digest: fB4AeOgRKQurmCviTsqAOYpiJts= + +Name: system/lib/libQWiFiSoftApCfg.so +SHA1-Digest: yeU/ITfJELTs7FzUL3phkSx5IPw= + +Name: system/lib/libllvm-a3xx.so +SHA1-Digest: OvCNc7WVXMQmdhGLFSK0gW57Dbk= + +Name: system/lib/libstagefright_soft_aacenc.so +SHA1-Digest: YxEFk6laQA5Nf+yrrz/CwAfQsH0= + +Name: system/media/audio/ringtones/Cairo.ogg +SHA1-Digest: Wu1Tj8Y+jFP5JQjo9tA46NAXzHo= + +Name: system/etc/legal/leaflet/iw/Important-information.html +SHA1-Digest: /PrJNVqzYG1MnnxBeeV6cjaB0lQ= + +Name: system/etc/security/cacerts/cdaebb72.0 +SHA1-Digest: 9xXJaJxcsRt52ZKmLTb10lCP8fM= + +Name: system/media/audio/ui/camera_focus.ogg +SHA1-Digest: gC3Q+2mzdlksAfgGO57Qsr1h39c= + +Name: system/lib/libdrmdiag.so +SHA1-Digest: Y0Mb56KJkRR+bDesUzi3GB+Hcac= + +Name: system/etc/legal/leaflet/iw/Battery.html +SHA1-Digest: v+w1o92EIKzptG8Er72zG/dtD6c= + +Name: system/etc/legal/leaflet/hi/Battery.html +SHA1-Digest: gUEoE2XfOGqdJY/5MqXWvb49QDQ= + +Name: system/etc/fast-dormancy/fd_ext_conf.txt +SHA1-Digest: Fyh/u2aqF/e7atcKvkLd4I4Ybls= + +Name: system/app/POBoxSknPink.apk +SHA1-Digest: wII/mcXPzoJfm+la7HtBWZJTPLg= + +Name: system/etc/legal/leaflet/fr/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: DkOgTwyKe5sWx4abWG2K7XOSzgc= + +Name: system/bin/usf_epos +SHA1-Digest: 2Gj4T62jtex9rTwUD2uxZZflq90= + +Name: system/etc/legal/leaflet/pt/Children.html +SHA1-Digest: dbOwigz6mwQ4zyLPnJ6TmVhOgQQ= + +Name: system/bin/mm-adec-omxaac-test +SHA1-Digest: KrkjbLbPXYnlEKmpTjY37yGljp4= + +Name: system/lib/modules/test-iosched.ko +SHA1-Digest: 156isfCcYUgz9+0tYZ1YW9G7O44= + +Name: system/etc/legal/leaflet/iw/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: 9tfaoIPuUqXM4muKA4u7IK7odd0= + +Name: system/framework/com.sonyericsson.dlna.dtcpplayer.jar +SHA1-Digest: Clh2c1zP904sjHTfFJR7d4Qicrc= + +Name: system/framework/monkey.jar +SHA1-Digest: YzrdTDksKI9LwyKVZ1PSSS4z+HI= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Radio-frequency-(RF)-expo + sure-and-Specific-Absorption-Rate-(SAR).html +SHA1-Digest: nbpcQIzB7Eg9v2LwTJnKDgcVeVw= + +Name: system/bin/mm-aenc-omxamr-test +SHA1-Digest: MYelVTmjGv3u3FPUuOhKVnw4ez8= + +Name: system/etc/legal/leaflet/images/background_header-red.png +SHA1-Digest: 5PbTXP+8njhM6phBhapftF5dt88= + +Name: system/fonts/DroidSerif-BoldItalic.ttf +SHA1-Digest: t/LTfDoGK+Zxd0/1L0/ZXL74E84= + +Name: system/lib/hw/camera.qcom.so +SHA1-Digest: EJyaXylSEykCobVXD0jTxCuVrNY= + +Name: system/etc/legal/leaflet/ru/Power-supply-(Charger).html +SHA1-Digest: lrtE1uzvEPAU/3fg9iaqrAs0n2I= + +Name: system/media/audio/notifications/Deneb.ogg +SHA1-Digest: A/n1V6daSIK3rUsbnFEhKv+2mC4= + +Name: system/media/audio/notifications/Pollux.ogg +SHA1-Digest: FPptPpQOXUNZl6GQkiNugo/f32k= + +Name: system/etc/legal/leaflet/uk/Personal-medical-devices.html +SHA1-Digest: ZoXKSl0szIPXYCrFvjrkjFkn0kM= + +Name: system/etc/legal/leaflet/hr/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: EY57jDml09q4UOdjS4pUO2KuNoM= + +Name: system/lib/libual.so +SHA1-Digest: xTzQqu1uymhxupTkw989rW0ZKhY= + +Name: system/etc/firmware/rpm.mbn +SHA1-Digest: Mbp88bao/ztMMhGQqwVfFwMh+nY= + +Name: system/etc/legal/leaflet/zh-CN/Memory-Card---legal.html +SHA1-Digest: 12llK3lvbqwc1BzLFdpyHjdgyVE= + +Name: system/app/SonySCV.apk +SHA1-Digest: c3Ex6NwBtu0wO9XdfOwZ9h36uL0= + +Name: system/lib/libennjubase1.so +SHA1-Digest: TjitsQ9WulZlytVsvs98x49bCgg= + +Name: system/app/fast-dormancy-wakeup.apk +SHA1-Digest: tXaSHNDD48hH9Gu6hKziX1QTrQ0= + +Name: system/etc/security/cacerts/d64f06f3.0 +SHA1-Digest: 0RWeUYy8yvPc5W09WdfTXhlSn7A= + +Name: system/usr/srec/en-US/grammar.config +SHA1-Digest: +twRBfiA7IzTU1sLmK3tG316qUM= + +Name: system/etc/legal/leaflet/images/arrow_return_pagetop.png +SHA1-Digest: 7+eAQFuUPlK3qtfbav9Krjutsmc= + +Name: system/etc/legal/leaflet/hi/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: CQXr5VbItc24CMjnDu7nxth47J0= + +Name: system/app/SemcPowerSaveModule.apk +SHA1-Digest: vl2pd9YQQSvitGuxs6sjMDHVDhk= + +Name: system/lib/modules/prima/prima_wlan.ko +SHA1-Digest: DpBtKe13EYfoi9uTAfBe2YrndFk= + +Name: system/lib/sysmon/sysmon_wlan_limit.so +SHA1-Digest: CbutirMCQcKNQ2eLW/pX2qDfPZk= + +Name: system/etc/legal/leaflet/vi/Battery.html +SHA1-Digest: NqeA/D+aWL5BHbvuv+6/cUfXKQk= + +Name: system/bin/dxhdcpd +SHA1-Digest: Yjavlw3byGc22ynH7WRRjuSEFfM= + +Name: system/media/audio/ui/Dock.ogg +SHA1-Digest: gEt7PBDOsIdrHSu3Cd0aHVbLi+s= + +Name: system/lib/libfilterpack_facedetect.so +SHA1-Digest: kduWGk1cz2zwFnv/PqJejadfrKw= + +Name: system/lib/libarchive.so +SHA1-Digest: KI1PLVgf02AE/Q8FBNHkIZuN2ng= + +Name: system/media/audio/notifications/Antares.ogg +SHA1-Digest: vUhBb8O5oYcyl1XAhFwC7u50RH4= + +Name: system/app/NetworkLocation.apk +SHA1-Digest: CgNREFfBBIgR2y3kszhOH3YVveA= + +Name: system/lib/libgsl.so +SHA1-Digest: N71rdybrP/P2gdwXZ/DH9oo5mnU= + +Name: system/media/audio/notifications/sirius.ogg +SHA1-Digest: EZRB64I7aAv9SioaPikP2ncU6tU= + +Name: system/bin/startupflag +SHA1-Digest: j/hJRzyx5M2Y1vC8kR3YHjKcAVY= + +Name: system/media/audio/ringtones/InsertCoin.ogg +SHA1-Digest: 0FoEn8ErsdtNf9/BuNTW3haDeRA= + +Name: system/usr/srec/en-US/acoustic_model +SHA1-Digest: cfkvAc/HaQ1I8nrAw+GLdvrr2oc= + +Name: system/media/audio/ringtones/DancinFool.ogg +SHA1-Digest: BbZ9r+HeEb7McJR/ybLMoMHqbd0= + +Name: system/etc/thermald-8930.conf +SHA1-Digest: MEAq/3EQSy0uSZynjbVVRQMbe20= + +Name: system/etc/legal/leaflet/ae/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: /rNwvBQWkqlfjfEYFJOpClaoze8= + +Name: system/media/audio/notifications/Castor.ogg +SHA1-Digest: boqnmu0qwPumHqpv++nFxngwdtg= + +Name: system/bin/v4l2-qcamera-app +SHA1-Digest: jNd9EPBRM/FchPgd1eMkKkozPRM= + +Name: system/framework/semc_audioeffectif.jar +SHA1-Digest: L+ztOIdxzTTyq6PdDJjkz9Z2mhQ= + +Name: system/etc/legal/leaflet/sq/GPSLocation-based-functions.html +SHA1-Digest: qU9zCr1PDMqPqIYlfRIWkN3lK0g= + +Name: system/media/audio/ringtones/LoopyLounge.ogg +SHA1-Digest: QWQkLIPZ5SsqJvVqfT//Rs6ffv8= + +Name: system/lib/libmercury.so +SHA1-Digest: P29VxGo/qHoYxLR/LAxtRdkF2dE= + +Name: system/bin/mm-qcamera-daemon +SHA1-Digest: 7C4jpemu1IxL/G2JEpTeSMJfgEk= + +Name: system/etc/permissions/android.software.live_wallpaper.xml +SHA1-Digest: XSE9c962K3wJVmHaaJ4PglJg9iQ= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Publication-number.html +SHA1-Digest: lt5Ti7nzswLf/5n+hodhF4AuOc4= + +Name: system/lib/libsysinfo_modules/pm8921_batt_control.so +SHA1-Digest: BXQzFy8RHX54P9K5CeWkfrCQSqk= + +Name: system/etc/legal/leaflet/xl/Export-regulations.html +SHA1-Digest: D2gJLzReDhE8xi09s/dvcl5TNYc= + +Name: system/etc/legal/leaflet/ko/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: /WjP2QOM56Z7iFUleYG3ZKjHWC0= + +Name: system/etc/legal/leaflet/mk/Export-regulations.html +SHA1-Digest: RLl7pKpiSyIfChB+ez7xHuWy2H0= + +Name: system/media/audio/notifications/moonbeam.ogg +SHA1-Digest: tLYdZg4VRMe2cRL9Vl+yC0h2O10= + +Name: system/etc/security/cacerts/57692373.0 +SHA1-Digest: cxktqBsx3bsf1do5QynEaxTvX64= + +Name: system/app/StartupBatteryChecker.apk +SHA1-Digest: /QyfCoa9DJhZFeZQOyzN+lgMea0= + +Name: system/etc/legal/leaflet/ms/Our-warranty---12.html +SHA1-Digest: C7jNaul8pK0o8mBL9FbLaJKcE1w= + +Name: system/lib/libandroidfw.so +SHA1-Digest: fHJfRXsPYf9S4RrHwMBE05vachs= + +Name: system/framework/com.sonyericsson.startupflag.jar +SHA1-Digest: 5Y4rQlsWTWl0sZQ89oz/6nNOqCQ= + +Name: system/lib/libjpeg.so +SHA1-Digest: T3UJ41FfePmAwYh1MWsUEUZuTbU= + +Name: system/etc/legal/leaflet/pt/Precautions-on-Memory-Card-Use.html +SHA1-Digest: gIinEcBZBwjeQK8K1JLDesl+J5M= + +Name: system/app/SemcMetadataCleanup.apk +SHA1-Digest: JXUAb5h+OiKBPyP1YfIb0DSKaew= + +Name: system/framework/techdatamanager.jar +SHA1-Digest: sE7XZVBSB98j91i8dblhKRw7wOc= + +Name: system/media/audio/notifications/Arcturus.ogg +SHA1-Digest: WBoc14ocg8TFY6vC4cYgcOV5TQ8= + +Name: system/etc/legal/leaflet/ar/Power-supply-(Charger).html +SHA1-Digest: EYhaKSdmWPWFnnsy8w3R1iLHluw= + +Name: system/etc/audio_policy_8064.conf +SHA1-Digest: ijAGxurtHejMH9GujqOcIWbuRXw= + +Name: system/etc/legal/leaflet/ae/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: u4+a1K2FlGCjYC2U80BnMO836sU= + +Name: system/etc/legal/leaflet/en-HK/Children.html +SHA1-Digest: 3SEmrKglrAq54gnCn37vWqE14D8= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Our-warranty---12.html +SHA1-Digest: 8/q2oIZUGHFa+gEZjpxfLirCVeI= + +Name: system/lib/hw/audio.primary.mpq8064.so +SHA1-Digest: +XE6JaAz2GiPy125iJj24p3AyLo= + +Name: system/usr/srec/config/en.us/models/generic11.lda +SHA1-Digest: /y/sXjBSqRQkFc848OCkAh9PhTE= + +Name: system/etc/legal/leaflet/images/icon_nav_faq.png +SHA1-Digest: QCi+E5xFkg+r7xwQrTeneBvIpe4= + +Name: system/app/FBCalendarSync.apk +SHA1-Digest: kGZTIglupxbRrcc7wVfoKNyN53I= + +Name: system/fonts/SoMADigitLight.ttf +SHA1-Digest: QVLlbjziyFxGKE/pfPh/pexrLA4= + +Name: system/media/audio/notifications/Beat_Box_Android.ogg +SHA1-Digest: bd1z7M+noewQDmKs5wYZwZSH10c= + +Name: system/vendor/camera/flash.dat +SHA1-Digest: 8L/0ywt2syzjRk7qzCYm/C4fTtw= + +Name: system/app/CameraCommon.apk +SHA1-Digest: OKNNqkW6N62N3IAM+DncOVxqRYc= + +Name: system/etc/permissions/com.google.widevine.software.drm.xml +SHA1-Digest: D5sKbh3t3NKqSSHABuiUBEA2Uvg= + +Name: system/etc/legal/leaflet/pb/Accessories.html +SHA1-Digest: 8bIwvJFECDFc5W9Hc6IokkMyKi4= + +Name: system/etc/legal/leaflet/ar/Precautions-on-Memory-Card-Use.html +SHA1-Digest: 77FPhED0/MhR6dZGQyKIzIVHkE0= + +Name: system/app/OmaDownload.apk +SHA1-Digest: nRlVOCgJH3h+GW0xyq6jMF2P4gU= + +Name: system/etc/legal/leaflet/sq/What-we-will-do.html +SHA1-Digest: k1uQRFiNfjbsFdWWHLopY/bWL9c= + +Name: system/lib/libennjubase1us.so +SHA1-Digest: W5Oko87HY1KzZeCVrsIgufZtEhg= + +Name: system/media/audio/ringtones/Noises3.ogg +SHA1-Digest: l6zL+A/dzjGVUjZSaptvx8A4ovg= + +Name: system/lib/libdrmtime.so +SHA1-Digest: slxwbnmQYLrdpXMKPrQbaFV3VLw= + +Name: system/etc/legal/leaflet/zh-HK/index.html +SHA1-Digest: iKFAj2hqTH1QptwGKuoQx0cpsB0= + +Name: system/lib/libgccdemangle.so +SHA1-Digest: w5+dUn8Aeb8vEnHRG0w7Vircp0o= + +Name: system/etc/legal/leaflet/cf/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: NutyrIiWKuUQwA6CNW1de7B135k= + +Name: system/etc/legal/leaflet/images/previous.png +SHA1-Digest: TNYs8LWZpw2GpShBpatFAe5brqg= + +Name: system/app/DownloadProviderUi.apk +SHA1-Digest: foBf/nRjGlztupl+lbti8MsFcrs= + +Name: system/media/audio/ringtones/opal.ogg +SHA1-Digest: 2s+5sYGt57ynsibRsWAWMc318h8= + +Name: system/etc/legal/leaflet/uk/Our-warranty---12.html +SHA1-Digest: yVmof+lPmkrSvOQ1p5IT79FlRdc= + +Name: system/media/audio/ui/Effect_Tick.ogg +SHA1-Digest: pIW7Yvh9oGjscZQMwbra3freDuY= + +Name: system/etc/legal/leaflet/en-HK/Personal-medical-devices.html +SHA1-Digest: g6kgmp+jpEgVkxsSHVzlYihSmJs= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor9.so +SHA1-Digest: MhRPx7SW4My3c5o46s1jriN7ACA= + +Name: system/etc/legal/leaflet/pb/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: NSk1eNiz6HEHwVZIB1ZERavyOVc= + +Name: system/etc/wfdconfig.xml +SHA1-Digest: +QijhhO1O9upaQBlJuMgApMD97g= + +Name: system/etc/legal/leaflet/zh-HK/End-User-License-Agreement.html +SHA1-Digest: F1wSTVv120YYnucJ3xXbXmXo8W4= + +Name: system/tts/lang_pico/it-IT_cm0_sg.bin +SHA1-Digest: z7Ft7pwEG46mPScafCDOoqZt8HE= + +Name: system/lib/libJNISecureClock.so +SHA1-Digest: u1PEj7H2qyxiJ2A/zL6GUHuP0R0= + +Name: system/bin/diag_uart_log +SHA1-Digest: tDqTMRzbe6rZdEJwIXRnBqL8w/o= + +Name: system/media/audio/ringtones/BeatPlucker.ogg +SHA1-Digest: EVMh+8uC9M8qHZow5TRXOxZnEvA= + +Name: system/lib/libnl.so +SHA1-Digest: B44PHx2wtSy9hAHczg3iEdb7jBY= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/mesh_purple_hd1080p_small.png +SHA1-Digest: t7Fvf53Anr2NHCndN5WO8O4JEPA= + +Name: system/etc/legal/leaflet/pt/no-title.html +SHA1-Digest: Fw13a1hZleQqQOwozt24QH3EiEI= + +Name: system/media/audio/ringtones/Hydra.ogg +SHA1-Digest: jqYTIjewvJlEZWrCaOibuc1vCmA= + +Name: system/bin/qseecom_sample_client +SHA1-Digest: Oa+bnpYjDPVBPiLl5hL0qLuS6sc= + +Name: system/media/audio/ringtones/craft.ogg +SHA1-Digest: y1TmN47DUNvjtCmPOPc9v+7oEKo= + +Name: system/framework/com.android.future.usb.accessory.jar +SHA1-Digest: CcG2XJ8t+4LOjc77pGuNNNOaZ4A= + +Name: system/media/audio/ringtones/Road_Trip.ogg +SHA1-Digest: KwIZKMKgxnFwdH8QswcuRPBUxdc= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_purple_small.jpg +SHA1-Digest: svvY/lQ0Wk35cHLjn/A7pyuKbdw= + +Name: system/lib/sysmon/sysmon_usb_current_limit_level.so +SHA1-Digest: Sm7v2GWOcgme/KxXY51BBMr66nk= + +Name: system/bin/installd +SHA1-Digest: MCBdGcoGni26OBHVRfSkYx2QqYM= + +Name: system/media/audio/notifications/Highwire.ogg +SHA1-Digest: a4posBTV+0q5h7jBDw3WmUDYT6o= + +Name: system/etc/legal/leaflet/mk/Service-and-support.html +SHA1-Digest: k0XA/BRVS8ne7xG7j2zpFiUYZas= + +Name: system/media/audio/notifications/CaffeineSnake.ogg +SHA1-Digest: 74akGXnH3pLhPveosocbS/cIf/I= + +Name: system/etc/legal/leaflet/xl/Protection-of-personal-information.h + tml +SHA1-Digest: SjWxOTfO5Ej0DiTmRyZriz6w20A= + +Name: system/etc/legal/leaflet/en-HK/Radio-frequency-(RF)-exposure-and + -Specific-Absorption-Rate-(SAR).html +SHA1-Digest: nbpcQIzB7Eg9v2LwTJnKDgcVeVw= + +Name: system/etc/legal/leaflet/th/Memory-Card---legal.html +SHA1-Digest: EDE60QU5CGl1wTc/uSekYj5Qwm4= + +Name: system/lib/hw/gps.default.so +SHA1-Digest: 5tUgIiwFNzpyNDMSbwoKGdyrn/w= + +Name: system/etc/security/cacerts/b0f3e76e.0 +SHA1-Digest: Xyiw528S3pbKQvg1OVh6hyfYS8k= + +Name: system/bin/cnd +SHA1-Digest: mNj+6g6ZEoKoneTDstoL+rvXQAY= + +Name: system/etc/legal/leaflet/hr/SIM-card.html +SHA1-Digest: F9MStHxBmQ/jAKT2QBz6CRJkIUU= + +Name: system/media/audio/camera/common/selftimer_2sec.m4a +SHA1-Digest: vmsCXg79RoJmWUxmscq64jbW9yY= + +Name: system/etc/legal/leaflet/mk/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: M53Um64/S5+f6gkLTHAfoYkNqJ4= + +Name: system/etc/legal/leaflet/ar/Important-information.html +SHA1-Digest: MLXq/xMGtmWiC9nXEL6QKQg6DgU= + +Name: system/etc/legal/leaflet/pt/Export-regulations.html +SHA1-Digest: SoiVjJmbLn0Dd0gJvgyojqnXPm4= + +Name: system/etc/legal/leaflet/bs/SIM-card.html +SHA1-Digest: 6AQY0vorJywPVffwoGH9Gn8tAfM= + +Name: system/usr/keylayout/Vendor_054c_Product_0268.kl +SHA1-Digest: AHzPYrfjA0QHSpO6s67YfBjJQZU= + +Name: system/app/com.sonymobile.retailrestore.apk +SHA1-Digest: KgLG/wT/gdr9BfMrHt1Qdsb9jCw= + +Name: system/semc/chargemon/data/non-charging_animation_03.png +SHA1-Digest: H/jutu49vZvYUXAGwJRgX6rxiv4= + +Name: system/etc/legal/leaflet/zh-HK/Driving.html +SHA1-Digest: diiSChxKlHAH3sfFD5Y+DjJ4bT4= + +Name: system/etc/legal/leaflet/en-HK/Accessible-SolutionsSpecial-Needs + ---USROW.html +SHA1-Digest: i0BrNfPYJcLaCx5ZFaCfp6bt/4o= + +Name: system/etc/firmware/tzsuntory.b00 +SHA1-Digest: 1vztQhKb8n8RSGtRmUKSORrbGiM= + +Name: system/etc/firmware/tzsuntory.b03 +SHA1-Digest: sSw1U/8c/yJ04F9z9eON/5Mudu8= + +Name: system/etc/firmware/tzsuntory.b02 +SHA1-Digest: 3TWHa9RlDLW7IGsrSuYyG5HKek0= + +Name: system/etc/wifi/wpa_supplicant.conf +SHA1-Digest: R0CQC7qfabeOPZvu5yXu/a5ZIrY= + +Name: system/etc/firmware/tzsuntory.b01 +SHA1-Digest: IL5PsqaT9tkxUK3yEyNBI4wt5rY= + +Name: system/etc/legal/leaflet/sq/Accessories.html +SHA1-Digest: MobdubQoAGPEq3uvx0i51Whq2SM= + +Name: system/etc/firmware/touch_module_id_0x36.img +SHA1-Digest: BPg5LVdSKvfV34Lp34K08ocsAHE= + +Name: system/lib/libiprouteutil.so +SHA1-Digest: BU/WF2ozw+yM049pNH01ojUL0Qs= + +Name: system/etc/thermald-8960ab.conf +SHA1-Digest: nr5NLkWp+mI1ZsNTxJjNcHh6Z+M= + +Name: system/usr/srec/config/en.us/grammars/boolean.g2g +SHA1-Digest: Y6aiso1+39wx/fFSodB1MOdR7GQ= + +Name: system/etc/legal/leaflet/hi/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: 4g182arBOuZ+e3kf7lBPm/Efvts= + +Name: system/etc/legal/leaflet/sr/no-title.html +SHA1-Digest: R2sHmzgmkiKPf6lVXkOgCYWFshQ= + +Name: system/media/audio/notifications/Polaris.ogg +SHA1-Digest: KRM0PlwwsGJSo9+ofaegkmsv56w= + +Name: system/etc/legal/leaflet/ae/Loudness-warning!.html +SHA1-Digest: LFuawyxJLUhParqq17DfF3vOu3A= + +Name: system/usr/keylayout/Vendor_046d_Product_c299.kl +SHA1-Digest: wIcNdtms/WYTXXig4lG68oFo/4A= + +Name: system/etc/legal/leaflet/sr/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: bZCTMwPFf3a6lhpkrE8HshUqf1E= + +Name: system/lib/libswiqisettinghelper.so +SHA1-Digest: e5LZOwQraVjXBzZzsqHZTEd1BAA= + +Name: system/lib/libEGL.so +SHA1-Digest: Jk7CkIyVEpBg1hR8/kdw9sXPCfc= + +Name: system/etc/permissions/com.sonyericsson.musicvisualizer.xml +SHA1-Digest: hOxINigVjt42sh+uMkjA9XURuiQ= + +Name: system/etc/legal/leaflet/cf/Accessories.html +SHA1-Digest: RmDg7KEDBx7oKDmVTFiqnO5mAgQ= + +Name: system/app/SemcCalculator.apk +SHA1-Digest: emRyiCr/gbST+dB9oznBMqsdzr0= + +Name: system/lib/libsensors_akm8963.so +SHA1-Digest: YLSP9ahbzX4A2J09Y5h1RxU6O7U= + +Name: system/etc/legal/leaflet/sq/End-User-License-Agreement.html +SHA1-Digest: Jgx8z3FibwvqDDVv0gCsXkZLpRg= + +Name: system/etc/firmware/vidcfw.elf +SHA1-Digest: Mx4rvApSUBdci9CXVoQAtIaY1jQ= + +Name: system/etc/legal/leaflet/xl/Service-and-support.html +SHA1-Digest: Q/xmpasBHwISBNHc6iunRwKT5K4= + +Name: system/etc/legal/leaflet/fr/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: s2M9LVrNxh4UJONI5gSJ92uFXJ8= + +Name: system/app/SmartcardService.apk +SHA1-Digest: 9a+qlAlOyfdpRV7VNSgccTzyAHA= + +Name: system/media/audio/notifications/allegro.ogg +SHA1-Digest: 9CQmBo6lVzZ7WlTXN130gYExKxg= + +Name: system/etc/legal/leaflet/pb/Conditions.html +SHA1-Digest: O/U/plSogdpVKzvbEM0ZEZ44B7c= + +Name: system/etc/legal/leaflet/ae/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: bweP6U8AmReXH9kVDltG7dOubi4= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_blue_small.jpg +SHA1-Digest: dgthlEAR9uC0v8FjvlGjfJOXj0U= + +Name: system/etc/legal/leaflet/xl/Publication-number.html +SHA1-Digest: 1hPBZlXZekBcYsRbrhd1d15ctno= + +Name: system/etc/legal/leaflet/zh-HK/Power-supply-(Charger).html +SHA1-Digest: 4u+7zbKV1eXV01zxeYmSGYtePZ0= + +Name: system/etc/legal/leaflet/sq/Important-information.html +SHA1-Digest: UTVwABkdWHUejlnTsI5HshErGcg= + +Name: system/etc/legal/leaflet/mk/Accessories.html +SHA1-Digest: Ihn9lp0ddDEoncyJeSdbVJH/oXc= + +Name: system/etc/permissions/com.nxp.mifare.xml +SHA1-Digest: NHX3y1UpJ+hZmxuIG3M5wc2meZQ= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Battery.html +SHA1-Digest: RG3bKCfP0xnuGcwJadp4HjZLsl0= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Personal-medical-devices.ht + ml +SHA1-Digest: g6kgmp+jpEgVkxsSHVzlYihSmJs= + +Name: system/media/audio/ringtones/Machina.ogg +SHA1-Digest: OaXEhjywV4aWpMF7hvRCkGhGThM= + +Name: system/media/audio/ringtones/Sceptrum.ogg +SHA1-Digest: 3CvRitKOPe6Af8cxH6f5owdC40c= + +Name: system/media/audio/notifications/Heaven.ogg +SHA1-Digest: jGewjg2m5+5bVmE98bUc78RO9ts= + +Name: system/bin/qcks +SHA1-Digest: k4k5dk2i3gsv8Zw79jz2TF4cme8= + +Name: system/etc/legal/leaflet/fa/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: PZ06BpJMnvJe9wl42MiH9FxAP+Y= + +Name: system/etc/security/cacerts/add67345.0 +SHA1-Digest: 7q4BGtgTYUE358iZPLoaZft9+1U= + +Name: system/lib/libstagefright_omx.so +SHA1-Digest: GCHWkiQcIIK1fg31QbVFE94pveg= + +Name: system/usr/xt9/SEMC_810_r1-4_CAlsUN_xt9.ldb +SHA1-Digest: uOdzBuahfrKo9WrqXt/yaMfDnO0= + +Name: system/media/audio/alarms/Alarm_Beep_03.ogg +SHA1-Digest: h/yxjAGYwFu7hk6fuC+OyL1QG18= + +Name: system/lib/libstagefright_soft_amrdec.so +SHA1-Digest: +chIeq9gxianQuTy+PcdPJoUrJQ= + +Name: system/usr/srec/config/en.us/grammars/VoiceDialer.g2g +SHA1-Digest: XmIZbaPyRCbQlbRk8avvfTN0VF4= + +Name: system/etc/legal/leaflet/en/What-we-will-do.html +SHA1-Digest: cajhNcCCTJE78qFqdx+O4LxWkRY= + +Name: system/app/YouTube.apk +SHA1-Digest: KaSiAEByYHer4OCtPo8GXju5nww= + +Name: system/lib/libmmrtpdecoder.so +SHA1-Digest: heznMD6Z/XkLVGGlTVO6hz0/RG0= + +Name: system/etc/legal/leaflet/en-PB/Battery.html +SHA1-Digest: RG3bKCfP0xnuGcwJadp4HjZLsl0= + +Name: system/etc/legal/leaflet/pb/Antenna.html +SHA1-Digest: RxiEym3ixAXNH+rEgwSeMP6udwI= + +Name: system/etc/legal/leaflet/iw/Children.html +SHA1-Digest: XiIQ8cp0HDYbfCeS7DmVhagcZ0A= + +Name: system/lib/lib_dxhdcp_provisioning.so +SHA1-Digest: h1PLPdQxB4epPBaHZ1W62OjKK5M= + +Name: system/usr/share/bmd/RFFstd_501.bmd +SHA1-Digest: 0k98ukIhHL0h2zs4tRS2FMidCtE= + +Name: system/etc/legal/leaflet/fr/index.html +SHA1-Digest: 1lp9OqfeQaBRyPMr/KTOY1ZL/38= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/cloudy_mountain_hd1080p.png +SHA1-Digest: VtGJw7Qq1dYbcZ1rPclUbE96OmQ= + +Name: system/etc/security/cacerts/17b51fe6.0 +SHA1-Digest: hKFYfH2Zix7tBH5I1wFZbo/Uu1M= + +Name: system/media/video/AndroidInSpace.480p.mp4 +SHA1-Digest: QCHAIaPGaoiaSk15qPWwYy4wF4I= + +Name: system/bin/mm-vdec-omx-test +SHA1-Digest: k1IlOSrWVb7SwoZbEZG3OBNl5E0= + +Name: system/fonts/DroidSansThai.ttf +SHA1-Digest: 90bP0Gb6wvJfiap86bLKmXUIXpg= + +Name: system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N + /full_model.bin +SHA1-Digest: KblDOYF2yaers6P16X1U78FNHmo= + +Name: system/bin/time_daemon +SHA1-Digest: +8bKkJzyBUQiUhxzTjqEUOHlaxA= + +Name: system/app/BrowserProviderProxy.apk +SHA1-Digest: /+/+bl27dJsKBRQ1eFTuWiMFBAA= + +Name: system/app/SemcAutoPowerOff.apk +SHA1-Digest: a/5PO6RvPVmm4VWylvPoMXG2jsA= + +Name: system/bin/.ext/.su +SHA1-Digest: bV0DtQUDjPcpO9D2iEpOC1IZfLY= + +Name: system/etc/legal/leaflet/fa/Protection-of-personal-information.h + tml +SHA1-Digest: x1cAc6dy6Y1vikZP3nL0NrZvJpo= + +Name: system/bin/mm-aenc-omxaac-test +SHA1-Digest: hfxjkkhTNYxupNbI5aLrewAKr4A= + +Name: system/app/GoogleServicesFramework.apk +SHA1-Digest: xY72CXlkz82QAw4g0t+bMigO888= + +Name: system/media/audio/notifications/KzurbSonar.ogg +SHA1-Digest: 8PjixrBAEb9YkpuOd/Vdb2isbTc= + +Name: system/etc/legal/leaflet/th/Power-supply-(Charger).html +SHA1-Digest: /AqnRafPwvaYhCIEcY33MELEdIA= + +Name: system/etc/legal/leaflet/zh-CN/Accessories.html +SHA1-Digest: sGD7Z5TDYuyjr3mZLtyPl9GMNU4= + +Name: system/app/Phonebook.apk +SHA1-Digest: U46ShIjsDT7Uj5OQjpo4/z5WfEU= + +Name: system/etc/legal/leaflet/ae/Export-regulations.html +SHA1-Digest: N71TIH813G+1h/L/kb63t9Oz4Fo= + +Name: system/etc/hostapd/hostapd.deny +SHA1-Digest: GVItORqS9wHTMpvNnMG9gQ5biaM= + +Name: system/etc/security/cacerts/e7b8d656.0 +SHA1-Digest: H+gcIZ25xZ2zXtjkS4UDXDJdo7o= + +Name: system/media/LMprec_508.emd +SHA1-Digest: 6FhFfYVqFx0dhdkGKfVq/4ek+GY= + +Name: system/etc/legal/leaflet/pb/Personal-medical-devices.html +SHA1-Digest: 7weqWiOrirqS984Td+CVvm/PVAU= + +Name: system/etc/legal/leaflet/en-PB/Guidelines-for-Safe-and-Efficient + -Use.html +SHA1-Digest: bQLOW8C8ZQZp2FV1RXYl3ybzhc0= + +Name: system/media/audio/ringtones/Ring_Synth_02.ogg +SHA1-Digest: GAkS3fU7B8v3z0jDjkeiFay+c3c= + +Name: system/etc/legal/leaflet/en-PB/Memory-Card---legal.html +SHA1-Digest: GQnCAtOtbv49C8ciRyue2e1cuD4= + +Name: system/media/audio/Krewella - Play Hard.mp3 +SHA1-Digest: hW2PWSzjCjK9slZzW2d9yIE8jO4= + +Name: system/framework/com.sonyericsson.idd.jar +SHA1-Digest: F+adhV5TIvStfnkOMDXUZndgXLc= + +Name: system/etc/legal/leaflet/pt/End-User-License-Agreement.html +SHA1-Digest: TrqY0t3gxQgT4xuXjks/tC6waeA= + +Name: system/lib/libbcc.so.sha1 +SHA1-Digest: rr9usdKlf9SdE7nyEJnF6dy+H44= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_pattern_hd1080p_small.png +SHA1-Digest: NFvwKLIFPl2RGagcPfAv1c1ZaLs= + +Name: system/app/SocialEngineFacebookPlugin.apk +SHA1-Digest: Y5Nheo6IL/1nccytKRlqW9jJxNU= + +Name: system/lib/sysmon/sysmon_batt_therm.so +SHA1-Digest: YTHEQWiI3VT73GtVSSnihBWLfY8= + +Name: system/media/audio/ringtones/Nassau.ogg +SHA1-Digest: UxAOHSzF6B3ws8+wHazzGoWu0IE= + +Name: system/etc/legal/leaflet/iw/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: jSs+3exqnOe84XbpPz7we+bxiwY= + +Name: system/app/AudioEffectService.apk +SHA1-Digest: Cb07IazFQv1Z8bbn+C8w7g5Hy8Q= + +Name: system/lib/libril.so +SHA1-Digest: eY2EnrsxPyp0L671LW4Lhb7QC6I= + +Name: system/etc/permissions/com.sonyericsson.android.socialphonebook. + xml +SHA1-Digest: GHcCpLxxNpoYGnVOaB4OFWjccWY= + +Name: system/etc/legal/leaflet/ko/Malware.html +SHA1-Digest: O5e9QDrd3D9MbCzCuirky+Dvklw= + +Name: system/app/POBoxSknMono.apk +SHA1-Digest: Pzd5cW/FJyEGH++ip7udZFRiYnY= + +Name: system/lib/libdnshostprio.so +SHA1-Digest: cF6mGRY8nXnyJNvPJH2JatGYy9w= + +Name: system/lib/libttscompat.so +SHA1-Digest: bKXLh3jK0Ty61fBtL9ZMef1Mwcw= + +Name: system/bin/isdbtmmtest +SHA1-Digest: tPJsvLryEmw5yMao15gcyJEJuj4= + +Name: system/etc/legal/leaflet/en/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: 9HOcLjMUcrdoY1GmdL9rEgndisc= + +Name: system/bin/sdptool +SHA1-Digest: 0CALGgeCj4dspw9huYToZ1cv5sw= + +Name: system/media/audio/ringtones/Funk_Yall.ogg +SHA1-Digest: bTUJuGij78XPtGvYGLa1OX0f8X8= + +Name: system/etc/legal/leaflet/fa/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: KEGm4Ck8WFzD+CX+YlfgokUaPBw= + +Name: system/bin/test_gemini +SHA1-Digest: 9v3KdCGDaq9Jhw5HEJ3zStgxHWo= + +Name: system/etc/legal/leaflet/zh-TW/GPSLocation-based-functions.html +SHA1-Digest: frncKDqY8Sp1mwDFUROw8cATHHs= + +Name: system/etc/permissions/org.kxml2.wap.xml +SHA1-Digest: 2TtVBmCqy9Kfbr6lOpAmqCQ2NCY= + +Name: system/app/ArtFilterCamera.apk +SHA1-Digest: StcOY+LA9EpN4/3uY9CwpoQ+psU= + +Name: system/etc/legal/leaflet/in/Driving.html +SHA1-Digest: aSW/7uJG+8GMyMMlGOWmSDKbRRA= + +Name: system/etc/legal/leaflet/fa/Warning!.html +SHA1-Digest: 52kC4NsZjdQ3sxJ5MABcqPga3vo= + +Name: system/lib/libsysinfo.so +SHA1-Digest: Y2AssHWP4dh7Ej83kK5OWDWtk60= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_black_small.jpg +SHA1-Digest: 0n2ATeOb8dhpq4Z7+ZMdtf3UQzQ= + +Name: system/etc/legal/leaflet/in/Battery.html +SHA1-Digest: tkxndoB6/txf1V7JBvGwV/eNsmM= + +Name: system/etc/firmware/dsp2.mbn +SHA1-Digest: ENgrQd/Mb/grER9WAp1x62dkkuA= + +Name: system/etc/security/cacerts/4e18c148.0 +SHA1-Digest: 1Cu+Q2UOC9j8wfjVMl1AK6h2IPo= + +Name: system/media/audio/ringtones/Seville.ogg +SHA1-Digest: i74ARuYFFMCbQRq2aJOx8mW/K40= + +Name: system/etc/security/cacerts/ff783690.0 +SHA1-Digest: 7sOkn8zxphGUXHNkddKmw5n9Lrw= + +Name: system/etc/legal/leaflet/uk/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: uLhKmTAH8nHvcs9ruZPdXqCYNVw= + +Name: system/media/audio/ringtones/Eridani.ogg +SHA1-Digest: gm7jez3mMT2DbKX6B2pLEy4Wq4s= + +Name: system/etc/legal/leaflet/mk/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: TUuRH7zPsZyxVKE8kCsjdASJ5Ig= + +Name: system/etc/legal/leaflet/en/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: nbpcQIzB7Eg9v2LwTJnKDgcVeVw= + +Name: system/media/audio/notifications/Strontium.ogg +SHA1-Digest: a1e5tA7dkby1GQ89ZsBkeex/piU= + +Name: system/etc/legal/leaflet/en-PB/Disposal-of-old-electrical-and-el + ectronic-equipment.html +SHA1-Digest: bzoFF9tcHpcNcwsHtCRKhhapLm4= + +Name: system/bin/radish +SHA1-Digest: j1xpfsfDDDGjezaPjKqCIOuGb6M= + +Name: system/etc/permissions/com.sonyericsson.dlna.xml +SHA1-Digest: yeksgBaMEzEzkaCLK3qWRuOpI10= + +Name: system/bin/tlcWrapperApp +SHA1-Digest: Kzo5/85UFQjPnlxDGQB9jVLjnUk= + +Name: system/etc/legal/leaflet/sr/Service-and-support.html +SHA1-Digest: QlQHAfs3zW3J+amvwq3HfyILys4= + +Name: system/etc/legal/leaflet/sr/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: fGUKHOy8rrrkAFU79wHVdJFkNXc= + +Name: system/lib/libwfdmmsrc.so +SHA1-Digest: tlYnvmWcdsIhk5oUXcVOg4DEIUc= + +Name: system/usr/srec/en-US/hmmsyms +SHA1-Digest: 91T/MhByCAfKs+vOQQiZsYXNWsM= + +Name: system/usr/keychars/Generic.kcm +SHA1-Digest: OIjK3iqPcTGY5f9GOefCLwVUTSo= + +Name: system/lib/libmpqavstreammanager.so +SHA1-Digest: wMPx3u8yzsZ4ChKsfnAhtIFCK6Q= + +Name: system/etc/legal/leaflet/kk/Our-warranty---12.html +SHA1-Digest: 0vQB8IRIMawxNF/v4Kn59JYBtwI= + +Name: system/lib/libmmcamera_interface2.so +SHA1-Digest: nE8h5AxtdY/1gguq4ezVDoObEus= + +Name: system/app/nfc-handover.apk +SHA1-Digest: bXZfx9i5iSHep5yu2w8aTO9dhB8= + +Name: system/etc/legal/leaflet/ae/Warning!.html +SHA1-Digest: N8A8HQwVwJt+Li/aeCia8UcIvn8= + +Name: system/etc/legal/leaflet/pb/Emergency-calls.html +SHA1-Digest: 2fqt9co0a0Vr46NvjUizuE/NbB8= + +Name: system/lib/libmbe_paramselector.so +SHA1-Digest: 2+A1aYPoPWtbRvEVjDY67ksGhSw= + +Name: system/lib/libsurround_proc.so +SHA1-Digest: lPGBToH9vFhmwEWwAbpxfSUPV3s= + +Name: system/etc/legal/leaflet/pb/Battery.html +SHA1-Digest: z0EMeoO2ajxu7m/V7AQnqY5WaBg= + +Name: system/media/pictures/pamukkale_03.jpg +SHA1-Digest: SkUaWcBlJJcDumrAA6Ktbd/jmD4= + +Name: system/etc/permissions/com.sonyericsson.facebook.proxy_1.xml +SHA1-Digest: MYv2Hj5fBVKaCk/VO+p8rtJrIT0= + +Name: system/etc/legal/leaflet/en-HK/Copyright-and-trademarks---Legal- + leaflet.html +SHA1-Digest: 9HOcLjMUcrdoY1GmdL9rEgndisc= + +Name: system/bin/mm-venc-omx-test720p +SHA1-Digest: tcgiHHYEWqDnAZ7/vxMz48yTe3U= + +Name: system/lib/libFFTEm.so +SHA1-Digest: XEGb6+WsgPRiXlWpV9lPGEQw7hg= + +Name: system/etc/legal/leaflet/images/LEGAL-TAKEAPART-low.jpg +SHA1-Digest: DZtzqx30i8XomMhFvIUj3Zb0AyQ= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Limited-Warranty.html +SHA1-Digest: ecfZhgMgLKUuLnY9JpcmeQWFXBk= + +Name: system/etc/legal/leaflet/xl/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: SS39YEwg+wPajKGPb7sI8S9bnKI= + +Name: system/usr/keylayout/Vendor_05ac_Product_0239.kl +SHA1-Digest: 0R+he6vcnn7eY/jqIcFaCiCK7rE= + +Name: system/lib/libmmhttpstack.so +SHA1-Digest: OgvsLNiHLL0tDMqyuWCJEuBhS5E= + +Name: system/bin/mm-video-driver-test +SHA1-Digest: fQ1YbIvgPHX2WMWh1LV9fmmXn5Q= + +Name: system/media/audio/notifications/Altair.ogg +SHA1-Digest: NY49yLD5ph9FlmTZn+GXwah6BOQ= + +Name: system/fonts/DroidSansEthiopic-Regular.ttf +SHA1-Digest: iFu88W2tFX67p/lLUPlONycOIdU= + +Name: system/media/audio/Train - Drive By.mp3 +SHA1-Digest: gsDwJmIw+9JK/TkKd/rPo7JPUsQ= + +Name: system/media/audio/alarms/tripod.ogg +SHA1-Digest: YmumNJZ16ZsGGFkWBKjeJVxQtJw= + +Name: system/etc/legal/leaflet/uk/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: MTqJu0YPtIsKkq8JneQ/LqDd63o= + +Name: system/lib/sysmon/sysmon_gpu_perflevel.so +SHA1-Digest: Doxco1k/wNLjetCCSKtGxmPj/Mc= + +Name: system/etc/legal/leaflet/ar/Limited-Warranty.html +SHA1-Digest: y02etD/ub3eWstYQ/h8ZJBtBiMw= + +Name: system/lib/libNimsWrap.so +SHA1-Digest: tbKuBG5740yuyb27BTSFvv6QuO0= + +Name: system/media/audio/notifications/Tinkerbell.ogg +SHA1-Digest: pqg0+/U/fm7flY7jUkBGVslsiV4= + +Name: system/lib/libvideochat_stabilize.so +SHA1-Digest: 51zUOY6tjmgc4biG/R8+WTwQvgc= + +Name: system/app/SemcSimDetection.apk +SHA1-Digest: o1a1SAF7/Ow8a2wvmXD/O7XomLM= + +Name: system/tts/lang_pico/it-IT_ta.bin +SHA1-Digest: HKQqkLPKlZzLKMjUtrSHc56oLsw= + +Name: system/etc/legal/leaflet/zh-TW/Copyright-and-trademarks---Legal- + leaflet.html +SHA1-Digest: 1H5hbsHWAhZOFOByJHYlyXEbotM= + +Name: system/etc/legal/leaflet/en/Important-information.html +SHA1-Digest: pH3DLIK9r2v+QnTt6Z9xbvJwzbM= + +Name: system/usr/xt9/SEMC_810_r1-5_TRlsUN_xt9.ldb +SHA1-Digest: SY9ouRssx3yX4tTiBYD0MBTQXcc= + +Name: system/media/video/AndroidInSpace.240p.mp4 +SHA1-Digest: EIjyor7ce61epfv9od32lpdyvXs= + +Name: system/lib/libWVphoneAPI.so +SHA1-Digest: tfhAPiVo+Fp/al91zrUzmbiij8k= + +Name: system/app/Velvet.apk +SHA1-Digest: biIH+fmjLv/1Xj63uiLbbgZrLlM= + +Name: system/etc/legal/leaflet/uk/Protection-of-personal-information.h + tml +SHA1-Digest: iD+9WbpWur+I+JTYGPOzLfXLrXc= + +Name: system/etc/legal/leaflet/images/LEGAL-HEAT-low.jpg +SHA1-Digest: mcweNFOlsaXQzF7d/zocKczyRPI= + +Name: system/etc/legal/leaflet/hr/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: AIl+rvzEDsPpwjs70rOkpW/hw3c= + +Name: system/etc/legal/leaflet/mk/What-we-will-do.html +SHA1-Digest: erE9ic48KKhbzfp/97BWyYUl7VM= + +Name: system/usr/keylayout/Button_Jack.kl +SHA1-Digest: tCbdaY2IWVi5c9mYg15v2hBbNH0= + +Name: system/lib/libmmmpo.so +SHA1-Digest: 74+zVfB2+31rC8SBDBlV45qh+Ls= + +Name: system/etc/legal/leaflet/xl/no-title.html +SHA1-Digest: yRDJu12UcJaEAuGH+SJF07xKR8E= + +Name: system/media/audio/notifications/excitement.ogg +SHA1-Digest: gQD9tyrS8z+4/bMhjgCIKJFpxis= + +Name: system/etc/legal/leaflet/en/index.html +SHA1-Digest: ebXx1Fb2jazNlqTQHzPYQ3S+BGU= + +Name: system/etc/legal/leaflet/en/Power-supply-(Charger).html +SHA1-Digest: UMjshK+yh0iRQyWvvpUFqojIp28= + +Name: system/lib/libimage-jpeg-dec-omx-comp.so +SHA1-Digest: +O1gvz/FDnyo4Yogj7L5V+8dRAs= + +Name: system/etc/legal/leaflet/vi/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: WYMtxuqFmkpRp6LE4uMUZIXJxiY= + +Name: system/lib/libreference-ril.so +SHA1-Digest: 51cNmtfFT7KWP+flKAhBbNhmtqU= + +Name: system/bin/mm-video-encdrv-test +SHA1-Digest: TaZdZhFUK7SI3fzuaA2wiBiRyyU= + +Name: system/app/WAPPushManager.apk +SHA1-Digest: UbPr7SaAWdo95BSCdx3NnxqDWtU= + +Name: system/lib/sysmon/sysmon_lcd_brightness_level.so +SHA1-Digest: tLMLkRrQqtece58RDhc4dCEI6O4= + +Name: system/lib/libmmcamera_imx091.so +SHA1-Digest: tVlvRRTA3dP8fxIwTV7oqMJmvsE= + +Name: system/lib/libC2D2.so +SHA1-Digest: wIQ5bsgYGpQL4VK/b76HsVTvAY8= + +Name: system/bin/subsystem_ramdump +SHA1-Digest: 2tiAj8Lu/OBnLprKdgHB3CThwns= + +Name: system/etc/legal/leaflet/en-HK/Disposal-of-old-electrical-and-el + ectronic-equipment.html +SHA1-Digest: bzoFF9tcHpcNcwsHtCRKhhapLm4= + +Name: system/lib/libMcClientQC.so +SHA1-Digest: S3QvFfZ6BYInSdzxGFHLHkGSMQc= + +Name: system/etc/legal/leaflet/ae/What-we-will-do.html +SHA1-Digest: tzNyDb/O/OBqx+T8GXJwrOaCRFE= + +Name: system/bin/sensorservice +SHA1-Digest: LP7Ov/1BSwY9eXtP43YERlNwX18= + +Name: system/lib/libOmxMux.so +SHA1-Digest: Mi5+jzgc2to1L0Ctj6wqSea6ruU= + +Name: system/etc/legal/leaflet/zh-HK/Accessible-SolutionsSpecial-Needs + ---USROW.html +SHA1-Digest: zQ60uRgXMhVzD0eaaTjiBis9AbY= + +Name: system/media/audio/One Direction - Take Me Home.mp3 +SHA1-Digest: XFPpXxX53wvJb1zsbrsrY+dK2Hs= + +Name: system/etc/legal/leaflet/images/LEGAL-CE0682-low.jpg +SHA1-Digest: 8wORx/IYRzu/cAgvgMMRb4SNXEM= + +Name: system/lib/libstagefright_soft_h264enc.so +SHA1-Digest: wrpGULbkX82nJ38+Bt16sVpSyes= + +Name: system/etc/init.goldfish.sh +SHA1-Digest: oVAMzXnCy588jqkgurss/oczzDA= + +Name: system/etc/legal/leaflet/fa/SIM-card.html +SHA1-Digest: ytJf21oTy9/eLV3nkJyHi5FKFx0= + +Name: system/etc/legal/leaflet/ms/index.html +SHA1-Digest: j44zYj9/YrRRunX0a6xS3c54ERo= + +Name: system/etc/legal/leaflet/zh-CN/GPSLocation-based-functions.html +SHA1-Digest: YjmFw2Bw4I1NVg648MEdJNUU6j4= + +Name: system/etc/legal/leaflet/pb/Warning!.html +SHA1-Digest: r3f08f7ZtCRYwrxCF3C5n8dV2Gc= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/moody_sunset_hd1080p_small.png +SHA1-Digest: AMkcnUmPcHgp9BuCw7/pQKa0aEg= + +Name: system/app/SmallApp-Timer.apk +SHA1-Digest: DKmIUNULBgu1xIWWUg/wM+/1WmM= + +Name: system/etc/legal/leaflet/hi/Our-warranty---12.html +SHA1-Digest: TpDXFtFnziOnw8H2S9csCe/xw9s= + +Name: system/etc/legal/leaflet/hr/Children.html +SHA1-Digest: FzUVao3dDqs7x4/fj8TYgNkx+sk= + +Name: system/bin/vdc +SHA1-Digest: jdsEH2oay8+5bFGIyY4R7+fKG3U= + +Name: system/bin/qmiproxy +SHA1-Digest: hwC7V3AG5oQNHV10jdS88Ns+d+8= + +Name: system/etc/security/cacerts/f4996e82.0 +SHA1-Digest: e7OjBFQ1iru2cH13tni5XjfcfHw= + +Name: system/etc/legal/leaflet/kk/SIM-card.html +SHA1-Digest: 3mfcHuFjiAS8C4/6iNsLcNnhDrQ= + +Name: system/usr/srec/config/en.us/grammars/phone_type_choice.g2g +SHA1-Digest: Z3YKR+VbcDEuAiO5Qd2G4wsvIVg= + +Name: system/etc/legal/leaflet/zh-HK/What-we-will-do.html +SHA1-Digest: C0ftKYHnZLdWDd4PDkxnVnHpXYU= + +Name: system/framework/org.kxml2.wap.jar +SHA1-Digest: NAxwpKa6VdbtgNWtjY8yeR0JyuE= + +Name: system/etc/legal/leaflet/ms/Warning!.html +SHA1-Digest: XAPDxMNoAKa1gzXYDETDxIJlWb0= + +Name: system/media/audio/alarms/Helium.ogg +SHA1-Digest: zlxH1fVNStv02M7p2MxeVThLdxI= + +Name: system/etc/legal/leaflet/kk/index.html +SHA1-Digest: qi0v9n4cnc4gbb6pi2bPuhs1L40= + +Name: system/fonts/Roboto-Light.ttf +SHA1-Digest: +RPUxNPpLsZ8LSXfUkfgctYerrA= + +Name: system/lib/libnjtan.so +SHA1-Digest: PUSrtwGgS9Zj1kDuq3/Vy/6ea5w= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_flower_hd1080p.png +SHA1-Digest: TWzdW/YnWQ66pe6aNymS3QUIubg= + +Name: system/etc/legal/leaflet/ar/Personal-medical-devices.html +SHA1-Digest: j18Lbsn5kmShJiOmY+Juu3lYXNQ= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Malware.html +SHA1-Digest: Jj4063nznEkOZcVp/vbad+bCEog= + +Name: system/app/SemcClock.apk +SHA1-Digest: zPaqJ0xFEPDVXTEJvurZvcTa2Dw= + +Name: system/usr/keylayout/Vendor_046d_Product_c216.kl +SHA1-Digest: l5FztcNn+7EF/aXwMPgibvC1XXE= + +Name: system/etc/legal/leaflet/ar/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: HCzQseR8BO45uapFhTfFKIdV4uE= + +Name: system/lib/libmmjps.so +SHA1-Digest: ENze87jl4xybkNnwGtc1eTHOX6Q= + +Name: system/vendor/firmware/libpn544_fw_c3.so +SHA1-Digest: Ryi28PTtNe6Q4Qx/6HA2C8FG6zo= + +Name: system/fonts/Roboto-Italic.ttf +SHA1-Digest: UoLSclAdePMifNNIYtx6LAHL9Us= + +Name: system/etc/init.d/01zipalign +SHA1-Digest: jVEng02/ywcUJKgmDy2wwLQI/+4= + +Name: system/lib/libbcinfo.so +SHA1-Digest: MPc8zQd9H2RA3diVNr1ju7M8x2g= + +Name: system/app/SemcPhone.apk +SHA1-Digest: UQhAlvFqeSPM7QyCDUp2bVSYkuE= + +Name: system/lib/libnfc_ndef.so +SHA1-Digest: fmd7R7lF53tuY5rxJb4gFJk0+Jo= + +Name: system/etc/legal/leaflet/fr/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: M9oy3MPwLLcfmqChyXX3sU5J5Ow= + +Name: system/etc/legal/leaflet/uk/Antenna.html +SHA1-Digest: nEclSgB2aVI/GZa2TKZSnCIrOBg= + +Name: system/etc/legal/leaflet/in/Emergency-calls.html +SHA1-Digest: Rw8eCw+VUKazH7jSpVy8QJMZ4Us= + +Name: system/app/Initial-boot-setup.apk +SHA1-Digest: vksKiTabddS9u2R6NUTlXiklKF4= + +Name: system/etc/legal/leaflet/ae/Battery.html +SHA1-Digest: DRmdw2vGge5F8oN26+03fi+tnvQ= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Conditions---ZS1.html +SHA1-Digest: VIZhmEYy/dF36GAbnQG3sPJkIgk= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Children.html +SHA1-Digest: 3SEmrKglrAq54gnCn37vWqE14D8= + +Name: system/media/audio/camera/sound1/stop_rec.m4a +SHA1-Digest: TEJiiZTQcNcynWm0svCFCfMJJ/I= + +Name: system/etc/security/cacerts/74c26bd0.0 +SHA1-Digest: OaKWMuPk9pCf4isRHaBDfJj//V4= + +Name: system/framework/com.sony.device.jar +SHA1-Digest: PmKuoZ/3MorCRw1de2UaFscJgCA= + +Name: system/app/SomcMirrorLinkServer.apk +SHA1-Digest: aSk0mVhFMy+U93SrWUXiHbU9g3A= + +Name: system/etc/legal/leaflet/en-PB/index.html +SHA1-Digest: ebXx1Fb2jazNlqTQHzPYQ3S+BGU= + +Name: system/etc/legal/leaflet/cf/Limited-Warranty.html +SHA1-Digest: smvy9r0dS8oJVcSwyjruyjkCfOs= + +Name: system/etc/legal/leaflet/pb/Export-regulations.html +SHA1-Digest: g927tYV5NEgyPPLSg5gYJODBSZM= + +Name: system/fonts/Lohit-Kannada.ttf +SHA1-Digest: e+cag/VBf8+7uop4vUTQbpk22qE= + +Name: system/etc/legal/leaflet/fr/Precautions-on-Memory-Card-Use.html +SHA1-Digest: j8yZqbZbavp+2uiqNLOQsihic+Q= + +Name: system/etc/legal/leaflet/th/Export-regulations.html +SHA1-Digest: +1np7bhBHUOmG9ot5hNCjZUQzcU= + +Name: system/lib/libc2d2_a3xx.so +SHA1-Digest: MAZ1H4+VMzGXI+fEwX9IeLKoO/E= + +Name: system/lib/libutils.so +SHA1-Digest: fow1G3h7hd/wgl0dP+GV2Twt9Es= + +Name: system/etc/legal/leaflet/zh-TW/Disposal-of-old-electrical-and-el + ectronic-equipment.html +SHA1-Digest: QTG9rk+87gP69qs9OULzDmjLtRY= + +Name: system/xbin/dexdump +SHA1-Digest: NmewVuZiAk6Djt0CWCUy39ud6q4= + +Name: system/app/LocalContacts.apk +SHA1-Digest: Jsz6fmg87zjx4fDuLsOaSY486lM= + +Name: system/bin/qrngtest +SHA1-Digest: FG1TUuWm473d9JxG7Miwbsdp8sU= + +Name: system/app/GenieWidget.apk +SHA1-Digest: X8qczCumnj+kSBv55tMGGLbg1E0= + +Name: system/etc/legal/leaflet/vi/Antenna.html +SHA1-Digest: ocE94c70FPUnsgP12b+Uj3FFGY8= + +Name: system/etc/security/cacerts/a7605362.0 +SHA1-Digest: ydDNX6E+RFIn8R4w9i4iJXOLoOE= + +Name: system/etc/security/cacerts/56b8a0b6.0 +SHA1-Digest: LSyf6A501o2tD7CKNauSUSoXSJU= + +Name: system/etc/init.d/11sqlite_optimize +SHA1-Digest: NZexNFTHqKIA3cRBRJB2SoCWHw8= + +Name: system/lib/modules/prima/cfg80211.ko +SHA1-Digest: msrI9eHDkGDXINiVysJBsZMcUV8= + +Name: system/app/Magazines.apk +SHA1-Digest: e3KkefRYXKRDcC6b3fmh0AJ4OTY= + +Name: system/etc/legal/leaflet/fr/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: RTwkjl5mulhPYpTj25c1PWrfkBE= + +Name: system/etc/legal/leaflet/sr/GPSLocation-based-functions.html +SHA1-Digest: uq5G2X3kuoTPJgJagRIfoirob68= + +Name: system/etc/legal/leaflet/zh-CN/Guidelines-for-Safe-and-Efficient + -Use.html +SHA1-Digest: Leg9KJQXr3A89Eupl/RZ1RqCFU8= + +Name: system/etc/legal/leaflet/ar/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: nOf1xgEUJSIrla6zCxpRcXPQ1/c= + +Name: system/app/ClockWidgets.apk +SHA1-Digest: OZbMDEmzuju3WENSWHiGcasaf6I= + +Name: system/vendor/camera/SEM13BS1.dat +SHA1-Digest: wPPoEuyj3HZiJ9m13sNZNyGIpI8= + +Name: system/etc/legal/leaflet/bs/Protection-of-personal-information.h + tml +SHA1-Digest: JE0hKaXxa89QUlSCz+CHrE5uj8o= + +Name: system/etc/legal/leaflet/pt/Important-information.html +SHA1-Digest: 6GR2WhydlBw7qyOflwQFXmMm/0g= + +Name: system/etc/legal/leaflet/kk/no-title.html +SHA1-Digest: 5jW1x2RJvDMTy3fNfP9M4gh7LjI= + +Name: system/etc/legal/leaflet/en-HK/Export-regulations.html +SHA1-Digest: msih0qFpAt96fMRG7Ih6EgiW4tw= + +Name: system/etc/legal/leaflet/kk/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: 3YWjASG10NzNDGbUHqmTNFAQ/RU= + +Name: system/lib/libP11Notify.so +SHA1-Digest: 9HMieLzoPACBBUa5w77BIuT3jdI= + +Name: system/app/ApplicationsProvider.apk +SHA1-Digest: MB8Z3Q2jcKiEMpoLlSfhZYhmWIg= + +Name: system/app/SemcTelephonyProvider.apk +SHA1-Digest: flGBRXBDgsurh9wMwuQ7C8N4flw= + +Name: system/lib/libdsi_netctrl.so +SHA1-Digest: OYNNmqczXIgRQC17UVggUIoUmjM= + +Name: system/etc/legal/leaflet/mk/Conditions.html +SHA1-Digest: sRFgbGdG7cIYBgV4MXmHVN6bmXQ= + +Name: system/media/audio/notifications/Shaula.ogg +SHA1-Digest: Ph7KNnw9F05v0qWBk04U+pncj1g= + +Name: system/etc/security/cacerts/5a3f0ff8.0 +SHA1-Digest: D5NgyenT/uE9GAWVJqapSAwCRC4= + +Name: system/etc/legal/leaflet/bs/Emergency-calls.html +SHA1-Digest: KPQkZXTJl/ZMlnVYecDyTovK2nA= + +Name: system/etc/legal/leaflet/iw/GPSLocation-based-functions.html +SHA1-Digest: Vg08ZDdQlxHOkM2ygbzJF0Qtc5E= + +Name: system/lib/libGLESv1_CM.so +SHA1-Digest: 7Ux4NBloMYNsc9A3RSmgJ4wvqRw= + +Name: system/etc/security/cacerts/4d654d1d.0 +SHA1-Digest: toWvfEMJLsSRpeuXhuMMajO/iiQ= + +Name: system/lib/lib_asb_tee.so +SHA1-Digest: 4Y4NzewP0/p1doLpOk6pwFXxY1Q= + +Name: system/etc/legal/leaflet/fa/Children.html +SHA1-Digest: KrYvkeA9apmpPIBE7CBVWzGwwfg= + +Name: system/etc/legal/leaflet/xl/Loudness-warning!.html +SHA1-Digest: mTYJ8TR3wudTYYw9XMqflg7YNEg= + +Name: system/etc/legal/leaflet/images/field_shaded.gif +SHA1-Digest: hzUPmPitG/0B93wyJ6kfXLJyOps= + +Name: system/vendor/overlay/com.sonyericsson.thememanager-res.apk +SHA1-Digest: sI9UEc4xs5tId4ne33hC1gjeGtI= + +Name: system/app/bootinfo.apk +SHA1-Digest: csPnQugZb6uDtCa1FVGCnL0WXrg= + +Name: system/lib/egl/libGLESv2S3D_adreno200.so +SHA1-Digest: eDAeGPBOKU5Y97HWFntGmhxvH9Q= + +Name: system/lib/hw/audio_policy.mpq8064.so +SHA1-Digest: 4pqfLjZ0LDYOGccO/GC0m6DlASA= + +Name: system/etc/legal/leaflet/zh-HK/Warning!.html +SHA1-Digest: OGYJIfTvARc8ZCiyCKRcPYY7fmw= + +Name: system/vendor/camera/KMO08BN0_IMX111.dat +SHA1-Digest: B+Rz7Phe5Na4DTqxhpwPr1Yh7dk= + +Name: system/app/SomcMirrorLinkManualSwitch.apk +SHA1-Digest: xZOII9/aUp5KsmCC2jl6KBv19EQ= + +Name: system/etc/customization/settings/com/sonyericsson/appextensions + /custom_settings.xml +SHA1-Digest: 5LJa2/RJzinUTpFGZkB9Mzs30uM= + +Name: system/etc/snd_soc_msm/snd_soc_msm_auxpcm +SHA1-Digest: Ea7ytwXdn0/vJE+wOGwzTkZXYYc= + +Name: system/etc/legal/leaflet/en-PB/Our-warranty---12.html +SHA1-Digest: 8/q2oIZUGHFa+gEZjpxfLirCVeI= + +Name: system/media/audio/alarms/forest_air.ogg +SHA1-Digest: 3FH6d9K5wojW000jSfTVLuNYxyo= + +Name: system/etc/legal/leaflet/iw/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: nVYxp58uOM3g3fw2meYjQQOCCI0= + +Name: system/usr/xt9/SEMC_810_r1-15_DEusUN_xt9_2.ldb +SHA1-Digest: oGHD5hSx7QuyOL751CGT+n4EdTA= + +Name: system/etc/legal/leaflet/in/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: 9Ss4FKxdDqd0nFhnvYzVCxzYea0= + +Name: system/etc/firmware/wlan/macaddr1 +SHA1-Digest: Zu8dpjaGJUXqElg6C3qWgNbYNtY= + +Name: system/app/SoundEnhancement.apk +SHA1-Digest: za89uv5HQuN75MUU5/sEG1bHous= + +Name: system/etc/firmware/wlan/macaddr0 +SHA1-Digest: XfjOll/WmSxWNaatZM9X2zkZ9a0= + +Name: system/etc/firmware/wlan/macaddr3 +SHA1-Digest: Meq4Tc5qIc5PCSuB4mfVEmCb7VM= + +Name: system/etc/firmware/wlan/macaddr2 +SHA1-Digest: zCzTDWy2JYPVXCfaFCoCnWnZ7Tg= + +Name: system/framework/com.sonymobile.faceeditor.jar +SHA1-Digest: 38j7vFkOg4rHLNFAgWwt3nFJfmU= + +Name: system/etc/security/cacerts/6fcc125d.0 +SHA1-Digest: gD/RtuZNrRkHd/Kf7B4e3urcpfs= + +Name: system/etc/permissions/com.sonyericsson.audioeffectif.xml +SHA1-Digest: XPx5L/Plvx0P8f7lsRJhO8PiTZ4= + +Name: system/lib/libcamera_client.so +SHA1-Digest: pAs5CIMIVhUY/RG2o80fZdwMan0= + +Name: system/app/SmallApp-Calculator.apk +SHA1-Digest: nQc+bbCHuoWU6rJovXBHStkKInU= + +Name: system/etc/security/cacerts/7d3cd826.0 +SHA1-Digest: L/MwBTuZjUtda8j0poy4nGz3j+I= + +Name: system/media/audio/ringtones/FreeFlight.ogg +SHA1-Digest: 77NJsEoo7DvWMcYhX25A2uRtmSg= + +Name: system/etc/legal/leaflet/ae/SIM-card.html +SHA1-Digest: ymQsQSN9DRS9T8YaIcuuubp7a9c= + +Name: system/etc/legal/leaflet/xl/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: wmP2QqVgHuH+Oj2x5jwlUNt1mAM= + +Name: system/etc/firmware/wlan/5g_high +SHA1-Digest: 8qPCjryyeWY5lN0vPhRB/XcWapU= + +Name: system/lib/libOemCryptoJNI.so +SHA1-Digest: S6LmTT3XTn1VvhApgZBiHiIzRzc= + +Name: system/lib/libnetlink.so +SHA1-Digest: 5ZpWE7TjhdAJ+ucGJyRYSv5l5aI= + +Name: system/app/BlueTheme.apk +SHA1-Digest: YnWAg2t5ijNoyfxLottCeKhIZBQ= + +Name: system/etc/firmware/touch_module_id_0x37.img +SHA1-Digest: pvvan+gT91OEyR9eeOa7EaJ4Nf8= + +Name: system/etc/legal/leaflet/ae/Service-and-support.html +SHA1-Digest: HR3wW1PQZoc0CpWGXK1OQCEupFo= + +Name: system/media/audio/ui/VideoRecord.ogg +SHA1-Digest: lNxenUZXTJQfFT2OxJHkWx8URbg= + +Name: system/app/PinkTheme.apk +SHA1-Digest: X8e4bZghqmbz2NfvtDsuATtt5A4= + +Name: system/etc/legal/leaflet/th/Battery.html +SHA1-Digest: 4KuxqV1quU/Nrvt73F2j7bK0Njc= + +Name: system/etc/legal/leaflet/ru/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: u3EMpADtPjofT1AYJBguAri8RhY= + +Name: system/etc/security/cacerts/594f1775.0 +SHA1-Digest: rB1X3r8ms6gP9FsYn8TKeNfNeFg= + +Name: system/bin/bridgemgrd +SHA1-Digest: axckCyryr8Iqc8pqR/qGunJNETg= + +Name: system/etc/legal/leaflet/zh-TW/index.html +SHA1-Digest: QBfrVq78rJftjsGtKI/pxN/kG6U= + +Name: system/bin/mm-qcamera-testsuite-client +SHA1-Digest: zwlAtEkAs2epwVMh4jH3xV+OIg0= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Disposal-of-old-electrica + l-and-electronic-equipment.html +SHA1-Digest: bzoFF9tcHpcNcwsHtCRKhhapLm4= + +Name: system/fonts/DroidNaskh-Regular-SystemUI.ttf +SHA1-Digest: /YLqFkhUkwWAbuSlqkVAGnVHze0= + +Name: system/xbin/busybox +SHA1-Digest: BMJvNQfN5m6KoyIU2hNWz2pF2QY= + +Name: system/media/audio/alarms/Fermium.ogg +SHA1-Digest: QIYOhcL1boyWF7PAGc/Yyf0hKvk= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Conditions.html +SHA1-Digest: Z1esOsesoPhIGoen3EaeyM6HCD8= + +Name: system/etc/legal/leaflet/ae/Antenna.html +SHA1-Digest: 7CI+Vd+AWCywFlPHMopWbKahmn8= + +Name: system/etc/legal/leaflet/pb/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: 47qsjPp3951uZ9xZT1eyZOCU8aA= + +Name: system/bin/mm-jpeg-enc-test +SHA1-Digest: HAm8aIknDainL5dewCKn+3XEJ/U= + +Name: system/lib/libqmi_cci.so +SHA1-Digest: yKl/69cV1ejBahcUaFhhaAu9bck= + +Name: system/etc/legal/leaflet/en/Children.html +SHA1-Digest: 3SEmrKglrAq54gnCn37vWqE14D8= + +Name: system/bin/fast-dormancy +SHA1-Digest: 98tsG36HWonV1MbEX24rAxnOsK4= + +Name: system/bin/usbhub +SHA1-Digest: WOMtTlqYDi6yJuDTe6DCqF/Wiy8= + +Name: system/usr/xt9/SEMC_810_r1-3_MKlsUN_xt9.ldb +SHA1-Digest: A50lHfY8WPkhKbfvoeyaGygU5xU= + +Name: system/bin/vold +SHA1-Digest: HipFFUCtnlbIMNLa97nkNwHeJTM= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_purple.jpg +SHA1-Digest: JAaI0z/gxgvW0nQEvvWhRSc6TiE= + +Name: system/etc/legal/leaflet/fr/Publication-number.html +SHA1-Digest: 4zLPrNBUQtb8KoF+jPXE470HKZY= + +Name: system/framework/com.sonyericsson.facebook.proxy_1_impl.jar +SHA1-Digest: bobwG/yNiG5fL0LIvhRYc2mj2/c= + +Name: system/framework/com.sonyericsson.cameraextension_impl.jar +SHA1-Digest: jLGCOYjergCK7G1uYBXqW7i7JtU= + +Name: system/media/audio/notifications/Radon.ogg +SHA1-Digest: 2etM9eYVcn9uUCIr/rfq3AkyB6I= + +Name: system/etc/legal/leaflet/cf/Power-supply-(Charger).html +SHA1-Digest: 2c3Nh5HJ1k0GTXsjZhoemCyqjE4= + +Name: system/etc/legal/leaflet/en-HK/no-title.html +SHA1-Digest: KWuJIoAWou96O5kbF0P7RFkQ9q8= + +Name: system/usr/srec/en-US/google_hotword_clg +SHA1-Digest: k3aCqpXWQM5DIn7znzZjsU9SJ24= + +Name: system/app/SmallApp-Notes.apk +SHA1-Digest: e6lrmT9mEAG3qmJ6+nyKQjAsD0M= + +Name: system/etc/legal/leaflet/kk/Important-information.html +SHA1-Digest: 9assKw3zmCokxjDxLQX81LswKzY= + +Name: system/etc/legal/leaflet/pt/index.html +SHA1-Digest: CMSS8ewAznhXUBsiBRNPQeAkqis= + +Name: system/app/DrmDialogs.apk +SHA1-Digest: phA+AOEc4n9qvfSOfJ/05r8aMOk= + +Name: system/etc/legal/leaflet/zh-CN/Driving.html +SHA1-Digest: t41s69B2yhcuyYEEM/8taxep/Xg= + +Name: system/usr/srec/config/en.us/models/generic8.lda +SHA1-Digest: /y/sXjBSqRQkFc848OCkAh9PhTE= + +Name: system/etc/legal/leaflet/ar/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: AgnvaQqxFdOautedAbOtDzw+hQA= + +Name: system/etc/legal/leaflet/sq/Protection-of-personal-information.h + tml +SHA1-Digest: /hk+hvp4nhc+XQ6fsO7jVtqJQPA= + +Name: system/etc/legal/leaflet/zh-CN/Radio-frequency-(RF)-exposure-and + -Specific-Absorption-Rate-(SAR).html +SHA1-Digest: mu1VahpdkDEa8u2N6taBCDcbz2U= + +Name: system/etc/security/cacerts/ed524cf5.0 +SHA1-Digest: yTN26RsNrb/CudFl/v0+xfETrU8= + +Name: system/etc/legal/leaflet/fa/index.html +SHA1-Digest: H1LnblOSwtri1WhplfLPzhwknVs= + +Name: system/etc/legal/leaflet/images/LEGAL-ENVIRONMENT-CHINA-20-SMALL + -low.jpg +SHA1-Digest: y0gH3egqWpimkyPIKFg0B+ZPhc8= + +Name: system/etc/legal/leaflet/ru/Conditions.html +SHA1-Digest: i0H0LEbfhmcdlSf3qqRCw8/2MjA= + +Name: system/etc/legal/leaflet/pb/Limited-Warranty.html +SHA1-Digest: xEQHgcnbdjwLx6l8UGydCRxwWbQ= + +Name: system/etc/legal/leaflet/cf/Service-and-support.html +SHA1-Digest: BxMvbai2o4EtMrJvUOnS0Oe59G0= + +Name: system/lib/libcameralight.so +SHA1-Digest: EwsXmbdt2RRSKo4K+NW/C/IBhGo= + +Name: system/etc/legal/leaflet/mk/Driving.html +SHA1-Digest: AvklLnmRflbh0/FQ1BQG/TRIVLg= + +Name: system/framework/AsahiSignature.jar +SHA1-Digest: KvFFXsSwUixXSFQ789O7rkStuNU= + +Name: system/lib/libjni_latinime.so +SHA1-Digest: m269Du8OncMU+RHRqhNUpV4gWkI= + +Name: system/media/audio/alarms/Scandium.ogg +SHA1-Digest: ff4iUvJoMsJBoKCOfpf2hs7UPlo= + +Name: system/etc/legal/leaflet/images/LEGAL-ENVIRONMENT-CHINA-5-SMALL- + low.jpg +SHA1-Digest: hiVPc4vk0ixNzxQa3G9qtfHtS7g= + +Name: system/lib/libkeystore_client.so +SHA1-Digest: 3UteN+z4QW1lUgr3gexowsrBWiY= + +Name: system/lib/libz.so +SHA1-Digest: RalaGOwZWuxB6e0enf5eK61HlGY= + +Name: system/etc/legal/leaflet/en-PB/Copyright-and-trademarks---Legal- + leaflet.html +SHA1-Digest: 9HOcLjMUcrdoY1GmdL9rEgndisc= + +Name: system/etc/legal/leaflet/hr/What-we-will-do.html +SHA1-Digest: dM9Cnn+NUzb0zZoERSZR5FPwRIg= + +Name: system/etc/security/cacerts/111e6273.0 +SHA1-Digest: p+zFXiO2e0tv0nws8olvT8Aek/M= + +Name: system/lib/libcneapiclient.so +SHA1-Digest: a2QbtqMgSJkjtqlyhsWN23vl+5Y= + +Name: system/etc/legal/leaflet/zh-TW/Personal-medical-devices.html +SHA1-Digest: IUUwntluXXNo5srDiw/v3k5zsD8= + +Name: system/etc/legal/leaflet/fa/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: 2QW7K03SIBTKUXOzWa8gaZ1MbdM= + +Name: system/etc/legal/leaflet/ru/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: Mek2JW7boCBYnCbEP59LQN8gyNM= + +Name: system/lib/libP11KeypadJni.so +SHA1-Digest: XmTTGG4xPPnh1xhT/RdQ1YITUd8= + +Name: system/etc/firmware/a300_pfp.fw +SHA1-Digest: lkP+QsozO8gl2jJxqSG0sGGnWis= + +Name: system/media/audio/ringtones/Enter_the_Nexus.ogg +SHA1-Digest: mLYNvCNYnKhcSp8V8lVXQ137hTA= + +Name: system/etc/legal/leaflet/in/Accessories.html +SHA1-Digest: DRaphsWBLcKkfG2vT8tQNREBY+I= + +Name: system/app/CustomizationProvider.apk +SHA1-Digest: iYgLHhMdK6eNCylSxPaDiv/tPEI= + +Name: system/lib/libmlaudiocap.so +SHA1-Digest: 2utemKm25ufEmCI2yr5Md7u+iyY= + +Name: system/etc/legal/leaflet/th/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: l/dCuqIBcSyjyzLvUNXgFbpGTMo= + +Name: system/lib/libmpl.so +SHA1-Digest: Sw8EsTO9WV5Zi6Afm2aMbZp5+Qw= + +Name: system/bin/ta2bin +SHA1-Digest: ot9byHWvw7mSmRtI4u+oYOt5uv8= + +Name: system/etc/init.qcom.post_boot.sh +SHA1-Digest: Rop9GG+wQHNqd6ANzIWKkzulafI= + +Name: system/etc/bluetooth/main.conf +SHA1-Digest: demvOGy17NSlbDRZNY3sHqmUpTE= + +Name: system/etc/security/cacerts/3c860d51.0 +SHA1-Digest: NEjSItc3RYcgBxmnDxIXD4Eqy28= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/dewy_grass_hd1080p_small.png +SHA1-Digest: 2QHvPFv3UhsMXKG7CM6/eSoTwbA= + +Name: system/etc/legal/leaflet/ar/Emergency-calls.html +SHA1-Digest: VJO9NxkKHGzvQU91WvEd/zZpbLQ= + +Name: system/etc/legal/leaflet/cf/Personal-medical-devices.html +SHA1-Digest: BqIphO49v0IUeC3iSGtkMUbC6WE= + +Name: system/etc/legal/leaflet/en-PB/Children.html +SHA1-Digest: 3SEmrKglrAq54gnCn37vWqE14D8= + +Name: system/etc/legal/leaflet/zh-CN/Export-regulations.html +SHA1-Digest: 57OrKBADGm9nzj6XBQOjKea7cc8= + +Name: system/lib/libemoji.so +SHA1-Digest: wlmJoydPuRCka8Av2DIe3HcIqqI= + +Name: system/etc/legal/leaflet/sr/Conditions.html +SHA1-Digest: kxm3sxu/blVglQWJL7rKorKgWYk= + +Name: system/etc/legal/leaflet/en-PB/For-Devices-Supporting-3D-Viewing + -capabilities.html +SHA1-Digest: 8Lg5Ul6k2Svpz16slW7nwNIHcYo= + +Name: system/app/SemcTvLauncher.apk +SHA1-Digest: HWz5+4L56m+qik68WiQXZprQ30Q= + +Name: system/media/audio/notifications/DontPanic.ogg +SHA1-Digest: pvgx0GchjymMGo64MMLTPpnFCeU= + +Name: system/etc/permissions/com.sonyericsson.dlna.dtcpplayer.xml +SHA1-Digest: lisXwBMinDIyL9AgKW3xbl6zO+g= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Limited-Warranty.html +SHA1-Digest: eD2Nw2nbUPWIGh+Ry7ppTLuma1g= + +Name: system/vendor/camera/LGI08BN2_DW9714.dat +SHA1-Digest: OxnvtLLiAJwQ+0rzD2i+tS0QBN8= + +Name: system/etc/legal/leaflet/hr/Driving.html +SHA1-Digest: HUZ3oRWZ4HmZtSry1CpJCzFk0jE= + +Name: system/usr/xt9/SEMC_810_r1-4_HLlbUN_xt9.ldb +SHA1-Digest: ZABLfQl/jLNxJltSx1N3ZQ7dmsI= + +Name: system/bin/iddd +SHA1-Digest: W3giruKKTpKzpPEttFH+XGn9i4U= + +Name: system/lib/libsystem_server.so +SHA1-Digest: TDcCw/kCc5LA5YxHeW+iJW1HqtI= + +Name: system/lib/libgesture-core.so +SHA1-Digest: PLVDRcIN6ddHS5+6eBnQlP4Vxus= + +Name: system/bin/racoon +SHA1-Digest: +dJgZIDM3C6pA3ozQEQ0PhgkYdw= + +Name: system/usr/srec/en-US/g2p_fst +SHA1-Digest: 56BTKRSLceP1JQBIw26sU7rnRg8= + +Name: system/etc/permissions/com.sonyericsson.illumination.xml +SHA1-Digest: 2dRxGPc+zr2IP4hpeMnObOdxbbs= + +Name: system/app/GoogleCalendarSyncAdapter.apk +SHA1-Digest: z5+kh9/g6thXbWr4l2h+f6KuAPo= + +Name: system/etc/legal/leaflet/ko/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: 1RTNnxgYBryrfq1DVAbVSzzSPk0= + +Name: system/etc/bluetooth/input.conf +SHA1-Digest: Tgwt4ltLhyMYLAEDfZMe0/GHQ8c= + +Name: system/etc/legal/leaflet/sq/Limited-Warranty.html +SHA1-Digest: OXIE6/AgnyqldrLLEEoTFIKs3F8= + +Name: system/etc/legal/leaflet/iw/Loudness-warning!.html +SHA1-Digest: gKIgy2fvhI62jmh7L3DLB+2dvGs= + +Name: system/etc/legal/leaflet/fa/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: Z7euZGClkG1EIOApt8guRRNH+Uc= + +Name: system/etc/legal/leaflet/pt/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: n/7hcLOWFreMWKszso1F7FFBCAA= + +Name: system/lib/hw/audio.a2dp.default.so +SHA1-Digest: UZLgglF8dWtEEvkXid4x0c4fAOU= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Personal-medical-devices. + html +SHA1-Digest: g6kgmp+jpEgVkxsSHVzlYihSmJs= + +Name: system/media/audio/notifications/OnTheHunt.ogg +SHA1-Digest: zAIQHLBvgqgE3jbWB8UeCc+Wxis= + +Name: system/framework/com.sonyericsson.eventstream.jar +SHA1-Digest: J20L34deDsEjV2OXuwLopWstOP8= + +Name: system/lib/libstagefright_soft_vorbisdec.so +SHA1-Digest: lsM0++SW0x3DPCaLersJOr8QxmQ= + +Name: system/etc/legal/leaflet/en-HK/Our-warranty---12.html +SHA1-Digest: G+qN6djwKNtjHZWmKHMaiC2umSE= + +Name: system/etc/legal/leaflet/mk/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: rm6VbCNl5RdIlfrm0kU86A78y3U= + +Name: system/bin/clearpad_fwloader +SHA1-Digest: LykZWy11rbQ86b1S6hWcbJjnjEw= + +Name: system/lib/modules/mckernelapi.ko +SHA1-Digest: 7tYMvBUcHq2mxilbKsu8TeMzNhU= + +Name: system/lib/modules/cfg80211.ko +SHA1-Digest: msrI9eHDkGDXINiVysJBsZMcUV8= + +Name: system/etc/legal/leaflet/uk/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: MkmDKK5d3zLRNtrHCFbRBnFpBkg= + +Name: system/etc/legal/leaflet/zh-HK/Accessories.html +SHA1-Digest: zHevg2c0dYn6j9LsB49CdtCa504= + +Name: system/etc/legal/leaflet/in/Children.html +SHA1-Digest: NQ2jymbSMRhWOUCLh2srKjwIEA4= + +Name: system/lib/libwfdmmsink.so +SHA1-Digest: wS4MDwxiB1SbPy+ny6JVfWbggCA= + +Name: system/vendor/camera/SOI13BS1_IMX135.dat +SHA1-Digest: IXCgNKywd9hO9uFTn/KzoAlTFI8= + +Name: data/local/placeholder +SHA1-Digest: 2jmj7l5rSw0yVb/vlWAYkK/YBwk= + +Name: system/lib/libui.so +SHA1-Digest: K8QMzNCxmP9WjtE0SXvbSr0TKiU= + +Name: system/vendor/camera/SOI13BS1.dat +SHA1-Digest: GVKlE9QnksG62HvIxBEOa7ZfdIg= + +Name: system/media/audio/notifications/soft_bell.ogg +SHA1-Digest: 1Wtv6ZfUXRR7oTHmC+/NzcTPvwg= + +Name: system/etc/legal/leaflet/fr/Export-regulations.html +SHA1-Digest: Kk9GyVazABKYYndL3yztybKpdoE= + +Name: system/lib/libsysinfo_modules/clearpad_wakeup_gesture.so +SHA1-Digest: DWUwYdbRU1YTJ4TnehVLwwIkkA8= + +Name: system/usr/xt9/SEMC_810_r1-1_SUlsUN_xt9.ldb +SHA1-Digest: KysEUctV9Qs8XG+ippAT3t7lifA= + +Name: system/etc/legal/leaflet/ko/Export-regulations.html +SHA1-Digest: wiUnPUu3j6s3gajLVz7kE36pX28= + +Name: system/media/audio/ringtones/EtherShake.ogg +SHA1-Digest: NiKWkI2F8IIjupEUKtBUeigWqIE= + +Name: system/etc/legal/leaflet/in/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: bw5HNvQ3m/T3SplfCW1nolVzzz0= + +Name: system/lib/libOpenVG.so +SHA1-Digest: faZTI5v3uuHzXQLKzoVKioomu98= + +Name: system/lib/libmpqvideorenderer.so +SHA1-Digest: +qhj4mVJ2/Id/BotUzoatrcsECs= + +Name: system/etc/legal/leaflet/sr/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: r18o/N0fwzuf7XPaNhAYf2RDJV8= + +Name: system/lib/libllvm-arm.so +SHA1-Digest: Z7CgRuVTzK4NZavWCEqQT6QUGCU= + +Name: system/media/audio/alarms/Krypton.ogg +SHA1-Digest: NCJUi6f2ZsfpHKlAdvh0UMaarPM= + +Name: system/etc/legal/leaflet/ar/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: o6GgzWXI0EShyO8B19Oi3r2lo5c= + +Name: system/app/textinput-tng.apk +SHA1-Digest: wbVaqTb19yJiFu2xngpyKnZZPXk= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/What-we-will-do.html +SHA1-Digest: cajhNcCCTJE78qFqdx+O4LxWkRY= + +Name: system/etc/legal/leaflet/ae/Limited-Warranty.html +SHA1-Digest: SZuqC/js3yrIWxFpeST1TMmQ5Bg= + +Name: system/app/facebook.apk +SHA1-Digest: jVzrBQ2W7TMMaM1lQFcfSHgrPv4= + +Name: system/etc/permissions/com.sonyericsson.navigationbar.xml +SHA1-Digest: ArNlNZuRQXaunkBOO3S7XwncvdI= + +Name: system/lib/egl/eglsubAndroid.so +SHA1-Digest: 5wyyLdnm2HSH131x2R8EUekt9aY= + +Name: system/app/SemcDlnaHandover.apk +SHA1-Digest: Ydt6Vm3UOGK3SpezWRPVU3KoVX0= + +Name: system/media/audio/notifications/Doink.ogg +SHA1-Digest: ER8L9DVZQWrQdyHSsTJLrT9oMi8= + +Name: system/usr/srec/config/en.us/models/generic11_m.swimdl +SHA1-Digest: N2jOonTixJLNBvuNMlZ1cmcMhzU= + +Name: system/etc/legal/leaflet/fr/Children.html +SHA1-Digest: P7Du4W6+ts9BbYYZkyoqXaNtKlM= + +Name: system/media/audio/ringtones/MildlyAlarming.ogg +SHA1-Digest: 4k0XurVfPApEkCgYUTKi/uLT1sA= + +Name: system/lib/libqdutils.so +SHA1-Digest: d1O3w9h2lHO3obCslEDXCpgNDOY= + +Name: system/media/audio/camera/sound1/shutter.m4a +SHA1-Digest: OdFeobhotzfReDIZnV2cqw04d0Q= + +Name: system/etc/legal/leaflet/ru/Memory-Card---legal.html +SHA1-Digest: wh5qXTYkuhLHeoxNW9btdc78w00= + +Name: system/etc/legal/leaflet/images/list_line.png +SHA1-Digest: S2DWRfBAeolaha6cnYQojInwCk4= + +Name: system/etc/legal/leaflet/en/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: 8Lg5Ul6k2Svpz16slW7nwNIHcYo= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/mesh_blue_hd1080p_small.png +SHA1-Digest: DYiJKtqLJf/Dh7C0peBK5Zh11Yw= + +Name: system/etc/security/cacerts/72f369af.0 +SHA1-Digest: kDG+4qnGpf1LhqDTY1b++EDoMAI= + +Name: system/media/audio/camera/common/selftimer_10sec.m4a +SHA1-Digest: W33aSH+lnkb+WfAYfIQpsDw4OAs= + +Name: system/etc/legal/leaflet/images/ICN-SAR-CONTACT-NUMBERS-low.jpg +SHA1-Digest: /NL5tdn6QLJ/KQLVy2rcNpH702Y= + +Name: system/etc/firmware/wcd9310/wcd9310_mbhc.bin +SHA1-Digest: WPgbebeCi8qwDJvZGQ6mn47297Q= + +Name: system/etc/legal/leaflet/sq/Our-warranty---12.html +SHA1-Digest: 2Q6GObxAXcFH7GNas6S+ArGlolo= + +Name: system/etc/permissions/com.sonymobile.media.dashboard.extension. + xml +SHA1-Digest: qdu8ULFQq12xRlrVhfI965H15UY= + +Name: system/framework/semc_bootinfoif.jar +SHA1-Digest: BVos6i49wB7YZNtfFGo+fdOTYIw= + +Name: system/etc/legal/leaflet/hi/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: PUDhCI397WGpzu2C2RiKRNDtXZU= + +Name: system/framework/core.jar +SHA1-Digest: hKS34FKTgjfOFShet/f/DBLXG38= + +Name: system/lib/libwfdnative.so +SHA1-Digest: 1r2d9GVttauCHWzTTBf5px0Flyo= + +Name: system/media/audio/ringtones/Savannah.ogg +SHA1-Digest: 5kq8pHlW/LTfUWFoeVeqKclpzRY= + +Name: system/app/usb-mtp-vendor-extension-service.apk +SHA1-Digest: zSjVdoQuCSpEKC7Ukx8KvqDIU6E= + +Name: system/app/SomcMirrorLinkSystem.apk +SHA1-Digest: 8sSi57TkqK20/D2Gtr6nU0HvnnE= + +Name: system/etc/firmware/q6.mdt +SHA1-Digest: i2kP0KSJY8vNDHcoqg0gzJYUKlI= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Accessories.html +SHA1-Digest: /RDU9R0OGMdwYYDRimrm3mpmj7w= + +Name: system/app/SharedStorageBackup.apk +SHA1-Digest: cK8WuI1icWhKISIJ7FJV4snFse0= + +Name: system/lib/libstagefright_yuv.so +SHA1-Digest: YoaycNzxb7RB6BvSe/jzL46B5yI= + +Name: system/lib/libfmradio.so +SHA1-Digest: DBtQIJkanI+22bwpqSs4sVElweM= + +Name: system/media/audio/ringtones/Thunderfoot.ogg +SHA1-Digest: GziJO3E3gLP/3ecX+3Ud8zHhLAM= + +Name: system/etc/legal/leaflet/fa/Important-information.html +SHA1-Digest: sM/1HSfQ3T3XdAISou4tjZvrBeU= + +Name: system/etc/legal/leaflet/th/End-User-License-Agreement.html +SHA1-Digest: 2ycquqkVXZaeJs/HwblwCG/4AYg= + +Name: system/etc/legal/leaflet/vi/Export-regulations.html +SHA1-Digest: 2W7zdaA9Cnvx1poDVFULUwmT3js= + +Name: system/lib/libspeexwrapper.so +SHA1-Digest: M3sx2CRBxoNO4l9n0UKt3WuTXXc= + +Name: system/bin/dumpstate +SHA1-Digest: KWDnicWJULDMpEeOLrp6cXOhwXE= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor4.so +SHA1-Digest: /t6wkO5T7jr5a+M8GYmtTL3m8d8= + +Name: system/etc/legal/leaflet/vi/index.html +SHA1-Digest: tQ0LKjA2E2c4/O5znQc9+GffgNk= + +Name: system/media/audio/ringtones/Ding.ogg +SHA1-Digest: +2fD8KGZD2CYEqTc4lDo80frSp0= + +Name: system/etc/legal/leaflet/pb/What-we-will-do.html +SHA1-Digest: 4ulc+l5aLLC8qIpGVKOYeSXBkaE= + +Name: system/lib/sysmon/sysmon_perflevel.so +SHA1-Digest: qobcN5Tjh0Lw+zXphTfDeEW+o/s= + +Name: system/bin/diag_socket_log +SHA1-Digest: XyAC/mDFa6t/mipbtIfYYD1TsXM= + +Name: system/etc/legal/leaflet/fr/Protection-of-personal-information.h + tml +SHA1-Digest: Im/J+Xg2rmnzDFEWCukVD3X56zA= + +Name: system/framework/com.google.protobuf-2.3.0.jar +SHA1-Digest: 9vKIOJ1kORqkJP0T36e4Us9xA1M= + +Name: system/etc/legal/leaflet/images/form_search_foot.png +SHA1-Digest: WsI4MFGotDe427VXFO0AhjsETow= + +Name: system/lib/lib_dic_en_USUK.conf.so +SHA1-Digest: BLYMBpcVppVKYvgd4bWcM2cRafo= + +Name: system/media/audio/ringtones/Calypso_Steel.ogg +SHA1-Digest: rMAikmGoWc4QIoaY8XM5sv8lPe4= + +Name: system/etc/security/cacerts/1920cacb.0 +SHA1-Digest: R7QRICoLwPUp6AhMzbXPpFGE8ho= + +Name: system/lib/liballjoyn.so +SHA1-Digest: vgB0utpQdHBakT0CeuD86VJ/0EE= + +Name: system/media/audio/ringtones/Themos.ogg +SHA1-Digest: 9SNMUbxKalKdnUzk2Vr8+gUeshM= + +Name: system/lib/libbinder.so +SHA1-Digest: VAcToKRcMsN+y9qZbc2N3NNW750= + +Name: system/app/HoloSpiralWallpaper.apk +SHA1-Digest: qeZMCFMPaF98KwJ7RmyHlU2xd3g= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/white_caps_hd1080p.jpg +SHA1-Digest: lp9x4Uh29aenJvx7irShyE4cojU= + +Name: system/etc/legal/leaflet/images/LEGAL-UG-low.jpg +SHA1-Digest: +x8dweoVy3lYtZZQ4LkWrvrbDmo= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Accessible-SolutionsSpeci + al-Needs---USROW.html +SHA1-Digest: i0BrNfPYJcLaCx5ZFaCfp6bt/4o= + +Name: system/etc/init.qcom.fm.sh +SHA1-Digest: 7poCK2x3oIShwTPnsHRHO+Mz46w= + +Name: system/etc/legal/leaflet/bs/Conditions.html +SHA1-Digest: k1+dFWrNVCzbiKhYuXqPD0hBAao= + +Name: system/app/SocialEnginePicasaPlugin.apk +SHA1-Digest: eU5uKxci8elBsHohcQtxXBRvjbg= + +Name: system/etc/legal/leaflet/sr/SIM-card.html +SHA1-Digest: /jCb5Ck+JDqSF/f3vU0c8EdINPU= + +Name: system/etc/security/cacerts/343eb6cb.0 +SHA1-Digest: O+vAjCl4L2DEpmcXgqljeBNzRgw= + +Name: system/app/CalendarProvider.apk +SHA1-Digest: 7Qdx3hU1KeOwyn8kG3JiNlIs54Y= + +Name: system/usr/xt9/SEMC_810_r1-26_FRusUN_xt9_3.ldb +SHA1-Digest: nMe7XAyxEa7tnRhI3xR6SY5mK5U= + +Name: system/etc/permissions/com.playstation.playstationcertified.xml +SHA1-Digest: nVjSmkPikQF9xTTZo1SgdBSvYGI= + +Name: system/usr/xt9/SEMC_810_r1-5_ETlsUN_xt9.ldb +SHA1-Digest: YIv3FDhdpW+ZGClmSBACqaKPm2A= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Flight-mode.html +SHA1-Digest: d8F+bZb+q0+0WbYqCubVFy8Y+GA= + +Name: system/etc/legal/leaflet/sq/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: newgI53t1UGZc6q+1X+w1JvMOJQ= + +Name: system/etc/legal/leaflet/en-PB/GPSLocation-based-functions.html +SHA1-Digest: vtIZ+8AOwckFrZsvV6maVx9D9tE= + +Name: system/bin/servicemanager +SHA1-Digest: DYoPvh+URzBcFjI/mJzaJX4ICPk= + +Name: system/etc/product/applications/playnowclientarvato.apk +SHA1-Digest: EsMBv7XRULDzJFjp/mfN9HosnZI= + +Name: system/media/audio/ui/KeypressSpacebar.ogg +SHA1-Digest: W5H8TwiuPBEoXIq85+hJWUrkOVU= + +Name: system/usr/share/zoneinfo/zoneinfo.idx +SHA1-Digest: m5//InzwugFOH2ZQxTdoK+x2MMk= + +Name: system/lib/libqmi.so +SHA1-Digest: FMqZlzt4U/1fF5H2S7TGXL4k2Gc= + +Name: system/usr/keylayout/atmel_mxt_ts.kl +SHA1-Digest: sKD4DWPqD8JtOwKdApqeWnR/aqM= + +Name: system/lib/libvideoeditor_jni.so +SHA1-Digest: RlHdGt3VuE8xyRo6xIawtqsBcD4= + +Name: system/etc/legal/leaflet/kk/Memory-Card---legal.html +SHA1-Digest: AD3Ygtt5bBPc3ddrN1hyKCOy3jQ= + +Name: system/etc/permissions/com.sonyericsson.android.qcsemcserviceif. + xml +SHA1-Digest: xEJ5SiCSA4Z1y6UerSmBpckjlgo= + +Name: system/etc/legal/leaflet/vi/Driving.html +SHA1-Digest: 6ELdQZPOCOB451wizdXKxrkq2gQ= + +Name: system/usr/xt9/SEMC_810_r1-5_SLlsUN_xt9.ldb +SHA1-Digest: kMPZZYZS8VGZ2QRUOGms+/d8cvE= + +Name: system/lib/modules/scsi_wait_scan.ko +SHA1-Digest: Sg2DmPXVuN5GMO+HInctgkpu3hY= + +Name: system/usr/xt9/SEMC_810_r1-1_TAlsUN_xt9.ldb +SHA1-Digest: OqG/ePhx0XGVNSFI9blB6PSJZfQ= + +Name: system/lib/hw/gestures.msm8960.so +SHA1-Digest: KISXk50qaPH4gskG+vbPlsdG/Rk= + +Name: system/lib/hw/gralloc.msm8960.so +SHA1-Digest: BTpdHQZBtOMng6OkEa2KDCOtBpo= + +Name: system/app/HotspotAdvancedSetting.apk +SHA1-Digest: fqScsywKEnXYRW9bg+eUheBvbxw= + +Name: system/etc/legal/leaflet/hi/Children.html +SHA1-Digest: 7WPnbpl02DbLWiiLkLwMPYhNSus= + +Name: system/app/talkback.apk +SHA1-Digest: LVvWQ1CfxMa1GET5I/xZShrj3ZA= + +Name: system/usr/srec/en-US/metadata +SHA1-Digest: YPYK5NG59a30DaQyjp8lHVJfo48= + +Name: system/tts/lang_pico/de-DE_gl0_sg.bin +SHA1-Digest: AqYOydFO+UHIftz1QE8h+6cjU+s= + +Name: system/etc/legal/leaflet/xl/Personal-medical-devices.html +SHA1-Digest: XJxtwNejuqFRiafVLvUtfekjfGE= + +Name: system/etc/legal/leaflet/bs/Warning!.html +SHA1-Digest: vEOFBWHQ9Sq8rQmDO9exunV1fko= + +Name: system/etc/permissions/com.sonymobile.musicslideshow.xml +SHA1-Digest: FiVWiVkvLMYZlON7oDfMCAH3+rY= + +Name: system/usr/xt9/SEMC_810_r1-5_CSlsUN_xt9_2.ldb +SHA1-Digest: DdT95ekjwckRDnbWD4XgLxr3fLI= + +Name: system/etc/legal/leaflet/bs/Driving.html +SHA1-Digest: YgcFOoGfSPsfpt/IlIiO3UTJ3mM= + +Name: system/media/audio/ringtones/air.ogg +SHA1-Digest: HrFJTCt2CHnanKsPsxjyShe/OGM= + +Name: system/etc/security/cacerts/1155c94b.0 +SHA1-Digest: s4MqqrFEF/72+iq+wIGqr5PcZAs= + +Name: system/etc/security/cacerts/12d55845.0 +SHA1-Digest: Dl66XTBMvMhwxbJmyV6GBJ6brpk= + +Name: system/lib/libwilhelm.so +SHA1-Digest: Y2cTvKgFAufgxytA39/5ajvtyp8= + +Name: system/etc/legal/leaflet/vi/Accessories.html +SHA1-Digest: PAjvV+1yhKnouCf5WYEbV2bQfa8= + +Name: system/etc/legal/leaflet/en/Conditions.html +SHA1-Digest: Z1esOsesoPhIGoen3EaeyM6HCD8= + +Name: system/etc/permissions/com.google.android.media.effects.xml +SHA1-Digest: 1ymq8QA4Aky6u6O7KNmEtnQRsho= + +Name: system/etc/legal/leaflet/zh-TW/Memory-Card---legal.html +SHA1-Digest: VVfkp/MmxXYoNIXRv17or4D+wH8= + +Name: system/fonts/DroidSansDevanagari-Regular.ttf +SHA1-Digest: rcDk7w2X12yWFtec3dheokLZP7Y= + +Name: system/etc/legal/leaflet/vi/Malware.html +SHA1-Digest: 3gfoBgpDqFxfy3zhpIX0WJZ4gKM= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Power-supply-(Charger).ht + ml +SHA1-Digest: UMjshK+yh0iRQyWvvpUFqojIp28= + +Name: system/etc/legal/leaflet/ar/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: JWiBlmOPSYBIfJWL/kghc/JBoeQ= + +Name: system/etc/legal/leaflet/fa/Personal-medical-devices.html +SHA1-Digest: OTZ19jPtgE3GDHwQSCRu867OapM= + +Name: system/lib/libclcore.bc +SHA1-Digest: sIsYAYaQxH6txggm+4tgV/jWCRw= + +Name: system/app/BlackThemeBlueAccent.apk +SHA1-Digest: r/keOE7//fAe7PRcrEmygMdJcEk= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_orange.jpg +SHA1-Digest: /NLXVBtM3J20QtaAegkinzlb8G0= + +Name: system/lib/libfacelock_jni.so +SHA1-Digest: ZWJMjaHj8gmUvAfIPm5jmo1xn68= + +Name: system/lib/libmedia.so +SHA1-Digest: f0QzHHH+Lx1lZ4ZQutTBCK+gxUs= + +Name: system/etc/legal/leaflet/images/arrow-red.png +SHA1-Digest: wxhFNX64xT91iE0ofcorg84Rjts= + +Name: system/lib/libfilterpack_imageproc.so +SHA1-Digest: roc4s57JfSFjG5jjNCmzOw9Vhg0= + +Name: system/lib/libmm-abl.so +SHA1-Digest: osd9S5h8xGsAzCt8yFwNewMNEZw= + +Name: system/etc/legal/leaflet/en-HK/Loudness-warning!.html +SHA1-Digest: 4zvfWBWrq/uNpbonk1wlGTRyiMk= + +Name: system/etc/legal/leaflet/cf/Important-information.html +SHA1-Digest: efQ/y8oOVYwU3JZJ4qj1a9zD+Vk= + +Name: system/etc/legal/leaflet/zh-TW/Guidelines-for-Safe-and-Efficient + -Use.html +SHA1-Digest: Dpp6lwrOotjQwXChUlSRWjP2C1U= + +Name: system/lib/libmmcamera_interface.so +SHA1-Digest: PpYu2yeYsnJiYBkFMQ6aN7QXxeY= + +Name: system/lib/libmmcamera_hdr_lib.so +SHA1-Digest: Hl/hss58esfyUHJuSEiPXI0l0/I= + +Name: system/etc/legal/leaflet/iw/no-title.html +SHA1-Digest: SbINbGGndePRpFrFxUjXBL+oZ0w= + +Name: system/etc/legal/leaflet/images/bg.png +SHA1-Digest: wvsP3LZz2mi7myh1ObOrzsUYfPE= + +Name: system/etc/legal/leaflet/hi/Warning!.html +SHA1-Digest: k2a1h3cNZhkz6X1W4wGz9YPbcPg= + +Name: system/etc/audio_effects.conf +SHA1-Digest: 5mCRxZK68r07iYx4kmnBsNPHVh0= + +Name: system/etc/legal/leaflet/bs/Memory-Card---legal.html +SHA1-Digest: zBoC70G/tE+Kav3o3BTOwBo+Kh8= + +Name: system/framework/pm.jar +SHA1-Digest: 1y/VGjT3U3zLMqOMbEI0NCVre38= + +Name: system/app/NoiseField.apk +SHA1-Digest: 9odtly9YWkrD0QyDFB2knp6Ktwk= + +Name: system/etc/legal/leaflet/ms/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: QBjDGY6TFj7lSoOvBVg2wwFKG+8= + +Name: system/etc/legal/leaflet/images/field_shaded-BIG.gif +SHA1-Digest: aWMt+U8VamoT1U+JVeJ7a2MvPZc= + +Name: system/etc/legal/leaflet/fr/Loudness-warning!.html +SHA1-Digest: 3ASVmCLOklbaMexKRlTdJECu4NA= + +Name: system/etc/legal/leaflet/en-PB/Precautions-on-Memory-Card-Use.ht + ml +SHA1-Digest: aPKtTXjxuLAtvgtnekkWOxRpkAQ= + +Name: system/etc/legal/leaflet/bs/Antenna.html +SHA1-Digest: LR4IfkdNggEQ389tusJ5/0jJnyA= + +Name: system/etc/legal/leaflet/en/Malware.html +SHA1-Digest: Jj4063nznEkOZcVp/vbad+bCEog= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/field_at_sunset_hd1080p.jpg +SHA1-Digest: /NlWv4YHIfoGPUdirCMmGfLJ6gI= + +Name: system/etc/nfcee_access.xml +SHA1-Digest: mLVBZfhc/o/pkMBlDsHeE5U/qNI= + +Name: system/framework/com.google.widevine.software.drm.jar +SHA1-Digest: JLFW8Tsk2Y6BNjfxUQuLKmJwD5U= + +Name: system/lib/libmpqvideodecoder.so +SHA1-Digest: OcN1FQqYU0B0yAvUPIWHgUE8S5Y= + +Name: system/etc/legal/leaflet/pb/Precautions-on-Memory-Card-Use.html +SHA1-Digest: oYNsTfwojqBo46hZLScAQtgQfFk= + +Name: system/etc/legal/leaflet/iw/End-User-License-Agreement.html +SHA1-Digest: n39CXHVdx7zEckR6sChjgsfJ4C8= + +Name: system/etc/security/cacerts/3d441de8.0 +SHA1-Digest: bswrWmxovthgf13lTWpmpt5/X/Y= + +Name: system/lib/libmmipstreamsourcehttp.so +SHA1-Digest: kBI6nNtbDifM5U1goR6OLta6W10= + +Name: system/etc/legal/leaflet/fa/Flight-mode.html +SHA1-Digest: yIobDA7J5//WoEqnFKDNVYXz85c= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor1.so +SHA1-Digest: VDGVsQP6Bb2wj+h83txMJ66TFoA= + +Name: system/lib/hw/sensors.default.so +SHA1-Digest: I8vZfdx5I5sGEeYlFkD/MJcLC/I= + +Name: system/lib/libhardware_legacy.so +SHA1-Digest: /ryXvexpL/7ZADDSn6ff8jr38VY= + +Name: system/app/ShutDownAnimation.apk +SHA1-Digest: CYLMU46800K2AzUQdopy4IiHYIo= + +Name: system/etc/legal/leaflet/ae/Memory-Card---legal.html +SHA1-Digest: RXFBhNwD09YTi8c2YF8SsQngwSA= + +Name: system/media/audio/ringtones/Glacial_Groove.ogg +SHA1-Digest: 8ioRWpc66yq2afqZAmtcHDy4WTw= + +Name: system/lib/libstagefright_soft_g711dec.so +SHA1-Digest: YuUB1m4mox719i2bEdQ4kvNfD6s= + +Name: system/etc/legal/leaflet/iw/Export-regulations.html +SHA1-Digest: pXDCvsgcJ/eYS+8D5XJCG7509lA= + +Name: system/usr/srec/config/en.us/g2p/en-US-ttp.data +SHA1-Digest: EeTucxvP4KvwmGxmWn6mzatobhQ= + +Name: system/etc/legal/leaflet/zh-CN/Emergency-calls.html +SHA1-Digest: 5fdKmtAFQUFQYGO+WUE5EMD9sBA= + +Name: system/lib/libidd.so +SHA1-Digest: epu0rEL7QUPJVehdLOSsuoAdYGI= + +Name: system/etc/legal/leaflet/zh-TW/Sony-Ericsson-Consumer-Web-site.h + tml +SHA1-Digest: mbMNciHXC+yi4LfFEMaK5d2tHFM= + +Name: system/etc/legal/leaflet/ru/Export-regulations.html +SHA1-Digest: HijhDlI6YoAS6JS/tweuPTxfIus= + +Name: system/lib/libvariablespeed.so +SHA1-Digest: rPE11kp8EQzuXL+LD4kqpgM3ZDQ= + +Name: system/app/Stk.apk +SHA1-Digest: Nze2SsdUTKwZw/lTDsKcTwGp0qU= + +Name: system/etc/legal/leaflet/en-PB/no-title.html +SHA1-Digest: KWuJIoAWou96O5kbF0P7RFkQ9q8= + +Name: system/etc/legal/leaflet/pb/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: Pub1Npu7T3sPPYpnlqd7BwZaE5I= + +Name: system/etc/legal/leaflet/en-HK/en-CN/For-Devices-Supporting-3D-V + iewing-capabilities.html +SHA1-Digest: 8Lg5Ul6k2Svpz16slW7nwNIHcYo= + +Name: system/etc/legal/leaflet/sr/Important-information.html +SHA1-Digest: gXJU3J9kUsBJQV+Qfh+yfm/XO/k= + +Name: system/etc/legal/leaflet/hr/Service-and-support.html +SHA1-Digest: 1N+IQWjipZwyWDZ9+3882fQG3es= + +Name: system/app/WapPush.apk +SHA1-Digest: SA4cfAetxlNmsnSQQvYaY8ew1ME= + +Name: system/app/OemCryptoReceiver.apk +SHA1-Digest: tRtwECjttB5MBK8guU2VTtujNWo= + +Name: system/usr/xt9/SEMC_810_r1-4_MSlbUN_xt9_2.ldb +SHA1-Digest: t3fnCkHJ5SSJAjlkbl93g46vhh8= + +Name: system/media/audio/alarms/Oxygen.ogg +SHA1-Digest: YejPzO9jMKR4b+Gee6nZlOre8aQ= + +Name: system/etc/legal/leaflet/mk/SIM-card.html +SHA1-Digest: fAebjEEu0L3GmAiih5wrtvvS2tM= + +Name: system/etc/legal/leaflet/images/background_header-blue.png +SHA1-Digest: NF+DyyE5sDEQ7VFahHnb9MKKkxs= + +Name: system/etc/legal/leaflet/images/placeholder.png +SHA1-Digest: ZNCkJ/aYUF6RNoJ6vbb2tYzaQLs= + +Name: system/fonts/DroidSansGeorgian.ttf +SHA1-Digest: qGy+CDCNRhdxla4YsZpnovwHGGM= + +Name: system/media/audio/notifications/Mira.ogg +SHA1-Digest: /WbsclGFXNAs3T/I7S3bXwPryDE= + +Name: system/etc/legal/leaflet/ae/End-User-License-Agreement.html +SHA1-Digest: MJPaq3gI910SIA2DNXehi8Tea6k= + +Name: system/etc/security/cacerts/c7e2a638.0 +SHA1-Digest: 9ya3Pspxo12STfIyX8NIsr5A/7c= + +Name: system/app/YouTubeKaraokePlugin.apk +SHA1-Digest: 9PK5SNRhOpzZlCkv5PNFKZbsVMw= + +Name: system/etc/legal/leaflet/images/previous-Orange.png +SHA1-Digest: i07duYuqwfHKnz99cuO19a+FxjE= + +Name: system/etc/legal/leaflet/pt/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: gTeN9ibn3vgwg9bG5KGMEwCo0Hs= + +Name: system/media/audio/ringtones/Pyxis.ogg +SHA1-Digest: Dd5/QdBlYIOkPSdYfUe509HR6Uo= + +Name: system/lib/libandroid_servers.so +SHA1-Digest: 71lC3s+jA764S95LIrDroxyPo/I= + +Name: system/lib/libcredential-manager-service.so +SHA1-Digest: RGebz/tlPA7M5ScNTIjmF/Ishts= + +Name: system/bin/hci_qcomm_init +SHA1-Digest: L3lGxhgY33KFNli0lzH58g3GGh8= + +Name: system/lib/libmmrtpencoder.so +SHA1-Digest: aQJqRb7HfGt75AFlHYa0O20+vAw= + +Name: system/media/audio/ringtones/Big_Easy.ogg +SHA1-Digest: Po/q9Ek2+3nuG8LkRgTY2OZAj8E= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_flower_hd1080p_small.png +SHA1-Digest: 7t+ptApnPR3BeHNHw+laSQGRxQM= + +Name: system/etc/firmware/dxhdcp2.b02 +SHA1-Digest: IY1yj2M+rIprUuNWC68P16DpJsg= + +Name: system/etc/legal/leaflet/zh-HK/Battery.html +SHA1-Digest: FTmPBdYXsfOZiSpDnLvWLIOGsoQ= + +Name: system/etc/firmware/dxhdcp2.b03 +SHA1-Digest: Je6snFF9BlHLSaA2uNgOawkVulE= + +Name: system/lib/libepdsp.so +SHA1-Digest: dZMUAadXaS1Rcfz4TJNgU1r//e8= + +Name: system/etc/firmware/dxhdcp2.b00 +SHA1-Digest: DtsNACq7BNJ7zvxa5rnaV11kk9Q= + +Name: system/etc/legal/leaflet/fr/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: F/VihejyeW/Hk7t3legKAUO/DSE= + +Name: system/etc/firmware/dxhdcp2.b01 +SHA1-Digest: KoNvX///cqoUt5JC8mhFo7Km8JM= + +Name: system/bin/mdm_helper +SHA1-Digest: SXvhyafNuKrcDSSsNXCbZZyA784= + +Name: system/app/MediaProvider.apk +SHA1-Digest: tGfUxVSWSuy/xYfLHvtCh+/+K0I= + +Name: system/etc/legal/leaflet/kk/Driving.html +SHA1-Digest: yd+QTrrT9GF+7Uc0M/FlRJjaKUY= + +Name: system/lib/egl/egl.cfg +SHA1-Digest: gSZVwUFEbiJSML4A429+nW64kQY= + +Name: system/etc/legal/leaflet/mk/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: xY7GZuepaR/kM/hC4IQE+W1/WsU= + +Name: system/etc/legal/leaflet/fa/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: 11VNX5SiXuptlBmVFIQZVbmfxtE= + +Name: system/etc/security/cacerts/c527e4ab.0 +SHA1-Digest: Htxt63bTyJOKdCrkatkDPmVvkhs= + +Name: system/etc/legal/leaflet/hi/Service-and-support.html +SHA1-Digest: EiwKTA2bifwEOb1QCDXMVL/YEps= + +Name: system/etc/legal/leaflet/en-HK/en-CN/End-User-License-Agreement. + html +SHA1-Digest: ecXmi9kdRwVIYOzpnZPikyo7GO0= + +Name: system/lib/libnetmgr.so +SHA1-Digest: HFUDFU1PjDYglpmrYvhySyV0vRE= + +Name: system/etc/security/cacerts/95aff9e3.0 +SHA1-Digest: 1FyDHWZk97rejAOqX84plYw2Dik= + +Name: system/media/audio/ringtones/World.ogg +SHA1-Digest: gyfmfSAdpTHm8s9n/pFE1zF1XGo= + +Name: system/lib/libOmxAacDec.so +SHA1-Digest: ozLdNbae+Ka6YnxpMK7W3H5GbRs= + +Name: system/etc/legal/leaflet/th/Protection-of-personal-information.h + tml +SHA1-Digest: 8CQNXpjrOBJ+/lS9ubBTSD7A0TY= + +Name: system/etc/security/cacerts/8f7b96c4.0 +SHA1-Digest: QfxKn6PfoE0C352mOtyffWA172I= + +Name: system/lib/libext2_blkid.so +SHA1-Digest: ShGlu0pvaVZPczSYmJfIXUUwBVA= + +Name: system/etc/legal/leaflet/kk/Children.html +SHA1-Digest: 1XfbVXGqkjAgrZD6jLckIZb+6GU= + +Name: system/etc/legal/leaflet/en/End-User-License-Agreement.html +SHA1-Digest: ecXmi9kdRwVIYOzpnZPikyo7GO0= + +Name: system/etc/legal/leaflet/images/icn-main-touch.jpg +SHA1-Digest: rD+/SdzVcWqS4oVWoqT+jKkz3RM= + +Name: system/media/audio/ringtones/SitarVsSitar.ogg +SHA1-Digest: bLBNaX513sFoiouAnV1syHRXLjE= + +Name: system/etc/legal/leaflet/images/SIGNATURE-DOC-low.jpg +SHA1-Digest: WkQzCQvpFrZ5Fqd6Ze+YWQ3zDW0= + +Name: system/lib/libstagefright_avc_common.so +SHA1-Digest: 0sfq1IbkelkviReLiD8xJBwGbAQ= + +Name: system/etc/permissions/com.sonyericsson.cameraextension.xml +SHA1-Digest: UZzjzliHwexg6goW7P1kh74vB/w= + +Name: system/media/audio/notifications/Helium.ogg +SHA1-Digest: VfZpKPLjq5PYkZSzxj1S9x6RUiA= + +Name: system/etc/firmware/efs1.mbn +SHA1-Digest: j3TgA4De0d9FBgZkqscMwtNwJSQ= + +Name: system/etc/legal/leaflet/iw/SIM-card.html +SHA1-Digest: UPDDjeDbd8p/wb6USZnKDz83DS0= + +Name: system/vendor/camera/SEM02BN0_IMX132.dat +SHA1-Digest: 7nxN2zoMNE5pjWP+En8tnQOwM8Q= + +Name: system/lib/libdiskconfig.so +SHA1-Digest: mYBO7ckO9sX3LR/ebcwS1z/hppc= + +Name: system/bin/ta_param_loader +SHA1-Digest: Jvd5VqxurP1x2JNFhi04QtymqnA= + +Name: system/etc/legal/leaflet/images/LEGAL-FRENCH-AUDIO-WARNING-low.j + pg +SHA1-Digest: e9BHiFBKKVgPKlR4Iof3JLY1QnI= + +Name: system/etc/legal/leaflet/hi/What-we-will-do.html +SHA1-Digest: TrzpoliF1tYh8S20oQXVu0Qf7KU= + +Name: system/etc/legal/leaflet/vi/Emergency-calls.html +SHA1-Digest: qGplBtjKv81jviR3ho4S6ao1180= + +Name: system/etc/firmware/wcnss.mdt +SHA1-Digest: Wy3eQTSodSA7YJ94MVrybM6hs64= + +Name: system/bin/system_monitor +SHA1-Digest: KeCBDoTu2fQOcKokL1JpOTk/zMo= + +Name: system/etc/legal/leaflet/hi/SIM-card.html +SHA1-Digest: W34aKcD9lYAAz4mXFz8n7KvL3g4= + +Name: system/etc/legal/leaflet/th/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: J3SxowtGDhpEMzuiKhI4zEhshrM= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Our-warranty---12.html +SHA1-Digest: 8/q2oIZUGHFa+gEZjpxfLirCVeI= + +Name: system/fonts/DroidSansTamil-Bold.ttf +SHA1-Digest: mKyxCfCv+wTh1xiep9O2FLktnPQ= + +Name: system/etc/legal/leaflet/bs/index.html +SHA1-Digest: fFa7IWGCWLuwL/5mZyPe0vPRP2s= + +Name: system/etc/security/cacerts/3a3b02ce.0 +SHA1-Digest: I8WzZpsm5HGEorbt5jlzpTt3jQ8= + +Name: system/lib/libennjubase1gb.so +SHA1-Digest: 63+4fF0f/UiXrzCTja6HX4TDTRc= + +Name: system/media/audio/camera/sound1/start_rec.m4a +SHA1-Digest: Yj+xTHNWteBEhw/qpDvG8qfZhgs= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Disposal-of-old-electrical- + and-electronic-equipment.html +SHA1-Digest: bzoFF9tcHpcNcwsHtCRKhhapLm4= + +Name: system/media/audio/alarms/am_alarm.ogg +SHA1-Digest: RanRY97K6Vk6jAaWt3UpWnqpnw4= + +Name: system/etc/legal/leaflet/sr/Memory-Card---legal.html +SHA1-Digest: r+W9tszNluVyZtrfWKTikOxNztA= + +Name: system/media/audio/notifications/Cobalt.ogg +SHA1-Digest: CdOwraXG/dMhz3yQ2N3KoLoxhfo= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor3.so +SHA1-Digest: k/Yv2gCvDXASb+7Ytwcbofe/fbQ= + +Name: system/app/SemcAlbum.apk +SHA1-Digest: JvwgOEwaL8dNekoIjMbIFMA6smY= + +Name: system/etc/legal/leaflet/en-PB/Important-information.html +SHA1-Digest: pH3DLIK9r2v+QnTt6Z9xbvJwzbM= + +Name: system/etc/legal/leaflet/uk/Conditions.html +SHA1-Digest: R/yyBbTj3vroztjwbrrzHaI2o38= + +Name: system/etc/legal/leaflet/th/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: yT4vKLOCfEgn7G6sASHHFgfnduA= + +Name: system/etc/legal/leaflet/in/Power-supply-(Charger).html +SHA1-Digest: xbLu73cWk7CKfPIRgHKN3FwmgA4= + +Name: system/etc/legal/leaflet/ae/no-title.html +SHA1-Digest: tlgHM5nqJuRWJNO8isvUmBed8lU= + +Name: system/etc/legal/leaflet/fa/Battery.html +SHA1-Digest: eBT8E66d/9Kn1ZQ0jLZ6kwcpWAw= + +Name: system/app/GreenTheme.apk +SHA1-Digest: +EVg0qAyDY40PPonpSGW+vmuBCE= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor10.so +SHA1-Digest: CMRV1qKU7R/RssjuP7j5xGgGEis= + +Name: system/etc/legal/leaflet/ko/Protection-of-personal-information.h + tml +SHA1-Digest: hbGi9cJYso8a+3iIvOfQUeCp3pk= + +Name: system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf +SHA1-Digest: d1dqXCfxg0GO1o8tbtrKcixcoP0= + +Name: system/etc/permissions/qcrilhook.xml +SHA1-Digest: /xpdUtKnDrgJm7UTlxwb4s/mrGg= + +Name: system/etc/legal/leaflet/pt/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: TUXN6dp4M2GzqNTrh0B25r3oM7g= + +Name: system/etc/firmware/cyttsp_8960_cdp.hex +SHA1-Digest: 4JMaTFAhFUUp3r6LYzWkkStG5MA= + +Name: system/framework/com.sonyericsson.uxp.jar +SHA1-Digest: d2egQk+9ukaNikcIS2qWp0aA+eU= + +Name: system/lib/libaudioeffect_jni.so +SHA1-Digest: QYjiIs6IFekF9dtxDiI4oEjZdkI= + +Name: system/lib/libdrm1_jni.so +SHA1-Digest: Y0nKP2Oo2T8BuFgD85gM0mfYXsc= + +Name: system/etc/legal/leaflet/vi/SIM-card.html +SHA1-Digest: eKAPQRAR5p8YJxtc4pnO1QnIYLw= + +Name: system/app/RecentCallsWidget.apk +SHA1-Digest: 5Gc1rZGKSVJG8YcDjecG9yPuQGc= + +Name: system/etc/legal/leaflet/ko/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: k+Lgtkr/n1uFIB2Gg/jV8LYXS+Q= + +Name: system/lib/libwfduibcinterface.so +SHA1-Digest: ugrz1oyVZVPOe3nZDDpuk+IQS8o= + +Name: system/etc/legal/leaflet/pb/GPSLocation-based-functions.html +SHA1-Digest: V8EStC2lIMkYcpJ6ZYmBxvgityk= + +Name: system/lib/libOmxAmrEnc.so +SHA1-Digest: MGbAGMTkTyT5ok8X7yK6OvEqLXc= + +Name: system/fonts/AndroidClock_Solid.ttf +SHA1-Digest: 0vRHOkM++Y5hREyvokR3HBnI2ig= + +Name: system/etc/legal/leaflet/zh-CN/Loudness-warning!.html +SHA1-Digest: IdG50TYiLctqF74ZGvbLdvw0aD8= + +Name: system/lib/libqmi_csvt_srvc.so +SHA1-Digest: /cM5ZerBE1MKxcbkXX+YD87IurQ= + +Name: system/etc/legal/leaflet/zh-HK/Children.html +SHA1-Digest: 5Cq+ai5iFcc4yxkX7xzXSaf9k+s= + +Name: system/lib/sysmon/sysmon_disable_charging1.so +SHA1-Digest: qflgVuA5ISkfqJM2m1kijP3QMn8= + +Name: system/media/audio/ringtones/SilkyWay.ogg +SHA1-Digest: 8KPere+EFoojUsaVaP/JDSh6pug= + +Name: system/etc/legal/leaflet/zh-TW/What-we-will-do.html +SHA1-Digest: mG4ohaF9uj6E0Mwu+TRKtDRWC6E= + +Name: system/media/pictures/tallinn_01.jpg +SHA1-Digest: /k+CZc3dR98rRmGUh5xtQBRri3I= + +Name: system/app/Sound-Picker.apk +SHA1-Digest: vm0DQlkxdMstOS+AyaAKhdi6Uv0= + +Name: system/etc/legal/leaflet/en-PB/Accessible-SolutionsSpecial-Needs + ---USROW.html +SHA1-Digest: i0BrNfPYJcLaCx5ZFaCfp6bt/4o= + +Name: system/media/audio/notifications/reminder.ogg +SHA1-Digest: egB1lvqjuyD1xytkXL1cH4GZ8OU= + +Name: system/etc/legal/leaflet/iw/Personal-medical-devices.html +SHA1-Digest: cVoMrGs5f9g133LEH/OBSU9Z7As= + +Name: system/framework/ext.jar +SHA1-Digest: DGQhhuJCDtlnP6/MAOyWKDA43nE= + +Name: system/lib/libsapporo.so +SHA1-Digest: ZNmUbtohlN4XWur63p31+eoExAQ= + +Name: system/etc/legal/leaflet/en-HK/Service-and-support.html +SHA1-Digest: gAQFioh9BWza29IVvxOoQg9qLj4= + +Name: system/etc/legal/leaflet/ms/Export-regulations.html +SHA1-Digest: otW3LGGJUQIB5lPXkcYdEG4rz0A= + +Name: system/media/audio/notifications/dimension.ogg +SHA1-Digest: 3WiSr6gx5HGvNQvTQspOkPzgRsw= + +Name: system/etc/legal/leaflet/zh-HK/GPSLocation-based-functions.html +SHA1-Digest: 6bQUUT8um+7r/Ic1+CDnjwEESXA= + +Name: system/lib/libxml2.so +SHA1-Digest: LuyX/OJc9pomlAigtzfL6jebxrA= + +Name: system/etc/security/cacerts/ed049835.0 +SHA1-Digest: qfwv5fm9WuVJSoOfaW0MTXSQraU= + +Name: system/etc/security/cacerts/9f533518.0 +SHA1-Digest: AZtPDtYCuXAjFbgZptviWf6or4o= + +Name: system/etc/legal/leaflet/hi/Memory-Card---legal.html +SHA1-Digest: XYpblXn70Dn/zR1neZgYeseTD7c= + +Name: system/lib/libstagefright_soft_mpeg4enc.so +SHA1-Digest: Xgz2XlLidoJQ334IVQQfHVbtsLA= + +Name: system/etc/legal/leaflet/uk/Children.html +SHA1-Digest: MhI6b2MS5xcal63OvDIn97hWSp4= + +Name: system/lib/libwpa_client.so +SHA1-Digest: lK2qVpGdblGE8MqaFVypfiyejNw= + +Name: system/media/audio/ui/LowBattery.ogg +SHA1-Digest: uuIldXjG+4uO9pGKN3pjkar13pA= + +Name: system/bin/linker +SHA1-Digest: iQ/XVOvHLfm+cBSDcdX84XJSFz0= + +Name: system/vendor/lib/libWVStreamControlAPI_L3.so +SHA1-Digest: ObqNlwthunhhV2ezgenJ7+EYTwY= + +Name: system/lib/libmllite.so +SHA1-Digest: OPqAqJhJ+9EnvOj4TVboEi2MhAA= + +Name: system/etc/legal/leaflet/hr/Flight-mode.html +SHA1-Digest: Y3LhvLkoTuhb2JC4mmR9arMdhA4= + +Name: system/etc/legal/leaflet/xl/End-User-License-Agreement.html +SHA1-Digest: KgL5sT7K/bw+HsoXJ81fOKAB8eg= + +Name: system/etc/legal/leaflet/mk/Flight-mode.html +SHA1-Digest: YuN4l4vI5pVkpTKsACG4qa4AJwc= + +Name: system/etc/legal/leaflet/images/btn_search_blue-BIG.gif +SHA1-Digest: +63du+x6m73s9qJSssRZQaEQE/M= + +Name: system/etc/legal/leaflet/ru/Emergency-calls.html +SHA1-Digest: kjcsBSVOymV9BuVGhXtoAZawQFI= + +Name: system/lib/libsolsmetadataretriever.so +SHA1-Digest: 3Qxz8GvxQu7ukbVBDRM3as+6vew= + +Name: system/etc/legal/leaflet/ar/Malware.html +SHA1-Digest: rsu00zHknK9/j8UJ8eX6yCefPhQ= + +Name: system/etc/legal/leaflet/sq/Emergency-calls.html +SHA1-Digest: wrj1nC+VhF8zCDAG/gm7B9Bh1ME= + +Name: system/etc/legal/leaflet/th/Important-information.html +SHA1-Digest: it1Z+UwIaSJZ9woNpgDc4HJAOQc= + +Name: system/etc/permissions/com.sony.smallapp.framework.xml +SHA1-Digest: W1ONsXIzbOKbiQFXSEnOyea7ylQ= + +Name: system/fonts/Roboto-Regular.ttf +SHA1-Digest: Z9cynTXQb4TYTpzUSFMVfKk/tTc= + +Name: system/etc/legal/leaflet/cf/Emergency-calls.html +SHA1-Digest: bFCJc3NiVQ5+wzMcNfXWDL0m+as= + +Name: system/app/Nfc.apk +SHA1-Digest: Lv1oghbdzdbu/mrVX0W/4jS4h2o= + +Name: system/usr/share/bmd/RFFspeed_501.bmd +SHA1-Digest: U8VAt4ToJM9cf23UWSW02bJYN+M= + +Name: system/etc/legal/leaflet/iw/Precautions-on-Memory-Card-Use.html +SHA1-Digest: 1m/3aqI43ihK1vpuIBWishhclOE= + +Name: system/etc/legal/leaflet/en-HK/Flight-mode.html +SHA1-Digest: d8F+bZb+q0+0WbYqCubVFy8Y+GA= + +Name: system/app/ExternalKeyboardJP.apk +SHA1-Digest: YUpYoSGCC8x4KvsKc3nazYPdUs4= + +Name: system/etc/legal/leaflet/vi/What-we-will-do.html +SHA1-Digest: bFHpwFTuMsnKCNwE8z2xFkVuXiY= + +Name: system/etc/legal/leaflet/ar/Loudness-warning!.html +SHA1-Digest: zk0eaInWWQoZhSa5O169dLSPDac= + +Name: system/etc/legal/leaflet/ru/Service-and-support.html +SHA1-Digest: dOHC2k3Gzm9MFyy78r9pFqP0Ibk= + +Name: system/lib/modules/mmc_test.ko +SHA1-Digest: +s+ziRgbI4V0XVhQFmkTbmI7xNg= + +Name: system/fonts/Roboto-Bold.ttf +SHA1-Digest: Ykc18CQi8T5QzPRm8NKe3aBa2zY= + +Name: system/usr/xt9/SEMC_810_r1-2_DAusUN_xt9_2.ldb +SHA1-Digest: Q0cLt2gGeWBGE/IApMZ4QfI9UYw= + +Name: system/app/storefront.apk +SHA1-Digest: jQi+5fVCdJVrwMED55Q6POtytw4= + +Name: system/lib/libpaadapterjni.so +SHA1-Digest: qSkfqxB7mSi3FYOFtThdYM8yxC0= + +Name: system/etc/snd_soc_msm/snd_soc_msm_Taiko +SHA1-Digest: D+VCEskce4biF4vw/2dLkymMtZw= + +Name: system/usr/xt9/SEMC_810_r1-5_TLlsUN_xt9_2.ldb +SHA1-Digest: VxPiN5fivKfe51u1Rn5y1NYinnk= + +Name: system/etc/legal/leaflet/en-HK/Geographical-scope-of-the-warrant + y---zh-zt.html +SHA1-Digest: 7zJVFx2yezcoK9SktCkSWoST6CY= + +Name: system/etc/legal/leaflet/hi/no-title.html +SHA1-Digest: bQOOSmslX7UI3LodEKeWfG8hHRA= + +Name: system/etc/legal/leaflet/in/GPSLocation-based-functions.html +SHA1-Digest: n45MAha0wQcmwcj3rmyrfOBWpwc= + +Name: system/lib/libpatts_engine_jni_api.so +SHA1-Digest: YrCR4O7XonOvv9ISeoe9WTjZPoY= + +Name: system/app/SemcTvOut.apk +SHA1-Digest: DSnqsMxCI7Tp/A41QfmhlLC6Rhg= + +Name: system/etc/legal/leaflet/hi/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: eGMkFbyt63WoqorcaLDmNj63V/w= + +Name: system/etc/legal/leaflet/pb/Important-information.html +SHA1-Digest: OaOMvVroY08Drq2K3KOAC3qP1qY= + +Name: system/lib/libsrsprocessing.so +SHA1-Digest: oBYq/b0X1JTlQTr1pXGEOq16ffk= + +Name: system/media/audio/alarms/clockwork_music.ogg +SHA1-Digest: Q2f1jm7igjVfK1I4RWeDP9DALfY= + +Name: system/media/audio/ringtones/Terminated.ogg +SHA1-Digest: RkwketEuvqQu+kkQTFhrddZx4Fs= + +Name: system/etc/legal/leaflet/sq/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: YDkg7xO4aoVMin8XFj6EdyBDurw= + +Name: system/lib/libicuuc.so +SHA1-Digest: LdD4pWHLwwLh8S4RlYDqA9yn5Ys= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Copyright-and-trademarks- + --Legal-leaflet.html +SHA1-Digest: 9HOcLjMUcrdoY1GmdL9rEgndisc= + +Name: system/lib/libwiperjni.so +SHA1-Digest: v8Jtlnx2tUzSC8Fijii/DzNPLMQ= + +Name: system/semc/chargemon/data/charging_animation_05.png +SHA1-Digest: 88VzcE4dNsFeN0YqTb3bAMEYET4= + +Name: system/app/SEMCFacebookProxy.apk +SHA1-Digest: 4zqqle1j9pt8OG+77rpXo7lXLu4= + +Name: system/etc/legal/leaflet/fa/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: 53X8yC2k4E2cx+DJCdvq7zv0hQE= + +Name: system/lib/libmpqaudiocomponent.so +SHA1-Digest: urxG4zA6UZocfg/E6q223/mR/as= + +Name: system/app/textinput-chn.apk +SHA1-Digest: RyewrUrkezW/PlI4PT36kpTOCPE= + +Name: system/bin/mcDriverDaemonQC +SHA1-Digest: TVCaGb2XIB5E6oWOtlGORrBLiVw= + +Name: system/etc/legal/leaflet/xl/Memory-Card---legal.html +SHA1-Digest: mF45CSo8dXKgotopKnguAN6La+I= + +Name: system/etc/legal/leaflet/xl/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: w6vUE2pCJdyRndAI0isxLAWycKA= + +Name: system/bin/usbhub_init +SHA1-Digest: c6O03kGfQa1Xa0hl4AIIQzzasBY= + +Name: system/usr/srec/config/en.us/dictionary/enroll.ok +SHA1-Digest: rcl7CO9ZOIxVX+yaPLoqJv8ZtwY= + +Name: system/etc/legal/leaflet/images/Tip.jpg +SHA1-Digest: u7RL0qrnBUitvbG4B3AcNF6o8OY= + +Name: system/etc/permissions/com.sonymobile.settings.illumination.xml +SHA1-Digest: SVGgwsi6ZJShwVFUs4TEqPGyNDw= + +Name: system/lib/libmmjpeg_interface.so +SHA1-Digest: k9/2E61vx0zx4NdzIqNT3SSDirY= + +Name: system/etc/legal/leaflet/en/no-title.html +SHA1-Digest: KWuJIoAWou96O5kbF0P7RFkQ9q8= + +Name: system/lib/libOmxCore.so +SHA1-Digest: MyQG9aFO49g79GxpUXQXBW8Fsoo= + +Name: system/etc/legal/leaflet/pb/End-User-License-Agreement.html +SHA1-Digest: d/j4WAUW5Q3mvQXKVujVUwvB4BI= + +Name: system/etc/legal/leaflet/ar/Children.html +SHA1-Digest: ryTcChgeGqd/wmIsDhJSml41ljk= + +Name: system/etc/legal/leaflet/ko/Important-information.html +SHA1-Digest: QLoP0ADtiaZBYplYYFlTrcYUXLg= + +Name: system/etc/legal/leaflet/images/_Tip.png +SHA1-Digest: PY/rj60Cw/rNq+CxsZoRjBhi2ao= + +Name: system/etc/init.netconfig.sh +SHA1-Digest: 2rzdb+wjsCioGr+q1ZiOyJ6otNw= + +Name: system/etc/ppp/ip-up-vpn +SHA1-Digest: KpGvM+U5KPXWkEMJQLK5dxZJE1Y= + +Name: system/lib/libandroid.so +SHA1-Digest: zcPXaKEs/jMYgSOulisiYDcWe/M= + +Name: system/usr/xt9/SEMC_810_r1-3_THlsUN_xt9.ldb +SHA1-Digest: /TvWZ+bxClk3wPk8CE5J7RURxGc= + +Name: system/lib/libcrypto.so +SHA1-Digest: eDbAsV89FAEkvXuRxuDfUPj/eNY= + +Name: system/etc/legal/leaflet/uk/GPSLocation-based-functions.html +SHA1-Digest: TrJQAaLEzS2Jk5wxrCECwmzFQkU= + +Name: system/lib/modules/dma_test.ko +SHA1-Digest: cFsjr7VZ4RFslp2BMSEe7MEkx4U= + +Name: system/etc/legal/leaflet/mk/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: GGf/A0HfhMDJPjx1HxeNzW5lq+w= + +Name: system/etc/legal/leaflet/zh-CN/Antenna.html +SHA1-Digest: 3zbFZ537EiKNTm9AxBZ7thnrcgg= + +Name: system/etc/legal/leaflet/pt/Conditions.html +SHA1-Digest: mH2sjJWvG+hYD3KWon2vBeu2Nuw= + +Name: system/app/SemcUnplugChargerReminder.apk +SHA1-Digest: Dc1Xf475ClCGuFhu70cgwYQd45o= + +Name: system/media/audio/alarms/blips.ogg +SHA1-Digest: /97RwM5UO2mp/B3ILpTMgOloAFs= + +Name: system/lib/egl/libq3dtools_adreno200.so +SHA1-Digest: uyR05Tmha3OAp27N5nlELkgNMxg= + +Name: system/etc/legal/leaflet/xl/Limited-Warranty.html +SHA1-Digest: ZX2W/UGEesbHm/sWZhZWd4ZAjyA= + +Name: system/media/audio/ringtones/CrazyDream.ogg +SHA1-Digest: 91wnU2kwhd0TtTnL1B8Q572oS8I= + +Name: system/media/audio/notifications/Capella.ogg +SHA1-Digest: JBmF8WZCg8uP4Ez4hWS+f3FOK4Q= + +Name: system/etc/legal/leaflet/ms/Publication-number.html +SHA1-Digest: RSljBdYB9Bj091StqEnEypt5lbQ= + +Name: system/framework/input.jar +SHA1-Digest: DBgBGoAARZqXfP6HAeITuoEY1h0= + +Name: system/media/audio/ringtones/Revelation.ogg +SHA1-Digest: 3KXH6zcByvflPzHy3LY0QxE/SdY= + +Name: system/etc/legal/leaflet/sr/Malware.html +SHA1-Digest: Szpbjp0UqgS7j1wg22INz1I1j9E= + +Name: system/etc/security/cacerts/85cde254.0 +SHA1-Digest: R9VocfbkwOamdyjLfP1NDBc/kug= + +Name: system/etc/legal/leaflet/bs/Power-supply-(Charger).html +SHA1-Digest: t63PMFYbttnU17zo+HE6xDL/ZUs= + +Name: system/bin/svc +SHA1-Digest: laWKf0PV0fXkGCVIDLsyLTOEAMc= + +Name: system/framework/android.test.runner.jar +SHA1-Digest: Eya3LAu7+XIMHDNnRsDsYfiUXJk= + +Name: system/usr/keylayout/Vendor_046d_Product_c21d.kl +SHA1-Digest: 9/VliDA4iabKKvAWzHRMs6UEME8= + +Name: system/etc/legal/leaflet/kk/Antenna.html +SHA1-Digest: KN0LQeQINOj4vLZK+hjKgNLGMd8= + +Name: system/etc/legal/leaflet/ae/index.html +SHA1-Digest: bwOSIl7IJadFNaVPof93FjyclR8= + +Name: system/etc/security/cacerts/2fb1850a.0 +SHA1-Digest: 5FY7vEW9oM3Pyb/ez0M7eSlco+Y= + +Name: system/etc/legal/leaflet/en-HK/Power-supply-(Charger).html +SHA1-Digest: UMjshK+yh0iRQyWvvpUFqojIp28= + +Name: system/etc/legal/leaflet/ko/Accessories.html +SHA1-Digest: E6BNCfHTSfhYuMBrhUOYVmU37io= + +Name: system/media/audio/ringtones/Nairobi.ogg +SHA1-Digest: gxwjln9YZiFK/JFcQuwVM4gpoFQ= + +Name: system/lib/libQSEEComAPI.so +SHA1-Digest: if83UpYHglKhWG/zsT8orHFRTuE= + +Name: system/etc/legal/leaflet/sq/Antenna.html +SHA1-Digest: 1FFcPhGb035eF1eN+R8pQjiOKM8= + +Name: system/etc/firmware/leia_pfp_470.fw +SHA1-Digest: RqjOgh0hg1n/foRttdzBWzG91co= + +Name: system/tts/lang_pico/es-ES_zl0_sg.bin +SHA1-Digest: /gTDSWCUKfTXAlH/biqyNzYk1Yg= + +Name: system/etc/legal/leaflet/ms/Driving.html +SHA1-Digest: TVUBQ+5P8Z6uG9Fb0c0YhvRc47A= + +Name: system/etc/legal/leaflet/th/SIM-card.html +SHA1-Digest: maqg07dztsPlbbL8Qk8aWwxGjaE= + +Name: system/etc/legal/leaflet/in/Flight-mode.html +SHA1-Digest: NnbSx23CP02HocPXY6Ph5rUtR70= + +Name: system/etc/legal/leaflet/cf/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: AHnYSMK+jxTsjZRnheuP7D3oq7s= + +Name: system/etc/init.qcom.sdio.sh +SHA1-Digest: RnxPjItabZIQYYfygf/2/lPWTrA= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Sony-Ericsson-Consumer-We + b-site.html +SHA1-Digest: H0aYZ6j/qq2P6xaerpHC0YMxgwU= + +Name: system/usr/xt9/SEMC_811_r1-4-10-1_PTusUN_xt9_2.ldb +SHA1-Digest: Vxc70xYUX01in+67wtuxsf3xrNw= + +Name: system/lib/libvideoeditorplayer.so +SHA1-Digest: oA9XFfcNoNmYkzpRz/Eu5MGb8oY= + +Name: system/etc/security/cacerts/1e8e7201.0 +SHA1-Digest: AjTvkNYA86SfWxtzL6wQkemMoBs= + +Name: system/etc/legal/leaflet/xl/Flight-mode.html +SHA1-Digest: mNd7dHCiymmTxBnVgnKpTD/gEJM= + +Name: system/lib/libsnpvideoextensionjni.so +SHA1-Digest: Tsjro7gz7DdpjkXn43sJrVl88HM= + +Name: system/etc/legal/leaflet/fr/Warning!.html +SHA1-Digest: QdYpMzira/qZu0maFOmDUkaJDQE= + +Name: system/etc/legal/leaflet/bs/Limited-Warranty.html +SHA1-Digest: 25WxqBCdvdWmyXAKJuhwuxTadFc= + +Name: system/lib/libface.so +SHA1-Digest: Ksw5aVrc9Xskj6+FFgY2JQhs6Zg= + +Name: system/lib/libmiscta.so +SHA1-Digest: ckzHbN487j9CYtxtgCbFL6rMSug= + +Name: system/lib/libwfduibcsrc.so +SHA1-Digest: fcMWdwUCqAoBDWMBDRcCrqHw7DY= + +Name: system/lib/libstlport.so +SHA1-Digest: hnVy+XlrBQXBM+bEbPjCHfdUX30= + +Name: system/media/audio/notifications/climb_up.ogg +SHA1-Digest: AmqtsHjv8X2oFACkRU9qnMXNdrU= + +Name: system/etc/usf_post_boot.sh +SHA1-Digest: nl+wc+hoE2v506+ytjrNWcJYUoE= + +Name: system/lib/soundfx/libhearingprotection.so +SHA1-Digest: cMj8tcMowuZvhIgMKsXHoCn0FbY= + +Name: system/bin/mdnsd +SHA1-Digest: oprC3DNar0L841g+YbN7aqw3PcY= + +Name: system/lib/libjnigraphics.so +SHA1-Digest: 9bA/E9YP4u6ibfALVvhVNRlmzhQ= + +Name: system/media/audio/ringtones/Ring_Digital_02.ogg +SHA1-Digest: PIB2thaCvs7H7y7pq0qK0WO+g/0= + +Name: system/etc/legal/leaflet/ar/SIM-card.html +SHA1-Digest: J9Zuwe6CHjYYgf0M63AdZ8RGxoI= + +Name: system/app/SimlockUnlockApp.apk +SHA1-Digest: v2yxO1uen4lSQwANyWnEthpW6Jo= + +Name: system/etc/permissions/org.simalliance.openmobileapi.xml +SHA1-Digest: Q0mEE7R35zSJdvcoskhJ0WpgNY0= + +Name: system/lib/libsysutils.so +SHA1-Digest: byjZZT6ZYD5FdTJPsizDRqI45pI= + +Name: system/bin/mm-audio-alsa-test +SHA1-Digest: VIaUdNcMy0PVOaCbyJTz0tHKUFg= + +Name: system/lib/ssl/engines/libkeystore.so +SHA1-Digest: TfF0fUI4RmDloWaGt+pFqt/A8WQ= + +Name: system/etc/legal/leaflet/ms/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: WL6zVJXgzFtkSdtSrfVtRFsd3yI= + +Name: system/etc/legal/leaflet/in/End-User-License-Agreement.html +SHA1-Digest: Y96642G+umuc9N/e6oTYoqBlyyk= + +Name: system/etc/sysctl.conf +SHA1-Digest: PCgErowBCx6+RwhpX5R0Vh9ghbw= + +Name: system/lib/libgps.utils.so +SHA1-Digest: 6xDZMi0NZExdYsIk1rgfpr05e9E= + +Name: system/bin/hciattach +SHA1-Digest: u43jfKWPuGp6ouxyE6e1k3cXtQ8= + +Name: system/etc/legal/leaflet/pb/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: VQ+xTLciB+HVwLbjz9riQAsXkSA= + +Name: system/etc/legal/leaflet/hr/Precautions-on-Memory-Card-Use.html +SHA1-Digest: 2K/waAnDUuFRzDVdhSdcWLRSA/4= + +Name: system/etc/legal/leaflet/th/Service-and-support.html +SHA1-Digest: +ttB2BZ+Y+zTYb5upRM1B77ExnQ= + +Name: system/lib/libaudcal.so +SHA1-Digest: 6Whds/w7vAY1LykeOnpF2yrcSoo= + +Name: system/media/audio/ringtones/MidEvilJaunt.ogg +SHA1-Digest: Ve5lq504xLevxS2Z6KFKBl0H3f4= + +Name: system/framework/com.sonymobile.media.dashboard.extension.jar +SHA1-Digest: fmVcZVB9T/2D6FTlyOOkZuqG7kw= + +Name: system/lib/libFileMux.so +SHA1-Digest: uercnGCqvvyEeGJvhsxYFjCEYgA= + +Name: system/etc/audio_policy.conf +SHA1-Digest: TTzrvUfSQ3Oi7F9+E+lZADHGEeQ= + +Name: system/usr/srec/config/en.us/baseline11k.par +SHA1-Digest: Mq1IVDJlLzTaUQHLe+XE3eS3jPQ= + +Name: system/etc/legal/leaflet/iw/Memory-Card---legal.html +SHA1-Digest: TvFNoyFgBpsmxOp4ZS6TITJvni0= + +Name: system/etc/legal/leaflet/ko/Battery.html +SHA1-Digest: kysU3Q8imLog8orTtm0Hma6fdqk= + +Name: system/etc/legal/leaflet/kk/Warning!.html +SHA1-Digest: VaGYBNYtgh+yY6+T+8xhD4kQQb0= + +Name: system/lib/libv8.so +SHA1-Digest: 024EcpCIUkCT6DOjuLxezLf/zJ8= + +Name: system/app/DownloadProvider.apk +SHA1-Digest: r55XsQmOy2qPua7xLTwAkEQk6rE= + +Name: system/app/SomcPlayAnywhere.apk +SHA1-Digest: 5KeaCe/zoka5TaCsG2cp3/dWmb0= + +Name: system/lib/libril-qc-qmi-1.so +SHA1-Digest: 40WtPd3CtNo72861BKcBDhwdwGU= + +Name: system/bin/mm-jpeg-enc-test-client +SHA1-Digest: 4SDS+CKM1wgzn3FmZAbNBWeyNPU= + +Name: system/etc/legal/leaflet/zh-HK/SIM-card.html +SHA1-Digest: XOIjlfFBP1ZPKP+b/OaAbdLRp60= + +Name: system/lib/libqcci_legacy.so +SHA1-Digest: Mo2qYsgK9871dwHVpbeTPRLNL5A= + +Name: system/etc/permissions/com.sonyericsson.eventstream.xml +SHA1-Digest: 2poTmmvAz/25OcR2zKgIszlkB0g= + +Name: system/app/GenericApplicationInstaller.apk +SHA1-Digest: eD2QnB06+loGJaAwFuWmHELVAls= + +Name: system/etc/firmware/wlan/5g_mid +SHA1-Digest: rTZVcct9j26z/78vP/51b/V83Ik= + +Name: system/etc/legal/leaflet/styling/mBWcommon.css +SHA1-Digest: /58d7ZPUb7Dp1NRKUEoEQbqHJ7o= + +Name: system/lib/libalsautils.so +SHA1-Digest: uOpe+jZ0f+imca2yoq2EH3wZMEY= + +Name: system/media/audio/notifications/Canopus.ogg +SHA1-Digest: JR9OMA9gnMG5rkdKn+WSC38rRLY= + +Name: system/xbin/su +SHA1-Digest: bV0DtQUDjPcpO9D2iEpOC1IZfLY= + +Name: system/media/audio/notifications/Aldebaran.ogg +SHA1-Digest: aJzy90WKZeAT+vNuaKX1YVLnLyk= + +Name: system/etc/legal/leaflet/zh-CN/For-Devices-Supporting-3D-Viewing + -capabilities.html +SHA1-Digest: rm5tyXrW+XpN7W8g6xOHebetaEM= + +Name: system/lib/libcutils.so +SHA1-Digest: Wd8eIVYE7ckxx2QfYPI/P+yqN94= + +Name: system/lib/libmmparser.so +SHA1-Digest: lMU74jMHKKh5YfGERJ8VozuMbL0= + +Name: system/fonts/RobotoCondensed-Bold.ttf +SHA1-Digest: IIA82t9wxAtGgB9tHwt16IBinrQ= + +Name: system/etc/legal/leaflet/mk/no-title.html +SHA1-Digest: mFzKWLJ6ZZyYL8IGvi2DntPL8iw= + +Name: system/etc/sysmon.cfg +SHA1-Digest: RanFx/GjKEoSgF5ExJLZhN5Rois= + +Name: system/etc/legal/leaflet/hr/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: z+ynmzpdTUqITewDJ4k9ORmedP0= + +Name: system/etc/legal/leaflet/cf/Conditions.html +SHA1-Digest: yY3lzrG2bu7UQcjjdc6ekPX/1AU= + +Name: system/framework/com.android.nfc_extras.jar +SHA1-Digest: bBrqyUl1TjS7hmx58nF0YEkR6FA= + +Name: system/etc/legal/leaflet/images/btn_search.gif +SHA1-Digest: CvjeUcPH59fAECJYNsPMsRsotK8= + +Name: system/etc/permissions/com.sonyericsson.system.xml +SHA1-Digest: QtbILviSUmVZJfzpZWV/cFJANs4= + +Name: system/etc/legal/leaflet/sq/SIM-card.html +SHA1-Digest: 7i6CU0vTaE7wy4Le/J6CbxlDp1k= + +Name: system/bin/bu +SHA1-Digest: qZ1ifCg2IqfafLkirzAP4dMjOro= + +Name: system/etc/legal/leaflet/fa/Publication-number.html +SHA1-Digest: CJRhwJ8Orx4RK0wiJ0CdMhGNw/M= + +Name: system/lib/hw/audio.primary.default.so +SHA1-Digest: 1JXH7jW7zuZ//Y3V9zeAyyvDlUo= + +Name: system/etc/legal/leaflet/en/Driving.html +SHA1-Digest: 2RJnLg5mchEeHykobz1nE4TYoe0= + +Name: system/etc/legal/leaflet/fa/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: Jg904lXdH9zTFGDidRSL1F5U97o= + +Name: system/etc/legal/leaflet/images/arrow_turnpage_l.png +SHA1-Digest: 2wFkgE/59po0Vumv1xCp9PtGMjo= + +Name: system/usr/keylayout/clearpad.kl +SHA1-Digest: /LFMTJo9p8iKt+NpdpDToXb/mnY= + +Name: system/etc/legal/leaflet/sr/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: OufrmG84qEVRPsoQxCSUpL7tMxs= + +Name: system/etc/snd_soc_msm/snd_soc_msm_2x_auxpcm +SHA1-Digest: 7E8KlLmL0pJCJfEe5CN0gUPVstw= + +Name: system/lib/libimage-omx-common.so +SHA1-Digest: MNmhyWWpm+Bw0UIHhNTYkvqYwN4= + +Name: system/usr/xt9/SEMC_810_r1-4_GLlsUN_xt9.ldb +SHA1-Digest: V34j/LEcoxlp6Sc/WYnSYH9fRcc= + +Name: system/etc/legal/leaflet/sq/no-title.html +SHA1-Digest: AOhsyqgEgVFdezfOKSxk0ea28xM= + +Name: system/etc/legal/leaflet/ar/What-we-will-do.html +SHA1-Digest: zo8nU2tcausSUZSa9M0YKgjv8kY= + +Name: system/bin/ftmdaemon +SHA1-Digest: nVweQqyFEgXEr1g1gSMD6uiM4q4= + +Name: system/app/HTMLViewer.apk +SHA1-Digest: euaW2KXTKpHGQWqO0qCWrd51TwY= + +Name: system/etc/legal/leaflet/bs/Precautions-on-Memory-Card-Use.html +SHA1-Digest: wHJu8NfKNxLklKX0WY2UiSpW7fs= + +Name: system/etc/permissions/com.google.protobuf-2.3.0.xml +SHA1-Digest: ccJuSd5mO1FiXDLpRaqtaTOSb3s= + +Name: system/bin/mm-qcamera-test +SHA1-Digest: OruTbMO5ZSozscV73MoYdYYv8Es= + +Name: system/bin/am +SHA1-Digest: tGduMx5JPECn+7U+fdIzcrCdrlk= + +Name: system/app/GoogleLyricsPlugin.apk +SHA1-Digest: 8azdKELUvMXp56mnzPQazTkwFtc= + +Name: system/etc/legal/leaflet/th/Accessories.html +SHA1-Digest: EHJBEMuMsUOQC2J9WJvTzZjtjr8= + +Name: system/vendor/camera/SEM13BS1_WV570.dat +SHA1-Digest: 1sFo94HFRBbUhj3Vq27vMIkWJ4U= + +Name: system/etc/permissions/com.sonyericsson.privateapis.xml +SHA1-Digest: gaAYOR25cLcQxPzKo8IU85ANGF4= + +Name: system/bin/ta_qmi_client +SHA1-Digest: 78rU6xQ4Gd8BTmDWZU4wKHFzfcc= + +Name: system/lib/hw/keystore.default.so +SHA1-Digest: 2oED+gsafJ1soHoyW9PBLpvc+eo= + +Name: system/lib/lib_get_secure_mode.so +SHA1-Digest: R0+Ob9gxJR1ZiNHajZdw+bqlR+M= + +Name: system/app/CredentialManagerService.apk +SHA1-Digest: 0zyHdE12Q7P9nPIsePZBXq708rw= + +Name: system/lib/drm/libmarlinplugin.so +SHA1-Digest: fKxrp0fzt573t/T2F7+DSyA/gc0= + +Name: system/bin/bluetoothd +SHA1-Digest: 7sBnRXVMe/GmjkepS7xhIlybtVg= + +Name: system/etc/qosmgr_rules.xml +SHA1-Digest: LGQK5ikaaQkt41xgtjbPcHuh18Y= + +Name: system/lib/libbson.so +SHA1-Digest: eS9X568Hinub7d+Keku6T3gXVKo= + +Name: system/lib/libbluetoothd.so +SHA1-Digest: L4ITTWUGeY1czTqnzdwhRGGE/5g= + +Name: system/etc/legal/leaflet/ko/Limited-Warranty.html +SHA1-Digest: Sje2laHp3V9gyFQ0IKBX7s1ncB0= + +Name: system/etc/permissions/com.sonyericsson.metadatacleanup.xml +SHA1-Digest: RQPOTi265RJ/Vch5GRxhLVdjg74= + +Name: system/etc/legal/leaflet/en-PB/Radio-frequency-(RF)-exposure-and + -Specific-Absorption-Rate-(SAR).html +SHA1-Digest: nbpcQIzB7Eg9v2LwTJnKDgcVeVw= + +Name: system/app/SmallApp-Recorder.apk +SHA1-Digest: QmztX/l6s30sIsydtdzLgs2mauo= + +Name: system/fonts/DroidSansHebrew-Bold.ttf +SHA1-Digest: bnHHY3zVhU5icp9deYBYiLskRlM= + +Name: system/media/audio/notifications/Merope.ogg +SHA1-Digest: BqW2CEN+cwymHWq+XvrxVCejzW0= + +Name: system/etc/legal/leaflet/zh-TW/Accessories.html +SHA1-Digest: Vpolx6K2v43sXbufC/qS5X7MXeo= + +Name: system/media/audio/ringtones/BussaMove.ogg +SHA1-Digest: oguWfy6XljWZ8Di8erEPg5r2Waw= + +Name: system/vendor/lib/libwvm.so +SHA1-Digest: EfG08JOvxV232ILfcdsZNzSOdJY= + +Name: system/etc/legal/leaflet/pt/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: J+QqKyVWMvvV8G5t4xrV76HAgeI= + +Name: system/etc/legal/leaflet/cf/no-title.html +SHA1-Digest: kYU26KbJpz2uiGedK5O+ANgcYpg= + +Name: system/framework/qcsemcserviceif.jar +SHA1-Digest: zd/ZVL9hGkPQLcZHb8/cYDIK1rg= + +Name: system/lib/soundfx/libbundlewrapper.so +SHA1-Digest: 1MghHxF0Qz8bCdp3kD2QUhozEAk= + +Name: system/media/audio/Miguel - Adorn.mp3 +SHA1-Digest: UZifNpJe04WLhAnHsNgP8DQ0JH4= + +Name: system/etc/legal/leaflet/hi/GPSLocation-based-functions.html +SHA1-Digest: Mns5xYP8D8BeWOO320IQa67jNlo= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Protection-of-personal-info + rmation.html +SHA1-Digest: EV2tzvgo/oP/+DxSFeiXkdrfipI= + +Name: system/lib/hw/gralloc.default.so +SHA1-Digest: NCV4A53AuJrzNaGasqBaZ/Bcxmw= + +Name: system/etc/legal/leaflet/sq/index.html +SHA1-Digest: YnKNPg/CfiewO1mYbiTvCGmxMwI= + +Name: system/bin/MPQDvbCTestApp +SHA1-Digest: 01LXqmm37kny1UnrZdNw8UmJZUM= + +Name: system/usr/srec/config/en.us/models/generic.swiarb +SHA1-Digest: QGzUh5WkfKQRmuaI+sJtXBZrEFg= + +Name: system/etc/legal/leaflet/iw/Flight-mode.html +SHA1-Digest: SodAk9lItL9kcCu11VX3AQ5R4+c= + +Name: system/etc/bluetooth/audio.conf +SHA1-Digest: 0W8avLdL6kLvbzQF0D0fFpsVrEE= + +Name: system/etc/security/cacerts/a7d2cf64.0 +SHA1-Digest: ovUCtI0EY0f9I+ptWEk2GL/6+2Y= + +Name: system/lib/libbtio.so +SHA1-Digest: Wz62QtYnz9UCYAg74d1b6DzD1Ps= + +Name: system/etc/legal/leaflet/mk/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: uBQDtvaXFlrg7RtASUSSGhYQzWc= + +Name: system/etc/security/cacerts/d16a5865.0 +SHA1-Digest: uhdS7HZmT6TkFszu7r9Y2xzhX2w= + +Name: system/etc/legal/leaflet/hi/Loudness-warning!.html +SHA1-Digest: XKlGOVB0RPF4EaEscJi7v+2m8+I= + +Name: system/lib/libdss.so +SHA1-Digest: hPezMS513rN5glGaqMM+Wd4ihJc= + +Name: system/etc/security/cacerts/882de061.0 +SHA1-Digest: fCt4s0+592o+QOkmDeYrj+o9kCI= + +Name: system/etc/security/cacerts/8470719d.0 +SHA1-Digest: f5QED3DbZCbDT1sNmR7e40z3aao= + +Name: system/etc/security/cacerts/e775ed2d.0 +SHA1-Digest: 0GkuHmAcEDLQf+8r8yG75doHYQ4= + +Name: system/etc/firmware/vidc.b03 +SHA1-Digest: zvMTXDOkNwpbPkEqqr+douzUurA= + +Name: system/etc/firmware/vidc.b02 +SHA1-Digest: xRSzjS+YH2eHexFe51xH6Zs/JYo= + +Name: system/etc/firmware/vidc.b01 +SHA1-Digest: C+Ep0gE0XVFn1ao3x6lbVtORe1Y= + +Name: system/lib/libmmstereo.so +SHA1-Digest: QxPcTQwrNnyGWENP/dvr51dL6AU= + +Name: system/vendor/camera/KMO08BN0.dat +SHA1-Digest: mL4dUt28z/nSEMGBygIh3hO9h0M= + +Name: system/app/Backup-Restore.apk +SHA1-Digest: xGo9Yl0uNr/BvLVmSLiQ2OQhRv0= + +Name: system/app/RemoteControlService.apk +SHA1-Digest: THc8ftlxkEI0ty2r31UZ3VyxE3Y= + +Name: system/etc/legal/leaflet/xl/GPSLocation-based-functions.html +SHA1-Digest: yAQIlC27yp0d2xs2X35BwpE4zc8= + +Name: system/etc/legal/leaflet/sr/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: N2kGHJBHOD9AhSGrfHkbtTlzrPI= + +Name: system/etc/security/cacerts/895cad1a.0 +SHA1-Digest: I6mXiEZNYMrute2XDIugRzsK/f8= + +Name: system/usr/srec/config/en.us/dictionary/cmu6plus.ok.zip +SHA1-Digest: gix9zeNXUv3/qb72caDqmlPws9U= + +Name: system/bin/gzip +SHA1-Digest: 1vab/ZEiI2NqAujm3NoLAy9fQKk= + +Name: system/media/audio/camera/sound1/shutter_done.wav +SHA1-Digest: QEUQcxf/N/k2O7gNuA2WJ3mwQ/4= + +Name: system/etc/init.qcom.wifi.sh +SHA1-Digest: wvpedDdgSK+mH0kcDy3eZCetchQ= + +Name: system/etc/firmware/vidc.b00 +SHA1-Digest: UMRAd/+/T3snbZSIdcwmwbfc6pk= + +Name: system/etc/firmware/wlan/2_4g +SHA1-Digest: MB0Zp1Mm6gfT9w/pd83Gr194f2Q= + +Name: system/lib/libjni_pinyinime.so +SHA1-Digest: 3vD2FuPUziG9TWT0FJaM27ChXmY= + +Name: system/etc/legal/leaflet/xl/Battery.html +SHA1-Digest: ca7cCv1XCNJXIE5WYezTJt67LSQ= + +Name: system/lib/lib_dic_morphem_ja_JP.conf.so +SHA1-Digest: aY0vKF+NFaDFOgUlmJ4ggtmFVoE= + +Name: system/etc/legal/leaflet/kk/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: f3NRlNksw2xgPdBAcgi6caCpt3g= + +Name: system/lib/hw/copybit.msm8960.so +SHA1-Digest: ZAR3+b6VGXyCMBj5JGC/+t81zlA= + +Name: system/framework/com.sonymobile.nfc_impl.jar +SHA1-Digest: tK+ufXDQ/NLfWr0eZg4CLxAZ8cY= + +Name: system/etc/permissions/com.sonyericsson.autopoweroff.xml +SHA1-Digest: RFcPUx7XXKgL+km9unWhyox2FJw= + +Name: system/etc/firmware/wlan/5g_low +SHA1-Digest: iaRuOrWqMf1o9K1ykLTegNiOxRw= + +Name: system/bin/mm-mpo-dec-test +SHA1-Digest: D0rjoOsTGXb5Qa5mltn61OQ7B4M= + +Name: system/lib/pp_proc_plugin.so +SHA1-Digest: /VQEzy5gD/E4o+b1sqo+yhspe1c= + +Name: system/bin/chargemon +SHA1-Digest: TN+TjpRkxeRQyaNeZuniXKb3dCU= + +Name: system/etc/legal/leaflet/in/Antenna.html +SHA1-Digest: ScBLl4bKje9tOBsuZhuz1sPbPTQ= + +Name: system/etc/legal/leaflet/pb/Publication-number.html +SHA1-Digest: vb/23/CqVLWolv11IXwrIVZRUGI= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor2.so +SHA1-Digest: nCiKtiXXj3J0Ce4uH3Py3P6UlYY= + +Name: system/etc/legal/leaflet/images/icon_nav_contentslist.png +SHA1-Digest: MWmw4r0B6VrhRvXZpJPTubmvG6E= + +Name: data/tweaks/ext4/tune2fs +SHA1-Digest: pv9T/O+x7glT25y49qiNYA27ERc= + +Name: system/etc/legal/leaflet/en-PB/Protection-of-personal-informatio + n.html +SHA1-Digest: EV2tzvgo/oP/+DxSFeiXkdrfipI= + +Name: system/etc/legal/leaflet/pt/Accessories.html +SHA1-Digest: K1DmbCwhY9W2ft+TrE7aWqhmm3k= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/purple_sky_hd1080p_small.jpg +SHA1-Digest: BIp0vAAxYTP8/Xvrk3khNYu9OJM= + +Name: system/usr/keylayout/Vendor_0810_Product_0002.kl +SHA1-Digest: FLgclEgCWTC+S6n/Kd/9mnqsXEQ= + +Name: system/app/VoiceSearchStub.apk +SHA1-Digest: ZsflAd+6MgpryXx5/gAMmEaVvUs= + +Name: system/etc/permissions/com.sony.sysinfo.xml +SHA1-Digest: 1cr/lPH3qEHM4GnqmZsodXOspaI= + +Name: system/lib/libstagefright_soft_pv_aacdec.so +SHA1-Digest: imFji+6TCMJdr+idWm0ambp7PSk= + +Name: system/app/VerifyCertificatesDummyAppPlatform.apk +SHA1-Digest: 7sIky2gidOSnHImRTtlWrIeTBHw= + +Name: system/lib/libGLES_trace.so +SHA1-Digest: SIxS/g1PF36UpWFoareq4PuPYnI= + +Name: META-INF/com/google/android/update-binary +SHA1-Digest: KGPVU88RlgQzaqNTg0kACL0cLeA= + +Name: system/etc/security/cacerts/3e7271e8.0 +SHA1-Digest: exnkaZiA8uIb4yIVkEyv4B8Mo40= + +Name: system/etc/legal/leaflet/ms/Protection-of-personal-information.h + tml +SHA1-Digest: BvrhPz1txeTrK/8jfWMf0NpgXb0= + +Name: system/etc/security/cacerts/89c02a45.0 +SHA1-Digest: 6k/+zqCB5f/qyWJjkf/PvVoNG64= + +Name: system/app/FBIAppShare.apk +SHA1-Digest: ECWOOB9gJsV+gGx3XOuGFaUeJlw= + +Name: system/etc/legal/leaflet/in/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: E3zeqJKcsQQ4amzWnI6+y03VH3w= + +Name: system/app/EnchantedForest.apk +SHA1-Digest: WJRrRm5413WPvcnii7hLTWKGGk8= + +Name: system/fonts/Lohit-Bengali.ttf +SHA1-Digest: sFHGAXKlPSj9B34US/lkaYYbnnQ= + +Name: system/media/audio/ringtones/Girtab.ogg +SHA1-Digest: zjPWIkT0TQl53Q9YfX3kfTqum2Y= + +Name: system/bin/screenshot +SHA1-Digest: ZLR696w1Do3UNHvLz5xsvXkPPTY= + +Name: system/etc/legal/leaflet/hr/Our-warranty---12.html +SHA1-Digest: i5IRJghRNImuvQVJ8+fRqYMYbgw= + +Name: system/lib/libOpenCL.so +SHA1-Digest: dEo9h3Xfi8rEBvwWReJZd3UOmV4= + +Name: system/lib/modules/radio-iris-transport.ko +SHA1-Digest: BD9wbFUo+ojsZvURy01wxFMtUns= + +Name: system/lib/bluez-plugin/network.so +SHA1-Digest: q/A//rjeHfsudRsH7pgWWlOmQUo= + +Name: system/etc/security/cacerts/27af790d.0 +SHA1-Digest: tWr5feX55f+zArlEQVaA+3FTUZk= + +Name: system/etc/legal/leaflet/zh-TW/SIM-card.html +SHA1-Digest: fkwl0BDnGdmJbV/NwyROYrrGP6Y= + +Name: system/lib/libkaomoji_tyukyu.so +SHA1-Digest: cl9NkbSknS4pnboXgbqA0XFYJoU= + +Name: system/lib/libaudioutils.so +SHA1-Digest: IjU05ZX0uM68m82Y34fdEPdsjRM= + +Name: system/etc/legal/leaflet/xl/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: SvEi/FC/aOVc98m5o164rey+TzM= + +Name: system/etc/dop.iso +SHA1-Digest: mBOP/dMN4FPBStSq2fJNTPNMsvA= + +Name: system/etc/firmware/wcnss.b00 +SHA1-Digest: o05GsVYRjV7KmiQUp8TSOLxj8Ck= + +Name: system/etc/firmware/wcnss.b02 +SHA1-Digest: KFlgZKmtrmdb0IpQQImL+v2ePcU= + +Name: system/semc/chargemon/data/charging_animation_04.png +SHA1-Digest: uxec5Hp4RPvtq2KehZHxsadwlnI= + +Name: system/etc/firmware/wcnss.b01 +SHA1-Digest: 9d8hYM7GGS8b8ZPfe+7eu+IYUaE= + +Name: system/lib/libskia.so +SHA1-Digest: qFCOYB9yx5C1p9u8hdVR7pqgxKc= + +Name: system/usr/srec/en-US/google_hotword.config +SHA1-Digest: Q8EXKoSue5BQvI8aQIC5FgDXr7M= + +Name: system/etc/firmware/wcnss.b05 +SHA1-Digest: aMkuKb1gau755HSD0OU/s4EVfZw= + +Name: system/media/audio/notifications/Zirconium.ogg +SHA1-Digest: /VP9wpdl+aygdJJGhI9mz7m01Ww= + +Name: system/etc/legal/leaflet/sq/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: mfIJOkDJYBbVvzHER47LOIN32OY= + +Name: system/etc/legal/leaflet/en-HK/Publication-number.html +SHA1-Digest: lt5Ti7nzswLf/5n+hodhF4AuOc4= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Sony-Ericsson-Consumer-Web- + site.html +SHA1-Digest: H0aYZ6j/qq2P6xaerpHC0YMxgwU= + +Name: system/etc/firmware/wcnss.b04 +SHA1-Digest: zQgcYvfDwelVz+1JhK9qji0QN5w= + +Name: system/bin/iw +SHA1-Digest: lTAZbJj+5v9OLlCTK6NllGWh4Uc= + +Name: system/etc/legal/leaflet/hr/Warning!.html +SHA1-Digest: VtPic//FtI1W+KRct2VTmjgD7Rg= + +Name: system/bin/ip +SHA1-Digest: vW4H2+wiM9WI+mH77ZOZTn351+k= + +Name: system/etc/permissions/android.hardware.camera.flash-autofocus.x + ml +SHA1-Digest: B9lECmkbQ6pSctxuPBeUiDPmthA= + +Name: system/lib/libstagefright_soft_rawdec.so +SHA1-Digest: Ga+toLhkzPGD2fRM3Fh6XkM1VYM= + +Name: system/etc/legal/leaflet/ar/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: fpK0TLAp+xOH3RBuIRu1Sx+Pd+w= + +Name: system/etc/legal/leaflet/uk/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: GDOo0cQKiXcyy0r0uroYcFixxRg= + +Name: system/lib/libMcRegistryQC.so +SHA1-Digest: mF/Oe35mvciygmnfdYyAaB2CvoQ= + +Name: system/etc/legal/leaflet/ru/Limited-Warranty.html +SHA1-Digest: 0sSqfRYCucdzWOHtANhbBrIpq0I= + +Name: system/lib/sysmon/sysmon_bl_therm.so +SHA1-Digest: typKlD0HCdNmr3+DCPxspwtsAFs= + +Name: system/etc/permissions/com.sonymobile.faceeditor.xml +SHA1-Digest: loAlNqsei2n5hNSdIbPQZRy1hMc= + +Name: system/bin/mm-aenc-omxqcelp13-test +SHA1-Digest: is2q/rpvGbyc+hODZtHyNSoanVw= + +Name: system/etc/legal/leaflet/bs/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: 0cVVJqlBvb8TKg+eFj+gaM5lK84= + +Name: system/app/Conversations.apk +SHA1-Digest: SJBKrnYGzu0egB8CQVJrgnZ6PEs= + +Name: system/etc/legal/leaflet/ms/Malware.html +SHA1-Digest: 8q1bn712I/H8Sh9qGc90SzjjWAY= + +Name: system/bin/ks +SHA1-Digest: y3zqqNrMS3AXXplX+5bnHaGvMRM= + +Name: system/etc/legal/leaflet/ru/End-User-License-Agreement.html +SHA1-Digest: 5xN2k2CjAPpwyoA9NKgnTOv3gpc= + +Name: system/bin/hostapd +SHA1-Digest: 654W1o9QQ/vqEBR4vsKzJmc/T7c= + +Name: system/lib/libcald_server.so +SHA1-Digest: 28kJ9cwNI5nPFxx21SYOQW2ftx0= + +Name: system/media/audio/ringtones/Ring_Synth_04.ogg +SHA1-Digest: vI1klZ5YZXy7m2sGhPE5xWrm/ow= + +Name: system/etc/legal/leaflet/pt/Battery.html +SHA1-Digest: F8s6VVk2CkkY2PQj0MHP/FcoBQU= + +Name: system/etc/legal/leaflet/ar/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: 6g26VNf4rBx89+/qKm8VcIY5nSg= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Antenna.html +SHA1-Digest: fxNZgCsam5YbU6vO8WuwPr7bMNs= + +Name: system/lib/libmpqvideoscheduler.so +SHA1-Digest: lyWcqqFXPrHJekEQrsrEYHfY2U8= + +Name: system/app/SemcVideo.apk +SHA1-Digest: HzWLzYVWKyDGnHoENngcyPwfPOE= + +Name: system/etc/legal/leaflet/pt/Limited-Warranty.html +SHA1-Digest: XSwsldtufoHuBKVMxV2Vh4AM7f0= + +Name: system/etc/legal/leaflet/uk/no-title.html +SHA1-Digest: EH5dOmjfsghIorove7tMEh1g8FI= + +Name: system/app/skin-upholsterer.apk +SHA1-Digest: 3WCAQCWRcTaPI0LQx4JZd8LzqRQ= + +Name: system/app/SemcMusic.apk +SHA1-Digest: XTdQSWTvUskiv78qhhSOYRFsERE= + +Name: system/media/audio/notifications/Gallium.ogg +SHA1-Digest: hXMkTNSC8g9C3S1aM/IX0MWDnLw= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_orange_small.jpg +SHA1-Digest: JCjpewD7rxEck+FtHY0CXMRtpTA= + +Name: system/etc/legal/leaflet/en/Precautions-on-Memory-Card-Use.html +SHA1-Digest: aPKtTXjxuLAtvgtnekkWOxRpkAQ= + +Name: system/framework/com.sonyericsson.autopoweroff.jar +SHA1-Digest: uvE/TEjvQKEwHPz2lN8O0FbOJFs= + +Name: system/lib/hw/lights.default.so +SHA1-Digest: 3c08959oe7cJd+TyhgU+u6S89m8= + +Name: system/etc/permissions/com.sonyericsson.renren.proxy.xml +SHA1-Digest: zVotDslxlBNPV30TNQzozhhmEd4= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/moody_sunset_hd1080p.png +SHA1-Digest: hnSFwYgCAY98J1heF8DX4tcnr5s= + +Name: system/lib/libennjubase2.so +SHA1-Digest: eTsIxcYepYamMLLMk0YLz4HoDm4= + +Name: system/etc/legal/leaflet/th/Personal-medical-devices.html +SHA1-Digest: adN80VOR7Tcul5J58KLhOWajwfk= + +Name: system/etc/security/cacerts/219d9499.0 +SHA1-Digest: kAbEu38ad02aTzdrF222x0w0M0o= + +Name: system/etc/legal/leaflet/xl/What-we-will-do.html +SHA1-Digest: +C6EKpNQjpkDJcOTuHXzXgB1wV4= + +Name: system/lib/libmmcamera_statsproc31.so +SHA1-Digest: PWyO7duIodQEF30eZ4ESBDNfThM= + +Name: system/usr/icu/icudt48l.dat +SHA1-Digest: FHnHdjSKunLvrUfYMhpDem5hNvU= + +Name: system/framework/com.sonyericsson.android.socialphonebook.dynami + c.jar +SHA1-Digest: x4twjSNSqRbOu+36aV5cURDenQE= + +Name: system/media/audio/ringtones/Solarium.ogg +SHA1-Digest: WYl6jWkBI2dVcZfj9oVLZvGxBTU= + +Name: system/app/VpnDialogs.apk +SHA1-Digest: +Bq2ETsaagbdsyGesLlHQaPRNj0= + +Name: system/app/SocialEngineTwitterShareFrwkPlugin.apk +SHA1-Digest: m+h/dzMRgW/E2QWkdWsGOvUnPS4= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Warning!.html +SHA1-Digest: Kyb7s+0M97Jg4mWhGPgc8PHSjs8= + +Name: system/etc/legal/leaflet/ae/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: CqfysbFKLgffYeTBG7bhO1Fdgsw= + +Name: system/framework/javax.btobex.jar +SHA1-Digest: HEZl1OGrMFkEcRt64oDDwiwmP+M= + +Name: system/lib/libmmwfdsinkinterface.so +SHA1-Digest: 689oR7gzgFiWd4HGTfRcL9XYk7k= + +Name: system/lib/libdbus.so +SHA1-Digest: DHB1lVbylke95jp0m+Lp/ndD810= + +Name: system/bin/input +SHA1-Digest: QALzgk6btxyAeKYglJuc20newks= + +Name: system/lib/hw/local_time.default.so +SHA1-Digest: 5vm2074xq8RvFrmepe1POqYjcOQ= + +Name: system/bin/pm +SHA1-Digest: XY3kUD4TG6bh8EMZiFFrRWiG7Ec= + +Name: system/lib/libext2_com_err.so +SHA1-Digest: WZB1BhOWo8yrmirxBBtv5LNvyV8= + +Name: system/lib/libmmcamera_plugin.so +SHA1-Digest: t+CJny+ArSwTO152TxXtfnZsw6I= + +Name: system/etc/legal/leaflet/ko/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: hWXrXd+9wdkxrB4Y1ukOT0zYU3A= + +Name: system/etc/legal/leaflet/uk/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: w5qJbM17cSv815AuYAOxc11M5u0= + +Name: system/app/SomcXperiaLink.apk +SHA1-Digest: lA+oAE2Zvia91qVrt5EuyYtTGGw= + +Name: system/etc/legal/leaflet/ms/no-title.html +SHA1-Digest: egkwsbHxMk3VH9dmXc495i7+haA= + +Name: system/etc/legal/leaflet/sq/Personal-medical-devices.html +SHA1-Digest: 3bmtdRytnU3ilZKw4umDlkEbovQ= + +Name: system/etc/legal/leaflet/in/Export-regulations.html +SHA1-Digest: PFlW/Uy5mdsYQ0rVCZEfwdFrwaI= + +Name: system/etc/legal/leaflet/kk/Precautions-on-Memory-Card-Use.html +SHA1-Digest: f47t2/7bw0IQNn4CwfUji3+mfiY= + +Name: system/etc/legal/leaflet/ru/Publication-number.html +SHA1-Digest: qpqeks9HusmfR/9vck78PocatSA= + +Name: system/etc/legal/leaflet/sr/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: nQvH1T9ztlXQXPRcjpxwplZ86I0= + +Name: system/usr/idc/clearpad.idc +SHA1-Digest: 5DgsmtEr5Tl4xpewwOWDBTj60jU= + +Name: system/fonts/Lohit-Telugu.ttf +SHA1-Digest: nXMSE+NPzBmX5F2cgDyDBmVi8J8= + +Name: system/etc/legal/leaflet/zh-TW/Export-regulations.html +SHA1-Digest: epnCzwDkwpgVNYKKuw8j7t+J+Dk= + +Name: system/tts/lang_pico/es-ES_ta.bin +SHA1-Digest: NqpVUDr2Zot71OE2b9H9alSFvmU= + +Name: system/app/BackupRestoreConfirmation.apk +SHA1-Digest: GreK76ocRktwsjZTgftEwQ8UPik= + +Name: system/lib/libsurfaceflinger.so +SHA1-Digest: Pt3Mam6MUx61ze/0BhXaAdDqeKc= + +Name: system/etc/legal/leaflet/kk/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: yVKfa7ScwdwBNxZOUOs8M5aH7Bo= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Export-regulations.html +SHA1-Digest: msih0qFpAt96fMRG7Ih6EgiW4tw= + +Name: system/app/qcsemcservice.apk +SHA1-Digest: Un6KwFWV/eUcrMkwfxbWeNLQECg= + +Name: system/bin/tc +SHA1-Digest: 8ZXftveIrr6x1KKzb8a3wovrgqY= + +Name: system/etc/updatecmds/google_generic_update.txt +SHA1-Digest: 1Vp4IR8a20SbLBsHcaOPbkUf+NE= + +Name: system/lib/libtime_genoff.so +SHA1-Digest: yWApMkBmg7z0pzp5RzJUShvzSLg= + +Name: system/etc/legal/leaflet/ru/index.html +SHA1-Digest: nYuGIdY9rx0KRd8X9fv03LPWjXc= + +Name: system/etc/legal/leaflet/pt/GPSLocation-based-functions.html +SHA1-Digest: V4MM0cpFmlQYzJFh9NQ4DyrA9Pk= + +Name: system/framework/com.sonyericsson.sysmon.jar +SHA1-Digest: kgXwLGBZQO9eDjTLxAy90hSTrVk= + +Name: system/etc/legal/leaflet/kk/Emergency-calls.html +SHA1-Digest: w8eF4Rzu1xF5KUzSwUAkUnVdM+4= + +Name: system/etc/legal/leaflet/pt/Antenna.html +SHA1-Digest: OCsxvYgPjIZFmIWuYOQb/9xkeJk= + +Name: system/lib/libcneutils.so +SHA1-Digest: aoIo2daz86btDrp3wJcwTZvdxFs= + +Name: system/app/MusicFX.apk +SHA1-Digest: 6YbZRQgr4d9d/2tnSvmKHV4GI4c= + +Name: system/etc/legal/leaflet/zh-TW/Accessible-SolutionsSpecial-Needs + ---USROW.html +SHA1-Digest: 57DNFw15ySa1VejNH6d1oRtn/R4= + +Name: system/etc/legal/leaflet/pt/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: je1CEUIIMscBsW/9Q2LgnBUrtAI= + +Name: system/etc/security/cacerts/33815e15.0 +SHA1-Digest: Tg2OusUL9dKQej4AiGYCRSEgVyY= + +Name: system/usr/srec/en-US/google_hotword_logistic +SHA1-Digest: ockBZc2VMYxuaYq6KET9/bVJbtA= + +Name: system/lib/libwebcore.so +SHA1-Digest: BSme+yPl3OHBdog3DgIQGWtFWo8= + +Name: system/framework/com.sonyericsson.media.infinite.extension_1.jar +SHA1-Digest: RWfExmcqNllohhDqWkPwgfamkfA= + +Name: system/etc/legal/leaflet/zh-CN/What-we-will-do.html +SHA1-Digest: TlkUSOl9DZSQXaoZn4HbPDEHL88= + +Name: system/etc/legal/leaflet/vi/Flight-mode.html +SHA1-Digest: 4Dcrnk4ph/3g804R4bVQ6k7akp0= + +Name: system/lib/libOmxEvrcDec.so +SHA1-Digest: Ama8BQ5kI/cWFoEXTyBlDagTzVA= + +Name: system/lib/libnjexyomi.so +SHA1-Digest: IOHtLpERh8zLX+OfWXM4CKUGPbs= + +Name: system/fonts/DroidSans-Bold.ttf +SHA1-Digest: S6LSqKeLuL3B6fbnEeBm+87R0cU= + +Name: system/etc/legal/leaflet/fr/Service-and-support.html +SHA1-Digest: 8rirCA62qfH0kPThRQPUCKd0Gxs= + +Name: system/etc/legal/leaflet/en-HK/start.html +SHA1-Digest: ebXx1Fb2jazNlqTQHzPYQ3S+BGU= + +Name: system/lib/libmmipl.so +SHA1-Digest: nN5YDg1UIZ4eFXzgTDAhWpxVT7o= + +Name: system/etc/permissions/com.sonyericsson.uxpres.xml +SHA1-Digest: qGVVzbl+ZJ/JAs2NC/vD6aY9i+Y= + +Name: system/etc/legal/leaflet/images/logo.png +SHA1-Digest: im/CMvbJE+i2Ob2zWO4BZYJsMvM= + +Name: system/etc/legal/leaflet/hi/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: yfOr0RIy6Z5nMd5vYjRaFYq6K/w= + +Name: system/media/audio/alarms/Alarm_Rooster_02.ogg +SHA1-Digest: JhaluUQTr5D/bqpvzCXxM4fZMOw= + +Name: system/etc/legal/leaflet/zh-HK/Emergency-calls.html +SHA1-Digest: SDc2YovqMqmlJRYpBBATLAh/ka8= + +Name: system/lib/libOmxVdec.so +SHA1-Digest: Np8q9vJIXKp3qvGNadlodurbEPQ= + +Name: system/etc/legal/leaflet/en/SIM-card.html +SHA1-Digest: p/1F/Gfr4z9Nd5EBEVI3mBU1AeQ= + +Name: system/bin/zipalign +SHA1-Digest: pwL0NEqL/oCSjT+NiX3jh8ptQSU= + +Name: system/usr/xt9/SEMC_810_r1-4-12-1_SVusUN_xt9_2.ldb +SHA1-Digest: F7aPczZjmyw6odHW4skyhhiircs= + +Name: system/media/audio/ringtones/Orion.ogg +SHA1-Digest: mLrwRzu7g6nA4N/13go1i1qMocw= + +Name: system/etc/init.qcom.audio.sh +SHA1-Digest: MJ6IEncYqNFAQ28+NTV6Uh/21w0= + +Name: system/etc/legal/leaflet/ru/Battery.html +SHA1-Digest: uQTvHbZCTtKfZZDYWDxRUbiCz70= + +Name: system/etc/legal/leaflet/zh-CN/Power-supply-(Charger).html +SHA1-Digest: F5Fte8PfDSHBKzfZFwMP4l2uTEM= + +Name: system/fonts/AndroidClock_Highlight.ttf +SHA1-Digest: 0vRHOkM++Y5hREyvokR3HBnI2ig= + +Name: system/lib/libloc_adapter.so +SHA1-Digest: Ewv//18xwe2dRBtwVEJPk7VQ/ME= + +Name: system/lib/libcnefeatureconfig.so +SHA1-Digest: QqSaqa47eZvlgQ8WxqYBIoyAjhc= + +Name: system/etc/legal/leaflet/uk/Precautions-on-Memory-Card-Use.html +SHA1-Digest: Sm7O96f6v+KrtCerKDKKlpaWWf0= + +Name: system/etc/legal/leaflet/kk/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: BcMFxvehSf9M9bSF0XS6a978kxw= + +Name: system/etc/legal/leaflet/bs/Our-warranty---12.html +SHA1-Digest: HBRT3wLGQRpKwKvea6dJo+0gKZM= + +Name: system/etc/legal/leaflet/fa/Accessories.html +SHA1-Digest: Sf7+nDxBOH77IPKGSYsicpv/23I= + +Name: system/etc/legal/leaflet/bs/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: f41AK01jfSN3ea+NRt1WjtsZzio= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_grey_small.jpg +SHA1-Digest: qqaDxAjPRBOU0ejgesUdbsX5tQ8= + +Name: system/app/shutdownlistner.apk +SHA1-Digest: VW/9/oEh1WNogTZdYpH/OupSrKM= + +Name: system/app/Tag.apk +SHA1-Digest: hYFrDinAgk/X8RD/Ge9sQaI/Cnw= + +Name: system/etc/legal/leaflet/uk/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: umglrfMycE7sn63t1IJrNQj6EHY= + +Name: system/lib/hw/nfc.msm8960.so +SHA1-Digest: E89Im9I06JqIKTrT94swbxLEqDQ= + +Name: system/lib/libmdnssd.so +SHA1-Digest: AL1+0l1fqhMtW0jNbQPaiBy4xZE= + +Name: system/app/Backup-wizard.apk +SHA1-Digest: MdRneNUOF0b1tW7zv5mZ/ESA1bE= + +Name: system/etc/security/cacerts/ee7cd6fb.0 +SHA1-Digest: UwvGu9gadYis3G+kKIIPVzHgGRk= + +Name: system/framework/com.sonyericsson.privateapis_impl.jar +SHA1-Digest: gHk+JiFLlloWMYduISwCK3AZtHg= + +Name: system/media/audio/ringtones/CurveBall.ogg +SHA1-Digest: caUx/gIqqrDoh5d8LIfMo60fHxE= + +Name: system/vendor/pittpatt/models/detection/yaw_roll_face_detectors. + 6/head-y0-yi45-p0-pi45-r0-ri30.4a-v24/full_model.bin +SHA1-Digest: qC6ZM1KBN5XExmxhUXM5McociJ8= + +Name: system/app/SuperStamina.apk +SHA1-Digest: kDpVtfkDnZeLHk8DaYwwUR23TRM= + +Name: system/etc/legal/leaflet/uk/Battery.html +SHA1-Digest: +TSCLpHmPW2cvjtNbGztin2oYbg= + +Name: system/etc/iddd.conf +SHA1-Digest: ZegkFvP/L1cwowl7G/hjB7gsmbM= + +Name: system/fonts/DroidSansHebrew-Regular.ttf +SHA1-Digest: x+RcN58KCjuoXGnq7mti4m/7gag= + +Name: system/etc/legal/leaflet/ko/Driving.html +SHA1-Digest: Dydf4OraVGFym3cK8v8JzpTnI2c= + +Name: system/media/audio/ringtones/CASSIOPEIA.ogg +SHA1-Digest: vQnxsrnAL1DmdazuWcVo0IaHCUU= + +Name: system/etc/legal/leaflet/mk/Power-supply-(Charger).html +SHA1-Digest: w0F+aMNr6K+A3YxX/+HJ/xbC7H0= + +Name: system/media/audio/alarms/wood.ogg +SHA1-Digest: dae4Mx8adB+i32vYgoR2TFD1xgE= + +Name: system/app/SemcStorageChecker.apk +SHA1-Digest: ZgzQqzERp1mjyFxzycl6jyYZi8Q= + +Name: system/lib/libiddjni.so +SHA1-Digest: 7Hxb69OGKSWMPVekc6l8nZPdxCs= + +Name: system/lib/libxt_native.so +SHA1-Digest: unlur90tEoRiJSwiErDS42a2uNQ= + +Name: system/etc/security/cacerts/1dcd6f4c.0 +SHA1-Digest: ZD4839PLxZdYujgVOpN7nvdxfvs= + +Name: system/etc/security/cacerts/9772ca32.0 +SHA1-Digest: gLmISuqfwLlRD8jocBuF5N3MkTM= + +Name: system/etc/legal/leaflet/in/Our-warranty---12.html +SHA1-Digest: I7c0Tz3+W9WOie7tCwcGwxdBPuE= + +Name: system/media/audio/ringtones/Noises2.ogg +SHA1-Digest: 4+xExI39FBUsl3zHnTQi6gP6E7U= + +Name: system/lib/libcald_hal.so +SHA1-Digest: b3z44jWTs6XZbx16ssdvgebm7mQ= + +Name: system/lib/libmonkeyprocess.so +SHA1-Digest: 0+YuhmQ0aG23CEpSto06vlue4sU= + +Name: system/app/ContactsImport.apk +SHA1-Digest: RHMigN21DvfTesNEo5VK5HVsePQ= + +Name: system/lib/libSR_AudioIn.so +SHA1-Digest: s8dQygjzJPQjSmX9GaT90IjK/bA= + +Name: system/lib/libqmi_encdec.so +SHA1-Digest: 26CSKQvdSdrV9UwnkfMowP1Rlq4= + +Name: system/media/audio/alarms/Neptunium.ogg +SHA1-Digest: aqTrk7s3j0Acyl9OSDoG+U8gAMI= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/mesh_purple_hd1080p.png +SHA1-Digest: 3UJMV0kcjcAgs3U94Zv+84gvjlc= + +Name: system/media/audio/notifications/Drip.ogg +SHA1-Digest: sE+btoNoJLKDl3c9m4fbGnA/+UY= + +Name: system/fonts/DroidSerif-Regular.ttf +SHA1-Digest: gFxfl14C9Ij6HdHdDUTtT5Ow+rQ= + +Name: system/semc/chargemon/data/non-charging_animation_06.png +SHA1-Digest: wTMBXZdgo+akhHMPuDSuopbaQHg= + +Name: system/etc/vold.fstab +SHA1-Digest: NO0HjrSmb9wirgEbD5691oV5gXM= + +Name: system/bin/ip6tables +SHA1-Digest: 74KxzDhIbKLqA6dbS6eZtfBQF9g= + +Name: system/etc/legal/leaflet/zh-TW/Warning!.html +SHA1-Digest: yizhoySIKTdpWSMNr3Hf694buhU= + +Name: system/etc/legal/leaflet/mk/Important-information.html +SHA1-Digest: YaUvjbkz0cTEihl01OKtmNFo23E= + +Name: system/lib/libmmcamera_wavelet_lib.so +SHA1-Digest: xQle8rtn0QDzYwABh04rNKcBaLU= + +Name: system/lib/libWnnJpnDic.so +SHA1-Digest: FgsxTdjiCfwM4O7ExdCQ19NvmZg= + +Name: system/lib/libmpqsource.so +SHA1-Digest: 12tNZXotK2fiyJc+yqQ8DGoS1Ns= + +Name: system/etc/legal/leaflet/hr/Accessories.html +SHA1-Digest: VKzSCft3ur2xqrZegolKE8K7rwA= + +Name: system/bin/illumination_service +SHA1-Digest: zHspwgd55u+LXXfJ1RJ7I60Mh4s= + +Name: system/etc/legal/leaflet/cf/Loudness-warning!.html +SHA1-Digest: dUp7T3/KMB7gE3cpWOO0cjawtD4= + +Name: system/app/ServiceMenu.apk +SHA1-Digest: Nw/bMnCBgFetLHyZFmmaiBCaYV0= + +Name: system/etc/legal/leaflet/ar/Publication-number.html +SHA1-Digest: lh1y+/Iml3vjo6yoImJOKSHYwgU= + +Name: system/etc/security/cacerts/08aef7bb.0 +SHA1-Digest: UDr/oMgTCEDGW8P/MLGetyQV6u8= + +Name: system/lib/libstagefright_soft_mp3dec.so +SHA1-Digest: O2kKYT6mD/ydWks3Zs6En9IUYTc= + +Name: system/etc/legal/leaflet/zh-TW/ERROR=0.html +SHA1-Digest: wlEUxV5Nnd669ZTGLrGWq+Bkn8k= + +Name: system/lib/libttspico.so +SHA1-Digest: qiZWAsqzPlAvhVSOmzVllWxRZ/o= + +Name: system/etc/legal/leaflet/zh-CN/Declaration-of-substances.html +SHA1-Digest: o1qBu5ltea1fRj2chABL1sAwsMk= + +Name: system/etc/security/cacerts/87753b0d.0 +SHA1-Digest: tDVMAZ7hAGg3lwrrlN+4kvp3Jkc= + +Name: system/etc/legal/leaflet/pb/Protection-of-personal-information.h + tml +SHA1-Digest: 7O+wBOvtdyMqNSucrKOETfMyQ4M= + +Name: system/etc/legal/leaflet/ko/Flight-mode.html +SHA1-Digest: ZCkg/SqKzhZncSFdq4DHNNfRZ0k= + +Name: system/lib/libarchive_fe.so +SHA1-Digest: uso5YeXvfHKXaMQGH544cCFQJ9g= + +Name: system/media/audio/ringtones/Club_Cubano.ogg +SHA1-Digest: MPXwYj7Xd6qdmm7MKsiBjUFPPMA= + +Name: system/etc/legal/leaflet/mk/Limited-Warranty.html +SHA1-Digest: GTEgkwdHMXJR09rmkF4meOKcPXo= + +Name: system/etc/legal/leaflet/zh-CN/SIM-card.html +SHA1-Digest: a0gU0W4UkAWaZR1IKcOt9jinXvU= + +Name: system/usr/keylayout/Vendor_046d_Product_c532.kl +SHA1-Digest: iT7ZHxI43pKBUzjQc541oOM22hc= + +Name: system/etc/legal/leaflet/kk/GPSLocation-based-functions.html +SHA1-Digest: /vd7tVOhGvFoxUR6+l8XmUS8uKU= + +Name: system/framework/org.simalliance.openmobileapi_impl.jar +SHA1-Digest: JI2bZlg/9NfEEji7maLdFNxDpXE= + +Name: system/lib/libservicemenu.so +SHA1-Digest: yGqAJLPrVNxcYNSPhJvZx6l1+Wg= + +Name: system/media/audio/alarms/xperia.ogg +SHA1-Digest: FinDg8Xb5Iz2FJt/NPfiVDEm3s0= + +Name: system/lib/libc2d2_z180.so +SHA1-Digest: XUvuHqbDDEOx8/SD259Fp2XZJoI= + +Name: system/usr/xt9/SEMC_810_r1-5_HUlsUN_xt9.ldb +SHA1-Digest: F+hmgaAG4mKLZ360Vwpxd1WlpRQ= + +Name: system/fonts/AndroidClock.ttf +SHA1-Digest: 0vRHOkM++Y5hREyvokR3HBnI2ig= + +Name: system/etc/legal/leaflet/vi/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: t29bpy/4jlCmxAvqsY0D43XClT8= + +Name: system/etc/legal/leaflet/images/Thumbs.db +SHA1-Digest: b+fzJ9JUZk8lyZGvrTr2KDRcp7s= + +Name: system/lib/libSecureClockWrapperJNI.so +SHA1-Digest: RJ34AWlJ3NtiVxfmENc3sx7VRVc= + +Name: system/usr/xt9/SEMC_810_r1-3_VIlsUN_xt9_2.ldb +SHA1-Digest: vgI8SebDwkY5pMu08rULvw688gw= + +Name: system/usr/xt9/SEMC_810_r1-5_SRlsUN_xt9.ldb +SHA1-Digest: HffYPrLcel78EpcLWEvkGkS6XNk= + +Name: system/app/com.sonyericsson.retaildemo.apk +SHA1-Digest: QEMFpiKgWo9cjWx+dILfXgV0tdI= + +Name: system/framework/com.sony.sysinfo.jar +SHA1-Digest: nCB1laBTt0y2nD9q9amKvNlsZGY= + +Name: system/lib/soundfx/libdownmix.so +SHA1-Digest: d4O4WQ2VOHUN3TrGL4iQ17qS40E= + +Name: system/usr/keychars/Virtual.kcm +SHA1-Digest: xYiPhd++Jpvl6ARXJyusriz4pqE= + +Name: system/lib/libbcc.so +SHA1-Digest: 4SKMC0hLSfd0Ro0Yed0xJAgOlUw= + +Name: system/etc/legal/leaflet/in/Loudness-warning!.html +SHA1-Digest: MCZp0VL/HngzRgyA2NX3RGlex1k= + +Name: system/lib/libjni_eglfence.so +SHA1-Digest: VQ3GAdBWoGZEPZq/fUt2Yrr4RS8= + +Name: system/app/SemcCnapProvider.apk +SHA1-Digest: 0IcAIenIBESVewtrOxiF29Pl+0Q= + +Name: system/etc/firmware/efs3.mbn +SHA1-Digest: JQCq7ypMSQCc0MbyXdv/Bba7HeM= + +Name: system/lib/libcameraservice.so +SHA1-Digest: 2bg10kEUu3ZHoQ5/SWlcAz4ucP0= + +Name: system/lib/libcald_pal.so +SHA1-Digest: SD1dHWevi+FFWVfpJEC+dm9pqeg= + +Name: system/etc/legal/leaflet/ko/Publication-number.html +SHA1-Digest: lvGXAolcuB+1D5IfzzsXrtBhcds= + +Name: system/usr/xt9/SEMC_810_r1-16_ESusUN_xt9_2.ldb +SHA1-Digest: 8cDR2gpmyzsNOAMWOchhPaioUgk= + +Name: system/lib/libSHIMDivxDrm.so +SHA1-Digest: Bl1qBmp50DlfNPYzLFXfx2uFPew= + +Name: system/etc/legal/leaflet/pb/Purchaser-and-Product-Information--- + Brazil.html +SHA1-Digest: XtBt6qP4macyo0/nHRFNo1rqMLE= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Conditions-zh-zt.html +SHA1-Digest: EuMrqWgIf8O64SdgaHzljTI5VZA= + +Name: system/etc/legal/leaflet/zh-TW/Power-supply-(Charger).html +SHA1-Digest: ipvrmX3inAh6yY1eXX6JMLZkW/k= + +Name: system/usr/xt9/SEMC_810_r1-7_FAlsUN_xt9_2.ldb +SHA1-Digest: iTOHrEOcvwvnKjBetSOZ/kbtups= + +Name: system/etc/init.qcom.mdm_links.sh +SHA1-Digest: myPVpADUFg4XMtnagd82p9cd4W4= + +Name: system/media/audio/notifications/F1_New_MMS.ogg +SHA1-Digest: ZDxbtCijMgIk3unZCNBIGcObmhE= + +Name: system/app/MemcardTransportService.apk +SHA1-Digest: iEbY/6W9JKEQ+nVD4+WBqbwOPAY= + +Name: system/etc/legal/leaflet/sr/Precautions-on-Memory-Card-Use.html +SHA1-Digest: gtDPatMFnssj6PVDuUv2pVnY+14= + +Name: system/etc/legal/leaflet/images/LEGAL-EXPLODE-low.jpg +SHA1-Digest: 4YZo9CHY69ACx7nRrT6USCrNOSQ= + +Name: system/usr/xt9/SEMC_811_r1-3-10-1_NLusUN_xt9_2.ldb +SHA1-Digest: Eo/Z2fZcK60A80mo0dnuFKCCh/o= + +Name: system/lib/libc.so +SHA1-Digest: 6sUHdT3UW1WneWvsGEBBSRQjNTc= + +Name: system/app/SOMCTwitterSetupWizard.apk +SHA1-Digest: IPpxSZFeoexwNhtr/XHI4Yq5azg= + +Name: system/etc/legal/leaflet/xl/index.html +SHA1-Digest: 0ZmEPdW9jxk1LxfwBi05uzTf4pY= + +Name: system/bin/qseecomd +SHA1-Digest: 3vTBMl9p/qThXkOSQzXJCbfiGuU= + +Name: system/media/audio/ringtones/Safari.ogg +SHA1-Digest: EzIFjZLlvbJEbUA25p8qWS71eCQ= + +Name: system/app/DefaultCapabilities.apk +SHA1-Digest: /9sd0YgI/isuRxAshd5HgnfhKeM= + +Name: system/etc/legal/leaflet/fr/Battery.html +SHA1-Digest: caWp8McMr3b8RLpMqSNHX7n2Mw0= + +Name: system/etc/resolv.conf +SHA1-Digest: w/lzbpr3vQiFV4hZpQsgXI+l/I4= + +Name: system/bin/qosmgr +SHA1-Digest: A2sVAFHhNu0cjga1WGKZWN2/VpA= + +Name: system/media/audio/ringtones/GameOverGuitar.ogg +SHA1-Digest: UGgr1RjA7DE3eTevCT9+FLIqDoU= + +Name: system/etc/legal/leaflet/ru/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: RHBrWA90S2uH0r27Z1XNt8zrvNg= + +Name: system/etc/security/cacerts/418595b9.0 +SHA1-Digest: B6oXTUKiu1cnRTfY8Ck3pr4h5Jc= + +Name: system/lib/sysmon/sysmon_charge_current_limit_level.so +SHA1-Digest: xEBOV2mO6tv9oj8pl++B6nIa5ls= + +Name: system/etc/bluetooth/blacklist.conf +SHA1-Digest: tzfL29uwKo39KMrIZp8Cd3Wa36Y= + +Name: system/usr/xt9/SEMC_810_r1-5_HRlsUN_xt9.ldb +SHA1-Digest: LskwZoS2NjC7y60ViWp5yeyrudE= + +Name: system/bin/applypatch +SHA1-Digest: YQBrDu2bYAWpFMcO+8sPJ10gPxQ= + +Name: system/etc/firmware/tzsuntory.mdt +SHA1-Digest: kWMZYA34n2MdjUAC/LgtVgvNHnU= + +Name: system/bin/btnvtool +SHA1-Digest: AkWl2fyGffsUV1FLD3+1jnD+OSA= + +Name: system/app/SmallAppManagerService.apk +SHA1-Digest: MDnCbX7lywHpDwjDU6x4erSrcd0= + +Name: system/etc/mkshrc +SHA1-Digest: ymRp0Mh4Si4DSGQjbO2HFBivOTU= + +Name: system/lib/libpower.so +SHA1-Digest: QbtDw2dCj6+3+JkOE+SKrJ7ZuQo= + +Name: system/etc/security/cacerts/d8274e24.0 +SHA1-Digest: z2/j38mQezRg/RCv/RJ9aCSpKZ4= + +Name: system/etc/legal/leaflet/cf/Warning!.html +SHA1-Digest: R4XCHJRKTY2S4ZloYYrgK5UiWLo= + +Name: system/framework/com.sonyericsson.metadatacleanup.jar +SHA1-Digest: s16oqTo4y61TDMofPYZ+URFGNzM= + +Name: system/etc/permissions/com.google.android.maps.xml +SHA1-Digest: BbK4aFOA+G3wd2qESxbxITfwZYM= + +Name: system/etc/legal/leaflet/cf/Antenna.html +SHA1-Digest: taZQTlhO+Dv9EQias25dHEL1L6M= + +Name: system/lib/libsonivox.so +SHA1-Digest: QYOghJ6S2RhRcgmzmmVegp7cCaM= + +Name: system/bin/oemwvtest +SHA1-Digest: BMIlLbDlPAoq9ymVgs0Wpvgj5Os= + +Name: system/lib/libstagefright.so +SHA1-Digest: 0+cJBNwISQPXLbU2Ep8AqUFGXwo= + +Name: system/etc/permissions/android.hardware.sensor.gyroscope.xml +SHA1-Digest: brL84JgL2wCWqFvQAQDPM5lm+4o= + +Name: system/etc/legal/leaflet/th/Loudness-warning!.html +SHA1-Digest: 8D9hXuPVFs8Y3nvzl36cF5voxx4= + +Name: system/semc/chargemon/data/non-charging_animation_01.png +SHA1-Digest: tIPl4tvMyH2lB6aF0xRmRJFDgd8= + +Name: system/xbin/sqlite3 +SHA1-Digest: zEGOmNagTH6Km7HaM86jVaU4g00= + +Name: system/media/audio/alarms/multi_alarm.ogg +SHA1-Digest: 686dydsXpISpyURHnYmJWduhYWM= + +Name: system/media/audio/notifications/synth_chime.ogg +SHA1-Digest: QVgXqtwqJhMhSVUOCJJ+GWjDuAw= + +Name: system/app/SOMCTwitterAccount.apk +SHA1-Digest: 02fJXCdDHtJoEqpAkAwqhnapzD4= + +Name: system/etc/security/cacerts/84cba82f.0 +SHA1-Digest: m8/Q3u0mnTMsbDO41AfCzDSrMvg= + +Name: system/lib/libwfdcommonutils.so +SHA1-Digest: pxMI5gPm1pGx98XvghHXervGmpI= + +Name: system/lib/sysmon/sysmon_pa_therm.so +SHA1-Digest: uvAc9Js1KmpBS0K6K1Au/ta4gvM= + +Name: system/framework/am.jar +SHA1-Digest: LggACcTrVqrKmjIs1ZRzIDGv9GY= + +Name: system/etc/legal/leaflet/zh-TW/Limited-Warranty.html +SHA1-Digest: PQe6ITkEi5iKsO3LxThMCDqmeJY= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Important-information.html +SHA1-Digest: pH3DLIK9r2v+QnTt6Z9xbvJwzbM= + +Name: system/vendor/camera/SEM13BS1_IMX135.dat +SHA1-Digest: kI0onT7CCQaEp5wHYjrV/ChxO4w= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_fog_hd1080p.jpg +SHA1-Digest: sNwL/s6KOh7MGjoz3Q4z5ibAMZQ= + +Name: system/etc/legal/leaflet/en-HK/Guidelines-for-Safe-and-Efficient + -Use.html +SHA1-Digest: bQLOW8C8ZQZp2FV1RXYl3ybzhc0= + +Name: system/app/Gmail.apk +SHA1-Digest: 81MvNoL8PoyiE4PPRKmC+DI1MHE= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/purple_sky_hd1080p.jpg +SHA1-Digest: J5gU6gHtCrLJElyn2REeU4se/M0= + +Name: system/etc/legal/leaflet/images/arrow.png +SHA1-Digest: uRVRkoCxLahuLzO0hDq18mxN73s= + +Name: system/lib/librs_jni.so +SHA1-Digest: EID+i5UIwgVAql6EdcfUARWT/uY= + +Name: system/app/enhancedusbux.apk +SHA1-Digest: I1aeov/9j2QTA06qnXzSI349ZeU= + +Name: system/etc/legal/leaflet/in/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: WhtENSV4lCv5VkAx1VDrSdQCuf0= + +Name: system/etc/security/cacerts/bc3f2570.0 +SHA1-Digest: T0YolQvu92p5y+/IKRYPyfG1tQs= + +Name: system/etc/legal/leaflet/mk/Children.html +SHA1-Digest: 3AVFtA6JO1IRvUHIcKIb3KsK3sY= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/butterfly_and_wildflower_hd1080p_small.png +SHA1-Digest: wkAP5c2PfRGXitVoCLl7dETvkaU= + +Name: system/etc/firmware/dxhdcp2.flist +SHA1-Digest: Mj8/LUV0tONo/3sSm6yJtXfeoxo= + +Name: system/lib/libdsutils.so +SHA1-Digest: c5MET3sMmujjtrDTSnCquaAOknk= + +Name: system/lib/libgetzip.so +SHA1-Digest: yD/pET+2XfmykQWNmQi16HRrh64= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor6.so +SHA1-Digest: qAc+FxXQQRVLfkSK5Xdojy1Iivs= + +Name: system/app/usb-mtp-backup-transport.apk +SHA1-Digest: xxC14pXHZxqu+tviMdbqHTjz5bE= + +Name: system/usr/srec/config/en.us/models/generic8_m.swimdl +SHA1-Digest: bFt0FGX1o+r+WlmE2dUzuoGlyao= + +Name: system/lib/libMPU3050.so +SHA1-Digest: Ky6VNcqyLAxc+7BukKaH7iYF9Cs= + +Name: system/etc/legal/leaflet/hr/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: vryCCXrSPYsfAKRgC0sxswWDFLM= + +Name: system/etc/firmware/sbl2.mbn +SHA1-Digest: /BrCM/+ktscX/hSjvGlEhMLsPAk= + +Name: system/media/audio/ringtones/bingo.ogg +SHA1-Digest: 2hrjc9mJjTqGeDgErmwHCc2TEKk= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Export-regulations.html +SHA1-Digest: tg71VqCvHAHRjP6AT59e4iqtupk= + +Name: system/etc/legal/leaflet/ar/Antenna.html +SHA1-Digest: 9x0WlJk3j237BTJIF9JZwUgrISs= + +Name: system/etc/legal/leaflet/kk/Flight-mode.html +SHA1-Digest: tdRTIRR6/3zGy+GPd5aoye56YV8= + +Name: system/etc/legal/leaflet/hr/index.html +SHA1-Digest: 8cBK808R5atpisTa1s5vm4gPKEI= + +Name: system/media/audio/notifications/TaDa.ogg +SHA1-Digest: 6Nl+aLRFsxE78qVDMBmNBDhnHoM= + +Name: system/etc/legal/leaflet/mk/index.html +SHA1-Digest: Aa5FYktfdbAiPGz5tPrZms/VRS8= + +Name: system/etc/legal/leaflet/zh-CN/Warning!.html +SHA1-Digest: CnGeUmVbGLQCtFgt27G+S/R4K9Q= + +Name: system/etc/snd_soc_msm/snd_soc_msm +SHA1-Digest: 5wpaBemiDeJG0G/FhrvtWWrCtK0= + +Name: system/etc/legal/leaflet/images/btn_search_green-BIG.gif +SHA1-Digest: bqpBM9cdjh/vIE4s8clJlzRiNoE= + +Name: system/app/SocialEngineFacebookShareFrwkPlugin.apk +SHA1-Digest: kf76ogvCByXMLJAAWdjvOFlX1pg= + +Name: system/lib/libPaApiQC.so +SHA1-Digest: 5bdOkpzG0wlCTXj1Uf5u4WTmg3I= + +Name: system/etc/legal/leaflet/uk/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: FeVDSFxJEp6sJ/Obe1NlXKylq64= + +Name: system/etc/security/cacerts/d59297b8.0 +SHA1-Digest: EzYjzIwGO6iEh1Tk+7MTNXd/AaE= + +Name: system/lib/libqmi_csi.so +SHA1-Digest: oVV802tMI4TexXaICwwVsB8ryDY= + +Name: system/media/audio/ringtones/Eastern_Sky.ogg +SHA1-Digest: YrStd4w+/OpCwxpaCDJzPRpcNBw= + +Name: system/etc/permissions/android.hardware.wifi.direct.xml +SHA1-Digest: 26Zih/5IpKCLJgM/cg+lI9zxZ4Q= + +Name: system/etc/legal/leaflet/en-HK/What-we-will-do.html +SHA1-Digest: cajhNcCCTJE78qFqdx+O4LxWkRY= + +Name: system/bin/curl +SHA1-Digest: ZSqnetfv9MmJQu6soIE+vi8oGTg= + +Name: system/etc/legal/leaflet/xl/Antenna.html +SHA1-Digest: P/2r5KFfgCTawXxgsZ2X4rvdeqM= + +Name: system/etc/legal/leaflet/ko/What-we-will-do.html +SHA1-Digest: s48gj+08DO/9CoXzhoqqt0ytrBI= + +Name: system/bin/updatemiscta +SHA1-Digest: bPT0SdY0atrsmrZ9A4whaqhQ6BA= + +Name: system/etc/legal/leaflet/fa/Malware.html +SHA1-Digest: PaXyreexSQUfdfdPUgI34ST0mxE= + +Name: system/etc/security/cacerts/d537fba6.0 +SHA1-Digest: fpmK/UpGvaATZvclHSu6ryqfKbU= + +Name: system/lib/libgesture_client.so +SHA1-Digest: N8Da+q2FMAqPAQ7arzfuUpIEhFA= + +Name: system/lib/libqsap_sdk.so +SHA1-Digest: 5AnUZFTplWHAYBAUN5T/3TzGiX8= + +Name: system/framework/com.sonyericsson.colorextraction_impl.jar +SHA1-Digest: MPPlq0niXAKNREGK44gIHPojbj4= + +Name: system/etc/legal/leaflet/sr/Emergency-calls.html +SHA1-Digest: chUl280ePC18lzNFSbHQ1nOCTk8= + +Name: system/etc/legal/leaflet/zh-TW/Our-warranty---12.html +SHA1-Digest: HQR5Tt8D/mPJdrmoE+QILGi4USI= + +Name: system/bin/netcfg +SHA1-Digest: /XE2tGorWihZb9UPh2t/r6dzMAk= + +Name: system/etc/legal/leaflet/ms/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: TTHJIL6yJjwu0oUrZhyU2zHB3vE= + +Name: system/app/PlusOne.apk +SHA1-Digest: SBu2bB+Hsll6g+Pph3nB2/Kj13k= + +Name: system/etc/legal/leaflet/xl/Precautions-on-Memory-Card-Use.html +SHA1-Digest: baTin9KIDy7ybB2ioBWW8CkiC5k= + +Name: system/etc/legal/leaflet/en-HK/Precautions-on-Memory-Card-Use.ht + ml +SHA1-Digest: aPKtTXjxuLAtvgtnekkWOxRpkAQ= + +Name: system/etc/security/cacerts/0d188d89.0 +SHA1-Digest: u89PgYhymechdBRRkE2kQEwXY/E= + +Name: system/etc/firmware/vidc_1080p.fw +SHA1-Digest: ne4cZiTOYoMbukO3ZTXGSHvhQpg= + +Name: system/etc/legal/leaflet/zh-TW/Publication-number.html +SHA1-Digest: DIU4+B0ggW8mUmVfxukiXjMNch8= + +Name: system/etc/legal/leaflet/cf/End-User-License-Agreement.html +SHA1-Digest: pdToGTypmb1Sw2zlO4z9fw3auiY= + +Name: system/bin/efsks +SHA1-Digest: EV21IH1wLO3fl+cweFnp/8/lP4U= + +Name: system/etc/legal/leaflet/ar/Battery.html +SHA1-Digest: B93/R9PuSq1xrjeUjv7yoBhLxB0= + +Name: system/usr/xt9/SEMC_810_r1-5_IDlbUN_xt9_2.ldb +SHA1-Digest: 6lznPzXpcBjaZJd/2TNxCbbCYeo= + +Name: system/etc/legal/leaflet/en/Memory-Card---legal.html +SHA1-Digest: GQnCAtOtbv49C8ciRyue2e1cuD4= + +Name: system/etc/legal/leaflet/fa/Our-warranty---12.html +SHA1-Digest: QNl4xVTXlw8UdRacN7uSWoB6uXE= + +Name: system/fonts/RobotoCondensed-Italic.ttf +SHA1-Digest: NKhBTHMcBPw7pwPS/BseTh6QXIY= + +Name: system/usr/srec/en-US/normalizer +SHA1-Digest: a+2nBo6Uy8cIhMZ4fRNuUxTriU4= + +Name: system/etc/legal/leaflet/hr/Memory-Card---legal.html +SHA1-Digest: ziblzQoFg0YmkURiDIcjwBebC0Y= + +Name: system/app/SystemUI.apk +SHA1-Digest: jljzIM3Z8Cj+/2lpAbiKa3SLNeE= + +Name: system/etc/legal/leaflet/th/Conditions.html +SHA1-Digest: qqHXfgBYtgoKKZg4hASo8upOZfw= + +Name: system/framework/digitalpensdk.jar +SHA1-Digest: FhR3f1/5JAuZOhUzKGpFJtdQoKI= + +Name: system/media/audio/notifications/Argon.ogg +SHA1-Digest: dRS8RUmbJgJiwRYxBtWVLJIyzzg= + +Name: system/framework/com.sonymobile.settings.illumination.jar +SHA1-Digest: L73mEOJqUmk844PhihpMI108gSM= + +Name: system/etc/legal/leaflet/kk/Malware.html +SHA1-Digest: PC0gGhRBczwRK98w7WJ+3V6HlRM= + +Name: system/etc/legal/leaflet/zh-HK/Copyright-and-trademarks---Legal- + leaflet.html +SHA1-Digest: oapy4TmRDTk4+5Lvj0/+Szv+MvA= + +Name: system/etc/legal/leaflet/pt/Memory-Card---legal.html +SHA1-Digest: b7TSd7wRS1qdS9HzNBmG1Rsrmys= + +Name: system/framework/content.jar +SHA1-Digest: pg85Tci0DNzOSpdfZzE4CHJQuhs= + +Name: system/framework/com.google.android.media.effects.jar +SHA1-Digest: OtDLHFArnhoeRmQh/nKbVn/6fkE= + +Name: system/etc/legal/leaflet/sq/Export-regulations.html +SHA1-Digest: QuuF8K1TAw8gc/jnY8/8r0qKzp4= + +Name: system/etc/legal/leaflet/kk/Conditions.html +SHA1-Digest: ZVmWKMrS0vfSLBPUMLsJvZPAH8M= + +Name: system/etc/legal/leaflet/bs/Loudness-warning!.html +SHA1-Digest: 7wCL70s5bPivf995Oyym0WGNghc= + +Name: system/etc/legal/leaflet/sq/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: RfugxPuhEvT11TjSUOQACYMEiMc= + +Name: system/etc/legal/leaflet/uk/Loudness-warning!.html +SHA1-Digest: ZCVz5WIEZ/QrBL/Mnov040qpwQk= + +Name: system/vendor/etc/fallback_fonts-ja.xml +SHA1-Digest: j5z0s4qUD3+JbTanzGqg5k23owo= + +Name: system/media/audio/alarms/balance_of_power.ogg +SHA1-Digest: JQadf4GXW8vaBheAenDdZ47rs9E= + +Name: system/vendor/overlay/com.sonyericsson.r2r.client-res.apk +SHA1-Digest: fIt+S9BDps/jdGFCRTC+iRdYl/I= + +Name: system/lib/libexif_jni.so +SHA1-Digest: t3ijDSUkNc4o+ed564oVoK9EEjU= + +Name: system/framework/com.sonyericsson.navigationbar_impl.jar +SHA1-Digest: fqI0m29RCcf9JpODuEOQvBOq+Gg= + +Name: system/usr/xt9/SEMC_810_r1-9_LTlsUN_xt9.ldb +SHA1-Digest: 5kx5GqOvVYa/yC4im3U+NnspYFQ= + +Name: system/app/FBMediaDiscovery.apk +SHA1-Digest: R/pLeSmE1bHDr2A6OImZDBrPLtk= + +Name: system/etc/DxHDCP.cfg +SHA1-Digest: 4iJD2vMu+QSlFmOdkh0j2Sf3IsY= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_green.jpg +SHA1-Digest: fYc5Doroo/t+TAOrUb/NIrhzyp0= + +Name: system/etc/gps.conf +SHA1-Digest: GrFBSGt28lSO++mGZe0VeNc1gMo= + +Name: system/bin/dalvikvm +SHA1-Digest: JrCBcdjQPnUVB33opNhr70q2iiE= + +Name: system/lib/libjni_mosaic.so +SHA1-Digest: frokGYWxjQMSVRJ4fLiqxsV79jg= + +Name: system/lib/libxml.so +SHA1-Digest: 8Pt5Fzj7WoYN46k9xY5ncGen0EI= + +Name: system/lib/libdivxdrmdecrypt.so +SHA1-Digest: dW2ypd/svF48s/ziIXmuaMHK/CY= + +Name: system/lib/libvideoeditor_videofilters.so +SHA1-Digest: IHrnJdoac+oL5tNTVC5fz2+81r8= + +Name: system/etc/legal/leaflet/kk/Personal-medical-devices.html +SHA1-Digest: +KR9j2oJBUl3bgtRt+80R3nkl/g= + +Name: system/etc/legal/leaflet/ru/Flight-mode.html +SHA1-Digest: e7dEMmNA9JXBjSiNkcSfLnD1ysM= + +Name: system/media/audio/ringtones/Bollywood.ogg +SHA1-Digest: IdN6NI8pDVcoJ9tzm9H6JwBC02U= + +Name: system/etc/legal/leaflet/images/Note.jpg +SHA1-Digest: fdIUHQx2B0dXPWFy8rDTKgwGrqE= + +Name: system/media/audio/ringtones/garden_waltz.ogg +SHA1-Digest: lqYy5LAJa2lLStsBvY24sJqcnk4= + +Name: system/etc/legal/leaflet/images/button_search.png +SHA1-Digest: kKdW3/VWMKIPxLdt6STg5mZlwcI= + +Name: system/media/audio/notifications/Palladium.ogg +SHA1-Digest: OwMFmi3sbAgoMEy3axgdDP62PZk= + +Name: system/etc/init.d/07sysctl +SHA1-Digest: +ul6cal0ChZ7SzI2bvP4NGg+kfo= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/End-User-License-Agreemen + t.html +SHA1-Digest: ecXmi9kdRwVIYOzpnZPikyo7GO0= + +Name: system/usr/keylayout/keypad_8960.kl +SHA1-Digest: p3ZBzmRo98KNXv2uf/D2sjmW/Yc= + +Name: system/lib/egl/libGLESv1_CM_adreno200.so +SHA1-Digest: WHNCAjmNwx/RDOv5dSrUbq6qu7c= + +Name: system/lib/libmpqavsync.so +SHA1-Digest: WgP+I2kZVXP09OdFY1rnuPvdZbM= + +Name: system/lib/libfastcvopt.so +SHA1-Digest: TWbB0kQeCPhjqV9p1Q8IE01SMNw= + +Name: system/app/TetherEntitlementCheck.apk +SHA1-Digest: xFPUIAPJfl/F4S2Azw2wO/CMAD0= + +Name: system/lib/libcald_imageutil.so +SHA1-Digest: Nkx3FCZeQQsvtAtNoH3P/NSDjhI= + +Name: system/lib/libsoundpool.so +SHA1-Digest: QYOpn8UZ7uT7FwaPYSPjbdnBB1Y= + +Name: system/usr/xt9/SEMC_810_r1-4_PLlsUN_xt9_2.ldb +SHA1-Digest: aB2jMyC0hOlZ1OwDYMq5dGbyrjE= + +Name: system/etc/legal/leaflet/pb/SIM-card.html +SHA1-Digest: mL0hrFrINz7uEjQp23E1ImzhPGI= + +Name: system/bin/netmgrd +SHA1-Digest: jN7jmDpOIWikAD5g3q9nY4Pz6/c= + +Name: system/etc/fallback_fonts.xml +SHA1-Digest: +a2aVRjaWpgmZNUuiC4SSSN8fMI= + +Name: system/etc/legal/leaflet/ar/index.html +SHA1-Digest: PHQdfuxKJWbpBT7feSjVZNFV0Eo= + +Name: system/etc/legal/leaflet/bs/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: wlmfzkR5b4Zz0D7//Nchlf0/phQ= + +Name: system/etc/legal/leaflet/en-HK/en-CN/index.html +SHA1-Digest: NuTaeKa7MLZwJV+Om18LLeEfUq8= + +Name: system/lib/libtilerenderer.so +SHA1-Digest: XUWsCsqPjVoJYmkfhKxkW4WEcq0= + +Name: system/etc/legal/leaflet/ae/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: XgYtJlkCLv2hoTuHH89NNrPhpBA= + +Name: system/etc/legal/leaflet/iw/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: YQKHBfxcdoLL/tSvXnKtUn/9Q0E= + +Name: system/media/audio/notifications/Plastic_Pipe.ogg +SHA1-Digest: WkcBmxIwrC4GozDBaKrXl0hLejY= + +Name: system/etc/legal/leaflet/en-PB/Service-and-support.html +SHA1-Digest: gAQFioh9BWza29IVvxOoQg9qLj4= + +Name: system/etc/legal/leaflet/fr/Personal-medical-devices.html +SHA1-Digest: Pv/AYt/VRVeY3iLf4J4lrFOJe4E= + +Name: system/framework/com.sonyericsson.dlna.playanywhere.jar +SHA1-Digest: T55H38FH78T0an5/n8imutnUrtw= + +Name: system/etc/legal/leaflet/pt/Protection-of-personal-information.h + tml +SHA1-Digest: Z1gA3E2gZF1YaEq8VCTfyxrssmQ= + +Name: system/etc/legal/leaflet/images/E-manual_splash-screen.jpg +SHA1-Digest: YlqxQNQhXi5v6Jre89LOq+Xv1PI= + +Name: system/etc/hcidump.sh +SHA1-Digest: l8JbQO/gS1r/cSQEJ1IbxR95HkY= + +Name: system/media/audio/ringtones/Gimme_Mo_Town.ogg +SHA1-Digest: jxLAdtBtLZWcPDzvjvOiaECZ9GY= + +Name: system/media/audio/ringtones/Steppin_Out.ogg +SHA1-Digest: dNC3VLVUwKgjX+8vHJ3FVAPG1Vc= + +Name: system/lib/libharfbuzz.so +SHA1-Digest: 4/XAo3g2EGT5Oj8SU67avyIZExE= + +Name: system/tts/lang_pico/fr-FR_ta.bin +SHA1-Digest: k5eoGN7uJD6gPoD62ErDAhLNV3k= + +Name: system/vendor/firmware/libpn544_fw_c2.so +SHA1-Digest: VBeAl22HyrhaiRVYLiPRUcPo4rc= + +Name: system/etc/legal/leaflet/fr/Important-information.html +SHA1-Digest: O326px6L4JVJQlspk1nSr+sN37o= + +Name: system/etc/legal/leaflet/en-PB/Loudness-warning!.html +SHA1-Digest: 4zvfWBWrq/uNpbonk1wlGTRyiMk= + +Name: system/etc/legal/leaflet/sr/Driving.html +SHA1-Digest: TbVj23ijfA6c6/6Iyokd21ofNos= + +Name: system/etc/legal/leaflet/xl/Driving.html +SHA1-Digest: CMV7uXmc3//1F48cEaeQi7dBGB8= + +Name: system/app/POBoxSknWood.apk +SHA1-Digest: aIXx5X5e0I1xFcZvh4Bgtp1WLAo= + +Name: system/bin/mpdecision +SHA1-Digest: +B74vCkrfZQmS1uoxt12e+sOYYM= + +Name: system/framework/bouncycastle.jar +SHA1-Digest: w0HEp4L9sEprnwm6uMM0wDrwq+c= + +Name: system/lib/libctest.so +SHA1-Digest: 35NN9yTJRrBoPL09IBLd4iMpjfg= + +Name: system/etc/legal/leaflet/zh-CN/Precautions-on-Memory-Card-Use.ht + ml +SHA1-Digest: 3grt7v2T5vuLLmCH7sAuipfbmuU= + +Name: system/app/GoogleContactsSyncAdapter.apk +SHA1-Digest: ncMDwVJhNtKVEfslxs8/RbaoGkM= + +Name: system/etc/legal/leaflet/sr/Flight-mode.html +SHA1-Digest: U1y3qM4m0KJOteg8bLk972aO9D0= + +Name: system/usr/srec/config/en.us/models/generic11_f.swimdl +SHA1-Digest: 5e8IIA7SPCk0zXso+yzwYfaIl4Q= + +Name: system/etc/permissions/com.sonyericsson.snp.video.xml +SHA1-Digest: Ao+ChdyocZ4DZk48OYV1Co6kVhY= + +Name: system/media/audio/ringtones/SpringyJalopy.ogg +SHA1-Digest: YkPidHC1fC6zHCjj1iP36UtQZuo= + +Name: system/etc/legal/leaflet/en-HK/Conditions-zh-zt.html +SHA1-Digest: EuMrqWgIf8O64SdgaHzljTI5VZA= + +Name: system/app/Home.apk +SHA1-Digest: 0r5fBl5Dk7nmqsKITFjrElXu5k0= + +Name: system/lib/libnjfzk.so +SHA1-Digest: GPDXXDxd/M8ryfPmFol1ADcKXyU= + +Name: META-INF/com/google/android/updater-script +SHA1-Digest: k4+E9P5VMTh0MjhcTUkTeOExUos= + +Name: system/lib/libsysinfo_jni.so +SHA1-Digest: QLwbpNA9Wwn/EIqIQRZUTErBfYc= + +Name: system/etc/legal/leaflet/images/LEGAL-RECYCLEBIN-low.jpg +SHA1-Digest: tg4WUj8tWELcO/wjUOwWn0DBvo8= + +Name: system/etc/legal/leaflet/in/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: 1DkEeCHeH3QS8SlUN3SvbGvbNqM= + +Name: system/etc/legal/leaflet/ar/no-title.html +SHA1-Digest: g+F791OHifWi6Nn5Zp46WoCQf0k= + +Name: system/etc/product/content/playlist_20121224102100.xml +SHA1-Digest: TpwCWEZORJv/qT8vNwMUq02NJSI= + +Name: system/etc/legal/leaflet/ru/What-we-will-do.html +SHA1-Digest: zhLPlckp0p+THosjD4/XdpGZdzg= + +Name: system/etc/legal/leaflet/zh-TW/Flight-mode.html +SHA1-Digest: KvxkQPW5tnOFcCjejPyCS2u6+eU= + +Name: system/etc/permissions/com.sonymobile.playanywhere.xml +SHA1-Digest: MXjQMFoglgmBAwv+pdo1aeIf19E= + +Name: system/etc/firmware/leia_pm4_470.fw +SHA1-Digest: mTZLCv2U5JbMyDPKBCTdaFO5cdU= + +Name: system/etc/legal/leaflet/in/no-title.html +SHA1-Digest: wJgz+cY+rJz8Z3Wj2j8ksJcwrdk= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Accessories.html +SHA1-Digest: /RDU9R0OGMdwYYDRimrm3mpmj7w= + +Name: system/etc/legal/leaflet/fa/Loudness-warning!.html +SHA1-Digest: R4UOQeZ5RkMu32fFHMAyxN1t+8Y= + +Name: system/bin/drmserver +SHA1-Digest: lyf1hFksCwDBrxcOYQjGh0dWwMk= + +Name: system/bin/e2fsck +SHA1-Digest: f37eluxyOk5fil6pH6HbZgeYZg4= + +Name: system/etc/legal/leaflet/ko/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: wL504sWTdY7urPaAwFyDRJWBXig= + +Name: system/lib/libvideochat_jni.so +SHA1-Digest: x9HVQGQWyTQJe9KKBgTqbBSjqwc= + +Name: system/etc/legal/leaflet/iw/Accessories.html +SHA1-Digest: s01+69IZTo6YbI/c4tI6U9nvFaA= + +Name: system/media/audio/notifications/DearDeer.ogg +SHA1-Digest: iq1AmmBFNXzh7VopP5NqbwZf+Gk= + +Name: system/etc/legal/leaflet/in/Conditions.html +SHA1-Digest: lG/Eqt7uJp3crqsS0g0Vc1Ljc0g= + +Name: system/etc/legal/leaflet/ae/GPSLocation-based-functions.html +SHA1-Digest: VpSqHdQkyycweIfhxF4IhFOLJI0= + +Name: system/etc/legal/leaflet/ae/Publication-number.html +SHA1-Digest: R9fH70a8WtjCISY2VyFqWTs+EvY= + +Name: system/etc/legal/leaflet/ms/Antenna.html +SHA1-Digest: fJNPmjN/xVjjRnysyLFKgsRmP8o= + +Name: system/usr/keychars/qwerty2.kcm +SHA1-Digest: qPZSGYC9afTwkRU3aCThctqnOdQ= + +Name: system/etc/legal/leaflet/xl/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: QnsGUWHWOc3l7B6d1TMUTwjJRek= + +Name: system/etc/legal/leaflet/th/Children.html +SHA1-Digest: YV0CdN82TAaZx8Dn/nrtW7z+g3U= + +Name: system/usr/srec/en-US/lintrans_model +SHA1-Digest: ZES3OS6OKnK1lLKetEkUi+PgL4I= + +Name: system/lib/libnjaddress.so +SHA1-Digest: 6P9LbT28lP2OpArPN5NVhylNZfc= + +Name: system/build.prop +SHA1-Digest: lshhyQhmFgQYVg7vLbjdOoueyjA= + +Name: system/etc/legal/leaflet/ko/Our-warranty---12.html +SHA1-Digest: 4ZU7YeOG8gL67ANN+01kCUqC+Hs= + +Name: system/bin/qmuxd +SHA1-Digest: EIHWkd106B5cUz9gQRf925bL+TI= + +Name: system/etc/legal/leaflet/en-HK/Memory-Card---legal.html +SHA1-Digest: GQnCAtOtbv49C8ciRyue2e1cuD4= + +Name: system/lib/libcrashmonitornativejni.so +SHA1-Digest: dx7ClxKWn44bTNWyXPN4qlKC5Lc= + +Name: system/lib/sysmon/sysmon_pm8921_tz.so +SHA1-Digest: dkUqaGy23o3Fns9GTjZPmhz+HpQ= + +Name: system/etc/legal/leaflet/sq/Children.html +SHA1-Digest: EnR8S1P1MZ6nJKYlHW77FeIMuXk= + +Name: system/etc/legal/leaflet/sq/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: xRHG9Fax3QPnrr3eIbgHQeQj7XQ= + +Name: system/lib/libcorkscrew.so +SHA1-Digest: jega2j1r1/SvfkZgW1rjLV46Tik= + +Name: system/semc/chargemon/data/charging_animation_06.png +SHA1-Digest: hvB8xfh1O1t+rZDiFjWv5TzmL9E= + +Name: system/etc/legal/leaflet/iw/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: gtheU9i+hj/AUGJ5ZoDbD2Z/vbA= + +Name: system/bin/fm_qsoc_patches +SHA1-Digest: 3jPZpSBClUzGLMP0gzXoAmwA4ws= + +Name: system/framework/com.sonyericsson.dtcpctrl_private_impl.jar +SHA1-Digest: gmOF41WjmgNQ3IXQUEAClGRRLFw= + +Name: system/etc/legal/leaflet/in/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: lekbFIBiwCb/VykVioTw75nPZPI= + +Name: system/etc/legal/leaflet/sq/Battery.html +SHA1-Digest: lV1bGWiFhTCUvpEVggWyowAx+DU= + +Name: system/etc/legal/leaflet/zh-TW/Malware.html +SHA1-Digest: oaOJDMf5aIeORBB66NQu+DxmjmU= + +Name: system/bin/usf_tester +SHA1-Digest: OMbmdSRnuSPWu3+ql/lFx9ht5UA= + +Name: system/etc/legal/leaflet/th/index.html +SHA1-Digest: PYaVO/M/4jqJsder9tATomkrLD8= + +Name: system/etc/security/cacerts/524d9b43.0 +SHA1-Digest: rOw80KrUjM6OhWVNkxN1dgNU2W4= + +Name: system/etc/security/cacerts/1eb37bdf.0 +SHA1-Digest: vHz58A2QzT7wd83T0nvUMdAkBps= + +Name: system/etc/permissions/com.sonymobile.nfc.xml +SHA1-Digest: ErJEil23HvsOmQFi+eZTCn+TBdg= + +Name: system/lib/libRS.so +SHA1-Digest: 5+IcBi82PUqNzfCVi3oaCsBmhl4= + +Name: system/etc/security/cacerts/455f1b52.0 +SHA1-Digest: IK/26zCMyRWnrIwW2qASL3px2sU= + +Name: system/etc/permissions/android.hardware.touchscreen.multitouch.j + azzhand.xml +SHA1-Digest: +3w9s8y7aS1ccCYaDZP65k5lMVM= + +Name: system/media/audio/ringtones/Ring_Classic_02.ogg +SHA1-Digest: WhrmdNO1Thyne87iSbuEMHRXp4w= + +Name: system/app/StartupFlagV2.apk +SHA1-Digest: 6N2rtW23pLKEpdwfXhX5n6CnE3M= + +Name: system/etc/legal/leaflet/ms/Flight-mode.html +SHA1-Digest: YSbmGHyjy56SGmpHXYtWICLgWWU= + +Name: system/lib/libaudioflinger.so +SHA1-Digest: Ae2i1JiUk6IEkX3uRbElO0ebAJk= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/grey_lake_hd1080p_small.jpg +SHA1-Digest: /D18D7Q3zVYSCLUC5Gt16sdaZJ4= + +Name: system/etc/legal/leaflet/images/next-Orange.png +SHA1-Digest: lN3v466IzQC4HuMNLoDwi3mQIMY= + +Name: system/etc/firmware/wlan/prima/WCNSS_cfg.dat +SHA1-Digest: OMlWYjEAGqlZUIehQvJ1e9lMecE= + +Name: system/etc/legal/leaflet/sq/Power-supply-(Charger).html +SHA1-Digest: HJfgxzapAUdNBuWW6lIk8bbcvrc= + +Name: system/bin/dbus-daemon +SHA1-Digest: BuBP70pNn6O0rzHaoSHlhB3V3cs= + +Name: system/etc/legal/leaflet/vi/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: O3NqcvUauTtOhET8vX1niP/kAdw= + +Name: system/media/audio/ui/camera_click.ogg +SHA1-Digest: jet4ZWI3QDsJT8T3YoNr9gH1NUc= + +Name: system/etc/thermald-8064.conf +SHA1-Digest: UPL80HUbItTFKqTSBuGBsaA+uxo= + +Name: system/lib/libext2fs.so +SHA1-Digest: WuIIor9T0q7qmqVphkRk4jm5ELw= + +Name: system/etc/legal/leaflet/vi/Power-supply-(Charger).html +SHA1-Digest: P3kEvRcNo1p8NQ9xcP9MK7E3o5g= + +Name: system/etc/legal/leaflet/th/Malware.html +SHA1-Digest: esOfoNY5qBmhfqDfIyXrV1XfwIo= + +Name: system/etc/snd_soc_msm/snd_soc_msm_2x_Fusion3 +SHA1-Digest: GPXFHdUJFFdN+2qW1UucYUOv/F0= + +Name: system/etc/legal/leaflet/styling/legal_mltr.css +SHA1-Digest: 2IfWR8ONY4rWWuOI4wOiRcuKuAQ= + +Name: system/media/audio/ringtones/Playa.ogg +SHA1-Digest: SbrgqdRkRkClgD/CLsbXdj3oVXE= + +Name: system/usr/keylayout/Vendor_045e_Product_028e.kl +SHA1-Digest: BsTBZddUa0mpDkeAEr4ZC/V3iX8= + +Name: system/app/Superuser.apk +SHA1-Digest: 6IYTHB4xeaCrKkX50P7Xd/zP6Bo= + +Name: system/media/audio/notifications/Adara.ogg +SHA1-Digest: 29F/iMymhwO2R89EyV2OF/gmrfU= + +Name: system/lib/libcurl.so +SHA1-Digest: rtKzikMTGPRge5EEsXOPPZEmZ38= + +Name: system/etc/legal/leaflet/en/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: bzoFF9tcHpcNcwsHtCRKhhapLm4= + +Name: system/etc/legal/leaflet/ar/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: ZHeJIievv3v+WvBUP9xu4KHWA6s= + +Name: system/lib/modules/lcd.ko +SHA1-Digest: ukrW5taO62LhXRy/6j4IbktkxuQ= + +Name: system/etc/legal/leaflet/en-HK/Important-information.html +SHA1-Digest: pH3DLIK9r2v+QnTt6Z9xbvJwzbM= + +Name: system/etc/fallback_fonts-ja.xml +SHA1-Digest: bCDSYiDIZuCZwLXS6/r1HPprHLA= + +Name: system/etc/security/cacerts/dbc54cab.0 +SHA1-Digest: G7ilNysmUiKqjP0b0/CgdRCDdpE= + +Name: system/lib/libdefcontainer_jni.so +SHA1-Digest: Z/R+z0uPZ13PZqhIRJwBQZzue7Y= + +Name: system/lib/libmmipstreamutils.so +SHA1-Digest: 5VDnkOCVzwttSXzE9Lz8lidCgqk= + +Name: system/etc/legal/leaflet/uk/Power-supply-(Charger).html +SHA1-Digest: C4nla+gUNw6GmVpiCDahJq9NOus= + +Name: system/etc/permissions/handheld_core_hardware.xml +SHA1-Digest: whHNJSrlPVXT63+1hEtHspIBsV0= + +Name: system/etc/legal/leaflet/in/Personal-medical-devices.html +SHA1-Digest: bG9Gz7vkEbyrRYHGT1aaHM4uYFU= + +Name: system/app/BlackTheme.apk +SHA1-Digest: HNEaIMYbejH48zlgFzjs5VZkPrA= + +Name: system/etc/legal/leaflet/in/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: fi7GJ8WHO8haclzVGIlZWrxF2sU= + +Name: system/lib/libmmipstreamnetwork.so +SHA1-Digest: UveU+NyAIgyw7GIe6bdpJNF6S3s= + +Name: system/media/audio/notifications/Sirrah.ogg +SHA1-Digest: 7CchfoZpL4aAuL22g27dhHzdQuc= + +Name: system/vendor/camera/SEM13BS0_IMX135.dat +SHA1-Digest: IXCgNKywd9hO9uFTn/KzoAlTFI8= + +Name: system/etc/security/cacerts/5046c355.0 +SHA1-Digest: yq910Cd0R0uzSNpNm6fYzr5Q5Ho= + +Name: system/bin/surfaceflinger +SHA1-Digest: g342E/88DyWs7EWLYVL7DYCqsA0= + +Name: system/etc/legal/leaflet/en/Antenna.html +SHA1-Digest: fxNZgCsam5YbU6vO8WuwPr7bMNs= + +Name: system/etc/security/cacerts/5a5372fc.0 +SHA1-Digest: lRZnSCW+h2OrdLdhSE/61v9FF5g= + +Name: system/lib/modules/oprofile.ko +SHA1-Digest: PAAwrfj+196zCP6xyiAiA39KxRE= + +Name: system/lib/libLightsJni.so +SHA1-Digest: Ybm+IKIpCf8ezWq8iG5LW0RglwI= + +Name: system/etc/security/cacerts/9685a493.0 +SHA1-Digest: kaSX6pI0rQB+TDbRWSlOP44RXUE= + +Name: system/app/PicoTts.apk +SHA1-Digest: 818A0kNQF0C3R1DUpd4nY0p0Kng= + +Name: system/app/Exchange2.apk +SHA1-Digest: eATsh4ci1dLKXP51a5JhmpHQCx8= + +Name: system/etc/firmware/q6.b03 +SHA1-Digest: KA0eAuLK8UUR7DJvmDpcWn+RQqw= + +Name: system/lib/libdsprofile.so +SHA1-Digest: aXrJOUcrAJCo1ZfpDP0Q2TucW54= + +Name: system/etc/firmware/q6.b05 +SHA1-Digest: x9hbpv+CxHb3mkBZNMQJOuLuQLQ= + +Name: system/etc/permissions/com.sonyericsson.nfc.handover.xml +SHA1-Digest: eS0KVUnKkrUjxhL39op1wUtlMeI= + +Name: system/etc/customization/settings/com/sonyericsson/androidapp/st + orefront/custom_settings.xml +SHA1-Digest: b+6HslUjQ/oCJc+iXUiQeO3mV8M= + +Name: system/etc/firmware/q6.b04 +SHA1-Digest: sghjHiwrB8QSrd22EaXRju0cxNc= + +Name: system/etc/permissions/com.sonyericsson.android.cdfinfoaccessori + f.xml +SHA1-Digest: qICkPhITm3TonnqRwTdr+eGZ328= + +Name: system/etc/firmware/q6.b01 +SHA1-Digest: R/Oi5urzKQOFHPL0HRho3Q/RJ9o= + +Name: system/etc/firmware/q6.b00 +SHA1-Digest: wt0OdnwdA5F1kx+0P+bf2xWCyEA= + +Name: system/media/audio/ringtones/ArgoNavis.ogg +SHA1-Digest: KCXHEpUUf6RMFQQ/hrT/E2ZC8w0= + +Name: system/usr/xt9/SEMC_810_r1-10_BGlsUN_xt9_2.ldb +SHA1-Digest: gTG0uUWuiPLVOd1Ke3yWdgf6+/o= + +Name: system/etc/firmware/q6.b06 +SHA1-Digest: ycfqUY9MacCSD/31RYmTTsmiIf8= + +Name: system/bin/netd +SHA1-Digest: tGwInbCiBBNw81MR0zs5ROtmp/w= + +Name: system/app/UnlimitedBurst.apk +SHA1-Digest: fKwCDxryFHbFqAyV5MXWCPbMm3E= + +Name: system/bin/schedtest +SHA1-Digest: 60DcaKewo7d7KqtxIJppcZ12FEU= + +Name: system/etc/legal/leaflet/vi/Service-and-support.html +SHA1-Digest: me5AIE579+2Yfcg8Ipd5edZVRNM= + +Name: system/app/CertInstaller.apk +SHA1-Digest: 0JDDm1fK+Wt6iahhich11DkGs/4= + +Name: system/usr/keylayout/Vendor_046d_Product_c21a.kl +SHA1-Digest: BDakFx+gVj5+CSeoLFwps50BAGo= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Emergency-calls.html +SHA1-Digest: 0A9DmZTbeDA8UuIev91296L6+og= + +Name: system/etc/legal/leaflet/cf/SIM-card.html +SHA1-Digest: YjZuUB66QfensNFWUc2hBfQRTdg= + +Name: system/lib/sysmon/sysmon_msm_thermal_disable.so +SHA1-Digest: KRHWJNA0GWG4XXgz4u4H5pVHdAg= + +Name: system/etc/legal/leaflet/hi/Power-supply-(Charger).html +SHA1-Digest: 286/wC4e7L1Hp7d+AAUKQ36N9cc= + +Name: system/etc/legal/leaflet/vi/Our-warranty---12.html +SHA1-Digest: rLLhjVk/Gv8pJm+BLIMR0gXUTs4= + +Name: system/etc/legal/leaflet/hr/Personal-medical-devices.html +SHA1-Digest: y8RyYNNiLS+KTJO1VhJgkz0FjmI= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/green_jungle_hd1080p.jpg +SHA1-Digest: pwLmzrcrSQFo7in1SAlxVTWpFUQ= + +Name: system/app/UnsupportedHeadsetNotifier.apk +SHA1-Digest: 4+kS9iN22uRQ3LyDiP575AKv448= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_blue.jpg +SHA1-Digest: XO80TC24mp07WhczYxlrvZETk70= + +Name: system/etc/legal/leaflet/en/Accessories.html +SHA1-Digest: /RDU9R0OGMdwYYDRimrm3mpmj7w= + +Name: system/lib/libhdmi.so +SHA1-Digest: 3ru02ID+L8KueZJF/Ww39Qnb8Rw= + +Name: system/lib/libstagefright_soft_flacenc.so +SHA1-Digest: BZEcdz1QycyCTqJqDiwRGlERT3E= + +Name: system/lib/libmmstillomx.so +SHA1-Digest: QlJ8LnLoiDoXqSVTvTqygrbu/J4= + +Name: system/lib/libta.so +SHA1-Digest: ztStbNUCbeFwfbcQYjHYFASxAzE= + +Name: system/app/DrmProvider.apk +SHA1-Digest: Rz3DiAPJo1Mw5Ii/YAqWg+Bmaro= + +Name: system/lib/libmmwfdsrcinterface.so +SHA1-Digest: izHpmauCvEj7Q+wmoulIG5yFfkg= + +Name: system/bin/idmap +SHA1-Digest: 5rcQkAROr5/yMTgvA7GKFuZE1Hw= + +Name: system/etc/legal/leaflet/iw/Our-warranty---12.html +SHA1-Digest: Gn3CNAJ8R5ojaYHQa6FtUC0EnxU= + +Name: system/etc/legal/leaflet/sr/End-User-License-Agreement.html +SHA1-Digest: qj8oSgzT/Mhnp3dtWHgkqJyGlaE= + +Name: system/media/audio/notifications/Xenon.ogg +SHA1-Digest: gMy/40TeItG2t+gTWPG0RYE+OOU= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Antenna.html +SHA1-Digest: fxNZgCsam5YbU6vO8WuwPr7bMNs= + +Name: system/vendor/overlay/com.sonyericsson.trackid-res.apk +SHA1-Digest: J+PRyxjvIkMd9al9qtRRAmOK/9c= + +Name: system/lib/libwfdrtsp.so +SHA1-Digest: /X0qTDlh+PA9mNVqnK+EQNWSEo8= + +Name: system/bin/atrace +SHA1-Digest: EGoMqR3KRmpuo/czOwyPh3cCCXg= + +Name: system/etc/legal/leaflet/xl/SIM-card.html +SHA1-Digest: DCe3yoUV12OxAkTPbxCaGWxASEc= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blueprint_hd1080p_small.png +SHA1-Digest: KM5vSyV/2DKnfwzjV3FFAMmulGo= + +Name: system/etc/legal/leaflet/fa/Emergency-calls.html +SHA1-Digest: Oex/eZw9vfPAuqsIsD1AIbd7h+A= + +Name: system/fonts/DroidSansArmenian.ttf +SHA1-Digest: lC+raRjA3Jv1n2KrFeP9OHNrvo0= + +Name: system/media/pictures/mt_huangshan_01.jpg +SHA1-Digest: mdSQzRsYt5KjONocAzJTL2DDQQk= + +Name: system/etc/legal/leaflet/fr/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: Q1PFN6/wXzV+ShAhUwqasb783gM= + +Name: system/etc/legal/leaflet/pb/Loudness-warning!.html +SHA1-Digest: 6jp6LCB1n3pttsjWKywAhUv9t1U= + +Name: system/bin/mediaserver +SHA1-Digest: G2qttDcfsFM4t0BjQ1xOgTbjP1o= + +Name: system/etc/legal/leaflet/ar/Export-regulations.html +SHA1-Digest: t+OkXErqrprjNuwtvUIC+KL6QHo= + +Name: system/etc/legal/leaflet/pt/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: QlL0E1zMC4J78FsTI2nOPI1rPH8= + +Name: system/vendor/camera/SOI13BS1_DW9735.dat +SHA1-Digest: bS6azarzJtHfNzbztOeH8dokQ0U= + +Name: system/media/audio/ringtones/winning_smile.ogg +SHA1-Digest: zLKdsC71sHuxDT3jxIG9DBQmlMw= + +Name: system/lib/modules/msm-buspm-dev.ko +SHA1-Digest: k2SytQda86exuufSlr9vrol+VN0= + +Name: system/etc/legal/leaflet/zh-HK/Radio-frequency-(RF)-exposure-and + -Specific-Absorption-Rate-(SAR).html +SHA1-Digest: 1Lgvq8JcqjAsC6jaEZhArGpVMfM= + +Name: system/framework/com.sonyericsson.illumination.jar +SHA1-Digest: niIX4TMSqlW2gkCH9ZD8x2Owm3M= + +Name: system/lib/libnpfinal.so +SHA1-Digest: fv+sdsEG0MstRTJeuH4QoJEoiO4= + +Name: system/etc/security/cacerts/7a819ef2.0 +SHA1-Digest: sPFvH0vDqnbyji1Ydpg3E5Jsph8= + +Name: system/etc/legal/leaflet/ru/Warning!.html +SHA1-Digest: Rpf4U4Bkrlft6ogbuh/9qIFHZVI= + +Name: system/etc/legal/leaflet/hi/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: RlCj+NeHZxIibfEjfhz+cE49PEI= + +Name: system/etc/init.qcom.bt.sh +SHA1-Digest: MsDJs7r62wFcsSp7X635PNOh2Fc= + +Name: system/lib/libext2_uuid.so +SHA1-Digest: WwZTZ63fXs0j7RbmqIJL+Z9l0C4= + +Name: system/media/audio/notifications/tinkle.ogg +SHA1-Digest: lx4kqxuS0W2Lwdsf0qpAifiZs3Q= + +Name: system/fonts/AndroidEmoji.ttf +SHA1-Digest: woxDsqzssaJWZBbyyEPonq91iNg= + +Name: system/app/JapaneseIME.apk +SHA1-Digest: ELVBkBqnd6KN5SRf+B5BIl+OYbc= + +Name: system/media/audio/ringtones/CaribbeanIce.ogg +SHA1-Digest: o9+6QQJkN+SuXEuFY9j2XMngax8= + +Name: system/usr/xt9/SEMC_810_r1-3_BSlsUN_xt9.ldb +SHA1-Digest: MH185tvpIf4Rc4CTgckdD06cuj0= + +Name: system/etc/legal/leaflet/bs/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: 6jhI7dvIcu1wy1Ejw/fpHcPE8gA= + +Name: system/framework/com.sonymobile.photoanalyzer.jar +SHA1-Digest: qb0D1MkM1nXZ+hyl2xnGGwQn9WU= + +Name: system/etc/legal/leaflet/fr/SIM-card.html +SHA1-Digest: kmHmMTU6WludpFhVuhMn+bCbwP4= + +Name: system/app/com.sonymobile.retailwidget.apk +SHA1-Digest: 6pCjUqPhjG+KsmG9/uTxSsrJ2+o= + +Name: system/etc/legal/leaflet/sq/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: JqKYTQBbxH6tqQckTW/BSRDdCgk= + +Name: system/app/helpapp.apk +SHA1-Digest: M0OXk17E9vF57RqPbOjRMgH4Ey8= + +Name: system/etc/firmware/tzlibasb.b02 +SHA1-Digest: byDuj/BMzL5ZaROukEawaz6mbhs= + +Name: system/lib/libWnnEngDic.so +SHA1-Digest: MUDnxb/3XdnufgJMqHMoaRaPyRw= + +Name: system/etc/firmware/tzlibasb.b03 +SHA1-Digest: U4YcTn5FOjAbmYWiWMsw1DTOu3s= + +Name: system/etc/legal/leaflet/zh-HK/Antenna.html +SHA1-Digest: zMzVaYPvqU+ZnZFFF9zAPQGvt0A= + +Name: system/vendor/camera/SEM13BS0.dat +SHA1-Digest: oGyIFIjKsRYC8pzXSJoqKerqqsg= + +Name: system/etc/legal/leaflet/en/Protection-of-personal-information.h + tml +SHA1-Digest: EV2tzvgo/oP/+DxSFeiXkdrfipI= + +Name: system/etc/legal/leaflet/zh-CN/Geographical-scope-of-the-warrant + y.html +SHA1-Digest: KZpMpZfMwzBPGJhPSrP2ZMhAR0s= + +Name: system/app/PartnerBookmarksProvider.apk +SHA1-Digest: jEy1/qQ8LVWYoxFL7Y6CKmlyS04= + +Name: system/etc/legal/leaflet/hr/Malware.html +SHA1-Digest: 77k1zyMRXh2CsXBsTQOnbuH5jM4= + +Name: system/lib/liblog.so +SHA1-Digest: g/lZ9DLFangA0BZe6B/P7pnc6QY= + +Name: system/vendor/lib/drm/libdrmwvmplugin.so +SHA1-Digest: +JygIMNBikIEY4jBcPdhfHXjOek= + +Name: system/etc/legal/leaflet/vi/Personal-medical-devices.html +SHA1-Digest: qoRcgFFk7JFuf1l40ycURxoYl6Y= + +Name: system/etc/legal/leaflet/zh-TW/Precautions-on-Memory-Card-Use.ht + ml +SHA1-Digest: NN21NSlraw1FKA9wIMNMy5mwi2Y= + +Name: system/semc/chargemon/data/non-charging_animation_04.png +SHA1-Digest: AThYqavg/FUrDbYtHdSWA0PwGwk= + +Name: system/etc/permissions/com.sonyericsson.appextensions.xml +SHA1-Digest: a7w0gkiFy/Rbcnbd9QlyV4+mYK4= + +Name: system/lib/modules/qcrypto.ko +SHA1-Digest: HQEjnAHMXQ4H+yWbzkHDtvTOor0= + +Name: system/bin/iptables +SHA1-Digest: gYMr3StFpFnQUQqWWJD+EE3fFqA= + +Name: system/media/audio/alarms/Alarm_Beep_02.ogg +SHA1-Digest: 9CSCsIo9GbrhKAQ0QscX714pNNQ= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor0.so +SHA1-Digest: iuGPTba0rVzGJAEt85z1UKUKxRE= + +Name: system/etc/legal/leaflet/zh-HK/Loudness-warning!.html +SHA1-Digest: 89SJZmywGA0Zz+71vq6Rj+S4cAk= + +Name: system/lib/libmmcamera_frameproc.so +SHA1-Digest: U34bMEvWUt4Eo0evCl4sy6P8xK8= + +Name: system/etc/security/cacerts/bdacca6f.0 +SHA1-Digest: 6zbSCMgMZa9LslRYITBh6DFKQSY= + +Name: system/etc/legal/leaflet/zh-CN/ERROR=0.html +SHA1-Digest: lAhWe7/mIYcE5zrorddzKa9n79c= + +Name: system/etc/legal/leaflet/ar/Warning!.html +SHA1-Digest: YZdzXwWr5/5steF5HCIwEDiTvXo= + +Name: system/vendor/camera/SOI08BN1_IMX111.dat +SHA1-Digest: B+Rz7Phe5Na4DTqxhpwPr1Yh7dk= + +Name: system/fonts/SoMARegular.ttf +SHA1-Digest: 1PQ3m20N6HtQl8L/Z9xQttx0sRE= + +Name: system/etc/firmware/a225_pm4.fw +SHA1-Digest: EauUob11w9Ebq+O6KdLVCHaQD6A= + +Name: system/etc/legal/leaflet/ru/Driving.html +SHA1-Digest: XA9AomSqkCdxac0nkMtF9JWhjfU= + +Name: system/etc/legal/leaflet/ru/Precautions-on-Memory-Card-Use.html +SHA1-Digest: CUhbhdXwDC9rvJgZavRu0sX+xUM= + +Name: system/lib/libualutil.so +SHA1-Digest: GNiFWVDDTccQr7yv1I8+A+ayOys= + +Name: system/usr/xt9/SEMC_810_r1-5_ARlsUN_xt9_2.ldb +SHA1-Digest: WDUSGVTe+Ruz8XuGsxMDCWJ1qzM= + +Name: system/lib/libdrmfs.so +SHA1-Digest: LidpU1UxvfTCHPb+nYNk+RHGT8w= + +Name: system/etc/security/cacerts/86212b19.0 +SHA1-Digest: z5oVrRiZngoDfKl6smrTYg59YWM= + +Name: system/etc/legal/leaflet/ae/Power-supply-(Charger).html +SHA1-Digest: 1R3gl9qqOxVSXTSnnjkUMRKVYaI= + +Name: system/etc/permissions/com.sonymobile.mirrorlink.system.xml +SHA1-Digest: uRCWxC7RGXDMrvHPVKaSmJ7altg= + +Name: system/framework/com.sonymobile.cameracommon_impl.jar +SHA1-Digest: 2x4zpKtHYfrIUNyeupgFTH3qzyA= + +Name: system/etc/legal/leaflet/vi/Protection-of-personal-information.h + tml +SHA1-Digest: lCkbG+l0dQ9rBxvXHI/t2smxuwc= + +Name: system/etc/legal/leaflet/en-HK/Accessories.html +SHA1-Digest: /RDU9R0OGMdwYYDRimrm3mpmj7w= + +Name: system/etc/apns-conf.xml +SHA1-Digest: 3y6iI6beFfgnNsleCcGZmPXpgQ8= + +Name: system/etc/legal/leaflet/ko/Precautions-on-Memory-Card-Use.html +SHA1-Digest: JTkkdeXEIqwiwFE38Mr96Rz9uLU= + +Name: system/app/LiveWallpapersPicker.apk +SHA1-Digest: pC+DKd2GvmucU81Bcsgj+dkTxmg= + +Name: system/lib/modules/ansi_cprng.ko +SHA1-Digest: JD89LIg0tSCatacDkhx02YfDovY= + +Name: system/bin/wdsdaemon +SHA1-Digest: TPHnLjdS/LnqAnUhd3u60iKFHis= + +Name: system/media/audio/ringtones/OrganDub.ogg +SHA1-Digest: B0hF9Oq6Ixz2/YNXo1zjEh12grM= + +Name: system/etc/legal/leaflet/in/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: bpjmUq69FRpi/o4YeSykCoVaJdQ= + +Name: system/bin/pppd +SHA1-Digest: 3sHz8GkFN3GG0POLyx0gtn8aTCc= + +Name: system/etc/legal/leaflet/vi/Publication-number.html +SHA1-Digest: PgIkSliAQ+W/oaCdNc9C/iRobNc= + +Name: system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini +SHA1-Digest: DgO0Y2SanY7MTIDjl9SMMrsc+5U= + +Name: system/vendor/etc/system_fonts.xml +SHA1-Digest: kBXS9v/MjNofxe3xweK6IRI7BG0= + +Name: system/lib/modules/qce40.ko +SHA1-Digest: 0nuIElzoIPcN8onEAB2x4+4U5GA= + +Name: system/lib/soundfx/libvisualizer.so +SHA1-Digest: BUa9dJssmvxKLxH/U+XNqx905Vw= + +Name: system/etc/legal/leaflet/iw/Power-supply-(Charger).html +SHA1-Digest: KCA3HZ0VwJ4XIix98OR1GJaIb7c= + +Name: system/etc/legal/leaflet/th/Precautions-on-Memory-Card-Use.html +SHA1-Digest: /XUcemVzkv66IQVhIT2Kefsf0go= + +Name: system/etc/legal/leaflet/uk/index.html +SHA1-Digest: t4/8ScIeCtFYB0Qd5epioSCBiMQ= + +Name: system/framework/GestureSDK.jar +SHA1-Digest: jzuIJyRK6LHSH1CRQoaaK2Qd5EE= + +Name: system/etc/legal/leaflet/vi/Important-information.html +SHA1-Digest: lOjAKXsa/a9lRZCdHkXk3LnlXig= + +Name: system/lib/libsysinfo_modules/display_plugin.so +SHA1-Digest: t4Q+bxsoW3YIpZYi+0PfVJJylsM= + +Name: system/usr/keychars/qwerty.kcm +SHA1-Digest: TsWF0/tutWtAi0whFMCQCDu+uZg= + +Name: system/usr/xt9/SEMC_810_r1-2_JWlsUN_xt9.ldb +SHA1-Digest: DIHZRIt9SW8nAQi7ZMKc6o1xJSo= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blueprint_hd1080p.png +SHA1-Digest: IKjr0Cy0Ut5Ut+DwrrkiHQ2q+Dc= + +Name: system/etc/permissions/com.google.android.nfc_extras.xml +SHA1-Digest: ZvocFvtXygXFd7nw2Ja+V7G7PR4= + +Name: system/etc/permissions/digitalpensdk.xml +SHA1-Digest: eXxGshGYscguUqNxL8QtY4jJzTw= + +Name: system/etc/legal/leaflet/zh-HK/Export-regulations.html +SHA1-Digest: lV71Sr2dR2lXa8X8LYSFANxjwpo= + +Name: system/framework/com.sonyericsson.nfc.handover_impl.jar +SHA1-Digest: WJUn5sVHs5oG/kjm+RQDuVks5o8= + +Name: system/etc/legal/leaflet/fr/no-title.html +SHA1-Digest: EODsHRBbtz323f/W9JOYD6O8ryQ= + +Name: system/etc/legal/leaflet/bs/What-we-will-do.html +SHA1-Digest: 1Eba2kfxvekKas6gW20AUI+ewb4= + +Name: system/etc/legal/leaflet/ms/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: ZlhAsNh6GEOX+jwuG1vUev0KYY8= + +Name: system/etc/legal/leaflet/fa/GPSLocation-based-functions.html +SHA1-Digest: 5wDp+4GIhUMFTywTrJ/TAu8lJ0w= + +Name: system/usr/srec/en-US/endpointer_voicesearch.config +SHA1-Digest: nhkSWehXFaaI7ycDX+V9HMkl0m0= + +Name: system/etc/legal/leaflet/hr/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: NJefjouJ3mzXVNzuJ3x9+kA7LU4= + +Name: system/etc/legal/leaflet/cf/Flight-mode.html +SHA1-Digest: AStB1clycKHxHmVHmg0eQa/mMhc= + +Name: system/app/CustomizedSettings.apk +SHA1-Digest: C7wN+bcue1L4bg+wGt63UTEgioo= + +Name: system/lib/libfmradio.sony-iris.so +SHA1-Digest: MTPW/98WydaoABRZrHU0uMyVuao= + +Name: system/lib/libEnjemailuri.so +SHA1-Digest: db8DOLOXvQH8BSNOZgLX0cQKBt0= + +Name: system/lib/libmlplatform.so +SHA1-Digest: 48O77Zs0gwajjTyzBw8Sc3lLUx0= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_red.jpg +SHA1-Digest: AcosepVHwTqBv2kJ8IWdqMQwqzU= + +Name: system/etc/legal/leaflet/fa/Precautions-on-Memory-Card-Use.html +SHA1-Digest: P7U587uwlfG4SAUTFsFOylz0JLQ= + +Name: system/lib/libxtwifi_zpp_adaptor.so +SHA1-Digest: m0oRQF+k0uKSZNLZzKPYxM79Q2k= + +Name: system/etc/legal/leaflet/en-PB/End-User-License-Agreement.html +SHA1-Digest: ecXmi9kdRwVIYOzpnZPikyo7GO0= + +Name: system/app/ReadyToRun.apk +SHA1-Digest: ZEhDGJEkoPeM9xDZ0HaHtQpHDPI= + +Name: system/etc/permissions/com.sonyericsson.sysmon.xml +SHA1-Digest: DxBs+5KKlq4OijaaTSxMkHSFAnY= + +Name: system/lib/libgenlock.so +SHA1-Digest: +spzDG00izk7QUVGoVQnwJDmqPo= + +Name: system/etc/legal/leaflet/uk/Flight-mode.html +SHA1-Digest: vh7VisB8anvHAciPGS1Ec8L6WI8= + +Name: system/bin/rild +SHA1-Digest: MJw9sxvT4OUXWA0TvFjtCJGf75c= + +Name: system/etc/legal/leaflet/iw/Antenna.html +SHA1-Digest: hqDDH6s3kWW5oK14HBqy1vBC8+g= + +Name: system/etc/legal/leaflet/ae/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: dGn7hU38Tc3KOGOv0tCdb3QWo7A= + +Name: system/etc/legal/leaflet/xl/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: OSgvVx032Y0WNeqS0LsPy9jq+qs= + +Name: system/etc/legal/leaflet/pb/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: IxJgzepEMHkS3RRqJGQDo8s44hw= + +Name: system/fonts/DroidSansTamil-Regular.ttf +SHA1-Digest: /e/ks+E8syMC6xadn01QJRV6mwg= + +Name: system/etc/legal/leaflet/ko/Warning!.html +SHA1-Digest: yO3FtJp/wdbCy1yKXINgtwo59Yg= + +Name: system/etc/fast-dormancy/fd_int_conf.txt +SHA1-Digest: A7e6pnxG9k3CX8wqgDBx7KQvP3o= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_grey.jpg +SHA1-Digest: QOjNQY1JqwsSWptej3Sc3CuhwCA= + +Name: system/lib/libimage-jpeg-enc-omx-comp.so +SHA1-Digest: ddTCfWJLocyQDxwiNmDCFx4ugos= + +Name: system/lib/libmediaplayerservice.so +SHA1-Digest: z2awEd4mF0FEtst8Lf59OclFOog= + +Name: system/lib/libsensorservice.so +SHA1-Digest: SSepQjhzLR8upuXI/Ld2fgLGF34= + +Name: system/lib/libennjyomi.so +SHA1-Digest: YI2ysFPsTKK7wXGUf25w3pdZnf0= + +Name: system/bin/dexopt +SHA1-Digest: o4J2Mw4l7uju41v/lCnOQzu80FU= + +Name: system/etc/legal/leaflet/images/LEGAL-STEN-SIGNATURE-WITH-LINE-l + ow.jpg +SHA1-Digest: oujXSxtu+Bc3lkAgFctt9i2aWRA= + +Name: system/app/PSCertifiedSettings.apk +SHA1-Digest: biaViauAstcbcJ+JE1xHqmEuNS8= + +Name: system/etc/legal/leaflet/images/btn_search_orange-BIG.gif +SHA1-Digest: k1Mk/qD6BplRD3UjwSVvVbaBEEk= + +Name: system/app/PrivInit.apk +SHA1-Digest: 76dZMudXCi76Ph8xGPMmQgZ/ru4= + +Name: system/etc/legal/leaflet/xl/Power-supply-(Charger).html +SHA1-Digest: VEQJdUNRxX574zoXqdCFNPaI0PI= + +Name: system/etc/legal/leaflet/th/Limited-Warranty.html +SHA1-Digest: SCXf3OxxsqzUPn9OYMZtIE+WzaI= + +Name: system/etc/legal/leaflet/zh-HK/Sony-Ericsson-Consumer-Web-site.h + tml +SHA1-Digest: CIXL6UMSq9Cc2b0ryWtOvYEMFjo= + +Name: system/lib/drm/libomasdengine.so +SHA1-Digest: 8bKTHM1OnJq5DiFqqHkK5ZW3UcI= + +Name: system/app/SemcCalendar.apk +SHA1-Digest: rRzH7mPgpv8//2urbIkaIXH4dNM= + +Name: system/etc/legal/leaflet/en/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: i0BrNfPYJcLaCx5ZFaCfp6bt/4o= + +Name: system/media/audio/ringtones/Draco.ogg +SHA1-Digest: weVruZXf5Cwh9YbiTVOBi7Hgwcc= + +Name: system/etc/legal/leaflet/pt/What-we-will-do.html +SHA1-Digest: IydnTBG+WCZ2aqQFe63HEWpDKA8= + +Name: system/etc/legal/leaflet/th/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: fKXv1V7q/MHmTFa1Ig14YeJFejQ= + +Name: system/etc/legal/leaflet/fr/Our-warranty---12.html +SHA1-Digest: +kyHjXvva9c+xJ1B5WpccgYvSVM= + +Name: system/etc/security/cacerts/7d453d8f.0 +SHA1-Digest: KA7EPB8eqmgYlxbOQtVKnWf+GDk= + +Name: system/lib/libmpqclockrecovery.so +SHA1-Digest: RKo2xyYSGd2uS7zT6OmMA1vWpWc= + +Name: system/etc/legal/leaflet/sq/Flight-mode.html +SHA1-Digest: 4/kr38KU8OrGGnzi5vLXQUSeqQI= + +Name: system/etc/hosts +SHA1-Digest: gJjWrkslBFgbA1SCz0Bq13AQJfM= + +Name: system/lib/libstagefright_foundation.so +SHA1-Digest: 7liXYLnVNeQc2g6B2kZoOU6L8+I= + +Name: system/lib/bluez-plugin/bluetooth-health.so +SHA1-Digest: bz4gNLYeLzkh2AtcEPqjuzK4VGU= + +Name: system/etc/legal/leaflet/zh-TW/Service-and-support.html +SHA1-Digest: muumQGwQYiD5AtI3ggBFf2hE9Q8= + +Name: system/lib/modules/ks8851.ko +SHA1-Digest: rZQfhjZ9aQVWZW1PqzQpjq75U1A= + +Name: system/etc/hostapd/hostapd.accept +SHA1-Digest: TvWCZv8p/VrRY58hLY4CW/1ahBg= + +Name: system/etc/legal/leaflet/cf/Export-regulations.html +SHA1-Digest: yjCeieU/RCr9TS3HYMjSMIz52fw= + +Name: system/etc/legal/leaflet/en/Personal-medical-devices.html +SHA1-Digest: g6kgmp+jpEgVkxsSHVzlYihSmJs= + +Name: system/framework/com.google.android.maps.jar +SHA1-Digest: 57z7MUaVM7FH/Gw/nRaRNJObwew= + +Name: system/bin/monkey +SHA1-Digest: n6hOeaWcDYXtOM/S/BuElL10hfQ= + +Name: system/etc/legal/leaflet/uk/Limited-Warranty.html +SHA1-Digest: AvN0zlLjCVSYGo5xQcMGwS7TEn8= + +Name: system/etc/legal/leaflet/images/LOGO-FCC-low.jpg +SHA1-Digest: 3XGX2hveMRIOyJQQnhguPdEn2p8= + +Name: system/etc/legal/leaflet/zh-TW/Driving.html +SHA1-Digest: H7yd65mJ/cx+eh7bG9sOzF2EVto= + +Name: system/bin/suntrold +SHA1-Digest: ye/6ScmoDA15lALh0PDpogg/wYw= + +Name: system/vendor/camera/LGI08BN2_IMX111.dat +SHA1-Digest: B+Rz7Phe5Na4DTqxhpwPr1Yh7dk= + +Name: system/etc/legal/leaflet/zh-TW/Radio-frequency-(RF)-exposure-and + -Specific-Absorption-Rate-(SAR).html +SHA1-Digest: tIfWoLS/AgaVof5QhuVZ7ybcVkU= + +Name: system/etc/legal/leaflet/images/button_search_foot_active.png +SHA1-Digest: ctOo6yWHbXNSbeirKZ41FSYXEk8= + +Name: system/lib/libcommon_time_client.so +SHA1-Digest: 3WYnpHSaNjj/ellwU7y4gf9V0dc= + +Name: system/etc/security/cacerts/119afc2e.0 +SHA1-Digest: EWDvjIKz5iXOM8ywruinfBcudRs= + +Name: system/app/SomcWifiDisplay.apk +SHA1-Digest: mvcjWl94MZHyQMM4IxkmBcKamFU= + +Name: system/media/audio/notifications/climb.ogg +SHA1-Digest: kSoWp6lPGsGlvvPdbv2zU5T28IU= + +Name: system/bin/dun-server +SHA1-Digest: wBu6Ku6ADiPY0HYnt3oA5URJ+tM= + +Name: system/vendor/etc/fallback_fonts.xml +SHA1-Digest: WV9QD2Rdijw+T8r0yyeGmi+FOMU= + +Name: system/media/audio/notifications/happy.ogg +SHA1-Digest: /qfDdzAmvHKVM8K1SrtE7WN09IE= + +Name: system/etc/legal/leaflet/ko/Antenna.html +SHA1-Digest: rPfW8EryCRWFyxk2rZeoEQvDuF8= + +Name: system/framework/digitalpenutil.jar +SHA1-Digest: C8aOn5co3Tfx5YwQ0swRPAFkQiE= + +Name: system/lib/libstagefright_amrnb_common.so +SHA1-Digest: dxPR/svY1yVFA83S1UiUkyD228g= + +Name: system/etc/legal/leaflet/en-PB/Recommendations-for-care-and-safe + -use-of-our-products.html +SHA1-Digest: n9jmfpJ6founXVQIGqIaG1GtCwY= + +Name: system/etc/dhcpcd/dhcpcd-run-hooks +SHA1-Digest: 45jhBTsJr35CEQZApn9fjYeWTYA= + +Name: system/etc/legal/leaflet/mk/Our-warranty---12.html +SHA1-Digest: 1lkjaSfouHa5n1d9CJcwdvfRwKY= + +Name: system/etc/legal/leaflet/uk/Memory-Card---legal.html +SHA1-Digest: V1KKfM6dLZNR6Y/xkM7wtUB8058= + +Name: system/etc/legal/leaflet/en/Publication-number.html +SHA1-Digest: lt5Ti7nzswLf/5n+hodhF4AuOc4= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Protection-of-personal-in + formation.html +SHA1-Digest: EV2tzvgo/oP/+DxSFeiXkdrfipI= + +Name: system/bin/wpa_supplicant +SHA1-Digest: TnqjQBH1uIU+GZb0Fm8LXP8+FQA= + +Name: system/etc/legal/leaflet/sr/Loudness-warning!.html +SHA1-Digest: QldpPmV0ZA4C3tpZPPobPVHB2S4= + +Name: system/etc/legal/leaflet/hi/End-User-License-Agreement.html +SHA1-Digest: WyVLMdlAoHHsFiXkM95yG3iO5cQ= + +Name: system/usr/srec/en-US/norm_fst +SHA1-Digest: 32Va9kDkSjxVzWPqPAuaFcGR824= + +Name: system/etc/legal/leaflet/fr/GPSLocation-based-functions.html +SHA1-Digest: mUmxfMnE7KOgwMj8e7Ww+ZMiB6A= + +Name: system/bin/battery_shutdown +SHA1-Digest: u1x456S+Leb77OyQLqL6N0xoKes= + +Name: system/framework/com.sonyericsson.audioeffect.jar +SHA1-Digest: wCTDGnK0GGh7sCORbW0s7FO+Z/Y= + +Name: system/etc/firmware/dxhdcp2.mdt +SHA1-Digest: dxSMJYSyze1QHI0pe7j4s4g2RAY= + +Name: system/etc/legal/leaflet/sr/Our-warranty---12.html +SHA1-Digest: NpaO9fYnMa6MORUuv67Tvb8XRao= + +Name: system/etc/legal/leaflet/mk/Warning!.html +SHA1-Digest: cofLhendGFjDLkqHI47LMUPtR2c= + +Name: system/etc/dbus.conf +SHA1-Digest: tFSSxBd60rDOWFVGzFY7lMyaFcs= + +Name: system/etc/legal/leaflet/en-HK/Recommendations-for-care-and-safe + -use-of-our-products.html +SHA1-Digest: n9jmfpJ6founXVQIGqIaG1GtCwY= + +Name: system/etc/legal/leaflet/zh-HK/no-title.html +SHA1-Digest: d19AAqebVBmY653gmSuMrHwgTwg= + +Name: system/etc/legal/leaflet/uk/Emergency-calls.html +SHA1-Digest: 3xcN4zQHEMdMGUD192eghOPEqrg= + +Name: system/framework/com.sonyericsson.musicvisualizer.jar +SHA1-Digest: p6KwzmdFk6cujsqRNv8hbnzpE4c= + +Name: system/lib/libmpqcore.so +SHA1-Digest: 7Qq89QLMdbiVmNNxLhHwChZS+eM= + +Name: system/lib/libmmcamera_faceproc.so +SHA1-Digest: 8D8rJPbt+VvBtZ0blTOWgWfb18A= + +Name: system/app/WikipediaPlugin.apk +SHA1-Digest: /NhkS85YBiH2H1j6+VLoQ9vSmYA= + +Name: system/media/audio/ui/KeypressReturn.ogg +SHA1-Digest: AhKAuhFRUYILt2u43zNK389U9hE= + +Name: system/usr/srec/config/en.us/baseline.par +SHA1-Digest: mOE8GQoDRu/VLgUGSPxYHPuTfIc= + +Name: system/etc/legal/leaflet/en/GPSLocation-based-functions.html +SHA1-Digest: vtIZ+8AOwckFrZsvV6maVx9D9tE= + +Name: system/lib/bluez-plugin/input.so +SHA1-Digest: hsMUoAWpCKme2dViOQwLHtHmqaI= + +Name: system/etc/legal/leaflet/en-PB/Warning!.html +SHA1-Digest: Kyb7s+0M97Jg4mWhGPgc8PHSjs8= + +Name: system/tts/lang_pico/en-US_ta.bin +SHA1-Digest: fC8sUtPOPG2Uavtn8zKmYQgbydg= + +Name: system/etc/legal/leaflet/sr/Export-regulations.html +SHA1-Digest: Nw0DfMuLo3MyJtblUwPPkdX0CYA= + +Name: system/etc/legal/leaflet/en-HK/Battery.html +SHA1-Digest: RG3bKCfP0xnuGcwJadp4HjZLsl0= + +Name: system/fonts/AnjaliNewLipi-light.ttf +SHA1-Digest: rU+cXSq1srM57xAO9aHbB+WV8No= + +Name: system/etc/permissions/qcnvitems.xml +SHA1-Digest: zz4l6ikPdQl1K9bpBX1fvC57qkI= + +Name: system/bin/app_process +SHA1-Digest: CXvW2QYyO9SsVgTkMWIco9FUYnk= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/dewy_grass_hd1080p.png +SHA1-Digest: Bh4i0xlq4QzZ+2NFTMGFzTLqzhU= + +Name: system/lib/libmpqplatform.so +SHA1-Digest: XZ2eYWjGkMKA2G3viR9sBmGrVs0= + +Name: system/lib/libstagefright_soft_h264dec.so +SHA1-Digest: KSRrmzD7G9Io6SHJfNy85Yr+SUI= + +Name: system/etc/legal/leaflet/en-HK/index.html +SHA1-Digest: eE3HCR6YtP2ZsJ3DvVM6w5IUrJM= + +Name: system/lib/libssl.so +SHA1-Digest: SFV4A69frH0oevUOL/iCMpSGF70= + +Name: system/vendor/lib/hw/power.qcom.so +SHA1-Digest: 1qQ303lfzqW97wpFcO273G0B88Q= + +Name: system/etc/legal/leaflet/kk/Protection-of-personal-information.h + tml +SHA1-Digest: QatPN39W1PROHQcHv3DzotQyjGM= + +Name: system/lib/libsc-a2xx.so +SHA1-Digest: x5HCcPHfIiFUOq3bMKDHeyVwqIc= + +Name: system/lib/libtzplayready.so +SHA1-Digest: kuXuCuLzf3N7UpAXJfWhnJ5vR2A= + +Name: system/media/audio/notifications/pizzicato.ogg +SHA1-Digest: bSV+J4IqXsas7z3tp5SozNYcKUI= + +Name: system/usr/xt9/SEMC_820_r1-3_NOusUN_xt9_2.ldb +SHA1-Digest: foblQqIvbNmchFqrN28NAFkP/Nw= + +Name: system/lib/tcp-connections.so +SHA1-Digest: EgCdeG88gu4Zz/7wfUYUFTRsRdQ= + +Name: system/app/IddAgent.apk +SHA1-Digest: 2WxHUW/q31T6115h1SMDS2T/nm0= + +Name: system/etc/legal/leaflet/fa/End-User-License-Agreement.html +SHA1-Digest: wT26uqkaeNBMp27j0MJf1bshYmY= + +Name: system/app/VerifyCertificatesDummyAppApplication.apk +SHA1-Digest: 9jCRNuWs4Eh7BMbzw3lFZnMsozE= + +Name: system/etc/legal/leaflet/zh-TW/Protection-of-personal-informatio + n.html +SHA1-Digest: Wz0lHhB28tfr/7gCVa8N+/IYT3Y= + +Name: system/etc/legal/leaflet/pt/Loudness-warning!.html +SHA1-Digest: JXymrv/DubY1nxAFqD1YNPtKvPk= + +Name: system/framework/framework-res.apk +SHA1-Digest: UnTHHtl7uexmQh7L9ls8XTJu9S0= + +Name: system/etc/legal/leaflet/zh-CN/Protection-of-personal-informatio + n.html +SHA1-Digest: 7+T0k4wkVmDF/mvHAvojAf0aHuY= + +Name: system/etc/legal/leaflet/pb/index.html +SHA1-Digest: yLg6TXkoWDOp/vs90K3m5KvQ1iM= + +Name: system/framework/javax.obex.jar +SHA1-Digest: BMuZbE4u1GZXaIum61fcMQJnNcc= + +Name: system/lib/libicui18n.so +SHA1-Digest: N13+lhhqDCxc/yXtBQdxCHoIFaw= + +Name: system/etc/legal/leaflet/th/Publication-number.html +SHA1-Digest: GJjxDfipK062h2qBtYbvZ8c/hBk= + +Name: system/etc/security/cacerts/e8651083.0 +SHA1-Digest: WgJxTbOn+kJyfUYGkHMdssJ14+4= + +Name: system/bin/dnsmasq +SHA1-Digest: zbvi/jWvR++NkzQDqn/Z8llUSTs= + +Name: system/lib/libglib.so +SHA1-Digest: tjc96FIHUUyDwK1Co66tYmi94CY= + +Name: system/etc/legal/leaflet/fa/Service-and-support.html +SHA1-Digest: 2D2465Uz+uSlmGpHCVobwqlGTHM= + +Name: system/etc/legal/leaflet/hr/no-title.html +SHA1-Digest: SynK3Hkwuvz6n5qHqGJDteesIRQ= + +Name: system/etc/legal/leaflet/fa/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: ObJQiJn+d8iW9XuKnPrQ26TDfT0= + +Name: system/etc/legal/leaflet/ms/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: bebAbBNRswC6Lz4LgxHk9lAyRnU= + +Name: system/bin/ssr_diag +SHA1-Digest: jZihFp+GY8+Xm8GgEdTJ/EaPOvk= + +Name: system/lib/lib_dlb_msd.so +SHA1-Digest: pecuhYghUZm0braGCJ0cUDYPDnY= + +Name: system/etc/legal/leaflet/vi/Limited-Warranty.html +SHA1-Digest: qLQnDOy2VuIEvu6vpKov6H2xvu4= + +Name: system/lib/libgestureservice.so +SHA1-Digest: usjM80tmsF8/kMq7UjzJ///wMzM= + +Name: system/etc/legal/leaflet/images/up.png +SHA1-Digest: fPtVCpsAB+SNjyB5vKT7XBfriuU= + +Name: system/etc/legal/leaflet/bs/Children.html +SHA1-Digest: VSCgBunCd1KUvmEH5L/Xi53JtLY= + +Name: system/bin/content +SHA1-Digest: 6POL0bmUWZQ4ZznC7yaw+OKUcs0= + +Name: system/etc/legal/leaflet/uk/End-User-License-Agreement.html +SHA1-Digest: Mtv+dWrcLUSThpxkVeDoVwkaE28= + +Name: system/media/pictures/perito_moreno_02.jpg +SHA1-Digest: +BBmF5bPha0aohbTQ4q49krt8NY= + +Name: system/etc/legal/leaflet/iw/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: NVIMo9N4nB9paXh+F48sOc61b5o= + +Name: system/etc/legal/leaflet/sq/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: ezxBEiTdW8oTeZvDte2nSqXToeM= + +Name: system/lib/libsc-a3xx.so +SHA1-Digest: mB2F2iGZZtQ09POiojofx1F8Qpk= + +Name: system/etc/legal/leaflet/th/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: pVEj0SHSJnW0x0UFfMQ1HfOznzM= + +Name: system/etc/legal/leaflet/bs/Publication-number.html +SHA1-Digest: j32wSCYGYosuIC4RjuzgxDzauu0= + +Name: system/bin/mm-pp-daemon +SHA1-Digest: 2er7C9rf5vnkEPoHHFF1kICHxVI= + +Name: system/framework/core-junit.jar +SHA1-Digest: Zu0WobuYynVH8HWtrzfvrO8oxpY= + +Name: system/lib/soundfx/libsoundaurawrapper.so +SHA1-Digest: HmWExu4TbDKIrYNl/WTZ7+fw/Bs= + +Name: system/usr/srec/en-US/endpointer_dictation.config +SHA1-Digest: +WnICju2l/yud03mhNLtzPFtppY= + +Name: system/etc/legal/leaflet/bs/no-title.html +SHA1-Digest: 82xCr9+AFuq+31qWmS3P3+LbwA8= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/red_rock_hd1080p.jpg +SHA1-Digest: Nh0riYAngh58ABiPb7GnYp+J/zs= + +Name: system/etc/legal/leaflet/bs/Export-regulations.html +SHA1-Digest: V3BiEXzZOJW0Wg1xc8BbVnOzgTM= + +Name: system/etc/legal/leaflet/bs/GPSLocation-based-functions.html +SHA1-Digest: 12iBlbvhsSYpk4cDee8T6AeMh5k= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Precautions-on-Memory-Car + d-Use.html +SHA1-Digest: aPKtTXjxuLAtvgtnekkWOxRpkAQ= + +Name: system/etc/legal/leaflet/cf/Precautions-on-Memory-Card-Use.html +SHA1-Digest: ILvp8QxunQnzYZ3tBhLSadB0BME= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_red_small.jpg +SHA1-Digest: It+Ewr8L1SdgEmmq7WisKRKipAg= + +Name: system/media/audio/notifications/Hojus.ogg +SHA1-Digest: DdghfVEZa2+VlEWDwEC2/j7Kydc= + +Name: system/framework/com.sonyericsson.system.jar +SHA1-Digest: d/JwzLV7fP5if5BDBWV5lNiA778= + +Name: system/etc/permissions/com.sonyericsson.bluetooth.a2dp.xml +SHA1-Digest: cDpfUbyajJ/FlkR6hgec+cu77mc= + +Name: system/etc/legal/leaflet/zh-HK/Flight-mode.html +SHA1-Digest: 30+RQ/mzjIiIYDV6NuWFfSwjCRI= + +Name: system/etc/legal/leaflet/ms/Battery.html +SHA1-Digest: q7XAxO4f2Wpz8SAQOwaQZcFyBjw= + +Name: system/etc/legal/leaflet/hr/GPSLocation-based-functions.html +SHA1-Digest: xvNpINCXYbEoF8tGnrKExHRwylg= + +Name: system/etc/legal/leaflet/ko/Conditions.html +SHA1-Digest: bgvFXixGAwnJzCbs2FfrBpL8T/0= + +Name: system/etc/security/cacerts/aeb67534.0 +SHA1-Digest: 3niKiQPKP7O/zD2IkVJZqxha7s4= + +Name: system/etc/permissions/android.hardware.sensor.light.xml +SHA1-Digest: o5fC0OmTC1XhEfP9A5C41jbAt2w= + +Name: system/etc/legal/leaflet/fr/Emergency-calls.html +SHA1-Digest: fxCAdsWXd5OOmdPC/rlBRHc/E08= + +Name: system/lib/libqmiservices.so +SHA1-Digest: Hnxub3qNw0vMjSEwPNb0fTOGwNU= + +Name: system/etc/pre_hw_config.sh +SHA1-Digest: e2j54rkndE+WfnGyfdsnpfV8yNE= + +Name: system/app/GMS_Maps.apk +SHA1-Digest: AqqBydYm047WvG5cqm2Xv+gova4= + +Name: system/bin/uiautomator +SHA1-Digest: 4tR5BSwIaFPIGk76lJrXZYZ2P28= + +Name: system/etc/security/cacerts/marlin/ca-bundle.crt +SHA1-Digest: MpMLeXYMFv7gHuiERcwUVGs0RV8= + +Name: system/etc/security/cacerts/f61bff45.0 +SHA1-Digest: d3A25cK0u8CKtQwP0QHb01XjqXU= + +Name: system/media/audio/ringtones/VeryAlarmed.ogg +SHA1-Digest: +LXyiT+/bOgNaCkE7It9WpBDYjc= + +Name: system/etc/legal/leaflet/ru/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: ss7KFgV+JTdavpTXOQECHAAiPJ8= + +Name: system/app/PurpleTheme.apk +SHA1-Digest: DBNUrTaz37ZgiX9Do9qOrDpoR6Q= + +Name: system/fonts/RobotoCondensed-BoldItalic.ttf +SHA1-Digest: urWUX1xs52/IukAulDtzt91OkPo= + +Name: system/etc/legal/leaflet/ms/End-User-License-Agreement.html +SHA1-Digest: ojhj9fbhiMLe96r5jQ6+9cVNZQY= + +Name: system/bin/n_smux +SHA1-Digest: n/nw3Gjr5K+JbV6gIzHg3yOgB4g= + +Name: system/app/SemcMusicVisualizer.apk +SHA1-Digest: 0iqBM24JptzoFviMSYhH3HLNrfI= + +Name: system/framework/com.sonymobile.musicslideshow.jar +SHA1-Digest: 1iycWIx7SBfa1YR0bJetk3/R6gY= + +Name: system/etc/legal/leaflet/pb/Power-supply-(Charger).html +SHA1-Digest: gSyEcRJAu8uw5cGHuoDMFzhugic= + +Name: system/etc/legal/leaflet/th/What-we-will-do.html +SHA1-Digest: w5KVBOKK0wl/fc5yX/LBEm+sQ2w= + +Name: system/lib/libpaexternal.so +SHA1-Digest: dN6xVglEq04a2txNzZXCBirYrnY= + +Name: system/app/SemcWarrantyTime.apk +SHA1-Digest: 5qEiowQ6Ka9xV6ybD9cAZCpC3sk= + +Name: system/etc/permissions/com.sonyericsson.colorextraction.xml +SHA1-Digest: eH1dVSFtjGeQ5qG4IYmIm91mEgA= + +Name: system/etc/legal/leaflet/zh-CN/Recommendations-for-care-and-safe + -use-of-our-products.html +SHA1-Digest: d8+osQTDi+vvuFMIa++zmFMxCcA= + +Name: system/lib/sysmon/sysmon_test_sensor.so +SHA1-Digest: Yheez9ydMuHc+pkFUtyUe7AuE0U= + +Name: system/etc/thermald-8960.conf +SHA1-Digest: SwwyyAf7CJQwbpVWUT5klklNlGU= + +Name: system/usr/keylayout/Vendor_046d_Product_c294.kl +SHA1-Digest: n8G5GZJh3RRh04UYBCiVlEHimDU= + +Name: system/app/SemcNotes.apk +SHA1-Digest: /9G84U+otfK1VCMwj3NHnendHlA= + +Name: system/etc/be_movie +SHA1-Digest: oK8fvbN5MyRAQUH/vV4//tLwJKE= + +Name: system/etc/legal/leaflet/pb/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: 5siQzh9gNT8+vRysrO23wFI2Pbo= + +Name: system/etc/init.ath3k.bt.sh +SHA1-Digest: foNjU0YBZz88j4gD4Oy0IkVAIRM= + +Name: system/etc/legal/leaflet/th/Warning!.html +SHA1-Digest: MdmDEWBtF6R+ud0uGRkihe+yYPo= + +Name: system/etc/legal/leaflet/sq/Loudness-warning!.html +SHA1-Digest: YcB0bdgfKJnzJeBRCbtu69qY7TE= + +Name: system/lib/libthread_db.so +SHA1-Digest: HrDOWUiApB5sexO54NCcCVdixOI= + +Name: system/lib/sysmon/sysmon_pba_therm.so +SHA1-Digest: iu68JU1Xgi8Nlwc8eAcc1Ys6ubg= + +Name: system/etc/legal/leaflet/en-HK/Limited-Warranty.html +SHA1-Digest: eD2Nw2nbUPWIGh+Ry7ppTLuma1g= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor8.so +SHA1-Digest: 5LlEwsOWZd6YWYDgS74kery2Aks= + +Name: system/fonts/Roboto-BoldItalic.ttf +SHA1-Digest: VYDbVJTNb2eL1eOY4SYWXg+P4PE= + +Name: system/lib/hw/audio_policy.msm8960.so +SHA1-Digest: bS2D/cAlJ7TgfMGAVRQs6XSgHKM= + +Name: system/etc/legal/leaflet/ar/Memory-Card---legal.html +SHA1-Digest: JbLD73QjpaYFSiQJXg/mz7FitSY= + +Name: system/etc/legal/leaflet/ru/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: V3NQ7DYgKEmiU/xDGIJBsmHluXk= + +Name: system/bin/fmconfig +SHA1-Digest: vQHlput4SC3b61C2R2Tyyecyr9U= + +Name: system/framework/qcnvitems.jar +SHA1-Digest: +LztTxXC8z21ORRMYxGry043+W8= + +Name: system/usr/xt9/SEMC_810_r1-3_SQlsUN_xt9.ldb +SHA1-Digest: fm7Y3zxKDxQ/WKc+RyDtJOv7owc= + +Name: system/etc/legal/leaflet/ms/Loudness-warning!.html +SHA1-Digest: eCKtrAtV/zEyxxrd1Vr4wAycfqI= + +Name: system/lib/libmpqtsdm.so +SHA1-Digest: TY4KOy1u3L4HW/U4gyJ6vR6VIz4= + +Name: system/etc/legal/leaflet/hi/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: nHAAXAYK9LEFr9P2+6xCXmpTvLY= + +Name: system/media/audio/ringtones/Vespa.ogg +SHA1-Digest: RVSrI6ZfZ7LdV1qeOHUb9ynv8GY= + +Name: system/vendor/overlay/com.sonyericsson.capabilities-res.apk +SHA1-Digest: 7q8KIdqDfDpmSEMWjHG0YoJwBYk= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_pattern_hd1080p.png +SHA1-Digest: GOnCNMtiDHycLfkVTP6w8GZy5A8= + +Name: system/etc/init.d/05complete +SHA1-Digest: XzrU33TNzxCeXzsWqJS7ShJ3Edk= + +Name: system/etc/legal/leaflet/vi/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: movDXyMvf07hEhwPEDSe1iFQgWc= + +Name: system/lib/libthai.so +SHA1-Digest: 3X+F6eBeGqcaUC1HtRpkZOk1hqo= + +Name: system/etc/legal/leaflet/mk/Antenna.html +SHA1-Digest: teyXdnUQQZ770Fv9G3YrVgyqAsM= + +Name: system/app/SoundLevelAlert.apk +SHA1-Digest: TmGajJZtKLvxkl8dHX70yeT1ay4= + +Name: system/lib/libloc_eng.so +SHA1-Digest: KMI5wWLn+XtDr1zWFy0O4BiW8uc= + +Name: system/etc/legal/leaflet/en-PB/Geographical-scope-of-the-warrant + y.html +SHA1-Digest: fbjulWeRTD9pjBmQBLB6KtEIUK8= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/autumnal_lake_hd1080p_small.png +SHA1-Digest: IZGJxKU4G8ozRk+ZsbRBXZBSZms= + +Name: system/lib/libsysmon_jni.so +SHA1-Digest: CKdbABajcvuxEvl9VnwCKCRQWlg= + +Name: system/bin/mm-aenc-omxevrc-test +SHA1-Digest: V8ROQcoLna+BxQoCdWfkMW9GrkI= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/mesh_blue_hd1080p.png +SHA1-Digest: i/LJhRY2PtXml9YeFYPgdd4+dOk= + +Name: system/lib/libmmosal.so +SHA1-Digest: aUiaKN4IDOmx0FCaUgozmygb5nw= + +Name: system/etc/legal/leaflet/iw/Emergency-calls.html +SHA1-Digest: J1ZRKjwBcxAZdYsmmCJFTMMmb0s= + +Name: system/app/OrangeTheme.apk +SHA1-Digest: iyKToPa0dzkqAgTThjcjF/BhEyI= + +Name: system/etc/legal/leaflet/fa/Limited-Warranty.html +SHA1-Digest: fiIuWMXMfVCPJT/ioOPHcar6CMs= + +Name: system/bin/acc_cal_data_manager +SHA1-Digest: Emu3OPOD908INkG4RL7+tEdQaFk= + +Name: system/lib/libXT9Engine.so +SHA1-Digest: ryJz4qGkqWQ5dsqB/2W/Q9taLnw= + +Name: system/etc/customization/settings/com/sonyericsson/android/suppo + rt/custom_settings.xml +SHA1-Digest: yINtsXIF8pl7OwQ7I5C/03Rimzg= + +Name: system/etc/legal/leaflet/pb/Malware.html +SHA1-Digest: hnfvZSNE0sg4oHGYyFo0w4hERzM= + +Name: system/lib/libalsa-intf.so +SHA1-Digest: FhDeh+C/j4bqn3uFZmxHijvpPkE= + +Name: system/media/audio/notifications/notification.ogg +SHA1-Digest: Q+RjwCFom1H6zuUqvCfpGWHnJQ8= + +Name: system/etc/legal/leaflet/ms/Important-information.html +SHA1-Digest: vPQ+vM5fTuuMaEQ1NcbLDEkvsfk= + +Name: system/etc/legal/leaflet/xl/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: kB0qGzQ6rMcQqvyFerPJIRwMpRs= + +Name: system/lib/libOmxVenc.so +SHA1-Digest: AKwe/5MMl1zF5yNTQ7TUOCaGa0Q= + +Name: system/etc/legal/leaflet/zh-TW/no-title.html +SHA1-Digest: X/IAwT1ZMZnmsZQlNXmDeAU6jvU= + +Name: system/framework/com.playstation.playstationcertified.jar +SHA1-Digest: xJxA5XxHJhrw4Ok+y8ic22BIwoU= + +Name: system/etc/legal/leaflet/iw/Warning!.html +SHA1-Digest: 7OEMJ/f66007mNqNhZHrAyGiA3A= + +Name: system/etc/snd_soc_msm/snd_soc_msm_2x_Fusion3_auxpcm +SHA1-Digest: efm6+w/pNwK5pzUtwZmbNJLEesU= + +Name: system/vendor/lib/libwvdrm_L3.so +SHA1-Digest: 4C45Vdqs+yaogsNd5bgbJULhOXE= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/index.html +SHA1-Digest: ebXx1Fb2jazNlqTQHzPYQ3S+BGU= + +Name: system/app/MediaUploader.apk +SHA1-Digest: xA7EGHCUq49va+QSGr5KeHvlOqs= + +Name: system/lib/libwifiscanner.so +SHA1-Digest: +cUYpDwjTecS4yvPkJaWhWpXzYA= + +Name: system/media/audio/notifications/deep.ogg +SHA1-Digest: Nc4ilQlhSOHtwzpRw4m574YuKZg= + +Name: system/lib/crda/regulatory.bin +SHA1-Digest: Ja6Ez/lDDFA+BE7KKiqUB+9Gtwc= + +Name: system/etc/legal/leaflet/hi/Malware.html +SHA1-Digest: G1DQCPsOx8rY+BZjHas/lVdHYnA= + +Name: system/lib/libmmgestures-linux.so +SHA1-Digest: 9NTiavxUm1vmwlJ4vVjRO2eJAf0= + +Name: system/bin/usbeng +SHA1-Digest: 3ehGAOGFsqMVETaAtrS45gsq9YY= + +Name: system/etc/legal/leaflet/styling/mrtl.css +SHA1-Digest: r+gkGP8126bAgz4CDj86Vn1lxvM= + +Name: system/media/audio/notifications/Upsilon.ogg +SHA1-Digest: 2gcfml4oQo+F5QGV89OKgofx5sU= + +Name: system/etc/legal/leaflet/en/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: fbjulWeRTD9pjBmQBLB6KtEIUK8= + +Name: system/etc/init.d/04tweaks +SHA1-Digest: 6QB48R38cpNr7aETy76Dc8XNbKk= + +Name: system/lib/libsysmon_idd.so +SHA1-Digest: jXsbIGA1rgGhkl/BFuMhxBdKMT0= + +Name: system/etc/legal/leaflet/en-HK/SIM-card.html +SHA1-Digest: p/1F/Gfr4z9Nd5EBEVI3mBU1AeQ= + +Name: system/media/audio/notifications/regulus.ogg +SHA1-Digest: M7sL9NwoHzhqABVMWb9JPqGIraA= + +Name: system/etc/legal/leaflet/images/_Warning.png +SHA1-Digest: RbrtMpj+w5pHjf55NPf3uzmN7vI= + +Name: system/etc/legal/leaflet/iw/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: tOrgwmq4mcitCyIIfhvgKEux0UI= + +Name: system/etc/legal/leaflet/sr/Children.html +SHA1-Digest: nklQuRNl1k6oWQ3hHjRExLgmf/s= + +Name: system/lib/libbluedroid.so +SHA1-Digest: FdWpJzFs4eO144UlruHyY3C1hqk= + +Name: system/bin/sapd +SHA1-Digest: 80Q9EkHL7O+ToNYUfjuWf5qwHiA= + +Name: system/lib/libiqe.so +SHA1-Digest: HpJrMujRoYYBdsuV0u9kDPQJEVI= + +Name: system/fonts/DroidSansMono.ttf +SHA1-Digest: Ez+2zybqBztFb7VXuUzoxGFDsRc= + +Name: system/media/audio/notifications/harmonics.ogg +SHA1-Digest: Ktudp5LlND/kPRXyaJmsoKcVGQo= + +Name: system/framework/android.policy.jar +SHA1-Digest: gWiF55iZ7JEbuZtfj0J/sUijQHo= + +Name: system/etc/legal/leaflet/pb/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: Vakru2/fBuswm7CMTQ9zzkZ1+ww= + +Name: system/etc/security/cacerts/7a481e66.0 +SHA1-Digest: SA1ZMXDrMT0bFLrkIXeyPdSCldI= + +Name: system/lib/libkeyctrl.so +SHA1-Digest: pfRCj6KKDNCLfAbSwx4NBmHm3gM= + +Name: system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin +SHA1-Digest: c9mmxjasOPPBJLVV0vOfB8zxqzo= + +Name: system/media/audio/camera/sound0/no_sound.m4a +SHA1-Digest: HpOqCsLHyTIR6vHqrTuEhNAseTo= + +Name: system/etc/legal/leaflet/ru/Children.html +SHA1-Digest: kKPKNIw2JaR3HlHpi0jnC4/1mzM= + +Name: system/media/audio/ui/KeypressStandard.ogg +SHA1-Digest: WFdYi785ujyp6JwqtdsHziO5hjU= + +Name: system/bin/battery_monitor +SHA1-Digest: 5YX7T2QqOjPJxyrosnHQIWzg3gs= + +Name: system/lib/libeffects.so +SHA1-Digest: Chr2xfNikTQHW6Wc47muu5Zn94g= + +Name: system/media/video/Sunset.240p.mp4 +SHA1-Digest: CBYXb7gePH/5F7RFTlVQRABxn4g= + +Name: system/etc/security/cacerts/e48193cf.0 +SHA1-Digest: 4QUQZs0nSjATJqFpt84dfehXF/4= + +Name: system/lib/libmmcamera_image_stab.so +SHA1-Digest: FyvV7J4bpaE4rMTUNlmz4x3v5Ug= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Driving.html +SHA1-Digest: 2RJnLg5mchEeHykobz1nE4TYoe0= + +Name: system/lib/libchromium_net.so +SHA1-Digest: 8N/crwID29HG7S0zuABoKv3hNUw= + +Name: system/media/audio/notifications/ascensions.ogg +SHA1-Digest: 8et3Uc7RbpbVkIxA00GHWAb/zzI= + +Name: system/framework/com.sony.smallapp.jar +SHA1-Digest: GunDTLQUQQpYigK3tCqV21QqUUQ= + +Name: system/app/SocialEngineCore.apk +SHA1-Digest: UrLsMOTfVFWkQzadkphIsfjc0E8= + +Name: system/etc/legal/leaflet/vi/Loudness-warning!.html +SHA1-Digest: Lep5y2C+KUPlvr4WfwfHXfTpjnI= + +Name: system/lib/libdrmframework_jni.so +SHA1-Digest: 6t13vy2P6YaEAM3I2oswPm3OTa0= + +Name: system/lib/libiwnn.so +SHA1-Digest: t5aiX3cOLnS8YRKCb7oxfRQYwj8= + +Name: system/semc/chargemon/data/non-charging_animation_05.png +SHA1-Digest: MQJTpKiXn2BQU5q2S8WunqzyP3c= + +Name: system/etc/legal/leaflet/hi/Export-regulations.html +SHA1-Digest: VrvzqLFZXzHHjvU2V5/eReUKa6s= + +Name: system/etc/firmware/dsps.b05 +SHA1-Digest: 706ABHXX6kaTyMOeOf9ZoGymzPw= + +Name: system/usr/xt9/SEMC_810_r1-2_ELusUN_xt9_2.ldb +SHA1-Digest: Mz5/4+GlwQIxqJ97qhS98TxBp/I= + +Name: system/etc/firmware/dsps.b02 +SHA1-Digest: GxkblO3yAdG3Y38jmEMfqw96v30= + +Name: system/fonts/Roboto-LightItalic.ttf +SHA1-Digest: Q0C/Q8zT4VcjEgGFGwTtWOhdW3k= + +Name: system/etc/firmware/dsps.b01 +SHA1-Digest: YKdgqK8c0CCOzrDFKkRThrZcjgY= + +Name: system/lib/modules/qcedev.ko +SHA1-Digest: 05Bq94esXYJvKrw8DgrvNCtEZ9Y= + +Name: system/media/audio/notifications/Selenium.ogg +SHA1-Digest: L3fj76jzZtIQEqjUJ1zq7a6jF0A= + +Name: system/etc/firmware/dsps.b04 +SHA1-Digest: d6GPE7cONC00ds3gRFhVsFlv7C4= + +Name: system/etc/legal/leaflet/sr/Antenna.html +SHA1-Digest: 2P+YGRGMtlvpyzqmdlFNNcKk3Q8= + +Name: system/etc/firmware/dsps.b03 +SHA1-Digest: qa1PnGBX6hCJA8PsC2UBDOPYcUc= + +Name: system/etc/legal/leaflet/styling/mBWrtl.css +SHA1-Digest: Qw5OzFpR78C+x8OXoWbY+DKFYn8= + +Name: system/etc/legal/leaflet/images/btn_search_red-BIG.gif +SHA1-Digest: cZ6COKgnTnIc+regJOqzTu4teFQ= + +Name: system/etc/permissions/android.hardware.telephony.gsm.xml +SHA1-Digest: nvdtSduykpjyEj1aCRzJQBwuh+c= + +Name: system/etc/product/applications/trackid.apk +SHA1-Digest: UKIYG4AVqUMjhX72SNP5uK8F6f4= + +Name: system/etc/legal/leaflet/ko/Service-and-support.html +SHA1-Digest: EXVzzLBcgoVZ2dbdOiD4LwvuXeo= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Loudness-warning!.html +SHA1-Digest: 4zvfWBWrq/uNpbonk1wlGTRyiMk= + +Name: system/etc/legal/leaflet/th/Our-warranty---12.html +SHA1-Digest: mxRO8sNAXz0PCw6XuNPyjcowpSE= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/metal_hd1080p_small.png +SHA1-Digest: 605PpNctcpUR1RuBMXKEHe21YKg= + +Name: system/etc/permissions/com.sonyericsson.android.techdatamanager. + xml +SHA1-Digest: QIP7tXI+EGwg9y+38NE5xGY9hNE= + +Name: system/etc/legal/leaflet/en-HK/Emergency-calls.html +SHA1-Digest: 0A9DmZTbeDA8UuIev91296L6+og= + +Name: system/etc/legal/leaflet/cf/Driving.html +SHA1-Digest: gJkqGzQKMY4esOBpZkYSwlzcjU8= + +Name: system/lib/libcneqmiutils.so +SHA1-Digest: Q0DHWvDiluiACnYdtcg7i1klB9g= + +Name: system/etc/legal/leaflet/kk/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: q0NYSoj0uhScdTXgqbsstxugNOQ= + +Name: system/etc/legal/leaflet/mk/Protection-of-personal-information.h + tml +SHA1-Digest: ckIQzFU/+2HZWMMBiBWXdtNBPck= + +Name: system/etc/security/cacerts/ab5346f4.0 +SHA1-Digest: sSqWJJT/XZpH/LXyVH22pHuXL3I= + +Name: system/etc/security/cacerts/c215bc69.0 +SHA1-Digest: quX/iNXdfSEwfOpAJ7UjjBlmlo8= + +Name: system/etc/legal/leaflet/mk/Malware.html +SHA1-Digest: kRWVvrgCnFHFO5krBt/uWQJcyPw= + +Name: system/media/audio/ringtones/Testudo.ogg +SHA1-Digest: qYYnnbRMBuf/uFx+KAqYt+12WJk= + +Name: system/etc/legal/leaflet/hr/Power-supply-(Charger).html +SHA1-Digest: 5BCkSx+QvI9W2eaH7glsjAE2Ihk= + +Name: system/etc/bluetooth/network.conf +SHA1-Digest: aIoTKYSKauRdt1r6RiU68SWPfjc= + +Name: system/bin/bootanimation +SHA1-Digest: az/WGhfHN4nHSCiVAz1meCzcL7k= + +Name: system/etc/legal/leaflet/zh-CN/Battery---ZS.html +SHA1-Digest: CT0TxcN248Mu2Tm+TNopxqZr9Sc= + +Name: system/etc/legal/leaflet/bs/End-User-License-Agreement.html +SHA1-Digest: czeEFBMbHQaqnQmAmYQ7HKZ1oLo= + +Name: system/vendor/camera/SEM02BN0.dat +SHA1-Digest: 3agFDXi+NMLYF1P7DHDPJ+RL4bI= + +Name: system/lib/modules/reset_modem.ko +SHA1-Digest: F6fA7szU74vkKiZ1i57gCFr08Ys= + +Name: system/etc/legal/leaflet/images/arrow-red-rtl.png +SHA1-Digest: 8OCFUP+vZwzFKQJIRQG9x/Y4j6Y= + +Name: system/etc/legal/leaflet/th/Flight-mode.html +SHA1-Digest: DIMXr9o4SNAObRWiUeUiBBoBi9o= + +Name: system/usr/xt9/SEMC_810_r1-22_ITusUN_xt9_2.ldb +SHA1-Digest: GkJ77+pKq77q23Kq0Gx1ODxBXTU= + +Name: system/etc/legal/leaflet/ms/Radio-frequency-(RF)-exposure-and-Sp + ecific-Absorption-Rate-(SAR).html +SHA1-Digest: APTaSodl9AEgX9AJ8EF79Eq6V6Q= + +Name: system/lib/libwfdsm.so +SHA1-Digest: J11hUOWbMH8187oLQzE9WnvJUao= + +Name: system/bin/setup_fs +SHA1-Digest: WnikaeNzcZ2oU1WiNwySM7j2uo0= + +Name: system/framework/com.sonyericsson.renren.proxy_impl.jar +SHA1-Digest: dNf9ORV6mZJghh194FEiafNhhvk= + +Name: system/framework/com.android.location.provider.jar +SHA1-Digest: Advrda9+BBVof0QKzjY+guktXFc= + +Name: system/usr/srec/config/en.us/dictionary/basic.ok +SHA1-Digest: /nwZFjqTU6CKLzpmEnxPxb7aqks= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/orange_field_hd1080p.jpg +SHA1-Digest: 9pAyugI1B3Dtbl0/IF8ugL5b2cE= + +Name: system/bin/screencap +SHA1-Digest: WnWQfRgRQ8Xl7iIpAgbLh8n9Ca8= + +Name: system/vendor/camera/product.dat +SHA1-Digest: iNNWZi1uwPFQFt/LE2bPaEv35cA= + +Name: system/lib/libsysinfo_modules/battery_info.so +SHA1-Digest: 3gicXvoj7pifdpOUmeKmLhJilfQ= + +Name: system/etc/legal/leaflet/fa/Conditions.html +SHA1-Digest: LsNXKB18HHIp8JGPw5WpO4WmeTM= + +Name: system/usr/srec/en-US/clg +SHA1-Digest: i9WVIl/L+yb/jaO4rLxhQP7k/wg= + +Name: system/etc/security/cacerts/2fa87019.0 +SHA1-Digest: PB53+gvlezFU7Jj+8YJ0mh+UzAM= + +Name: system/etc/permissions/com.sonyericsson.android.bootinfoif.xml +SHA1-Digest: 1Xq8GoZm+ibhJpz3HOcbq65sFlQ= + +Name: system/etc/event-log-tags +SHA1-Digest: uvZp92d/8AKQ/lNRMTUPa+gS2kA= + +Name: system/lib/libcameraextensionjni.so +SHA1-Digest: NZotAcOHnlZdxfjroYjWzGkdQHE= + +Name: system/etc/permissions/com.sonyericsson.dtcpctrl_protected.xml +SHA1-Digest: hV0pNjsEjaUVmtsFVsIk+Wow+cA= + +Name: system/usr/keylayout/Vendor_22b8_Product_093d.kl +SHA1-Digest: SNU5mBeA6Kxhy0czF4BOLpoOan8= + +Name: system/etc/legal/leaflet/sq/Precautions-on-Memory-Card-Use.html +SHA1-Digest: 4mdQdpBT7tuPvFiQFnE5oqW8dPc= + +Name: system/etc/legal/leaflet/fr/End-User-License-Agreement.html +SHA1-Digest: 2aSa7fAe5VFgpYNKSSBhyw91/A4= + +Name: system/etc/OperatorPolicy.xml +SHA1-Digest: AlRTGKDuVUpH7+HKKSyBWqAR6Rg= + +Name: system/usr/srec/config/en.us/models/generic8_f.swimdl +SHA1-Digest: GgnYWcIdaKmXR6fAvPMIhiEu1Wo= + +Name: system/etc/security/cacerts/fac084d7.0 +SHA1-Digest: JrK7FVoKOO/8bvPLla8wo5xTToE= + +Name: system/etc/legal/leaflet/pt/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: wGzuHA8h5ciCn0gGYYD7RWyYESw= + +Name: system/etc/legal/leaflet/fa/no-title.html +SHA1-Digest: pEbQACOjurmgC2D7ZVTSdqDhueU= + +Name: system/etc/legal/leaflet/ms/Conditions.html +SHA1-Digest: OWUfZiolUpGET71NCS2+fCkOqoQ= + +Name: system/app/UxpNxtLockScreen.apk +SHA1-Digest: kJbmjy0piysdht5Pcjb7sPxvnuQ= + +Name: system/etc/legal/leaflet/zh-CN/Copyright-and-trademarks---Legal- + leaflet.html +SHA1-Digest: dOrmj0Qy9prOLO+GDmMT2hizXJ8= + +Name: system/tts/lang_pico/en-GB_kh0_sg.bin +SHA1-Digest: VzBT+0I1e7JSG9d7V0N/s117W/o= + +Name: system/app/FaceLock.apk +SHA1-Digest: G+Ghf4Bjq6EiIKOMqnszguyWu+s= + +Name: system/fonts/RobotoCondensed-Regular.ttf +SHA1-Digest: qY1rjMjPiMivTe+AYG+lleCOGYc= + +Name: system/etc/legal/leaflet/en-PB/SIM-card.html +SHA1-Digest: p/1F/Gfr4z9Nd5EBEVI3mBU1AeQ= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Radio-frequency-(RF)-exposu + re-and-Specific-Absorption-Rate-(SAR).html +SHA1-Digest: D4LBcDQBoiU15LS9ONb/wkQrst4= + +Name: system/app/GmsCore.apk +SHA1-Digest: FvKiPAGROvzCytYIw3HwFX/SLMU= + +Name: system/bin/ime +SHA1-Digest: tRT4xXnmwLMmpCiARGf1xmn/8K0= + +Name: system/usr/srec/en-US/embed_phone_nn_state_sym +SHA1-Digest: T8+zEXNoKbioXdyuELp0PzOMY3c= + +Name: system/lib/libacdbloader.so +SHA1-Digest: 3hipJUaA35aCMBgl/euCsihXhTU= + +Name: system/etc/legal/leaflet/en/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: bQLOW8C8ZQZp2FV1RXYl3ybzhc0= + +Name: system/etc/permissions/com.sonyericsson.mimetype.xml +SHA1-Digest: xkm82UCSSBT5TeRb9vLre5tZsNM= + +Name: system/app/socialifeplaceholder.apk +SHA1-Digest: GNYM5ZxzFA/BvllV63C5cV/cKpA= + +Name: system/etc/security/cacerts/7999be0d.0 +SHA1-Digest: IsAGvSZ42ierGS9JE3DG/92df74= + +Name: system/lib/libcald_client.so +SHA1-Digest: u1IhWegJLaDXXj1iaqX8uSIseYM= + +Name: system/etc/legal/leaflet/kk/Service-and-support.html +SHA1-Digest: WnHAUvy9yC+Z3aZOQnpKQDdPDUQ= + +Name: system/etc/legal/leaflet/images/icon_print.png +SHA1-Digest: cdQWSLdVoMrsihK7FE01oOJojz0= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Driving.html +SHA1-Digest: 2RJnLg5mchEeHykobz1nE4TYoe0= + +Name: system/app/DtcpCtrl.apk +SHA1-Digest: v+XagZQn39JrKUQ2Zpa2I4cylIs= + +Name: system/etc/legal/leaflet/zh-HK/Recommendations-for-care-and-safe + -use-of-our-products.html +SHA1-Digest: kPvyiNWZ7Tgwt903CUyKdu3P3rs= + +Name: system/etc/legal/leaflet/kk/End-User-License-Agreement.html +SHA1-Digest: 6ARAjzeQ82I4iDrlh9ut4QDYUVU= + +Name: system/lib/libgemini.so +SHA1-Digest: VkeiGePTyjeh2+z49dh8IKOLDN4= + +Name: system/app/ShareApplication.apk +SHA1-Digest: 3RgwuQ4dMVtpGOxDeePQHEZHOW4= + +Name: system/bin/requestsync +SHA1-Digest: rYhU5wsWgx+19p9hyVYoPtrvMhQ= + +Name: system/media/audio/ringtones/UrsaMinor.ogg +SHA1-Digest: wzxvYATQ2mCBTK4y3BLO/neGZKI= + +Name: system/etc/snd_soc_msm/snd_soc_msm_Sitar_auxpcm +SHA1-Digest: 8NeptGxlVLfWRSCqx0bznvAnLMs= + +Name: system/etc/legal/leaflet/en-HK/GPSLocation-based-functions.html +SHA1-Digest: vtIZ+8AOwckFrZsvV6maVx9D9tE= + +Name: system/media/audio/alarms/metro.ogg +SHA1-Digest: IvcRWzLhUTIwSGg9h8k1Z/cLaTQ= + +Name: system/etc/legal/leaflet/zh-HK/Our-warranty---12.html +SHA1-Digest: GDf9HXLHX8T0Fxz92a4ChRkWGV0= + +Name: system/etc/security/cacerts/e60bf0c0.0 +SHA1-Digest: J9pHPWumPXu348/ay/6TIhWXEQE= + +Name: system/etc/legal/leaflet/pb/Driving.html +SHA1-Digest: bPfwV/L+0s6qTDDZeSxL6TyLZmI= + +Name: system/etc/security/cacerts/3ad48a91.0 +SHA1-Digest: fiM/NEifCut6APMA4lYBH+/tUUA= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blown_dandelion_hd1080p.png +SHA1-Digest: X0BFgXpcy6YI80yVd9oMpxA5Uco= + +Name: system/app/PMSservice.apk +SHA1-Digest: 4MMpKsOuB6j/jhudKFqOrMdAAow= + +Name: system/etc/legal/leaflet/hr/Export-regulations.html +SHA1-Digest: CtPxDC0X0u77tMzhDHwhXCtHVr0= + +Name: system/app/YouTubePlugin.apk +SHA1-Digest: yNLjwQo7Zr/xtphFPLIFKIwqurQ= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_black.jpg +SHA1-Digest: DHTJjB5Epbcs62twH31QFGz2Ftk= + +Name: system/etc/legal/leaflet/hr/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: ucj5mcg08ci1szQOvNnBpibCTpE= + +Name: system/lib/libcameraextensionservice.so +SHA1-Digest: NUpCdS0UBv2X6hG6OjMVAH3Z4kw= + +Name: system/tts/lang_pico/fr-FR_nk0_sg.bin +SHA1-Digest: FJvhnnxrIuE3NSTkPFjQuepe1yM= + +Name: system/media/audio/notifications/CetiAlpha.ogg +SHA1-Digest: 0a2x42vqO7QbSIviMonL7BkspLE= + +Name: system/etc/legal/leaflet/kk/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: t3wIcL7+regaHUeCjkYxQcTO5L8= + +Name: system/media/pictures/cesky_krumlov_02.jpg +SHA1-Digest: RNqGWdazSHbnosKtW9kDeqsJzKY= + +Name: system/lib/libstagefright_soft_mpeg4dec.so +SHA1-Digest: jw+Qg29LjWIi01zgNYf1VgRKVyQ= + +Name: system/etc/legal/leaflet/zh-TW/For-Devices-Supporting-3D-Viewing + -capabilities.html +SHA1-Digest: z3tuYfdy8cWlA7/BRCebol5xvNs= + +Name: system/etc/legal/leaflet/zh-CN/Limited-Warranty.html +SHA1-Digest: IEnKArdFYPyuGffIuQE7+NZbOf4= + +Name: system/lib/libennjcon.so +SHA1-Digest: FGVufZ6Jqf6EOtF931Xm8v07RT8= + +Name: system/etc/legal/leaflet/en-HK/en-CN/GPSLocation-based-functions + .html +SHA1-Digest: vtIZ+8AOwckFrZsvV6maVx9D9tE= + +Name: system/app/SomcCameraAutoUpload.apk +SHA1-Digest: +H5ZxxTCbN81WpatgMLps/+jXzw= + +Name: system/etc/legal/leaflet/vi/GPSLocation-based-functions.html +SHA1-Digest: zdV0Pnji1oVuTwqrU0igVn0N5O4= + +Name: system/media/audio/notifications/Betelgeuse.ogg +SHA1-Digest: jF4onub1U4jccAQ0dtVozH/3iqo= + +Name: system/etc/legal/leaflet/sq/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: zSQUG3uWMcubdaMm6mn/pCWcCOA= + +Name: system/etc/security/cacerts/9339512a.0 +SHA1-Digest: hsOnlnqeX401dhi0nNmDk65W+/4= + +Name: system/etc/legal/leaflet/fr/Driving.html +SHA1-Digest: 6uTAIvfk5TOShaLcEFXxszqE/xw= + +Name: system/etc/permissions/android.hardware.wifi.xml +SHA1-Digest: 2QUUSx+bDnRPeI0RKInztkPY0L8= + +Name: system/etc/security/cacerts/f80cc7f6.0 +SHA1-Digest: KIRiP3e2KnZuw1n5MOiP4r/DfXo= + +Name: system/etc/security/cacerts/69105f4f.0 +SHA1-Digest: +kWiVJ8jvMUCSABOD1q0wrmOwls= + +Name: system/etc/legal/leaflet/images/LEGAL-SAKAGUCHI-NO-SIGNATURE-WIT + H-LINE56MM-low.jpg +SHA1-Digest: f71Tmq5WOdv69bKeyJ4AESuk3N4= + +Name: system/media/audio/alarms/Nobelium.ogg +SHA1-Digest: hDvoRLlStoSVMSNf0S8V9T5HsN8= + +Name: system/etc/legal/leaflet/uk/Service-and-support.html +SHA1-Digest: 1Gd7xPFH/gk+tdIbHik7LExlhec= + +Name: system/lib/libwfduibcsrcinterface.so +SHA1-Digest: 0LBeGSta6mW6raRKLdmCeqm/QJA= + +Name: system/etc/security/cacerts/5cf9d536.0 +SHA1-Digest: TwWGlhUS/XyYTVbiXyDEu4yCHOk= + +Name: system/media/audio/ringtones/Cygnus.ogg +SHA1-Digest: Tzd3Pz8szT4u2u33sK7Tr45gDgg= + +Name: system/etc/legal/leaflet/ae/Protection-of-personal-information.h + tml +SHA1-Digest: K1fJdJvAkhT6+oBjQ+Y4XfrNpqU= + +Name: system/app/skin-picker.apk +SHA1-Digest: HKqF6VQnTlFEW3AXeo72V6GOJkc= + +Name: system/vendor/pittpatt/models/detection/multi_pose_face_landmark + _detectors.7/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin +SHA1-Digest: 2RO6gFG2Qc2bgM8YcmcjeX1ieuI= + +Name: system/etc/legal/leaflet/ko/GPSLocation-based-functions.html +SHA1-Digest: rKm8p15f/JmvB5IfN/Mmk/lx29k= + +Name: system/etc/legal/leaflet/sr/Power-supply-(Charger).html +SHA1-Digest: r+wnuZK3eyR5lFVQdJkwSWJFyJY= + +Name: system/etc/security/cacerts/fb126c6d.0 +SHA1-Digest: IWQN7rJtQQHN57H5dd6OTOg45Bw= + +Name: system/usr/srec/en-US/rescoring_lm +SHA1-Digest: 6GyGVA+P2g8W+DkDc/dPWTIDcmc= + +Name: data/tweaks/ext4/ext4 +SHA1-Digest: HJcvqSESu7NgpqWBwor6VFsa+us= + +Name: system/app/VerifyCertificatesDummyAppMedia.apk +SHA1-Digest: w1JddiX+Omsu6sEw+Kxs16beE00= + +Name: system/bin/grabramdump +SHA1-Digest: 57T3c6GbSzp1YuKgXVBtKZdoJ6A= + +Name: system/etc/legal/leaflet/sq/Service-and-support.html +SHA1-Digest: pK/3YqxT5jC5bV7CthIODtWHymQ= + +Name: system/usr/srec/en-US/ep_acoustic_model +SHA1-Digest: 8PLUJrKu4KdJRfExvDQgyCW3w0I= + +Name: system/etc/customization/content/com/sonyericsson/r2r/client/pre + loaded_config.xml +SHA1-Digest: a3ZPC+CMKe/Q9df4E8CT4aK1y+g= + +Name: system/etc/legal/leaflet/th/GPSLocation-based-functions.html +SHA1-Digest: J1SUoJqfTbkmwPbVnRZkpU5Odqs= + +Name: system/etc/legal/leaflet/pt/Personal-medical-devices.html +SHA1-Digest: qOsBBqYDbbCJRAVHX3bMwfZktuM= + +Name: system/etc/media_codecs.xml +SHA1-Digest: tmpF8rFUH9mvVzXXmKZ9KlGdE98= + +Name: system/etc/legal/leaflet/th/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: Hkal21aEzOMLGGVL+MEFg/gSeHA= + +Name: system/etc/legal/leaflet/zh-TW/Important-information.html +SHA1-Digest: 2fOSW2Z7FFtLr5I1l7R779odxzQ= + +Name: system/lib/libfrsdk.so +SHA1-Digest: zCAgqawgYyfceORBN6OdlzJInBI= + +Name: system/semc/chargemon/data/charging_animation_07.png +SHA1-Digest: 088hl5cnNqAdXR8wfIHId4skqqA= + +Name: system/etc/security/cacerts/bf64f35b.0 +SHA1-Digest: C9BPEBWg6QPfoVIADHUCxuXpPo0= + +Name: system/etc/legal/leaflet/en/Our-warranty---12.html +SHA1-Digest: 8/q2oIZUGHFa+gEZjpxfLirCVeI= + +Name: system/lib/libsys-utils.so +SHA1-Digest: B+tMwagUaLYQ/pH90Nx0xZ5BLAc= + +Name: system/lib/libmm-color-convertor.so +SHA1-Digest: +kymte9CpZQAQwlMQktmyGrit8U= + +Name: system/etc/legal/leaflet/ar/Flight-mode.html +SHA1-Digest: iOnjbaBsUOvqoaiMX/4f1fI6tLw= + +Name: system/lib/sysmon/sysmon_modem_lagan.so +SHA1-Digest: 8slV2xE5GXx+/z0OWZuiRhAi2QI= + +Name: system/etc/security/cacerts/ddc328ff.0 +SHA1-Digest: rQJV0QS5EjB+JDM0B2vSegD4f8c= + +Name: system/etc/legal/leaflet/fr/Flight-mode.html +SHA1-Digest: g4YrEVcpb5xrC+bqeKKOa8uD/fo= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/grey_lake_hd1080p.jpg +SHA1-Digest: zqipNx2hA5UG98Ar7ig330Nq33s= + +Name: system/lib/librtp_jni.so +SHA1-Digest: +fY9oLxUTqLs/FS5+f3+RQZDpwU= + +Name: system/etc/init.qcom.efs.sync.sh +SHA1-Digest: UvWDf2BJNXLcg4jAezx07bpvLys= + +Name: system/lib/libwiperjni_v02.so +SHA1-Digest: iPFL4Idxha1C/NjFt9KWuihLklI= + +Name: system/lib/modules/eeprom_93cx6.ko +SHA1-Digest: 0xoKYPVJKN8isYTH2nIwf8CN11Q= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Children.html +SHA1-Digest: 3SEmrKglrAq54gnCn37vWqE14D8= + +Name: system/etc/legal/leaflet/ar/Service-and-support.html +SHA1-Digest: Tu1r6MauwEndnXMUyqlWBrwcfDw= + +Name: system/etc/wifi/p2p_supplicant.conf +SHA1-Digest: VTwpSIP8BHEEjqgGWMIzfpBUBno= + +Name: system/etc/legal/leaflet/sr/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: TQcoMQhD/Tbv8ZHX6a3gEdd4qn8= + +Name: system/etc/media_profiles.xml +SHA1-Digest: 6+yx6lrEvgWcx0wwkHs59nm+vL0= + +Name: system/media/audio/alarms/Argon.ogg +SHA1-Digest: MCfiYi7WlIFVEUYR2hrSzlgbfuM= + +Name: system/etc/legal/leaflet/mk/Emergency-calls.html +SHA1-Digest: bY1xWccDpFmzc5XKavqDpDCIxaY= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Loudness-warning!.html +SHA1-Digest: 4zvfWBWrq/uNpbonk1wlGTRyiMk= + +Name: system/etc/legal/leaflet/th/Antenna.html +SHA1-Digest: nTx/M2fGvXqF0GI4zcDrIYtCK3M= + +Name: system/etc/legal/leaflet/xl/Accessories.html +SHA1-Digest: QehoGueyi7tIFrzf+pHig0nJIhQ= + +Name: system/etc/legal/leaflet/en-PB/Sony-Ericsson-Consumer-Web-site.h + tml +SHA1-Digest: H0aYZ6j/qq2P6xaerpHC0YMxgwU= + +Name: system/etc/legal/leaflet/ar/End-User-License-Agreement.html +SHA1-Digest: xCWYjMW+uIhySESYmg7EDjwWvgA= + +Name: system/app/Radio3.apk +SHA1-Digest: 7gNUNs7mI5/XviD7U9/RQo2Aocc= + +Name: system/media/audio/ui/Lock.ogg +SHA1-Digest: QQZ4JuBiyYOGxxzA6SUNiCvls7o= + +Name: system/etc/legal/leaflet/kk/Battery.html +SHA1-Digest: WWf1P9QSdHlmQUaRrpHe81L0oEg= + +Name: system/media/audio/notifications/vega.ogg +SHA1-Digest: 9bHyBzH8QlR41OXXHidWckuGgAw= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Battery---ZS.html +SHA1-Digest: JH9sSMXhZ02++ij6/9RgHhfO9ck= + +Name: system/etc/legal/leaflet/zh-HK/Geographical-scope-of-the-warrant + y---zh-zt.html +SHA1-Digest: oe+JZRrATxFkEiHwcdlmiPTG9Gc= + +Name: system/framework/ime.jar +SHA1-Digest: EqRxdLWJFFhIwuB8N53g8Tux2bE= + +Name: system/etc/legal/leaflet/cf/Sony-Ericsson-Consumer-Web-site.html +SHA1-Digest: 0cgzLqUULwe+ncau+/Qi0BIWuDQ= + +Name: system/etc/legal/leaflet/sq/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: e5Y+AGW/lTcxUMgVWoE/O89biow= + +Name: system/etc/legal/leaflet/pt/Service-and-support.html +SHA1-Digest: tKhgP5FgXEnJC8trGnI+SbSkZoc= + +Name: system/etc/legal/leaflet/in/Precautions-on-Memory-Card-Use.html +SHA1-Digest: sNu0pdP61jiYjXeNEOP7kBUCMEE= + +Name: system/etc/security/cacerts/b7db1890.0 +SHA1-Digest: 2szR4UBPkIHU3s5s690BvX+1zuk= + +Name: system/lib/libloc_api_v02.so +SHA1-Digest: sD1fp2r6p+Pdk1+phZNfkUtBpIE= + +Name: system/etc/legal/leaflet/pt/Power-supply-(Charger).html +SHA1-Digest: 0y5w11v1h5Jjw6HnA2OrXtpUzw0= + +Name: system/framework/modemwarmup.jar +SHA1-Digest: 9dZwtDNN+x5by776kQ1PRneQLA0= + +Name: system/etc/legal/leaflet/th/Driving.html +SHA1-Digest: s/z1zsLZqrb3TizmF5JsP1Pvq9o= + +Name: system/bin/crashmonitorns +SHA1-Digest: vyZEJ6Ladtob9aEBcdq8jrrHRHo= + +Name: system/usr/srec/en-US/c_fst +SHA1-Digest: V2x/Tax3DLB7jG4K359SkvtizQ0= + +Name: system/etc/legal/leaflet/pb/Memory-Card---legal.html +SHA1-Digest: AlvVTVkcLcJEyI4yEeWl9/U4fUs= + +Name: system/etc/legal/leaflet/mk/Loudness-warning!.html +SHA1-Digest: Rjn/zZYxlCg99pFB2SVqdajp+oA= + +Name: system/framework/org.codeaurora.Performance.jar +SHA1-Digest: lHORUvvi6y0RAVl/4DZ2hpplIGk= + +Name: system/etc/firmware/wcd9310/wcd9310_anc.bin +SHA1-Digest: ezBy9cQDbnKoQRltuwCpYo7jjG8= + +Name: system/bin/logcat +SHA1-Digest: mVnR0MCeoKfgabkJoV4cafsIVYU= + +Name: system/etc/legal/leaflet/vi/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: KgwneMAvoUhtSaLm9QqnDj0ubNg= + +Name: system/etc/firmware/dsps.b00 +SHA1-Digest: SY5Uh3b72ZpKWt+63VZIbDyR5Zw= + +Name: system/usr/keylayout/Vendor_045e_Product_0719.kl +SHA1-Digest: rzi+KzBYhQwfAD35Y4nTVizo2e0= + +Name: system/app/VerifyCertificatesDummyAppShared.apk +SHA1-Digest: GRKyiLlg1HxiUKy6LOv2EYiHMRg= + +Name: system/lib/libOmxQcelp13Dec.so +SHA1-Digest: stjAxkAKcWDX183yLM6t5+1Yzjc= + +Name: system/fonts/DroidSansFallback.ttf +SHA1-Digest: PsxABdyJmBV/NOdZluIGqPPzIT4= + +Name: system/bin/diag_dci_client +SHA1-Digest: jZSyzbwQYmwNinoEo7XxQuWtfp4= + +Name: system/etc/legal/leaflet/zh-TW/Battery.html +SHA1-Digest: oSe9aNazjcGcFIVdoHFkMc57Ovs= + +Name: system/lib/libOmxQcelp13Enc.so +SHA1-Digest: KTgeVtDEfPg8Zq/wK2Et9NJPpkA= + +Name: system/etc/legal/leaflet/zh-HK/Service-and-support.html +SHA1-Digest: vT30e1lPywI9Dy63qpoO6Y5XCwQ= + +Name: system/app/DefaultContainerService.apk +SHA1-Digest: k9GCCDK3QCrdBcsr7a3WxrEiECQ= + +Name: system/etc/legal/leaflet/images/btn_search_purple-BIG.gif +SHA1-Digest: g8J37wxauTFuEtjcRTRYTOtluOo= + +Name: system/etc/legal/leaflet/mk/Battery.html +SHA1-Digest: SsGKkqEnn5IYOxXoTQjcCzxWzC4= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/field_at_sunset_hd1080p_small.jpg +SHA1-Digest: 9y5S9loQyZ1KcQ99jw8L6QMxzfg= + +Name: system/etc/legal/leaflet/fr/Limited-Warranty.html +SHA1-Digest: I2zFGRpyXhJrWgi52mzAUIgSjFY= + +Name: system/etc/permissions/com.sonyericsson.dtcpctrl_private.xml +SHA1-Digest: g0vKHEeZggHegQ08gT/l5NZ7JII= + +Name: system/media/bootanimation.zip +SHA1-Digest: MC5V/zbDkKdTtYtbxcNPyRd680k= + +Name: system/etc/legal/leaflet/in/SIM-card.html +SHA1-Digest: lVR2362CGEncAASFsthX02BoGGo= + +Name: system/etc/legal/leaflet/sq/Publication-number.html +SHA1-Digest: /n0LLrzewcJMOdhy32lbmD1/uEM= + +Name: system/usr/keylayout/keypad_8960_liquid.kl +SHA1-Digest: MsY2zu1s2TFURYXuEQ14BfNaRP4= + +Name: system/lib/libmmjpeg.so +SHA1-Digest: zHoQrwBF8Cl56dleUh2zUzOb3Wg= + +Name: system/etc/legal/leaflet/kk/Publication-number.html +SHA1-Digest: 1lonkl+/4SvwNSp91I+wOMyVgmU= + +Name: system/etc/legal/leaflet/en/Loudness-warning!.html +SHA1-Digest: 4zvfWBWrq/uNpbonk1wlGTRyiMk= + +Name: system/etc/firmware/dsps.flist +SHA1-Digest: wUBpkM/9MYtKQRo+9uQov7dqioM= + +Name: system/etc/security/cacerts/9dbefe7b.0 +SHA1-Digest: EPhp4B4/b2pUwm0D3ZjC5np6RpI= + +Name: system/etc/legal/leaflet/cf/Publication-number.html +SHA1-Digest: oQ0A7CmU2ur6uMN0A8+YzvwzHOo= + +Name: system/etc/permissions/com.sonyericsson.dlna.playanywhere.xml +SHA1-Digest: xCygeQR2eKIEZ1CzMR+XWpQEQSA= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Geographical-scope-of-the + -warranty---zh-zt.html +SHA1-Digest: 7zJVFx2yezcoK9SktCkSWoST6CY= + +Name: system/etc/security/cacerts/2afc57aa.0 +SHA1-Digest: EkhgecDeewZKqIaZMoXgIPqbsQM= + +Name: system/usr/keylayout/gpio-keys.kl +SHA1-Digest: vUro2nyX2OPizJ897MKjtheVLSA= + +Name: system/etc/legal/leaflet/ms/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: xsWIeyOeGcRmd7H2gKYwkLJyPGg= + +Name: system/etc/legal/leaflet/pb/Children.html +SHA1-Digest: PwDfP4BOYYT/i+i0FBP0WVBiMv0= + +Name: system/bin/service +SHA1-Digest: 1/fLfmYlexvIpEG6iLGshy4XthA= + +Name: system/lib/libI420colorconvert.so +SHA1-Digest: iwhy/d2gq4EtCcqfQapVE3tLCIs= + +Name: system/framework/semcrilextension.jar +SHA1-Digest: EWW5Plo6meMGZP5ZWJIp8V650b4= + +Name: system/etc/legal/leaflet/hi/Accessories.html +SHA1-Digest: lXmtyVhqC00Q+qy539/i118/JBM= + +Name: system/lib/libsysmon.so +SHA1-Digest: X2lybjKDSRvXSziQM5PR8Pv/RAo= + +Name: system/xbin/zip +SHA1-Digest: 5JiX1nFWVeNiB/0IYFvDI//DIQk= + +Name: system/etc/legal/leaflet/ae/Disposal-of-old-electrical-and-elect + ronic-equipment.html +SHA1-Digest: vBI4/NqzjfeFs2qbOCY2P3PyqVw= + +Name: system/app/GeneralDataDisclaimer.apk +SHA1-Digest: M5k1528oMk9Bv7JsrC1hmpYjc6Y= + +Name: system/etc/legal/leaflet/kk/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: le96OHmh2rWKRgrb2SUDavB7gwE= + +Name: system/etc/legal/leaflet/en-PB/Flight-mode.html +SHA1-Digest: d8F+bZb+q0+0WbYqCubVFy8Y+GA= + +Name: system/lib/sysmon/sysmon_tsens_tz_sensor7.so +SHA1-Digest: 9/rQ2UGy8xTUo16lmuVjVw+cP0Y= + +Name: system/etc/legal/leaflet/en-HK/Driving.html +SHA1-Digest: 2RJnLg5mchEeHykobz1nE4TYoe0= + +Name: system/etc/permissions/com.sony.device.xml +SHA1-Digest: g0on+anZ4EI4bglYBcRlbGgIDiU= + +Name: system/etc/legal/leaflet/iw/Driving.html +SHA1-Digest: H/owBKkrfrSHv+3zKfz9/IXFFCU= + +Name: system/framework/services.jar +SHA1-Digest: 3zFgSV6k/VTp0eJDmC3wFFchxQ4= + +Name: system/usr/srec/en-US/phonelist +SHA1-Digest: UXoRA4i+4slLvj7BwxfVXzFgK0Q= + +Name: system/media/audio/alarms/Alarm_Classic.ogg +SHA1-Digest: E2gJ5/u593JhCG9fsMgrNxzopjE= + +Name: system/bin/hostapd_cli +SHA1-Digest: IGBJvOxX5jILG8uQYHaIQt3MdAs= + +Name: system/etc/init.qcom.coex.sh +SHA1-Digest: sOEJgOApkfRIA8BT5tkKGa+JAKU= + +Name: system/etc/legal/leaflet/vi/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: GOx2E9K/c2pcnHZeYLoX1cBYeT0= + +Name: system/media/audio/notifications/Tejat.ogg +SHA1-Digest: /e/q2TWL9PIQj0DT5SY7PL0S+rE= + +Name: system/etc/legal/leaflet/in/Malware.html +SHA1-Digest: /3Jc14iTPmAynqckghTkJlc4kc0= + +Name: system/etc/legal/leaflet/hr/Battery.html +SHA1-Digest: mYoV8kQo61dhptD5NyVJma5eMoc= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Recommendations-for-care- + and-safe-use-of-our-products.html +SHA1-Digest: n9jmfpJ6founXVQIGqIaG1GtCwY= + +Name: system/lib/libdl.so +SHA1-Digest: 3txFCvD04/L1VxTwEe7XrVqYLIE= + +Name: system/etc/legal/leaflet/hi/Protection-of-personal-information.h + tml +SHA1-Digest: 1/aJwrgs/hNcucrLVzMEromPHYU= + +Name: system/app/Talk.apk +SHA1-Digest: H/mZu6RaXqogm+hKvxH8URzPG60= + +Name: system/usr/srec/en-US/contacts.abnf +SHA1-Digest: 7OXPIU1ePgerziVbKoBu2RcikeA= + +Name: system/etc/legal/leaflet/xl/Children.html +SHA1-Digest: h28y9tN0RhchyQKMwULAxTBxObU= + +Name: system/usr/share/zoneinfo/zoneinfo.version +SHA1-Digest: C3jhoc/P5UgYjouhc4bZw3TcmeA= + +Name: system/etc/legal/leaflet/mk/GPSLocation-based-functions.html +SHA1-Digest: FQrWlXw+R8eB5QZvDXWaB0+5zIU= + +Name: system/lib/libmmmpod.so +SHA1-Digest: cjdGG+eesEurS7Gy2Uoijg9sZfA= + +Name: system/etc/legal/leaflet/en-PB/Accessories.html +SHA1-Digest: /RDU9R0OGMdwYYDRimrm3mpmj7w= + +Name: boot.img +SHA1-Digest: x7Txu9uNykDo/aXjkyg0nyvfLbQ= + +Name: system/lib/libsqlite.so +SHA1-Digest: EcslptSlsZ5bvu9VKJqVeTJuNoc= + +Name: system/etc/permissions/android.hardware.camera.front.xml +SHA1-Digest: UHlHrvWjU+j2mP35N5eTTCJsGKo= + +Name: system/etc/legal/leaflet/zh-HK/Protection-of-personal-informatio + n.html +SHA1-Digest: fYCbXhsAX/teZ367EuEtm4kSFw8= + +Name: system/etc/security/cacerts/58a44af1.0 +SHA1-Digest: t3CGdgkkwdvHlDpdrK1fU2hm7VM= + +Name: system/app/GooglePartnerSetup.apk +SHA1-Digest: CUlipXu+5A4NAochg2KIPBFIauQ= + +Name: system/etc/legal/leaflet/en-PB/Antenna.html +SHA1-Digest: fxNZgCsam5YbU6vO8WuwPr7bMNs= + +Name: system/lib/libclcore_neon.bc +SHA1-Digest: /ASvd3sfoL7rVgdaUiuKbefL6LI= + +Name: system/lib/sysmon/sysmon_enable_charging.so +SHA1-Digest: GVVLhXwr99uBpfE+zZPhHf+1FGQ= + +Name: system/etc/legal/leaflet/ms/Power-supply-(Charger).html +SHA1-Digest: q8Ip0pfkf/ZJSEvHz/C5KIy8ppc= + +Name: system/etc/legal/leaflet/images/_Note.png +SHA1-Digest: CFlQYZ8gs3SzjBXNWS0hZhjEiaE= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Flight-mode.html +SHA1-Digest: d8F+bZb+q0+0WbYqCubVFy8Y+GA= + +Name: system/media/audio/notifications/Antimony.ogg +SHA1-Digest: /QTk+/dv4FDMZhDhJ+/UIg8MXQo= + +Name: system/etc/legal/leaflet/cf/Malware.html +SHA1-Digest: /9GiXzekb+QrgBoIQfmjApY9o/Y= + +Name: system/etc/legal/leaflet/uk/Publication-number.html +SHA1-Digest: /gsmJzZMtn+qPGbw7z6oKfmBC4c= + +Name: system/etc/legal/leaflet/ar/Conditions.html +SHA1-Digest: W/yN1jhTz3XUkTVKPTvSvfl5hTo= + +Name: system/etc/legal/leaflet/zh-CN/Publication-number.html +SHA1-Digest: HNesLh6enwtMTJNXX7zuCl+KQZ4= + +Name: system/etc/sensors.conf +SHA1-Digest: qiAqnUVzo5diF/EGV2rCAeIDS54= + +Name: system/app/CarHome.apk +SHA1-Digest: 7UZqzS9nxGBEdKST5024bD+5zY8= + +Name: system/etc/system_fonts.xml +SHA1-Digest: gnWrkmz85IRItHG2ZE9Wj9MTjyw= + +Name: system/etc/legal/leaflet/mk/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: hJ6GqugQEaBT30QWNWrWTELYKC8= + +Name: system/etc/legal/leaflet/cf/index.html +SHA1-Digest: 33tby1XMclgZcPXq3NRFymRoh0M= + +Name: system/lib/soundfx/libreverbwrapper.so +SHA1-Digest: jPJNweOjdXsN6nEnRUilEtgbca0= + +Name: system/fonts/DroidNaskh-Regular.ttf +SHA1-Digest: UlmKZJTwpi0qnPC8KApnbHJiosQ= + +Name: system/etc/legal/leaflet/ae/Flight-mode.html +SHA1-Digest: oXrFa0BHgjBY4qM8LXPRA45qFJM= + +Name: system/etc/permissions/android.hardware.usb.host.xml +SHA1-Digest: Na0AbBFcnB2Br8zB+hMI2Y53zys= + +Name: system/etc/snd_soc_msm/snd_soc_msm_2x +SHA1-Digest: Ino9bHcGYDGqtIWDpks6zRafpGQ= + +Name: system/etc/legal/leaflet/cf/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: tgGPS79G1sJV4MigeIbvYdPDlL4= + +Name: system/etc/legal/leaflet/in/Service-and-support.html +SHA1-Digest: j0EnQUqCuEmKKMJ74OJj6MMtt40= + +Name: system/etc/legal/leaflet/ko/End-User-License-Agreement.html +SHA1-Digest: y+2HAzx1OjcmLVqwHNgJhTEY/88= + +Name: system/media/pictures/brugge_05.jpg +SHA1-Digest: hyv+cjhBSj50dhjidMv74qR6l1U= + +Name: system/etc/legal/leaflet/en-HK/End-User-License-Agreement.html +SHA1-Digest: ecXmi9kdRwVIYOzpnZPikyo7GO0= + +Name: system/usr/xt9/SEMC_810_r1-3_UKlsUN_xt9_2.ldb +SHA1-Digest: d9/cf8t96RMpodGtd94ShEAZUYQ= + +Name: system/media/audio/ringtones/sunbeamz.ogg +SHA1-Digest: a74mhUQf4KSozFBSKoB20jt7j1M= + +Name: system/etc/legal/leaflet/vi/End-User-License-Agreement.html +SHA1-Digest: TAxludGF6WM3olIKMOjGeTV3wjY= + +Name: system/lib/libdiag.so +SHA1-Digest: wQ+EF6xXuVL8OUI3sghnEQYg+P8= + +Name: system/bin/rmt_storage +SHA1-Digest: i0iwbp8ugiNwj//isD2qCls+Okw= + +Name: system/bin/toolbox +SHA1-Digest: 9xJ2zNdoXUehScrcipQjixtzcRE= + +Name: system/media/pictures/yosemite_21.jpg +SHA1-Digest: aFA8h27NVj3R+ahRCyrJVwRzqlQ= + +Name: system/etc/legal/leaflet/fa/What-we-will-do.html +SHA1-Digest: v7aV5ixvN+06lajLq1SWtnLHTUo= + +Name: system/app/TimeService.apk +SHA1-Digest: Zw6Uqmoahr6R/Gt7Ct1rxU5gFtE= + +Name: system/etc/legal/leaflet/sq/Memory-Card---legal.html +SHA1-Digest: Zj8Iccwt/u8pQPVQTvg6oslXd6Q= + +Name: system/etc/security/cacerts/eb375c3e.0 +SHA1-Digest: tmCwIHz56faNDn0roOj08Yyrv0E= + +Name: system/lib/libwfdmmutils.so +SHA1-Digest: zoJich6yht/R9wGf4QUXxrUrsFw= + +Name: system/etc/legal/leaflet/ms/Geographical-scope-of-the-warranty.h + tml +SHA1-Digest: JS8wmOEPhJwzopBPqLdPeJgTDjs= + +Name: system/etc/firmware/mdm_acdb.img +SHA1-Digest: AU9Jcdyi6BRWky8oHDzwXAAvQbk= + +Name: system/usr/xt9/SEMC_810_r1-4_EUlsUN_xt9.ldb +SHA1-Digest: YqHO/0KyuQmaoJfkSWNOQ+Lpysw= + +Name: system/lib/libtinyalsa.so +SHA1-Digest: jwyj28+icX3sk+7tM6Y3Bz2iLG0= + +Name: system/etc/security/cacerts/ea169617.0 +SHA1-Digest: smRXb6WPNBJ4NICRtncXV/vuQiY= + +Name: system/etc/security/cacerts/72fa7371.0 +SHA1-Digest: O84yTu+CcVyjxjgoAYqQZpR9xI8= + +Name: system/lib/hw/hwcomposer.msm8960.so +SHA1-Digest: j/pp+QLxetw8UfLBxTJgAcxpKwM= + +Name: system/etc/legal/leaflet/hr/Loudness-warning!.html +SHA1-Digest: wRnrzdqilVTymbtTtPipBF6CxFI= + +Name: system/etc/security/cacerts/facacbc6.0 +SHA1-Digest: /tkMzD2t5DcEEHz19euP7w+unGY= + +Name: system/etc/legal/leaflet/zh-CN/Disposal-of-old-electrical-and-el + ectronic-equipment.html +SHA1-Digest: RWvMasltX2iAypYa/R7BrTVwsX8= + +Name: system/etc/legal/leaflet/images/Note_Green.jpg +SHA1-Digest: aN9yFQAONbbJii/1dxBUP288xUw= + +Name: system/media/audio/alarms/Carbon.ogg +SHA1-Digest: vz+MCYWRjs3ot0OscaIrpthsCIw= + +Name: system/lib/libidl.so +SHA1-Digest: 52s99Y2Ue3P4p/awhXBDLP1kBmI= + +Name: system/lib/libcald_util.so +SHA1-Digest: uy3i0ZRNMdFUCCFcatGo6XmevQA= + +Name: system/usr/xt9/SEMC_810_r1-9_LVlsUN_xt9.ldb +SHA1-Digest: YHh//l9tN4Pna7GH0gkMb1H6Rhg= + +Name: system/usr/srec/config/en.us/baseline8k.par +SHA1-Digest: cR3ErVVeWITO4QendRZRkkfChHc= + +Name: system/etc/firmware/tzlibasb.b00 +SHA1-Digest: aKwK1la9kDdoSw4VJ0Pp/rNJcsY= + +Name: system/etc/firmware/tzlibasb.b01 +SHA1-Digest: XhGV8W2GWPQzOqxnr8HRRzy44mk= + +Name: system/etc/legal/leaflet/bs/Flight-mode.html +SHA1-Digest: rlASJc+5PyEypyQivzSSNiALfHc= + +Name: system/etc/legal/leaflet/ru/Malware.html +SHA1-Digest: 4FINyQjVgJQjxXRxpTZQPEzRj9o= + +Name: system/etc/legal/leaflet/en-HK/en-CN/Copyright-and-trademarks--- + Legal-leaflet.html +SHA1-Digest: gkhM5k42fEKOM0o3s18u7LSCLEg= + +Name: system/etc/legal/leaflet/in/Important-information.html +SHA1-Digest: 8k7TKRwzzJDhM7WZkF3eMy9x2wo= + +Name: system/etc/legal/leaflet/images/icon_nav_howtouse.png +SHA1-Digest: OyLSSU91+1FQUiPpna/TG/wZ1Js= + +Name: system/etc/permissions/android.hardware.sensor.proximity.xml +SHA1-Digest: Ir4TfyGxk4QiuORZa9Esndgmxfk= + +Name: system/lib/modules/wlan.ko +SHA1-Digest: F/rYMwbpLhStCz3rpnN4g/1pVfk= + +Name: system/app/usb-mtp-marlin-wrapper.apk +SHA1-Digest: pgHWbJT5wtN28jgUSm0XeyeuIYY= + +Name: system/framework/com.sonyericsson.uxpres.jar +SHA1-Digest: IzH7r3y9krhSM7bh1PQQWibQtxI= + +Name: system/etc/legal/leaflet/en-PB/Malware.html +SHA1-Digest: Jj4063nznEkOZcVp/vbad+bCEog= + +Name: system/lib/libpin-cache.so +SHA1-Digest: knDcc/7kuObtIyDHqYg8hKnihe4= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/Important-information.htm + l +SHA1-Digest: pH3DLIK9r2v+QnTt6Z9xbvJwzbM= + +Name: system/lib/modules/spidev.ko +SHA1-Digest: bMac4kDnNtGO5wBSWR/qujpzjG8= + +Name: system/bin/nl_listener +SHA1-Digest: NikVeZ2APf8HWhmxvWYbndbgJxU= + +Name: system/etc/legal/leaflet/pb/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: IxC4zGBPy/bKlk6k7eJaUyRmLPY= + +Name: system/lib/libnfc_jni.so +SHA1-Digest: verZFXsq3dymYspjes3GIMHhFFc= + +Name: system/etc/security/cacerts/ccc52f49.0 +SHA1-Digest: 8vnIJSGmWI5J6d7i+2tVGHvD5i0= + +Name: system/etc/legal/leaflet/fr/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: Qi85pwb3XeCZvT6iIr9F0yos5F4= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/GPSLocation-based-functio + ns.html +SHA1-Digest: vtIZ+8AOwckFrZsvV6maVx9D9tE= + +Name: system/etc/legal/leaflet/ae/Our-warranty---12.html +SHA1-Digest: wV5ZpT7Cr/jQLn0cfftKs4KkpZM= + +Name: system/etc/legal/leaflet/sr/Publication-number.html +SHA1-Digest: B7sqmEhjNozyLGdMIFLDFSipWqA= + +Name: system/etc/legal/leaflet/ms/Precautions-on-Memory-Card-Use.html +SHA1-Digest: 50mFypWmxm29GV6ef9gdRvaBTx4= + +Name: system/etc/legal/leaflet/sq/Malware.html +SHA1-Digest: AYEkxxobm91NNYYUn5Z/rk22gx4= + +Name: system/media/audio/alarms/surprise.ogg +SHA1-Digest: vvXaridbb7CRViSXDpuHNO2dwT8= + +Name: system/app/usbotg.apk +SHA1-Digest: L49+ACJaltAU99VmTr2H0Wo32/4= + +Name: system/framework/com.sonyericsson.snp.video_impl.jar +SHA1-Digest: 3ARxb41HJGUUZdh9mdlxIpDpBxI= + +Name: system/lib/libspeexresampler.so +SHA1-Digest: QCU1ObIPcsMakYiBncBZCmaIxQ0= + +Name: system/vendor/camera/SOI13BS2.dat +SHA1-Digest: XGngOJowhpi89NVd3OmUIocaIj0= + +Name: system/etc/legal/leaflet/ko/Copyright-and-trademarks---Legal-lea + flet.html +SHA1-Digest: nF6yF99MJR0AE5zrD/vDCbHo0U4= + +Name: system/bin/ds_fmc_appd +SHA1-Digest: LN8RwZhqcCrw3qhr2ITSkNQUn1g= + +Name: system/media/audio/ringtones/Lyra.ogg +SHA1-Digest: Q6Ah/aRwRMmc6v2EzJFIKYxgEmo= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/white_caps_hd1080p_small.jpg +SHA1-Digest: hTMaK9wWBOUf39nKVlTskEeyHRM= + +Name: system/etc/legal/leaflet/en/Service-and-support.html +SHA1-Digest: gAQFioh9BWza29IVvxOoQg9qLj4= + +Name: system/framework/com.sonyericsson.bluetooth.a2dp.jar +SHA1-Digest: v8zTlLznkwXLTd/f7nkALJEIvTI= + +Name: system/etc/legal/leaflet/kk/What-we-will-do.html +SHA1-Digest: 6f5YIH8wWXL0DR1IiU2WDAKsOoI= + +Name: system/bin/dumpsys +SHA1-Digest: 5XxAMjd960eUrGxEa3nb+uDpGgU= + +Name: system/etc/legal/leaflet/cf/Battery.html +SHA1-Digest: 9m5PZDDpAkEFxyONDVNcZtA7OhY= + +Name: system/etc/security/idd_report.pem +SHA1-Digest: toCvPPJ0vYWDcL6JM6wg5/SpbV0= + +Name: system/app/GoogleLoginService.apk +SHA1-Digest: cs/2uKwso6D/5MxcAyDG8SHiQ7g= + +Name: system/lib/libtinyxml.so +SHA1-Digest: oWeeqdpt35OL7qioUxfHISra+ws= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/blue_fog_hd1080p_small.jpg +SHA1-Digest: ArQtO04IKopWl7qpjyB8r+TtMOk= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/experience_flow_white.jpg +SHA1-Digest: nL8ETOnU9Za0gZDTXRrhHmHsGFA= + +Name: system/etc/legal/leaflet/ms/SIM-card.html +SHA1-Digest: Gx4du+ZFoKDgH1xJj+id6YjQRr4= + +Name: system/framework/com.sonyericsson.appextensions.jar +SHA1-Digest: oiEuTR2uPEUxKj0LQ0qNe94ehcQ= + +Name: system/etc/legal/leaflet/bs/Recommendations-for-care-and-safe-us + e-of-our-products.html +SHA1-Digest: Fkw3Akh24eJMQZihPV3Zeg5+mZQ= + +Name: system/media/audio/ui/KeypressDelete.ogg +SHA1-Digest: bZEM7p2jzlwy0AICXAOSF3LdqGw= + +Name: system/lib/libmbe.so +SHA1-Digest: 7I2497ohupgGjXvegW6nh00u51Y= + +Name: system/bin/fota-snoop +SHA1-Digest: kHnDWfZoRGOb8UM6sKvhtwVk+Pc= + +Name: system/etc/legal/leaflet/zh-TW/Antenna.html +SHA1-Digest: 1AkvmgW8Gg5EOihbxWZE9DUxlVo= + +Name: system/etc/security/cacerts/11a09b38.0 +SHA1-Digest: WAuD+V8HYjv2J8L6RjLCvz0/eXI= + +Name: system/etc/permissions/digitalpenutil.xml +SHA1-Digest: iZYf4vCoKrc5ewXMIGff8bGXYzo= + +Name: system/bin/adb +SHA1-Digest: jB8UaROPC734JY/wgtVsjUGXf24= + +Name: system/etc/legal/leaflet/pb/Flight-mode.html +SHA1-Digest: RJO9BjHxVo4VSe9aH4NRxgZ0ovQ= + +Name: system/media/audio/ringtones/Champagne_Edition.ogg +SHA1-Digest: esPrbBKq0PnHjnJrEbosjS+RQV0= + +Name: system/etc/legal/leaflet/ko/Personal-medical-devices.html +SHA1-Digest: xLKZE8sbtWlExRFE3kZD9cJ2Wu8= + +Name: system/etc/legal/leaflet/cf/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: fQU9SiAE/Jm4tWSkDPN0pFX1vG4= + +Name: system/lib/libqc-opt.so +SHA1-Digest: OWrRF7BGirJCfQbktgPqoAIZFnU= + +Name: system/etc/legal/leaflet/iw/Protection-of-personal-information.h + tml +SHA1-Digest: dUV5anauFwu5gMMm9yMYcF+EsUY= + +Name: system/lib/egl/libGLESv2_adreno200.so +SHA1-Digest: RGHBegEwASo6AjhhqsFt9DkVYJ4= + +Name: system/app/SwiqiSettingsService.apk +SHA1-Digest: 46HStvQ2OhGvNckH5UCLileBJJo= + +Name: system/lib/libnjubase2.so +SHA1-Digest: jBD9cj2yY2zVjgG3LtUikpZj/Ik= + +Name: system/etc/legal/leaflet/bs/Battery.html +SHA1-Digest: hxTvht5T/CHYYx61XrVL1qS3H8k= + +Name: system/etc/legal/leaflet/zh-HK/Malware.html +SHA1-Digest: Du/mOubusmYSJxvGpt9b3apGB9U= + +Name: system/media/audio/alarms/Neon.ogg +SHA1-Digest: ppcM88dM+CGp2xxvstBglMuE9Ak= + +Name: system/bin/bugreport +SHA1-Digest: +TrlB/P36eU9TG58nx9x4zDw7sM= + +Name: system/etc/legal/leaflet/in/What-we-will-do.html +SHA1-Digest: gcqMRyknEkB4KA7Zs2xgTmm3RfQ= + +Name: system/lib/libOmxAacEnc.so +SHA1-Digest: 51En2DQqQAtiA6vlXqD7QSa/gBg= + +Name: system/lib/egl/libGLES_android.so +SHA1-Digest: HUTtQ1EhijCHCpjNRiqxHhqEDtc= + +Name: system/lib/libmpqplayer.so +SHA1-Digest: HYPkME6r+7ULEWyA3aVUI3rHYQk= + +Name: system/app/WfdService.apk +SHA1-Digest: Iyaxb/qTpoJsfT1uEIGBY794L2Y= + +Name: system/app/Bluetooth.apk +SHA1-Digest: lfc/qog3DEZ2nw1Q79kpX3822ds= + +Name: system/usr/xt9/SEMC_810_r1-4_ISlsUN_xt9.ldb +SHA1-Digest: 8NGcytV/zBasUKE/trxi5kh2zSw= + +Name: system/framework/com.sonymobile.facebook.proxy.api.jar +SHA1-Digest: NCDxXTee80Vzll/ttb5eZl6NnfU= + +Name: system/app/FBSetupwizard.apk +SHA1-Digest: RAPeGwJ7AzpBeafkKWyY4h/NGNs= + +Name: system/etc/security/cacerts/f58a60fe.0 +SHA1-Digest: A9xf8h5F7uhACk3LuvV2KFpjaR8= + +Name: system/usr/keylayout/AVRCP.kl +SHA1-Digest: XnlMR1We/Ygio+9C2HOkzyIpbjQ= + +Name: system/media/pictures/engadin_01.jpg +SHA1-Digest: K79/RVxGNVdk4gtlYw5KZ7VaJXo= + +Name: system/etc/legal/leaflet/en-PB/Power-supply-(Charger).html +SHA1-Digest: UMjshK+yh0iRQyWvvpUFqojIp28= + +Name: system/etc/legal/leaflet/bs/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: kfJDAcKkxnloG4yrfniqVR8YspM= + +Name: system/etc/customization/content/com/sonyericsson/wallpaperpicke + r/wallpapers/orange_field_hd1080p_small.jpg +SHA1-Digest: Ce1irMrBMYt6HpZyy9fQDqhhR7c= + +Name: system/usr/xt9/SEMC_810_r1-4_ROlsUN_xt9_2.ldb +SHA1-Digest: WrcQhV+iSE447Ecbw49nTwVS0As= + +Name: system/etc/legal/leaflet/en-HK/en-HANT/no-title.html +SHA1-Digest: KWuJIoAWou96O5kbF0P7RFkQ9q8= + +Name: system/vendor/overlay/com.android.browser-res.apk +SHA1-Digest: /lysR4noqnbso/6Vwmr3Py6r66M= + +Name: system/app/NoteWidget.apk +SHA1-Digest: w3EBGe2w8x2uajPpEb7q1DC6rEA= + +Name: system/etc/legal/leaflet/kk/Accessible-SolutionsSpecial-Needs--- + USROW.html +SHA1-Digest: e7o49jc8tzndbqp8urKfbrfzy70= + +Name: system/app/PMSserviceTrigger.apk +SHA1-Digest: WYNnXaN/xSdHHYDUy4cBoczjMLo= + +Name: system/media/audio/ringtones/BentleyDubs.ogg +SHA1-Digest: JgesNoDdGL0iCeazizfQed2ARV0= + +Name: system/etc/legal/leaflet/cf/Guidelines-for-Safe-and-Efficient-Us + e.html +SHA1-Digest: W53h/eYa+quZ7//uxodBqaT1/QY= + +Name: system/etc/legal/leaflet/pb/Sony-Ericsson-Cellular-Phone-Warrant + y-Card---Brazil.html +SHA1-Digest: 87G8jZ7Ze+KL9+l/q3Vf3YkzXGg= + +Name: system/etc/legal/leaflet/vi/For-Devices-Supporting-3D-Viewing-ca + pabilities.html +SHA1-Digest: WxQhUFQc61G0BILMqUkFiHxUDDg= + diff --git a/build/META-INF/com/google/android/update-binary b/build/META-INF/com/google/android/update-binary new file mode 100644 index 00000000000..6db13e593d7 --- /dev/null +++ b/build/META-INF/com/google/android/update-binary @@ -0,0 +1,46 @@ +#!/sbin/sh + +OUTFD=/proc/self/fd/$2; +ZIP="$3"; +DIR=`dirname "$ZIP"`; + +ui_print() { + until [ ! "$1" ]; do + echo -e "ui_print $1\nui_print" > $OUTFD; + shift; + done; +} +show_progress() { echo "progress $1 $2" > $OUTFD; } +set_perm_recursive() { + dirs=$(echo $* | awk '{ print substr($0, index($0,$5)) }'); + for i in $dirs; do + chown -R $1.$2 $i; chown -R $1:$2 $i; + find "$i" -type d -exec chmod $3 {} +; + find "$i" -type f -exec chmod $4 {} +; + done; +} +file_getprop() { grep "^$2" "$1" | cut -d= -f2; } +getprop() { test -e /sbin/getprop && /sbin/getprop $1 || file_getprop /default.prop $1; } +abort() { ui_print "$*"; exit 1; } + +mkdir -p /tmp/anykernel; +cd /tmp/anykernel; +unzip -o "$ZIP"; +ui_print "**********************************"; +ui_print " Nichrome™ X4 Kernel"; +ui_print "**********************************"; +/sbin/busybox mount /system; +ui_print "*)Preparing Files"; +ui_print "**********************************"; +ui_print "*)Running Flashing Script"; +ui_print "**********************************"; +/sbin/busybox mount /system; +/sbin/sh /tmp/anykernel/anykernel.sh; +ui_print "*)ALL Modules are inbuilt"; +ui_print "**********************************"; +ui_print " #GetHeated"; +ui_print "**********************************"; +ui_print " Developed by Mohd Faraz"; +ui_print "**********************************"; +ui_print "*)Kernel installation completed"; +ui_print "**********************************"; diff --git a/build/META-INF/com/google/android/update-script b/build/META-INF/com/google/android/update-script new file mode 100644 index 00000000000..8582673c799 --- /dev/null +++ b/build/META-INF/com/google/android/update-script @@ -0,0 +1 @@ +# Dummy file; update-binary is a shell script. diff --git a/build/anykernel.sh b/build/anykernel.sh new file mode 100644 index 00000000000..369039c0782 --- /dev/null +++ b/build/anykernel.sh @@ -0,0 +1,73 @@ + +# shell variables +block=/dev/block/bootdevice/by-name/boot; + +## end setup + + +## AnyKernel methods (DO NOT CHANGE) +# set up extracted files and directories +project=/tmp/anykernel/project/*; +bin=/tmp/anykernel/tools; +split_img=/tmp/anykernel/split_img; +patch=/tmp/anykernel/patch; +kernel=/tmp/anykernel/zImage; + +chmod -R 755 $bin; +mkdir $split_img; +#ramdisk=/tmp/anykernel/split_img/ramdisk; + +# dump boot and extract ramdisk +dump_boot() { + dd if=$block of=/tmp/anykernel/boot.img; + $bin/unpackbootimg -i /tmp/anykernel/boot.img -o $split_img; + if [ $? != 0 ]; then + ui_print " "; ui_print "Dumping/unpacking image failed. Aborting..."; + echo 1 > /tmp/anykernel/exitcode; exit; + fi; +} + +ramdisk() { + mkdir $ramdisk; + cd $ramdisk; + gzip -dc ../boot.img-ramdisk.gz | cpio -i; + rm -rf ../boot.img-ramdisk.gz; + cp $project $ramdisk; + find . | cpio -o -H newc | gzip > ../boot.img-ramdisk.gz + ui_print "Ramdisk Fixing Done"; + +} + + +# repack ramdisk then build and write image +write_boot() { + cd $split_img; + cmdline=`cat *-cmdline`; + board=`cat *-board`; + base=`cat *-base`; + pagesize=`cat *-pagesize`; + kerneloff=`cat *-kerneloff`; + ramdiskoff=`cat *-ramdiskoff`; + tagsoff=`cat *-tagsoff`; + if [ -f *-second ]; then + second=`ls *-second`; + second="--second $split_img/$second"; + secondoff=`cat *-secondoff`; + secondoff="--second_offset $secondoff"; + fi; + $bin/mkbootimg --kernel $kernel --ramdisk /tmp/anykernel/split_img/boot.img-ramdisk.gz $second --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff $secondoff --tags_offset $tagsoff --output /tmp/anykernel/boot-new.img; + if [ $? != 0 -o `wc -c < /tmp/anykernel/boot-new.img` -gt `wc -c < /tmp/anykernel/boot.img` ]; then + ui_print " "; ui_print "Repacking image failed. Aborting..."; + echo 1 > /tmp/anykernel/exitcode; exit; + fi; + dd if=/tmp/anykernel/boot-new.img of=$block; +} + +dump_boot; + +#ramdisk; + +write_boot; + +## end install + diff --git a/build/tools/mkbootimg b/build/tools/mkbootimg new file mode 100644 index 00000000000..6a5f5a91e7c Binary files /dev/null and b/build/tools/mkbootimg differ diff --git a/build/tools/unpackbootimg b/build/tools/unpackbootimg new file mode 100644 index 00000000000..2845acbcd51 Binary files /dev/null and b/build/tools/unpackbootimg differ diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c index 979cdc81196..6d6d40086aa 100644 --- a/drivers/base/dma-contiguous.c +++ b/drivers/base/dma-contiguous.c @@ -363,7 +363,15 @@ void __init dma_contiguous_reserve(phys_addr_t limit) } if (sel_size) { +<<<<<<< HEAD phys_addr_t base = 0; +======= +#ifdef CONFIG_MACH_T86519A1 + phys_addr_t base = 0x00000000b4c00000; +#else + phys_addr_t base = 0; +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed pr_debug("%s: reserving %ld MiB for global area\n", __func__, (unsigned long)sel_size / SZ_1M); diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 22d0499e4b2..bdc16915103 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -1000,6 +1000,10 @@ static int device_suspend_late(struct device *dev, pm_message_t state) { pm_callback_t callback = NULL; char *info = NULL; +<<<<<<< HEAD +======= + int error = 0; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __pm_runtime_disable(dev, false); @@ -1025,7 +1029,19 @@ static int device_suspend_late(struct device *dev, pm_message_t state) callback = pm_late_early_op(dev->driver->pm, state); } +<<<<<<< HEAD return dpm_run_callback(callback, dev, state, info); +======= + error = dpm_run_callback(callback, dev, state, info); + if (error) + /* + * dpm_resume_early wouldn't be run for this failed device, + * hence enable runtime_pm now + */ + pm_runtime_enable(dev); + + return error; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } /** diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 79715e7fa43..d995cad20c7 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -122,6 +122,18 @@ void wakeup_source_destroy(struct wakeup_source *ws) EXPORT_SYMBOL_GPL(wakeup_source_destroy); /** +<<<<<<< HEAD +======= + * wakeup_source_destroy_cb + * defer processing until all rcu references have expired + */ +static void wakeup_source_destroy_cb(struct rcu_head *head) +{ + wakeup_source_destroy(container_of(head, struct wakeup_source, rcu)); +} + +/** +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * wakeup_source_add - Add given object to the list of wakeup sources. * @ws: Wakeup source object to add to the list. */ @@ -162,6 +174,29 @@ void wakeup_source_remove(struct wakeup_source *ws) EXPORT_SYMBOL_GPL(wakeup_source_remove); /** +<<<<<<< HEAD +======= + * wakeup_source_remove_async - Remove given object from the wakeup sources + * list. + * @ws: Wakeup source object to remove from the list. + * + * Use only for wakeup source objects created with wakeup_source_create(). + * Memory for ws must be freed via rcu. + */ +static void wakeup_source_remove_async(struct wakeup_source *ws) +{ + unsigned long flags; + + if (WARN_ON(!ws)) + return; + + spin_lock_irqsave(&events_lock, flags); + list_del_rcu(&ws->entry); + spin_unlock_irqrestore(&events_lock, flags); +} + +/** +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * wakeup_source_register - Create wakeup source and add it to the list. * @name: Name of the wakeup source to register. */ @@ -184,8 +219,13 @@ EXPORT_SYMBOL_GPL(wakeup_source_register); void wakeup_source_unregister(struct wakeup_source *ws) { if (ws) { +<<<<<<< HEAD wakeup_source_remove(ws); wakeup_source_destroy(ws); +======= + wakeup_source_remove_async(ws); + call_rcu(&ws->rcu, wakeup_source_destroy_cb); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } } EXPORT_SYMBOL_GPL(wakeup_source_unregister); diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index b28e185431b..2574c724574 100644 --- a/drivers/base/regmap/regmap-debugfs.c +++ b/drivers/base/regmap/regmap-debugfs.c @@ -145,7 +145,11 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map, reg_offset = fpos_offset / map->debugfs_tot_len; *pos = c->min + (reg_offset * map->debugfs_tot_len); mutex_unlock(&map->cache_lock); +<<<<<<< HEAD return c->base_reg + reg_offset; +======= + return c->base_reg + (reg_offset * map->reg_stride); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } *pos = c->max; diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index b81ddfea1da..5b63dc390f2 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -105,6 +105,11 @@ source "drivers/block/paride/Kconfig" source "drivers/block/mtip32xx/Kconfig" +<<<<<<< HEAD +======= +source "drivers/block/zram/Kconfig" + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed config BLK_CPQ_DA tristate "Compaq SMART2 support" depends on PCI && VIRT_TO_BUS diff --git a/drivers/block/Makefile b/drivers/block/Makefile index ca07399a8d9..5df12dc193d 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -41,6 +41,10 @@ obj-$(CONFIG_BLK_DEV_RBD) += rbd.o obj-$(CONFIG_BLK_DEV_PCIESSD_MTIP32XX) += mtip32xx/ obj-$(CONFIG_BLK_DEV_RSXX) += rsxx/ +<<<<<<< HEAD +======= +obj-$(CONFIG_ZRAM) += zram/ +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed nvme-y := nvme-core.o nvme-scsi.o swim_mod-y := swim.o swim_asm.o diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig new file mode 100644 index 00000000000..6489c0fd0ea --- /dev/null +++ b/drivers/block/zram/Kconfig @@ -0,0 +1,34 @@ +config ZRAM + tristate "Compressed RAM block device support" + depends on BLOCK && SYSFS && ZSMALLOC + select LZO_COMPRESS + select LZO_DECOMPRESS + default n + help + Creates virtual block devices called /dev/zramX (X = 0, 1, ...). + Pages written to these disks are compressed and stored in memory + itself. These disks allow very fast I/O and compression provides + good amounts of memory savings. + + It has several use cases, for example: /tmp storage, use as swap + disks and maybe many more. + + See zram.txt for more information. + +config ZRAM_LZ4_COMPRESS + bool "Enable LZ4 algorithm support" + depends on ZRAM + select LZ4_COMPRESS + select LZ4_DECOMPRESS + default n + help + This option enables LZ4 compression algorithm support. Compression + algorithm can be changed using `comp_algorithm' device attribute. + +config ZRAM_DEBUG + bool "Compressed RAM block device debug support" + depends on ZRAM + default n + help + This option adds additional debugging code to the compressed + RAM block device driver. diff --git a/drivers/block/zram/Makefile b/drivers/block/zram/Makefile new file mode 100644 index 00000000000..be0763ff57a --- /dev/null +++ b/drivers/block/zram/Makefile @@ -0,0 +1,5 @@ +zram-y := zcomp_lzo.o zcomp.o zram_drv.o + +zram-$(CONFIG_ZRAM_LZ4_COMPRESS) += zcomp_lz4.o + +obj-$(CONFIG_ZRAM) += zram.o diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c new file mode 100644 index 00000000000..f1ff39a3d1c --- /dev/null +++ b/drivers/block/zram/zcomp.c @@ -0,0 +1,353 @@ +/* + * Copyright (C) 2014 Sergey Senozhatsky. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include + +#include "zcomp.h" +#include "zcomp_lzo.h" +#ifdef CONFIG_ZRAM_LZ4_COMPRESS +#include "zcomp_lz4.h" +#endif + +/* + * single zcomp_strm backend + */ +struct zcomp_strm_single { + struct mutex strm_lock; + struct zcomp_strm *zstrm; +}; + +/* + * multi zcomp_strm backend + */ +struct zcomp_strm_multi { + /* protect strm list */ + spinlock_t strm_lock; + /* max possible number of zstrm streams */ + int max_strm; + /* number of available zstrm streams */ + int avail_strm; + /* list of available strms */ + struct list_head idle_strm; + wait_queue_head_t strm_wait; +}; + +static struct zcomp_backend *backends[] = { + &zcomp_lzo, +#ifdef CONFIG_ZRAM_LZ4_COMPRESS + &zcomp_lz4, +#endif + NULL +}; + +static struct zcomp_backend *find_backend(const char *compress) +{ + int i = 0; + while (backends[i]) { + if (sysfs_streq(compress, backends[i]->name)) + break; + i++; + } + return backends[i]; +} + +static void zcomp_strm_free(struct zcomp *comp, struct zcomp_strm *zstrm) +{ + if (zstrm->private) + comp->backend->destroy(zstrm->private); + free_pages((unsigned long)zstrm->buffer, 1); + kfree(zstrm); +} + +/* + * allocate new zcomp_strm structure with ->private initialized by + * backend, return NULL on error + */ +static struct zcomp_strm *zcomp_strm_alloc(struct zcomp *comp) +{ + struct zcomp_strm *zstrm = kmalloc(sizeof(*zstrm), GFP_KERNEL); + if (!zstrm) + return NULL; + + zstrm->private = comp->backend->create(); + /* + * allocate 2 pages. 1 for compressed data, plus 1 extra for the + * case when compressed size is larger than the original one + */ + zstrm->buffer = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 1); + if (!zstrm->private || !zstrm->buffer) { + zcomp_strm_free(comp, zstrm); + zstrm = NULL; + } + return zstrm; +} + +/* + * get idle zcomp_strm or wait until other process release + * (zcomp_strm_release()) one for us + */ +static struct zcomp_strm *zcomp_strm_multi_find(struct zcomp *comp) +{ + struct zcomp_strm_multi *zs = comp->stream; + struct zcomp_strm *zstrm; + + while (1) { + spin_lock(&zs->strm_lock); + if (!list_empty(&zs->idle_strm)) { + zstrm = list_entry(zs->idle_strm.next, + struct zcomp_strm, list); + list_del(&zstrm->list); + spin_unlock(&zs->strm_lock); + return zstrm; + } + /* zstrm streams limit reached, wait for idle stream */ + if (zs->avail_strm >= zs->max_strm) { + spin_unlock(&zs->strm_lock); + wait_event(zs->strm_wait, !list_empty(&zs->idle_strm)); + continue; + } + /* allocate new zstrm stream */ + zs->avail_strm++; + spin_unlock(&zs->strm_lock); + + zstrm = zcomp_strm_alloc(comp); + if (!zstrm) { + spin_lock(&zs->strm_lock); + zs->avail_strm--; + spin_unlock(&zs->strm_lock); + wait_event(zs->strm_wait, !list_empty(&zs->idle_strm)); + continue; + } + break; + } + return zstrm; +} + +/* add stream back to idle list and wake up waiter or free the stream */ +static void zcomp_strm_multi_release(struct zcomp *comp, struct zcomp_strm *zstrm) +{ + struct zcomp_strm_multi *zs = comp->stream; + + spin_lock(&zs->strm_lock); + if (zs->avail_strm <= zs->max_strm) { + list_add(&zstrm->list, &zs->idle_strm); + spin_unlock(&zs->strm_lock); + wake_up(&zs->strm_wait); + return; + } + + zs->avail_strm--; + spin_unlock(&zs->strm_lock); + zcomp_strm_free(comp, zstrm); +} + +/* change max_strm limit */ +static bool zcomp_strm_multi_set_max_streams(struct zcomp *comp, int num_strm) +{ + struct zcomp_strm_multi *zs = comp->stream; + struct zcomp_strm *zstrm; + + spin_lock(&zs->strm_lock); + zs->max_strm = num_strm; + /* + * if user has lowered the limit and there are idle streams, + * immediately free as much streams (and memory) as we can. + */ + while (zs->avail_strm > num_strm && !list_empty(&zs->idle_strm)) { + zstrm = list_entry(zs->idle_strm.next, + struct zcomp_strm, list); + list_del(&zstrm->list); + zcomp_strm_free(comp, zstrm); + zs->avail_strm--; + } + spin_unlock(&zs->strm_lock); + return true; +} + +static void zcomp_strm_multi_destroy(struct zcomp *comp) +{ + struct zcomp_strm_multi *zs = comp->stream; + struct zcomp_strm *zstrm; + + while (!list_empty(&zs->idle_strm)) { + zstrm = list_entry(zs->idle_strm.next, + struct zcomp_strm, list); + list_del(&zstrm->list); + zcomp_strm_free(comp, zstrm); + } + kfree(zs); +} + +static int zcomp_strm_multi_create(struct zcomp *comp, int max_strm) +{ + struct zcomp_strm *zstrm; + struct zcomp_strm_multi *zs; + + comp->destroy = zcomp_strm_multi_destroy; + comp->strm_find = zcomp_strm_multi_find; + comp->strm_release = zcomp_strm_multi_release; + comp->set_max_streams = zcomp_strm_multi_set_max_streams; + zs = kmalloc(sizeof(struct zcomp_strm_multi), GFP_KERNEL); + if (!zs) + return -ENOMEM; + + comp->stream = zs; + spin_lock_init(&zs->strm_lock); + INIT_LIST_HEAD(&zs->idle_strm); + init_waitqueue_head(&zs->strm_wait); + zs->max_strm = max_strm; + zs->avail_strm = 1; + + zstrm = zcomp_strm_alloc(comp); + if (!zstrm) { + kfree(zs); + return -ENOMEM; + } + list_add(&zstrm->list, &zs->idle_strm); + return 0; +} + +static struct zcomp_strm *zcomp_strm_single_find(struct zcomp *comp) +{ + struct zcomp_strm_single *zs = comp->stream; + mutex_lock(&zs->strm_lock); + return zs->zstrm; +} + +static void zcomp_strm_single_release(struct zcomp *comp, + struct zcomp_strm *zstrm) +{ + struct zcomp_strm_single *zs = comp->stream; + mutex_unlock(&zs->strm_lock); +} + +static bool zcomp_strm_single_set_max_streams(struct zcomp *comp, int num_strm) +{ + /* zcomp_strm_single support only max_comp_streams == 1 */ + return false; +} + +static void zcomp_strm_single_destroy(struct zcomp *comp) +{ + struct zcomp_strm_single *zs = comp->stream; + zcomp_strm_free(comp, zs->zstrm); + kfree(zs); +} + +static int zcomp_strm_single_create(struct zcomp *comp) +{ + struct zcomp_strm_single *zs; + + comp->destroy = zcomp_strm_single_destroy; + comp->strm_find = zcomp_strm_single_find; + comp->strm_release = zcomp_strm_single_release; + comp->set_max_streams = zcomp_strm_single_set_max_streams; + zs = kmalloc(sizeof(struct zcomp_strm_single), GFP_KERNEL); + if (!zs) + return -ENOMEM; + + comp->stream = zs; + mutex_init(&zs->strm_lock); + zs->zstrm = zcomp_strm_alloc(comp); + if (!zs->zstrm) { + kfree(zs); + return -ENOMEM; + } + return 0; +} + +/* show available compressors */ +ssize_t zcomp_available_show(const char *comp, char *buf) +{ + ssize_t sz = 0; + int i = 0; + + while (backends[i]) { + if (sysfs_streq(comp, backends[i]->name)) + sz += scnprintf(buf + sz, PAGE_SIZE - sz - 2, + "[%s] ", backends[i]->name); + else + sz += scnprintf(buf + sz, PAGE_SIZE - sz - 2, + "%s ", backends[i]->name); + i++; + } + sz += scnprintf(buf + sz, PAGE_SIZE - sz, "\n"); + return sz; +} + +bool zcomp_set_max_streams(struct zcomp *comp, int num_strm) +{ + return comp->set_max_streams(comp, num_strm); +} + +struct zcomp_strm *zcomp_strm_find(struct zcomp *comp) +{ + return comp->strm_find(comp); +} + +void zcomp_strm_release(struct zcomp *comp, struct zcomp_strm *zstrm) +{ + comp->strm_release(comp, zstrm); +} + +int zcomp_compress(struct zcomp *comp, struct zcomp_strm *zstrm, + const unsigned char *src, size_t *dst_len) +{ + return comp->backend->compress(src, zstrm->buffer, dst_len, + zstrm->private); +} + +int zcomp_decompress(struct zcomp *comp, const unsigned char *src, + size_t src_len, unsigned char *dst) +{ + return comp->backend->decompress(src, src_len, dst); +} + +void zcomp_destroy(struct zcomp *comp) +{ + comp->destroy(comp); + kfree(comp); +} + +/* + * search available compressors for requested algorithm. + * allocate new zcomp and initialize it. return compressing + * backend pointer or ERR_PTR if things went bad. ERR_PTR(-EINVAL) + * if requested algorithm is not supported, ERR_PTR(-ENOMEM) in + * case of allocation error. + */ +struct zcomp *zcomp_create(const char *compress, int max_strm) +{ + struct zcomp *comp; + struct zcomp_backend *backend; + + backend = find_backend(compress); + if (!backend) + return ERR_PTR(-EINVAL); + + comp = kzalloc(sizeof(struct zcomp), GFP_KERNEL); + if (!comp) + return ERR_PTR(-ENOMEM); + + comp->backend = backend; + if (max_strm > 1) + zcomp_strm_multi_create(comp, max_strm); + else + zcomp_strm_single_create(comp); + if (!comp->stream) { + kfree(comp); + return ERR_PTR(-ENOMEM); + } + return comp; +} diff --git a/drivers/block/zram/zcomp.h b/drivers/block/zram/zcomp.h new file mode 100644 index 00000000000..c59d1fca72c --- /dev/null +++ b/drivers/block/zram/zcomp.h @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2014 Sergey Senozhatsky. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _ZCOMP_H_ +#define _ZCOMP_H_ + +#include + +struct zcomp_strm { + /* compression/decompression buffer */ + void *buffer; + /* + * The private data of the compression stream, only compression + * stream backend can touch this (e.g. compression algorithm + * working memory) + */ + void *private; + /* used in multi stream backend, protected by backend strm_lock */ + struct list_head list; +}; + +/* static compression backend */ +struct zcomp_backend { + int (*compress)(const unsigned char *src, unsigned char *dst, + size_t *dst_len, void *private); + + int (*decompress)(const unsigned char *src, size_t src_len, + unsigned char *dst); + + void *(*create)(void); + void (*destroy)(void *private); + + const char *name; +}; + +/* dynamic per-device compression frontend */ +struct zcomp { + void *stream; + struct zcomp_backend *backend; + + struct zcomp_strm *(*strm_find)(struct zcomp *comp); + void (*strm_release)(struct zcomp *comp, struct zcomp_strm *zstrm); + bool (*set_max_streams)(struct zcomp *comp, int num_strm); + void (*destroy)(struct zcomp *comp); +}; + +ssize_t zcomp_available_show(const char *comp, char *buf); + +struct zcomp *zcomp_create(const char *comp, int max_strm); +void zcomp_destroy(struct zcomp *comp); + +struct zcomp_strm *zcomp_strm_find(struct zcomp *comp); +void zcomp_strm_release(struct zcomp *comp, struct zcomp_strm *zstrm); + +int zcomp_compress(struct zcomp *comp, struct zcomp_strm *zstrm, + const unsigned char *src, size_t *dst_len); + +int zcomp_decompress(struct zcomp *comp, const unsigned char *src, + size_t src_len, unsigned char *dst); + +bool zcomp_set_max_streams(struct zcomp *comp, int num_strm); +#endif /* _ZCOMP_H_ */ diff --git a/drivers/block/zram/zcomp_lz4.c b/drivers/block/zram/zcomp_lz4.c new file mode 100644 index 00000000000..f2afb7e988c --- /dev/null +++ b/drivers/block/zram/zcomp_lz4.c @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2014 Sergey Senozhatsky. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include +#include +#include + +#include "zcomp_lz4.h" + +static void *zcomp_lz4_create(void) +{ + return kzalloc(LZ4_MEM_COMPRESS, GFP_KERNEL); +} + +static void zcomp_lz4_destroy(void *private) +{ + kfree(private); +} + +static int zcomp_lz4_compress(const unsigned char *src, unsigned char *dst, + size_t *dst_len, void *private) +{ + /* return : Success if return 0 */ + return lz4_compress(src, PAGE_SIZE, dst, dst_len, private); +} + +static int zcomp_lz4_decompress(const unsigned char *src, size_t src_len, + unsigned char *dst) +{ + size_t dst_len = PAGE_SIZE; + /* return : Success if return 0 */ + return lz4_decompress_unknownoutputsize(src, src_len, dst, &dst_len); +} + +struct zcomp_backend zcomp_lz4 = { + .compress = zcomp_lz4_compress, + .decompress = zcomp_lz4_decompress, + .create = zcomp_lz4_create, + .destroy = zcomp_lz4_destroy, + .name = "lz4", +}; diff --git a/drivers/block/zram/zcomp_lz4.h b/drivers/block/zram/zcomp_lz4.h new file mode 100644 index 00000000000..60613fb29dd --- /dev/null +++ b/drivers/block/zram/zcomp_lz4.h @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2014 Sergey Senozhatsky. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _ZCOMP_LZ4_H_ +#define _ZCOMP_LZ4_H_ + +#include "zcomp.h" + +extern struct zcomp_backend zcomp_lz4; + +#endif /* _ZCOMP_LZ4_H_ */ diff --git a/drivers/block/zram/zcomp_lzo.c b/drivers/block/zram/zcomp_lzo.c new file mode 100644 index 00000000000..da1bc47d588 --- /dev/null +++ b/drivers/block/zram/zcomp_lzo.c @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2014 Sergey Senozhatsky. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include +#include +#include + +#include "zcomp_lzo.h" + +static void *lzo_create(void) +{ + return kzalloc(LZO1X_MEM_COMPRESS, GFP_KERNEL); +} + +static void lzo_destroy(void *private) +{ + kfree(private); +} + +static int lzo_compress(const unsigned char *src, unsigned char *dst, + size_t *dst_len, void *private) +{ + int ret = lzo1x_1_compress(src, PAGE_SIZE, dst, dst_len, private); + return ret == LZO_E_OK ? 0 : ret; +} + +static int lzo_decompress(const unsigned char *src, size_t src_len, + unsigned char *dst) +{ + size_t dst_len = PAGE_SIZE; + int ret = lzo1x_decompress_safe(src, src_len, dst, &dst_len); + return ret == LZO_E_OK ? 0 : ret; +} + +struct zcomp_backend zcomp_lzo = { + .compress = lzo_compress, + .decompress = lzo_decompress, + .create = lzo_create, + .destroy = lzo_destroy, + .name = "lzo", +}; diff --git a/drivers/block/zram/zcomp_lzo.h b/drivers/block/zram/zcomp_lzo.h new file mode 100644 index 00000000000..128c5807fa1 --- /dev/null +++ b/drivers/block/zram/zcomp_lzo.h @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2014 Sergey Senozhatsky. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _ZCOMP_LZO_H_ +#define _ZCOMP_LZO_H_ + +#include "zcomp.h" + +extern struct zcomp_backend zcomp_lzo; + +#endif /* _ZCOMP_LZO_H_ */ diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c new file mode 100644 index 00000000000..f9605860f86 --- /dev/null +++ b/drivers/block/zram/zram_drv.c @@ -0,0 +1,1278 @@ +/* + * Compressed RAM block device + * + * Copyright (C) 2008, 2009, 2010 Nitin Gupta + * 2012, 2013 Minchan Kim + * + * This code is released using a dual license strategy: BSD/GPL + * You can choose the licence that better fits your requirements. + * + * Released under the terms of 3-clause BSD License + * Released under the terms of GNU General Public License Version 2.0 + * + */ + +#define KMSG_COMPONENT "zram" +#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt + +#ifdef CONFIG_ZRAM_DEBUG +#define DEBUG +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "zram_drv.h" + +/* Globals */ +static int zram_major; +static struct zram *zram_devices; +static const char *default_compressor = "lzo"; + +/* Module params (documentation at end) */ +static unsigned int num_devices = 1; + +static inline void deprecated_attr_warn(const char *name) +{ + pr_warn_once("%d (%s) Attribute %s (and others) will be removed. %s\n", + task_pid_nr(current), + current->comm, + name, + "See zram documentation."); +} + +#define ZRAM_ATTR_RO(name) \ +static ssize_t name##_show(struct device *d, \ + struct device_attribute *attr, char *b) \ +{ \ + struct zram *zram = dev_to_zram(d); \ + \ + deprecated_attr_warn(__stringify(name)); \ + return scnprintf(b, PAGE_SIZE, "%llu\n", \ + (u64)atomic64_read(&zram->stats.name)); \ +} \ +static DEVICE_ATTR_RO(name); + +static inline bool init_done(struct zram *zram) +{ + return zram->disksize; +} + +static inline struct zram *dev_to_zram(struct device *dev) +{ + return (struct zram *)dev_to_disk(dev)->private_data; +} + +static ssize_t compact_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t len) +{ + unsigned long nr_migrated; + struct zram *zram = dev_to_zram(dev); + struct zram_meta *meta; + + down_read(&zram->init_lock); + if (!init_done(zram)) { + up_read(&zram->init_lock); + return -EINVAL; + } + + meta = zram->meta; + nr_migrated = zs_compact(meta->mem_pool); + atomic64_add(nr_migrated, &zram->stats.num_migrated); + up_read(&zram->init_lock); + + return len; +} + +static ssize_t disksize_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct zram *zram = dev_to_zram(dev); + + return scnprintf(buf, PAGE_SIZE, "%llu\n", zram->disksize); +} + +static ssize_t initstate_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + u32 val; + struct zram *zram = dev_to_zram(dev); + + down_read(&zram->init_lock); + val = init_done(zram); + up_read(&zram->init_lock); + + return scnprintf(buf, PAGE_SIZE, "%u\n", val); +} + +static ssize_t orig_data_size_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct zram *zram = dev_to_zram(dev); + + deprecated_attr_warn("orig_data_size"); + return scnprintf(buf, PAGE_SIZE, "%llu\n", + (u64)(atomic64_read(&zram->stats.pages_stored)) << PAGE_SHIFT); +} + +static ssize_t mem_used_total_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + u64 val = 0; + struct zram *zram = dev_to_zram(dev); + + deprecated_attr_warn("mem_used_total"); + down_read(&zram->init_lock); + if (init_done(zram)) { + struct zram_meta *meta = zram->meta; + val = zs_get_total_pages(meta->mem_pool); + } + up_read(&zram->init_lock); + + return scnprintf(buf, PAGE_SIZE, "%llu\n", val << PAGE_SHIFT); +} + +static ssize_t max_comp_streams_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int val; + struct zram *zram = dev_to_zram(dev); + + down_read(&zram->init_lock); + val = zram->max_comp_streams; + up_read(&zram->init_lock); + + return scnprintf(buf, PAGE_SIZE, "%d\n", val); +} + +static ssize_t mem_limit_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + u64 val; + struct zram *zram = dev_to_zram(dev); + + deprecated_attr_warn("mem_limit"); + down_read(&zram->init_lock); + val = zram->limit_pages; + up_read(&zram->init_lock); + + return scnprintf(buf, PAGE_SIZE, "%llu\n", val << PAGE_SHIFT); +} + +static ssize_t mem_limit_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t len) +{ + u64 limit; + char *tmp; + struct zram *zram = dev_to_zram(dev); + + limit = memparse(buf, &tmp); + if (buf == tmp) /* no chars parsed, invalid input */ + return -EINVAL; + + down_write(&zram->init_lock); + zram->limit_pages = PAGE_ALIGN(limit) >> PAGE_SHIFT; + up_write(&zram->init_lock); + + return len; +} + +static ssize_t mem_used_max_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + u64 val = 0; + struct zram *zram = dev_to_zram(dev); + + deprecated_attr_warn("mem_used_max"); + down_read(&zram->init_lock); + if (init_done(zram)) + val = atomic_long_read(&zram->stats.max_used_pages); + up_read(&zram->init_lock); + + return scnprintf(buf, PAGE_SIZE, "%llu\n", val << PAGE_SHIFT); +} + +static ssize_t mem_used_max_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t len) +{ + int err; + unsigned long val; + struct zram *zram = dev_to_zram(dev); + + err = kstrtoul(buf, 10, &val); + if (err || val != 0) + return -EINVAL; + + down_read(&zram->init_lock); + if (init_done(zram)) { + struct zram_meta *meta = zram->meta; + atomic_long_set(&zram->stats.max_used_pages, + zs_get_total_pages(meta->mem_pool)); + } + up_read(&zram->init_lock); + + return len; +} + +static ssize_t max_comp_streams_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t len) +{ + int num; + struct zram *zram = dev_to_zram(dev); + int ret; + + ret = kstrtoint(buf, 0, &num); + if (ret < 0) + return ret; + if (num < 1) + return -EINVAL; + + down_write(&zram->init_lock); + if (init_done(zram)) { + if (!zcomp_set_max_streams(zram->comp, num)) { + pr_info("Cannot change max compression streams\n"); + ret = -EINVAL; + goto out; + } + } + + zram->max_comp_streams = num; + ret = len; +out: + up_write(&zram->init_lock); + return ret; +} + +static ssize_t comp_algorithm_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + size_t sz; + struct zram *zram = dev_to_zram(dev); + + down_read(&zram->init_lock); + sz = zcomp_available_show(zram->compressor, buf); + up_read(&zram->init_lock); + + return sz; +} + +static ssize_t comp_algorithm_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t len) +{ + struct zram *zram = dev_to_zram(dev); + down_write(&zram->init_lock); + if (init_done(zram)) { + up_write(&zram->init_lock); + pr_info("Can't change algorithm for initialized device\n"); + return -EBUSY; + } + strlcpy(zram->compressor, buf, sizeof(zram->compressor)); + up_write(&zram->init_lock); + return len; +} + +/* flag operations needs meta->tb_lock */ +static int zram_test_flag(struct zram_meta *meta, u32 index, + enum zram_pageflags flag) +{ + return meta->table[index].value & BIT(flag); +} + +static void zram_set_flag(struct zram_meta *meta, u32 index, + enum zram_pageflags flag) +{ + meta->table[index].value |= BIT(flag); +} + +static void zram_clear_flag(struct zram_meta *meta, u32 index, + enum zram_pageflags flag) +{ + meta->table[index].value &= ~BIT(flag); +} + +static size_t zram_get_obj_size(struct zram_meta *meta, u32 index) +{ + return meta->table[index].value & (BIT(ZRAM_FLAG_SHIFT) - 1); +} + +static void zram_set_obj_size(struct zram_meta *meta, + u32 index, size_t size) +{ + unsigned long flags = meta->table[index].value >> ZRAM_FLAG_SHIFT; + + meta->table[index].value = (flags << ZRAM_FLAG_SHIFT) | size; +} + +static inline int is_partial_io(struct bio_vec *bvec) +{ + return bvec->bv_len != PAGE_SIZE; +} + +/* + * Check if request is within bounds and aligned on zram logical blocks. + */ +static inline int valid_io_request(struct zram *zram, + sector_t start, unsigned int size) +{ + u64 end, bound; + + /* unaligned request */ + if (unlikely(start & (ZRAM_SECTOR_PER_LOGICAL_BLOCK - 1))) + return 0; + if (unlikely(size & (ZRAM_LOGICAL_BLOCK_SIZE - 1))) + return 0; + + end = start + (size >> SECTOR_SHIFT); + bound = zram->disksize >> SECTOR_SHIFT; + /* out of range range */ + if (unlikely(start >= bound || end > bound || start > end)) + return 0; + + /* I/O request is valid */ + return 1; +} + +static void zram_meta_free(struct zram_meta *meta, u64 disksize) +{ + size_t num_pages = disksize >> PAGE_SHIFT; + size_t index; + + /* Free all pages that are still in this zram device */ + for (index = 0; index < num_pages; index++) { + unsigned long handle = meta->table[index].handle; + + if (!handle) + continue; + + zs_free(meta->mem_pool, handle); + } + + zs_destroy_pool(meta->mem_pool); + vfree(meta->table); + kfree(meta); +} + +static struct zram_meta *zram_meta_alloc(int device_id, u64 disksize) +{ + size_t num_pages; + char pool_name[8]; + struct zram_meta *meta = kmalloc(sizeof(*meta), GFP_KERNEL); + + if (!meta) + return NULL; + + num_pages = disksize >> PAGE_SHIFT; + meta->table = vzalloc(num_pages * sizeof(*meta->table)); + if (!meta->table) { + pr_err("Error allocating zram address table\n"); + goto out_error; + } + + snprintf(pool_name, sizeof(pool_name), "zram%d", device_id); + meta->mem_pool = zs_create_pool(pool_name, GFP_NOIO | __GFP_HIGHMEM); + if (!meta->mem_pool) { + pr_err("Error creating memory pool\n"); + goto out_error; + } + + return meta; + +out_error: + vfree(meta->table); + kfree(meta); + return NULL; +} + +static inline bool zram_meta_get(struct zram *zram) +{ + if (atomic_inc_not_zero(&zram->refcount)) + return true; + return false; +} + +static inline void zram_meta_put(struct zram *zram) +{ + atomic_dec(&zram->refcount); +} + +static void update_position(u32 *index, int *offset, struct bio_vec *bvec) +{ + if (*offset + bvec->bv_len >= PAGE_SIZE) + (*index)++; + *offset = (*offset + bvec->bv_len) % PAGE_SIZE; +} + +static int page_zero_filled(void *ptr) +{ + unsigned int pos; + unsigned long *page; + + page = (unsigned long *)ptr; + + for (pos = 0; pos != PAGE_SIZE / sizeof(*page); pos++) { + if (page[pos]) + return 0; + } + + return 1; +} + +static void handle_zero_page(struct bio_vec *bvec) +{ + struct page *page = bvec->bv_page; + void *user_mem; + + user_mem = kmap_atomic(page); + if (is_partial_io(bvec)) + memset(user_mem + bvec->bv_offset, 0, bvec->bv_len); + else + clear_page(user_mem); + kunmap_atomic(user_mem); + + flush_dcache_page(page); +} + + +/* + * To protect concurrent access to the same index entry, + * caller should hold this table index entry's bit_spinlock to + * indicate this index entry is accessing. + */ +static void zram_free_page(struct zram *zram, size_t index) +{ + struct zram_meta *meta = zram->meta; + unsigned long handle = meta->table[index].handle; + + if (unlikely(!handle)) { + /* + * No memory is allocated for zero filled pages. + * Simply clear zero page flag. + */ + if (zram_test_flag(meta, index, ZRAM_ZERO)) { + zram_clear_flag(meta, index, ZRAM_ZERO); + atomic64_dec(&zram->stats.zero_pages); + } + return; + } + + zs_free(meta->mem_pool, handle); + + atomic64_sub(zram_get_obj_size(meta, index), + &zram->stats.compr_data_size); + atomic64_dec(&zram->stats.pages_stored); + + meta->table[index].handle = 0; + zram_set_obj_size(meta, index, 0); +} + +static int zram_decompress_page(struct zram *zram, char *mem, u32 index) +{ + int ret = 0; + unsigned char *cmem; + struct zram_meta *meta = zram->meta; + unsigned long handle; + size_t size; + + bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); + handle = meta->table[index].handle; + size = zram_get_obj_size(meta, index); + + if (!handle || zram_test_flag(meta, index, ZRAM_ZERO)) { + bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); + clear_page(mem); + return 0; + } + + cmem = zs_map_object(meta->mem_pool, handle, ZS_MM_RO); + if (size == PAGE_SIZE) + copy_page(mem, cmem); + else + ret = zcomp_decompress(zram->comp, cmem, size, mem); + zs_unmap_object(meta->mem_pool, handle); + bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); + + /* Should NEVER happen. Return bio error if it does. */ + if (unlikely(ret)) { + pr_err("Decompression failed! err=%d, page=%u\n", ret, index); + return ret; + } + + return 0; +} + +static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec, + u32 index, int offset) +{ + int ret; + struct page *page; + unsigned char *user_mem, *uncmem = NULL; + struct zram_meta *meta = zram->meta; + page = bvec->bv_page; + + bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); + if (unlikely(!meta->table[index].handle) || + zram_test_flag(meta, index, ZRAM_ZERO)) { + bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); + handle_zero_page(bvec); + return 0; + } + bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); + + if (is_partial_io(bvec)) + /* Use a temporary buffer to decompress the page */ + uncmem = kmalloc(PAGE_SIZE, GFP_NOIO); + + user_mem = kmap_atomic(page); + if (!is_partial_io(bvec)) + uncmem = user_mem; + + if (!uncmem) { + pr_info("Unable to allocate temp memory\n"); + ret = -ENOMEM; + goto out_cleanup; + } + + ret = zram_decompress_page(zram, uncmem, index); + /* Should NEVER happen. Return bio error if it does. */ + if (unlikely(ret)) + goto out_cleanup; + + if (is_partial_io(bvec)) + memcpy(user_mem + bvec->bv_offset, uncmem + offset, + bvec->bv_len); + + flush_dcache_page(page); + ret = 0; +out_cleanup: + kunmap_atomic(user_mem); + if (is_partial_io(bvec)) + kfree(uncmem); + return ret; +} + +static inline void update_used_max(struct zram *zram, + const unsigned long pages) +{ + unsigned long old_max, cur_max; + + old_max = atomic_long_read(&zram->stats.max_used_pages); + + do { + cur_max = old_max; + if (pages > cur_max) + old_max = atomic_long_cmpxchg( + &zram->stats.max_used_pages, cur_max, pages); + } while (old_max != cur_max); +} + +static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, + int offset) +{ + int ret = 0; + size_t clen; + unsigned long handle; + struct page *page; + unsigned char *user_mem, *cmem, *src, *uncmem = NULL; + struct zram_meta *meta = zram->meta; + struct zcomp_strm *zstrm; + bool locked = false; + unsigned long alloced_pages; + + page = bvec->bv_page; + if (is_partial_io(bvec)) { + /* + * This is a partial IO. We need to read the full page + * before to write the changes. + */ + uncmem = kmalloc(PAGE_SIZE, GFP_NOIO); + if (!uncmem) { + ret = -ENOMEM; + goto out; + } + ret = zram_decompress_page(zram, uncmem, index); + if (ret) + goto out; + } + + zstrm = zcomp_strm_find(zram->comp); + locked = true; + user_mem = kmap_atomic(page); + + if (is_partial_io(bvec)) { + memcpy(uncmem + offset, user_mem + bvec->bv_offset, + bvec->bv_len); + kunmap_atomic(user_mem); + user_mem = NULL; + } else { + uncmem = user_mem; + } + + if (page_zero_filled(uncmem)) { + if (user_mem) + kunmap_atomic(user_mem); + /* Free memory associated with this sector now. */ + bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); + zram_free_page(zram, index); + zram_set_flag(meta, index, ZRAM_ZERO); + bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); + + atomic64_inc(&zram->stats.zero_pages); + ret = 0; + goto out; + } + + ret = zcomp_compress(zram->comp, zstrm, uncmem, &clen); + if (!is_partial_io(bvec)) { + kunmap_atomic(user_mem); + user_mem = NULL; + uncmem = NULL; + } + + if (unlikely(ret)) { + pr_err("Compression failed! err=%d\n", ret); + goto out; + } + src = zstrm->buffer; + if (unlikely(clen > max_zpage_size)) { + clen = PAGE_SIZE; + if (is_partial_io(bvec)) + src = uncmem; + } + + handle = zs_malloc(meta->mem_pool, clen); + if (!handle) { + pr_info("Error allocating memory for compressed page: %u, size=%zu\n", + index, clen); + ret = -ENOMEM; + goto out; + } + + alloced_pages = zs_get_total_pages(meta->mem_pool); + if (zram->limit_pages && alloced_pages > zram->limit_pages) { + zs_free(meta->mem_pool, handle); + ret = -ENOMEM; + goto out; + } + + update_used_max(zram, alloced_pages); + + cmem = zs_map_object(meta->mem_pool, handle, ZS_MM_WO); + + if ((clen == PAGE_SIZE) && !is_partial_io(bvec)) { + src = kmap_atomic(page); + copy_page(cmem, src); + kunmap_atomic(src); + } else { + memcpy(cmem, src, clen); + } + + zcomp_strm_release(zram->comp, zstrm); + locked = false; + zs_unmap_object(meta->mem_pool, handle); + + /* + * Free memory associated with this sector + * before overwriting unused sectors. + */ + bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); + zram_free_page(zram, index); + + meta->table[index].handle = handle; + zram_set_obj_size(meta, index, clen); + bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); + + /* Update stats */ + atomic64_add(clen, &zram->stats.compr_data_size); + atomic64_inc(&zram->stats.pages_stored); +out: + if (locked) + zcomp_strm_release(zram->comp, zstrm); + if (is_partial_io(bvec)) + kfree(uncmem); + return ret; +} + +static int zram_bvec_rw(struct zram *zram, struct bio_vec *bvec, u32 index, + int offset, int rw) +{ + unsigned long start_time = jiffies; + int ret; + + generic_start_io_acct(rw, bvec->bv_len >> SECTOR_SHIFT, + &zram->disk->part0); + + if (rw == READ) { + atomic64_inc(&zram->stats.num_reads); + ret = zram_bvec_read(zram, bvec, index, offset); + } else { + atomic64_inc(&zram->stats.num_writes); + ret = zram_bvec_write(zram, bvec, index, offset); + } + + generic_end_io_acct(rw, &zram->disk->part0, start_time); + + if (unlikely(ret)) { + if (rw == READ) + atomic64_inc(&zram->stats.failed_reads); + else + atomic64_inc(&zram->stats.failed_writes); + } + + return ret; +} + +/* + * zram_bio_discard - handler on discard request + * @index: physical block index in PAGE_SIZE units + * @offset: byte offset within physical block + */ +static void zram_bio_discard(struct zram *zram, u32 index, + int offset, struct bio *bio) +{ + size_t n = bio->bi_size; + struct zram_meta *meta = zram->meta; + + /* + * zram manages data in physical block size units. Because logical block + * size isn't identical with physical block size on some arch, we + * could get a discard request pointing to a specific offset within a + * certain physical block. Although we can handle this request by + * reading that physiclal block and decompressing and partially zeroing + * and re-compressing and then re-storing it, this isn't reasonable + * because our intent with a discard request is to save memory. So + * skipping this logical block is appropriate here. + */ + if (offset) { + if (n <= (PAGE_SIZE - offset)) + return; + + n -= (PAGE_SIZE - offset); + index++; + } + + while (n >= PAGE_SIZE) { + bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); + zram_free_page(zram, index); + bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); + atomic64_inc(&zram->stats.notify_free); + index++; + n -= PAGE_SIZE; + } +} + +static void zram_reset_device(struct zram *zram) +{ + struct zram_meta *meta; + struct zcomp *comp; + u64 disksize; + + down_write(&zram->init_lock); + + zram->limit_pages = 0; + + if (!init_done(zram)) { + up_write(&zram->init_lock); + return; + } + + meta = zram->meta; + comp = zram->comp; + disksize = zram->disksize; + /* + * Refcount will go down to 0 eventually and r/w handler + * cannot handle further I/O so it will bail out by + * check zram_meta_get. + */ + zram_meta_put(zram); + /* + * We want to free zram_meta in process context to avoid + * deadlock between reclaim path and any other locks. + */ + wait_event(zram->io_done, atomic_read(&zram->refcount) == 0); + + /* Reset stats */ + memset(&zram->stats, 0, sizeof(zram->stats)); + zram->disksize = 0; + zram->max_comp_streams = 1; + + set_capacity(zram->disk, 0); + part_stat_set_all(&zram->disk->part0, 0); + + up_write(&zram->init_lock); + /* I/O operation under all of CPU are done so let's free */ + zram_meta_free(meta, disksize); + zcomp_destroy(comp); +} + +static ssize_t disksize_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t len) +{ + u64 disksize; + struct zcomp *comp; + struct zram_meta *meta; + struct zram *zram = dev_to_zram(dev); + int err; + + disksize = memparse(buf, NULL); + if (!disksize) + return -EINVAL; + + disksize = PAGE_ALIGN(disksize); + meta = zram_meta_alloc(zram->disk->first_minor, disksize); + if (!meta) + return -ENOMEM; + + comp = zcomp_create(zram->compressor, zram->max_comp_streams); + if (IS_ERR(comp)) { + pr_info("Cannot initialise %s compressing backend\n", + zram->compressor); + err = PTR_ERR(comp); + goto out_free_meta; + } + + down_write(&zram->init_lock); + if (init_done(zram)) { + pr_info("Cannot change disksize for initialized device\n"); + err = -EBUSY; + goto out_destroy_comp; + } + + init_waitqueue_head(&zram->io_done); + atomic_set(&zram->refcount, 1); + zram->meta = meta; + zram->comp = comp; + zram->disksize = disksize; + set_capacity(zram->disk, zram->disksize >> SECTOR_SHIFT); + up_write(&zram->init_lock); + + /* + * Revalidate disk out of the init_lock to avoid lockdep splat. + * It's okay because disk's capacity is protected by init_lock + * so that revalidate_disk always sees up-to-date capacity. + */ + revalidate_disk(zram->disk); + + return len; + +out_destroy_comp: + up_write(&zram->init_lock); + zcomp_destroy(comp); +out_free_meta: + zram_meta_free(meta, disksize); + return err; +} + +static ssize_t reset_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t len) +{ + int ret; + unsigned short do_reset; + struct zram *zram; + struct block_device *bdev; + + zram = dev_to_zram(dev); + bdev = bdget_disk(zram->disk, 0); + + if (!bdev) + return -ENOMEM; + + mutex_lock(&bdev->bd_mutex); + /* Do not reset an active device! */ + if (bdev->bd_openers) { + ret = -EBUSY; + goto out; + } + + ret = kstrtou16(buf, 10, &do_reset); + if (ret) + goto out; + + if (!do_reset) { + ret = -EINVAL; + goto out; + } + + /* Make sure all pending I/O is finished */ + fsync_bdev(bdev); + zram_reset_device(zram); + + mutex_unlock(&bdev->bd_mutex); + revalidate_disk(zram->disk); + bdput(bdev); + + return len; + +out: + mutex_unlock(&bdev->bd_mutex); + bdput(bdev); + return ret; +} + +static void __zram_make_request(struct zram *zram, struct bio *bio) +{ + int i, offset, rw; + u32 index; + struct bio_vec *bvec; + + index = bio->bi_sector >> SECTORS_PER_PAGE_SHIFT; + offset = (bio->bi_sector & + (SECTORS_PER_PAGE - 1)) << SECTOR_SHIFT; + + if (unlikely(bio->bi_rw & REQ_DISCARD)) { + zram_bio_discard(zram, index, offset, bio); + bio_endio(bio, 0); + return; + } + + rw = bio_data_dir(bio); + bio_for_each_segment(bvec, bio, i) { + int max_transfer_size = PAGE_SIZE - offset; + + if (bvec->bv_len > max_transfer_size) { + /* + * zram_bvec_rw() can only make operation on a single + * zram page. Split the bio vector. + */ + struct bio_vec bv; + + bv.bv_page = bvec->bv_page; + bv.bv_len = max_transfer_size; + bv.bv_offset = bvec->bv_offset; + + if (zram_bvec_rw(zram, &bv, index, offset, rw) < 0) + goto out; + + bv.bv_len = bvec->bv_len - max_transfer_size; + bv.bv_offset += max_transfer_size; + if (zram_bvec_rw(zram, &bv, index + 1, 0, rw) < 0) + goto out; + } else + if (zram_bvec_rw(zram, bvec, index, offset, rw) < 0) + goto out; + + update_position(&index, &offset, bvec); + } + + set_bit(BIO_UPTODATE, &bio->bi_flags); + bio_endio(bio, 0); + return; + +out: + bio_io_error(bio); +} + +/* + * Handler function for all zram I/O requests. + */ +static void zram_make_request(struct request_queue *queue, struct bio *bio) +{ + struct zram *zram = queue->queuedata; + + if (unlikely(!zram_meta_get(zram))) + goto error; + + if (!valid_io_request(zram, bio->bi_sector, + bio->bi_size)) { + atomic64_inc(&zram->stats.invalid_io); + goto put_zram; + } + + __zram_make_request(zram, bio); + zram_meta_put(zram); + return; +put_zram: + zram_meta_put(zram); +error: + bio_io_error(bio); +} + +static void zram_slot_free_notify(struct block_device *bdev, + unsigned long index) +{ + struct zram *zram; + struct zram_meta *meta; + + zram = bdev->bd_disk->private_data; + meta = zram->meta; + + bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); + zram_free_page(zram, index); + bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); + atomic64_inc(&zram->stats.notify_free); +} + +static const struct block_device_operations zram_devops = { + .swap_slot_free_notify = zram_slot_free_notify, + .owner = THIS_MODULE +}; + +static DEVICE_ATTR_WO(compact); +static DEVICE_ATTR_RW(disksize); +static DEVICE_ATTR_RO(initstate); +static DEVICE_ATTR_WO(reset); +static DEVICE_ATTR_RO(orig_data_size); +static DEVICE_ATTR_RO(mem_used_total); +static DEVICE_ATTR_RW(mem_limit); +static DEVICE_ATTR_RW(mem_used_max); +static DEVICE_ATTR_RW(max_comp_streams); +static DEVICE_ATTR_RW(comp_algorithm); + +static ssize_t io_stat_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct zram *zram = dev_to_zram(dev); + ssize_t ret; + + down_read(&zram->init_lock); + ret = scnprintf(buf, PAGE_SIZE, + "%8llu %8llu %8llu %8llu\n", + (u64)atomic64_read(&zram->stats.failed_reads), + (u64)atomic64_read(&zram->stats.failed_writes), + (u64)atomic64_read(&zram->stats.invalid_io), + (u64)atomic64_read(&zram->stats.notify_free)); + up_read(&zram->init_lock); + + return ret; +} + +static ssize_t mm_stat_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct zram *zram = dev_to_zram(dev); + u64 orig_size, mem_used = 0; + long max_used; + ssize_t ret; + + down_read(&zram->init_lock); + if (init_done(zram)) + mem_used = zs_get_total_pages(zram->meta->mem_pool); + + orig_size = atomic64_read(&zram->stats.pages_stored); + max_used = atomic_long_read(&zram->stats.max_used_pages); + + ret = scnprintf(buf, PAGE_SIZE, + "%8llu %8llu %8llu %8lu %8ld %8llu %8llu\n", + orig_size << PAGE_SHIFT, + (u64)atomic64_read(&zram->stats.compr_data_size), + mem_used << PAGE_SHIFT, + zram->limit_pages << PAGE_SHIFT, + max_used << PAGE_SHIFT, + (u64)atomic64_read(&zram->stats.zero_pages), + (u64)atomic64_read(&zram->stats.num_migrated)); + up_read(&zram->init_lock); + + return ret; +} + +static DEVICE_ATTR_RO(io_stat); +static DEVICE_ATTR_RO(mm_stat); +ZRAM_ATTR_RO(num_reads); +ZRAM_ATTR_RO(num_writes); +ZRAM_ATTR_RO(failed_reads); +ZRAM_ATTR_RO(failed_writes); +ZRAM_ATTR_RO(invalid_io); +ZRAM_ATTR_RO(notify_free); +ZRAM_ATTR_RO(zero_pages); +ZRAM_ATTR_RO(compr_data_size); + +static struct attribute *zram_disk_attrs[] = { + &dev_attr_disksize.attr, + &dev_attr_initstate.attr, + &dev_attr_reset.attr, + &dev_attr_num_reads.attr, + &dev_attr_num_writes.attr, + &dev_attr_failed_reads.attr, + &dev_attr_failed_writes.attr, + &dev_attr_compact.attr, + &dev_attr_invalid_io.attr, + &dev_attr_notify_free.attr, + &dev_attr_zero_pages.attr, + &dev_attr_orig_data_size.attr, + &dev_attr_compr_data_size.attr, + &dev_attr_mem_used_total.attr, + &dev_attr_mem_limit.attr, + &dev_attr_mem_used_max.attr, + &dev_attr_max_comp_streams.attr, + &dev_attr_comp_algorithm.attr, + &dev_attr_io_stat.attr, + &dev_attr_mm_stat.attr, + NULL, +}; + +static struct attribute_group zram_disk_attr_group = { + .attrs = zram_disk_attrs, +}; + +static int create_device(struct zram *zram, int device_id) +{ + struct request_queue *queue; + int ret = -ENOMEM; + + init_rwsem(&zram->init_lock); + + queue = blk_alloc_queue(GFP_KERNEL); + if (!queue) { + pr_err("Error allocating disk queue for device %d\n", + device_id); + goto out; + } + + blk_queue_make_request(queue, zram_make_request); + + /* gendisk structure */ + zram->disk = alloc_disk(1); + if (!zram->disk) { + pr_warn("Error allocating disk structure for device %d\n", + device_id); + ret = -ENOMEM; + goto out_free_queue; + } + + zram->disk->major = zram_major; + zram->disk->first_minor = device_id; + zram->disk->fops = &zram_devops; + zram->disk->queue = queue; + zram->disk->queue->queuedata = zram; + zram->disk->private_data = zram; + snprintf(zram->disk->disk_name, 16, "zram%d", device_id); + + /* Actual capacity set using syfs (/sys/block/zram/disksize */ + set_capacity(zram->disk, 0); + /* zram devices sort of resembles non-rotational disks */ + queue_flag_set_unlocked(QUEUE_FLAG_NONROT, zram->disk->queue); + queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, zram->disk->queue); + /* + * To ensure that we always get PAGE_SIZE aligned + * and n*PAGE_SIZED sized I/O requests. + */ + blk_queue_physical_block_size(zram->disk->queue, PAGE_SIZE); + blk_queue_logical_block_size(zram->disk->queue, + ZRAM_LOGICAL_BLOCK_SIZE); + blk_queue_io_min(zram->disk->queue, PAGE_SIZE); + blk_queue_io_opt(zram->disk->queue, PAGE_SIZE); + zram->disk->queue->limits.discard_granularity = PAGE_SIZE; + zram->disk->queue->limits.max_discard_sectors = UINT_MAX; + /* + * zram_bio_discard() will clear all logical blocks if logical block + * size is identical with physical block size(PAGE_SIZE). But if it is + * different, we will skip discarding some parts of logical blocks in + * the part of the request range which isn't aligned to physical block + * size. So we can't ensure that all discarded logical blocks are + * zeroed. + */ + if (ZRAM_LOGICAL_BLOCK_SIZE == PAGE_SIZE) + zram->disk->queue->limits.discard_zeroes_data = 1; + else + zram->disk->queue->limits.discard_zeroes_data = 0; + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, zram->disk->queue); + + add_disk(zram->disk); + + ret = sysfs_create_group(&disk_to_dev(zram->disk)->kobj, + &zram_disk_attr_group); + if (ret < 0) { + pr_warn("Error creating sysfs group"); + goto out_free_disk; + } + strlcpy(zram->compressor, default_compressor, sizeof(zram->compressor)); + zram->meta = NULL; + zram->max_comp_streams = 1; + return 0; + +out_free_disk: + del_gendisk(zram->disk); + put_disk(zram->disk); +out_free_queue: + blk_cleanup_queue(queue); +out: + return ret; +} + +static void destroy_devices(unsigned int nr) +{ + struct zram *zram; + unsigned int i; + + for (i = 0; i < nr; i++) { + zram = &zram_devices[i]; + /* + * Remove sysfs first, so no one will perform a disksize + * store while we destroy the devices + */ + sysfs_remove_group(&disk_to_dev(zram->disk)->kobj, + &zram_disk_attr_group); + + zram_reset_device(zram); + + blk_cleanup_queue(zram->disk->queue); + del_gendisk(zram->disk); + put_disk(zram->disk); + } + + kfree(zram_devices); + unregister_blkdev(zram_major, "zram"); + pr_info("Destroyed %u device(s)\n", nr); +} + +static int __init zram_init(void) +{ + int ret, dev_id; + + if (num_devices > max_num_devices) { + pr_warn("Invalid value for num_devices: %u\n", + num_devices); + return -EINVAL; + } + + zram_major = register_blkdev(0, "zram"); + if (zram_major <= 0) { + pr_warn("Unable to get major number\n"); + return -EBUSY; + } + + /* Allocate the device array and initialize each one */ + zram_devices = kzalloc(num_devices * sizeof(struct zram), GFP_KERNEL); + if (!zram_devices) { + unregister_blkdev(zram_major, "zram"); + return -ENOMEM; + } + + for (dev_id = 0; dev_id < num_devices; dev_id++) { + ret = create_device(&zram_devices[dev_id], dev_id); + if (ret) + goto out_error; + } + + pr_info("Created %u device(s)\n", num_devices); + return 0; + +out_error: + destroy_devices(dev_id); + return ret; +} + +static void __exit zram_exit(void) +{ + destroy_devices(num_devices); +} + +module_init(zram_init); +module_exit(zram_exit); + +module_param(num_devices, uint, 0); +MODULE_PARM_DESC(num_devices, "Number of zram devices"); + +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_AUTHOR("Nitin Gupta "); +MODULE_DESCRIPTION("Compressed RAM Block Device"); diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h new file mode 100644 index 00000000000..570c598f4ce --- /dev/null +++ b/drivers/block/zram/zram_drv.h @@ -0,0 +1,125 @@ +/* + * Compressed RAM block device + * + * Copyright (C) 2008, 2009, 2010 Nitin Gupta + * 2012, 2013 Minchan Kim + * + * This code is released using a dual license strategy: BSD/GPL + * You can choose the licence that better fits your requirements. + * + * Released under the terms of 3-clause BSD License + * Released under the terms of GNU General Public License Version 2.0 + * + */ + +#ifndef _ZRAM_DRV_H_ +#define _ZRAM_DRV_H_ + +#include +#include + +#include "zcomp.h" + +/* + * Some arbitrary value. This is just to catch + * invalid value for num_devices module parameter. + */ +static const unsigned max_num_devices = 32; + +/*-- Configurable parameters */ + +/* + * Pages that compress to size greater than this are stored + * uncompressed in memory. + */ +static const size_t max_zpage_size = PAGE_SIZE / 4 * 3; + +/* + * NOTE: max_zpage_size must be less than or equal to: + * ZS_MAX_ALLOC_SIZE. Otherwise, zs_malloc() would + * always return failure. + */ + +/*-- End of configurable params */ + +#define SECTOR_SHIFT 9 +#define SECTORS_PER_PAGE_SHIFT (PAGE_SHIFT - SECTOR_SHIFT) +#define SECTORS_PER_PAGE (1 << SECTORS_PER_PAGE_SHIFT) +#define ZRAM_LOGICAL_BLOCK_SHIFT 12 +#define ZRAM_LOGICAL_BLOCK_SIZE (1 << ZRAM_LOGICAL_BLOCK_SHIFT) +#define ZRAM_SECTOR_PER_LOGICAL_BLOCK \ + (1 << (ZRAM_LOGICAL_BLOCK_SHIFT - SECTOR_SHIFT)) + + +/* + * The lower ZRAM_FLAG_SHIFT bits of table.value is for + * object size (excluding header), the higher bits is for + * zram_pageflags. + * + * zram is mainly used for memory efficiency so we want to keep memory + * footprint small so we can squeeze size and flags into a field. + * The lower ZRAM_FLAG_SHIFT bits is for object size (excluding header), + * the higher bits is for zram_pageflags. + */ +#define ZRAM_FLAG_SHIFT 24 + +/* Flags for zram pages (table[page_no].value) */ +enum zram_pageflags { + /* Page consists entirely of zeros */ + ZRAM_ZERO = ZRAM_FLAG_SHIFT, + ZRAM_ACCESS, /* page is now accessed */ + + __NR_ZRAM_PAGEFLAGS, +}; + +/*-- Data structures */ + +/* Allocated for each disk page */ +struct zram_table_entry { + unsigned long handle; + unsigned long value; +}; + +struct zram_stats { + atomic64_t compr_data_size; /* compressed size of pages stored */ + atomic64_t num_reads; /* failed + successful */ + atomic64_t num_writes; /* --do-- */ + atomic64_t num_migrated; /* no. of migrated object */ + atomic64_t failed_reads; /* can happen when memory is too low */ + atomic64_t failed_writes; /* can happen when memory is too low */ + atomic64_t invalid_io; /* non-page-aligned I/O requests */ + atomic64_t notify_free; /* no. of swap slot free notifications */ + atomic64_t zero_pages; /* no. of zero filled pages */ + atomic64_t pages_stored; /* no. of pages currently stored */ + atomic_long_t max_used_pages; /* no. of maximum pages stored */ +}; + +struct zram_meta { + struct zram_table_entry *table; + struct zs_pool *mem_pool; +}; + +struct zram { + struct zram_meta *meta; + struct zcomp *comp; + struct gendisk *disk; + /* Prevent concurrent execution of device init */ + struct rw_semaphore init_lock; + /* + * the number of pages zram can consume for storing compressed data + */ + unsigned long limit_pages; + int max_comp_streams; + + struct zram_stats stats; + atomic_t refcount; /* refcount for zram_meta */ + /* wait all IO under all of cpu are done */ + wait_queue_head_t io_done; + /* + * This is the limit on amount of *uncompressed* worth of data + * we can store in a disk. + */ + u64 disksize; /* bytes */ + char compressor[10]; +}; +#endif diff --git a/drivers/bluetooth/hci_ibs.c b/drivers/bluetooth/hci_ibs.c index 0d732184f27..b3b7d8fa459 100644 --- a/drivers/bluetooth/hci_ibs.c +++ b/drivers/bluetooth/hci_ibs.c @@ -231,7 +231,11 @@ static int send_hci_ibs_cmd(u8 cmd, struct hci_uart *hu) struct ibs_struct *ibs = hu->priv; struct hci_ibs_cmd *hci_ibs_packet; +<<<<<<< HEAD BT_DBG("hu %p cmd 0x%x", hu, cmd); +======= + BT_DBG("hu %pK cmd 0x%x", hu, cmd); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* allocate packet */ skb = bt_skb_alloc(1, GFP_ATOMIC); @@ -259,7 +263,11 @@ static void ibs_wq_awake_device(struct work_struct *work) struct hci_uart *hu = (struct hci_uart *)ibs->ibs_hu; unsigned long flags; +<<<<<<< HEAD BT_DBG(" %p ", hu); +======= + BT_DBG(" %pK ", hu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* Vote for serial clock */ ibs_msm_serial_clock_vote(HCI_IBS_TX_VOTE_CLOCK_ON, hu); @@ -286,7 +294,11 @@ static void ibs_wq_awake_rx(struct work_struct *work) struct hci_uart *hu = (struct hci_uart *)ibs->ibs_hu; unsigned long flags; +<<<<<<< HEAD BT_DBG(" %p ", hu); +======= + BT_DBG(" %pK ", hu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ibs_msm_serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_ON, hu); @@ -314,7 +326,11 @@ static void ibs_wq_serial_rx_clock_vote_off(struct work_struct *work) ws_rx_vote_off); struct hci_uart *hu = (struct hci_uart *)ibs->ibs_hu; +<<<<<<< HEAD BT_DBG(" %p ", hu); +======= + BT_DBG(" %pK ", hu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ibs_msm_serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_OFF, hu); @@ -326,7 +342,11 @@ static void ibs_wq_serial_tx_clock_vote_off(struct work_struct *work) ws_tx_vote_off); struct hci_uart *hu = (struct hci_uart *)ibs->ibs_hu; +<<<<<<< HEAD BT_DBG(" %p ", hu); +======= + BT_DBG(" %pK ", hu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed hci_uart_tx_wakeup(hu); /* run HCI tx handling unlocked */ @@ -342,7 +362,11 @@ static void hci_ibs_tx_idle_timeout(unsigned long arg) struct ibs_struct *ibs = hu->priv; unsigned long flags; +<<<<<<< HEAD BT_DBG("hu %p idle timeout in %lu state", hu, ibs->tx_ibs_state); +======= + BT_DBG("hu %pK idle timeout in %lu state", hu, ibs->tx_ibs_state); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed spin_lock_irqsave_nested(&ibs->hci_ibs_lock, flags, SINGLE_DEPTH_NESTING); @@ -376,8 +400,13 @@ static void hci_ibs_wake_retrans_timeout(unsigned long arg) unsigned long flags; unsigned long retransmit = 0; +<<<<<<< HEAD BT_DBG("hu %p wake retransmit timeout in %lu state", hu, ibs->tx_ibs_state); +======= + BT_DBG("hu %pK wake retransmit timeout in %lu state", + hu, ibs->tx_ibs_state); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed spin_lock_irqsave_nested(&ibs->hci_ibs_lock, flags, SINGLE_DEPTH_NESTING); @@ -409,7 +438,11 @@ static int ibs_open(struct hci_uart *hu) { struct ibs_struct *ibs; +<<<<<<< HEAD BT_DBG("hu %p", hu); +======= + BT_DBG("hu %pK", hu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ibs = kzalloc(sizeof(*ibs), GFP_ATOMIC); if (!ibs) @@ -505,7 +538,11 @@ static int ibs_flush(struct hci_uart *hu) { struct ibs_struct *ibs = hu->priv; +<<<<<<< HEAD BT_DBG("hu %p", hu); +======= + BT_DBG("hu %pK", hu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed skb_queue_purge(&ibs->tx_wait_q); skb_queue_purge(&ibs->txq); @@ -518,7 +555,11 @@ static int ibs_close(struct hci_uart *hu) { struct ibs_struct *ibs = hu->priv; +<<<<<<< HEAD BT_DBG("hu %p", hu); +======= + BT_DBG("hu %pK", hu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ibs_msm_serial_clock_vote(HCI_IBS_VOTE_STATS_UPDATE, hu); ibs_log_local_stats(ibs); @@ -547,7 +588,11 @@ static void ibs_device_want_to_wakeup(struct hci_uart *hu) unsigned long flags; struct ibs_struct *ibs = hu->priv; +<<<<<<< HEAD BT_DBG("hu %p", hu); +======= + BT_DBG("hu %pK", hu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* lock hci_ibs state */ spin_lock_irqsave(&ibs->hci_ibs_lock, flags); @@ -596,7 +641,11 @@ static void ibs_device_want_to_sleep(struct hci_uart *hu) unsigned long flags; struct ibs_struct *ibs = hu->priv; +<<<<<<< HEAD BT_DBG("hu %p", hu); +======= + BT_DBG("hu %pK", hu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* lock hci_ibs state */ spin_lock_irqsave(&ibs->hci_ibs_lock, flags); @@ -632,7 +681,11 @@ static void ibs_device_woke_up(struct hci_uart *hu) struct ibs_struct *ibs = hu->priv; struct sk_buff *skb = NULL; +<<<<<<< HEAD BT_DBG("hu %p", hu); +======= + BT_DBG("hu %pK", hu); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* lock hci_ibs state */ spin_lock_irqsave(&ibs->hci_ibs_lock, flags); @@ -677,7 +730,11 @@ static int ibs_enqueue(struct hci_uart *hu, struct sk_buff *skb) unsigned long flags = 0; struct ibs_struct *ibs = hu->priv; +<<<<<<< HEAD BT_DBG("hu %p skb %p", hu, skb); +======= + BT_DBG("hu %pK skb %pK", hu, skb); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* Prepend skb with frame type */ memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1); @@ -756,8 +813,13 @@ static int ibs_recv(struct hci_uart *hu, void *data, int count) struct hci_sco_hdr *sh; register int len, type, dlen; +<<<<<<< HEAD BT_DBG("hu %p count %d rx_state %ld rx_count %ld", hu, count, ibs->rx_state, ibs->rx_count); +======= + BT_DBG("hu %pK count %d rx_state %ld rx_count %ld", + hu, count, ibs->rx_state, ibs->rx_count); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ptr = data; while (count) { diff --git a/drivers/char/adsprpc_compat.c b/drivers/char/adsprpc_compat.c index 31c2897546e..9070c094a4f 100644 --- a/drivers/char/adsprpc_compat.c +++ b/drivers/char/adsprpc_compat.c @@ -98,8 +98,14 @@ static int compat_get_fastrpc_ioctl_invoke( if (err) return -EFAULT; +<<<<<<< HEAD inv->inv.pra = (union remote_arg *)(inv + 1); err = put_user(sc, &inv->inv.sc); +======= + pra = (union remote_arg *)(inv + 1); + err = put_user(pra, &inv->inv.pra); + err |= put_user(sc, &inv->inv.sc); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed err |= get_user(u, &inv32->inv.handle); err |= put_user(u, &inv->inv.handle); err |= get_user(p, &inv32->inv.pra); @@ -107,12 +113,20 @@ static int compat_get_fastrpc_ioctl_invoke( return err; pra32 = compat_ptr(p); +<<<<<<< HEAD pra = inv->inv.pra; num = REMOTE_SCALARS_INBUFS(sc) + REMOTE_SCALARS_OUTBUFS(sc); for (j = 0; j < num; j++) { err |= get_user(p, &pra32[j].buf.pv); pra[j].buf.pv = NULL; err |= put_user(p, (compat_uptr_t *)&pra[j].buf.pv); +======= + pra = (union remote_arg *)(inv + 1); + num = REMOTE_SCALARS_INBUFS(sc) + REMOTE_SCALARS_OUTBUFS(sc); + for (j = 0; j < num; j++) { + err |= get_user(p, &pra32[j].buf.pv); + err |= put_user(p, (uintptr_t *)&pra[j].buf.pv); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed err |= get_user(s, &pra32[j].buf.len); err |= put_user(s, &pra[j].buf.len); } @@ -121,7 +135,11 @@ static int compat_get_fastrpc_ioctl_invoke( err |= put_user(u, &pra[num + j].h); } +<<<<<<< HEAD inv->fds = NULL; +======= + err |= put_user(NULL, &inv->fds); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (cmd == COMPAT_FASTRPC_IOCTL_INVOKE_FD) { err |= get_user(p, &inv32->fds); err |= put_user(p, (compat_uptr_t *)&inv->fds); @@ -173,8 +191,12 @@ static int compat_get_fastrpc_ioctl_mmap( err |= get_user(u, &map32->flags); err |= put_user(u, &map->flags); err |= get_user(p, &map32->vaddrin); +<<<<<<< HEAD map->vaddrin = NULL; err |= put_user(p, (compat_uptr_t *)&map->vaddrin); +======= + err |= put_user(p, (uintptr_t *)&map->vaddrin); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed err |= get_user(s, &map32->size); err |= put_user(s, &map->size); diff --git a/drivers/char/diag/diag_dci.c b/drivers/char/diag/diag_dci.c index 25b89dd9be3..2bf699584d8 100644 --- a/drivers/char/diag/diag_dci.c +++ b/drivers/char/diag/diag_dci.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -405,7 +409,11 @@ static int diag_process_single_dci_pkt(unsigned char *buf, int len, uint8_t cmd_code = 0; if (!buf || len < 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, buf: %p, len: %d\n", +======= + pr_err("diag: Invalid input in %s, buf: %pK, len: %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, buf, len); return -EIO; } @@ -749,7 +757,11 @@ static int diag_dci_remove_req_entry(unsigned char *buf, int len, { uint16_t rsp_count = 0, delayed_rsp_id = 0; if (!buf || len <= 0 || !entry) { +<<<<<<< HEAD pr_err("diag: In %s, invalid input buf: %p, len: %d, entry: %p\n", +======= + pr_err("diag: In %s, invalid input buf: %pK, len: %d, entry: %pK\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, buf, len, entry); return -EIO; } @@ -803,7 +815,11 @@ static void dci_process_ctrl_status(unsigned char *buf, int len, int token) int peripheral_mask, status; if (!buf || (len < sizeof(struct diag_ctrl_dci_status))) { +<<<<<<< HEAD pr_err("diag: In %s, invalid buf %p or length: %d\n", +======= + pr_err("diag: In %s, invalid buf %pK or length: %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, buf, len); return; } @@ -1937,7 +1953,11 @@ int diag_process_dci_transaction(unsigned char *buf, int len) __func__); return -ENOMEM; } +<<<<<<< HEAD pr_debug("diag: head of dci log mask %p\n", head_log_mask_ptr); +======= + pr_debug("diag: head of dci log mask %pK\n", head_log_mask_ptr); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed count = 0; /* iterator for extracting log codes */ while (count < num_codes) { @@ -1965,7 +1985,11 @@ int diag_process_dci_transaction(unsigned char *buf, int len) while (log_mask_ptr && (offset < DCI_LOG_MASK_SIZE)) { if (*log_mask_ptr == equip_id) { found = 1; +<<<<<<< HEAD pr_debug("diag: find equip id = %x at %p\n", +======= + pr_debug("diag: find equip id = %x at %pK\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed equip_id, log_mask_ptr); break; } else { @@ -2043,7 +2067,11 @@ int diag_process_dci_transaction(unsigned char *buf, int len) __func__); return -ENOMEM; } +<<<<<<< HEAD pr_debug("diag: head of dci event mask %p\n", event_mask_ptr); +======= + pr_debug("diag: head of dci event mask %pK\n", event_mask_ptr); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed count = 0; /* iterator for extracting log codes */ while (count < num_codes) { if (read_len >= USER_SPACE_DATA) { @@ -3096,7 +3124,11 @@ int diag_dci_write_proc(int peripheral, int pkt_type, char *buf, int len) if (!buf || (peripheral < 0 || peripheral >= NUM_SMD_DCI_CHANNELS) || !driver->rcvd_feature_mask[peripheral] || len < 0) { +<<<<<<< HEAD pr_err("diag: In %s, invalid data 0x%p, peripheral: %d, len: %d\n", +======= + pr_err("diag: In %s, invalid data 0x%pK, peripheral: %d, len: %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, buf, peripheral, len); return -EINVAL; } diff --git a/drivers/char/diag/diag_debugfs.c b/drivers/char/diag/diag_debugfs.c index 6916507ec2b..0869e52146d 100644 --- a/drivers/char/diag/diag_debugfs.c +++ b/drivers/char/diag/diag_debugfs.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2011-2014, 2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -50,6 +54,7 @@ static ssize_t diag_dbgfs_read_status(struct file *file, char __user *ubuf, } buf_size = ksize(buf); ret = scnprintf(buf, buf_size, +<<<<<<< HEAD "modem ch: 0x%p\n" "lpass ch: 0x%p\n" "riva ch: 0x%p\n" @@ -70,6 +75,28 @@ static ssize_t diag_dbgfs_read_status(struct file *file, char __user *ubuf, "lpass dci cmd ch: 0x%p\n" "riva dci cmd ch: 0x%p\n" "sensors dci cmd ch: 0x%p\n" +======= + "modem ch: 0x%pK\n" + "lpass ch: 0x%pK\n" + "riva ch: 0x%pK\n" + "sensors ch: 0x%pK\n" + "modem dci ch: 0x%pK\n" + "lpass dci ch: 0x%pK\n" + "riva dci ch: 0x%pK\n" + "sensors dci ch: 0x%pK\n" + "modem cntl_ch: 0x%pK\n" + "lpass cntl_ch: 0x%pK\n" + "riva cntl_ch: 0x%pK\n" + "sensors cntl_ch: 0x%pK\n" + "modem cmd ch: 0x%pK\n" + "adsp cmd ch: 0x%pK\n" + "riva cmd ch: 0x%pK\n" + "sensors cmd ch: 0x%pK\n" + "modem dci cmd ch: 0x%pK\n" + "lpass dci cmd ch: 0x%pK\n" + "riva dci cmd ch: 0x%pK\n" + "sensors dci cmd ch: 0x%pK\n" +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed "CPU Tools id: %d\n" "Apps only: %d\n" "Apps master: %d\n" @@ -723,7 +750,11 @@ static ssize_t diag_dbgfs_read_usbinfo(struct file *file, char __user *ubuf, bytes_written = scnprintf(buf+bytes_in_buffer, bytes_remaining, "id: %d\n" "name: %s\n" +<<<<<<< HEAD "hdl: %p\n" +======= + "hdl: %pK\n" +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed "connected: %d\n" "enabled: %d\n" "mempool: %s\n" @@ -865,9 +896,15 @@ static ssize_t diag_dbgfs_read_mhiinfo(struct file *file, char __user *ubuf, "bridge index: %s\n" "mempool: %s\n" "read ch opened: %d\n" +<<<<<<< HEAD "read ch hdl: %p\n" "write ch opened: %d\n" "write ch hdl: %p\n" +======= + "read ch hdl: %pK\n" + "write ch opened: %d\n" + "write ch hdl: %pK\n" +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed "read work pending: %d\n" "read done work pending: %d\n" "open work pending: %d\n" @@ -936,9 +973,15 @@ static ssize_t diag_dbgfs_read_bridge(struct file *file, char __user *ubuf, "type: %d\n" "inited: %d\n" "ctxt: %d\n" +<<<<<<< HEAD "dev_ops: %p\n" "dci_read_buf: %p\n" "dci_read_ptr: %p\n" +======= + "dev_ops: %pK\n" + "dci_read_buf: %pK\n" + "dci_read_ptr: %pK\n" +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed "dci_read_len: %d\n\n", info->id, info->name, diff --git a/drivers/char/diag/diag_masks.c b/drivers/char/diag/diag_masks.c index 7c0f103b2fb..7a75b532286 100644 --- a/drivers/char/diag/diag_masks.c +++ b/drivers/char/diag/diag_masks.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2008-2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2008-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -386,7 +390,11 @@ static int diag_cmd_get_ssid_range(unsigned char *src_buf, int src_len, struct diag_ssid_range_t ssid_range; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -430,7 +438,11 @@ static int diag_cmd_get_build_mask(unsigned char *src_buf, int src_len, struct diag_msg_build_mask_t rsp; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -483,7 +495,11 @@ static int diag_cmd_get_msg_mask(unsigned char *src_buf, int src_len, struct diag_msg_build_mask_t rsp; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -532,10 +548,18 @@ static int diag_cmd_set_msg_mask(unsigned char *src_buf, int src_len, struct diag_msg_mask_t *mask = NULL; struct diag_msg_build_mask_t *req = NULL; struct diag_msg_build_mask_t rsp; +<<<<<<< HEAD uint32_t *temp = NULL; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + struct diag_msg_mask_t *mask_next = NULL; + uint32_t *temp = NULL; + + if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -545,10 +569,25 @@ static int diag_cmd_set_msg_mask(unsigned char *src_buf, int src_len, mutex_lock(&msg_mask.lock); mask = (struct diag_msg_mask_t *)msg_mask.ptr; for (i = 0; i < driver->msg_mask_tbl_count; i++, mask++) { +<<<<<<< HEAD if ((req->ssid_first < mask->ssid_first) || (req->ssid_first > mask->ssid_last_tools)) { continue; } +======= + if (i < (driver->msg_mask_tbl_count - 1)) { + mask_next = mask; + mask_next++; + } else + mask_next = NULL; + + if ((req->ssid_first < mask->ssid_first) || + (req->ssid_first > mask->ssid_first + MAX_SSID_PER_RANGE) || + (mask_next && (req->ssid_first >= mask_next->ssid_first))) { + continue; + } + mask_next = NULL; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed found = 1; mask_size = req->ssid_last - req->ssid_first + 1; if (mask_size > MAX_SSID_PER_RANGE) { @@ -564,8 +603,15 @@ static int diag_cmd_set_msg_mask(unsigned char *src_buf, int src_len, pr_debug("diag: Msg SSID range mismatch\n"); if (mask_size != MAX_SSID_PER_RANGE) mask->ssid_last_tools = req->ssid_last; +<<<<<<< HEAD temp = krealloc(mask->ptr, mask_size * sizeof(uint32_t), +======= + mask->range_tools = + mask->ssid_last_tools - mask->ssid_first + 1; + temp = krealloc(mask->ptr, + mask->range_tools * sizeof(uint32_t), +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed GFP_KERNEL); if (!temp) { pr_err_ratelimited("diag: In %s, unable to allocate memory for msg mask ptr, mask_size: %d\n", @@ -573,7 +619,10 @@ static int diag_cmd_set_msg_mask(unsigned char *src_buf, int src_len, return -ENOMEM; } mask->ptr = temp; +<<<<<<< HEAD mask->range_tools = mask_size; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } offset = req->ssid_first - mask->ssid_first; @@ -628,7 +677,11 @@ static int diag_cmd_set_all_msg_mask(unsigned char *src_buf, int src_len, struct diag_msg_mask_t *mask = (struct diag_msg_mask_t *)msg_mask.ptr; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -674,7 +727,11 @@ static int diag_cmd_get_event_mask(unsigned char *src_buf, int src_len, struct diag_event_mask_config_t rsp; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -712,7 +769,11 @@ static int diag_cmd_update_event_mask(unsigned char *src_buf, int src_len, struct diag_event_mask_config_t *req; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -759,7 +820,11 @@ static int diag_cmd_toggle_events(unsigned char *src_buf, int src_len, struct diag_event_report_t header; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -805,7 +870,11 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len, struct diag_log_config_rsp_t rsp; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -875,7 +944,11 @@ static int diag_cmd_get_log_range(unsigned char *src_buf, int src_len, return 0; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -913,7 +986,11 @@ static int diag_cmd_set_log_mask(unsigned char *src_buf, int src_len, struct diag_log_config_set_rsp_t rsp; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -992,7 +1069,11 @@ static int diag_cmd_disable_log_mask(unsigned char *src_buf, int src_len, int i; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } diff --git a/drivers/char/diag/diag_memorydevice.c b/drivers/char/diag/diag_memorydevice.c index f00f2a9bc01..9cafdb4585f 100644 --- a/drivers/char/diag/diag_memorydevice.c +++ b/drivers/char/diag/diag_memorydevice.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -142,7 +146,11 @@ int diag_md_write(int id, unsigned char *buf, int len, int ctx) if (ch->tbl[i].buf != buf) continue; found = 1; +<<<<<<< HEAD pr_err_ratelimited("diag: trying to write the same buffer buf: %p, ctxt: %d len: %d at i: %d back to the table, proc: %d, mode: %d\n", +======= + pr_err_ratelimited("diag: trying to write the same buffer buf: %pK, ctxt: %d len: %d at i: %d back to the table, proc: %d, mode: %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed buf, ctx, ch->tbl[i].len, i, id, driver->logging_mode); } diff --git a/drivers/char/diag/diagchar.h b/drivers/char/diag/diagchar.h index 93ed9ad55ea..190406518cc 100644 --- a/drivers/char/diag/diagchar.h +++ b/drivers/char/diag/diagchar.h @@ -107,7 +107,10 @@ #define MODE_CMD 41 #define RESET_ID 2 +<<<<<<< HEAD #define POWER_OFF_ID 6 +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #define FEATURE_MASK_LEN 2 diff --git a/drivers/char/diag/diagchar_core.c b/drivers/char/diag/diagchar_core.c index bb14523f2ec..e73db183649 100644 --- a/drivers/char/diag/diagchar_core.c +++ b/drivers/char/diag/diagchar_core.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2008-2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2008-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -706,7 +710,11 @@ static int diag_process_userspace_remote(int proc, void *buf, int len) int bridge_index = proc - 1; if (!buf || len < 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, buf: %p, len: %d\n", +======= + pr_err("diag: Invalid input in %s, buf: %pK, len: %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, buf, len); return -EINVAL; } diff --git a/drivers/char/diag/diagchar_hdlc.c b/drivers/char/diag/diagchar_hdlc.c index 39f1f448746..4fff4444198 100644 --- a/drivers/char/diag/diagchar_hdlc.c +++ b/drivers/char/diag/diagchar_hdlc.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2008-2009, 2012-2013, The Linux Foundation. +======= +/* Copyright (c) 2008-2009, 2012-2013, 2016, The Linux Foundation. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * All rights reserved. * * This program is free software; you can redistribute it and/or modify @@ -242,7 +246,11 @@ int crc_check(uint8_t *buf, uint16_t len) * of data and 3 bytes for CRC */ if (!buf || len < 4) { +<<<<<<< HEAD pr_err_ratelimited("diag: In %s, invalid packet or length, buf: 0x%p, len: %d", +======= + pr_err_ratelimited("diag: In %s, invalid packet or length, buf: 0x%pK, len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, buf, len); return -EIO; } diff --git a/drivers/char/diag/diagfwd.c b/drivers/char/diag/diagfwd.c index f21ccb979ac..8699f0270d6 100644 --- a/drivers/char/diag/diagfwd.c +++ b/drivers/char/diag/diagfwd.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2008-2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2008-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -810,7 +814,11 @@ void diag_update_pkt_buffer(unsigned char *buf, int type) } if (!ptr || length == 0) { +<<<<<<< HEAD pr_err("diag: Invalid ptr %p and length %d in %s", +======= + pr_err("diag: Invalid ptr %pK and length %d in %s", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ptr, length, __func__); return; } @@ -923,7 +931,11 @@ int diag_process_stm_cmd(unsigned char *buf, unsigned char *dest_buf) int i; if (!buf || !dest_buf) { +<<<<<<< HEAD pr_err("diag: Invalid pointers buf: %p, dest_buf %p in %s\n", +======= + pr_err("diag: Invalid pointers buf: %pK, dest_buf %pK in %s\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed buf, dest_buf, __func__); return -EIO; } @@ -1011,7 +1023,11 @@ int diag_cmd_log_on_demand(unsigned char *src_buf, int src_len, return 0; if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) { +<<<<<<< HEAD pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d", +======= + pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, src_buf, src_len, dest_buf, dest_len); return -EINVAL; } @@ -1096,7 +1112,11 @@ int diag_process_apps_pkt(unsigned char *buf, int len) data_type = APPS_DATA; /* Dont send any command other than mode reset */ if (chk_apps_master() && cmd_code == MODE_CMD) { +<<<<<<< HEAD if (!(subsys_id == RESET_ID || subsys_id == POWER_OFF_ID)) +======= + if (subsys_id != RESET_ID) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed data_type = MODEM_DATA; } @@ -2038,7 +2058,11 @@ int diag_smd_write(struct diag_smd_info *smd_info, void *buf, int len) int max_retries = 3; if (!smd_info || !buf || len <= 0) { +<<<<<<< HEAD pr_err_ratelimited("diag: In %s, invalid params, smd_info: %p, buf: %p, len: %d\n", +======= + pr_err_ratelimited("diag: In %s, invalid params, smd_info: %pK, buf: %pK, len: %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, smd_info, buf, len); return -EINVAL; } diff --git a/drivers/char/diag/diagfwd_bridge.c b/drivers/char/diag/diagfwd_bridge.c index f6aa7962d51..e3457e2de96 100644 --- a/drivers/char/diag/diagfwd_bridge.c +++ b/drivers/char/diag/diagfwd_bridge.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2012-2014, 2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -133,7 +137,11 @@ int diagfwd_bridge_register(int id, int ctxt, struct diag_remote_dev_ops *ops) char wq_name[DIAG_BRIDGE_NAME_SZ + 10]; if (!ops) { +<<<<<<< HEAD pr_err("diag: Invalid pointers ops: %p ctxt: %d\n", ops, ctxt); +======= + pr_err("diag: Invalid pointers ops: %pK ctxt: %d\n", ops, ctxt); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return -EINVAL; } diff --git a/drivers/char/diag/diagfwd_cntl.c b/drivers/char/diag/diagfwd_cntl.c index 55ce976da98..abcd4572913 100644 --- a/drivers/char/diag/diagfwd_cntl.c +++ b/drivers/char/diag/diagfwd_cntl.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -836,7 +840,11 @@ int diag_send_diag_mode_update_by_smd(struct diag_smd_info *smd_info, int err = 0; if (!smd_info || smd_info->type != SMD_CNTL_TYPE) { +<<<<<<< HEAD pr_err("diag: In %s, invalid channel info, smd_info: %p type: %d\n", +======= + pr_err("diag: In %s, invalid channel info, smd_info: %pK type: %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, smd_info, ((smd_info) ? smd_info->type : -1)); return -EIO; diff --git a/drivers/char/diag/diagfwd_hsic.c b/drivers/char/diag/diagfwd_hsic.c index 987931fdc76..0180cd1fa20 100644 --- a/drivers/char/diag/diagfwd_hsic.c +++ b/drivers/char/diag/diagfwd_hsic.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2012-2014, 2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -354,7 +358,11 @@ static int hsic_write(int id, unsigned char *buf, int len, int ctxt) return -EINVAL; } if (!buf || len <= 0) { +<<<<<<< HEAD pr_err_ratelimited("diag: In %s, ch %d, invalid buf %p len %d\n", +======= + pr_err_ratelimited("diag: In %s, ch %d, invalid buf %pK len %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, id, buf, len); return -EINVAL; } diff --git a/drivers/char/diag/diagfwd_mhi.c b/drivers/char/diag/diagfwd_mhi.c index a2bea814491..2ad81a54dc8 100644 --- a/drivers/char/diag/diagfwd_mhi.c +++ b/drivers/char/diag/diagfwd_mhi.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2014, 2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -132,11 +136,17 @@ static int mhi_buf_tbl_add(struct diag_mhi_info *mhi_info, int type, } item = kzalloc(sizeof(struct diag_mhi_buf_tbl_t), GFP_KERNEL); +<<<<<<< HEAD if (!item) { pr_err_ratelimited("diag: In %s, unable to allocate new item for buf tbl, ch: %p, type: %d, buf: %p, len: %d\n", __func__, ch, ch->type, buf, len); return -ENOMEM; } +======= + if (!item) + return -ENOMEM; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed kmemleak_not_leak(item); spin_lock_irqsave(&ch->lock, flags); @@ -187,7 +197,11 @@ static void mhi_buf_tbl_remove(struct diag_mhi_info *mhi_info, int type, spin_unlock_irqrestore(&ch->lock, flags); if (!found) { +<<<<<<< HEAD pr_err_ratelimited("diag: In %s, unable to find buffer, ch: %p, type: %d, buf: %p\n", +======= + pr_err_ratelimited("diag: In %s, unable to find buffer, ch: %pK, type: %d, buf: %pK\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, ch, ch->type, buf); } } @@ -443,7 +457,11 @@ static int mhi_write(int id, unsigned char *buf, int len, int ctxt) } if (!buf || len <= 0) { +<<<<<<< HEAD pr_err("diag: In %s, ch %d, invalid buf %p len %d\n", +======= + pr_err("diag: In %s, ch %d, invalid buf %pK len %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, id, buf, len); return -EINVAL; } @@ -473,7 +491,11 @@ static int mhi_write(int id, unsigned char *buf, int len, int ctxt) err = mhi_queue_xfer(ch->hdl, dma_addr, len, flags); if (err) { +<<<<<<< HEAD pr_err_ratelimited("diag: In %s, cannot write to MHI channel %p, len %d, err: %d\n", +======= + pr_err_ratelimited("diag: In %s, cannot write to MHI channel %pK, len %d, err: %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed __func__, diag_mhi[id].name, len, err); dma_unmap_single(NULL, (dma_addr_t)dma_addr, len, DMA_TO_DEVICE); diff --git a/drivers/coresight/coresight-csr.c b/drivers/coresight/coresight-csr.c index 19e44b9c5d3..748859ba61e 100644 --- a/drivers/coresight/coresight-csr.c +++ b/drivers/coresight/coresight-csr.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2012-2013,2016 The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -195,8 +199,11 @@ static int csr_probe(struct platform_device *pdev) drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); if (!drvdata) return -ENOMEM; +<<<<<<< HEAD /* Store the driver data pointer for use in exported functions */ csrdrvdata = drvdata; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed drvdata->dev = &pdev->dev; platform_set_drvdata(pdev, drvdata); @@ -227,6 +234,12 @@ static int csr_probe(struct platform_device *pdev) if (IS_ERR(drvdata->csdev)) return PTR_ERR(drvdata->csdev); +<<<<<<< HEAD +======= + /* Store the driver data pointer for use in exported functions */ + csrdrvdata = drvdata; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dev_info(dev, "CSR initialized\n"); return 0; } diff --git a/drivers/coresight/coresight-fuse.c b/drivers/coresight/coresight-fuse.c index 94689285d8d..24f82b135fb 100644 --- a/drivers/coresight/coresight-fuse.c +++ b/drivers/coresight/coresight-fuse.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -252,8 +256,11 @@ static int fuse_probe(struct platform_device *pdev) drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); if (!drvdata) return -ENOMEM; +<<<<<<< HEAD /* Store the driver data pointer for use in exported functions */ fusedrvdata = drvdata; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed drvdata->dev = &pdev->dev; platform_set_drvdata(pdev, drvdata); @@ -315,6 +322,12 @@ static int fuse_probe(struct platform_device *pdev) if (IS_ERR(drvdata->csdev)) return PTR_ERR(drvdata->csdev); +<<<<<<< HEAD +======= + /* Store the driver data pointer for use in exported functions */ + fusedrvdata = drvdata; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dev_info(dev, "Fuse initialized\n"); return 0; } diff --git a/drivers/coresight/coresight-stm.c b/drivers/coresight/coresight-stm.c index 2cc1f9cd239..47ff6ffb714 100644 --- a/drivers/coresight/coresight-stm.c +++ b/drivers/coresight/coresight-stm.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -868,8 +872,11 @@ static int stm_probe(struct platform_device *pdev) drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); if (!drvdata) return -ENOMEM; +<<<<<<< HEAD /* Store the driver data pointer for use in exported functions */ stmdrvdata = drvdata; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed drvdata->dev = &pdev->dev; platform_set_drvdata(pdev, drvdata); @@ -948,6 +955,12 @@ static int stm_probe(struct platform_device *pdev) if (boot_enable) coresight_enable(drvdata->csdev); +<<<<<<< HEAD +======= + /* Store the driver data pointer for use in exported functions */ + stmdrvdata = drvdata; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return 0; err: coresight_unregister(drvdata->csdev); diff --git a/drivers/cpuidle/lpm-levels.c b/drivers/cpuidle/lpm-levels.c index 172e0eb405b..e8c5a88d55d 100644 --- a/drivers/cpuidle/lpm-levels.c +++ b/drivers/cpuidle/lpm-levels.c @@ -915,10 +915,18 @@ static int lpm_probe(struct platform_device *pdev) int size; struct kobject *module_kobj = NULL; +<<<<<<< HEAD +======= + get_online_cpus(); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed lpm_root_node = lpm_of_parse_cluster(pdev); if (IS_ERR_OR_NULL(lpm_root_node)) { pr_err("%s(): Failed to probe low power modes\n", __func__); +<<<<<<< HEAD +======= + put_online_cpus(); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return PTR_ERR(lpm_root_node); } @@ -931,7 +939,10 @@ static int lpm_probe(struct platform_device *pdev) * core. BUG in existing code but no known issues possibly because of * how late lpm_levels gets initialized. */ +<<<<<<< HEAD register_hotcpu_notifier(&lpm_cpu_nblk); +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed get_cpu(); on_each_cpu(setup_broadcast_timer, (void *)true, 1); put_cpu(); @@ -942,6 +953,10 @@ static int lpm_probe(struct platform_device *pdev) if (ret) { pr_err("%s: Failed initializing scm_handoff_lock (%d)\n", __func__, ret); +<<<<<<< HEAD +======= + put_online_cpus(); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return ret; } @@ -951,12 +966,20 @@ static int lpm_probe(struct platform_device *pdev) register_cluster_lpm_stats(lpm_root_node, NULL); ret = cluster_cpuidle_register(lpm_root_node); +<<<<<<< HEAD +======= + put_online_cpus(); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (ret) { pr_err("%s()Failed to register with cpuidle framework\n", __func__); goto failed; } +<<<<<<< HEAD +======= + register_hotcpu_notifier(&lpm_cpu_nblk); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME); if (!module_kobj) { pr_err("%s: cannot find kobject for module %s\n", diff --git a/drivers/crypto/msm/qce.c b/drivers/crypto/msm/qce.c index d11a8315e66..8d053da271b 100644 --- a/drivers/crypto/msm/qce.c +++ b/drivers/crypto/msm/qce.c @@ -1,6 +1,10 @@ /* Qualcomm Crypto Engine driver. * +<<<<<<< HEAD * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved. +======= + * Copyright (c) 2010-2014,2016 The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1952,8 +1956,13 @@ int qce_aead_req(void *handle, struct qce_req *q_req) else q_req->cryptlen = areq->cryptlen - authsize; +<<<<<<< HEAD if ((q_req->cryptlen > ULONG_MAX - ivsize) || (q_req->cryptlen + ivsize > ULONG_MAX - areq->assoclen)) { +======= + if ((q_req->cryptlen > UINT_MAX - ivsize) || + (q_req->cryptlen + ivsize > UINT_MAX - areq->assoclen)) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed pr_err("Integer overflow on total aead req length.\n"); return -EINVAL; } diff --git a/drivers/crypto/msm/qcedev.c b/drivers/crypto/msm/qcedev.c index 3975418c489..ad431d9f863 100644 --- a/drivers/crypto/msm/qcedev.c +++ b/drivers/crypto/msm/qcedev.c @@ -1,6 +1,10 @@ /* Qualcomm CE device driver. * +<<<<<<< HEAD * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved. +======= + * Copyright (c) 2010-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -43,6 +47,13 @@ #define CACHE_LINE_SIZE 32 #define CE_SHA_BLOCK_SIZE SHA256_BLOCK_SIZE +<<<<<<< HEAD +======= +#ifndef U32_MAX +#define U32_MAX ((u32)(~0U)) +#endif + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* are FIPS integrity tests done ?? */ bool is_fips_qcedev_integritytest_done; @@ -614,7 +625,11 @@ static int qcedev_sha_update_max_xfer(struct qcedev_async_req *qcedev_areq, while (len > 0) { user_src = (void __user *)qcedev_areq->sha_op_req.data[i].vaddr; +<<<<<<< HEAD if (user_src && __copy_from_user(k_src, +======= + if (user_src && copy_from_user(k_src, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)user_src, qcedev_areq->sha_op_req.data[i].len)) return -EFAULT; @@ -650,7 +665,11 @@ static int qcedev_sha_update_max_xfer(struct qcedev_async_req *qcedev_areq, /* Copy data from user src(s) */ user_src = (void __user *)qcedev_areq->sha_op_req.data[0].vaddr; +<<<<<<< HEAD if (user_src && __copy_from_user(k_src, +======= + if (user_src && copy_from_user(k_src, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)user_src, qcedev_areq->sha_op_req.data[0].len)) { kzfree(k_buf_src); @@ -659,7 +678,11 @@ static int qcedev_sha_update_max_xfer(struct qcedev_async_req *qcedev_areq, k_src += qcedev_areq->sha_op_req.data[0].len; for (i = 1; i < qcedev_areq->sha_op_req.entries; i++) { user_src = (void __user *)qcedev_areq->sha_op_req.data[i].vaddr; +<<<<<<< HEAD if (user_src && __copy_from_user(k_src, +======= + if (user_src && copy_from_user(k_src, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)user_src, qcedev_areq->sha_op_req.data[i].len)) { kzfree(k_buf_src); @@ -713,6 +736,7 @@ static int qcedev_sha_update(struct qcedev_async_req *qcedev_areq, return -EINVAL; } +<<<<<<< HEAD /* verify address src(s) */ for (i = 0; i < qcedev_areq->sha_op_req.entries; i++) if (!access_ok(VERIFY_READ, @@ -720,6 +744,8 @@ static int qcedev_sha_update(struct qcedev_async_req *qcedev_areq, qcedev_areq->sha_op_req.data[i].len)) return -EFAULT; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (qcedev_areq->sha_op_req.data_len > QCE_MAX_OPER_DATA) { struct qcedev_sha_op_req *saved_req; @@ -884,6 +910,7 @@ static int qcedev_hash_cmac(struct qcedev_async_req *qcedev_areq, total = qcedev_areq->sha_op_req.data_len; +<<<<<<< HEAD /* verify address src(s) */ for (i = 0; i < qcedev_areq->sha_op_req.entries; i++) if (!access_ok(VERIFY_READ, @@ -897,6 +924,9 @@ static int qcedev_hash_cmac(struct qcedev_async_req *qcedev_areq, qcedev_areq->sha_op_req.authklen)) return -EFAULT; if (__copy_from_user(&handle->sha_ctxt.authkey[0], +======= + if (copy_from_user(&handle->sha_ctxt.authkey[0], +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)qcedev_areq->sha_op_req.authkey, qcedev_areq->sha_op_req.authklen)) return -EFAULT; @@ -916,7 +946,11 @@ static int qcedev_hash_cmac(struct qcedev_async_req *qcedev_areq, for (i = 0; i < qcedev_areq->sha_op_req.entries; i++) { user_src = (void __user *)qcedev_areq->sha_op_req.data[i].vaddr; +<<<<<<< HEAD if (user_src && __copy_from_user(k_src, (void __user *)user_src, +======= + if (user_src && copy_from_user(k_src, (void __user *)user_src, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed qcedev_areq->sha_op_req.data[i].len)) { kzfree(k_buf_src); return -EFAULT; @@ -944,12 +978,16 @@ static int qcedev_set_hmac_auth_key(struct qcedev_async_req *areq, if (areq->sha_op_req.authklen <= QCEDEV_MAX_KEY_SIZE) { qcedev_sha_init(areq, handle); +<<<<<<< HEAD /* Verify Source Address */ if (!access_ok(VERIFY_READ, (void __user *)areq->sha_op_req.authkey, areq->sha_op_req.authklen)) return -EFAULT; if (__copy_from_user(&handle->sha_ctxt.authkey[0], +======= + if (copy_from_user(&handle->sha_ctxt.authkey[0], +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)areq->sha_op_req.authkey, areq->sha_op_req.authklen)) return -EFAULT; @@ -1162,7 +1200,11 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq, byteoffset = areq->cipher_op_req.byteoffset; user_src = (void __user *)areq->cipher_op_req.vbuf.src[0].vaddr; +<<<<<<< HEAD if (user_src && __copy_from_user((k_align_src + byteoffset), +======= + if (user_src && copy_from_user((k_align_src + byteoffset), +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)user_src, areq->cipher_op_req.vbuf.src[0].len)) return -EFAULT; @@ -1172,7 +1214,11 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq, for (i = 1; i < areq->cipher_op_req.entries; i++) { user_src = (void __user *)areq->cipher_op_req.vbuf.src[i].vaddr; +<<<<<<< HEAD if (user_src && __copy_from_user(k_align_src, +======= + if (user_src && copy_from_user(k_align_src, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)user_src, areq->cipher_op_req.vbuf.src[i].len)) { return -EFAULT; @@ -1204,7 +1250,11 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq, while (creq->data_len > 0) { if (creq->vbuf.dst[dst_i].len <= creq->data_len) { +<<<<<<< HEAD if (err == 0 && __copy_to_user( +======= + if (err == 0 && copy_to_user( +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)creq->vbuf.dst[dst_i].vaddr, (k_align_dst + byteoffset), creq->vbuf.dst[dst_i].len)) @@ -1215,7 +1265,11 @@ static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq, creq->data_len -= creq->vbuf.dst[dst_i].len; dst_i++; } else { +<<<<<<< HEAD if (err == 0 && __copy_to_user( +======= + if (err == 0 && copy_to_user( +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)creq->vbuf.dst[dst_i].vaddr, (k_align_dst + byteoffset), creq->data_len)) @@ -1250,6 +1304,7 @@ static int qcedev_vbuf_ablk_cipher(struct qcedev_async_req *areq, struct qcedev_cipher_op_req *saved_req; struct qcedev_cipher_op_req *creq = &areq->cipher_op_req; +<<<<<<< HEAD /* Verify Source Address's */ for (i = 0; i < areq->cipher_op_req.entries; i++) if (!access_ok(VERIFY_READ, @@ -1288,6 +1343,8 @@ static int qcedev_vbuf_ablk_cipher(struct qcedev_async_req *areq, } } } +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed total = 0; if (areq->cipher_op_req.mode == QCEDEV_AES_MODE_CTR) @@ -1559,7 +1616,11 @@ static int qcedev_check_cipher_params(struct qcedev_cipher_op_req *req, } /* Check for sum of all dst length is equal to data_len */ for (i = 0; i < req->entries; i++) { +<<<<<<< HEAD if (req->vbuf.dst[i].len >= ULONG_MAX - total) { +======= + if (req->vbuf.dst[i].len >= U32_MAX - total) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed pr_err("%s: Integer overflow on total req dst vbuf length\n", __func__); goto error; @@ -1573,7 +1634,11 @@ static int qcedev_check_cipher_params(struct qcedev_cipher_op_req *req, } /* Check for sum of all src length is equal to data_len */ for (i = 0, total = 0; i < req->entries; i++) { +<<<<<<< HEAD if (req->vbuf.src[i].len > ULONG_MAX - total) { +======= + if (req->vbuf.src[i].len > U32_MAX - total) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed pr_err("%s: Integer overflow on total req src vbuf length\n", __func__); goto error; @@ -1636,7 +1701,11 @@ static int qcedev_check_sha_params(struct qcedev_sha_op_req *req, /* Check for sum of all src length is equal to data_len */ for (i = 0, total = 0; i < req->entries; i++) { +<<<<<<< HEAD if (req->data[i].len > ULONG_MAX - total) { +======= + if (req->data[i].len > U32_MAX - total) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed pr_err("%s: Integer overflow on total req buf length\n", __func__); goto sha_error; @@ -1681,11 +1750,15 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg) switch (cmd) { case QCEDEV_IOCTL_ENC_REQ: case QCEDEV_IOCTL_DEC_REQ: +<<<<<<< HEAD if (!access_ok(VERIFY_WRITE, (void __user *)arg, sizeof(struct qcedev_cipher_op_req))) return -EFAULT; if (__copy_from_user(&qcedev_areq.cipher_op_req, +======= + if (copy_from_user(&qcedev_areq.cipher_op_req, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)arg, sizeof(struct qcedev_cipher_op_req))) return -EFAULT; @@ -1698,20 +1771,32 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg) err = qcedev_vbuf_ablk_cipher(&qcedev_areq, handle); if (err) return err; +<<<<<<< HEAD if (__copy_to_user((void __user *)arg, &qcedev_areq.cipher_op_req, sizeof(struct qcedev_cipher_op_req))) return -EFAULT; +======= + if (copy_to_user((void __user *)arg, + &qcedev_areq.cipher_op_req, + sizeof(struct qcedev_cipher_op_req))) + return -EFAULT; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed break; case QCEDEV_IOCTL_SHA_INIT_REQ: { struct scatterlist sg_src; +<<<<<<< HEAD if (!access_ok(VERIFY_WRITE, (void __user *)arg, sizeof(struct qcedev_sha_op_req))) return -EFAULT; if (__copy_from_user(&qcedev_areq.sha_op_req, +======= + + if (copy_from_user(&qcedev_areq.sha_op_req, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)arg, sizeof(struct qcedev_sha_op_req))) return -EFAULT; @@ -1721,9 +1806,15 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg) err = qcedev_hash_init(&qcedev_areq, handle, &sg_src); if (err) return err; +<<<<<<< HEAD if (__copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req, sizeof(struct qcedev_sha_op_req))) return -EFAULT; +======= + if (copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req, + sizeof(struct qcedev_sha_op_req))) + return -EFAULT; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } handle->sha_ctxt.init_done = true; break; @@ -1733,11 +1824,16 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg) case QCEDEV_IOCTL_SHA_UPDATE_REQ: { struct scatterlist sg_src; +<<<<<<< HEAD if (!access_ok(VERIFY_WRITE, (void __user *)arg, sizeof(struct qcedev_sha_op_req))) return -EFAULT; if (__copy_from_user(&qcedev_areq.sha_op_req, +======= + + if (copy_from_user(&qcedev_areq.sha_op_req, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)arg, sizeof(struct qcedev_sha_op_req))) return -EFAULT; @@ -1759,10 +1855,22 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg) return err; } +<<<<<<< HEAD memcpy(&qcedev_areq.sha_op_req.digest[0], &handle->sha_ctxt.digest[0], handle->sha_ctxt.diglen); if (__copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req, +======= + if (handle->sha_ctxt.diglen > QCEDEV_MAX_SHA_DIGEST) { + pr_err("Invalid sha_ctxt.diglen %d\n", + handle->sha_ctxt.diglen); + return -EINVAL; + } + memcpy(&qcedev_areq.sha_op_req.digest[0], + &handle->sha_ctxt.digest[0], + handle->sha_ctxt.diglen); + if (copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed sizeof(struct qcedev_sha_op_req))) return -EFAULT; } @@ -1774,11 +1882,15 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg) pr_err("%s Init was not called\n", __func__); return -EINVAL; } +<<<<<<< HEAD if (!access_ok(VERIFY_WRITE, (void __user *)arg, sizeof(struct qcedev_sha_op_req))) return -EFAULT; if (__copy_from_user(&qcedev_areq.sha_op_req, +======= + if (copy_from_user(&qcedev_areq.sha_op_req, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)arg, sizeof(struct qcedev_sha_op_req))) return -EFAULT; @@ -1792,7 +1904,11 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg) memcpy(&qcedev_areq.sha_op_req.digest[0], &handle->sha_ctxt.digest[0], handle->sha_ctxt.diglen); +<<<<<<< HEAD if (__copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req, +======= + if (copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed sizeof(struct qcedev_sha_op_req))) return -EFAULT; handle->sha_ctxt.init_done = false; @@ -1801,11 +1917,16 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg) case QCEDEV_IOCTL_GET_SHA_REQ: { struct scatterlist sg_src; +<<<<<<< HEAD if (!access_ok(VERIFY_WRITE, (void __user *)arg, sizeof(struct qcedev_sha_op_req))) return -EFAULT; if (__copy_from_user(&qcedev_areq.sha_op_req, +======= + + if (copy_from_user(&qcedev_areq.sha_op_req, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (void __user *)arg, sizeof(struct qcedev_sha_op_req))) return -EFAULT; @@ -1823,7 +1944,11 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg) memcpy(&qcedev_areq.sha_op_req.digest[0], &handle->sha_ctxt.digest[0], handle->sha_ctxt.diglen); +<<<<<<< HEAD if (__copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req, +======= + if (copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed sizeof(struct qcedev_sha_op_req))) return -EFAULT; } diff --git a/drivers/crypto/msm/qcrypto.c b/drivers/crypto/msm/qcrypto.c index 40a410555cd..5352ce57199 100644 --- a/drivers/crypto/msm/qcrypto.c +++ b/drivers/crypto/msm/qcrypto.c @@ -1248,6 +1248,10 @@ static void _qcrypto_tfm_complete(struct crypto_priv *cp, u32 type, struct qcrypto_resp_ctx *arsp; struct list_head *plist; struct crypto_async_request *areq; +<<<<<<< HEAD +======= + bool pending_list; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed switch (type) { case CRYPTO_ALG_TYPE_AHASH: @@ -1263,6 +1267,10 @@ static void _qcrypto_tfm_complete(struct crypto_priv *cp, u32 type, spin_lock_irqsave(&cp->lock, flags); if (list_empty(plist)) { arsp = NULL; /* nothing to do */ +<<<<<<< HEAD +======= + pending_list = false; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } else { arsp = list_first_entry(plist, struct qcrypto_resp_ctx, list); @@ -1270,12 +1278,24 @@ static void _qcrypto_tfm_complete(struct crypto_priv *cp, u32 type, arsp = NULL; /* still in progress */ else list_del(&arsp->list); /* request is complete */ +<<<<<<< HEAD +======= + if (list_empty(plist)) + pending_list = false; + else + pending_list = true; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } spin_unlock_irqrestore(&cp->lock, flags); if (arsp) { areq = arsp->async_req; areq->complete(areq, arsp->res); +<<<<<<< HEAD goto again; +======= + if (pending_list) + goto again; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } } @@ -1870,12 +1890,21 @@ static int _qcrypto_process_aead(struct crypto_engine *pengine, * include assoicated data, ciphering data stream, * generated MAC, and CCM padding. */ +<<<<<<< HEAD if ((MAX_ALIGN_SIZE * 2 > ULONG_MAX - req->assoclen) || ((MAX_ALIGN_SIZE * 2 + req->assoclen) > ULONG_MAX - qreq.ivsize) || ((MAX_ALIGN_SIZE * 2 + req->assoclen + qreq.ivsize) > ULONG_MAX - req->cryptlen)) { +======= + if ((MAX_ALIGN_SIZE * 2 > UINT_MAX - req->assoclen) || + ((MAX_ALIGN_SIZE * 2 + req->assoclen) > + UINT_MAX - qreq.ivsize) || + ((MAX_ALIGN_SIZE * 2 + req->assoclen + + qreq.ivsize) + > UINT_MAX - req->cryptlen)) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed pr_err("Integer overflow on aead req length.\n"); return -EINVAL; } diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig index a1873a86897..cc05a6309a8 100644 --- a/drivers/devfreq/Kconfig +++ b/drivers/devfreq/Kconfig @@ -108,7 +108,11 @@ config DEVFREQ_GOV_MSM_GPUBW_MON config DEVFREQ_GOV_MSM_BW_HWMON tristate "HW monitor based governor for device BW" +<<<<<<< HEAD depends on ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON +======= + depends on ARCH_MSM_KRAIT || MSM_BIMC_BWMON +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed help HW monitor based governor for device to DDR bandwidth voting. diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 7a1b4a7791b..422c8c38f06 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -1,7 +1,11 @@ /* * extcon-arizona.c - Extcon driver Wolfson Arizona devices * +<<<<<<< HEAD * Copyright (C) 2012 Wolfson Microelectronics plc +======= + * Copyright (C) 2012-2014 Wolfson Microelectronics plc +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +30,12 @@ #include #include #include +<<<<<<< HEAD +======= +#include +#include +#include +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #include @@ -38,12 +48,41 @@ #define ARIZONA_ACCDET_MODE_MIC 0 #define ARIZONA_ACCDET_MODE_HPL 1 #define ARIZONA_ACCDET_MODE_HPR 2 +<<<<<<< HEAD +======= +#define ARIZONA_ACCDET_MODE_HPM 4 +#define ARIZONA_ACCDET_MODE_ADC 7 + +#define ARIZONA_MICD_CLAMP_MODE_JDL 0x4 +#define ARIZONA_MICD_CLAMP_MODE_JDH 0x5 + +/* GP5 is analogous to JD2 (for systems without a dedicated second JD pin) */ +#define ARIZONA_MICD_CLAMP_MODE_JDL_GP5L 0x8 +#define ARIZONA_MICD_CLAMP_MODE_JDL_GP5H 0x9 +#define ARIZONA_MICD_CLAMP_MODE_JDH_GP5H 0xb +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #define ARIZONA_HPDET_MAX 10000 #define HPDET_DEBOUNCE 500 #define DEFAULT_MICD_TIMEOUT 2000 +<<<<<<< HEAD +======= +#define QUICK_HEADPHONE_MAX_OHM 3 +#define MICROPHONE_MIN_OHM 1257 +#define MICROPHONE_MAX_OHM 30000 + +#define MICD_LVL_1_TO_7 (ARIZONA_MICD_LVL_1 | ARIZONA_MICD_LVL_2 | \ + ARIZONA_MICD_LVL_3 | ARIZONA_MICD_LVL_4 | \ + ARIZONA_MICD_LVL_5 | ARIZONA_MICD_LVL_6 | \ + ARIZONA_MICD_LVL_7) + +#define MICD_LVL_0_TO_7 (ARIZONA_MICD_LVL_0 | MICD_LVL_1_TO_7) + +#define MICD_LVL_0_TO_8 (MICD_LVL_0_TO_7 | ARIZONA_MICD_LVL_8) + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed struct arizona_extcon_info { struct device *dev; struct arizona *arizona; @@ -80,14 +119,23 @@ struct arizona_extcon_info { bool detecting; int jack_flips; +<<<<<<< HEAD int hpdet_ip; +======= + int hpdet_ip_version; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed struct extcon_dev edev; }; static const struct arizona_micd_config micd_default_modes[] = { +<<<<<<< HEAD { ARIZONA_ACCDET_SRC, 1 << ARIZONA_MICD_BIAS_SRC_SHIFT, 0 }, { 0, 2 << ARIZONA_MICD_BIAS_SRC_SHIFT, 1 }, +======= + { ARIZONA_ACCDET_SRC, 1, 0 }, + { 0, 2, 1 }, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed }; static const struct arizona_micd_range micd_default_ranges[] = { @@ -99,12 +147,22 @@ static const struct arizona_micd_range micd_default_ranges[] = { { .max = 430, .key = BTN_5 }, }; +<<<<<<< HEAD +======= +/* The number of levels in arizona_micd_levels valid for button thresholds */ +#define ARIZONA_NUM_MICD_BUTTON_LEVELS 64 + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed static const int arizona_micd_levels[] = { 3, 6, 8, 11, 13, 16, 18, 21, 23, 26, 28, 31, 34, 36, 39, 41, 44, 46, 49, 52, 54, 57, 60, 62, 65, 67, 70, 73, 75, 78, 81, 83, 89, 94, 100, 105, 111, 116, 122, 127, 139, 150, 161, 173, 186, 196, 209, 220, 245, 270, 295, 321, 348, 375, 402, 430, 489, 550, 614, 681, 752, 903, 1071, +<<<<<<< HEAD 1257, +======= + 1257, 30000, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed }; #define ARIZONA_CABLE_MECHANICAL 0 @@ -120,6 +178,7 @@ static const char *arizona_cable[] = { NULL, }; +<<<<<<< HEAD static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info); static void arizona_extcon_do_magic(struct arizona_extcon_info *info, @@ -134,6 +193,58 @@ static void arizona_extcon_do_magic(struct arizona_extcon_info *info, /* Keep the HP output stages disabled while doing the magic */ if (magic) { +======= +static ssize_t arizona_extcon_show(struct device *dev, + struct device_attribute *attr, + char *buf); +DEVICE_ATTR(hp_impedance, S_IRUGO, arizona_extcon_show, NULL); + +static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info); + +static void arizona_extcon_hp_clamp(struct arizona_extcon_info *info, + bool clamp) +{ + struct arizona *arizona = info->arizona; + unsigned int mask, val = 0; + unsigned int ep_sel = 0; + int ret; + + mutex_lock_nested(&arizona->dapm->card->dapm_mutex, + SND_SOC_DAPM_CLASS_RUNTIME); + + + switch (arizona->type) { + case WM5102: + case WM8997: + mask = ARIZONA_RMV_SHRT_HP1L; + if (clamp) + val = ARIZONA_RMV_SHRT_HP1L; + break; + case WM8280: + case WM5110: + mask = ARIZONA_HP1L_SHRTO | ARIZONA_HP1L_FLWR | + ARIZONA_HP1L_SHRTI; + if (clamp) + val = ARIZONA_HP1L_SHRTO; + else + val = ARIZONA_HP1L_FLWR | ARIZONA_HP1L_SHRTI; + break; + case CS47L35: + /* check whether audio is routed to EPOUT, do not disable OUT1 + * in that case */ + regmap_read(arizona->regmap, ARIZONA_OUTPUT_ENABLES_1, &ep_sel); + ep_sel &= ARIZONA_EP_SEL_MASK; + /* fall through to next step to set common variables */ + default: + mask = 0; + break; + }; + + arizona->hpdet_clamp = clamp; + + /* Keep the HP output stages disabled while doing the clamp */ + if (clamp && !ep_sel) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ret = regmap_update_bits(arizona->regmap, ARIZONA_OUTPUT_ENABLES_1, ARIZONA_OUT1L_ENA | @@ -144,6 +255,7 @@ static void arizona_extcon_do_magic(struct arizona_extcon_info *info, ret); } +<<<<<<< HEAD ret = regmap_update_bits(arizona->regmap, 0x225, 0x4000, magic); if (ret != 0) @@ -158,6 +270,24 @@ static void arizona_extcon_do_magic(struct arizona_extcon_info *info, /* Restore the desired state while not doing the magic */ if (!magic) { +======= + if (mask) { + ret = regmap_update_bits(arizona->regmap, ARIZONA_HP_CTRL_1L, + ARIZONA_RMV_SHRT_HP1L, val); + if (ret != 0) + dev_warn(arizona->dev, "Failed to do clamp: %d\n", + ret); + + ret = regmap_update_bits(arizona->regmap, ARIZONA_HP_CTRL_1R, + ARIZONA_RMV_SHRT_HP1R, val); + if (ret != 0) + dev_warn(arizona->dev, "Failed to do clamp: %d\n", + ret); + } + + /* Restore the desired state while not doing the clamp */ + if (!clamp && !ep_sel) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ret = regmap_update_bits(arizona->regmap, ARIZONA_OUTPUT_ENABLES_1, ARIZONA_OUT1L_ENA | @@ -182,7 +312,12 @@ static void arizona_extcon_set_mode(struct arizona_extcon_info *info, int mode) info->micd_modes[mode].gpio); regmap_update_bits(arizona->regmap, ARIZONA_MIC_DETECT_1, ARIZONA_MICD_BIAS_SRC_MASK, +<<<<<<< HEAD info->micd_modes[mode].bias); +======= + info->micd_modes[mode].bias << + ARIZONA_MICD_BIAS_SRC_SHIFT); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1, ARIZONA_ACCDET_SRC, info->micd_modes[mode].src); @@ -193,6 +328,7 @@ static void arizona_extcon_set_mode(struct arizona_extcon_info *info, int mode) static const char *arizona_extcon_get_micbias(struct arizona_extcon_info *info) { +<<<<<<< HEAD switch (info->micd_modes[0].bias >> ARIZONA_MICD_BIAS_SRC_SHIFT) { case 1: return "MICBIAS1"; @@ -202,6 +338,35 @@ static const char *arizona_extcon_get_micbias(struct arizona_extcon_info *info) return "MICBIAS3"; default: return "MICVDD"; +======= + struct arizona *arizona = info->arizona; + + switch (arizona->type) { + case CS47L35: + switch (info->micd_modes[0].bias) { + case 1: + return "MICBIAS1A"; + case 2: + return "MICBIAS1B"; + case 3: + return "MICBIAS2A"; + default: + return "MICVDD"; + } + default: + switch (info->micd_modes[0].bias) { + case 1: + return "MICBIAS1"; + case 2: + return "MICBIAS2"; + case 3: + return "MICBIAS3"; + case 4: + return "MICBIAS4"; + default: + return "MICVDD"; + } +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } } @@ -242,6 +407,10 @@ static void arizona_start_mic(struct arizona_extcon_info *info) struct arizona *arizona = info->arizona; bool change; int ret; +<<<<<<< HEAD +======= + unsigned int mode; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* Microphone detection can't use idle mode */ pm_runtime_get(info->dev); @@ -267,9 +436,20 @@ static void arizona_start_mic(struct arizona_extcon_info *info) regmap_write(arizona->regmap, 0x80, 0x0); } +<<<<<<< HEAD regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1, ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); +======= + if (info->detecting && arizona->pdata.micd_software_compare) + mode = ARIZONA_ACCDET_MODE_ADC; + else + mode = ARIZONA_ACCDET_MODE_MIC; + + regmap_update_bits(arizona->regmap, + ARIZONA_ACCESSORY_DETECT_MODE_1, + ARIZONA_ACCDET_MODE_MASK, mode); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed arizona_extcon_pulse_micbias(info); @@ -326,6 +506,7 @@ static void arizona_stop_mic(struct arizona_extcon_info *info) } static struct { +<<<<<<< HEAD unsigned int factor_a; unsigned int factor_b; } arizona_hpdet_b_ranges[] = { @@ -334,6 +515,19 @@ static struct { { 11065, 65460395 }, }; +======= + unsigned int threshold; + unsigned int factor_a; + unsigned int factor_b; +} arizona_hpdet_b_ranges[] = { + { 100, 5528, 362464 }, + { 169, 11084, 6186851 }, + { 169, 11065, 65460395 }, +}; + +#define ARIZONA_HPDET_B_RANGE_MAX 0x3fb + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed static struct { int min; int max; @@ -357,7 +551,11 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) return ret; } +<<<<<<< HEAD switch (info->hpdet_ip) { +======= + switch (info->hpdet_ip_version) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed case 0: if (!(val & ARIZONA_HP_DONE)) { dev_err(arizona->dev, "HPDET did not complete: %x\n", @@ -388,7 +586,12 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) >> ARIZONA_HP_IMPEDANCE_RANGE_SHIFT; if (range < ARRAY_SIZE(arizona_hpdet_b_ranges) - 1 && +<<<<<<< HEAD (val < 100 || val > 0x3fb)) { +======= + (val < arizona_hpdet_b_ranges[range].threshold || + val >= ARIZONA_HPDET_B_RANGE_MAX)) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed range++; dev_dbg(arizona->dev, "Moving to HPDET range %d\n", range); @@ -401,7 +604,12 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) } /* If we go out of range report top of range */ +<<<<<<< HEAD if (val < 100 || val > 0x3fb) { +======= + if (val < arizona_hpdet_b_ranges[range].threshold || + val >= ARIZONA_HPDET_B_RANGE_MAX) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dev_dbg(arizona->dev, "Measurement out of range\n"); return ARIZONA_HPDET_MAX; } @@ -416,7 +624,11 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) default: dev_warn(arizona->dev, "Unknown HPDET IP revision %d\n", +<<<<<<< HEAD info->hpdet_ip); +======= + info->hpdet_ip_version); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed case 2: if (!(val & ARIZONA_HP_DONE_B)) { dev_err(arizona->dev, "HPDET did not complete: %x\n", @@ -425,12 +637,18 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) } val &= ARIZONA_HP_LVL_B_MASK; +<<<<<<< HEAD +======= + /* Convert to ohms, the value is in 0.5 ohm increments */ + val /= 2; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed regmap_read(arizona->regmap, ARIZONA_HEADPHONE_DETECT_1, &range); range = (range & ARIZONA_HP_IMPEDANCE_RANGE_MASK) >> ARIZONA_HP_IMPEDANCE_RANGE_SHIFT; +<<<<<<< HEAD /* Skip up or down a range? */ if (range && (val < arizona_hpdet_c_ranges[range].min)) { range--; @@ -445,6 +663,9 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) return -EAGAIN; } +======= + /* Skip up a range, or report? */ +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (range < ARRAY_SIZE(arizona_hpdet_c_ranges) - 1 && (val >= arizona_hpdet_c_ranges[range].max)) { range++; @@ -458,8 +679,20 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) ARIZONA_HP_IMPEDANCE_RANGE_SHIFT); return -EAGAIN; } +<<<<<<< HEAD + } + +======= + + if (range && (val < arizona_hpdet_c_ranges[range].min)) { + dev_dbg(arizona->dev, "Reporting range boundary %d\n", + arizona_hpdet_c_ranges[range].min); + val = arizona_hpdet_c_ranges[range].min; + } } + arizona->hp_impedance = val; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dev_dbg(arizona->dev, "HP impedance %d ohms\n", val); return val; } @@ -514,7 +747,11 @@ static int arizona_hpdet_do_id(struct arizona_extcon_info *info, int *reading, } /* +<<<<<<< HEAD * If we measure the mic as +======= + * If we measure the mic as high impedance +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed */ if (!id_gpio || info->hpdet_res[1] > 50) { dev_dbg(arizona->dev, "Detected mic\n"); @@ -564,11 +801,18 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data) } ret = arizona_hpdet_read(info); +<<<<<<< HEAD if (ret == -EAGAIN) { goto out; } else if (ret < 0) { goto done; } +======= + if (ret == -EAGAIN) + goto out; + else if (ret < 0) + goto done; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed reading = ret; /* Reset back to starting range */ @@ -578,11 +822,18 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data) 0); ret = arizona_hpdet_do_id(info, &reading, &mic); +<<<<<<< HEAD if (ret == -EAGAIN) { goto out; } else if (ret < 0) { goto done; } +======= + if (ret == -EAGAIN) + goto out; + else if (ret < 0) + goto done; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* Report high impedence cables as line outputs */ if (reading >= 5000) @@ -595,9 +846,21 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data) dev_err(arizona->dev, "Failed to report HP/line: %d\n", ret); +<<<<<<< HEAD arizona_extcon_do_magic(info, 0); done: +======= +done: + /* Reset back to starting range */ + regmap_update_bits(arizona->regmap, + ARIZONA_HEADPHONE_DETECT_1, + ARIZONA_HP_IMPEDANCE_RANGE_MASK | ARIZONA_HP_POLL, + 0); + + arizona_extcon_hp_clamp(info, false); + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (id_gpio) gpio_set_value_cansleep(id_gpio, 0); @@ -641,7 +904,11 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info) if (info->mic) arizona_stop_mic(info); +<<<<<<< HEAD arizona_extcon_do_magic(info, 0x4000); +======= + arizona_extcon_hp_clamp(info, true); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ret = regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1, @@ -667,9 +934,14 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info) ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); /* Just report headphone */ +<<<<<<< HEAD ret = extcon_update_state(&info->edev, 1 << ARIZONA_CABLE_HEADPHONE, 1 << ARIZONA_CABLE_HEADPHONE); +======= + ret = extcon_set_cable_state_(&info->edev, + ARIZONA_CABLE_HEADPHONE, true); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (ret != 0) dev_err(arizona->dev, "Failed to report headphone: %d\n", ret); @@ -693,7 +965,11 @@ static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info) info->hpdet_active = true; +<<<<<<< HEAD arizona_extcon_do_magic(info, 0x4000); +======= + arizona_extcon_hp_clamp(info, true); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ret = regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1, @@ -726,9 +1002,14 @@ static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info) ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); /* Just report headphone */ +<<<<<<< HEAD ret = extcon_update_state(&info->edev, 1 << ARIZONA_CABLE_HEADPHONE, 1 << ARIZONA_CABLE_HEADPHONE); +======= + ret = extcon_set_cable_state_(&info->edev, + ARIZONA_CABLE_HEADPHONE, true); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (ret != 0) dev_err(arizona->dev, "Failed to report headphone: %d\n", ret); @@ -738,8 +1019,13 @@ static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info) static void arizona_micd_timeout_work(struct work_struct *work) { struct arizona_extcon_info *info = container_of(work, +<<<<<<< HEAD struct arizona_extcon_info, micd_timeout_work.work); +======= + struct arizona_extcon_info, + micd_timeout_work.work); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed mutex_lock(&info->lock); @@ -756,8 +1042,13 @@ static void arizona_micd_timeout_work(struct work_struct *work) static void arizona_micd_detect(struct work_struct *work) { struct arizona_extcon_info *info = container_of(work, +<<<<<<< HEAD struct arizona_extcon_info, micd_detect_work.work); +======= + struct arizona_extcon_info, + micd_detect_work.work); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed struct arizona *arizona = info->arizona; unsigned int val = 0, lvl; int ret, i, key; @@ -766,10 +1057,62 @@ static void arizona_micd_detect(struct work_struct *work) mutex_lock(&info->lock); +<<<<<<< HEAD for (i = 0; i < 10 && !(val & 0x7fc); i++) { ret = regmap_read(arizona->regmap, ARIZONA_MIC_DETECT_3, &val); if (ret != 0) { dev_err(arizona->dev, "Failed to read MICDET: %d\n", ret); +======= + /* If the cable was removed while measuring ignore the result */ + ret = extcon_get_cable_state_(&info->edev, ARIZONA_CABLE_MECHANICAL); + if (ret < 0) { + dev_err(arizona->dev, "Failed to check cable state: %d\n", + ret); + mutex_unlock(&info->lock); + return; + } else if (!ret) { + dev_dbg(arizona->dev, "Ignoring MICDET for removed cable\n"); + mutex_unlock(&info->lock); + return; + } + + if (info->detecting && arizona->pdata.micd_software_compare) { + /* Must disable MICD before we read the ADCVAL */ + regmap_update_bits(arizona->regmap, ARIZONA_MIC_DETECT_1, + ARIZONA_MICD_ENA, 0); + ret = regmap_read(arizona->regmap, ARIZONA_MIC_DETECT_4, &val); + if (ret != 0) { + dev_err(arizona->dev, + "Failed to read MICDET_ADCVAL: %d\n", + ret); + mutex_unlock(&info->lock); + return; + } + + dev_dbg(arizona->dev, "MICDET_ADCVAL: %x\n", val); + + val &= ARIZONA_MICDET_ADCVAL_MASK; + if (val < ARRAY_SIZE(arizona_micd_levels)) + val = arizona_micd_levels[val]; + else + val = INT_MAX; + + if (val <= QUICK_HEADPHONE_MAX_OHM) + val = ARIZONA_MICD_STS | ARIZONA_MICD_LVL_0; + else if (val <= MICROPHONE_MIN_OHM) + val = ARIZONA_MICD_STS | ARIZONA_MICD_LVL_1; + else if (val <= MICROPHONE_MAX_OHM) + val = ARIZONA_MICD_STS | ARIZONA_MICD_LVL_8; + else + val = ARIZONA_MICD_LVL_8; + } + + for (i = 0; i < 10 && !(val & MICD_LVL_0_TO_8); i++) { + ret = regmap_read(arizona->regmap, ARIZONA_MIC_DETECT_3, &val); + if (ret != 0) { + dev_err(arizona->dev, + "Failed to read MICDET: %d\n", ret); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed mutex_unlock(&info->lock); return; } @@ -777,13 +1120,22 @@ static void arizona_micd_detect(struct work_struct *work) dev_dbg(arizona->dev, "MICDET: %x\n", val); if (!(val & ARIZONA_MICD_VALID)) { +<<<<<<< HEAD dev_warn(arizona->dev, "Microphone detection state invalid\n"); +======= + dev_warn(arizona->dev, + "Microphone detection state invalid\n"); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed mutex_unlock(&info->lock); return; } } +<<<<<<< HEAD if (i == 10 && !(val & 0x7fc)) { +======= + if (i == 10 && !(val & MICD_LVL_0_TO_8)) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dev_err(arizona->dev, "Failed to get valid MICDET value\n"); mutex_unlock(&info->lock); return; @@ -792,24 +1144,52 @@ static void arizona_micd_detect(struct work_struct *work) /* Due to jack detect this should never happen */ if (!(val & ARIZONA_MICD_STS)) { dev_warn(arizona->dev, "Detected open circuit\n"); +<<<<<<< HEAD +======= + info->mic = arizona->pdata.micd_open_circuit_declare; + if (!info->mic) { + arizona_stop_mic(info); + } else { + /* Don't need to regulate for button detection */ + ret = regulator_allow_bypass(info->micvdd, true); + if (ret != 0) { + dev_err(arizona->dev, + "Failed to bypass MICVDD: %d\n", + ret); + } + } + arizona_identify_headphone(info); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed info->detecting = false; goto handled; } /* If we got a high impedence we should have a headset, report it. */ +<<<<<<< HEAD if (info->detecting && (val & 0x400)) { arizona_identify_headphone(info); ret = extcon_update_state(&info->edev, 1 << ARIZONA_CABLE_MICROPHONE, 1 << ARIZONA_CABLE_MICROPHONE); +======= + if (info->detecting && (val & ARIZONA_MICD_LVL_8)) { + arizona_identify_headphone(info); + + ret = extcon_set_cable_state_(&info->edev, + ARIZONA_CABLE_MICROPHONE, true); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (ret != 0) dev_err(arizona->dev, "Headset report failed: %d\n", ret); /* Don't need to regulate for button detection */ +<<<<<<< HEAD ret = regulator_allow_bypass(info->micvdd, false); +======= + ret = regulator_allow_bypass(info->micvdd, true); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (ret != 0) { dev_err(arizona->dev, "Failed to bypass MICVDD: %d\n", ret); @@ -826,7 +1206,11 @@ static void arizona_micd_detect(struct work_struct *work) * plain headphones. If both polarities report a low * impedence then give up and report headphones. */ +<<<<<<< HEAD if (info->detecting && (val & 0x3f8)) { +======= + if (info->detecting && (val & MICD_LVL_1_TO_7)) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (info->jack_flips >= info->micd_num_modes * 10) { dev_dbg(arizona->dev, "Detected HP/line\n"); arizona_identify_headphone(info); @@ -850,7 +1234,11 @@ static void arizona_micd_detect(struct work_struct *work) * If we're still detecting and we detect a short then we've * got a headphone. Otherwise it's a button press. */ +<<<<<<< HEAD if (val & 0x3fc) { +======= + if (val & MICD_LVL_0_TO_7) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (info->mic) { dev_dbg(arizona->dev, "Mic button detected\n"); @@ -889,9 +1277,22 @@ static void arizona_micd_detect(struct work_struct *work) } handled: +<<<<<<< HEAD if (info->detecting) schedule_delayed_work(&info->micd_timeout_work, msecs_to_jiffies(info->micd_timeout)); +======= + if (info->detecting) { + if (arizona->pdata.micd_software_compare) + regmap_update_bits(arizona->regmap, + ARIZONA_MIC_DETECT_1, + ARIZONA_MICD_ENA, + ARIZONA_MICD_ENA); + + schedule_delayed_work(&info->micd_timeout_work, + msecs_to_jiffies(info->micd_timeout)); + } +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed pm_runtime_mark_last_busy(info->dev); mutex_unlock(&info->lock); @@ -923,8 +1324,13 @@ static irqreturn_t arizona_micdet(int irq, void *data) static void arizona_hpdet_work(struct work_struct *work) { struct arizona_extcon_info *info = container_of(work, +<<<<<<< HEAD struct arizona_extcon_info, hpdet_work.work); +======= + struct arizona_extcon_info, + hpdet_work.work); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed mutex_lock(&info->lock); arizona_start_hpdet_acc_id(info); @@ -935,7 +1341,11 @@ static irqreturn_t arizona_jackdet(int irq, void *data) { struct arizona_extcon_info *info = data; struct arizona *arizona = info->arizona; +<<<<<<< HEAD unsigned int val, present, mask; +======= + unsigned int reg, val, present, mask; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed bool cancelled_hp, cancelled_mic; int ret, i; @@ -946,6 +1356,7 @@ static irqreturn_t arizona_jackdet(int irq, void *data) mutex_lock(&info->lock); +<<<<<<< HEAD if (arizona->pdata.jd_gpio5) { mask = ARIZONA_MICD_CLAMP_STS; present = 0; @@ -955,6 +1366,45 @@ static irqreturn_t arizona_jackdet(int irq, void *data) } ret = regmap_read(arizona->regmap, ARIZONA_AOD_IRQ_RAW_STATUS, &val); +======= + switch (arizona->type) { + case WM5102: + case WM5110: + case WM8997: + case WM8998: + case WM1814: + case WM8280: + if (arizona->pdata.jd_gpio5) { + mask = ARIZONA_MICD_CLAMP_STS; + present = 0; + } else { + mask = ARIZONA_JD1_STS; + if (arizona->pdata.jd_invert) + present = 0; + else + present = ARIZONA_JD1_STS; + } + + reg = ARIZONA_AOD_IRQ_RAW_STATUS; + break; + default: + if (arizona->pdata.jd_gpio5) { + mask = CLEARWATER_MICD_CLAMP_RISE_STS1; + present = 0; + } else { + mask = ARIZONA_JD1_STS; + if (arizona->pdata.jd_invert) + present = 0; + else + present = ARIZONA_JD1_STS; + } + + reg = CLEARWATER_IRQ1_RAW_STATUS_7; + break; + } + + ret = regmap_read(arizona->regmap, reg, &val); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (ret != 0) { dev_err(arizona->dev, "Failed to read jackdet status: %d\n", ret); @@ -970,14 +1420,42 @@ static irqreturn_t arizona_jackdet(int irq, void *data) schedule_delayed_work(&info->hpdet_work, msecs_to_jiffies(HPDET_DEBOUNCE)); +<<<<<<< HEAD if (cancelled_mic) schedule_delayed_work(&info->micd_timeout_work, msecs_to_jiffies(info->micd_timeout)); +======= + if (cancelled_mic) { + int micd_timeout = info->micd_timeout; + + schedule_delayed_work(&info->micd_timeout_work, + msecs_to_jiffies(micd_timeout)); + } +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed goto out; } info->last_jackdet = val; +<<<<<<< HEAD +======= + switch (arizona->type) { + case WM5102: + case WM5110: + case WM8997: + case WM8998: + case WM1814: + case WM8280: + reg = ARIZONA_JACK_DETECT_DEBOUNCE; + mask = ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB; + break; + default: + reg = CLEARWATER_INTERRUPT_DEBOUNCE_7; + mask = CLEARWATER_MICD_CLAMP_DB | CLEARWATER_JD1_DB; + break; + } + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (info->last_jackdet == present) { dev_dbg(arizona->dev, "Detected jack\n"); ret = extcon_set_cable_state_(&info->edev, @@ -992,15 +1470,25 @@ static irqreturn_t arizona_jackdet(int irq, void *data) info->mic = false; info->jack_flips = 0; +<<<<<<< HEAD +======= + if (arizona->pdata.init_mic_delay) + msleep(arizona->pdata.init_mic_delay); + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed arizona_start_mic(info); } else { schedule_delayed_work(&info->hpdet_work, msecs_to_jiffies(HPDET_DEBOUNCE)); } +<<<<<<< HEAD regmap_update_bits(arizona->regmap, ARIZONA_JACK_DETECT_DEBOUNCE, ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB, 0); +======= + regmap_update_bits(arizona->regmap, reg, mask, 0); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } else { dev_dbg(arizona->dev, "Detected jack removal\n"); @@ -1012,6 +1500,10 @@ static irqreturn_t arizona_jackdet(int irq, void *data) info->mic = false; info->hpdet_done = false; info->hpdet_retried = false; +<<<<<<< HEAD +======= + arizona->hp_impedance = 0; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed for (i = 0; i < info->num_micd_ranges; i++) input_report_key(info->input, @@ -1023,10 +1515,14 @@ static irqreturn_t arizona_jackdet(int irq, void *data) dev_err(arizona->dev, "Removal report failed: %d\n", ret); +<<<<<<< HEAD regmap_update_bits(arizona->regmap, ARIZONA_JACK_DETECT_DEBOUNCE, ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB, ARIZONA_MICD_CLAMP_DB | ARIZONA_JD1_DB); +======= + regmap_update_bits(arizona->regmap, reg, mask, mask); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } if (arizona->pdata.micd_timeout) @@ -1034,6 +1530,7 @@ static irqreturn_t arizona_jackdet(int irq, void *data) else info->micd_timeout = DEFAULT_MICD_TIMEOUT; +<<<<<<< HEAD /* Clear trig_sts to make sure DCVDD is not forced up */ regmap_write(arizona->regmap, ARIZONA_AOD_WKUP_AND_TRIG, ARIZONA_MICD_CLAMP_FALL_TRIG_STS | @@ -1042,6 +1539,27 @@ static irqreturn_t arizona_jackdet(int irq, void *data) ARIZONA_JD1_RISE_TRIG_STS); out: +======= +out: + switch (arizona->type) { + case WM5102: + case WM5110: + case WM8997: + case WM8998: + case WM1814: + case WM8280: + /* Clear trig_sts to make sure DCVDD is not forced up */ + regmap_write(arizona->regmap, ARIZONA_AOD_WKUP_AND_TRIG, + ARIZONA_MICD_CLAMP_FALL_TRIG_STS | + ARIZONA_MICD_CLAMP_RISE_TRIG_STS | + ARIZONA_JD1_FALL_TRIG_STS | + ARIZONA_JD1_RISE_TRIG_STS); + break; + default: + break; + } + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed mutex_unlock(&info->lock); pm_runtime_mark_last_busy(info->dev); @@ -1070,18 +1588,201 @@ static void arizona_micd_set_level(struct arizona *arizona, int index, regmap_update_bits(arizona->regmap, reg, mask, level); } +<<<<<<< HEAD static int arizona_extcon_probe(struct platform_device *pdev) { struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); struct arizona_pdata *pdata; struct arizona_extcon_info *info; unsigned int val; +======= +#ifdef CONFIG_OF +static int arizona_extcon_of_get_pdata(struct arizona *arizona) +{ + struct arizona_pdata *pdata = &arizona->pdata; + + arizona_of_read_s32(arizona, "wlf,micd-detect-debounce", false, + &pdata->micd_detect_debounce); + + pdata->micd_pol_gpio = arizona_of_get_named_gpio(arizona, + "wlf,micd-pol-gpio", + false); + + arizona_of_read_s32(arizona, "wlf,micd-bias-start-time", false, + &pdata->micd_bias_start_time); + + arizona_of_read_s32(arizona, "wlf,micd-rate", false, + &pdata->micd_rate); + + arizona_of_read_s32(arizona, "wlf,micd-dbtime", false, + &pdata->micd_dbtime); + + arizona_of_read_s32(arizona, "wlf,micd-timeout", false, + &pdata->micd_timeout); + + pdata->micd_force_micbias = + of_property_read_bool(arizona->dev->of_node, + "wlf,micd-force-micbias"); + + pdata->micd_software_compare = + of_property_read_bool(arizona->dev->of_node, + "wlf,micd-software-compare"); + + pdata->micd_open_circuit_declare = + of_property_read_bool(arizona->dev->of_node, + "wlf,micd-open-circuit-declare"); + + pdata->jd_gpio5 = of_property_read_bool(arizona->dev->of_node, + "wlf,use-jd-gpio"); + + pdata->jd_gpio5_nopull = of_property_read_bool(arizona->dev->of_node, + "wlf,jd-gpio-nopull"); + + pdata->jd_invert = of_property_read_bool(arizona->dev->of_node, + "wlf,jd-invert"); + + arizona_of_read_u32(arizona, "wlf,gpsw", false, &pdata->gpsw); + + arizona_of_read_s32(arizona, "wlf,init-mic-delay", false, + &pdata->init_mic_delay); + + arizona_of_read_u32(arizona, "wlf,micd-clamp-mode", false, + &pdata->micd_clamp_mode); + + return 0; +} +#else +static inline int arizona_extcon_of_get_pdata(struct arizona *arizona) +{ + return 0; +} +#endif + +static ssize_t arizona_extcon_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct platform_device *pdev = to_platform_device(dev); + struct arizona_extcon_info *info = platform_get_drvdata(pdev); + + return scnprintf(buf, PAGE_SIZE, "%d\n", info->arizona->hp_impedance); +} + +static void arizona_extcon_set_micd_clamp_mode(struct arizona *arizona) +{ + unsigned int clamp_ctrl_reg, clamp_ctrl_mask, clamp_ctrl_val; + unsigned int clamp_db_reg, clamp_db_mask, clamp_db_val; + int val; + + /* Set up the regs */ + switch (arizona->type) { + case WM5102: + case WM8997: + case WM8998: + case WM1814: + case WM8280: + case WM5110: + clamp_ctrl_reg = ARIZONA_MICD_CLAMP_CONTROL; + clamp_ctrl_mask = ARIZONA_MICD_CLAMP_MODE_MASK; + + clamp_db_reg = ARIZONA_JACK_DETECT_DEBOUNCE; + clamp_db_mask = ARIZONA_MICD_CLAMP_DB; + clamp_db_val = ARIZONA_MICD_CLAMP_DB; + break; + default: + clamp_ctrl_reg = CLEARWATER_MICD_CLAMP_CONTROL; + clamp_ctrl_mask = ARIZONA_MICD_CLAMP_MODE_MASK; + + clamp_db_reg = CLEARWATER_INTERRUPT_DEBOUNCE_7; + clamp_db_mask = CLEARWATER_MICD_CLAMP_DB; + clamp_db_val = CLEARWATER_MICD_CLAMP_DB; + + regmap_update_bits(arizona->regmap, + CLEARWATER_MICD_CLAMP_CONTROL, + 0x10, 0); + break; + } + + /* If the user has supplied a micd_clamp_mode, assume they know + * what they are doing and just write it out + */ + if (arizona->pdata.micd_clamp_mode) { + clamp_ctrl_val = arizona->pdata.micd_clamp_mode; + goto out; + } + + switch (arizona->type) { + case WM5102: + case WM8997: + case WM8998: + case WM1814: + case WM8280: + case WM5110: + if (arizona->pdata.jd_gpio5) { + /* Put the GPIO into input mode with optional pull */ + val = 0xc101; + if (arizona->pdata.jd_gpio5_nopull) + val &= ~ARIZONA_GPN_PU; + + regmap_write(arizona->regmap, ARIZONA_GPIO5_CTRL, + val); + + if (arizona->pdata.jd_invert) + clamp_ctrl_val = + ARIZONA_MICD_CLAMP_MODE_JDH_GP5H; + else + clamp_ctrl_val = + ARIZONA_MICD_CLAMP_MODE_JDL_GP5H; + } else { + if (arizona->pdata.jd_invert) + clamp_ctrl_val = ARIZONA_MICD_CLAMP_MODE_JDH; + else + clamp_ctrl_val = ARIZONA_MICD_CLAMP_MODE_JDL; + } + break; + default: + if (arizona->pdata.jd_gpio5) { + if (arizona->pdata.jd_invert) + clamp_ctrl_val = + ARIZONA_MICD_CLAMP_MODE_JDH_GP5H; + else + clamp_ctrl_val = + ARIZONA_MICD_CLAMP_MODE_JDL_GP5L; + } else { + if (arizona->pdata.jd_invert) + clamp_ctrl_val = ARIZONA_MICD_CLAMP_MODE_JDH; + else + clamp_ctrl_val = ARIZONA_MICD_CLAMP_MODE_JDL; + } + break; + } + +out: + regmap_update_bits(arizona->regmap, + clamp_ctrl_reg, + clamp_ctrl_mask, + clamp_ctrl_val); + + regmap_update_bits(arizona->regmap, + clamp_db_reg, + clamp_db_mask, + clamp_db_val); +} + +static int arizona_extcon_probe(struct platform_device *pdev) +{ + struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); + struct arizona_pdata *pdata = &arizona->pdata; + struct arizona_extcon_info *info; + unsigned int reg, debounce_reg, debounce_val, analog_val; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed int jack_irq_fall, jack_irq_rise; int ret, mode, i, j; if (!arizona->dapm || !arizona->dapm->card) return -EPROBE_DEFER; +<<<<<<< HEAD pdata = dev_get_platdata(arizona->dev); info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); @@ -1096,6 +1797,29 @@ static int arizona_extcon_probe(struct platform_device *pdev) ret = PTR_ERR(info->micvdd); dev_err(arizona->dev, "Failed to get MICVDD: %d\n", ret); goto err; +======= + info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); + if (!info) + return -ENOMEM; + + if (IS_ENABLED(CONFIG_OF)) { + if (!dev_get_platdata(arizona->dev)) { + ret = arizona_extcon_of_get_pdata(arizona); + if (ret < 0) + return ret; + } + } + + /* Set of_node to parent from the SPI device to allow + * location regulator supplies */ + pdev->dev.of_node = arizona->dev->of_node; + + info->micvdd = devm_regulator_get(&pdev->dev, "MICVDD"); + if (IS_ERR(info->micvdd)) { + ret = PTR_ERR(info->micvdd); + dev_err(arizona->dev, "Failed to get MICVDD: %d\n", ret); + return ret; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } mutex_init(&info->lock); @@ -1115,11 +1839,35 @@ static int arizona_extcon_probe(struct platform_device *pdev) break; default: info->micd_clamp = true; +<<<<<<< HEAD info->hpdet_ip = 1; break; } break; default: +======= + info->hpdet_ip_version = 1; + break; + } + break; + case WM8280: + case WM5110: + switch (arizona->rev) { + case 0 ... 2: + break; + default: + info->micd_clamp = true; + info->hpdet_ip_version = 2; + break; + } + break; + case CS47L35: + arizona->pdata.micd_force_micbias = true; + /* fall through to default case to set common properties */ + default: + info->micd_clamp = true; + info->hpdet_ip_version = 2; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed break; } @@ -1130,7 +1878,11 @@ static int arizona_extcon_probe(struct platform_device *pdev) if (ret < 0) { dev_err(arizona->dev, "extcon_dev_register() failed: %d\n", ret); +<<<<<<< HEAD goto err; +======= + return ret; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } info->input = devm_input_allocate_device(&pdev->dev); @@ -1142,7 +1894,10 @@ static int arizona_extcon_probe(struct platform_device *pdev) info->input->name = "Headset"; info->input->phys = "arizona/extcon"; +<<<<<<< HEAD info->input->dev.parent = &pdev->dev; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (pdata->num_micd_configs) { info->micd_modes = pdata->micd_configs; @@ -1152,6 +1907,29 @@ static int arizona_extcon_probe(struct platform_device *pdev) info->micd_num_modes = ARRAY_SIZE(micd_default_modes); } +<<<<<<< HEAD +======= + switch (arizona->type) { + case WM8997: + case WM5102: + case WM1814: + case WM8998: + case WM8280: + case WM5110: + reg = ARIZONA_GP_SWITCH_1; + break; + default: + reg = CLEARWATER_GP_SWITCH_1; + break; + } + + if (arizona->pdata.gpsw > 0) + regmap_update_bits(arizona->regmap, + reg, + ARIZONA_SW1_MODE_MASK, + arizona->pdata.gpsw); + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (arizona->pdata.micd_pol_gpio > 0) { if (info->micd_modes[0].gpio) mode = GPIOF_OUT_INIT_HIGH; @@ -1199,7 +1977,12 @@ static int arizona_extcon_probe(struct platform_device *pdev) arizona->pdata.micd_dbtime << ARIZONA_MICD_DBTIME_SHIFT); +<<<<<<< HEAD BUILD_BUG_ON(ARRAY_SIZE(arizona_micd_levels) != 0x40); +======= + BUILD_BUG_ON(ARRAY_SIZE(arizona_micd_levels) < + ARIZONA_NUM_MICD_BUTTON_LEVELS); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (arizona->pdata.num_micd_ranges) { info->micd_ranges = pdata->micd_ranges; @@ -1232,11 +2015,19 @@ static int arizona_extcon_probe(struct platform_device *pdev) /* Set up all the buttons the user specified */ for (i = 0; i < info->num_micd_ranges; i++) { +<<<<<<< HEAD for (j = 0; j < ARRAY_SIZE(arizona_micd_levels); j++) if (arizona_micd_levels[j] >= info->micd_ranges[i].max) break; if (j == ARRAY_SIZE(arizona_micd_levels)) { +======= + for (j = 0; j < ARIZONA_NUM_MICD_BUTTON_LEVELS; j++) + if (arizona_micd_levels[j] >= info->micd_ranges[i].max) + break; + + if (j == ARIZONA_NUM_MICD_BUTTON_LEVELS) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dev_err(arizona->dev, "Unsupported MICD level %d\n", info->micd_ranges[i].max); ret = -EINVAL; @@ -1263,6 +2054,7 @@ static int arizona_extcon_probe(struct platform_device *pdev) * If we have a clamp use it, activating in conjunction with * GPIO5 if that is connected for jack detect operation. */ +<<<<<<< HEAD if (info->micd_clamp) { if (arizona->pdata.jd_gpio5) { /* Put the GPIO into input mode with optional pull */ @@ -1287,6 +2079,10 @@ static int arizona_extcon_probe(struct platform_device *pdev) ARIZONA_MICD_CLAMP_DB, ARIZONA_MICD_CLAMP_DB); } +======= + if (info->micd_clamp) + arizona_extcon_set_micd_clamp_mode(arizona); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed arizona_extcon_set_mode(info, 0); @@ -1346,10 +2142,42 @@ static int arizona_extcon_probe(struct platform_device *pdev) } arizona_clk32k_enable(arizona); +<<<<<<< HEAD regmap_update_bits(arizona->regmap, ARIZONA_JACK_DETECT_DEBOUNCE, ARIZONA_JD1_DB, ARIZONA_JD1_DB); regmap_update_bits(arizona->regmap, ARIZONA_JACK_DETECT_ANALOGUE, ARIZONA_JD1_ENA, ARIZONA_JD1_ENA); +======= + + switch (arizona->type) { + case WM8997: + case WM5102: + case WM1814: + case WM8998: + case WM8280: + case WM5110: + debounce_reg = ARIZONA_JACK_DETECT_DEBOUNCE; + debounce_val = ARIZONA_JD1_DB; + analog_val = ARIZONA_JD1_ENA; + break; + default: + debounce_reg = CLEARWATER_INTERRUPT_DEBOUNCE_7; + + if (arizona->pdata.jd_gpio5) { + debounce_val = CLEARWATER_JD1_DB | CLEARWATER_JD2_DB; + analog_val = ARIZONA_JD1_ENA | ARIZONA_JD2_ENA; + } else { + debounce_val = CLEARWATER_JD1_DB; + analog_val = ARIZONA_JD1_ENA; + } + break; + } + + regmap_update_bits(arizona->regmap, debounce_reg, + debounce_val, debounce_val); + regmap_update_bits(arizona->regmap, ARIZONA_JACK_DETECT_ANALOGUE, + analog_val, analog_val); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ret = regulator_allow_bypass(info->micvdd, true); if (ret != 0) @@ -1364,6 +2192,15 @@ static int arizona_extcon_probe(struct platform_device *pdev) goto err_hpdet; } +<<<<<<< HEAD +======= + ret = device_create_file(&pdev->dev, &dev_attr_hp_impedance); + if (ret != 0) + dev_err(&pdev->dev, + "Failed to create sysfs node for hp_impedance %d\n", + ret); + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return 0; err_hpdet: @@ -1382,7 +2219,10 @@ static int arizona_extcon_probe(struct platform_device *pdev) err_register: pm_runtime_disable(&pdev->dev); extcon_dev_unregister(&info->edev); +<<<<<<< HEAD err: +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return ret; } @@ -1394,9 +2234,27 @@ static int arizona_extcon_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); +<<<<<<< HEAD regmap_update_bits(arizona->regmap, ARIZONA_MICD_CLAMP_CONTROL, ARIZONA_MICD_CLAMP_MODE_MASK, 0); +======= + switch (arizona->type) { + case WM5102: + case WM8997: + case WM8998: + case WM1814: + case WM8280: + case WM5110: + regmap_update_bits(arizona->regmap, ARIZONA_MICD_CLAMP_CONTROL, + ARIZONA_MICD_CLAMP_MODE_MASK, 0); + break; + default: + regmap_update_bits(arizona->regmap, CLEARWATER_MICD_CLAMP_CONTROL, + ARIZONA_MICD_CLAMP_MODE_MASK, 0); + break; + } +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (arizona->pdata.jd_gpio5) { jack_irq_rise = ARIZONA_IRQ_MICD_CLAMP_RISE; @@ -1416,6 +2274,11 @@ static int arizona_extcon_remove(struct platform_device *pdev) regmap_update_bits(arizona->regmap, ARIZONA_JACK_DETECT_ANALOGUE, ARIZONA_JD1_ENA, 0); arizona_clk32k_disable(arizona); +<<<<<<< HEAD +======= + + device_remove_file(&pdev->dev, &dev_attr_hp_impedance); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed extcon_dev_unregister(&info->edev); return 0; diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 60adc04b056..e0ab35fe441 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c @@ -470,7 +470,12 @@ int extcon_register_interest(struct extcon_specific_cable_nb *obj, if (!obj->edev) return -ENODEV; +<<<<<<< HEAD obj->cable_index = extcon_find_cable_index(obj->edev, cable_name); +======= + obj->cable_index = extcon_find_cable_index(obj->edev, + cable_name); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (obj->cable_index < 0) return obj->cable_index; @@ -478,7 +483,12 @@ int extcon_register_interest(struct extcon_specific_cable_nb *obj, obj->internal_nb.notifier_call = _call_per_cable; +<<<<<<< HEAD return raw_notifier_chain_register(&obj->edev->nh, &obj->internal_nb); +======= + return raw_notifier_chain_register(&obj->edev->nh, + &obj->internal_nb); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } else { struct class_dev_iter iter; struct extcon_dev *extd; diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 9966fc0a527..99434b9c5f6 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c @@ -189,6 +189,7 @@ enum max77693_muic_acc_type { /* The below accessories have same ADC value so ADCLow and ADC1K bit is used to separate specific accessory */ +<<<<<<< HEAD MAX77693_MUIC_GND_USB_OTG = 0x100, /* ADC:0x0, VBVolot:0, ADCLow:0, ADC1K:0 */ MAX77693_MUIC_GND_USB_OTG_VB = 0x104, /* ADC:0x0, VBVolot:1, ADCLow:0, ADC1K:0 */ MAX77693_MUIC_GND_AV_CABLE_LOAD = 0x102,/* ADC:0x0, VBVolot:0, ADCLow:1, ADC1K:0 */ @@ -197,6 +198,19 @@ enum max77693_muic_acc_type { }; /* MAX77693 MUIC device support below list of accessories(external connector) */ +======= + /* ADC|VBVolot|ADCLow|ADC1K| */ + MAX77693_MUIC_GND_USB_OTG = 0x100, /* 0x0| 0| 0| 0| */ + MAX77693_MUIC_GND_USB_OTG_VB = 0x104, /* 0x0| 1| 0| 0| */ + MAX77693_MUIC_GND_AV_CABLE_LOAD = 0x102,/* 0x0| 0| 1| 0| */ + MAX77693_MUIC_GND_MHL = 0x103, /* 0x0| 0| 1| 1| */ + MAX77693_MUIC_GND_MHL_VB = 0x107, /* 0x0| 1| 1| 1| */ +}; + +/* + * MAX77693 MUIC device support below list of accessories(external connector) + */ +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed enum { EXTCON_CABLE_USB = 0, EXTCON_CABLE_USB_HOST, @@ -395,12 +409,21 @@ static int max77693_muic_get_cable_type(struct max77693_muic_info *info, vbvolt >>= STATUS2_VBVOLT_SHIFT; /** +<<<<<<< HEAD * [0x1][VBVolt][ADCLow][ADC1K] * [0x1 0 0 0 ] : USB_OTG * [0x1 1 0 0 ] : USB_OTG_VB * [0x1 0 1 0 ] : Audio Video Cable with load * [0x1 0 1 1 ] : MHL without charging connector * [0x1 1 1 1 ] : MHL with charging connector +======= + * [0x1|VBVolt|ADCLow|ADC1K] + * [0x1| 0| 0| 0] USB_OTG + * [0x1| 1| 0| 0] USB_OTG_VB + * [0x1| 0| 1| 0] Audio Video cable with load + * [0x1| 0| 1| 1] MHL without charging cable + * [0x1| 1| 1| 1] MHL with charging cable +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed */ cable_type = ((0x1 << 8) | (vbvolt << 2) @@ -723,11 +746,19 @@ static int max77693_muic_adc_handler(struct max77693_muic_info *info) if (ret < 0) return ret; break; +<<<<<<< HEAD case MAX77693_MUIC_ADC_REMOTE_S3_BUTTON: /* DOCK_KEY_PREV */ case MAX77693_MUIC_ADC_REMOTE_S7_BUTTON: /* DOCK_KEY_NEXT */ case MAX77693_MUIC_ADC_REMOTE_S9_BUTTON: /* DOCK_VOL_DOWN */ case MAX77693_MUIC_ADC_REMOTE_S10_BUTTON: /* DOCK_VOL_UP */ case MAX77693_MUIC_ADC_REMOTE_S12_BUTTON: /* DOCK_KEY_PLAY_PAUSE */ +======= + case MAX77693_MUIC_ADC_REMOTE_S3_BUTTON: /* DOCK_KEY_PREV */ + case MAX77693_MUIC_ADC_REMOTE_S7_BUTTON: /* DOCK_KEY_NEXT */ + case MAX77693_MUIC_ADC_REMOTE_S9_BUTTON: /* DOCK_VOL_DOWN */ + case MAX77693_MUIC_ADC_REMOTE_S10_BUTTON: /* DOCK_VOL_UP */ + case MAX77693_MUIC_ADC_REMOTE_S12_BUTTON: /* DOCK_KEY_PLAY_PAUSE */ +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* * Button of DOCK device * - the Prev/Next/Volume Up/Volume Down/Play-Pause button @@ -815,6 +846,7 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) case MAX77693_MUIC_GND_MHL_VB: /* * MHL cable with MHL_TA(USB/TA) cable +<<<<<<< HEAD * - MHL cable include two port(HDMI line and separate micro- * usb port. When the target connect MHL cable, extcon driver * check whether MHL_TA(USB/TA) cable is connected. If MHL_TA @@ -828,6 +860,23 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) extcon_set_cable_state(info->edev, "MHL_TA", attached); if (!cable_attached) extcon_set_cable_state(info->edev, "MHL", cable_attached); +======= + * - MHL cable include two port(HDMI line and separate + * micro-usb port. When the target connect MHL cable, + * extcon driver check whether MHL_TA(USB/TA) cable is + * connected. If MHL_TA cable is connected, extcon + * driver notify state to notifiee for charging battery. + * + * Features of 'MHL_TA(USB/TA) with MHL cable' + * - Support MHL + * - Support charging through micro-usb port without + * data connection + */ + extcon_set_cable_state(info->edev, "MHL_TA", attached); + if (!cable_attached) + extcon_set_cable_state(info->edev, + "MHL", cable_attached); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed break; } @@ -839,6 +888,7 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ /* * Dock-Audio device with USB/TA cable +<<<<<<< HEAD * - Dock device include two port(Dock-Audio and micro-usb * port). When the target connect Dock-Audio device, extcon * driver check whether USB/TA cable is connected. If USB/TA @@ -849,25 +899,51 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) * - Support external output feature of audio. * - Support charging through micro-usb port without data * connection. +======= + * - Dock device include two port(Dock-Audio and micro- + * usb port). When the target connect Dock-Audio device, + * extcon driver check whether USB/TA cable is connected + * or not. If USB/TA cable is connected, extcon driver + * notify state to notifiee for charging battery. + * + * Features of 'USB/TA cable with Dock-Audio device' + * - Support external output feature of audio. + * - Support charging through micro-usb port without + * data connection. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed */ extcon_set_cable_state(info->edev, "USB", attached); if (!cable_attached) +<<<<<<< HEAD extcon_set_cable_state(info->edev, "Dock-Audio", cable_attached); +======= + extcon_set_cable_state(info->edev, "Dock-Audio", + cable_attached); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed break; case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ /* * Dock-Smart device with USB/TA cable * - Dock-Desk device include three type of cable which * are HDMI, USB for mouse/keyboard and micro-usb port +<<<<<<< HEAD * for USB/TA cable. Dock-Smart device need always exteranl * power supply(USB/TA cable through micro-usb cable). Dock- * Smart device support screen output of target to separate * monitor and mouse/keyboard for desktop mode. +======= + * for USB/TA cable. Dock-Smart device need always + * exteranl power supply(USB/TA cable through micro-usb + * cable). Dock-Smart device support screen output of + * target to separate monitor and mouse/keyboard for + * desktop mode. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * Features of 'USB/TA cable with Dock-Smart device' * - Support MHL * - Support external output feature of audio +<<<<<<< HEAD * - Support charging through micro-usb port without data * connection if TA cable is connected to target. * - Support charging and data connection through micro-usb port @@ -880,6 +956,22 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) return ret; extcon_set_cable_state(info->edev, "Dock-Smart", attached); +======= + * - Support charging through micro-usb port without + * data connection if TA cable is connected to target. + * - Support charging and data connection through micro- + * usb port if USB cable is connected between target + * and host device + * - Support OTG device (Mouse/Keyboard) + */ + ret = max77693_muic_set_path(info, info->path_usb, + attached); + if (ret < 0) + return ret; + + extcon_set_cable_state(info->edev, "Dock-Smart", + attached); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed extcon_set_cable_state(info->edev, "MHL", attached); break; @@ -889,6 +981,7 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) switch (chg_type) { case MAX77693_CHARGER_TYPE_NONE: /* +<<<<<<< HEAD * When MHL(with USB/TA cable) or Dock-Audio with USB/TA cable * is attached, muic device happen below two interrupt. * - 'MAX77693_MUIC_IRQ_INT1_ADC' for detecting MHL/Dock-Audio. @@ -903,11 +996,34 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) * target. But USB/TA cable isn't connected to target. The user * be face with unusual action. So, driver should check this * situation in spite of, that previous charger type is N/A. +======= + * When MHL(with USB/TA cable) or Dock-Audio with USB/TA + * cable is attached, muic device happen below two irq. + * - 'MAX77693_MUIC_IRQ_INT1_ADC' for detecting + * MHL/Dock-Audio. + * - 'MAX77693_MUIC_IRQ_INT2_CHGTYP' for detecting + * USB/TA cable connected to MHL or Dock-Audio. + * Always, happen eariler MAX77693_MUIC_IRQ_INT1_ADC + * irq than MAX77693_MUIC_IRQ_INT2_CHGTYP irq. + * + * If user attach MHL (with USB/TA cable and immediately + * detach MHL with USB/TA cable before MAX77693_MUIC_IRQ + * _INT2_CHGTYP irq is happened, USB/TA cable remain + * connected state to target. But USB/TA cable isn't + * connected to target. The user be face with unusual + * action. So, driver should check this situation in + * spite of, that previous charger type is N/A. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed */ break; case MAX77693_CHARGER_TYPE_USB: /* Only USB cable, PATH:AP_USB */ +<<<<<<< HEAD ret = max77693_muic_set_path(info, info->path_usb, attached); +======= + ret = max77693_muic_set_path(info, info->path_usb, + attached); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (ret < 0) return ret; diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index 09f4a9374cf..8d5355ac119 100644 --- a/drivers/extcon/extcon-max8997.c +++ b/drivers/extcon/extcon-max8997.c @@ -426,7 +426,12 @@ static int max8997_muic_adc_handler(struct max8997_muic_info *info) break; case MAX8997_MUIC_ADC_FACTORY_MODE_USB_OFF: case MAX8997_MUIC_ADC_FACTORY_MODE_USB_ON: +<<<<<<< HEAD ret = max8997_muic_handle_usb(info, MAX8997_USB_DEVICE, attached); +======= + ret = max8997_muic_handle_usb(info, + MAX8997_USB_DEVICE, attached); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (ret < 0) return ret; break; @@ -504,7 +509,12 @@ static int max8997_muic_chg_handler(struct max8997_muic_info *info) } break; case MAX8997_CHARGER_TYPE_DOWNSTREAM_PORT: +<<<<<<< HEAD extcon_set_cable_state(info->edev, "Charge-downstream", attached); +======= + extcon_set_cable_state(info->edev, + "Charge-downstream", attached); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed break; case MAX8997_CHARGER_TYPE_DEDICATED_CHG: extcon_set_cable_state(info->edev, "TA", attached); diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c index 0ea853f68db..537c93a52b6 100644 --- a/drivers/gpio/gpio-arizona.c +++ b/drivers/gpio/gpio-arizona.c @@ -1,6 +1,10 @@ /* * gpiolib support for Wolfson Arizona class devices * +<<<<<<< HEAD +======= + * Copyright 2014 CirrusLogic, Inc. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * Copyright 2012 Wolfson Microelectronics PLC. * * Author: Mark Brown @@ -84,6 +88,74 @@ static void arizona_gpio_set(struct gpio_chip *chip, unsigned offset, int value) ARIZONA_GPN_LVL, value); } +<<<<<<< HEAD +======= +static int clearwater_gpio_direction_in(struct gpio_chip *chip, unsigned offset) +{ + struct arizona_gpio *arizona_gpio = to_arizona_gpio(chip); + struct arizona *arizona = arizona_gpio->arizona; + + offset *= 2; + + return regmap_update_bits(arizona->regmap, CLEARWATER_GPIO1_CTRL_2 + offset, + ARIZONA_GPN_DIR, ARIZONA_GPN_DIR); +} + +static int clearwater_gpio_get(struct gpio_chip *chip, unsigned offset) +{ + struct arizona_gpio *arizona_gpio = to_arizona_gpio(chip); + struct arizona *arizona = arizona_gpio->arizona; + unsigned int val; + int ret; + + offset *= 2; + + ret = regmap_read(arizona->regmap, CLEARWATER_GPIO1_CTRL_1 + offset, &val); + if (ret < 0) + return ret; + + if (val & CLEARWATER_GPN_LVL) + return 1; + else + return 0; +} + +static int clearwater_gpio_direction_out(struct gpio_chip *chip, + unsigned offset, int value) +{ + struct arizona_gpio *arizona_gpio = to_arizona_gpio(chip); + struct arizona *arizona = arizona_gpio->arizona; + int ret; + + offset *= 2; + + if (value) + value = CLEARWATER_GPN_LVL; + + ret = regmap_update_bits(arizona->regmap, CLEARWATER_GPIO1_CTRL_2 + offset, + ARIZONA_GPN_DIR, 0); + if (ret < 0) + return ret; + + return regmap_update_bits(arizona->regmap, CLEARWATER_GPIO1_CTRL_1 + offset, + CLEARWATER_GPN_LVL, value); +} + +static void clearwater_gpio_set(struct gpio_chip *chip, unsigned offset, int value) +{ + struct arizona_gpio *arizona_gpio = to_arizona_gpio(chip); + struct arizona *arizona = arizona_gpio->arizona; + + offset *= 2; + + if (value) + value = CLEARWATER_GPN_LVL; + + regmap_update_bits(arizona->regmap, CLEARWATER_GPIO1_CTRL_1 + offset, + CLEARWATER_GPN_LVL, value); +} + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed static struct gpio_chip template_chip = { .label = "arizona", .owner = THIS_MODULE, @@ -109,12 +181,53 @@ static int arizona_gpio_probe(struct platform_device *pdev) arizona_gpio->arizona = arizona; arizona_gpio->gpio_chip = template_chip; arizona_gpio->gpio_chip.dev = &pdev->dev; +<<<<<<< HEAD + + switch (arizona->type) { + case WM5102: + case WM5110: + arizona_gpio->gpio_chip.ngpio = 5; + break; +======= +#ifdef CONFIG_OF_GPIO + arizona_gpio->gpio_chip.of_node = arizona->dev->of_node; +#endif switch (arizona->type) { case WM5102: + case WM8280: case WM5110: + case WM8997: + case WM8998: + case WM1814: arizona_gpio->gpio_chip.ngpio = 5; break; + case WM8285: + case WM1840: + arizona_gpio->gpio_chip.direction_input = + clearwater_gpio_direction_in; + arizona_gpio->gpio_chip.get = clearwater_gpio_get; + arizona_gpio->gpio_chip.direction_output = + clearwater_gpio_direction_out; + arizona_gpio->gpio_chip.set = clearwater_gpio_set; + + arizona_gpio->gpio_chip.ngpio = 40; + break; + case WM1831: + case CS47L24: + arizona_gpio->gpio_chip.ngpio = 2; + break; + case CS47L35: + arizona_gpio->gpio_chip.direction_input = + clearwater_gpio_direction_in; + arizona_gpio->gpio_chip.get = clearwater_gpio_get; + arizona_gpio->gpio_chip.direction_output = + clearwater_gpio_direction_out; + arizona_gpio->gpio_chip.set = clearwater_gpio_set; + + arizona_gpio->gpio_chip.ngpio = 16; + break; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed default: dev_err(&pdev->dev, "Unknown chip variant %d\n", arizona->type); diff --git a/drivers/gpio/gpio-msm-smp2p.c b/drivers/gpio/gpio-msm-smp2p.c index 57e21975e98..497243ad3e0 100644 --- a/drivers/gpio/gpio-msm-smp2p.c +++ b/drivers/gpio/gpio-msm-smp2p.c @@ -338,7 +338,11 @@ static int smp2p_irq_map(struct irq_domain *domain_ptr, unsigned int virq, chip = domain_ptr->host_data; if (!chip) { +<<<<<<< HEAD SMP2P_ERR("%s: invalid domain ptr %p\n", __func__, domain_ptr); +======= + SMP2P_ERR("%s: invalid domain ptr\n", __func__); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return -ENODEV; } diff --git a/drivers/gpu/msm/adreno_debugfs.c b/drivers/gpu/msm/adreno_debugfs.c index b487df4f55a..44c985fc22f 100644 --- a/drivers/gpu/msm/adreno_debugfs.c +++ b/drivers/gpu/msm/adreno_debugfs.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2002,2008-2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2002,2008-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -48,7 +52,11 @@ static void sync_event_print(struct seq_file *s, break; } case KGSL_CMD_SYNCPOINT_TYPE_FENCE: +<<<<<<< HEAD seq_printf(s, "sync: [%p] %s", sync_event->handle, +======= + seq_printf(s, "sync: [%pK] %s", sync_event->handle, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed (sync_event->handle && sync_event->handle->fence) ? sync_event->handle->fence->name : "NULL"); break; diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c index f4b6c83f8b7..ed8139490d9 100755 --- a/drivers/gpu/msm/kgsl.c +++ b/drivers/gpu/msm/kgsl.c @@ -519,21 +519,33 @@ void kgsl_context_dump(struct kgsl_context *context) EXPORT_SYMBOL(kgsl_context_dump); /* Allocate a new context ID */ +<<<<<<< HEAD int _kgsl_get_context_id(struct kgsl_device *device, struct kgsl_context *context) +======= +int _kgsl_get_context_id(struct kgsl_device *device) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed { int id; idr_preload(GFP_KERNEL); write_lock(&device->context_lock); +<<<<<<< HEAD id = idr_alloc(&device->context_idr, context, 1, +======= + /* Allocate the slot but don't put a pointer in it yet */ + id = idr_alloc(&device->context_idr, NULL, 1, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed KGSL_MEMSTORE_MAX, GFP_NOWAIT); write_unlock(&device->context_lock); idr_preload_end(); +<<<<<<< HEAD if (id > 0) context->id = id; +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return id; } @@ -557,7 +569,11 @@ int kgsl_context_init(struct kgsl_device_private *dev_priv, char name[64]; int ret = 0, id; +<<<<<<< HEAD id = _kgsl_get_context_id(device, context); +======= + id = _kgsl_get_context_id(device); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (id == -ENOSPC) { /* * Before declaring that there are no contexts left try @@ -568,7 +584,11 @@ int kgsl_context_init(struct kgsl_device_private *dev_priv, mutex_unlock(&device->mutex); flush_workqueue(device->events_wq); mutex_lock(&device->mutex); +<<<<<<< HEAD id = _kgsl_get_context_id(device, context); +======= + id = _kgsl_get_context_id(device); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } if (id < 0) { @@ -580,6 +600,11 @@ int kgsl_context_init(struct kgsl_device_private *dev_priv, return id; } +<<<<<<< HEAD +======= + context->id = id; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed kref_init(&context->refcount); /* * Get a refernce to the process private so its not destroyed, until @@ -1595,7 +1620,11 @@ void kgsl_dump_syncpoints(struct kgsl_device *device, } case KGSL_CMD_SYNCPOINT_TYPE_FENCE: if (event->handle) +<<<<<<< HEAD dev_err(device->dev, " fence: [%p] %s\n", +======= + dev_err(device->dev, " fence: [%pK] %s\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed event->handle->fence, event->handle->name); else @@ -2585,6 +2614,15 @@ long kgsl_ioctl_drawctxt_create(struct kgsl_device_private *dev_priv, goto done; } trace_kgsl_context_create(dev_priv->device, context, param->flags); +<<<<<<< HEAD +======= + + /* Commit the pointer to the context in context_idr */ + write_lock(&device->context_lock); + idr_replace(&device->context_idr, context, context->id); + write_unlock(&device->context_lock); + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed param->drawctxt_id = context->id; done: mutex_unlock(&device->mutex); @@ -2902,7 +2940,12 @@ static int kgsl_setup_useraddr(struct kgsl_mem_entry *entry, struct vm_area_struct *vma = NULL; int ret; +<<<<<<< HEAD if (param->offset != 0 || param->hostptr == 0 +======= + if (param->len == 0 || param->offset != 0 + || param->hostptr == 0 +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed || !KGSL_IS_PAGE_ALIGNED(param->hostptr) || !KGSL_IS_PAGE_ALIGNED(param->len)) return -EINVAL; @@ -4670,9 +4713,14 @@ int kgsl_device_platform_probe(struct kgsl_device *device) disable_irq(device->pwrctrl.interrupt_num); KGSL_DRV_INFO(device, +<<<<<<< HEAD "dev_id %d regs phys 0x%08lx size 0x%08x virt %p\n", device->id, device->reg_phys, device->reg_len, device->reg_virt); +======= + "dev_id %d regs phys 0x%08lx size 0x%08x\n", + device->id, device->reg_phys, device->reg_len); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed rwlock_init(&device->context_lock); diff --git a/drivers/gpu/msm/kgsl_cffdump.c b/drivers/gpu/msm/kgsl_cffdump.c index 670a4f4fe30..44c8c29d6e7 100644 --- a/drivers/gpu/msm/kgsl_cffdump.c +++ b/drivers/gpu/msm/kgsl_cffdump.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2010-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2010-2014,2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -515,10 +519,13 @@ EXPORT_SYMBOL(kgsl_cffdump_waitirq); static int subbuf_start_handler(struct rchan_buf *buf, void *subbuf, void *prev_subbuf, size_t prev_padding) { +<<<<<<< HEAD pr_debug("kgsl: cffdump: subbuf_start_handler(subbuf=%p, prev_subbuf" "=%p, prev_padding=%08zx)\n", subbuf, prev_subbuf, prev_padding); +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (relay_buf_full(buf)) { if (!suspended) { suspended = 1; @@ -575,9 +582,12 @@ static struct rchan *create_channel(unsigned subbuf_size, unsigned n_subbufs) { struct rchan *chan; +<<<<<<< HEAD pr_info("kgsl: cffdump: relay: create_channel: subbuf_size %u, " "n_subbufs %u, dir 0x%p\n", subbuf_size, n_subbufs, dir); +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed chan = relay_open("cpu", dir, subbuf_size, n_subbufs, &relay_callbacks, NULL); if (!chan) { diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c index a4d24159823..41563cebdff 100644 --- a/drivers/gpu/msm/kgsl_iommu.c +++ b/drivers/gpu/msm/kgsl_iommu.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2011-2014,2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -333,7 +337,11 @@ static int kgsl_iommu_fault_handler(struct iommu_domain *domain, iommu_dev = get_iommu_device(iommu_unit, dev); if (!iommu_dev) { +<<<<<<< HEAD KGSL_CORE_ERR("Invalid IOMMU device %p\n", dev); +======= + KGSL_CORE_ERR("Invalid IOMMU device %pK\n", dev); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ret = -ENOSYS; goto done; } @@ -723,8 +731,13 @@ static void kgsl_detach_pagetable_iommu_domain(struct kgsl_mmu *mmu) iommu_detach_device(iommu_pt->domain, iommu_unit->dev[j].dev); iommu_unit->dev[j].attached = false; +<<<<<<< HEAD KGSL_MEM_INFO(mmu->device, "iommu %p detached " "from user dev of MMU: %p\n", +======= + KGSL_MEM_INFO(mmu->device, "iommu %pK detached " + "from user dev of MMU: %pK\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed iommu_pt->domain, mmu); } } @@ -788,7 +801,11 @@ static int kgsl_attach_pagetable_iommu_domain(struct kgsl_mmu *mmu) } iommu_unit->dev[j].attached = true; KGSL_MEM_INFO(mmu->device, +<<<<<<< HEAD "iommu pt %p attached to dev %p, ctx_id %d\n", +======= + "iommu pt %pK attached to dev %pK, ctx_id %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed iommu_pt->domain, iommu_unit->dev[j].dev, iommu_unit->dev[j].ctx_id); /* Init IOMMU unit clks here */ @@ -863,7 +880,11 @@ static int _get_iommu_ctxs(struct kgsl_mmu *mmu, iommu_unit->dev[iommu_unit->dev_count].kgsldev = mmu->device; KGSL_DRV_INFO(mmu->device, +<<<<<<< HEAD "Obtained dev handle %p for iommu context %s\n", +======= + "Obtained dev handle %pK for iommu context %s\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed iommu_unit->dev[iommu_unit->dev_count].dev, data->iommu_ctxs[i].iommu_ctx_name); @@ -1695,7 +1716,11 @@ kgsl_iommu_unmap(struct kgsl_pagetable *pt, } else ret = iommu_unmap_range(iommu_pt->domain, gpuaddr, range); if (ret) { +<<<<<<< HEAD KGSL_CORE_ERR("iommu_unmap_range(%p, %x, %d) failed " +======= + KGSL_CORE_ERR("iommu_unmap_range(%pK, %x, %d) failed " +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed "with err: %d\n", iommu_pt->domain, gpuaddr, range, ret); return ret; @@ -1807,7 +1832,11 @@ kgsl_iommu_map(struct kgsl_pagetable *pt, sg_temp ? sg_temp : memdesc->sg, size, protflags); if (ret) { +<<<<<<< HEAD KGSL_CORE_ERR("iommu_map_range(%p, %x, %p, %zd, %x) err: %d\n", +======= + KGSL_CORE_ERR("iommu_map_range(%pK, %x, %pK, %zd, %x) err: %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed iommu_pt->domain, iommu_virt_addr, sg_temp ? sg_temp : memdesc->sg, size, protflags, ret); @@ -1820,7 +1849,11 @@ kgsl_iommu_map(struct kgsl_pagetable *pt, page_to_phys(kgsl_guard_page), PAGE_SIZE, protflags & ~IOMMU_WRITE); if (ret) { +<<<<<<< HEAD KGSL_CORE_ERR("iommu_map(%p, %zx, guard, %x) err: %d\n", +======= + KGSL_CORE_ERR("iommu_map(%pK, %zx, guard, %x) err: %d\n", +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed iommu_pt->domain, iommu_virt_addr + size, protflags & ~IOMMU_WRITE, ret); diff --git a/drivers/gpu/msm/kgsl_pwrctrl.c b/drivers/gpu/msm/kgsl_pwrctrl.c index f774b89bf0d..9673f8afe5d 100755 --- a/drivers/gpu/msm/kgsl_pwrctrl.c +++ b/drivers/gpu/msm/kgsl_pwrctrl.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2010-2015, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2010-2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1358,7 +1362,11 @@ int kgsl_pwrctrl_init(struct kgsl_device *device) if (!pwr->pcl) { KGSL_PWR_ERR(device, "msm_bus_scale_register_client failed: " +<<<<<<< HEAD "id %d table %p %p", device->id, +======= + "id %d table %pK %pK", device->id, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed pdata->bus_scale_table, ocmem_scale_table); result = -EINVAL; diff --git a/drivers/gpu/msm/kgsl_sharedmem.c b/drivers/gpu/msm/kgsl_sharedmem.c index a4c584b0e35..7804e2616bb 100644 --- a/drivers/gpu/msm/kgsl_sharedmem.c +++ b/drivers/gpu/msm/kgsl_sharedmem.c @@ -537,10 +537,24 @@ int kgsl_cache_range_op(struct kgsl_memdesc *memdesc, size_t offset, void *addr = (memdesc->hostptr) ? memdesc->hostptr : (void *) memdesc->useraddr; +<<<<<<< HEAD /* Make sure that size is non-zero */ if (!size) return -EINVAL; +======= + if (size == 0 || size > UINT_MAX) + return -EINVAL; + + /* Make sure that the offset + size does not overflow */ + if ((offset + size < offset) || (offset + size < size)) + return -ERANGE; + + /* Make sure the offset + size do not overflow the address */ + if ((addr + offset + size) < addr) + return -ERANGE; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* Check that offset+length does not exceed memdesc->size */ if ((offset + size) > memdesc->size) return -ERANGE; @@ -590,6 +604,7 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc, struct kgsl_pagetable *pagetable, size_t size) { +<<<<<<< HEAD int pcount = 0, ret = 0; int j, page_size, sglen_alloc, sglen = 0; size_t len; @@ -598,6 +613,12 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc, void *ptr; unsigned int align; int step = ((VMALLOC_END - VMALLOC_START)/8) >> PAGE_SHIFT; +======= + size_t len; + int ret = 0, page_size, sglen_alloc, sglen = 0; + void *ptr; + unsigned int align; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed size = PAGE_ALIGN(size); if (size == 0 || size > UINT_MAX) @@ -625,6 +646,12 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc, memdesc->pagetable = pagetable; memdesc->ops = &kgsl_page_alloc_ops; +<<<<<<< HEAD +======= + /* Check for integer overflow */ + if (sglen_alloc && (sizeof(struct scatterlist) > INT_MAX / sglen_alloc)) + return -EINVAL; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed memdesc->sg = kgsl_malloc(sglen_alloc * sizeof(struct scatterlist)); if (memdesc->sg == NULL) { @@ -632,6 +659,7 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc, goto done; } +<<<<<<< HEAD /* * Allocate space to store the list of pages to send to vmap. This is an * array of pointers so we can track 1024 pages per page of allocation @@ -644,6 +672,8 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc, goto done; } +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (!is_vmalloc_addr(memdesc->sg)) kmemleak_not_leak(memdesc->sg); @@ -670,6 +700,11 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc, else gfp_mask |= GFP_KERNEL; +<<<<<<< HEAD +======= + gfp_mask |= __GFP_ZERO; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed page = alloc_pages(gfp_mask, get_order(page_size)); if (page == NULL) { @@ -697,8 +732,17 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc, goto done; } +<<<<<<< HEAD for (j = 0; j < page_size >> PAGE_SHIFT; j++) pages[pcount++] = nth_page(page, j); +======= + for (j = 0; j < page_size >> PAGE_SHIFT; j++) { + struct page *p = nth_page(page, j); + ptr = kmap_atomic(p); + dmac_flush_range(ptr, ptr + PAGE_SIZE); + kunmap_atomic(ptr); + } +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed sg_set_page(&memdesc->sg[sglen++], page, page_size, 0); len -= page_size; @@ -710,6 +754,7 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc, if (sglen > 0) sg_mark_end(&memdesc->sg[sglen - 1]); +<<<<<<< HEAD /* * All memory that goes to the user has to be zeroed out before it gets * exposed to userspace. This means that the memory has to be mapped in @@ -752,12 +797,17 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc, } } +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed done: KGSL_STATS_ADD(memdesc->size, kgsl_driver.stats.page_alloc, kgsl_driver.stats.page_alloc_max); +<<<<<<< HEAD kgsl_free(pages); +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (ret) kgsl_sharedmem_free(memdesc); diff --git a/drivers/gpu/msm/kgsl_snapshot.c b/drivers/gpu/msm/kgsl_snapshot.c index a37aaf09c2c..4dc6290ff4b 100644 --- a/drivers/gpu/msm/kgsl_snapshot.c +++ b/drivers/gpu/msm/kgsl_snapshot.c @@ -1,4 +1,8 @@ +<<<<<<< HEAD /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +======= +/* Copyright (c) 2012-2014,2016, The Linux Foundation. All rights reserved. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1110,9 +1114,12 @@ void kgsl_snapshot_save_frozen_objs(struct work_struct *work) goto done; snapshot->mempool = vmalloc(size); +<<<<<<< HEAD if (snapshot->mempool != NULL) KGSL_CORE_ERR("snapshot: mempool address %p, size %zx\n", snapshot->mempool, size); +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ptr = snapshot->mempool; snapshot->mempool_size = 0; diff --git a/drivers/gpu/msm/kgsl_sync.c b/drivers/gpu/msm/kgsl_sync.c index df181adb0a9..a0cf3f7c3e7 100644 --- a/drivers/gpu/msm/kgsl_sync.c +++ b/drivers/gpu/msm/kgsl_sync.c @@ -202,7 +202,10 @@ int kgsl_add_fence_event(struct kgsl_device *device, ret = priv.fence_fd; goto unlock; } +<<<<<<< HEAD sync_fence_install(fence, priv.fence_fd); +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* * If the timestamp hasn't expired yet create an event to trigger it. @@ -229,6 +232,10 @@ int kgsl_add_fence_event(struct kgsl_device *device, ret = -EFAULT; goto out; } +<<<<<<< HEAD +======= + sync_fence_install(fence, priv.fence_fd); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return 0; @@ -606,6 +613,12 @@ long kgsl_ioctl_syncsource_create_fence(struct kgsl_device_private *dev_priv, if (ret) { if (fence) sync_fence_put(fence); +<<<<<<< HEAD +======= + if (fd >= 0) + put_unused_fd(fd); + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } kgsl_syncsource_put(syncsource); return ret; diff --git a/drivers/gud/MobiCoreDriver/main.c b/drivers/gud/MobiCoreDriver/main.c index f1ebaad2281..fca04aa076d 100644 --- a/drivers/gud/MobiCoreDriver/main.c +++ b/drivers/gud/MobiCoreDriver/main.c @@ -1394,7 +1394,15 @@ static int create_devices(void) * This device is installed and registered as cdev, then interrupt and * queue handling is set up */ +<<<<<<< HEAD static int __init mobicore_init(void) +======= +#if defined(MC_CRYPTO_CLOCK_MANAGEMENT) && defined(MC_USE_DEVICE_TREE) +static int mobicore_init(void) +#else +static int __init mobicore_init(void) +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed { int ret = 0; dev_set_name(mcd, "mcd"); @@ -1489,7 +1497,15 @@ static int __init mobicore_init(void) /* * This function removes this device driver from the Linux device manager . */ +<<<<<<< HEAD static void __exit mobicore_exit(void) +======= +#if defined(MC_CRYPTO_CLOCK_MANAGEMENT) && defined(MC_USE_DEVICE_TREE) +static void mobicore_exit(void) +#else +static void __exit mobicore_exit(void) +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed { MCDRV_DBG_VERBOSE(mcd, "enter"); #ifdef MC_MEM_TRACES @@ -1569,12 +1585,20 @@ static struct platform_driver mc_plat_driver = { }, }; +<<<<<<< HEAD static int mobicore_register(void) +======= +static int __init mobicore_register(void) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed { return platform_driver_register(&mc_plat_driver); } +<<<<<<< HEAD static void mobicore_unregister(void) +======= +static void __exit mobicore_unregister(void) +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed { platform_driver_unregister(&mc_plat_driver); mobicore_exit(); diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index d3d36f95fa7..07ae7e836ae 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -224,6 +224,17 @@ config HID_EZKEY ---help--- Support for Ezkey BTC 8193 keyboard. +<<<<<<< HEAD +======= +config HID_FIIO + tristate "FiiO USB DAC Amp" + depends on HID + ---help--- + FiiO USB DACs generate spurious events during plug. Say Y here if + you are using a FiiO device and it is causing problems for your user + space. + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed config HID_HOLTEK tristate "Holtek HID devices" depends on USB_HID diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile index 2065694f57a..67f034b6812 100644 --- a/drivers/hid/Makefile +++ b/drivers/hid/Makefile @@ -49,6 +49,10 @@ obj-$(CONFIG_HID_DRAGONRISE) += hid-dr.o obj-$(CONFIG_HID_EMS_FF) += hid-emsff.o obj-$(CONFIG_HID_ELECOM) += hid-elecom.o obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o +<<<<<<< HEAD +======= +obj-$(CONFIG_HID_FIIO) += hid-fiio.o +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed obj-$(CONFIG_HID_GYRATION) += hid-gyration.o obj-$(CONFIG_HID_HOLTEK) += hid-holtek-kbd.o obj-$(CONFIG_HID_HOLTEK) += hid-holtekff.o diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 81d0e6e1f75..2744f97035e 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1148,6 +1148,10 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, /* Ignore report if ErrorRollOver */ if (!(field->flags & HID_MAIN_ITEM_VARIABLE) && value[n] >= min && value[n] <= max && +<<<<<<< HEAD +======= + value[n] - min < field->maxusage && +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed field->usage[value[n] - min].hid == HID_UP_KEYBOARD + 1) goto exit; } @@ -1160,11 +1164,19 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, } if (field->value[n] >= min && field->value[n] <= max +<<<<<<< HEAD +======= + && field->value[n] - min < field->maxusage +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed && field->usage[field->value[n] - min].hid && search(value, field->value[n], count)) hid_process_event(hid, field, &field->usage[field->value[n] - min], 0, interrupt); if (value[n] >= min && value[n] <= max +<<<<<<< HEAD +======= + && value[n] - min < field->maxusage +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed && field->usage[value[n] - min].hid && search(field->value, value[n], count)) hid_process_event(hid, field, &field->usage[value[n] - min], 1, interrupt); @@ -1678,6 +1690,12 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, +<<<<<<< HEAD +======= +#if IS_ENABLED(CONFIG_HID_FIIO) + { HID_USB_DEVICE(USB_VENDOR_ID_GYROCOM, USB_DEVICE_ID_GYROCOM_E18) }, +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) }, { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) }, { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) }, diff --git a/drivers/hid/hid-fiio.c b/drivers/hid/hid-fiio.c new file mode 100644 index 00000000000..4c4575a8545 --- /dev/null +++ b/drivers/hid/hid-fiio.c @@ -0,0 +1,172 @@ +/* + * HID driver for FiiO usb DAC + * + * Copyright (c) 2015 Cyanogen, Inc. + * + * hid-elo.c used as skeleton driver. + * + * This driver is licensed under the terms of GPLv2. + */ + +#include +#include +#include +#include + +#include "hid-ids.h" + +struct fiio_priv { + u32 seen_keys[8]; + u32 used_keys[8]; +}; + +static int fiio_event(struct hid_device *hdev, struct hid_field *field, + struct hid_usage *usage, __s32 value) +{ + struct hid_input *hidinput; + struct fiio_priv *priv; + + int index = usage->code / 32; + int offset = usage->code % 32; + + if (!(hdev->claimed & HID_CLAIMED_INPUT) || list_empty(&hdev->inputs)) + return 0; + + hidinput = list_first_entry(&hdev->inputs, struct hid_input, list); + priv = hid_get_drvdata(hdev); + + /* We only care about keypress events */ + if (usage->type != EV_KEY) + return 0; + + /* Key 0 is "unassigned", not KEY_UNKNOWN */ + if ((usage->type == EV_KEY) && (usage->code == 0)) + return 0; + + /* + * The key has generated both press and release events, so let it be + * handled normally + * + * Prev/Next song keys seem to be reversed: + * + * |<< >>| >|| + * ^ Returns Play/Pause + * ^ Returns Previous Song + * ^ Returns Next Song + * + * Windows does NOT remap these. + */ + if ((priv->used_keys[index] & 1 << offset) && + (priv->seen_keys[index] & 1 << offset)) { + switch (usage->code) { + case KEY_NEXTSONG: + input_event(hidinput->input, EV_KEY, KEY_PREVIOUSSONG, + value); + input_sync(hidinput->input); + return 1; + break; + case KEY_PREVIOUSSONG: + input_event(hidinput->input, EV_KEY, KEY_NEXTSONG, + value); + input_sync(hidinput->input); + return 1; + break; + default: + return 0; + break; + } + } + + switch (usage->code) { + case KEY_VOLUMEUP: + case KEY_VOLUMEDOWN: + case KEY_MUTE: + case KEY_PLAYPAUSE: + case KEY_NEXTSONG: + case KEY_PREVIOUSSONG: + case KEY_STOPCD: + break; + default: + hid_info(hdev, "FiiO: Unknown Key: 0x%0x, 0x%0x\n", usage->code, + value); + break; + } + + + if (value) + priv->seen_keys[index] |= 1 << offset; + else + priv->used_keys[index] |= 1 << offset; + + return 1; +} + +static int fiio_probe(struct hid_device *hdev, const struct hid_device_id *id) +{ + struct fiio_priv *priv; + int ret; + + priv = kzalloc(sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + hid_set_drvdata(hdev, priv); + + ret = hid_parse(hdev); + if (ret) { + hid_err(hdev, "parse failed\n"); + goto err_free; + } + + ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); + if (ret) { + hid_err(hdev, "hw start failed\n"); + goto err_free; + } + + return 0; +err_free: + kfree(priv); + return ret; +} + +static void fiio_remove(struct hid_device *hdev) +{ + struct fiio_priv *priv = hid_get_drvdata(hdev); + + hid_hw_stop(hdev); + kfree(priv); +} + +static const struct hid_device_id fiio_devices[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_GYROCOM, USB_DEVICE_ID_GYROCOM_E18), }, + { } +}; +MODULE_DEVICE_TABLE(hid, fiio_devices); + +static struct hid_driver fiio_driver = { + .name = "fiio", + .id_table = fiio_devices, + .probe = fiio_probe, + .remove = fiio_remove, + .event = fiio_event, +}; + +static int __init fiio_driver_init(void) +{ + int ret; + + ret = hid_register_driver(&fiio_driver); + + return ret; +} +module_init(fiio_driver_init); + +static void __exit fiio_driver_exit(void) +{ + hid_unregister_driver(&fiio_driver); +} +module_exit(fiio_driver_exit); + +MODULE_AUTHOR("Pat Erley "); +MODULE_LICENSE("GPL"); diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index a1e431f830e..20837d72ea0 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -418,6 +418,12 @@ #define USB_DEVICE_ID_GYRATION_REMOTE_2 0x0003 #define USB_DEVICE_ID_GYRATION_REMOTE_3 0x0008 +<<<<<<< HEAD +======= +#define USB_VENDOR_ID_GYROCOM 0x1852 +#define USB_DEVICE_ID_GYROCOM_E18 0x50d2 + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #define USB_VENDOR_ID_HANWANG 0x0b57 #define USB_DEVICE_ID_HANWANG_TABLET_FIRST 0x5000 #define USB_DEVICE_ID_HANWANG_TABLET_LAST 0x8fff diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index 5482156ab4d..409b33462c8 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c @@ -859,14 +859,22 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, return 1; } +<<<<<<< HEAD static void ntrig_input_configured(struct hid_device *hid, +======= +static int ntrig_input_configured(struct hid_device *hid, +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed struct hid_input *hidinput) { struct input_dev *input = hidinput->input; if (hidinput->report->maxfield < 1) +<<<<<<< HEAD return; +======= + return 0; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed switch (hidinput->report->field[0]->application) { case HID_DG_PEN: @@ -890,6 +898,11 @@ static void ntrig_input_configured(struct hid_device *hid, "N-Trig MultiTouch"; break; } +<<<<<<< HEAD +======= + + return 0; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id) diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 2f1ddca6f2e..346570e11d2 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c @@ -516,6 +516,7 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, goto inval; } else if (uref->usage_index >= field->report_count) goto inval; +<<<<<<< HEAD else if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) && (uref_multi->num_values > HID_MAX_MULTI_USAGES || @@ -523,6 +524,15 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, goto inval; } +======= + } + + if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) && + (uref_multi->num_values > HID_MAX_MULTI_USAGES || + uref->usage_index + uref_multi->num_values > field->report_count)) + goto inval; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed switch (cmd) { case HIDIOCGUSAGE: uref->value = field->value[uref->usage_index]; diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c index 980b1948d51..ceae124b935 100644 --- a/drivers/hwmon/lm80.c +++ b/drivers/hwmon/lm80.c @@ -4,6 +4,10 @@ * Copyright (C) 1998, 1999 Frodo Looijaard * and Philip Edelbrock * +<<<<<<< HEAD +======= + * Ported to Linux 2.6 by Tiago Sousa +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/drivers/hwmon/qpnp-adc-common.c b/drivers/hwmon/qpnp-adc-common.c index 27ead24d541..0aac4ea2c5b 100644 --- a/drivers/hwmon/qpnp-adc-common.c +++ b/drivers/hwmon/qpnp-adc-common.c @@ -45,6 +45,172 @@ their framework which is 0.1DegC. True resolution of 0.1DegC will result in the below table size to increase by 10 times */ static const struct qpnp_vadc_map_pt adcmap_btm_threshold[] = { +<<<<<<< HEAD +======= +#ifdef CONFIG_MACH_RENDANG + {-100, 1262}, + {-80, 1232}, + {-60, 1203}, + {-40, 1173}, + {-20, 1144}, + {0, 1115}, + {20, 1086}, + {40, 1059}, + {60, 1032}, + {80, 1005}, + {100, 979}, + {120, 954}, + {140, 931}, + {160, 907}, + {180, 885}, + {200, 864}, + {220, 843}, + {240, 824}, + {260, 806}, + {280, 788}, + {300, 771}, + {320, 756}, + {340, 741}, + {360, 727}, + {380, 713}, + {400, 701}, + {420, 689}, + {440, 677}, + {460, 667}, + {480, 657}, + {500, 647}, + {520, 649}, + {540, 630}, + {560, 622}, + {580, 615}, + {600, 608}, + {620, 602}, + {640, 595}, + {660, 589}, + {680, 584}, + {700, 579}, + {720, 574}, + {740, 571}, +#elif defined(CONFIG_MACH_JALEBI) + {-400, 1753}, + {-380, 1747}, + {-360, 1739}, + {-340, 1731}, + {-320, 1722}, + {-300, 1712}, + {-280, 1701}, + {-260, 1688}, + {-240, 1674}, + {-220, 1659}, + {-200, 1643}, + {-180, 1625}, + {-160, 1605}, + {-140, 1584}, + {-120, 1562}, + {-100, 1537}, + {-80, 1511}, + {-60, 1484}, + {-40, 1454}, + {-20, 1423}, + {0, 1390}, + {20, 1356}, + {40, 1321}, + {60, 1284}, + {80, 1246}, + {100, 1207}, + {120, 1167}, + {140, 1127}, + {160, 1086}, + {180, 1044}, + {200, 1003}, + {220, 961}, + {240, 920}, + {260, 879}, + {280, 839}, + {300, 799}, + {320, 761}, + {340, 723}, + {360, 686}, + {380, 650}, + {400, 616}, + {420, 583}, + {440, 551}, + {460, 521}, + {480, 491}, + {500, 464}, + {520, 437}, + {540, 412}, + {560, 388}, + {580, 365}, + {600, 344}, + {620, 324}, + {640, 305}, + {660, 287}, + {680, 270}, + {700, 254}, + {720, 239}, + {740, 225}, + {760, 211}, + {780, 199}, + {800, 187}, + {820, 180}, + {840, 175}, + {860, 170}, + {880, 165}, +#elif defined(CONFIG_MACH_CP8675) + {-200, 1545}, + {-180, 1523}, + {-160, 1501}, + {-140, 1477}, + {-120, 1452}, + {-100, 1427}, + {-80, 1400}, + {-60, 1373}, + {-40, 1345}, + {-20, 1316}, + {0, 1287}, + {20, 1257}, + {40, 1227}, + {60, 1197}, + {80, 1166}, + {100, 1136}, + {120, 1106}, + {140, 1076}, + {160, 1046}, + {180, 1016}, + {200, 987}, + {220, 959}, + {240, 931}, + {260, 904}, + {280, 878}, + {300, 852}, + {320, 827}, + {340, 803}, + {360, 780}, + {380, 758}, + {400, 736}, + {420, 716}, + {440, 696}, + {460, 677}, + {480, 659}, + {500, 642}, + {520, 625}, + {540, 609}, + {560, 594}, + {580, 580}, + {600, 566}, + {620, 553}, + {640, 541}, + {660, 530}, + {680, 518}, + {700, 508}, + {720, 498}, + {740, 489}, + {760, 480}, + {780, 471}, + {800, 463}, +#else +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed {-300, 1642}, {-200, 1544}, {-100, 1414}, @@ -128,6 +294,10 @@ static const struct qpnp_vadc_map_pt adcmap_btm_threshold[] = { {770, 213}, {780, 208}, {790, 203} +<<<<<<< HEAD +======= +#endif /* CONFIG_MACH_RENDANG || CONFIG_MACH_JALEBI || CONFIG_MACH_CP8675 */ +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed }; static const struct qpnp_vadc_map_pt adcmap_qrd_btm_threshold[] = { @@ -293,6 +463,54 @@ static const struct qpnp_vadc_map_pt adcmap_qrd_skug_btm_threshold[] = { }; static const struct qpnp_vadc_map_pt adcmap_qrd_skuh_btm_threshold[] = { +<<<<<<< HEAD +======= +#ifdef CONFIG_MACH_RENDANG + {-100, 1262}, + {-80, 1232}, + {-60, 1203}, + {-40, 1173}, + {-20, 1144}, + {0, 1115}, + {20, 1086}, + {40, 1059}, + {60, 1032}, + {80, 1005}, + {100, 979}, + {120, 954}, + {140, 931}, + {160, 907}, + {180, 885}, + {200, 864}, + {220, 843}, + {240, 824}, + {260, 806}, + {280, 788}, + {300, 771}, + {320, 756}, + {340, 741}, + {360, 727}, + {380, 713}, + {400, 701}, + {420, 689}, + {440, 677}, + {460, 667}, + {480, 657}, + {500, 647}, + {520, 649}, + {540, 630}, + {560, 622}, + {580, 615}, + {600, 608}, + {620, 602}, + {640, 595}, + {660, 589}, + {680, 584}, + {700, 579}, + {720, 574}, + {740, 571}, +#else +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed {-200, 1531}, {-180, 1508}, {-160, 1483}, @@ -348,6 +566,10 @@ static const struct qpnp_vadc_map_pt adcmap_qrd_skuh_btm_threshold[] = { {840, 530}, {860, 524}, {880, 520}, +<<<<<<< HEAD +======= +#endif /* CONFIG_MACH_RENDANG */ +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed }; static const struct qpnp_vadc_map_pt adcmap_qrd_skuc_btm_threshold[] = { diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 565f8b18713..2310a4a8ef5 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -366,6 +366,16 @@ config INPUT_KXTJ9 To compile this driver as a module, choose M here: the module will be called kxtj9. +<<<<<<< HEAD +======= +config INPUT_KXTJ9_HQ + tristate "Kionix KXTJ9 tri-axis digital accelerometer (HQ variant)" + depends on I2C + help + Say Y here to enable support for the Kionix KXTJ9 digital tri-axis + accelerometer. + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed config INPUT_KXTJ9_POLLED_MODE bool "Enable polling mode support" depends on INPUT_KXTJ9 @@ -745,8 +755,22 @@ config SENSORS_AP3426 To compile this driver as a module, choose M here: the module will be called ap3426. +<<<<<<< HEAD config SENSORS_LTR553_TEST +======= +config SENSORS_AP3426_CM + tristate "AP3426 3-in-1 digital ALPS+PS+IRLED sensor driver (CM variant)" + depends on I2C + help + Say Y here if you want to enable the AP3426 ALPS sensor + driver (CM variant). + + To compile this driver as a module, choose M here: the + module will be called ap3426. + +config SENSORS_LTR553 +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed tristate "LTR553 light and proximity device driver" depends on I2C help @@ -754,6 +778,7 @@ config SENSORS_LTR553_TEST proximity sensor driver. To compile this driver as a module, choose M here: the +<<<<<<< HEAD module will be called ltr553 for test. config SENSORS_LTR553_TEST_PLUS @@ -765,6 +790,20 @@ config SENSORS_LTR553_TEST_PLUS To compile this driver as a module, choose M here: the module will be called ltr553 for test_plus. +======= + module will be called ltr553. + +config SENSORS_LTR559 + tristate "LTR559 light and proximity device driver" + depends on I2C + default n + help + Say Y here you want to enable for the liteon ltr559 + light and proximity sensors driver. + + To compile this driver as a module, choose M here: the + module will be called ltr559. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed config SENSORS_MMC3416X tristate "MMC3416xPJ 3-axis magnetic sensor driver" @@ -776,6 +815,7 @@ config SENSORS_MMC3416X To compile this driver as a module, choose M here: the module will be called mmc3416x. +<<<<<<< HEAD config SENSORS_ST480_TEST_PLUS tristate "Senodia ST480 magnetic sensor support" depends on I2C=y @@ -791,6 +831,23 @@ config SENSORS_ST480_TEST help If you say yes here you get support for Senodia magnetic sensors ST480 for test. +======= +config SENSORS_MMC3416X_ALLOW_OVERFLOW + tristate "MMC3416X sensor overflow check" + depends on SENSORS_MMC3416X + help + Say Y here if you want to allow overflow in MMC3416X sensor. + +config SENSORS_MMC3X30 + tristate "MMC3X30KJ 3-axis magnetic sensor driver" + depends on I2C + help + Say Y here if you want to enable the MMC3X30KJ magnetic sensor + driver. + + To compile this driver as a module, choose M here: the + module will be called mmc3X30. +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed config SENSORS_AKM09911 tristate "AKM09911 3-axis electronic compass sensor driver" @@ -835,6 +892,18 @@ config SENSORS_CAPELLA_CM36283 To compile this driver as a module, choose M here: the module will be called CM36283. +<<<<<<< HEAD +======= +config INPUT_KIONIX_ACCEL + tristate "KIONIX_ACCEL" + depends on I2C=y + help + If you say yes here you get support for the Kionix digital 3-axis + accelerometer. + This driver can also be built as a module. If so, the module will be + called kionix_accel. + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed config SENSORS_BMA2X2 tristate "BMA2x2 acceleration sensor support" depends on I2C @@ -858,6 +927,39 @@ config SENSORS_BMA2X2_ENABLE_INT2 acceleration sensors BMA255/BMA254/BMA355/BMA250E/BMA222E/BMA280. Can only open if you do NOT open interrupt INT1 support +<<<<<<< HEAD +======= + +config SENSORS_BMA2X2_ENABLE_IDENT + tristate "BMA2X2 acceleration sensor identification header support" + depends on SENSORS_BMA2X2 + default y + help + If you say yes here, you get IDENT support for Bosch Sensortec + acceleration sensors BMA255/BMA254/BMA355/BMA250E/BMA222E/BMA280. + Select it will enable identification support + +config SENSORS_BMM050 + tristate "BMM050 Magnetic Sensor Driver" + depends on I2C + help + If you say yes here, you get support for Bosch Sensortec's + sensor BMM050 Magnetic Sensor + +config SENSORS_BMG + tristate "Bosch Gyroscope Sensor Driver" + depends on I2C + help + If you say yes here, you get support for Bosch Sensortec's + gyroscope sensor drivers of BMG160/BMI055/BMI058 e.t.c. + +config SENSORS_BMG_FIFO + bool "Bosch Gyroscope FIFO Support" + depends on SENSORS_BMG + help + If you say yes here, you get support for Gyroscope sensor FIFO operations. + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed config SIG_MOTION tristate "support significant motion sensor function" depends on SENSORS_BMA2X2 && ( SENSORS_BMA2X2_ENABLE_INT1 || SENSORS_BMA2X2_ENABLE_INT2) @@ -877,6 +979,7 @@ config SENSORS_BMI058 If you say yes here, you get support for Bosch Sensortec's sensor driver of BMI058. +<<<<<<< HEAD config INPUT_LSM6DS3 tristate "STMicroelectronics LSM6DS3" depends on INPUT @@ -911,5 +1014,89 @@ config LSM6DS3_FIFO_MODE endchoice endif +======= +config SENSORS_BMI160 + tristate "BMI160 Sensor Support" + depends on I2C || SPI_MASTER + help + If you say yes here, you get support for Bosch Sensortec's + sensor driver of BMI160. + +config SENSORS_BMI160_I2C + tristate "support I2C bus communication" + depends on SENSORS_BMI160 && I2C + help + If you say yes here, you get support Bosch Sensortec's BMI160 sensor hooked to an I2C bus. + +config BMI160_MAG_INTERFACE_SUPPORT + tristate "BMI160 Sensor mag interface support" + depends on SENSORS_BMI160 + help + If you say yes here, you get support for Bosch Sensortec's + sensor driver of BMI160 with mag sensor support. + +config SENSORS_BMI160_ENABLE_INT1 + tristate "BMI160 sensor interrupt INT1 support" + depends on SENSORS_BMI160 + help + If you say yes here, you get INT1 support for Bosch Sensortec + sensors BMI160. + +config SENSORS_BMI160_ENABLE_INT2 + tristate "BMI160 sensor interrupt INT2 support" + depends on SENSORS_BMI160 + help + If you say yes here, you get INT2 support for Bosch Sensortec + sensors BMI160. + +config INPUT_LSM6DX0 + tristate "STMicroelectronics LSM6DS0 and LSM6DL0" + depends on INPUT + depends on I2C + help + Say Y here to enable STMicroelectronics LSM6DS0 or LSM6DL0inertial + module. + + To compile this driver as a module, choose M here: the + module will be called lsm6dx0. + +config SENSORS_ST480 + tristate "Senodia ST480 magnetic sensor support" + depends on I2C + default n + help + If you say yes here you get support for Senodia + magnetic sensors ST480. + +config SENSORS_MPU6880 + tristate "Invensense MPU6880 support" + depends on I2C + default n + select INPUT_POLLDEV + help + If you say yes here you get support for Invensense's MPU6880. + +config SENSORS_PA12200001 + tristate "TXC_PA12200001 proximity/light sensor support" + depends on I2C + default n + help + If you say yes here you get support for TXC's PA12200001 proximity + and light sensor. + +config SENSORS_YL_HALL + tristate "Yulong/Coolpad Hall sensor support" + default n + help + If you say yes here you get support for Yulong/Coolpad's Hall sensor. + +config SENSORS_YL_PARAMS + tristate "Yulong sensor parameter support" + default n + help + If you say yes here you get support for Yulong/Coolpad's sensor + calibration parameter driver. + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed endif diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 18efb1a2ab6..c321c878506 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -35,7 +35,14 @@ obj-$(CONFIG_INPUT_IMS_PCU) += ims-pcu.o obj-$(CONFIG_INPUT_IXP4XX_BEEPER) += ixp4xx-beeper.o obj-$(CONFIG_INPUT_KEYCHORD) += keychord.o obj-$(CONFIG_INPUT_KEYSPAN_REMOTE) += keyspan_remote.o +<<<<<<< HEAD obj-$(CONFIG_INPUT_KXTJ9) += kxtj9.o +======= +obj-$(CONFIG_INPUT_KIONIX_ACCEL) += kionix_accel_hy.o +obj-$(CONFIG_INPUT_KXTJ9) += kxtj9.o +obj-$(CONFIG_INPUT_KXTJ9_HQ) += kxtj9_hq.o +obj-$(CONFIG_INPUT_LSM6DX0) += lsm6dx0.o +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o obj-$(CONFIG_INPUT_MAX8925_ONKEY) += max8925_onkey.o obj-$(CONFIG_INPUT_MAX8997_HAPTIC) += max8997_haptic.o @@ -66,20 +73,44 @@ obj-$(CONFIG_INPUT_YEALINK) += yealink.o obj-$(CONFIG_BMP18X) += bmp18x-core.o obj-$(CONFIG_BMP18X_I2C) += bmp18x-i2c.o obj-$(CONFIG_SENSORS_MMC3416X) += mmc3416x.o +<<<<<<< HEAD obj-$(CONFIG_SENSORS_ST480_TEST_PLUS) += st480_test_plus.o obj-$(CONFIG_SENSORS_ST480_TEST) += st480_test.o +======= +obj-$(CONFIG_SENSORS_MMC3X30) += mmc3x30.o +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed obj-$(CONFIG_SENSORS_MMA8X5X) += mma8x5x.o obj-$(CONFIG_SENSORS_STK3X1X) += stk3x1x.o obj-$(CONFIG_SENSORS_CAPELLA_CM36283) += cm36283.o obj-$(CONFIG_SENSORS_MPU6050) += mpu6050.o obj-$(CONFIG_SENSORS_AKM8963) += akm8963.o obj-$(CONFIG_SENSORS_AKM09911) += akm09911.o +<<<<<<< HEAD obj-$(CONFIG_SENSORS_LIS3DH) += lis3dh_acc.o obj-$(CONFIG_SENSORS_AP3426) += ap3426.o obj-$(CONFIG_SENSORS_BMA2X2) += bstclass.o obj-$(CONFIG_SENSORS_BMA2X2) += bma2x2.o obj-$(CONFIG_SENSORS_LTR553_TEST_PLUS) += ltr553_test_plus.o obj-$(CONFIG_SENSORS_LTR553_TEST) += ltr553_test.o +======= +obj-$(CONFIG_SENSORS_ST480) += st480.o +obj-$(CONFIG_SENSORS_LIS3DH) += lis3dh_acc.o +obj-$(CONFIG_SENSORS_AP3426) += ap3426.o +obj-$(CONFIG_SENSORS_AP3426_CM) += ap3426_cm.o +obj-$(CONFIG_SENSORS_BMA2X2) += bstclass.o +obj-$(CONFIG_SENSORS_MPU6880) += mpu6880.o +obj-$(CONFIG_SENSORS_PA12200001) += pa12200001.o +obj-$(CONFIG_SENSORS_YL_HALL) += coolpad_hall.o +obj-$(CONFIG_SENSORS_YL_PARAMS) += yl_sensor_params.o + +obj-$(CONFIG_SENSORS_BMA2X2) += bma2x2.o +obj-$(CONFIG_SENSORS_LTR553) += ltr553.o + +obj-$(CONFIG_SENSORS_BMM050) += bmm050_driver.o bmm050.o +obj-$(CONFIG_SENSORS_BMG) += bmg160_driver.o bmg160.o +obj-$(CONFIG_SENSORS_LTR559) += ltr559.o + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed ifeq ($(CONFIG_SENSORS_BMA2X2_ENABLE_INT1),y) EXTRA_CFLAGS += -DBMA2X2_ENABLE_INT1 endif @@ -88,6 +119,36 @@ ifeq ($(CONFIG_BOSCH_BMA2X2_ENABLE_INT2),y) EXTRA_CFLAGS += -DBMA2X2_ENABLE_INT2 endif +<<<<<<< HEAD obj-$(CONFIG_INPUT_LSM6DS3) += lsm6ds3.o lsm6ds3-y := lsm6ds3_core.o obj-$(CONFIG_INPUT_LSM6DS3_I2C) += lsm6ds3_i2c.o +======= +ifeq ($(CONFIG_SENSORS_BMA2X2_ENABLE_IDENT),y) + EXTRA_CFLAGS += -DBMA2X2_SENSOR_IDENTIFICATION_ENABLE +endif + +ifeq ($(CONFIG_SENSORS_BMG_FIFO),y) + EXTRA_CFLAGS += -DBMG_USE_FIFO -DBMG_USE_BASIC_I2C_FUNC +endif +ifeq ($(CONFIG_SENSORS_BMM050),y) + EXTRA_CFLAGS += -DBMM_USE_BASIC_I2C_FUNC -DCONFIG_BMM_USE_PLATFORM_DATA +endif + +obj-$(CONFIG_SENSORS_BMI160) += bmi160_driver.o bmi160.o +ifeq ($(CONFIG_BMI160_MAG_INTERFACE_SUPPORT),y) + EXTRA_CFLAGS += -DBMI160_MAG_INTERFACE_SUPPORT +endif +ifeq ($(CONFIG_SENSORS_BMI160_ENABLE_INT1),y) + EXTRA_CFLAGS += -DBMI160_ENABLE_INT1 +endif + +ifeq ($(CONFIG_SENSORS_BMI160_ENABLE_INT2),y) + EXTRA_CFLAGS += -DBMI160_ENABLE_INT2 +endif + +obj-$(CONFIG_SENSORS_BMI160_I2C) += bmi160_i2c.o +ifeq ($(CONFIG_SENSORS_BMI160_I2C),y) + EXTRA_CFLAGS += -DBMI_USE_BASIC_I2C_FUNC +endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed diff --git a/drivers/input/misc/akm09911.c b/drivers/input/misc/akm09911.c index 72166e119c1..24ac21faf68 100644 --- a/drivers/input/misc/akm09911.c +++ b/drivers/input/misc/akm09911.c @@ -37,7 +37,15 @@ #include #define AKM_DEBUG_IF 0 +<<<<<<< HEAD #define AKM_HAS_RESET 1 +======= +#ifdef CONFIG_MACH_T86519A1 +#define AKM_HAS_RESET 0 +#else +#define AKM_HAS_RESET 1 +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #define AKM_INPUT_DEVICE_NAME "compass" #define AKM_DRDY_TIMEOUT_MS 100 #define AKM_BASE_NUM 10 @@ -1503,9 +1511,17 @@ static int akm_compass_suspend(struct device *dev) if (akm->state.power_on) akm_compass_power_set(akm, false); +<<<<<<< HEAD + ret = pinctrl_select_state(akm->pinctrl, akm->pin_sleep); + if (ret) + dev_err(dev, "Can't select pinctrl state\n"); +======= +#ifndef CONFIG_MACH_T86519A1 ret = pinctrl_select_state(akm->pinctrl, akm->pin_sleep); if (ret) dev_err(dev, "Can't select pinctrl state\n"); +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dev_dbg(&akm->i2c->dev, "suspended\n"); @@ -1518,9 +1534,17 @@ static int akm_compass_resume(struct device *dev) int ret = 0; uint8_t mode; +<<<<<<< HEAD ret = pinctrl_select_state(akm->pinctrl, akm->pin_default); if (ret) dev_err(dev, "Can't select pinctrl state\n"); +======= +#ifndef CONFIG_MACH_T86519A1 + ret = pinctrl_select_state(akm->pinctrl, akm->pin_default); + if (ret) + dev_err(dev, "Can't select pinctrl state\n"); +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (akm->state.power_on) { ret = akm_compass_power_set(akm, true); @@ -1741,11 +1765,19 @@ static int akm_compass_parse_dt(struct device *dev, akm->gpio_rstn = of_get_named_gpio_flags(dev->of_node, "akm,gpio_rstn", 0, NULL); +<<<<<<< HEAD +======= +#if AKM_HAS_RESET +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (!gpio_is_valid(akm->gpio_rstn)) { dev_err(dev, "gpio reset pin %d is invalid.\n", akm->gpio_rstn); return -EINVAL; } +<<<<<<< HEAD +======= +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed return 0; } @@ -1757,6 +1789,10 @@ static int akm_compass_parse_dt(struct device *dev, } #endif /* !CONFIG_OF */ +<<<<<<< HEAD +======= +#ifndef CONFIG_MACH_T86519A1 +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed static int akm_pinctrl_init(struct akm_compass_data *akm) { struct i2c_client *client = akm->i2c; @@ -1781,6 +1817,10 @@ static int akm_pinctrl_init(struct akm_compass_data *akm) return 0; } +<<<<<<< HEAD +======= +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed static int akm_report_data(struct akm_compass_data *akm) { @@ -2184,6 +2224,10 @@ int akm_compass_probe(struct i2c_client *client, const struct i2c_device_id *id) /* set client data */ i2c_set_clientdata(client, s_akm); +<<<<<<< HEAD +======= +#ifndef CONFIG_MACH_T86519A1 +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* initialize pinctrl */ if (!akm_pinctrl_init(s_akm)) { err = pinctrl_select_state(s_akm->pinctrl, s_akm->pin_default); @@ -2192,6 +2236,10 @@ int akm_compass_probe(struct i2c_client *client, const struct i2c_device_id *id) goto exit2; } } +<<<<<<< HEAD +======= +#endif +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* Pull up the reset pin */ AKECS_Reset(s_akm, 1); diff --git a/drivers/input/misc/ap3426.c b/drivers/input/misc/ap3426.c index 6625d9ab9e3..c483bc782c5 100644 --- a/drivers/input/misc/ap3426.c +++ b/drivers/input/misc/ap3426.c @@ -1402,6 +1402,44 @@ static int ap3426_cdev_als_flush(struct sensors_classdev *sensors_cdev) return 0; } +<<<<<<< HEAD +======= +static inline void swap_at(u16 *x, u16 *y) +{ + u16 temp = *x; + + *x = *y; + *y = temp; +} + +static u16 ap3426_median_average(u16 *sample_data, int size) +{ + int i, j; + u32 sum = 0; + int start_index = 0; + int end_index = size - 1; + int average; + for (i = 0; i < size - 1; i++) { + for (j = i + 1; j < size; j++) { + if (sample_data[i] > sample_data[j]) { + swap_at(&sample_data[i], &sample_data[j]); + } + } + } + // collect the median samples only (cut off first and last 2) + if (size > 4) { + start_index = 2; + end_index = size - 3; + } + for (i = start_index; i <= end_index; i++) { + sum += sample_data[i]; + } + average = (u16) (sum / (end_index - start_index + 1)); + + return average; +} + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed /* This function should be called when sensor is disabled */ static int ap3426_cdev_ps_calibrate(struct sensors_classdev *sensors_cdev, int axis, int apply_now) @@ -1410,6 +1448,7 @@ static int ap3426_cdev_ps_calibrate(struct sensors_classdev *sensors_cdev, int power; unsigned int config; unsigned int interrupt; +<<<<<<< HEAD u16 min = PS_DATA_MASK; u8 ps_data[2]; int count = AP3426_CALIBRATE_SAMPLES; @@ -1417,6 +1456,15 @@ static int ap3426_cdev_ps_calibrate(struct sensors_classdev *sensors_cdev, struct ap3426_data, ps_cdev); +======= + u16 avg = 0; + u16 data[AP3426_CALIBRATE_SAMPLES]; + u8 ps_data[2]; + int count = AP3426_CALIBRATE_SAMPLES + 1; + struct ap3426_data *di = container_of(sensors_cdev, + struct ap3426_data, ps_cdev); + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (axis != AXIS_BIAS) return 0; @@ -1506,20 +1554,34 @@ static int ap3426_cdev_ps_calibrate(struct sensors_classdev *sensors_cdev, dev_err(&di->i2c->dev, "read PS data failed\n"); break; } +<<<<<<< HEAD if (min > ((ps_data[1] << 8) | ps_data[0])) min = (ps_data[1] << 8) | ps_data[0]; } if (!count) { if (min > (PS_DATA_MASK >> 1)) { +======= + data[count - 1] = (ps_data[1] << 8) | ps_data[0]; + } + avg = ap3426_median_average(data, AP3426_CALIBRATE_SAMPLES); + dev_dbg(&di->i2c->dev, "calibrated average %d\n", avg); + if (!count) { + if (avg > (PS_DATA_MASK >> 1)) { +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dev_err(&di->i2c->dev, "ps data out of range, check if shield\n"); rc = -EINVAL; goto exit_disable_ps; } if (apply_now) { +<<<<<<< HEAD ps_data[0] = PS_LOW_BYTE(min); ps_data[1] = PS_HIGH_BYTE(min); +======= + ps_data[0] = PS_LOW_BYTE(avg); + ps_data[1] = PS_HIGH_BYTE(avg); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed rc = regmap_bulk_write(di->regmap, AP3426_REG_PS_CAL_L, ps_data, 2); if (rc) { @@ -1527,11 +1589,19 @@ static int ap3426_cdev_ps_calibrate(struct sensors_classdev *sensors_cdev, AP3426_REG_PS_CAL_L, rc); goto exit_disable_ps; } +<<<<<<< HEAD di->bias = min; } snprintf(di->calibrate_buf, sizeof(di->calibrate_buf), "0,0,%d", min); +======= + di->bias = avg; + } + + snprintf(di->calibrate_buf, sizeof(di->calibrate_buf), "0,0,%d", + avg); +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed dev_dbg(&di->i2c->dev, "result: %s\n", di->calibrate_buf); } else { dev_err(&di->i2c->dev, "calibration failed\n"); diff --git a/drivers/input/misc/ap3426_cm.c b/drivers/input/misc/ap3426_cm.c new file mode 100644 index 00000000000..154637a16fd --- /dev/null +++ b/drivers/input/misc/ap3426_cm.c @@ -0,0 +1,3210 @@ +/* + * This file is part of the AP3426, AP3212C and AP3216C sensor driver. + * AP3426 is combined proximity and ambient light sensor. + * AP3216C is combined proximity, ambient light sensor and IRLED. + * + * Contact: John Huang + * Templeton Tsai + * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + * + * Filename: ap3426.c + * + * Summary: + * AP3426 device driver. + * + * Modification History: + * Date By Summary + * -------- -------- ------------------------------------------------------- + * 02/02/12 YC 1. Modify irq function to seperate two interrupt routine. + * 2. Fix the index of reg array error in em write. + * 02/22/12 YC 3. Merge AP3426 and AP3216C into the same driver. (ver 1.8) + * 03/01/12 YC Add AP3212C into the driver. (ver 1.8) + * 07/25/14 John Ver.2.1 , ported for Nexus 7 + * 08/21/14 Templeton AP3426 Ver 1.0, ported for Nexus 7 + * 09/24/14 kevin Modify for Qualcomm8x10 to support device tree + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ap3426_cm.h" +#include +#include +#include +#include + +#define AP3426_DRV_NAME "ap3426" +#define DRIVER_VERSION "1.0" + +/* Proximity high threshold, the px value ranges: 0 (FAR) to 1023 (NEAR) */ +// In ps sensor hysteresis mode (default), object distance > PX_HIGH_THRESHOLD +// triggers distance 0 (near); distance < PX_LOW_THRESHOLD triggers distance 1 (far) +#define PX_HIGH_THRESHOLD 450 +#define PX_LOW_THRESHOLD 300 + +/* misc define */ +#define MIN_ALS_POLL_DELAY_MS 110 +#define MAX_ALS_POLL_DELAY_MS 10000 +#define DEFAULT_ALS_POLL_DELAY_MS 200 +#define POWER_ON_DELAY_MS 10 + +#define AP3426_VDD_MIN_UV 2000000 +#define AP3426_VDD_MAX_UV 3300000 +#define AP3426_VIO_MIN_UV 1750000 +#define AP3426_VIO_MAX_UV 1950000 + +/* + * Un-comment the 3 lines within the #ifndef...#endif to enable pr_debug() + * locally. pr_debug() is used by DBG macros; ex: ALS_DBG() and PS_DB(). + */ +#ifndef CONFIG_DYNAMIC_DEBUG +// #define CONFIG_DYNAMIC_DEBUG +// #undef pr_debug +// #define pr_debug(args...) printk(args) +#endif + +// #define PS_POLLING_DEBUG 1 /* Uncomment to enable polling PS debug; ... */ + /* ... normally PS is only interrupt driven */ + +// #define ALS_DEBUG /* Uncomment for additional ALS Debug */ + +// #define MUTEX_DEBUG /* Uncomment for Mutex checking */ + +/* + * DEBUG, INFO and ERR Logging are normally defined below and enabled. + * pr_debug() is enabled above or if the kernel configs CONFIG_DYNAMIC_DEBUG. + * + * FIXME: + * Currently not indenting when debug is enabled via kernel config file. + * Low priority issue, will fix when it's convenient. + * + * Since pr_debug() is by default a null function the gcc optimizer will normally remove the + * {if ... pr_debug} + * fragments in production builds. + * + * The indent logic is ifdef's out if CONFIG_DYNAMIC_DEBUG isn't defined. + * + * Keeping this driver similar to the Tomato proximity driver; + * See: drivers/sensors/alsprox/pa12200001/pa12200001.c + * where it appears the debug code is enabled for a CONFIG_DYNAMIC_DEBUG kernel. + * + * These can be modified below to increase/disable/enable logging. + */ +#define PS_debug 1 /* Increase to 2 for more details */ +#define PS_info 1 +#define PS_err 1 + +#define ALS_debug 2 /* Increase to 2 for more details */ +#define ALS_info 1 +#define ALS_err 1 + +#define MUTEX_debug 0 /* Usually not too interesting */ + +#if defined(CONFIG_DYNAMIC_DEBUG) +static atomic_t log_indent = ATOMIC_INIT(0); + +static inline int indent(void) { return((int) log_indent.counter); } +static inline void ind(void) { pr_debug("%*s", (indent() * 2), " "); } +static inline void inc(void) { atomic_inc(&log_indent); } +static inline void dec(void) { atomic_dec_if_positive(&log_indent); } + +#else + +#define indent() 0 +#define ind() +#define inc() +#define dec() +#endif + +/* + * Indent Logging: + * + * fun1(args) { + * fun2(args) { + * return(rv); + * } + * } + */ +#define ENTRY(fmt, args...) { \ + if (indent() == 0) { \ + pr_debug("\n"); \ + } \ + ind(); \ + pr_debug("%s(", __func__); \ + pr_debug(fmt"): {\n", args); \ + inc(); \ +} + +#define RETURN(fmt, args...) { \ + ind(); \ + pr_debug("%s: return(", __func__); \ + pr_debug(fmt");\n", args); \ + dec(); \ + ind(); \ + pr_debug("}\n"); \ +} +#define RETURN_VOID() { \ + dec(); \ + ind(); \ + pr_debug("}\n"); \ +} + +#define DBG(args...) { ind(); pr_debug("%s: ", __func__); pr_debug(args); } +#define ERR(args...) { ind(); pr_err("%s: ", __func__); pr_err(args); } +#define INFO(args...) { ind(); pr_info("%s: ", __func__); pr_info(args); } + +/* Proximity Sensor Logging */ +#define PS_ENTRY(args...) { if (PS_debug) ENTRY(args); } +#define PS_RETURN(args...) { if (PS_debug) RETURN(args); } +#define PS_RETURN_VOID() { if (PS_debug) RETURN_VOID(); } +#define PS_DBG(args...) { if (PS_debug) DBG(args); } +#define PS_DBG2(args...) { if (PS_debug >= 2) DBG(args); } +#define PS_ERR(args...) { if (PS_err) ERR(args); } +#define PS_INFO(args...) { if (PS_info) INFO(args); } + +/* Ambient Light Sensor Logging */ +#define ALS_ENTRY(args...) { if (ALS_debug) ENTRY(args); } +#define ALS_RETURN(args...) { if (ALS_debug) RETURN(args); } +#define ALS_RETURN_VOID() { if (ALS_debug) RETURN_VOID(); } +#define ALS_DBG(args...) { if (ALS_debug) DBG(args); } +#define ALS_DBG2(args...) { if (ALS_debug >= 2) DBG(args); } +#define ALS_ERR(args...) { if (ALS_err) ERR(args); } +#define ALS_INFO(args...) { if (ALS_info) INFO(args); } + +/* Mutex Check Logging */ +#define MUTEX_ENTRY(args...) { if (MUTEX_debug) ENTRY(args); } +#define MUTEX_RETURN(args...) { if (MUTEX_debug) RETURN(args); } +#define MUTEX_RETURN_VOID() { if (MUTEX_debug) RETURN_VOID(); } +#define MUTEX_DBG(args...) { if (MUTEX_debug) DBG(args); } + + + +#define DI_AUTO_CAL + +#ifdef DI_AUTO_CAL + #define DI_PS_CAL_THR_MAX 500 + #define DI_PS_CAL_THR_EXPECTED 150 + #define DI_PS_CAL_THR_MIN 0 +#endif + +static void pl_timer_callback(unsigned long pl_data); +static int ap3426_power_ctl(struct ap3426_data *data, bool on); +static int ap3426_power_init(struct ap3426_data*data, bool on); + +static struct ap3426_data *private_pl_data = NULL; +// AP3426 register +static u8 ap3426_reg_to_idx_array[AP3426_MAX_REG_NUM] = { + 0, 1, 2, 0xff, 0xff, 0xff, 3, 0xff, + 0xff, 0xff, 4, 5, 6, 7, 8, 9, + 10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 11, 12, 13, 14, 0xff, 0xff, + 15, 16, 17, 18, 19, 20, 21, 0xff, + 22, 23, 24, 25, 26, 27 //20-2f +}; +static u8 ap3426_reg[AP3426_NUM_CACHABLE_REGS] = { + 0x00,0x01,0x02,0x06,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, + 0x10,0x1A,0x1B,0x1C,0x1D,0x20,0x21,0x22,0x23,0x24, + 0x25,0x26,0x28,0x29,0x2A,0x2B,0x2C,0x2D +}; +static u8 *reg_array = ap3426_reg; +// AP3426 range +static int ap3426_range[4] = {32768,8192,2048,512}; +//static u16 ap3426_threshole[8] = {28,444,625,888,1778,3555,7222,0xffff}; + +static int *range = ap3426_range; + +static int als_calibration = 320; +static int misc_ps_opened = 0; +static int misc_als_opened = 0; +#ifdef CONFIG_AP3426_HEARTBEAT_SENSOR +static int misc_ht_opened = 0; +#endif +struct regulator *vdd; +struct regulator *vio; +bool power_enabled; + +/* + * Number of threads posted. + * Increaded by hard interrupt handers and + * decremented by soft interrupt handler (aka thread). + */ +static atomic_t isr_threads_posted = ATOMIC_INIT(0); + +/* + * register access helpers + */ + +/* +fixed for msm8916 kevindang20141010 +*/ +static struct sensors_classdev sensors_light_cdev = { + .name = "light", + .vendor = "DI", + .version = 1, + .handle = SENSORS_LIGHT_HANDLE, + .type = SENSOR_TYPE_LIGHT, + .max_range = "6500", + .resolution = "0.0625", + .sensor_power = "0.09", + .min_delay = 0, /* us */ + .fifo_reserved_event_count = 0, + .fifo_max_event_count = 0, + .enabled = 0, + .delay_msec = 200, + .sensors_enable = NULL, + .sensors_poll_delay = NULL, +}; + + +static struct sensors_classdev sensors_proximity_cdev = { + .name = "proximity", + .vendor = "DI", + .version = 1, + .handle = SENSORS_PROXIMITY_HANDLE, + .type = SENSOR_TYPE_PROXIMITY, + .max_range = "5.0", + .resolution = "5.0", + .sensor_power = "0.1", + .min_delay = 0, + .fifo_reserved_event_count = 0, + .fifo_max_event_count = 0, + .enabled = 0, + .delay_msec = 200, + .sensors_enable = NULL, + .sensors_poll_delay = NULL, +}; + + +/* + * Mutex Functions: + * Using a course locking strategy, locking at driver entry points and checking at points + * that appear to be exposed to race conditions. Most proximity drivers appear to have taken + * this course locking strategy. + */ +#ifdef MUTEX_DEBUG +static inline void ap3426_verify_mutex_locked(struct ap3426_data *data) +{ + struct mutex *lock = &data->lock; + int mutex_locked, i; + + mutex_locked = mutex_is_locked(lock); + + if (!mutex_locked) { + for (i = 0; i < 5; i++) { + printk(KERN_ERR " ******************** Mutex NOT Locked! ***********************\n"); + } + } +} +#else +#define ap3426_verify_mutex_locked(args) +#endif + +#ifdef MUTEX_DEBUG +static inline void ap3426_verify_client_mutex_locked(struct i2c_client *client) +{ + // ENTRY("client:%p", client); + + if (client) { + struct ap3426_data *data = i2c_get_clientdata(client); + + ap3426_verify_mutex_locked(data); + } else { + DBG("client = NULL!\n"); + } + // RETURN_VOID(); +} +#else +#define ap3426_verify_client_mutex_locked(args) +#endif + +static inline void ap3426_report_abs_ts( + struct input_dev *dev, int code, int value) +{ + struct timespec ts; + get_monotonic_boottime(&ts); + input_report_abs(dev, code, value); + input_event(dev, EV_SYN, SYN_TIME_SEC, ts.tv_sec); + input_event(dev, EV_SYN, SYN_TIME_NSEC, ts.tv_nsec); + input_sync(dev); +} + + +static inline void ap3426_lock_mutex(struct ap3426_data *data) +{ + MUTEX_ENTRY("data:%p", data); + + mutex_lock(&data->lock); + + ap3426_verify_mutex_locked(data); + + MUTEX_RETURN_VOID(); +} + +static inline void ap3426_unlock_mutex(struct ap3426_data *data) +{ + MUTEX_ENTRY("data:%p", data); + + ap3426_verify_mutex_locked(data); + + mutex_unlock(&data->lock); + + MUTEX_RETURN_VOID(); +} + +/* + * Register Functions: + */ +static int __ap3426_read_reg(struct i2c_client *client, + u32 reg, u8 mask, u8 shift) +{ + struct ap3426_data *data = i2c_get_clientdata(client); + + ap3426_verify_mutex_locked(data); + + return (data->reg_cache[ap3426_reg_to_idx_array[reg]] & mask) >> shift; +} + +static int __ap3426_write_reg(struct i2c_client *client, + u32 reg, u8 mask, u8 shift, u8 val) +{ + struct ap3426_data *data = i2c_get_clientdata(client); + int ret = 0; + u8 tmp; + + ap3426_verify_mutex_locked(data); + + tmp = data->reg_cache[ap3426_reg_to_idx_array[reg]]; + tmp &= ~mask; + tmp |= val << shift; + + ret = i2c_smbus_write_byte_data(client, reg, tmp); + if (!ret) + data->reg_cache[ap3426_reg_to_idx_array[reg]] = tmp; + + return ret; +} + +/* + * internally used functions + */ + +/* range */ +static int ap3426_get_range(struct i2c_client *client) +{ + int rv; + u8 idx; + + ENTRY("client:%p", client); + + idx = __ap3426_read_reg(client, AP3426_REG_ALS_CONF, + AP3426_ALS_RANGE_MASK, AP3426_ALS_RANGE_SHIFT); + + rv = range[idx]; + + RETURN("rv:%d", rv); + return(rv); +} + +static int ap3426_set_range(struct i2c_client *client, int range) +{ + int rv; + + ENTRY("client:%p, range:%d", client, range); + + rv = __ap3426_write_reg(client, AP3426_REG_ALS_CONF, + AP3426_ALS_RANGE_MASK, AP3426_ALS_RANGE_SHIFT, range); + + RETURN("rv:%d", rv); + return(rv); +} + +/* mode */ +static int ap3426_get_mode(struct i2c_client *client) +{ + int rv; + + ENTRY("client:%p", client); + + rv = __ap3426_read_reg(client, AP3426_REG_SYS_CONF, + AP3426_REG_SYS_CONF_MASK, AP3426_REG_SYS_CONF_SHIFT); + + RETURN("rv:%d", rv); + return rv; +} + +static int ap3426_set_mode(struct i2c_client *client, int mode) +{ + int ret; + + ENTRY("client:%p, mode:%d", client, mode); + + misc_ps_opened = mode & AP3426_SYS_ALS_ENABLE; + misc_als_opened = mode & AP3426_SYS_PS_ENABLE; + + ret = __ap3426_write_reg(client, AP3426_REG_SYS_CONF, + AP3426_REG_SYS_CONF_MASK, AP3426_REG_SYS_CONF_SHIFT, mode); + + RETURN("rv:%d", ret); + return ret; +} + +/* ALS low threshold */ +static int ap3426_get_althres(struct i2c_client *client) +{ + int lsb, msb, rv; + + ENTRY("client:%p", client); + + ap3426_verify_client_mutex_locked(client); + + lsb = __ap3426_read_reg(client, AP3426_REG_ALS_THDL_L, + AP3426_REG_ALS_THDL_L_MASK, AP3426_REG_ALS_THDL_L_SHIFT); + + msb = __ap3426_read_reg(client, AP3426_REG_ALS_THDL_H, + AP3426_REG_ALS_THDL_H_MASK, AP3426_REG_ALS_THDL_H_SHIFT); + + rv = ((msb << 8) | lsb); + + RETURN("rv:%d", rv); + return rv; +} + +static int ap3426_set_althres(struct i2c_client *client, int val) +{ + int lsb, msb, err; + + msb = val >> 8; + lsb = val & AP3426_REG_ALS_THDL_L_MASK; + + PS_ENTRY("client:%p, val:%d", client, val); + + ap3426_verify_client_mutex_locked(client); + + err = __ap3426_write_reg(client, AP3426_REG_ALS_THDL_L, + AP3426_REG_ALS_THDL_L_MASK, AP3426_REG_ALS_THDL_L_SHIFT, lsb); + if (err) + goto done; + + err = __ap3426_write_reg(client, AP3426_REG_ALS_THDL_H, + AP3426_REG_ALS_THDL_H_MASK, AP3426_REG_ALS_THDL_H_SHIFT, msb); +done: + PS_RETURN("err:%d", err); + return err; +} + +/* ALS high threshold */ +static int ap3426_get_ahthres(struct i2c_client *client) +{ + int lsb, msb, rv; + + PS_ENTRY("client:%p", client); + + ap3426_verify_client_mutex_locked(client); + + lsb = __ap3426_read_reg(client, AP3426_REG_ALS_THDH_L, + AP3426_REG_ALS_THDH_L_MASK, AP3426_REG_ALS_THDH_L_SHIFT); + + msb = __ap3426_read_reg(client, AP3426_REG_ALS_THDH_H, + AP3426_REG_ALS_THDH_H_MASK, AP3426_REG_ALS_THDH_H_SHIFT); + + rv = ((msb << 8) | lsb); + + PS_RETURN("rv:%d", rv); + return rv ; +} + +static int ap3426_set_ahthres(struct i2c_client *client, int val) +{ + int lsb, msb, err; + + PS_ENTRY("client:%p, val:%d", client, val); + + ap3426_verify_client_mutex_locked(client); + + msb = val >> 8; + lsb = val & AP3426_REG_ALS_THDH_L_MASK; + + err = __ap3426_write_reg(client, AP3426_REG_ALS_THDH_L, + AP3426_REG_ALS_THDH_L_MASK, AP3426_REG_ALS_THDH_L_SHIFT, lsb); + + if (err) + goto done; + + err = __ap3426_write_reg(client, AP3426_REG_ALS_THDH_H, + AP3426_REG_ALS_THDH_H_MASK, AP3426_REG_ALS_THDH_H_SHIFT, msb); + +done: + PS_RETURN("err:%d", err); + return err; +} + +/* PX low threshold */ +static int ap3426_get_plthres(struct i2c_client *client) +{ + int lsb, msb, rv; + + PS_ENTRY("client:%p", client); + + ap3426_verify_client_mutex_locked(client); + + lsb = __ap3426_read_reg(client, AP3426_REG_PS_THDL_L, + AP3426_REG_PS_THDL_L_MASK, AP3426_REG_PS_THDL_L_SHIFT); + + msb = __ap3426_read_reg(client, AP3426_REG_PS_THDL_H, + AP3426_REG_PS_THDL_H_MASK, AP3426_REG_PS_THDL_H_SHIFT); + + rv = ((msb << 8) | lsb); + + PS_RETURN("rv:%d", rv); + return rv ; +} + +static int ap3426_set_plthres(struct i2c_client *client, int val) +{ + int lsb, msb, err; + + PS_ENTRY("client:%p, val:%d", client, val); + + ap3426_verify_client_mutex_locked(client); + + msb = val >> 8; + lsb = val & AP3426_REG_PS_THDL_L_MASK; + + err = __ap3426_write_reg(client, AP3426_REG_PS_THDL_L, + AP3426_REG_PS_THDL_L_MASK, AP3426_REG_PS_THDL_L_SHIFT, lsb); + + if (err) + goto done; + + err = __ap3426_write_reg(client, AP3426_REG_PS_THDL_H, + AP3426_REG_PS_THDL_H_MASK, AP3426_REG_PS_THDL_H_SHIFT, msb); +done: + PS_RETURN("err:%d", err); + return err; +} + +/* PX high threshold */ +static int ap3426_get_phthres(struct i2c_client *client) +{ + int lsb, msb, rv; + + PS_ENTRY("client:%p", client); + + ap3426_verify_client_mutex_locked(client); + + lsb = __ap3426_read_reg(client, AP3426_REG_PS_THDH_L, + AP3426_REG_PS_THDH_L_MASK, AP3426_REG_PS_THDH_L_SHIFT); + + msb = __ap3426_read_reg(client, AP3426_REG_PS_THDH_H, + AP3426_REG_PS_THDH_H_MASK, AP3426_REG_PS_THDH_H_SHIFT); + + rv = ((msb << 8) | lsb); + + PS_RETURN("rv:%d", rv); + return rv ; +} + + +static int ap3426_set_phthres(struct i2c_client *client, int val) +{ + int lsb, msb, err; + + PS_ENTRY("client:%p, val:%d", client, val); + + ap3426_verify_client_mutex_locked(client); + + msb = val >> 8; + lsb = val & AP3426_REG_PS_THDH_L_MASK; + + err = __ap3426_write_reg(client, AP3426_REG_PS_THDH_L, + AP3426_REG_PS_THDH_L_MASK, AP3426_REG_PS_THDH_L_SHIFT, lsb); + + if (err) + goto done; + + err = __ap3426_write_reg(client, AP3426_REG_PS_THDH_H, + AP3426_REG_PS_THDH_H_MASK, AP3426_REG_PS_THDH_H_SHIFT, msb); +done: + PS_RETURN("err:%d", err); + return err; +} + +static int ap3426_get_adc_value(struct i2c_client *client) +{ + unsigned int lsb, msb, val; + + ALS_ENTRY("client:%p", client); + + ap3426_verify_client_mutex_locked(client); + + val = lsb = i2c_smbus_read_byte_data(client, AP3426_REG_ALS_DATA_LOW); + + if (lsb < 0) { + ALS_ERR("lsb:%d < 0\n", lsb); + goto done; + } + + val = msb = i2c_smbus_read_byte_data(client, AP3426_REG_ALS_DATA_HIGH); + + if (msb < 0) { + ALS_ERR("msb:%d < 0\n", msb); + goto done; + } + +#ifdef ALS_DEBUG + { + unsigned int tmp, tmp2, range_tmp;; + + range_tmp = ap3426_get_range(client); + tmp = (((msb << 8) | lsb) * range_tmp) >> 16; + tmp2 = tmp * als_calibration / 100; + + ALS_DBG("tmp2:%d = tmp:%d * als_calibration:%d\n", \ + tmp2, tmp, als_calibration); + } +#endif + + val = (msb << 8) | lsb; + +done: + ALS_RETURN("val:0x%x:%d = (msb:%x << 8) || lsb:%x", + val, val, msb, lsb); + + return val; +} + +/* Get PS Distance: Near:0 or Far:1 */ +static int ap3426_get_object(struct i2c_client *client) +{ + int val; + int rv; + + PS_ENTRY("client:%p", client); + + val = i2c_smbus_read_byte_data(client, AP3426_OBJ_COMMAND); + + PS_DBG2("val:0X%x &= AP3426_OBJ_MASK:0x%x\n", val, AP3426_OBJ_MASK); + val &= AP3426_OBJ_MASK; + + rv = !(val >> AP3426_OBJ_SHIFT); + + PS_DBG2("rv = 0x%x = !(val:0x%x >> AP3426_OBJ_SHIFT):%d;\n", + rv, val, AP3426_OBJ_SHIFT); + + PS_RETURN("rv:%d", rv); + return(rv); +} + +static int ap3426_get_intstat(struct i2c_client *client) +{ + int val; + int rv; + + PS_ENTRY("client:%p", client); + + val = i2c_smbus_read_byte_data(client, AP3426_REG_SYS_INTSTATUS); + val &= AP3426_REG_SYS_INT_MASK; + + rv = val >> AP3426_REG_SYS_INT_SHIFT; + + PS_RETURN("rv:%d", rv); + return(rv); +} + +static int ap3426_get_px_value(struct i2c_client *client) +{ + int lsb, msb; + int rv; + + PS_ENTRY("client:%p", client); + + ap3426_verify_client_mutex_locked(client); + + rv = lsb = i2c_smbus_read_byte_data(client, AP3426_REG_PS_DATA_LOW); + + if (lsb < 0) { + PS_ERR("lsb < 0\n"); + goto done; + } + PS_DBG2("IR = 0X%x = lsb\n", (u32)(lsb)); + rv = msb = i2c_smbus_read_byte_data(client, AP3426_REG_PS_DATA_HIGH); + + if (msb < 0) { + PS_ERR("msb < 0\n"); + goto done; + } + PS_DBG2("IR = 0X%x = msb\n", (u32)(msb)); + rv = (u32)(((msb & AL3426_REG_PS_DATA_HIGH_MASK) << 8) | (lsb & AL3426_REG_PS_DATA_LOW_MASK)); + +done: + PS_RETURN("rv:0X%x:%d", rv, rv); + return(rv); +} + + +static inline int ap3426_disable_ps_and_als_interrupts(struct i2c_client *client) +{ + int rv; + + PS_ENTRY("client:%p", client); + + rv = i2c_smbus_write_byte_data(client, AP3426_REG_SYS_INTCTRL, 0); + + PS_RETURN("rv: %d", rv); + + return rv; +} + +static inline void ap3426_disable_ps_interrupts(struct i2c_client *client) +{ + int val;; + + PS_ENTRY("client:%p", client); + + ap3426_verify_client_mutex_locked(client); + + val = i2c_smbus_read_byte_data(client, AP3426_REG_SYS_INTCTRL); + val &= ~0x80; + i2c_smbus_write_byte_data(client, AP3426_REG_SYS_INTCTRL, val); + + PS_RETURN_VOID(); +} + +static inline void ap3426_enable_ps_interrupts(struct i2c_client *client) +{ + int val; + + + PS_ENTRY("client:%p", client); + ap3426_verify_client_mutex_locked(client); + + val = i2c_smbus_read_byte_data(client, AP3426_REG_SYS_INTCTRL); + val |= 0x80; + i2c_smbus_write_byte_data(client, AP3426_REG_SYS_INTCTRL, val); + + PS_RETURN_VOID(); +} + +/* Power on PS and IR Part of Chip */ +static inline int ap3426_power_on_ps(struct i2c_client *client) +{ + int err; + + PS_ENTRY("client:%p", client); + + ap3426_verify_client_mutex_locked(client); + + err = __ap3426_write_reg(client, AP3426_REG_SYS_CONF, + AP3426_REG_SYS_INT_PMASK, 1, 1); + + PS_RETURN("err:%d", err); + return(err); +} + +static inline int ap3426_power_off_ps(struct i2c_client *client) +{ + int err; + + PS_ENTRY("client:%p", client); + + err = __ap3426_write_reg(client, AP3426_REG_SYS_CONF, + AP3426_REG_SYS_INT_PMASK, 1, 0); + + PS_RETURN("err:%d", err); + return(err); +} + +/* Power on ALS Part of Chip */ +static inline int ap3426_power_on_als(struct i2c_client *client) +{ + int err; + + PS_ENTRY("client:%p", client); + + err = __ap3426_write_reg(client, AP3426_REG_SYS_CONF, + AP3426_REG_SYS_INT_AMASK, 0, 1); + + PS_RETURN("err:%d", err); + return(err); +} + +static inline int ap3426_power_off_als(struct i2c_client *client) +{ + int err; + + PS_ENTRY("client:%p", client); + + err = __ap3426_write_reg(client, AP3426_REG_SYS_CONF, + AP3426_REG_SYS_INT_AMASK, 0, 0); + + PS_RETURN("err:%d", err); + return(err); +} + +static int ap3426_ps_enable(struct ap3426_data *ps_data, int enable) +{ + int32_t ret; + int pxvalue; + int distance; + struct i2c_client *client = ps_data->client; + + PS_ENTRY("ps_data:%p, enable:%d", ps_data, enable); + + if (ps_data->suspended) { + printk(KERN_ERR "%s: suspended! ret = -EINVAL:%d\n", __func__, + EINVAL); + ret = EINVAL; + goto done; + } + if (misc_ps_opened == enable) { + PS_DBG("misc_ps_opened == enable already; done\n"); + ret = 0; + goto done; + } + if (enable) { + ret = ap3426_power_on_ps(client); + msleep(50); + ap3426_enable_ps_interrupts(client); + } else { + ap3426_disable_ps_interrupts(client); + msleep(50); + ret = ap3426_power_off_ps(client); + } + if (ret < 0) { + printk("ret:%d = ap3426_power_on/off_ps(); Error\n", ret); + } else { + misc_ps_opened = enable; + } + + // Ensure psensor wakeup the system + msleep(50); + if (misc_ps_opened){ + distance = ap3426_get_object(client); + ap3426_report_abs_ts(ps_data->psensor_input_dev, ABS_DISTANCE, distance); + wake_lock_timeout(&ps_data->ps_wakelock, 2*HZ); + pxvalue = ap3426_get_px_value(client); + PS_DBG("pxvalue:%d, distance:%d\n", pxvalue, distance); + +#ifdef PS_POLLING_DEBUG + ret = mod_timer(&ps_data->pl_timer, jiffies + msecs_to_jiffies(data->als_msec_poll_delay); +#endif + } +done: + PS_RETURN("ret:%d", ret); + return ret; +} + +static int ap3426_als_enable(struct ap3426_data *ps_data, int enable) +{ + int32_t ret; + struct i2c_client *client = ps_data->client; + + ALS_ENTRY("ps_data:%p, enable:%d", ps_data, enable); + + ALS_DBG("misc_als_opened:%d\n", misc_als_opened); + + if (ps_data->suspended) { + printk(KERN_ERR "%s: suspended! ret = EINVAL:%d; misc_als_opened:%d\n", + __func__, EINVAL, misc_als_opened); + + ret = -EINVAL; + goto done; + } + if (misc_als_opened == enable) { + ALS_DBG("misc_als_opened:%d == enable:%d and !als_re_enable; Done.", \ + misc_als_opened, enable); + + ret = 0; + goto done; + } + misc_als_opened = enable; + + if (enable) + ret = ap3426_power_on_als(client); + else + ret = ap3426_power_off_als(client); + + if (ret < 0){ + printk(KERN_ERR "%s: Error powering ALS On/Off\n", __func__); + } + + msleep(50); + if (misc_als_opened) { + // We will need to Report a an extra value in the polling timer... + // ... so that we are sure the 1st event gets to userspace. + ALS_DBG("ps_data->als_polling_just_enabled:%d = 1; Starting Polling Timer.\n", \ + ps_data->als_polling_just_enabled); + + ps_data->als_polling_just_enabled = 1; + + ret = mod_timer(&ps_data->pl_timer, jiffies + msecs_to_jiffies(ps_data->als_msec_poll_delay)); + } else { + ALS_DBG("ps_data->als_polling_just_enabled:%d = 0;\n", \ + ps_data->als_polling_just_enabled); + + ps_data->als_polling_just_enabled = 0; + +#ifndef PS_POLLING_DEBUG + ALS_DBG("Disable Polling Timer.\n"); + ret = del_timer_sync(&ps_data->pl_timer); +#endif + } +done: + ALS_RETURN("ret:%d", ret); + return ret; +} + +/********************************************************************* +light sensor register & unregister +********************************************************************/ +static ssize_t ls_enable_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct ap3426_data *ps_data = dev_get_drvdata(dev); + int32_t ret; + ssize_t rv; + + ALS_ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(ps_data); /* Not really needed */ + + ret = misc_als_opened; + rv = scnprintf(buf, PAGE_SIZE, "%d\n", ret); + + ap3426_unlock_mutex(ps_data); + + ALS_RETURN("rv:%zd", rv); + return(rv); +} + +static ssize_t ls_enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) +{ + struct ap3426_data *ps_data = dev_get_drvdata(dev); + uint8_t en; + + ALS_ENTRY("dev:%p, attr:%p, buf:%p, size:%zd", + dev, attr, buf, size); + + ap3426_lock_mutex(ps_data); + + if (sysfs_streq(buf, "1")) + en = 1; + else if (sysfs_streq(buf, "0")) + en = 0; + else { + ALS_ERR("invalid value '%c':%d\n", *buf, *buf); + size = -EINVAL; + goto done; + } + ALS_DBG("en = %d\n", (u32)(en)); + ap3426_als_enable(ps_data, en); + +done: + ap3426_unlock_mutex(ps_data); + + ALS_RETURN("size:%zd", size); + return size; +} + +static struct device_attribute ls_enable_attribute = __ATTR(enable, 0666, ls_enable_show, ls_enable_store); + +static struct attribute *ap3426_ls_attrs [] = +{ + &ls_enable_attribute.attr, + NULL +}; + +static struct attribute_group ap3426_ls_attribute_group = { + .attrs = ap3426_ls_attrs, +}; + +static int ap3426_register_lsensor_device(struct i2c_client *client, struct ap3426_data *data) +{ + struct input_dev *input_dev; + int rc; + + ALS_ENTRY("client:%p, data:%p", client, data); + + ALS_DBG("allocating input device lsensor\n"); + input_dev = input_allocate_device(); + if (!input_dev) { + dev_err(&client->dev,"%s: could not allocate input device for lsensor\n", __FUNCTION__); + rc = -ENOMEM; + goto done; + } + data->lsensor_input_dev = input_dev; + input_set_drvdata(input_dev, data); + input_dev->name = "light";//"lightsensor-level"; + input_dev->dev.parent = &client->dev; + set_bit(EV_ABS, input_dev->evbit); + input_set_abs_params(input_dev, ABS_MISC, 0, ((1 << 16) -1), 0, 0); + + rc = input_register_device(input_dev); + if (rc < 0) { + pr_err("%s: could not register input device for lsensor\n", __FUNCTION__); + goto done; + } + rc = sysfs_create_group(&input_dev->dev.kobj, &ap3426_ls_attribute_group);// every devices register his own devices + +done: + ALS_RETURN("rc:%d", rc); + return rc; +} + +static void ap3426_unregister_lsensor_device(struct i2c_client *client, struct ap3426_data *data) +{ + PS_ENTRY("(client:%p, data:%p)", client, data); + + input_unregister_device(data->lsensor_input_dev); + + PS_RETURN_VOID(); +} + +/********************************************************************* +heartbeat sensor register & unregister +********************************************************************/ +#ifdef CONFIG_AP3426_HEARTBEAT_SENSOR +static int ap3426_register_heartbeat_sensor_device(struct i2c_client *client, struct ap3426_data *data) +{ + struct input_dev *input_dev; + int rc; + + ALS_ENTRY("client:%p, data:%p", client, data); + + input_dev = input_allocate_device(); + if (!input_dev) { + dev_err(&client->dev,"%s: could not allocate input device for heartbeat sensor\n", __FUNCTION__); + rc = -ENOMEM; + goto done; + } + data->hsensor_input_dev = input_dev; + input_set_drvdata(input_dev, data); + input_dev->name = "heartbeat"; + input_dev->dev.parent = &client->dev; + set_bit(EV_ABS, input_dev->evbit); + input_set_abs_params(input_dev, ABS_WHEEL, 0, 8, 0, 0); + + rc = input_register_device(input_dev); + if (rc < 0) { + pr_err("%s: could not register input device for heartbeat sensor\n", __FUNCTION__); + goto done; + } + +done: + ALS_RETURN("rc:%d", rc): + return rc; +} + +static void ap3426_unregister_heartbeat_device(struct i2c_client *client, struct ap3426_data *data) +{ + PS_ENTRY("(client:%p, data:%p)", client, data); + + input_unregister_device(data->hsensor_input_dev); + + PS_RETURN_VOID(); +} +#endif + +/* + * TEST: FAILED + * cat /sys/class/sensors/proximity/device/sensors/proximity/enable + * + * NOTE: + * We are returning the right correct but kernel console + * log DOESN'T show us executing this function. Another + * driver is likely registering the same inode. + */ +static ssize_t ps_enable_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct ap3426_data *ps_data = dev_get_drvdata(dev); + ssize_t rv = 0L; + int32_t ret; + + PS_ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(ps_data); /* This entry is unusual and doesn't really need to lock */ + + ret = misc_als_opened; + rv = scnprintf(buf, PAGE_SIZE, "%d\n", ret); + + ap3426_unlock_mutex(ps_data); + + PS_RETURN("rv:%zd", rv); + return(rv); +} + +/* + * TESTED: + * echo 0 > /sys/class/sensors/proximity/device/sensors/proximity/enable + * echo 1 > /sys/class/sensors/proximity/device/sensors/proximity/enable + * echo 2 > /sys/class/sensors/proximity/device/sensors/proximity/enable [Invalid value of input, input=2] + */ +static ssize_t ps_enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) +{ + struct ap3426_data *ps_data = dev_get_drvdata(dev); + ssize_t rv = size; /* Default */ + uint8_t en; + + PS_ENTRY("dev:%p, attr:%p, buf:%p, size:%zd", dev, attr, buf, size); + + ap3426_lock_mutex(ps_data); + + if (sysfs_streq(buf, "1")) + en = 1; + else if (sysfs_streq(buf, "0")) + en = 0; + else { + printk(KERN_ERR "%s, invalid value %d\n", __func__, *buf); + rv = -EINVAL; + goto done; + } + PS_DBG("en = %d\n", (u32)(en)); + + ap3426_ps_enable(ps_data, en); + +done: + ap3426_unlock_mutex(ps_data); + + PS_RETURN("rv:%zd", rv); + return rv; +} + +/* + * Strange that these two functions are only externally visible here and yet we can see ps_enable_store() + * in the logs but not ps_enable_show(); Finding verified. + */ +static struct device_attribute ps_enable_attribute = __ATTR(enable, 0666, ps_enable_show, ps_enable_store); + +static struct attribute *ap3426_ps_attrs [] = +{ + &ps_enable_attribute.attr, + NULL +}; + +static struct attribute_group ap3426_ps_attribute_group = { + .attrs = ap3426_ps_attrs, +}; + +static int ap3426_register_psensor_device(struct i2c_client *client, struct ap3426_data *data) +{ + struct input_dev *input_dev; + int rc; + + PS_ENTRY("(client:%p, data:%p)", client, data); + + input_dev = input_allocate_device(); + PS_DBG("input_dev = %p = input_allocate_device();\n", input_dev); + + if (!input_dev) { + dev_err(&client->dev,"%s: could not allocate input device for psensor\n", __FUNCTION__); + rc = -ENOMEM; + goto done; + } + data->psensor_input_dev = input_dev; + input_set_drvdata(input_dev, data); + input_dev->name = "proximity"; + input_dev->dev.parent = &client->dev; + set_bit(EV_ABS, input_dev->evbit); + input_set_abs_params(input_dev, ABS_DISTANCE, 0, 1, 0, 0); + + rc = input_register_device(input_dev); + if (rc < 0) { + PS_ERR("Could not register input device for psensor; rc:%d\n", rc); + goto done; + } + + // every devices register his own devices + rc = sysfs_create_group(&input_dev->dev.kobj, &ap3426_ps_attribute_group); + if (rc < 0) { + PS_ERR(" rc = %d = sysfs_create_group(...);\n", rc); + } + +done: + PS_RETURN("rc:%d", rc); + return rc; +} + + +static void ap3426_unregister_psensor_device(struct i2c_client *client, struct ap3426_data *data) +{ + PS_ENTRY("(client:%p, data:%p)", client, data); + + input_unregister_device(data->psensor_input_dev); + + PS_RETURN_VOID(); +} + +#if 0 +static void ap3426_change_ls_threshold(struct i2c_client *client) +{ + struct ap3426_data *data = i2c_get_clientdata(client); + int value; + + value = ap3426_get_adc_value(client); + if(value > 0){ + ap3426_set_althres(client,ap3426_threshole[value-1]); + ap3426_set_ahthres(client,ap3426_threshole[value]); + } + else{ + ap3426_set_althres(client,0); + ap3426_set_ahthres(client,ap3426_threshole[value]); + } + + ap3426_report_abs_ts(data->lsensor_input_dev, ABS_MISC, value); + +} +#endif + + +/* range */ +/* + * TESTED: + * cat /sys/class/sensors/proximity/device/sensors/light/device/range + * cat /sys/class/sensors/proximity/device/sensors/proximity/device/range + * + * Typical output 32768. + */ +static ssize_t ap3426_show_range(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + ssize_t rv; + + ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(data); + + rv = sprintf(buf, "%i\n", ap3426_get_range(data->client)); + + ap3426_unlock_mutex(data); + + RETURN("rv:%zd", rv); + return(rv); +} + +/* + * TESTED: + * echo 1 > /sys/class/sensors/proximity/device/sensors/light/device/range + */ +static ssize_t ap3426_store_range(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + unsigned long val; + ssize_t rv; + int ret; + + ENTRY("dev:%p, attr:%p, buf:%p. count:%zd", \ + dev, attr, buf, count); + + ap3426_lock_mutex(data); + + if ((strict_strtoul(buf, 10, &val) < 0) || (val > 3)) { + rv = -EINVAL; + goto done; + } + ret = ap3426_set_range(data->client, val); + + rv = (ret < 0)? ret:count; + +done: + ap3426_unlock_mutex(data); + RETURN("rv:%zd", rv); + return(rv); +} + +static DEVICE_ATTR(range, S_IWUSR | S_IRUGO, + ap3426_show_range, ap3426_store_range); + +/* + * ALS is typically enabled when Adaptive Brightness is enabled in GUI setup writing to this. + * + * TESTED: + * echo 1000 > /sys/class/sensors/proximity/device/sensors/light/enable + */ +static int ap3426_als_enable_set(struct sensors_classdev *sensors_cdev, + unsigned int enabled) +{ + struct ap3426_data *als_data = container_of(sensors_cdev, + struct ap3426_data, als_cdev); + int err; + int rv = 0; + + ALS_ENTRY("sensors_cdev:%p, enabled:%d", sensors_cdev, enabled); + + ap3426_lock_mutex(als_data); + + if (enabled && als_data->suspended) { + printk(KERN_ERR "%s: Enabled while Suspended!\n", __func__); + } + + err = ap3426_als_enable(als_data, enabled); + + if (err < 0) + rv = err; + + ap3426_unlock_mutex(als_data); + + ALS_RETURN("%d", rv); + return rv; +} + +/* + * This function is commonly called after enableing ALS with ap3426_als_enable_set() + * when Adaptive Brigness is enabled with the setup GUI. + * + * TESTED: + * echo 30 > /sys/class/sensors/proximity/device/sensors/light/poll_delay FAILS + * echo 15000 > /sys/class/sensors/proximity/device/sensors/light/poll_delay FAILS + * echo 1500 > /sys/class/sensors/proximity/device/sensors/light/poll_delay WORKS + */ +static int ap3426_als_poll_delay_set(struct sensors_classdev *sensors_cdev, unsigned int delay_msec) +{ + struct ap3426_data *als_data = container_of(sensors_cdev, struct ap3426_data, als_cdev); + int rv = 0; + int ret; + + ALS_ENTRY("sensors_cdev:%p, delay_msec:%d", sensors_cdev, delay_msec); + + ap3426_lock_mutex(als_data); /* Not recally necessary at this entry point */ + + if (delay_msec < MIN_ALS_POLL_DELAY_MS) { + + ALS_DBG("delay_msec:%d < MIN_ALS_POLL_DELAY_MS:%d; rv = -EINVAL:%d;\n", + delay_msec, MIN_ALS_POLL_DELAY_MS, EINVAL); + + rv = -EINVAL; + } + else if (delay_msec > MAX_ALS_POLL_DELAY_MS) { + + ALS_DBG("delay_msec:%d > MAX_ALS_POLL_DELAY_MS:%d; rv = -EINVAL:%d;\n", + delay_msec, MAX_ALS_POLL_DELAY_MS, EINVAL); + + rv = -EINVAL; + } else { + /* + * Log shows that Android sets the timer to 1000 msec after the ALS timer has executed + * and then disables ALS. It doesn't make much sense to start the timer as it's + * already running and we are about to stop the ALS timer. The ALS enable will + * start the timer. Leaving in the starting of the timer when changed as a relic + * of the previous debug interface. + */ + if (delay_msec == als_data->als_msec_poll_delay) { + ALS_DBG("als_data->als_msec_poll_delay:%d == delay_msec:%d; [Nothing to Do]\n", + als_data->als_msec_poll_delay, delay_msec); + } else { + printk(" %s: als_data->als_msec_poll_delay:%d = delay_msec:%d; [New Value]\n", __func__, + als_data->als_msec_poll_delay, delay_msec); + + als_data->als_msec_poll_delay = delay_msec; + + ALS_DBG("Launching Timer.\n"); + + ret = mod_timer(&als_data->pl_timer, jiffies + msecs_to_jiffies(delay_msec)); + + if (ret < 0) + rv = ret; + } + } + + ap3426_unlock_mutex(als_data); + + ALS_RETURN("%d", rv); + return rv; +} + +#ifdef DI_AUTO_CAL +static inline void swap_at(u16 *x, u16 *y) +{ + u16 temp = *x; + + *x = *y; + *y = temp; +} + +static inline void ap3426_sort(u16 *sample_data, int size) +{ + int i, j; + + for (i = 0; i < size - 1; i++) { + for (j = i + 1; j < size; j++) { + if (sample_data[i] > sample_data[j]) { + swap_at(&sample_data[i], &sample_data[j]); + } + } + } + if (PS_info) { + printk("%s: Sorted sample_data[ ", __func__); + for (i = 0; i < size; i++) { + printk("%d ", sample_data[i]); + } + printk("]\n"); + } +} + + +static int ap3426_set_ps_crosstalk_calibration(struct i2c_client *client, int val) +{ + int lsb, msb, err; + + msb = val >> 8; + lsb = val & 0xFF; + err = __ap3426_write_reg(client, 0x28, 0xFF, 0x00, lsb); + + err =__ap3426_write_reg(client, 0x29, 0xFF, 0x00, msb); + + printk("%s: Calibration Register = %d.\n", __func__, val); + + return err; +} + +#define CAL_SAMPLES 9 + +/* + * Try to get 5 samples to set the calibration register. + * Discard the 1st sample to two (as done on Tomato). + * Discard any samples that are not in the expected range. + * Samples taken just after changing the calibration + * register haven't changed yet. + */ +int ap3426_ps_calibration(struct i2c_client *client) +{ + struct ap3426_data *pdata = i2c_get_clientdata(client); + int i = 0; + int rv = 0; + u16 ave; + u16 sample; + u16 sample_data[CAL_SAMPLES]; + int samples = 0; + + PS_ENTRY("client:%p", client); + + if (!pdata->ps_calibrated) { + ap3426_set_ps_crosstalk_calibration(client, 0); /* Baseline */ + + for (i = 0; i < CAL_SAMPLES; i++) { + msleep(40); + + sample = sample_data[samples] = ap3426_get_px_value(client); + + PS_DBG("sample_data[samples:%d] = %d\n", + samples, sample); + + if (sample > pdata->ps_calibration_max) continue; + if (sample < pdata->ps_calibration_min) continue; + + samples++; + } + if (samples >= CAL_SAMPLES/2) { + u16 total = 0; + int mid_point = (samples/2); + int start_point = mid_point - (samples/4); + int end_point = mid_point + (samples/4); + + ap3426_sort(sample_data, samples); + + /* Use median values of sorted data */ + samples = 0; + for (i = start_point; i < end_point; i++) { + PS_DBG("total:%d += sample_data[i:%d]:%d;\n", + total, i, sample_data[i]); + + total += sample_data[i]; + samples++; + } + ave = total/samples; + pdata->ps_crosstalk_cal_value = ave; + PS_DBG("ave = %d\n", ave); + ap3426_set_ps_crosstalk_calibration( + client, pdata->ps_crosstalk_cal_value); + msleep(50); + sample = ap3426_get_px_value(client); + PS_DBG("sample = %d\n", sample); + msleep(50); + sample = ap3426_get_px_value(client); + PS_DBG("sample = %d\n", sample); + pdata->ps_calibrated = 1; + rv = 1; + } else { + ave = pdata->ps_calibration_expected; + + printk(KERN_ERR "%s samples:%d <= CAL_SAMPLES:%d/2;\n", __func__, + samples, CAL_SAMPLES); + + printk("%s: Failed to compute a good calibration;\n", __func__); + + printk("%s: Using device's expected calibration value: %d for now.\n", + __func__, ave); + + ap3426_set_ps_crosstalk_calibration(client, ave); + msleep(50); + sample = ap3426_get_px_value(client); + PS_DBG("sample = %d\n", sample); + rv = -1; + } + } + PS_RETURN("rv:%d", rv); + return rv; +} +#endif /* DI_AUTO_CAL */ + +/* + * TESTED: echo 1 > /sys/class/sensors/proximity/device/sensors/proximity/enable + */ +static int ap3426_ps_enable_set(struct sensors_classdev *sensors_cdev, + unsigned int enabled) +{ + struct ap3426_data *ps_data = container_of(sensors_cdev, + struct ap3426_data, ps_cdev); + int rv = 0; + int err; + + PS_ENTRY("sensors_cdev:%p, enabled:%d", sensors_cdev, enabled); + + ap3426_lock_mutex(ps_data); + + err = ap3426_ps_enable(ps_data, enabled); + + if (err < 0) { + rv = err; + goto out_unlock; + } + +#ifdef DI_AUTO_CAL + if (enabled == 1 && !ps_data->ps_calibrated) { + struct i2c_client *client = ps_data->client; + + /* + * Apparently we weren't able to calibrate during the probe. + * We are about to use the PS and we are curently using the + * default calibration value but it won't be used while + * calibrating. + * + * Might be better to prevent interrupts during calibration and + * avoid a less accurate value being reported during a unlikely + * race. + */ + ap3426_disable_ps_interrupts(client); + ap3426_ps_calibration(client); + ap3426_enable_ps_interrupts(client); + } +#endif + +out_unlock: + ap3426_unlock_mutex(ps_data); + + PS_RETURN("rv:%d", rv); + return rv; +} + +static int ap3426_power_ctl(struct ap3426_data *data, bool on) +{ + int ret = 0; + + ENTRY("data:%p, on:%d", data, on); + + if (!on && data->power_enabled) + { + if (!IS_ERR(data->vdd)) { + ret = regulator_disable(data->vdd); + if (ret) { + dev_err(&data->client->dev, + "Regulator vdd disable failed ret=%d\n", ret); + + goto done; + } + } + + if (!IS_ERR(data->vio)) { + ret = regulator_disable(data->vio); + if (ret) { + dev_err(&data->client->dev, + "Regulator vio disable failed ret=%d\n", ret); + if (!IS_ERR(data->vdd)) { + ret = regulator_enable(data->vdd); + if (ret) { + dev_err(&data->client->dev, + "Regulator vdd enable failed ret=%d\n", + ret); + } + } + goto done; + } + } + + data->power_enabled = on; + printk(KERN_INFO "%s: disable ap3426 power\n", __func__); + dev_dbg(&data->client->dev, "ap3426_power_ctl on=%d\n", + on); + } + else if (on && !data->power_enabled) + { + ret = regulator_enable(data->vdd); + if (ret) + { + dev_err(&data->client->dev, + "Regulator vdd enable failed ret=%d\n", ret); + + goto done; + } + + ret = regulator_enable(data->vio); + if (ret) + { + dev_err(&data->client->dev, + "Regulator vio enable failed ret=%d\n", ret); + regulator_disable(data->vdd); + + goto done; + } + + data->power_enabled = on; + printk(KERN_INFO "%s: enable ap3426 power\n", __func__); + msleep(POWER_ON_DELAY_MS); + } + else + { + dev_warn(&data->client->dev, + "Power on=%d. enabled=%d\n", + on, data->power_enabled); + } + +done: + RETURN("ret:%d", ret); + return ret; +} + +static int ap3426_power_init(struct ap3426_data *data, bool on) +{ + int ret; + + ENTRY("data:%p, on:%d)", data, on); + + if (!on) + { + if (!IS_ERR(data->vdd)) { + if (regulator_count_voltages(data->vdd) > 0) + regulator_set_voltage(data->vdd, 0, AP3426_VDD_MAX_UV); + regulator_put(data->vdd); + data->vdd = ERR_PTR(-EINVAL); + } + + if (!IS_ERR(data->vio)) { + if (regulator_count_voltages(data->vio) > 0) + regulator_set_voltage(data->vio, 0, AP3426_VIO_MAX_UV); + + regulator_put(data->vio); + data->vio = ERR_PTR(-EINVAL); + } + } + else + { + data->vdd = regulator_get(&data->client->dev, "vdd"); + if (IS_ERR(data->vdd)) + { + ret = PTR_ERR(data->vdd); + dev_err(&data->client->dev, + "Regulator get failed vdd ret=%d\n", ret); + return ret; + } + + if (regulator_count_voltages(data->vdd) > 0) + { + ret = regulator_set_voltage(data->vdd, + AP3426_VDD_MIN_UV, + AP3426_VDD_MAX_UV); + if (ret) + { + dev_err(&data->client->dev, + "Regulator set failed vdd ret=%d\n", + ret); + goto reg_vdd_put; + } + } + + data->vio = regulator_get(&data->client->dev, "vio"); + if (IS_ERR(data->vio)) + { + ret = PTR_ERR(data->vio); + dev_err(&data->client->dev, + "Regulator get failed vio ret=%d\n", ret); + goto reg_vdd_set; + } + + if (regulator_count_voltages(data->vio) > 0) + { + ret = regulator_set_voltage(data->vio, + AP3426_VIO_MIN_UV, + AP3426_VIO_MAX_UV); + if (ret) + { + dev_err(&data->client->dev, + "Regulator set failed vio ret=%d\n", ret); + goto reg_vio_put; + } + } + } + + ret = 0; /* Return(0); */ + goto done; + +reg_vio_put: + regulator_put(data->vio); +reg_vdd_set: + if (regulator_count_voltages(data->vdd) > 0) + regulator_set_voltage(data->vdd, 0, AP3426_VDD_MAX_UV); +reg_vdd_put: + regulator_put(data->vdd); + +done: + RETURN("ret:%d", ret); + return ret; +} + + +/* + * TESTED: + * cat /sys/class/sensors/proximity/device/sensors/light/device/mode + * and + * cat /sys/class/sensors/proximity/device/sensors/proximity/device/mode + */ +static ssize_t ap3426_show_mode(struct device *dev, + struct device_attribute *attr, char *buf) +{ + ssize_t rv; + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + + ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(data); + + rv = sprintf(buf, "%d\n", ap3426_get_mode(data->client)); + + ap3426_unlock_mutex(data); + + RETURN("rv:%zd", rv); + return(rv); +} + +/* + * TESTED: + * echo 1 > /sys/class/sensors/proximity/device/sensors/light/device/mode [Disables Polling] + * echo 2 > /sys/class/sensors/proximity/device/sensors/light/device/mode [Enables Polling] + * and + * echo 1 > /cat /sys/class/sensors/proximity/device/sensors/proximity/device/mode [Disables Polling] + * echo 2 > /cat /sys/class/sensors/proximity/device/sensors/proximity/device/mode [Enables Polling] + */ +static ssize_t ap3426_store_mode(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + unsigned long val = 0L; + ssize_t rv = count; + int ret; + + ENTRY("dev:%p, attr:%p, buf:%p, count:%zd", dev, attr, buf, count); + + ap3426_lock_mutex(data); + + if ((strict_strtoul(buf, 10, &val) < 0) || (val > 7)) { + ERR("rv = -EINVAL:%d; val:%ld", EINVAL, val); + rv = -EINVAL; + goto done; + } + ret = ap3426_set_mode(data->client, val); + + if (ret < 0) { + rv = ret; + goto done; + } + + DBG("Starting timer to fire in data->als_msec_poll_delay:%d; jiffies:%ld\n", data->als_msec_poll_delay, jiffies ); + ret = mod_timer(&data->pl_timer, jiffies + msecs_to_jiffies(data->als_msec_poll_delay)); + + if (ret) { + ALS_DBG("ret = %d = mod_timer(...); [Timer Error?] \n", ret); + /* Suspect we should set rv = ret here */ + } + +done: + ap3426_unlock_mutex(data); + + RETURN("rv:%zd", rv); + return rv; +} + +static DEVICE_ATTR(mode, S_IRUGO | S_IWUGO, ap3426_show_mode, ap3426_store_mode); + + +/* +* TESTED: + * cat /sys/class/sensors/proximity/device/sensors/proximity/device/lux + */ +static ssize_t ap3426_show_lux(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + ssize_t rv; + + PS_ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(data); + + /* No LUX data if power down */ + if (ap3426_get_mode(data->client) == AP3426_SYS_DEV_DOWN) { + PS_DBG("ap3426_get_mode(data->client) == AP3426_SYS_DEV_DOWN"); + rv = sprintf((char*) buf, "%s: Please power up Promimity Sensor first!", __func__); + } else { + rv = sprintf(buf, "%d\n", ap3426_get_adc_value(data->client)); + } + ap3426_unlock_mutex(data); + + PS_RETURN("rv:%zd", rv); + return(rv); +} + +static DEVICE_ATTR(lux, S_IRUGO, ap3426_show_lux, NULL); + + +/* + * TESTED: cat /sys/class/sensors/proximity/device/sensors/proximity/device/pxvalue + */ +static ssize_t ap3426_show_pxvalue(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + ssize_t rv; + + PS_ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(data); + + /* No Px data if PS is powered down */ + if (ap3426_get_mode(data->client) == AP3426_SYS_DEV_DOWN) { + rv = -EBUSY; + goto done; + } + rv = sprintf(buf, "%d\n", ap3426_get_px_value(data->client)); + +done: + ap3426_unlock_mutex(data); + + PS_RETURN("rv:%zd", rv); + return(rv); +} + +static DEVICE_ATTR(pxvalue, S_IRUGO, ap3426_show_pxvalue, NULL); + + +/* + * proximity object detect: + * TESTED: + * cat /sys/class/sensors/proximity/device/sensors/proximity/device/object + */ + +static ssize_t ap3426_show_object(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + ssize_t rv; + + PS_ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(data); + + rv = sprintf(buf, "%d\n", ap3426_get_object(data->client)); + + ap3426_unlock_mutex(data); + + PS_RETURN("rv:%zd", rv); + return(rv); +} + +static DEVICE_ATTR(object, S_IRUGO, ap3426_show_object, NULL); + + +/* + * ALS low threshold: + * + * TESTED: + * cat /sys/class/sensors/proximity/device/sensors/proximity/device/althres + * 65535 + */ +static ssize_t ap3426_show_althres(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + ssize_t rv; + + PS_ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(data); + + rv = sprintf(buf, "%d\n", ap3426_get_althres(data->client)); + + ap3426_unlock_mutex(data); + + PS_RETURN("rv:%zd", rv); + return(rv); +} + + +/* + * TESTED: + * echo 65535 > /sys/class/sensors/proximity/device/sensors/proximity/device/althres + */ +static ssize_t ap3426_store_althres(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + unsigned long val; + ssize_t rv = count; /* Default Return Value */ + int ret; + + PS_ENTRY("dev:%p, attr:%p, buf:%p, count:%zd", \ + dev, attr, buf, count); + + ap3426_lock_mutex(data); + + if (strict_strtoul(buf, 10, &val) < 0) { + char *buffer = (char *) buf; + + buffer[count] = '\0'; + PS_ERR("buf:%s Isn't a Number!; rv = -EINVAL:%d;\n", \ + buf, EINVAL); + + rv = -EINVAL; + goto done; + } + ret = ap3426_set_althres(data->client, val); + + if (ret < 0) { + rv = ret; + } +done: + ap3426_unlock_mutex(data); + PS_RETURN("rv:%zd", rv); + return rv; +} + +static DEVICE_ATTR(althres, S_IWUSR | S_IRUGO, + ap3426_show_althres, ap3426_store_althres); + + +/* + * Show ALS high threshold: + * + * TESTED: + * cat /sys/class/sensors/proximity/device/sensors/light/device/ahthres + */ +static ssize_t ap3426_show_ahthres(struct device *dev, + struct device_attribute *attr, char *buf) +{ + ssize_t rv; + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + + PS_ENTRY("dev:%p, attr:%p, buf:%p", \ + dev, attr, buf); + + ap3426_lock_mutex(data); + + rv = sprintf(buf, "%d\n", ap3426_get_ahthres(data->client)); + + ap3426_unlock_mutex(data); + + PS_RETURN("rv:%zd", rv); + return(rv); +} + +/* + * Store ALS high threshold: + * + * TESTED: + * echo 65535 > /sys/class/sensors/proximity/device/sensors/light/device/ahthres + */ +static ssize_t ap3426_store_ahthres(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + unsigned long val; + ssize_t rv = count; /* Default return value */ + int ret; + + PS_ENTRY("dev:%p, attr:%p, buf:%p, count:%zd", \ + dev, attr, buf, count); + + ap3426_lock_mutex(data); + + if (strict_strtoul(buf, 10, &val) < 0) { + rv = -EINVAL; + goto done; + } + ret = ap3426_set_ahthres(data->client, val); + + if (ret < 0) { + rv = ret; + goto done; + } +done: + ap3426_unlock_mutex(data); + + PS_RETURN("rv:%zd", rv); + return rv;; +} + +static DEVICE_ATTR(ahthres, S_IWUSR | S_IRUGO, + ap3426_show_ahthres, ap3426_store_ahthres); + +/* + * Show PS low threshold: + * + * TESTED: + * cat /sys/class/sensors/proximity/device/sensors/proximity/device/plthres + */ +static ssize_t ap3426_show_plthres(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + ssize_t rv; + + PS_ENTRY("dev:%p, attr:%p, buf:%p", \ + dev, attr, buf); + + ap3426_lock_mutex(data); + + rv = sprintf(buf, "%d\n", ap3426_get_plthres(data->client)); + + ap3426_unlock_mutex(data); + + PS_RETURN("rv:%zd", rv); + return rv; +} + +/* + * Store PS low threshold: + * + * TESTED: + * echo 100 > /sys/class/sensors/proximity/device/sensors/proximity/device/plthres + */ +static ssize_t ap3426_store_plthres(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + unsigned long val; + ssize_t rv = count; + int ret; + + PS_ENTRY("dev:%p, attr:%p, buf:%p, count:%zd", \ + dev, attr, buf, count); + + ap3426_lock_mutex(data); + + if (strict_strtoul(buf, 10, &val) < 0) { + rv = -EINVAL; + goto done; + } + + ret = ap3426_set_plthres(data->client, val); + if (ret < 0) + rv = ret; +done: + ap3426_unlock_mutex(data); + + PS_RETURN("rv:%zd", rv); + return rv; +} + +static DEVICE_ATTR(plthres, S_IWUSR | S_IRUGO, + ap3426_show_plthres, ap3426_store_plthres); + +/* + * Show PS high threshold: + * + * TESTED: + * cat /sys/class/sensors/proximity/device/sensors/proximity/device/plthres + */ +static ssize_t ap3426_show_phthres(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + ssize_t rv; + + PS_ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(data); + + rv = sprintf(buf, "%d\n", ap3426_get_phthres(data->client)); + + ap3426_unlock_mutex(data); + + PS_RETURN("rv:%zd", rv); + return rv; +} + +/* + * Store PS high threshold: + * + * TESTED: + * echo 100 > /sys/class/sensors/proximity/device/sensors/proximity/device/plthres + */ +static ssize_t ap3426_store_phthres(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + unsigned long val; + ssize_t rv = count; /* Default */ + int ret; + + PS_ENTRY("dev:%p, attr:%p, buf:%p, count:%zd", \ + dev, attr, buf, count); + + ap3426_lock_mutex(data); + + if (strict_strtoul(buf, 10, &val) < 0) { + rv = -EINVAL; + goto done; + } + + ret = ap3426_set_phthres(data->client, val); + + if (ret < 0) + rv = ret; +done: + ap3426_unlock_mutex(data); + + PS_RETURN("rv:%zd", rv); + return rv; +} + +static DEVICE_ATTR(phthres, S_IWUSR | S_IRUGO, + ap3426_show_phthres, ap3426_store_phthres); + +/* + * Show ALS Calibration: + * + * TESTED: + * cat /sys/class/sensors/proximity/device/sensors/light/device/calibration + * 320 + */ +static ssize_t ap3426_show_calibration_state(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + ssize_t rv; + + ALS_ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(data); + + rv = sprintf(buf, "%d\n", als_calibration); + + ap3426_unlock_mutex(data); + + ALS_RETURN("rv:%zd", rv); + return(rv); +} + +/* + * Store ALS Calibration: [Need to Power Up] + * + * TESTED: + * echo 320 > /sys/class/sensors/proximity/device/sensors/light/device/calibration + */ +static ssize_t ap3426_store_calibration_state(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct input_dev *input = to_input_dev(dev); + struct ap3426_data *data = input_get_drvdata(input); + int stdls, lux; + char tmp[10]; + ssize_t rv = 0; + + ALS_ENTRY("dev:%p, attr:%p, buf:%p, count:%zd", dev, attr, buf, count); + + ap3426_lock_mutex(data); + + /* No LUX data if not operational */ + if (ap3426_get_mode(data->client) == AP3426_SYS_DEV_DOWN) { + printk("%s: Please power up first!\n", __func__); + rv = -EINVAL; + goto done; + } + + als_calibration = 100; + sscanf(buf, "%d %s", &stdls, tmp); + + if (!strncmp(tmp, "-setcv", 6)) { + als_calibration = stdls; + rv = -EBUSY; + goto done; + } + + if (stdls < 0) { + printk("Std light source: [%d] < 0 !!!\nCheck again, please.\n\ + Set calibration factor to 100.\n", stdls); + + rv = -EBUSY; + goto done; + } + + lux = ap3426_get_adc_value(data->client); + als_calibration = stdls * 100 / lux; + + rv = -EBUSY; /* WHY? */ + +done: + ap3426_unlock_mutex(data); + + ALS_RETURN("rv:%zd", rv); + return(rv); +} + +static DEVICE_ATTR(calibration, S_IWUSR | S_IRUGO, + ap3426_show_calibration_state, ap3426_store_calibration_state); + + +#ifdef ALS_DEBUG +/* engineer mode: 'em' + * + * Prints Register Cache. + * + * cat /sys/class/sensors/proximity/device/sensors/light/device/em + */ +static ssize_t ap3426_em_read(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct i2c_client *client = to_i2c_client(dev); + struct ap3426_data *data = i2c_get_clientdata(client); + int i; + u8 tmp; + + ALS_ENTRY("dev:%p, attr:%p, buf:%p", dev, attr, buf); + + ap3426_lock_mutex(data); + + for (i = 0; i < AP3426_NUM_CACHABLE_REGS; i++) { + tmp = i2c_smbus_read_byte_data(data->client, reg_array[i]); + + printk(" Reg[0x%x] Val[0x%x]\n", reg_array[i], tmp); + } + ap3426_unlock_mutex(data); + + ALS_RETURN("%d", 0); + return 0; +} + +/* + * Engineering Mode (EM) test to write to register. + * + * TESTED: echo 1 2 > /sys/class/sensors/proximity/device/sensors/light/device/em + * + * Output: Write [2] to Reg[1].. + */ +static ssize_t ap3426_em_write(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct i2c_client *client = to_i2c_client(dev); + struct ap3426_data *data = i2c_get_clientdata(client); + u32 addr,val; + int err; + + ALS_ENTRY("dev:%p, attr:%p, buf:%p, count:%zd", dev, attr, buf, count); + + ap3426_lock_mutex(data); + + sscanf(buf, "%x%x", &addr, &val); + + printk(" Write [%x] to Reg[%x]...\n", val, addr); + + err = i2c_smbus_write_byte_data(data->client, addr, val); + if (err < 0) { + ALS_DBG("i2c_smbus_write_byte_data() Failed! return err:%d\n", err); + count = err; + } else { + data->reg_cache[ap3426_reg_to_idx_array[addr]] = val; + } + ap3426_unlock_mutex(data); + + ALS_RETURN("count:%zd", count); + + return count; +} +static DEVICE_ATTR(em, S_IWUSR |S_IRUGO, + ap3426_em_read, ap3426_em_write); +#endif + +static struct attribute *ap3426_attributes[] = { + &dev_attr_range.attr, + &dev_attr_mode.attr, + &dev_attr_lux.attr, + &dev_attr_object.attr, + &dev_attr_pxvalue.attr, + &dev_attr_althres.attr, + &dev_attr_ahthres.attr, + &dev_attr_plthres.attr, + &dev_attr_phthres.attr, + &dev_attr_calibration.attr, +#ifdef ALS_DEBUG + &dev_attr_em.attr, +#endif + NULL +}; + +static const struct attribute_group ap3426_attr_group = { + .attrs = ap3426_attributes, +}; + +static int ap3426_init_client(struct i2c_client *client) +{ + struct ap3426_data *data = i2c_get_clientdata(client); + int rv = 0; + int i; + u16 cal; + u8 buf[16]; + + ENTRY("client:%p", client); + + ap3426_verify_client_mutex_locked(client); + + /** + * Write the ALS low/high thresholds to: + * AP3426_REG_ALS_THDL_L, AP3426_REG_ALS_THDL_H, AP3426_REG_ALS_THDH_L + * AP3426_REG_ALS_THDH_H + */ + buf[0] = 0; + buf[1] = 0; + buf[2] = 0xFF; + buf[3] = 0XFF; + + rv = i2c_smbus_write_i2c_block_data(client, AP3426_REG_ALS_THDL_L, 4, buf); + if (rv) { + dev_err(&client->dev, "error writing ALS config: %d\n", rv); + goto done; + } + + /** + * Write the proximity sensor crosstalk, low and high threshold calibration + * values + * + * AP3426_REG_PS_CAL_L, AP3426_REG_PS_CAL_H, AP3426_REG_PS_THDL_L + * AP3426_REG_PS_THDL_H, AP3426_REG_PS_THDH_L, AP3426_REG_PS_THDH_H + */ + cal = data->ps_calibrated ? data->ps_crosstalk_cal_value : 0; + buf[0] = cal & 0xff; + buf[1] = cal >> 8; + buf[2] = data->ps_thd_l & 0xff; + buf[3] = data->ps_thd_l >> 8; + buf[4] = data->ps_thd_h & 0xff; + buf[5] = data->ps_thd_h >> 8; + + rv = i2c_smbus_write_i2c_block_data(client, AP3426_REG_PS_CAL_L, 6, buf); + if (rv) { + dev_err(&client->dev, "error writing ALS config: %d\n", rv); + goto done; + } + + /* read all the registers once to fill the cache. + * if one of the reads fails, we consider the init failed */ + for (i = 0; i < AP3426_NUM_CACHABLE_REGS; i++) { + rv = i2c_smbus_read_byte_data(client, reg_array[i]); + if (rv < 0) { + dev_err(&client->dev, "error reading register %d: %d\n", + reg_array[i], rv); + goto done; + } + data->reg_cache[i] = rv; + } + /* set defaults */ + rv = ap3426_set_range(client, AP3426_ALS_RANGE_0); + if (rv < 0) { + dev_err(&client->dev, "error setting als range: %d\n", rv); + goto done; + } + rv = ap3426_set_mode(client, AP3426_SYS_DEV_DOWN); + if (rv < 0) { + dev_err(&client->dev, "error setting mode: %d\n", rv); + goto done; + } + rv = ap3426_disable_ps_and_als_interrupts(client); + if (rv < 0) { + dev_err(&client->dev, "error configuring interrupts: %d\n", rv); + goto done; + } + + // PS mean time default = 0x00 (1 converseion time = 5ms) + // 5 + N x 0.0627 (ADC photodiode sample period, where N is the integrated time) + if (data->ps_integrated_time > 0) { + rv = i2c_smbus_write_byte_data( + client, AP3426_REG_PS_INTEGR, data->ps_integrated_time); + } +done: + RETURN("rv:%d", rv); + return rv;; +} + +/* + * Seems to be a probe stub function that wasn't implemented. + */ +static int ap3426_check_id(struct ap3426_data *data) +{ + return 0; +} + +void pl_timer_callback(unsigned long pl_data) +{ + struct ap3426_data *data; + int ps_wants_timer = 0; + int ret = 0; + + ALS_ENTRY("pl_data:0X%lx", pl_data); + + data = private_pl_data; + +#ifdef PS_POLLING_DEBUG + if (misc_ps_opened) + ps_wants_timer = 1; +#endif + if (ps_wants_timer || misc_als_opened) { + DBG("Re-Launching Timer. data->als_msec_pool_delay:%d\n", data->als_msec_poll_delay); + queue_work(data->lsensor_wq, &data->lsensor_work); + ret = mod_timer(&private_pl_data->pl_timer, jiffies + msecs_to_jiffies(data->als_msec_poll_delay)); + if (ret) { + DBG("ret = %d = mod_timer(...); ret, [Timer Error?]\n", ret); + } + } + ALS_RETURN_VOID(); + return; +} + +static void psensor_work_handler(struct work_struct *w) +{ + + struct ap3426_data *data = + container_of(w, struct ap3426_data, psensor_work); + int distance,pxvalue; + + ALS_ENTRY("w:%p", w); + + ap3426_lock_mutex(data); + + distance = ap3426_get_object(data->client); + pxvalue = ap3426_get_px_value(data->client); //test + + ap3426_report_abs_ts(data->psensor_input_dev, ABS_DISTANCE, distance); + + ALS_DBG("Reported ABS_DISTANCE:%d to input device, value:%d\n", distance, pxvalue); + + ap3426_unlock_mutex(data); + + ALS_RETURN_VOID(); +} + +/* + * Passes Lux values to input driver. + * The input driver filters out non-changing values + * and provides the events via /dev/input/event[N]. + * They can be viewed via getevent: + * getevent /dev/input/event1 [Lettuce] + * getevent /dev/input/event3 [Randang] + * + * These events are read by Frameworks: + * frameworks/base/services/core/java/com/android/server/display/ + * AutomaticBrightnessController.java + * and + * DisplayPowerControlle.java + */ +static void lsensor_work_handler(struct work_struct *w) +{ + + struct ap3426_data *data = + container_of(w, struct ap3426_data, lsensor_work); + int value; + + ALS_ENTRY("w:%p", w); + + ap3426_lock_mutex(data); + + value = ap3426_get_adc_value(data->client); + value = value * als_calibration / 100; + + if (data->als_polling_just_enabled) { + /* + * Report a different value here so that it can get to userspace, because + * the input driver sends EV_ABS events only when if value changed + * from the last report. Done here to give user space time to prepare. + */ + ap3426_report_abs_ts(data->lsensor_input_dev, ABS_MISC, value + 1); + ALS_DBG("data->als_polling_just_enabled:%d = 0; Reported an EXTRA ABS_MISC value:%d to input device.\n", + data->als_polling_just_enabled, value); + + data->als_polling_just_enabled = 0; + } + ap3426_report_abs_ts(data->lsensor_input_dev, ABS_MISC, value); + + ALS_DBG("Reported ABS_MISC value:%d to input device.\n", value); + + ap3426_unlock_mutex(data); + + ALS_RETURN_VOID(); + return; +} + +/* + * The Interrupt Clear Manner (CLR_MNR) has been set to 0 (Automatic) so + * this ISR must read the ALS and PS sensor values to clear the interripts + * even if PS or ALS aren't currently open. + */ +static irqreturn_t ap3426_threaded_isr(int irq, void *client_data) +{ + + struct ap3426_data *data = (struct ap3426_data *) client_data; + int isr_threads_posted_value; + u8 int_stat; + int ps_value; + int distance; + int als_value; + + PS_ENTRY("irg:%d, client_data:%p", irq, client_data); + + ap3426_lock_mutex(data); + + int_stat = ap3426_get_intstat(data->client); + + ps_value = ap3426_get_px_value(data->client); /* Clear PS Interrupt */ + als_value = ap3426_get_adc_value(data->client); /* Clear ALS Interrupt */ + + if (int_stat & AP3426_REG_SYS_INT_PMASK) { + /* We have a PS Interrupt */ + if (misc_ps_opened) { + distance = ap3426_get_object(data->client); + ap3426_report_abs_ts(data->psensor_input_dev, ABS_DISTANCE, distance); + wake_lock_timeout(&data->ps_wakelock, 2*HZ); + } + } + +#ifdef CONFIG_AP3426_HEARTBEAT_SENSOR + if (misc_ht_opened) { + ap3426_report_abs_ts(data->hsensor_input_dev, ABS_WHEEL, ps_value); + } +#endif + + if (int_stat & AP3426_REG_SYS_INT_AMASK) { + /* We have an ALS Interrupt */ + if (misc_als_opened) { + ap3426_report_abs_ts(data->lsensor_input_dev, ABS_MISC, als_value); + } + } + PS_DBG("ps_value:%d, als_value:%d, distance:%d;\n", \ + ps_value, als_value, distance); + + atomic_dec_if_positive(&isr_threads_posted); + + isr_threads_posted_value = atomic_read(&isr_threads_posted); + if (isr_threads_posted_value > 2) { + printk(KERN_ERR "%s: isr_threads_posted_value:%d;\n", __func__, + isr_threads_posted_value); + } else { + DBG("isr_threads_posted_value:%d;\n", isr_threads_posted_value); + } + + ap3426_unlock_mutex(data); + + PS_RETURN("IRQ_HANDLED:%d", IRQ_HANDLED); + return IRQ_HANDLED; +} + + +static irqreturn_t ap3426_irq(int irq, void *data) +{ + atomic_inc(&isr_threads_posted); + + return IRQ_WAKE_THREAD;; +} + +#ifdef CONFIG_OF /* Open Firmware */ +static int ap3426_parse_dt(struct device *dev, struct ap3426_data *pdata) +{ + struct device_node *dt = dev->of_node; + int rv = 0; + u32 temp_val; + int rc; + + ENTRY("dev:%p, pdata:%p", dev, pdata); + + if (pdata == NULL) { + PS_DBG("pdata is NULL; rv = -EINVAL\n"); + rv = -EINVAL; + goto done; + } + + pdata->int_pin = of_get_named_gpio_flags(dt, "ap3426,irq-gpio", + 0, &pdata->irq_flags); + if (pdata->int_pin < 0) { + dev_err(dev, "Unable to read 'ap3426,irq-gpio' from Device Tree.\n"); + rv = pdata->int_pin; + goto done; + } + + rc = of_property_read_u32(dt, "ap3426,ps-thdl", &temp_val); + if (!rc) { + pdata->ps_thd_l = (u16)temp_val; + PS_DBG("ps-thdl = %d\n", pdata->ps_thd_l); + } else { + pdata->ps_thd_l = PX_LOW_THRESHOLD; + dev_err(dev, "Unable to read 'ap3426,ps-thdl', using default %d\n", + pdata->ps_thd_l); + } + + rc = of_property_read_u32(dt, "ap3426,ps-thdh", &temp_val); + if (!rc) { + pdata->ps_thd_h= (u16)temp_val; + PS_DBG("ps-thdh = %d\n", pdata->ps_thd_h); + } else { + pdata->ps_thd_h = PX_HIGH_THRESHOLD; + dev_err(dev, "Unable to read 'ap3426,ps-thdh', using default %d\n", + pdata->ps_thd_h); + } + rc = of_property_read_u32(dt, "ap3426,ps-integrated-time", &temp_val); + if (!rc) { + pdata->ps_integrated_time = (u16) temp_val; + PS_DBG("ps-integrated-time = %d\n", pdata->ps_integrated_time); + } else { + pdata->ps_integrated_time = 0; + dev_err(dev, "Unable to read 'ap3426,ps-integrated-time', using default %d\n", + pdata->ps_integrated_time); + } + +#ifdef DI_AUTO_CAL + rc = of_property_read_u32(dt, "ap3426,ps-calibration-min", &temp_val); + if (!rc) { + pdata->ps_calibration_min = (u16)temp_val; + PS_DBG("ps-calibration-min = %d\n", pdata->ps_calibration_min); + } else { + pdata->ps_calibration_min = DI_PS_CAL_THR_MIN; + dev_err(dev, "Unable to read 'ap3426,ps-calibration-min', using default %d\n", + pdata->ps_calibration_min); + } + + rc = of_property_read_u32(dt, "ap3426,ps-calibration-expected", &temp_val); + if (!rc) { + pdata->ps_calibration_expected = (u16)temp_val; + PS_DBG("ps-calibration_expected = %d\n", pdata->ps_calibration_expected); + } else { + pdata->ps_calibration_expected = DI_PS_CAL_THR_EXPECTED; + dev_err(dev, "Unable to read 'ap3426,ps-calibration-expected', using default %d\n", + pdata->ps_calibration_expected); + } + + rc = of_property_read_u32(dt, "ap3426,ps-calibration-max", &temp_val); + if (!rc) { + pdata->ps_calibration_max = (u16)temp_val; + PS_DBG("ps-calibration-max = %d\n", pdata->ps_calibration_max); + } else { + pdata->ps_calibration_max = DI_PS_CAL_THR_MAX; + dev_err(dev, "Unable to read 'ap3426,ps-calibration-max', using default %d\n", + pdata->ps_calibration_max); + } +#endif + +done: + RETURN("rv:%d", rv); + return rv; +} +#endif + +static int ap3426_probe(struct i2c_client *client, + const struct i2c_device_id *id) +{ + struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct ap3426_data *data = NULL; + int mutex_locked = 0; + int err = 0; + + ENTRY("client:%p, id:%p)", client, id); + + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { + err = -EIO; + goto exit_free_gpio; + } + + data = kzalloc(sizeof(struct ap3426_data), GFP_KERNEL); + if (!data) { + err = -ENOMEM; + goto exit_free_gpio; + } + +#ifdef CONFIG_OF + if (client->dev.of_node) { + ALS_DBG("Device Tree parsing.\n"); + + err = ap3426_parse_dt(&client->dev, data); + if (err) { + dev_err(&client->dev, "%s: ap3426_parse_dt " + "for pdata failed. err = %d", + __func__, err); + + goto exit_parse_dt_fail; + } + } +#else + data->irq = client->irq; + // No dtsi values for ps thresholds, use defaults + data->ps_thd_l = PX_LOW_THRESHOLD; + data->ps_thd_h = PX_HIGH_THRESHOLD; + data->ps_integrated_time = 0; +#endif + + data->client = client; + DBG("data:%p->client = client:%p;\n", data, client); + + mutex_init(&data->lock); + ap3426_lock_mutex(data); + mutex_locked = 1; + + + printk("..%s: data->als_msec_poll_delay = DEFAULT_ALS_POLL_DELAY_MS:%d;\n", __func__, + DEFAULT_ALS_POLL_DELAY_MS); + + data->als_msec_poll_delay = DEFAULT_ALS_POLL_DELAY_MS; + + data->als_polling_just_enabled = 0; + + i2c_set_clientdata(client, data); + + err = ap3426_power_init(data, true); + if (err) + goto err_power_on; + + err = ap3426_power_ctl(data, true); + if (err) + goto err_power_ctl; + + /* initialize the AP3426 chip - Makes sure interrupts are disabled. */ + err = ap3426_init_client(data->client); + if (err) + goto err_init_client; + + if (ap3426_check_id(data) !=0 ) { + dev_err(&client->dev, "failed to check ap3426 id\n"); + goto err_init_client; + } + + err = ap3426_register_lsensor_device(client,data); + if (err) { + dev_err(&client->dev, "failed to register_lsensor_device\n"); + goto err_init_client; + } + + err = ap3426_register_psensor_device(client, data); + if (err) { + dev_err(&client->dev, "failed to register_psensor_device\n"); + goto exit_free_ls_device; + } + +#ifdef CONFIG_AP3426_HEARTBEAT_SENSOR + err = ap3426_register_heartbeat_sensor_device(client, data); + if (err) { + dev_err(&client->dev, "failed to register_heartbeatsensor_device\n"); + goto exit_free_ps_device; + } +#endif + err = gpio_request(data->int_pin,"ap3426-int"); + if (err < 0) { + printk(KERN_ERR "%s: gpio_request, err=%d\n", __func__, err); +#ifdef CONFIG_AP3426_HEARTBEAT_SENSOR + goto exit_free_heartbeat_device; +#else + goto exit_free_ps_device; +#endif + } + + err = gpio_direction_input(data->int_pin); + if (err < 0) { + printk(KERN_ERR "%s: gpio_direction_input, err=%d\n", __func__, err); + goto exit_free_gpio_int; + } + + err = request_threaded_irq(gpio_to_irq(data->int_pin), ap3426_irq, ap3426_threaded_isr, + IRQF_TRIGGER_LOW | IRQF_ONESHOT,"ap3426", data); + + if (err) { + dev_err(&client->dev, "err:%d, could not get IRQ %d\n", err, gpio_to_irq(data->int_pin)); + goto exit_free_gpio_int; + } + + data->psensor_wq = create_singlethread_workqueue("psensor_wq"); + + if (!data->psensor_wq) { + ALS_ERR("create psensor_wq workqueue failed\n"); + err = -ENOMEM; + goto exit_request_irq; + } + INIT_WORK(&data->psensor_work, psensor_work_handler); + + data->lsensor_wq = create_singlethread_workqueue("lsensor_wq"); + if (!data->lsensor_wq) { + ALS_DBG("create lsensor_wq workqueue failed\n"); + err = -ENOMEM; + goto err_create_psensor_wq; + } + INIT_WORK(&data->lsensor_work, lsensor_work_handler); + + /* + * Seems a bit cleaner if we were to provid 'data' as 3rd arg to setup_timer() + * and avoiding us of global pointer in pl_timer_callback(). + */ + setup_timer(&data->pl_timer, pl_timer_callback, 0); + + err = sysfs_create_group(&data->client->dev.kobj, &ap3426_attr_group); + if (err) + goto err_sysfs_create_group; + + + DBG("wake_lock_init(&data->ps_wakelock, WAKE_LOCK_SUSPEND, 'ps_wakelock');\n"); + + wake_lock_init(&data->ps_wakelock, WAKE_LOCK_SUSPEND, "ps_wakelock"); + + /* + * Register methods that can be invoked via: + * /sys/class/sensors/proximity/device/sensors/light/ + * enable + * poll_delay + */ + data->als_cdev = sensors_light_cdev; + data->als_cdev.sensors_enable = ap3426_als_enable_set; + data->als_cdev.sensors_poll_delay = ap3426_als_poll_delay_set; + err = sensors_classdev_register(&client->dev, &data->als_cdev); + if (err) + goto err_sensors_classdev_register; + + /* + * Register methods that can be invoked via: + * /sys/class/sensors/proximity/device/sensors/proximity/ + * enable + * NOTE: + * Since we are using interrupts the poll_delay isn't + * normally supported. + */ + data->ps_cdev = sensors_proximity_cdev; + data->ps_cdev.sensors_enable = ap3426_ps_enable_set; + err = sensors_classdev_register(&client->dev, &data->ps_cdev); + if (err) + goto err_sensors_classdev_register_ps; + + private_pl_data = data; + + // init the ps event value because it may cause screen off at first call + ap3426_report_abs_ts(data->psensor_input_dev, ABS_DISTANCE, 1); + + dev_info(&client->dev, "Driver version %s enabled\n", DRIVER_VERSION); + +#ifdef DI_AUTO_CAL + /* + * Try to calibrate now; + * if PS is covered try again later when PS is used. + */ + ap3426_power_on_ps(data->client); + msleep(100); + ap3426_ps_calibration(data->client); + ap3426_power_off_ps(data->client); +#endif + err = 0; /* Return(0) */ + goto done; + +err_sensors_classdev_register_ps: + sensors_classdev_unregister(&data->als_cdev); + +err_sensors_classdev_register: + DBG("wake_lock_destroy(&data->ps_wakelock);\n"); + wake_lock_destroy(&data->ps_wakelock); + sysfs_remove_group(&data->client->dev.kobj, &ap3426_attr_group); + +err_sysfs_create_group: + if (data->lsensor_wq) + destroy_workqueue(data->lsensor_wq); + +err_create_psensor_wq: + if (data->psensor_wq) + destroy_workqueue(data->psensor_wq); + +exit_request_irq: + free_irq(gpio_to_irq(data->int_pin), data); + +exit_free_gpio_int: + gpio_free(data->int_pin); + +#ifdef CONFIG_AP3426_HEARTBEAT_SENSOR +exit_free_heartbeat_device: + ap3426_unregister_heartbeat_device(client, data); +#endif + +exit_free_ps_device: + ap3426_unregister_psensor_device(client,data); + +exit_free_ls_device: + ap3426_unregister_lsensor_device(client,data); + +err_init_client: + ap3426_power_ctl(data, false); + +err_power_ctl: + ap3426_power_init(data, false); + +err_power_on: +#ifdef CONFIG_OF +exit_parse_dt_fail: + ALS_DBG("dts initialize failed."); +#endif + if (data) { + if (mutex_locked) { + ap3426_unlock_mutex(data); + mutex_locked = 0; + } + kfree(data); + data = NULL; + } +exit_free_gpio: + +done: + if (data) { + if (mutex_locked) { + ap3426_unlock_mutex(data); + } + } + RETURN("err:%d", err); + return err; +} + +static int ap3426_remove(struct i2c_client *client) +{ + struct ap3426_data *data = i2c_get_clientdata(client); + + ENTRY("client:%p", client); + + ap3426_lock_mutex(data); + + free_irq(gpio_to_irq(data->int_pin), data); + + ap3426_power_ctl(data, false); + + sysfs_remove_group(&data->client->dev.kobj, &ap3426_attr_group); +//kevindang20140924... + sysfs_remove_group(&data->psensor_input_dev->dev.kobj, &ap3426_ps_attribute_group);// every devices register his own devices + sysfs_remove_group(&data->lsensor_input_dev->dev.kobj, &ap3426_ls_attribute_group);// every devices register his own devices +//...end + + ap3426_unregister_psensor_device(client,data); + ap3426_unregister_lsensor_device(client,data); +#ifdef CONFIG_AP3426_HEARTBEAT_SENSOR + ap3426_unregister_heartbeat_device(client,data); +#endif + ap3426_power_init(data, false); + + ap3426_set_mode(client, 0); + kfree(i2c_get_clientdata(client)); + + if (data->psensor_wq) + destroy_workqueue(data->psensor_wq); + + if (data->lsensor_wq) + destroy_workqueue(data->lsensor_wq); + + if(&data->pl_timer) + del_timer(&data->pl_timer); + + DBG("wake_lock_destroy(&data->ps_wakelock);\n"); + wake_lock_destroy(&data->ps_wakelock); + + ap3426_unlock_mutex(data); + +#if 0 + /* + * data likely should be made free here. + * data is likely detach by the + * kfree(i2c_get_clientdata(client)); + * + * FIXME: Enable when testable. + */ + kfree(data); +#endif + + RETURN("%d", 0); + return 0; +} + +static const struct i2c_device_id ap3426_id[] = +{ + { AP3426_DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(i2c, ap3426_id); + +#ifdef CONFIG_OF +static struct of_device_id ap3426_match_table[] = +{ + {.compatible = "di_ap3426" }, + {}, +}; +#else +#define ap3426_match_table NULL +#endif + + +static int ap3426_suspend(struct device *dev) +{ + struct ap3426_data *ps_data = dev_get_drvdata(dev); + + ENTRY("dev:%p)", dev); + + ap3426_lock_mutex(ps_data); + + if (misc_als_opened == 1) { + ap3426_als_enable(ps_data, 0); + ps_data->als_re_enable = 1; + } + if (misc_ps_opened == 1) { + ap3426_ps_enable(ps_data, 0); + ps_data->ps_re_enable = 1; + } + + // Power off while suspended + //ap3426_power_init(ps_data,false); // may cause system can't wake up + + ap3426_power_ctl(ps_data,false); + ps_data->suspended = 1; + ap3426_unlock_mutex(ps_data); + + RETURN("%d", 0); + return 0; +} + +static int ap3426_resume(struct device *dev) +{ + struct ap3426_data *ps_data = dev_get_drvdata(dev); + int rc; + bool retry = true; + + ENTRY("dev:%p)", dev); + + ap3426_lock_mutex(ps_data); + + ps_data->suspended = 0; + + // power_int() currently disabled it because + // it may prevent system from wakeing up. + // + // ap3426_power_init(ps_data,true); + ap3426_power_ctl(ps_data, true); +again: + // Always re-initialize our register cache and stuff. + // Retry once if init fails + rc = ap3426_init_client(ps_data->client); + if (rc) { + if (retry) { + dev_warn(dev, "i2c error resuming device, retrying: %d\n", + rc); + retry = false; + msleep(POWER_ON_DELAY_MS); + goto again; + } + dev_err(dev, "failed resuming device. error: %d\n", rc); + return -EAGAIN; + } + + if (ps_data->ps_re_enable ) { + ap3426_ps_enable(ps_data, 1); + ps_data->ps_re_enable = 0; + } + if (ps_data->als_re_enable ) { + ap3426_als_enable(ps_data, 1); + ps_data->als_re_enable = 0; + } + + ap3426_unlock_mutex(ps_data); + + + RETURN("%d", 0); + return 0; +} + +static SIMPLE_DEV_PM_OPS(ap3426_pm_ops, ap3426_suspend, ap3426_resume); + +static struct i2c_driver ap3426_driver = { + .driver = { + .name = AP3426_DRV_NAME, + .owner = THIS_MODULE, + .of_match_table = ap3426_match_table, + .pm = &ap3426_pm_ops, + }, + .probe = ap3426_probe, + .remove = ap3426_remove, + .id_table = ap3426_id, +}; + +static int __init ap3426_init(void) +{ + int ret; + + ret = i2c_add_driver(&ap3426_driver); + return ret; + +} + +static void __exit ap3426_exit(void) +{ + i2c_del_driver(&ap3426_driver); +} + +module_init(ap3426_init); +module_exit(ap3426_exit); +MODULE_AUTHOR("Kevin.dang, "); +MODULE_DESCRIPTION("AP3426 driver."); +MODULE_LICENSE("GPL"); +MODULE_VERSION(DRIVER_VERSION); diff --git a/drivers/input/misc/ap3426_cm.h b/drivers/input/misc/ap3426_cm.h new file mode 100644 index 00000000000..7738ce3f6fd --- /dev/null +++ b/drivers/input/misc/ap3426_cm.h @@ -0,0 +1,250 @@ +/* + * This file is part of the Dyna-Image AP3426 sensor driver for MTK platform. + * AP3426 is combined proximity, ambient light sensor and IRLED. + * + * Contact: John Huang + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + * + * Filename: ap3426.h + * + * Summary: + * AP3426 sensor dirver header file. + * + * Modification History: + * Date By Summary + * -------- -------- ------------------------------------------------------- + * 06/03/14 John Original Creation (Test version:1.0) + * + */ + +/* + * Definitions for ap3426 als/ps sensor chip. + */ +#ifndef __AP3426_H__ +#define __AP3426_H__ + +#include + + +#define AP3426_SUCCESS 0 +#define AP3426_ERR_I2C -1 +#define AP3426_ERR_STATUS -3 +#define AP3426_ERR_SETUP_FAILURE -4 +#define AP3426_ERR_GETGSENSORDATA -5 +#define AP3426_ERR_IDENTIFICATION -6 + +#define AP3426_NUM_CACHABLE_REGS 28 + +/* ap3426 control registers */ +/*============================================================================*/ +#define AP3426_REG_SYS_CONF 0x00 +#define AP3426_REG_SYS_CONF_SHIFT (0) +#define AP3426_REG_SYS_CONF_MASK 0x07 + +#define AP3426_REG_SYS_INTSTATUS 0x01 +#define AP3426_REG_SYS_INT_SHIFT (0) +#define AP3426_REG_SYS_INT_MASK 0x03 +#define AP3426_REG_SYS_INT_PMASK 0x02 +#define AP3426_REG_SYS_INT_AMASK 0x01 + +#define AP3426_OBJ_COMMAND 0x01 +#define AP3426_OBJ_MASK 0x10 +#define AP3426_OBJ_SHIFT (4) + +#define AP3426_REG_SYS_INTCTRL 0x02 +#define AP3426_REG_SYS_WAITTIME 0x06 + +/* ap3426 data registers */ +#define AP3426_REG_IR_DATA_LOW 0x0A +#define AP3426_REG_IR_DATA_LOW_SHIFT (0) +#define AP3426_REG_IR_DATA_LOW_MASK 0xFF + +#define AP3426_REG_IR_DATA_HIGH 0x0B +#define AP3426_REG_IR_DATA_HIGH_SHIFT (0) +#define AP3426_REG_IR_DATA_HIGH_MASK 0x03 + +#define AP3426_REG_ALS_DATA_LOW 0x0C +#define AP3426_REG_ALS_DATA_HIGH 0x0D + +#define AP3426_REG_PS_DATA_LOW 0x0E +#define AP3426_REG_PS_DATA_LOW_SHIFT (0) +#define AL3426_REG_PS_DATA_LOW_MASK 0xFF +#define AP3426_REG_PS_DATA_HIGH 0x0F +#define AP3426_REG_PS_DATA_HIGH_SHIFT (2) +#define AL3426_REG_PS_DATA_HIGH_MASK 0x03 +/*----------------------------------------------------------------------------*/ +#define AP3426_REG_ALS_CONF 0x10 /*ALS GAIN*/ + +#define AP3426_REG_ALS_PERSIS 0x14 +//#define AP3426_REG_ALS_CAL 0x19 + +#define AP3426_REG_ALS_THDL_L 0x1A +#define AP3426_REG_ALS_THDL_L_SHIFT (0) +#define AP3426_REG_ALS_THDL_L_MASK 0xFF + +#define AP3426_REG_ALS_THDL_H 0x1B +#define AP3426_REG_ALS_THDL_H_SHIFT (0) +#define AP3426_REG_ALS_THDL_H_MASK 0xFF + +#define AP3426_REG_ALS_THDH_L 0x1C +#define AP3426_REG_ALS_THDH_L_SHIFT (0) +#define AP3426_REG_ALS_THDH_L_MASK 0xFF + +#define AP3426_REG_ALS_THDH_H 0x1D +#define AP3426_REG_ALS_THDH_H_SHIFT (0) +#define AP3426_REG_ALS_THDH_H_MASK 0xFF + +/*----------------------------------------------------------------------------*/ +/* ap3426 PS CONFIG registers */ +#define AP3426_REG_PS_CONF 0x20 /*PS GAIN*/ +#define AP3426_REG_PS_CONF_SHIFT (2) +#define AP3426_REG_PS_CONF_MASK 0x0C + +#define AP3426_REG_PS_LEDD 0x21 /*PS LED DRIVER*/ +#define AP3426_REG_PS_LEDD_SHIFT (0) +#define AP3426_REG_PS_LEDD_MASK 0x03 + +#define AP3426_REG_PS_IFORM 0x22 /* PS INT Mode*/ + +#define AP3426_REG_PS_MEAN 0x23 +#define AP3426_REG_PS_MEAN_SHIFT (0) +#define AP3426_REG_PS_MEAN_MASK 0x03 + +#define AP3426_REG_PS_SMARTINT 0x24 /* PS Smart INT for low power */ +#define AP3426_REG_PS_INTEGR 0x25 +#define AP3426_REG_PS_PERSIS 0x26 +#define AP3426_REG_PS_CAL_L 0x28 +#define AP3426_REG_PS_CAL_H 0x29 + +#define AP3426_REG_PS_THDL_L 0x2A +#define AP3426_REG_PS_THDL_L_SHIFT (0) +#define AP3426_REG_PS_THDL_L_MASK 0xFF + +#define AP3426_REG_PS_THDL_H 0x2B +#define AP3426_REG_PS_THDL_H_SHIFT (0) +#define AP3426_REG_PS_THDL_H_MASK 0x03 + +#define AP3426_REG_PS_THDH_L 0x2C +#define AP3426_REG_PS_THDH_L_SHIFT (0) +#define AP3426_REG_PS_THDH_L_MASK 0xFF + +#define AP3426_REG_PS_THDH_H 0x2D +#define AP3426_REG_PS_THDH_H_SHIFT (0) +#define AP3426_REG_PS_THDH_H_MASK 0x03 + +#define AP3426_MAX_REG_NUM (AP3426_REG_PS_THDH_H + 1) +/*============================================================================*/ +//SYSTEM MODE (AP3426_REG_SYS_CONF) +#define AP3426_SYS_DEV_DOWN 0x00 +#define AP3426_SYS_ALS_ENABLE 0x01 +#define AP3426_SYS_PS_ENABLE 0x02 +#define AP3426_SYS_ALS_PS_ENABLE 0x03 +#define AP3426_SYS_DEV_RESET 0x04 +/*----------------------------------------------------------------------------*/ +//INT FLAG BIT MASK +#define AP3426_SYS_ALS_INT_TRI 0x01 +#define AP3426_SYS_PS_INT_TRI 0x02 +#define AP3426_SYS_PS_INT_OBJ 0x10 +#define AP3426_SYS_PS_INT_IROV 0x20 +/*----------------------------------------------------------------------------*/ +//INT CLEAN Mode +#define AP3426_SYS_ICLEAN_AUTO 0x00 +#define AP3426_SYS_ICLEAN_MANUAL 0x01 +/*----------------------------------------------------------------------------*/ +//ALS CONFIG +#define AP3426_ALS_RANGE_0 0x00 /* Full range 32768 lux (0.5lux/count) */ +#define AP3426_ALS_RANGE_1 0x01 /* Full range 8192 lux */ +#define AP3426_ALS_RANGE_2 0x02 /* Full range 2048 lux */ +#define AP3426_ALS_RANGE_3 0x03 /* Full range 512 lux */ +#define AP3426_ALS_RANGE_MASK 0x30 +#define AP3426_ALS_RANGE_SHIFT (4) +#define AP3426_ALS_PERSIST_MASK 0x0F + +/*----------------------------------------------------------------------------*/ +//PS CONFIG +#define AP3426_PS_GAIN_1 0x00 /* PS resulation * 1 */ +#define AP3426_PS_GAIN_2 0x01 /* PS resulation * 2 */ +#define AP3426_PS_GAIN_4 0x02 /* PS resulation * 4 */ +#define AP3426_PS_GAIN_8 0x03 /* PS resulation * 8 */ +#define AP3426_PS_PERSIST_1 0x00 +#define AP3426_PS_PERSIST_2 0x01 +#define AP3426_PS_PERSIST_4 0x02 +#define AP3426_PS_PERSIST_8 0x03 +/*----------------------------------------------------------------------------*/ +//PS LED Control +#define AP3426_PS_LED_P0 0x00 /* 0 puls */ +#define AP3426_PS_LED_P1 0x01 /* 1 puls (default)*/ +#define AP3426_PS_LED_P2 0x02 /* 2 puls */ +#define AP3426_PS_LED_P3 0x03 /* 3 puls */ +#define AP3426_PS_DEIVER_167 0x00 /* 16.7% */ +#define AP3426_PS_DEIVER_333 0x01 /* 33.3% */ +#define AP3426_PS_DEIVER_667 0x02 /* 66.7% */ +#define AP3426_PS_DEIVER_1000 0x03 /* 100% (default)*/ +/*----------------------------------------------------------------------------*/ +//PS MEAN +#define AP3426_PS_MEAN_0 0x00 /* 5ms @2T*/ +#define AP3426_PS_MEAN_1 0x01 /* 9.6ms @2T*/ +#define AP3426_PS_MEAN_2 0x02 /* 14.1ms @2T*/ +#define AP3426_PS_MEAN_3 0x03 /* 18.7ms @2T*/ +/*----------------------------------------------------------------------------*/ +#define DISABLE 0x00 +#define ENABLE 0x01 +/*============================================================================*/ + +struct ap3426_data { + struct i2c_client *client; + struct mutex lock; + u8 reg_cache[AP3426_NUM_CACHABLE_REGS];//TO-DO + u8 power_state_before_suspend; + uint32_t int_pin; + uint32_t irq_flags; + + struct sensors_classdev als_cdev; //for msm8916 kevindang20141010 + struct sensors_classdev ps_cdev; //for msm8916 + + struct input_dev *psensor_input_dev; + struct input_dev *lsensor_input_dev; + struct input_dev *hsensor_input_dev; + struct workqueue_struct *psensor_wq; + struct work_struct psensor_work; + struct workqueue_struct *lsensor_wq; + struct work_struct lsensor_work; + struct workqueue_struct *ap3426_wq; + struct work_struct ap3426_work; + struct timer_list pl_timer; + struct regulator *vdd; + struct regulator *vio; + bool power_enabled; + bool als_enabled; + bool als_re_enable; + int als_msec_poll_delay; + bool als_polling_just_enabled; + bool ps_enabled; + bool ps_re_enable; + bool suspended; + struct wake_lock ps_wakelock; + uint16_t ps_thd_l; + uint16_t ps_thd_h; + uint16_t ps_calibration_min; + uint16_t ps_calibration_expected; + uint16_t ps_calibration_max; + uint16_t ps_integrated_time; + bool ps_calibrated; + uint16_t ps_crosstalk_cal_value; +}; + +#endif diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c index e7e12a5f5c2..97b5f5544db 100644 --- a/drivers/input/misc/arizona-haptics.c +++ b/drivers/input/misc/arizona-haptics.c @@ -37,7 +37,11 @@ static void arizona_haptics_work(struct work_struct *work) struct arizona_haptics, work); struct arizona *arizona = haptics->arizona; +<<<<<<< HEAD struct mutex *dapm_mutex = &arizona->dapm->card->dapm_mutex; +======= + struct mutex *dapm_mutex; +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed int ret; if (!haptics->arizona->dapm) { @@ -45,6 +49,11 @@ static void arizona_haptics_work(struct work_struct *work) return; } +<<<<<<< HEAD +======= + dapm_mutex = &arizona->dapm->card->dapm_mutex; + +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed if (haptics->intensity) { ret = regmap_update_bits(arizona->regmap, ARIZONA_HAPTICS_PHASE_2_INTENSITY, @@ -152,6 +161,7 @@ static int arizona_haptics_play(struct input_dev *input, void *data, static void arizona_haptics_close(struct input_dev *input) { struct arizona_haptics *haptics = input_get_drvdata(input); +<<<<<<< HEAD struct mutex *dapm_mutex = &haptics->arizona->dapm->card->dapm_mutex; cancel_work_sync(&haptics->work); @@ -162,6 +172,18 @@ static void arizona_haptics_close(struct input_dev *input) snd_soc_dapm_disable_pin(haptics->arizona->dapm, "HAPTICS"); mutex_unlock(dapm_mutex); +======= + struct mutex *dapm_mutex; + + cancel_work_sync(&haptics->work); + + if (haptics->arizona->dapm) { + dapm_mutex = &haptics->arizona->dapm->card->dapm_mutex; + mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); + snd_soc_dapm_disable_pin(haptics->arizona->dapm, "HAPTICS"); + mutex_unlock(dapm_mutex); + } +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed } static int arizona_haptics_probe(struct platform_device *pdev) diff --git a/drivers/input/misc/bma2x2.c b/drivers/input/misc/bma2x2.c index c4c2b86d9cb..7c726d5bb33 100644 --- a/drivers/input/misc/bma2x2.c +++ b/drivers/input/misc/bma2x2.c @@ -53,7 +53,10 @@ #include "bstclass.h" #define ACC_NAME "ACC" +<<<<<<< HEAD #define BMA2X2_ENABLE_INT1 +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #ifdef ENABLE_ISR_DEBUG_MSG #define ISR_INFO(dev, fmt, arg...) dev_info(dev, fmt, ##arg) @@ -61,8 +64,11 @@ #define ISR_INFO(dev, fmt, arg...) #endif +<<<<<<< HEAD #define BMA2X2_SENSOR_IDENTIFICATION_ENABLE +======= +>>>>>>> ff59b2a95bafd4a5ced1a0700067b39cf3b37bed #define SENSOR_NAME "bma2x2-accel" #define ABSMIN -512 #define ABSMAX 512 diff --git a/drivers/input/misc/bmg160.c b/drivers/input/misc/bmg160.c new file mode 100644 index 00000000000..c3242f08c00 --- /dev/null +++ b/drivers/input/misc/bmg160.c @@ -0,0 +1,7320 @@ +/*! + * @section LICENSE + * (C) Copyright 2011~2014 Bosch Sensortec GmbH All Rights Reserved + * + * This software program is licensed subject to the GNU General + * Public License (GPL).Version 2,June 1991, + * available at http://www.fsf.org/copyleft/gpl.html + * + * @filename bmg160.c + * @date 2013/11/25 + * @id "079d340" + * @version 1.5 + * + * @brief BMG160API +*/ + +#include "bmg160.h" +static struct bmg160_t *p_bmg160; + + +/***************************************************************************** + * Description: *//**brief API Initialization routine + * + * + * + * +* \param bmg160_t *bmg160 + * Pointer to a structure. + * + * structure members are + * + * unsigned char chip_id; + * unsigned char dev_addr; + * BMG160_BRD_FUNC_PTR; + * BMG160_WR_FUNC_PTR; + * BMG160_RD_FUNC_PTR; + * void(*delay_msec)( BMG160_MDELAY_DATA_TYPE ); + * + * + * + * + * + * \return result of communication routines + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_init(struct bmg160_t *bmg160) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char a_data_u8r = C_BMG160_Zero_U8X; + p_bmg160 = bmg160; + + p_bmg160->dev_addr = BMG160_I2C_ADDR; + + /*Read CHIP_ID */ + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_CHIP_ID_ADDR, &a_data_u8r, 1); + p_bmg160->chip_id = a_data_u8r; + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads Rate dataX from location 02h and 03h + * registers + * + * + * + * + * \param + * BMG160_S16 *data_x : Address of data_x + * + * + * \return + * result of communication routines + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_dataX(BMG160_S16 *data_x) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char a_data_u8r[2] = { 0 }; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RATE_X_LSB_VALUEX__REG, a_data_u8r, 2); + a_data_u8r[0] = BMG160_GET_BITSLICE(a_data_u8r[0], + BMG160_RATE_X_LSB_VALUEX); + *data_x = (BMG160_S16) + ((((BMG160_S16)((signed char)a_data_u8r[1])) << + BMG160_SHIFT_8_POSITION) | (a_data_u8r[0])); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads rate dataY from location 04h and 05h + * registers + * + * + * + * + * \param + * BMG160_S16 *data_y : Address of data_y + * + * + * \return + * result of communication routines + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_dataY(BMG160_S16 *data_y) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char a_data_u8r[2] = { 0 }; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RATE_Y_LSB_VALUEY__REG, a_data_u8r, 2); + a_data_u8r[0] = BMG160_GET_BITSLICE(a_data_u8r[0], + BMG160_RATE_Y_LSB_VALUEY); + *data_y = (BMG160_S16) + ((((BMG160_S16)((signed char)a_data_u8r[1])) + << BMG160_SHIFT_8_POSITION) | (a_data_u8r[0])); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads rate dataZ from location 06h and 07h + * registers + * + * + * + * + * \param + * BMG160_S16 *data_z : Address of data_z + * + * + * \return + * result of communication routines + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_dataZ(BMG160_S16 *data_z) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char a_data_u8r[2] = { 0 }; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RATE_Z_LSB_VALUEZ__REG, a_data_u8r, 2); + a_data_u8r[0] = BMG160_GET_BITSLICE(a_data_u8r[0], + BMG160_RATE_Z_LSB_VALUEZ); + *data_z = (BMG160_S16) + ((((BMG160_S16)((signed char)a_data_u8r[1])) + << BMG160_SHIFT_8_POSITION) | (a_data_u8r[0])); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads data X,Y and Z from location 02h to 07h + * + * + * + * + * \param + * bmg160_data_t *data : Address of bmg160_data_t + * + * + * \return + * result of communication routines + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_dataXYZ(struct bmg160_data_t *data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char a_data_u8r[6] = { 0 }; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RATE_X_LSB_VALUEX__REG, a_data_u8r, 6); + /* Data X */ + a_data_u8r[0] = + BMG160_GET_BITSLICE(a_data_u8r[0], BMG160_RATE_X_LSB_VALUEX); + data->datax = (BMG160_S16) + ((((BMG160_S16)((signed char)a_data_u8r[1])) + << BMG160_SHIFT_8_POSITION) | (a_data_u8r[0])); + /* Data Y */ + a_data_u8r[2] = BMG160_GET_BITSLICE(a_data_u8r[2], + BMG160_RATE_Y_LSB_VALUEY); + data->datay = (BMG160_S16) + ((((BMG160_S16)((signed char)a_data_u8r[3])) + << BMG160_SHIFT_8_POSITION) | (a_data_u8r[2])); + /* Data Z */ + a_data_u8r[4] = BMG160_GET_BITSLICE(a_data_u8r[4], + BMG160_RATE_Z_LSB_VALUEZ); + data->dataz = (BMG160_S16) + ((((BMG160_S16)((signed char)a_data_u8r[5])) + << BMG160_SHIFT_8_POSITION) | (a_data_u8r[4])); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads data X,Y,Z and Interrupts + * from location 02h to 07h + * + * + * + * + * \param + * bmg160_data_t *data : Address of bmg160_data_t + * + * + * \return + * result of communication routines + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_dataXYZI(struct bmg160_data_t *data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char a_data_u8r[12] = { 0 }; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RATE_X_LSB_VALUEX__REG, a_data_u8r, 12); + /* Data X */ + a_data_u8r[0] = BMG160_GET_BITSLICE(a_data_u8r[0], + BMG160_RATE_X_LSB_VALUEX); + data->datax = (BMG160_S16) + ((((BMG160_S16)((signed char)a_data_u8r[1])) + << BMG160_SHIFT_8_POSITION) | (a_data_u8r[0])); + /* Data Y */ + a_data_u8r[2] = BMG160_GET_BITSLICE(a_data_u8r[2], + BMG160_RATE_Y_LSB_VALUEY); + data->datay = (BMG160_S16) + ((((BMG160_S16)((signed char)a_data_u8r[3])) + << BMG160_SHIFT_8_POSITION) | (a_data_u8r[2])); + /* Data Z */ + a_data_u8r[4] = BMG160_GET_BITSLICE(a_data_u8r[4], + BMG160_RATE_Z_LSB_VALUEZ); + data->dataz = (BMG160_S16) + ((((BMG160_S16)((signed char)a_data_u8r[5])) + << BMG160_SHIFT_8_POSITION) | (a_data_u8r[4])); + data->intstatus[0] = a_data_u8r[7]; + data->intstatus[1] = a_data_u8r[8]; + data->intstatus[2] = a_data_u8r[9]; + data->intstatus[3] = a_data_u8r[10]; + data->intstatus[4] = a_data_u8r[11]; + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads Temperature from location 08h + * + * + * + * + * \param + * unsigned char *temp : Address of temperature + * + * + * \return + * result of communication routines + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_Temperature(unsigned char *temperature) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_TEMP_ADDR, &v_data_u8r, 1); + *temperature = v_data_u8r; + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API reads the data from the given register + * + * + * + * + *\param unsigned char addr, unsigned char *data unsigned char len + * addr -> Address of the register + * data -> address of the variable, read value will be + * kept + * len -> No of byte to be read. + * \return results of bus communication function + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_read_register(unsigned char addr, +unsigned char *data, unsigned char len) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, addr, data, len); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API reads the data from the given register + * + * + * + * + *\param unsigned char addr, unsigned char *data BMG160_S32 len + * addr -> Address of the register + * data -> address of the variable, read value will be + * kept + * len -> No of byte to be read. + * \return results of bus communication function + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_burst_read(unsigned char addr, +unsigned char *data, BMG160_S32 len) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BURST_READ_FUNC(p_bmg160->dev_addr, + addr, data, len); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API given data to the given register + * + * + * + * + *\param unsigned char addr, unsigned char data,unsigned char len + * addr -> Address of the register + * data -> Data to be written to the register + * len -> No of byte to be read. + * + * \return Results of bus communication function + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_write_register(unsigned char addr, +unsigned char *data, unsigned char len) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, addr, data, len); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads interrupt status 0 register byte from 09h + * + * + * + * + * \param + * unsigned char *status0_data : Address of status 0 register + * + * + * \return + * Result of bus communication function + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ + +BMG160_RETURN_FUNCTION_TYPE bmg160_get_interrupt_status_reg_0( +unsigned char *status0_data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_STATUSZERO__REG, &v_data_u8r, 1); + *status0_data = + BMG160_GET_BITSLICE(v_data_u8r, BMG160_INT_STATUSZERO); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads interrupt status 1 register byte from 0Ah + * + * + * + * + * \param + * unsigned char *status1_data : Address of status register + * + * + * \return + * Result of bus communication function + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ + +BMG160_RETURN_FUNCTION_TYPE bmg160_get_interrupt_status_reg_1( +unsigned char *status1_data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, BMG160_INT_STATUSONE__REG, + &v_data_u8r, 1); + *status1_data = + BMG160_GET_BITSLICE(v_data_u8r, BMG160_INT_STATUSONE); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads interrupt status register byte from 0Bh + * + * + * + * + * \param + * unsigned char *status2_data : Address of status 2 register + * + * + * \return + * Result of bus communication function + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ + +BMG160_RETURN_FUNCTION_TYPE bmg160_get_interrupt_status_reg_2( +unsigned char *status2_data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_STATUSTWO__REG, &v_data_u8r, 1); + *status2_data = + BMG160_GET_BITSLICE(v_data_u8r, BMG160_INT_STATUSTWO); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads interrupt status 3 register byte from 0Ch + * + * + * + * + * \param + * unsigned char *status3_data : Address of status 3 register + * + * + * \return + * Result of bus communication function + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ + +BMG160_RETURN_FUNCTION_TYPE bmg160_get_interrupt_status_reg_3( +unsigned char *status3_data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_STATUSTHREE__REG, &v_data_u8r, 1); + *status3_data = + BMG160_GET_BITSLICE(v_data_u8r, BMG160_INT_STATUSTHREE); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API reads the range from register 0x0Fh of + * (0 to 2) bits + * + * + * + * + *\param unsigned char *range + * Range[0....7] + * 0 2000/s + * 1 1000/s + * 2 500/s + * 3 250/s + * 4 125/s + * + * + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_range_reg(unsigned char *range) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_RANGE_ADDR_RANGE__REG, &v_data_u8r, 1); + *range = + BMG160_GET_BITSLICE(v_data_u8r, BMG160_RANGE_ADDR_RANGE); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API sets the range register 0x0Fh + * (0 to 2 bits) + * + * + * + * + *\param unsigned char range + * + * Range[0....7] + * 0 2000/s + * 1 1000/s + * 2 500/s + * 3 250/s + * 4 125/s + * + * + * + * + * \return Communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_range_reg(unsigned char range) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (range < C_BMG160_Five_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_RANGE_ADDR_RANGE__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_RANGE_ADDR_RANGE, + range); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_RANGE_ADDR_RANGE__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API reads the high resolution bit of 0x10h + * Register 7th bit + * + * + * + * + *\param unsigned char *high_res + * Pointer to a variable passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_high_res(unsigned char *high_res) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_BW_ADDR_HIGH_RES__REG, &v_data_u8r, 1); + *high_res = + BMG160_GET_BITSLICE(v_data_u8r, BMG160_BW_ADDR_HIGH_RES); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API reads the bandwidth register of 0x10h 0 to + * 3 bits + * + * + * + * +* \param unsigned char *bandwidth + * pointer to a variable passed as a parameter + * + * 0 no filter(523 Hz) + * 1 230Hz + * 2 116Hz + * 3 47Hz + * 4 23Hz + * 5 12Hz + * 6 64Hz + * 7 32Hz + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_bw(unsigned char *bandwidth) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, BMG160_BW_ADDR__REG, &v_data_u8r, 1); + *bandwidth = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_BW_ADDR); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API writes the Bandwidth register (0x10h of 0 + * to 3 bits) + * + * + * + * + *\param unsigned char bandwidth, + * The bandwidth to be set passed as a parameter + * + * 0 no filter(523 Hz) + * 1 230Hz + * 2 116Hz + * 3 47Hz + * 4 23Hz + * 5 12Hz + * 6 64Hz + * 7 32Hz + * + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_bw(unsigned char bandwidth) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + unsigned char v_mode_u8r = C_BMG160_Zero_U8X; + unsigned char v_autosleepduration = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (bandwidth < C_BMG160_Eight_U8X) { + bmg160_get_mode(&v_mode_u8r); + if (v_mode_u8r == BMG160_MODE_ADVANCEDPOWERSAVING) { + bmg160_get_autosleepdur(&v_autosleepduration); + bmg160_set_autosleepdur(v_autosleepduration, + bandwidth); + } + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_BW_ADDR__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_BW_ADDR, bandwidth); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_BW_ADDR__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API reads the status of External Trigger + * selection bits (4 and 5) of 0x12h registers + * + * + * + * + *\param unsigned char *pwu_ext_tri_sel + * Pointer to a variable passed as a parameter + * + * + * + * \return Communication Results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_pmu_ext_tri_sel( +unsigned char *pwu_ext_tri_sel) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR_EXT_TRI_SEL__REG, &v_data_u8r, 1); + *pwu_ext_tri_sel = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MODE_LPM2_ADDR_EXT_TRI_SEL); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API writes the External Trigger selection + * bits (4 and 5) of 0x12h registers + * + * + * + * + *\param unsigned char pwu_ext_tri_sel + * Value to be written passed as a parameter + * + * + * + * \return Communication Results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_pmu_ext_tri_sel( +unsigned char pwu_ext_tri_sel) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR_EXT_TRI_SEL__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MODE_LPM2_ADDR_EXT_TRI_SEL, pwu_ext_tri_sel); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR_EXT_TRI_SEL__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get data high bandwidth + * + * + * + * + *\param unsigned char *high_bw : Address of high_bw + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_high_bw(unsigned char *high_bw) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RATED_HBW_ADDR_DATA_HIGHBW__REG, &v_data_u8r, 1); + *high_bw = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_RATED_HBW_ADDR_DATA_HIGHBW); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set data high bandwidth + * + * + * + * + *\param unsigned char high_bw: + * Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_high_bw(unsigned char high_bw) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (high_bw < C_BMG160_Two_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_RATED_HBW_ADDR_DATA_HIGHBW__REG, + &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_RATED_HBW_ADDR_DATA_HIGHBW, high_bw); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_RATED_HBW_ADDR_DATA_HIGHBW__REG, + &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get shadow dis + * + * + * + * + *\param unsigned char *shadow_dis : Address of shadow_dis + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_shadow_dis(unsigned char *shadow_dis) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RATED_HBW_ADDR_SHADOW_DIS__REG, &v_data_u8r, 1); + *shadow_dis = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_RATED_HBW_ADDR_SHADOW_DIS); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set shadow dis + * + * + * + * + *\param unsigned char shadow_dis + * Value to be written passed as a parameter + * + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_shadow_dis(unsigned char shadow_dis) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (shadow_dis < C_BMG160_Two_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_RATED_HBW_ADDR_SHADOW_DIS__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_RATED_HBW_ADDR_SHADOW_DIS, shadow_dis); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_RATED_HBW_ADDR_SHADOW_DIS__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief + * This function is used for the soft reset + * The soft reset register will be written with 0xB6. + * + * + * +* \param None + * + * + * + * \return Communication results. + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_soft_reset(void) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_SoftReset_u8r = C_BMG160_Zero_U8X; + v_SoftReset_u8r = 0xB6; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_BGW_SOFTRESET_ADDR, &v_SoftReset_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get data enable data + * + * + * + * + *\param unsigned char *data_en : Address of data_en + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_enable(unsigned char *data_en) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_ENABLE0_DATAEN__REG, &v_data_u8r, 1); + *data_en = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE0_DATAEN); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set data enable data + * + * + * + * + * \param unsigned char data_en: + * Value to be written passed as a \parameter + * 0 --> Disable + * 1 --> Enable + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_data_en(unsigned char data_en) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE0_DATAEN__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE0_DATAEN, data_en); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE0_DATAEN__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get fifo enable bit + * + * + * + * + * \param unsigned char *fifo_en : Address of fifo_en + * Pointer to a variable passed as a parameter + + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_enable(unsigned char *fifo_en) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_ENABLE0_FIFOEN__REG, &v_data_u8r, 1); + *fifo_en = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE0_FIFOEN); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set fifo enable bit + * + * + * + * + * \param unsigned char fifo_en: + * Value to be written passed as a parameter + * 0 --> Disable + * 1 --> Enable + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_enable(unsigned char fifo_en) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (fifo_en < C_BMG160_Two_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE0_FIFOEN__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE0_FIFOEN, fifo_en); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE0_FIFOEN__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API reads the status of the Auto offset + * Enable bit + * (0x15 Reg 3rd Bit) + * + * + * + * + * \param unsigned char *offset_en + * address of a variable, + * + * + * + * \return Communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_auto_offset_en( +unsigned char *offset_en) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_ENABLE0_AUTO_OFFSETEN__REG, &v_data_u8r, 1); + *offset_en = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE0_AUTO_OFFSETEN); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API sets the Auto offset enable bit + * (Reg 0x15 3rd Bit) + * + * + * + * + * \param unsigned char offset_en + * 0 --> Disable + * 1 --> Enable + * + * \return Communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_auto_offset_en(unsigned char offset_en) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_ENABLE0_AUTO_OFFSETEN__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE0_AUTO_OFFSETEN, offset_en); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_INT_ENABLE0_AUTO_OFFSETEN__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the output type status + * + * + * + * + * \param unsigned char channel,unsigned char *int_od + * BMG160_INT1 -> 0 + * BMG160_INT2 -> 1 + * int_od : open drain -> 1 + * push pull -> 0 + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int_od(unsigned char param, +unsigned char *int_od) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (param) { + case BMG160_INT1: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT1_OD__REG, &v_data_u8r, 1); + *int_od = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE1_IT1_OD); + break; + case BMG160_INT2: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT2_OD__REG, &v_data_u8r, 1); + *int_od = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE1_IT2_OD); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the output type status + * + * + * + * + * \param unsigned char channel,unsigned char *int_od + * BMG160_INT1 -> 0 + * BMG160_INT2 -> 1 + * int_od : open drain -> 1 + * push pull -> 0 + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int_od(unsigned char param, +unsigned char int_od) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (param) { + case BMG160_INT1: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT1_OD__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE1_IT1_OD, int_od); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT1_OD__REG, &v_data_u8r, 1); + break; + case BMG160_INT2: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT2_OD__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE1_IT2_OD, int_od); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT2_OD__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Active Level status + * + * + * + * + * \param unsigned char channel,unsigned char *int_lvl + * BMG160_INT1 -> 0 + * BMG160_INT2 -> 1 + * int_lvl : Active HI -> 1 + * Active LO -> 0 + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int_lvl(unsigned char param, +unsigned char *int_lvl) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (param) { + case BMG160_INT1: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT1_LVL__REG, &v_data_u8r, 1); + *int_lvl = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE1_IT1_LVL); + break; + case BMG160_INT2: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT2_LVL__REG, &v_data_u8r, 1); + *int_lvl = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE1_IT2_LVL); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Active Level status + * + * + * + * + * \param unsigned char channel,unsigned char *int_lvl + * BMG160_INT1 -> 0 + * BMG160_INT2 -> 1 + * int_lvl : Active HI -> 1 + * Active LO -> 0 + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int_lvl(unsigned char param, +unsigned char int_lvl) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (param) { + case BMG160_INT1: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT1_LVL__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE1_IT1_LVL, int_lvl); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT1_LVL__REG, &v_data_u8r, 1); + break; + case BMG160_INT2: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT2_LVL__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_ENABLE1_IT2_LVL, int_lvl); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_ENABLE1_IT2_LVL__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get High Interrupt1 + * + * + * + * + * \param unsigned char *int1_high : Address of high_bw + * Pointer to a variable passed as a parameter + + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int1_high(unsigned char *int1_high) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_0_INT1_HIGH__REG, &v_data_u8r, 1); + *int1_high = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_MAP_0_INT1_HIGH); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set High Interrupt1 + * + * + * + * + * \param unsigned char int1_high + * 0 -> Disable + * 1 -> Enable + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int1_high(unsigned char int1_high) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_0_INT1_HIGH__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_MAP_0_INT1_HIGH, int1_high); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_0_INT1_HIGH__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Any Interrupt1 + * + * + * + * + * \param unsigned char *int1_any : Address of high_bw + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int1_any(unsigned char *int1_any) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_0_INT1_ANY__REG, &v_data_u8r, 1); + *int1_any = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_MAP_0_INT1_ANY); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Any Interrupt1 + * + * + * + * + *\param unsigned char int1_any + * 0 -> Disable + * 1 -> Enable + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int1_any(unsigned char int1_any) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_0_INT1_ANY__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_MAP_0_INT1_ANY, int1_any); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_0_INT1_ANY__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get data Interrupt1 and data + * Interrupt2 + * + * + * + * + * \param unsigned char axis,unsigned char *int_data + * axis : + * BMG160_INT1_DATA -> 0 + * BMG160_INT2_DATA -> 1 + * int_data : + * Disable -> 0 + * Enable -> 1 + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int_data(unsigned char axis, +unsigned char *int_data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (axis) { + case BMG160_INT1_DATA: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_DATA__REG, &v_data_u8r, 1); + *int_data = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT1_DATA); + break; + case BMG160_INT2_DATA: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_DATA__REG, &v_data_u8r, 1); + *int_data = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT2_DATA); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set data Interrupt1 and data + * Interrupt2 + * + * + * + * + * \param unsigned char axis,unsigned char *int_data + * axis : + * BMG160_INT1_DATA -> 0 + * BMG160_INT2_DATA -> 1 + * int_data : + * Disable -> 0 + * Enable -> 1 + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int_data(unsigned char axis, +unsigned char int_data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (axis) { + case BMG160_INT1_DATA: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_DATA__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT1_DATA, int_data); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_DATA__REG, &v_data_u8r, 1); + break; + case BMG160_INT2_DATA: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_DATA__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT2_DATA, int_data); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_DATA__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; + } + +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get fast offset and auto + * offset Interrupt2 + * + * + * + * + *\param unsigned char axis,unsigned char *int2_offset + * axis : + * BMG160_AUTO_OFFSET -> 1 + * BMG160_FAST_OFFSET -> 2 + * int2_offset : + * Disable -> 0 + * Enable -> 1 + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int2_offset(unsigned char axis, +unsigned char *int2_offset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (axis) { + case BMG160_FAST_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_FAST_OFFSET__REG, &v_data_u8r, 1); + *int2_offset = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT2_FAST_OFFSET); + break; + case BMG160_AUTO_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_AUTO_OFFSET__REG, &v_data_u8r, 1); + *int2_offset = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT2_AUTO_OFFSET); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set fast offset and auto + * offset Interrupt2 + * + * + * + * + *\param unsigned char axis,unsigned char *int2_offset + * axis : + * BMG160_AUTO_OFFSET -> 1 + * BMG160_FAST_OFFSET -> 2 + * int2_offset : + * Disable -> 0 + * Enable -> 1 + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int2_offset(unsigned char axis, +unsigned char int2_offset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (axis) { + case BMG160_FAST_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_FAST_OFFSET__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT2_FAST_OFFSET, int2_offset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_FAST_OFFSET__REG, &v_data_u8r, 1); + break; + case BMG160_AUTO_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_AUTO_OFFSET__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT2_AUTO_OFFSET, int2_offset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_AUTO_OFFSET__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get fast offset and auto + * offset Interrupt1 + * + * + * + * + *\param unsigned char axis,unsigned char *int1_offset + * axis : + * BMG160_AUTO_OFFSET -> 1 + * BMG160_FAST_OFFSET -> 2 + * int2_offset : + * Disable -> 0 + * Enable -> 1 + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int1_offset(unsigned char axis, +unsigned char *int1_offset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (axis) { + case BMG160_FAST_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_FAST_OFFSET__REG, &v_data_u8r, 1); + *int1_offset = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT1_FAST_OFFSET); + break; + case BMG160_AUTO_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_AUTO_OFFSET__REG, &v_data_u8r, 1); + *int1_offset = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT1_AUTO_OFFSET); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set fast offset and auto + * offset Interrupt1 + * + * + * + * + *\param unsigned char axis,unsigned char *int1_offset + * axis : + * BMG160_AUTO_OFFSET -> 1 + * BMG160_FAST_OFFSET -> 2 + * int2_offset : + * Disable -> 0 + * Enable -> 1 + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int1_offset(unsigned char axis, +unsigned char int1_offset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (axis) { + case BMG160_FAST_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_FAST_OFFSET__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT1_FAST_OFFSET, int1_offset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_FAST_OFFSET__REG, &v_data_u8r, 1); + break; + case BMG160_AUTO_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_AUTO_OFFSET__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT1_AUTO_OFFSET, int1_offset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_AUTO_OFFSET__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get status of FIFO Interrupt + * + * + * + * + *\param unsigned char *int_fifo : Address of int_fifo + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int_fifo(unsigned char *int_fifo) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_STATUS1_FIFO_INT__REG, &v_data_u8r, 1); + *int_fifo = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_STATUS1_FIFO_INT); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get FIFO Interrupt2 + * + * + * + * + *\param unsigned char *int_fifo + * int_fifo : + * Disable -> 0 + * Enable -> 1 + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int2_fifo(unsigned char *int_fifo) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_MAP_1_INT2_FIFO__REG, &v_data_u8r, 1); + *int_fifo = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT2_FIFO); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get FIFO Interrupt1 + * + * + * + * + *\param unsigned char *int_fifo + * int_fifo : + * Disable -> 0 + * Enable -> 1 + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int1_fifo(unsigned char *int_fifo) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_MAP_1_INT1_FIFO__REG, &v_data_u8r, 1); + *int_fifo = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT1_FIFO); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief + * + * + * + * + * \param + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int_fifo(unsigned char axis, +unsigned char int_fifo) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (axis) { + case BMG160_INT1: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_FIFO__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT1_FIFO, int_fifo); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_FIFO__REG, &v_data_u8r, 1); + break; + case BMG160_INT2: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_FIFO__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT2_FIFO, int_fifo); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_FIFO__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set FIFO Interrupt1 + * + * + * + * + *\param unsigned char *fifo_int1 + * fifo_int1 : + * Disable -> 0 + * Enable -> 1 + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int1_fifo(unsigned char fifo_int1) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (fifo_int1 < C_BMG160_Two_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_FIFO__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT1_FIFO, fifo_int1); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT1_FIFO__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set FIFO Interrupt2 + * + * + * + * + *\param unsigned char *fifo_int2 + * fifo_int2 : + * Disable -> 0 + * Enable -> 1 + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int2_fifo(unsigned char fifo_int2) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (fifo_int2 < C_BMG160_Two_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_FIFO__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MAP_1_INT2_FIFO, fifo_int2); + comres = p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MAP_1_INT2_FIFO__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get High Interrupt2 + * + * + * + * + *\param unsigned char *int2_high : Address of int2_high + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int2_high(unsigned char *int2_high) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_2_INT2_HIGH__REG, &v_data_u8r, 1); + *int2_high = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_MAP_2_INT2_HIGH); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get High Interrupt2 + * + * + * + * + *\param unsigned char int2_high + * 0 -> Disable + * 1 -> Enable + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int2_high(unsigned char int2_high) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_2_INT2_HIGH__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_MAP_2_INT2_HIGH, int2_high); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_2_INT2_HIGH__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Any Interrupt2 + * + * + * + * + *\param unsigned char *int2_any : Address of int2_any + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_int2_any(unsigned char *int2_any) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_2_INT2_ANY__REG, &v_data_u8r, 1); + *int2_any = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_MAP_2_INT2_ANY); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Any Interrupt2 + * + * + * + * + *\param unsigned char int2_any + * 0 -> Disable + * 1 -> Enable + * + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_int2_any(unsigned char int2_any) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_2_INT2_ANY__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_MAP_2_INT2_ANY, int2_any); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_INT_MAP_2_INT2_ANY__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get slow offset and fast + * offset unfilt data + * + * + * + *\param unsigned char param,unsigned char *offset_unfilt + * param : + * BMG160_SLOW_OFFSET -> 0 + * BMG160_FAST_OFFSET -> 2 + * offset_unfilt: Enable -> 1 + * Disable -> 0 + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_offset_unfilt(unsigned char param, +unsigned char *offset_unfilt) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (param) { + case BMG160_SLOW_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_0_ADDR_SLOW_OFFSET_UNFILT__REG, + &v_data_u8r, 1); + *offset_unfilt = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_0_ADDR_SLOW_OFFSET_UNFILT); + break; + case BMG160_FAST_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_1_ADDR_FAST_OFFSET_UNFILT__REG, + &v_data_u8r, 1); + *offset_unfilt = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_1_ADDR_FAST_OFFSET_UNFILT); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set slow offset and fast + * offset unfilt data + * + * + * + * + *\param unsigned char param,unsigned char *offset_unfilt + * param : + * BMG160_SLOW_OFFSET -> 0 + * BMG160_FAST_OFFSET -> 2 + * offset_unfilt: Enable -> 1 + * Disable -> 0 + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset_unfilt(unsigned char param, +unsigned char offset_unfilt) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (param) { + case BMG160_SLOW_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_0_ADDR_SLOW_OFFSET_UNFILT__REG, + &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_0_ADDR_SLOW_OFFSET_UNFILT, offset_unfilt); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_0_ADDR_SLOW_OFFSET_UNFILT__REG, + &v_data_u8r, 1); + break; + case BMG160_FAST_OFFSET: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_1_ADDR_FAST_OFFSET_UNFILT__REG, + &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_1_ADDR_FAST_OFFSET_UNFILT, offset_unfilt); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_1_ADDR_FAST_OFFSET_UNFILT__REG, + &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Tap, High, Constant, Any, + * Shake unfilt data + * + * + * + * + *\param unsigned char param,unsigned char *unfilt_data + * param : + * + * BMG160_HIGH_UNFILT_DATA -> 1 + * BMG160_ANY_UNFILT_DATA -> 3 + * + * unfilt_data: Enable -> 1 + * Disable -> 0 + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_unfilt_data(unsigned char param, +unsigned char *unfilt_data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (param) { + case BMG160_HIGH_UNFILT_DATA: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_0_ADDR_HIGH_UNFILT_DATA__REG, + &v_data_u8r, 1); + *unfilt_data = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_0_ADDR_HIGH_UNFILT_DATA); + break; + case BMG160_ANY_UNFILT_DATA: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_0_ADDR_ANY_UNFILT_DATA__REG, &v_data_u8r, 1); + *unfilt_data = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_0_ADDR_ANY_UNFILT_DATA); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Tap, High, Constant, Any, + * Shake unfilt data + * + * + * + * + *\param unsigned char param,unsigned char *unfilt_data + * param : + * + * BMG160_HIGH_UNFILT_DATA -> 1 + * BMG160_ANY_UNFILT_DATA -> 3 + * + * unfilt_data: Enable -> 1 + * Disable -> 0 + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_unfilt_data(unsigned char param, +unsigned char unfilt_data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (param) { + case BMG160_HIGH_UNFILT_DATA: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_0_ADDR_HIGH_UNFILT_DATA__REG, + &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_0_ADDR_HIGH_UNFILT_DATA, unfilt_data); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_0_ADDR_HIGH_UNFILT_DATA__REG, + &v_data_u8r, 1); + break; + case BMG160_ANY_UNFILT_DATA: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_0_ADDR_ANY_UNFILT_DATA__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_0_ADDR_ANY_UNFILT_DATA, unfilt_data); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_0_ADDR_ANY_UNFILT_DATA__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Any Threshold + * + * + * + * + *\param unsigned char *any_th : Address of any_th + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_any_th(unsigned char *any_th) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_1_ADDR_ANY_TH__REG, &v_data_u8r, 1); + *any_th = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_1_ADDR_ANY_TH); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Any Threshold + * + * + * + * + *\param unsigned char any_th: + * Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_any_th(unsigned char any_th) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_1_ADDR_ANY_TH__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_1_ADDR_ANY_TH, any_th); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_INT_1_ADDR_ANY_TH__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Awake Duration + * + * + * + * + *\param unsigned char *awake_dur : Address of awake_dur + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_awake_dur(unsigned char *awake_dur) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_2_ADDR_AWAKE_DUR__REG, &v_data_u8r, 1); + *awake_dur = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_2_ADDR_AWAKE_DUR); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Awake Duration + * + * + * + * + *\param unsigned char awake_dur: + * Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + ***************************************************************************** + * Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_awake_dur(unsigned char awake_dur) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_2_ADDR_AWAKE_DUR__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_2_ADDR_AWAKE_DUR, awake_dur); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_INT_2_ADDR_AWAKE_DUR__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Any Duration Sample + * + * + * + * + *\param unsigned char *dursample : Address of dursample + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_any_dursample(unsigned char *dursample) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_DURSAMPLE__REG, &v_data_u8r, 1); + *dursample = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_2_ADDR_ANY_DURSAMPLE); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Any Duration Sample + * + * + * + * + *\param unsigned char dursample: + * Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_any_dursample(unsigned char dursample) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_DURSAMPLE__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_2_ADDR_ANY_DURSAMPLE, dursample); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_DURSAMPLE__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of Any Enable + * Channel X,Y,Z + * + * + * + * + *\param unsigned char channel,unsigned char *data + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * data : + * Enable -> 1 + * disable -> 0 + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_any_en_ch(unsigned char channel, +unsigned char *data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_EN_X__REG, &v_data_u8r, 1); + *data = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_2_ADDR_ANY_EN_X); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_EN_Y__REG, &v_data_u8r, 1); + *data = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_2_ADDR_ANY_EN_Y); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_EN_Z__REG, &v_data_u8r, 1); + *data = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_2_ADDR_ANY_EN_Z); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of Any Enable + * Channel X,Y,Z + * + * + * + * + *\param unsigned char channel,unsigned char *data + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * data : + * Enable -> 1 + * disable -> 0 + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_any_en_ch(unsigned char channel, +unsigned char data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_EN_X__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_2_ADDR_ANY_EN_X, data); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_EN_X__REG, &v_data_u8r, 1); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_EN_Y__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_2_ADDR_ANY_EN_Y, data); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_EN_Y__REG, &v_data_u8r, 1); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_EN_Z__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_2_ADDR_ANY_EN_Z, data); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_2_ADDR_ANY_EN_Z__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of FIFO WM + * Enable + * + * + * + * + *\param unsigned char *fifo_wn_en + * Enable -> 1 + * Disable -> 0 + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_watermark_enable( +unsigned char *fifo_wn_en) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_INT_4_FIFO_WM_EN__REG, &v_data_u8r, 1); + *fifo_wn_en = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_INT_4_FIFO_WM_EN); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set FIFO WM Enable + * + * + * + * + *\param unsigned char *fifo_wn_en + * Enable -> 1 + * Disable -> 0 + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_watermark_enable( +unsigned char fifo_wn_en) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (fifo_wn_en < C_BMG160_Two_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_INT_4_FIFO_WM_EN__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_INT_4_FIFO_WM_EN, fifo_wn_en); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_INT_4_FIFO_WM_EN__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the Interrupt Reset + * + * + * + * + *\param unsigned char reset_int + * 1 -> Reset All Interrupts + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_reset_int(unsigned char reset_int) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RST_LATCH_ADDR_RESET_INT__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_RST_LATCH_ADDR_RESET_INT, reset_int); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_RST_LATCH_ADDR_RESET_INT__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the Offset Reset + * + * + * + * + *\param unsigned char offset_reset + * 1 -> Resets All the Offsets + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset_reset( +unsigned char offset_reset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RST_LATCH_ADDR_OFFSET_RESET__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_RST_LATCH_ADDR_OFFSET_RESET, offset_reset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_RST_LATCH_ADDR_OFFSET_RESET__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the Latch Status + * + * + * + * + *\param unsigned char *latch_status : Address of latch_status + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_latch_status( +unsigned char *latch_status) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RST_LATCH_ADDR_LATCH_STATUS__REG, &v_data_u8r, 1); + *latch_status = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_RST_LATCH_ADDR_LATCH_STATUS); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the Latch Status + * + * + * + * + *\param unsigned char latch_status: + * Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_latch_status( +unsigned char latch_status) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RST_LATCH_ADDR_LATCH_STATUS__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_RST_LATCH_ADDR_LATCH_STATUS, latch_status); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_RST_LATCH_ADDR_LATCH_STATUS__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the Latch Interrupt + * + * + * + * + *\param unsigned char *latch_int : Address of latch_int + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_latch_int(unsigned char *latch_int) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RST_LATCH_ADDR_LATCH_INT__REG, &v_data_u8r, 1); + *latch_int = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_RST_LATCH_ADDR_LATCH_INT); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the Latch Interrupt + * + * + * + * + *\param unsigned char latch_int: + * Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_latch_int(unsigned char latch_int) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_RST_LATCH_ADDR_LATCH_INT__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_RST_LATCH_ADDR_LATCH_INT, latch_int); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_RST_LATCH_ADDR_LATCH_INT__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of High + * Hysteresis X,Y,Z + * + * + * + * + *\param unsigned char channel,unsigned char *high_hy + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * high_hy : + * Enable -> 1 + * disable -> 0 + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_high_hy(unsigned char channel, +unsigned char *high_hy) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_HY_X__REG, &v_data_u8r, 1); + *high_hy = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_HIGH_HY_X); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_HY_Y__REG, &v_data_u8r, 1); + *high_hy = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_HIGH_HY_Y); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_HY_Z__REG, &v_data_u8r, 1); + *high_hy = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_HIGH_HY_Z); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of High + * Hysteresis X,Y,Z + * + * + * + * + *\param unsigned char channel,unsigned char *high_hy + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * high_hy : + * Enable -> 1 + * disable -> 0 + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_high_hy(unsigned char channel, +unsigned char high_hy) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_HY_X__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_HIGH_HY_X, high_hy); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_HY_X__REG, &v_data_u8r, 1); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_HY_Y__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_HIGH_HY_Y, high_hy); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_HY_Y__REG, &v_data_u8r, 1); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_HY_Z__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_HIGH_HY_Z, high_hy); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_HY_Z__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of High + * Threshold X,Y,Z + * + * + * + * + *\param unsigned char channel,unsigned char *high_th + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * high_th : + * Enable -> 1 + * disable -> 0 + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_high_th(unsigned char channel, +unsigned char *high_th) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_TH_X__REG, &v_data_u8r, 1); + *high_th = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_HIGH_TH_X); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_TH_Y__REG, &v_data_u8r, 1); + *high_th = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_HIGH_TH_Y); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_TH_Z__REG, &v_data_u8r, 1); + *high_th = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_HIGH_TH_Z); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of High + * Threshold X,Y,Z + * + * + * + * + *\param unsigned char channel,unsigned char *high_th + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * high_th : + * Enable -> 1 + * disable -> 0 + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_high_th(unsigned char channel, +unsigned char high_th) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_TH_X__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_HIGH_TH_X, high_th); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_TH_X__REG, &v_data_u8r, 1); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_TH_Y__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_HIGH_TH_Y, high_th); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_TH_Y__REG, &v_data_u8r, 1); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_TH_Z__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_HIGH_TH_Z, high_th); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_TH_Z__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of High Enable + * Channel X,Y,Z + * + * + * + * + *\param unsigned char channel,unsigned char *high_en + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * high_en : + * Enable -> 1 + * disable -> 0 + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_high_en_ch(unsigned char channel, +unsigned char *high_en) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_EN_X__REG, &v_data_u8r, 1); + *high_en = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_HIGH_EN_X); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_EN_Y__REG, &v_data_u8r, 1); + *high_en = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_HIGH_EN_Y); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_EN_Z__REG, &v_data_u8r, 1); + *high_en = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_HIGH_EN_Z); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of High Enable + * Channel X,Y,Z + * + * + * + * + *\param unsigned char channel,unsigned char *high_en + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * high_en : + * Enable -> 1 + * disable -> 0 + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_high_en_ch(unsigned char channel, +unsigned char high_en) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_EN_X__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_HIGH_EN_X, high_en); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_EN_X__REG, &v_data_u8r, 1); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_EN_Y__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_HIGH_EN_Y, high_en); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_EN_Y__REG, &v_data_u8r, 1); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_EN_Z__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_HIGH_EN_Z, high_en); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_EN_Z__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get High Duration + * + * + * + * + *\param unsigned char channel,unsigned char *high_dur + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * *high_dur : Address of high_bw + * Pointer to a variable passed as a + * parameter + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_high_dur_ch(unsigned char channel, +unsigned char *high_dur) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_DUR_X_ADDR, &v_data_u8r, 1); + *high_dur = v_data_u8r; + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_DUR_Y_ADDR, &v_data_u8r, 1); + *high_dur = v_data_u8r; + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_DUR_Z_ADDR, &v_data_u8r, 1); + *high_dur = v_data_u8r; + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set High Duration + * + * + * + * + *\param unsigned char channel,unsigned char *high_dur + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * high_dur : Value to be written passed as a parameter + * + * + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_high_dur_ch(unsigned char channel, +unsigned char high_dur) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + v_data_u8r = high_dur; + comres = p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_DUR_X_ADDR, &v_data_u8r, 1); + break; + case BMG160_Y_AXIS: + v_data_u8r = high_dur; + comres = p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_DUR_Y_ADDR, &v_data_u8r, 1); + break; + case BMG160_Z_AXIS: + v_data_u8r = high_dur; + comres = p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_HIGH_DUR_Z_ADDR, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Slow Offset Threshold + * + * + * + * + *\param unsigned char *offset_th : Address of offset_th + * Pointer to a variable passed as a parameter + + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_slow_offset_th( +unsigned char *offset_th) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_TH__REG, &v_data_u8r, 1); + *offset_th = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_SLOW_OFFSET_TH); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Slow Offset Threshold + * + * + * + * + *\param unsigned char offset_th: + * Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_slow_offset_th(unsigned char offset_th) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_TH__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_SLOW_OFFSET_TH, offset_th); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_TH__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Slow Offset Duration + * + * + * + * + *\param unsigned char *offset_dur : Address of offset_dur + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_slow_offset_dur( +unsigned char *offset_dur) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_DUR__REG, &v_data_u8r, 1); + *offset_dur = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_SLOW_OFFSET_DUR); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Slow Offset Duration + * + * + * + * + *\param unsigned char offset_dur: + * Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_slow_offset_dur( +unsigned char offset_dur) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_DUR__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_SLOW_OFFSET_DUR, offset_dur); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_DUR__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Slow Offset Enable channel + * X,Y,Z + * + * + * + * + *\param unsigned char channel,unsigned char *slow_offset + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * slow_offset : + * Enable -> 1 + * disable -> 0 + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_slow_offset_en_ch( +unsigned char channel, unsigned char *slow_offset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_EN_X__REG, &v_data_u8r, 1); + *slow_offset = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_SLOW_OFFSET_EN_X); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_EN_Y__REG, &v_data_u8r, 1); + *slow_offset = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_SLOW_OFFSET_EN_Y); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_EN_Z__REG, &v_data_u8r, 1); + *slow_offset = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_SLOW_OFFSET_EN_Z); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Slow Offset Enable channel + * X,Y,Z + * + * + * + * + *\param unsigned char channel,unsigned char *slow_offset + * channel : + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * slow_offset : + * Enable -> 1 + * disable -> 0 + * + * + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_slow_offset_en_ch( +unsigned char channel, unsigned char slow_offset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_EN_X__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_SLOW_OFFSET_EN_X, slow_offset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_EN_X__REG, &v_data_u8r, 1); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_EN_Y__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_SLOW_OFFSET_EN_Y, slow_offset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_EN_Y__REG, &v_data_u8r, 1); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_EN_Z__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_SLOW_OFFSET_EN_Z, + slow_offset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_SLOW_OFFSET_EN_Z__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Fast Offset WordLength and + * Auto Offset WordLength + * + * + * + * + *\param unsigned char channel,unsigned char *offset_wl + * channel : + * BMG160_AUTO_OFFSET_WL -> 0 + * BMG160_FAST_OFFSET_WL -> 1 + * *offset_wl : Address of high_bw + * Pointer to a variable passed as a + * parameter + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_offset_wl(unsigned char channel, +unsigned char *offset_wl) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_AUTO_OFFSET_WL: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_AUTO_OFFSET_WL__REG, &v_data_u8r, 1); + *offset_wl = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_AUTO_OFFSET_WL); + break; + case BMG160_FAST_OFFSET_WL: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_FAST_OFFSET_WL__REG, &v_data_u8r, 1); + *offset_wl = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_FAST_OFFSET_WL); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Fast Offset WordLength and + * Auto Offset WordLength + * + * + * + * + *\param unsigned char channel,unsigned char *offset_wl + * channel : + * BMG160_AUTO_OFFSET_WL -> 0 + * BMG160_FAST_OFFSET_WL -> 1 + * offset_wl : Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset_wl( +unsigned char channel, unsigned char offset_wl) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_AUTO_OFFSET_WL: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_AUTO_OFFSET_WL__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_AUTO_OFFSET_WL, offset_wl); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_AUTO_OFFSET_WL__REG, &v_data_u8r, 1); + break; + case BMG160_FAST_OFFSET_WL: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_FAST_OFFSET_WL__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_FAST_OFFSET_WL, offset_wl); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_FAST_OFFSET_WL__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to enable fast offset + * + * + * + * +* \param bmg160_enable_fast_offset + * Enable -> 1 + * Disable -> 0 + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_enable_fast_offset(void) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_FAST_OFFSET_EN__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_FAST_OFFSET_EN, 1); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_FAST_OFFSET_EN__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API read the Fast offset en status from the + * 0x32h of 0 to 2 bits. + * + * + * + * + *\param unsigned char *fast_offset + * Pointer to a variable passed as a parameter + * + * + * + * \return Communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_fast_offset_en_ch( +unsigned char *fast_offset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_FAST_OFFSET_EN_XYZ__REG, &v_data_u8r, 1); + *fast_offset = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_FAST_OFFSET_EN_XYZ); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API writes the Fast offset enable bit based + * on the Channel selection 0x32h of (0 to 2 bits) + * + * + * + * +* \param unsigned char channel,unsigned char fast_offset + * + * channel --> BMG160_X_AXIS,BMG160_Y_AXIS,BMG160_Z_AXIS + * fast_offset --> 0 - Disable + * 1 - Enable + * + * + * + * \return Communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_fast_offset_en_ch( +unsigned char channel, unsigned char fast_offset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (channel) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_FAST_OFFSET_EN_X__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_FAST_OFFSET_EN_X, fast_offset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_FAST_OFFSET_EN_X__REG, &v_data_u8r, 1); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_FAST_OFFSET_EN_Y__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_FAST_OFFSET_EN_Y, fast_offset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_FAST_OFFSET_EN_Y__REG, &v_data_u8r, 1); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_FAST_OFFSET_EN_Z__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_FAST_OFFSET_EN_Z, fast_offset); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_FAST_OFFSET_EN_Z__REG, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of nvm program + * remain + * + * + * + * + *\param unsigned char *nvm_remain + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_nvm_remain(unsigned char *nvm_remain) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_REMAIN__REG, &v_data_u8r, 1); + *nvm_remain = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_REMAIN); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of nvm load + * + * + * + * + *\param unsigned char nvm_load + * 1 -> load offset value from NVM + * 0 -> no action + * + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_nvm_load(unsigned char nvm_load) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD, nvm_load); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of nvmprogram + * ready + * + * + * + * + *\param unsigned char *nvm_rdy + * 1 -> program seq finished + * 0 -> program seq in progress + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_nvm_rdy(unsigned char *nvm_rdy) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_RDY__REG, &v_data_u8r, 1); + *nvm_rdy = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_RDY); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of nvm program + * trigger + * + * + * + * + *\param unsigned char trig + * 1 -> trig program seq (wo) + * 0 -> No Action + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_nvm_prog_trig(unsigned char prog_trig) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG, prog_trig); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of nvm program + * mode + * + * + * + * +* \param unsigned char *prog_mode : Address of *prog_mode + * 1 -> Enable program mode + * 0 -> Disable program mode + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_nvm_prog_mode(unsigned char *prog_mode) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__REG, &v_data_u8r, 1); + *prog_mode = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/****************************************************************************** + * Description: *//**brief This API is used to set the status of nvmprogram + * mode + * + * + * + * +* \param(unsigned char prog_mode) + * 1 -> Enable program mode + * 0 -> Disable program mode + * + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_nvm_prog_mode(unsigned char prog_mode) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE, prog_mode); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__REG, &v_data_u8r, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of i2c wdt + * + * + * + * + *\param unsigned char channel,unsigned char *prog_mode + * BMG160_I2C_WDT_SEL 1 + * BMG160_I2C_WDT_EN 0 + * *prog_mode : Address of prog_mode + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_i2c_wdt(unsigned char i2c_wdt, +unsigned char *prog_mode) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (i2c_wdt) { + case BMG160_I2C_WDT_EN: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_EN__REG, + &v_data_u8r, 1); + *prog_mode = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_EN); + break; + case BMG160_I2C_WDT_SEL: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SEL__REG, + &v_data_u8r, 1); + *prog_mode = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SEL); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of i2c wdt + * + * + * + * + *\param unsigned char channel,unsigned char prog_mode + * BMG160_I2C_WDT_SEL 1 + * BMG160_I2C_WDT_EN 0 + * prog_mode : Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_i2c_wdt(unsigned char i2c_wdt, +unsigned char prog_mode) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (i2c_wdt) { + case BMG160_I2C_WDT_EN: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_EN__REG, + &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_EN, prog_mode); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_EN__REG, + &v_data_u8r, 1); + break; + case BMG160_I2C_WDT_SEL: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SEL__REG, + &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SEL, prog_mode); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SEL__REG, + &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of spi3 + * + * + * + * +* \param unsigned char *spi3 : Address of spi3 + * Pointer to a variable passed as a parameter + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_spi3(unsigned char *spi3) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_BGW_SPI3_WDT_ADDR_SPI3__REG, &v_data_u8r, 1); + *spi3 = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_BGW_SPI3_WDT_ADDR_SPI3); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of spi3 + * + * + * + * + *\param unsigned char spi3 + * + * + * + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_spi3(unsigned char spi3) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_BGW_SPI3_WDT_ADDR_SPI3__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_BGW_SPI3_WDT_ADDR_SPI3, spi3); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_BGW_SPI3_WDT_ADDR_SPI3__REG, &v_data_u8r, 1); + } + return comres; +} +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_tag(unsigned char *tag) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_FIFO_CGF1_ADDR_TAG__REG, &v_data_u8r, 1); + *tag = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_FIFO_CGF1_ADDR_TAG); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of Tag + * + * + * + * + *\param unsigned char tag + * Enable -> 1 + * Disable -> 0 + * + * + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_tag(unsigned char tag) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (tag < C_BMG160_Two_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_FIFO_CGF1_ADDR_TAG__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_FIFO_CGF1_ADDR_TAG, tag); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_FIFO_CGF1_ADDR_TAG__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get Water Mark Level + * + * + * + * + *\param unsigned char *water_mark_level : Address of water_mark_level + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_watermarklevel( +unsigned char *water_mark_level) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_FIFO_CGF1_ADDR_WML__REG, &v_data_u8r, 1); + *water_mark_level = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_FIFO_CGF1_ADDR_WML); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set Water Mark Level + * + * + * + * + *\param unsigned char water_mark_level: + * Value to be written passed as a parameter + + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_watermarklevel( +unsigned char water_mark_level) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (water_mark_level < C_BMG160_OneTwentyEight_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_FIFO_CGF1_ADDR_WML__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_FIFO_CGF1_ADDR_WML, water_mark_level); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_FIFO_CGF1_ADDR_WML__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of offset + * + * + * + * + *\param unsigned char axis,unsigned char *offset + * axis -> + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * offset -> Any valid value + * + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_offset(unsigned char axis, +BMG160_S16 *offset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data1_u8r = C_BMG160_Zero_U8X; + unsigned char v_data2_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (axis) { + case BMG160_X_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP0_ADDR_OFFSET_X__REG, &v_data1_u8r, 1); + v_data1_u8r = BMG160_GET_BITSLICE(v_data1_u8r, + BMG160_TRIM_GP0_ADDR_OFFSET_X); + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_OFC1_ADDR_OFFSET_X__REG, &v_data2_u8r, 1); + v_data2_u8r = BMG160_GET_BITSLICE(v_data2_u8r, + BMG160_OFC1_ADDR_OFFSET_X); + v_data2_u8r = ((v_data2_u8r << + BMG160_SHIFT_2_POSITION) | v_data1_u8r); + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, BMG160_OFC2_ADDR, &v_data1_u8r, 1); + *offset = (BMG160_S16)((((BMG160_S16) + ((signed char)v_data1_u8r)) + << BMG160_SHIFT_4_POSITION) | (v_data2_u8r)); + break; + case BMG160_Y_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP0_ADDR_OFFSET_Y__REG, &v_data1_u8r, 1); + v_data1_u8r = BMG160_GET_BITSLICE(v_data1_u8r, + BMG160_TRIM_GP0_ADDR_OFFSET_Y); + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_OFC1_ADDR_OFFSET_Y__REG, &v_data2_u8r, 1); + v_data2_u8r = BMG160_GET_BITSLICE(v_data2_u8r, + BMG160_OFC1_ADDR_OFFSET_Y); + v_data2_u8r = ((v_data2_u8r << + BMG160_SHIFT_1_POSITION) | v_data1_u8r); + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_OFC3_ADDR, &v_data1_u8r, 1); + *offset = (BMG160_S16)((((BMG160_S16) + ((signed char)v_data1_u8r)) + << BMG160_SHIFT_4_POSITION) | (v_data2_u8r)); + break; + case BMG160_Z_AXIS: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP0_ADDR_OFFSET_Z__REG, &v_data1_u8r, 1); + v_data1_u8r = BMG160_GET_BITSLICE(v_data1_u8r, + BMG160_TRIM_GP0_ADDR_OFFSET_Z); + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_OFC1_ADDR_OFFSET_Z__REG, &v_data2_u8r, 1); + v_data2_u8r = BMG160_GET_BITSLICE(v_data2_u8r, + BMG160_OFC1_ADDR_OFFSET_Z); + v_data2_u8r = ((v_data2_u8r << BMG160_SHIFT_1_POSITION) + | v_data1_u8r); + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_OFC4_ADDR, &v_data1_u8r, 1); + *offset = (BMG160_S16)((((BMG160_S16) + ((signed char)v_data1_u8r)) + << BMG160_SHIFT_4_POSITION) | (v_data2_u8r)); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of offset + * + * + * + * + *\param unsigned char axis,unsigned char offset + * axis -> + * BMG160_X_AXIS -> 0 + * BMG160_Y_AXIS -> 1 + * BMG160_Z_AXIS -> 2 + * offset -> Any valid value + * + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset( +unsigned char axis, BMG160_S16 offset) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data1_u8r = C_BMG160_Zero_U8X; + unsigned char v_data2_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (axis) { + case BMG160_X_AXIS: + v_data1_u8r = ((signed char) (offset & 0x0FF0)) + >> BMG160_SHIFT_4_POSITION; + comres = p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_OFC2_ADDR, &v_data1_u8r, 1); + + v_data1_u8r = (unsigned char) (offset & 0x000C); + v_data2_u8r = BMG160_SET_BITSLICE(v_data2_u8r, + BMG160_OFC1_ADDR_OFFSET_X, v_data1_u8r); + comres += p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_OFC1_ADDR_OFFSET_X__REG, &v_data2_u8r, 1); + + v_data1_u8r = (unsigned char) (offset & 0x0003); + v_data2_u8r = BMG160_SET_BITSLICE(v_data2_u8r, + BMG160_TRIM_GP0_ADDR_OFFSET_X, v_data1_u8r); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP0_ADDR_OFFSET_X__REG, &v_data2_u8r, 1); + break; + case BMG160_Y_AXIS: + v_data1_u8r = ((signed char) (offset & 0x0FF0)) >> + BMG160_SHIFT_4_POSITION; + comres = p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_OFC3_ADDR, &v_data1_u8r, 1); + + v_data1_u8r = (unsigned char) (offset & 0x000E); + v_data2_u8r = BMG160_SET_BITSLICE(v_data2_u8r, + BMG160_OFC1_ADDR_OFFSET_Y, v_data1_u8r); + comres += p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_OFC1_ADDR_OFFSET_Y__REG, &v_data2_u8r, 1); + + v_data1_u8r = (unsigned char) (offset & 0x0001); + v_data2_u8r = BMG160_SET_BITSLICE(v_data2_u8r, + BMG160_TRIM_GP0_ADDR_OFFSET_Y, v_data1_u8r); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP0_ADDR_OFFSET_Y__REG, &v_data2_u8r, 1); + break; + case BMG160_Z_AXIS: + v_data1_u8r = ((signed char) (offset & 0x0FF0)) >> + BMG160_SHIFT_4_POSITION; + comres = p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_OFC4_ADDR, &v_data1_u8r, 1); + + v_data1_u8r = (unsigned char) (offset & 0x000E); + v_data2_u8r = BMG160_SET_BITSLICE(v_data2_u8r, + BMG160_OFC1_ADDR_OFFSET_Z, v_data1_u8r); + comres += p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_OFC1_ADDR_OFFSET_Z__REG, &v_data2_u8r, 1); + + v_data1_u8r = (unsigned char) (offset & 0x0001); + v_data2_u8r = BMG160_SET_BITSLICE(v_data2_u8r, + BMG160_TRIM_GP0_ADDR_OFFSET_Z, v_data1_u8r); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP0_ADDR_OFFSET_Z__REG, &v_data2_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of general + * purpose register + * + * + * + * + *\param unsigned char param,unsigned char *value + * param -> + * BMG160_GP0 0 + * BMG160_GP0 1 + * *value -> Address of high_bw + * Pointer to a variable passed as a parameter + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_gp(unsigned char param, +unsigned char *value) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (param) { + case BMG160_GP0: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP0_ADDR_GP0__REG, &v_data_u8r, 1); + *value = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_TRIM_GP0_ADDR_GP0); + break; + case BMG160_GP1: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP1_ADDR, &v_data_u8r, 1); + *value = v_data_u8r; + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of general + * purpose register + * + * + * + * + *\param unsigned char param,unsigned char value + * param -> + * BMG160_GP0 0 + * BMG160_GP0 1 + * value -> Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_gp(unsigned char param, +unsigned char value) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + switch (param) { + case BMG160_GP0: + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP0_ADDR_GP0__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_TRIM_GP0_ADDR_GP0, value); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP0_ADDR_GP0__REG, &v_data_u8r, 1); + break; + case BMG160_GP1: + v_data_u8r = value; + comres = p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_TRIM_GP1_ADDR, &v_data_u8r, 1); + break; + default: + comres = E_BMG160_OUT_OF_RANGE; + break; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads FIFI data from location 3Fh + * + * + * + * + * \param + * unsigned char *fifo_data : Address of FIFO data bits + * + * + * + * + * \return result of communication routines + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_FIFO_data_reg(unsigned char *fifo_data) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_FIFO_DATA_ADDR, &v_data_u8r, 1); + *fifo_data = v_data_u8r; + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads interrupt fifo status register byte from 0Eh + * + * + * + * + * \param + * unsigned char *fifo_status : Address of Fifo status register + * + * + * \return + * Result of bus communication function + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ + +BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifostatus_reg( +unsigned char *fifo_status) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_FIFO_STATUS_ADDR, fifo_status, 1); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads interrupt fifo status register byte from 0Eh + * + * + * + * + * \param + * unsigned char *fifo_framecount: Address of FIFO status register + * + * + * \return + * Result of bus communication function + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ + +BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_framecount( +unsigned char *fifo_framecount) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_FIFO_STATUS_FRAME_COUNTER__REG, &v_data_u8r, 1); + *fifo_framecount = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_FIFO_STATUS_FRAME_COUNTER); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief Reads interrupt fifo status register byte from 0Eh + * + * + * + * + * \param + * unsigned char *fifo_overrun: Address of FIFO status register + * + * + * \return + * Result of bus communication function + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ + +BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_overrun( +unsigned char *fifo_overrun) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_FIFO_STATUS_OVERRUN__REG, &v_data_u8r, 1); + *fifo_overrun = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_FIFO_STATUS_OVERRUN); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of fifo mode + * + * + * + * + *\param unsigned char *mode : Address of mode + * fifo_mode 0 --> Bypass + * 1 --> FIFO + * 2 --> Stream + * 3 --> Reserved + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_mode(unsigned char *mode) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_FIFO_CGF0_ADDR_MODE__REG, &v_data_u8r, 1); + *mode = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_FIFO_CGF0_ADDR_MODE); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used set to FIFO mode + * + * + * + * +* \param 0 --> BYPASS + * 1 --> FIFO + * 2 --> STREAM + * + * + * \return Communication Results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_mode(unsigned char mode) +{ + int comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (mode < C_BMG160_Four_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_FIFO_CGF0_ADDR_MODE__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_FIFO_CGF0_ADDR_MODE, mode); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_FIFO_CGF0_ADDR_MODE__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the status of fifo data + * sel + * + * + * + * + *\param unsigned char *data_sel : Address of data_sel + * data_sel --> [0:3] + * 0 --> X,Y and Z (DEFAULT) + * 1 --> X only + * 2 --> Y only + * 3 --> Z only + * + * + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_data_sel(unsigned char *data_sel) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_FIFO_CGF0_ADDR_DATA_SEL__REG, &v_data_u8r, 1); + *data_sel = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_FIFO_CGF0_ADDR_DATA_SEL); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the status of fifo data + * sel + * + * + * + * + *\param unsigned char data_sel + * data_sel --> [0:3] + * 0 --> X,Y and Z (DEFAULT) + * 1 --> X only + * 2 --> Y only + * 3 --> Z only + * + * + * + * \return communication results + * + * + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_data_sel(unsigned char data_sel) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (data_sel < C_BMG160_Four_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_FIFO_CGF0_ADDR_DATA_SEL__REG, &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_FIFO_CGF0_ADDR_DATA_SEL, data_sel); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_FIFO_CGF0_ADDR_DATA_SEL__REG, &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get the operating modes of the + * sensor + * + * + * + * + *\param unsigned char * mode : Address of mode + * 0 -> NORMAL + * 1 -> SUSPEND + * 2 -> DEEP SUSPEND + * 3 -> FAST POWERUP + * 4 -> ADVANCED POWERSAVING + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_mode(unsigned char *mode) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char data1 = C_BMG160_Zero_U8X; + unsigned char data2 = C_BMG160_Zero_U8X; + unsigned char data3 = C_BMG160_Zero_U8X; + if (p_bmg160 == C_BMG160_Zero_U8X) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_MODE_LPM1_ADDR, &data1, C_BMG160_One_U8X); + comres += p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR, &data2, C_BMG160_One_U8X); + data1 = (data1 & 0xA0) >> 5; + data3 = (data2 & 0x40) >> 6; + data2 = (data2 & 0x80) >> 7; + if (data3 == 0x01) { + *mode = BMG160_MODE_ADVANCEDPOWERSAVING; + } else { + if ((data1 == 0x00) && (data2 == 0x00)) { + *mode = BMG160_MODE_NORMAL; + } else { + if ((data1 == 0x01) || (data1 == 0x05)) { + *mode = BMG160_MODE_DEEPSUSPEND; + } else { + if ((data1 == 0x04) && + (data2 == 0x00)) { + *mode = BMG160_MODE_SUSPEND; + } else { + if ((data1 == 0x04) && + (data2 == 0x01)) + *mode = + BMG160_MODE_FASTPOWERUP; + } + } + } + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set the operating Modes of the + * sensor + * + * + * + * + *\param unsigned char Mode + * 0 -> NORMAL + * 1 -> DEEPSUSPEND + * 2 -> SUSPEND + * 3 -> Fast Powerup + * 4 -> Advance Powerup + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_mode(unsigned char mode) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char data1 = C_BMG160_Zero_U8X; + unsigned char data2 = C_BMG160_Zero_U8X; + unsigned char data3 = C_BMG160_Zero_U8X; + unsigned char v_autosleepduration = C_BMG160_Zero_U8X; + unsigned char v_bw_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == C_BMG160_Zero_U8X) { + return E_BMG160_NULL_PTR; + } else { + if (mode < C_BMG160_Five_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM1_ADDR, &data1, C_BMG160_One_U8X); + comres += p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR, &data2, C_BMG160_One_U8X); + switch (mode) { + case BMG160_MODE_NORMAL: + data1 = BMG160_SET_BITSLICE(data1, + BMG160_MODE_LPM1, C_BMG160_Zero_U8X); + data2 = BMG160_SET_BITSLICE(data2, + BMG160_MODE_LPM2_ADDR_FAST_POWERUP, + C_BMG160_Zero_U8X); + data3 = BMG160_SET_BITSLICE(data2, + BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING, + C_BMG160_Zero_U8X); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM1_ADDR, &data1, C_BMG160_One_U8X); + p_bmg160->delay_msec(1);/*A minimum delay of atleast + 450us is required for Multiple write.*/ + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR, &data3, C_BMG160_One_U8X); + break; + case BMG160_MODE_DEEPSUSPEND: + data1 = BMG160_SET_BITSLICE(data1, + BMG160_MODE_LPM1, C_BMG160_One_U8X); + data2 = BMG160_SET_BITSLICE(data2, + BMG160_MODE_LPM2_ADDR_FAST_POWERUP, + C_BMG160_Zero_U8X); + data3 = BMG160_SET_BITSLICE(data2, + BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING, + C_BMG160_Zero_U8X); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM1_ADDR, &data1, C_BMG160_One_U8X); + p_bmg160->delay_msec(1);/*A minimum delay of atleast + 450us is required for Multiple write.*/ + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR, &data3, C_BMG160_One_U8X); + break; + case BMG160_MODE_SUSPEND: + data1 = BMG160_SET_BITSLICE(data1, + BMG160_MODE_LPM1, C_BMG160_Four_U8X); + data2 = BMG160_SET_BITSLICE(data2, + BMG160_MODE_LPM2_ADDR_FAST_POWERUP, + C_BMG160_Zero_U8X); + data3 = BMG160_SET_BITSLICE(data2, + BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING, + C_BMG160_Zero_U8X); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM1_ADDR, &data1, C_BMG160_One_U8X); + p_bmg160->delay_msec(1);/*A minimum delay of atleast + 450us is required for Multiple write.*/ + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR, &data3, C_BMG160_One_U8X); + break; + case BMG160_MODE_FASTPOWERUP: + data1 = BMG160_SET_BITSLICE(data1, + BMG160_MODE_LPM1, C_BMG160_Four_U8X); + data2 = BMG160_SET_BITSLICE(data2, + BMG160_MODE_LPM2_ADDR_FAST_POWERUP, + C_BMG160_One_U8X); + data3 = BMG160_SET_BITSLICE(data2, + BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING, + C_BMG160_Zero_U8X); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM1_ADDR, &data1, C_BMG160_One_U8X); + p_bmg160->delay_msec(1);/*A minimum delay of atleast + 450us is required for Multiple write.*/ + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR, &data3, C_BMG160_One_U8X); + break; + case BMG160_MODE_ADVANCEDPOWERSAVING: + /* Configuring the proper settings for auto + sleep duration */ + bmg160_get_bw(&v_bw_u8r); + bmg160_get_autosleepdur(&v_autosleepduration); + bmg160_set_autosleepdur(v_autosleepduration, + v_bw_u8r); + comres += p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR, &data2, + C_BMG160_One_U8X); + /* Configuring the advanced power saving mode*/ + data1 = BMG160_SET_BITSLICE(data1, + BMG160_MODE_LPM1, C_BMG160_Zero_U8X); + data2 = BMG160_SET_BITSLICE(data2, + BMG160_MODE_LPM2_ADDR_FAST_POWERUP, + C_BMG160_Zero_U8X); + data3 = BMG160_SET_BITSLICE(data2, + BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING, + C_BMG160_One_U8X); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM1_ADDR, &data1, C_BMG160_One_U8X); + p_bmg160->delay_msec(1);/*A minimum delay of atleast + 450us is required for Multiple write.*/ + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR, &data3, C_BMG160_One_U8X); + break; + } + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to to do selftest to sensor + * sensor + * + * + * + * + *\param unsigned char *result + * + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_selftest(unsigned char *result) + { + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char data1 = C_BMG160_Zero_U8X; + unsigned char data2 = C_BMG160_Zero_U8X; + + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_SELF_TEST_ADDR, &data1, C_BMG160_One_U8X); + data2 = BMG160_GET_BITSLICE(data1, BMG160_SELF_TEST_ADDR_RATEOK); + data1 = BMG160_SET_BITSLICE(data1, BMG160_SELF_TEST_ADDR_TRIGBIST, + C_BMG160_One_U8X); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC(p_bmg160->dev_addr, + BMG160_SELF_TEST_ADDR_TRIGBIST__REG, &data1, C_BMG160_One_U8X); + + /* Waiting time to complete the selftest process */ + p_bmg160->delay_msec(10); + + /* Reading Selftest result bir bist_failure */ + comres += p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_SELF_TEST_ADDR_BISTFAIL__REG, &data1, C_BMG160_One_U8X); + data1 = BMG160_GET_BITSLICE(data1, BMG160_SELF_TEST_ADDR_BISTFAIL); + if ((data1 == 0x00) && (data2 == 0x01)) + *result = C_BMG160_SUCCESS; + else + *result = C_BMG160_FAILURE; + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get data auto sleep duration + * + * + * + * + *\param unsigned char *duration : Address of auto sleep duration + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_autosleepdur(unsigned char *duration) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR_AUTOSLEEPDUR__REG, &v_data_u8r, 1); + *duration = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MODE_LPM2_ADDR_AUTOSLEEPDUR); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set duration + * + * + * + * + *\param unsigned char duration: + * Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_autosleepdur(unsigned char duration, +unsigned char bandwith) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + unsigned char v_autosleepduration_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR_AUTOSLEEPDUR__REG, + &v_data_u8r, 1); + if (duration < C_BMG160_Eight_U8X) { + switch (bandwith) { + case C_BMG160_No_Filter_U8X: + if (duration > + C_BMG160_4ms_AutoSleepDur_U8X) + v_autosleepduration_u8r = + duration; + else + v_autosleepduration_u8r = + C_BMG160_4ms_AutoSleepDur_U8X; + break; + case C_BMG160_BW_230Hz_U8X: + if (duration > + C_BMG160_4ms_AutoSleepDur_U8X) + v_autosleepduration_u8r = + duration; + else + v_autosleepduration_u8r = + C_BMG160_4ms_AutoSleepDur_U8X; + break; + case C_BMG160_BW_116Hz_U8X: + if (duration > + C_BMG160_4ms_AutoSleepDur_U8X) + v_autosleepduration_u8r = + duration; + else + v_autosleepduration_u8r = + C_BMG160_4ms_AutoSleepDur_U8X; + break; + case C_BMG160_BW_47Hz_U8X: + if (duration > + C_BMG160_5ms_AutoSleepDur_U8X) + v_autosleepduration_u8r = + duration; + else + v_autosleepduration_u8r = + C_BMG160_5ms_AutoSleepDur_U8X; + break; + case C_BMG160_BW_23Hz_U8X: + if (duration > + C_BMG160_10ms_AutoSleepDur_U8X) + v_autosleepduration_u8r = + duration; + else + v_autosleepduration_u8r = + C_BMG160_10ms_AutoSleepDur_U8X; + break; + case C_BMG160_BW_12Hz_U8X: + if (duration > + C_BMG160_20ms_AutoSleepDur_U8X) + v_autosleepduration_u8r = + duration; + else + v_autosleepduration_u8r = + C_BMG160_20ms_AutoSleepDur_U8X; + break; + case C_BMG160_BW_64Hz_U8X: + if (duration > + C_BMG160_10ms_AutoSleepDur_U8X) + v_autosleepduration_u8r = + duration; + else + v_autosleepduration_u8r = + C_BMG160_10ms_AutoSleepDur_U8X; + break; + case C_BMG160_BW_32Hz_U8X: + if (duration > + C_BMG160_20ms_AutoSleepDur_U8X) + v_autosleepduration_u8r = + duration; + else + v_autosleepduration_u8r = + C_BMG160_20ms_AutoSleepDur_U8X; + break; + default: + if (duration > + C_BMG160_4ms_AutoSleepDur_U8X) + v_autosleepduration_u8r = + duration; + else + v_autosleepduration_u8r = + C_BMG160_4ms_AutoSleepDur_U8X; + break; + } + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MODE_LPM2_ADDR_AUTOSLEEPDUR, + v_autosleepduration_u8r); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODE_LPM2_ADDR_AUTOSLEEPDUR__REG, + &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to get data sleep duration + * + * + * + * + *\param unsigned char *duration : Address of sleep duration + * Pointer to a variable passed as a parameter + * + * + * + * \return + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_get_sleepdur(unsigned char *duration) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr, + BMG160_MODELPM1_ADDR_SLEEPDUR__REG, &v_data_u8r, 1); + *duration = BMG160_GET_BITSLICE(v_data_u8r, + BMG160_MODELPM1_ADDR_SLEEPDUR); + } + return comres; +} +/* Compiler Switch if applicable +#ifdef + +#endif +*/ +/***************************************************************************** + * Description: *//**brief This API is used to set duration + * + * + * + * + *\param unsigned char duration: + * Value to be written passed as a parameter + * + * + * + * \return communication results + * + * + *****************************************************************************/ +/* Scheduling: + * + * + * + * Usage guide: + * + * + * Remarks: + * + *****************************************************************************/ +BMG160_RETURN_FUNCTION_TYPE bmg160_set_sleepdur(unsigned char duration) +{ + BMG160_RETURN_FUNCTION_TYPE comres = C_BMG160_Zero_U8X; + unsigned char v_data_u8r = C_BMG160_Zero_U8X; + if (p_bmg160 == BMG160_NULL) { + return E_BMG160_NULL_PTR; + } else { + if (duration < C_BMG160_Eight_U8X) { + comres = p_bmg160->BMG160_BUS_READ_FUNC + (p_bmg160->dev_addr, + BMG160_MODELPM1_ADDR_SLEEPDUR__REG, + &v_data_u8r, 1); + v_data_u8r = BMG160_SET_BITSLICE(v_data_u8r, + BMG160_MODELPM1_ADDR_SLEEPDUR, duration); + comres += p_bmg160->BMG160_BUS_WRITE_FUNC + (p_bmg160->dev_addr, + BMG160_MODELPM1_ADDR_SLEEPDUR__REG, + &v_data_u8r, 1); + } else { + comres = E_BMG160_OUT_OF_RANGE; + } + } + return comres; +} + diff --git a/drivers/input/misc/bmg160.h b/drivers/input/misc/bmg160.h new file mode 100644 index 00000000000..062b21c8df9 --- /dev/null +++ b/drivers/input/misc/bmg160.h @@ -0,0 +1,4602 @@ +/*! + * @section LICENSE + * (C) Copyright 2011~2014 Bosch Sensortec GmbH All Rights Reserved + * + * This software program is licensed subject to the GNU General + * Public License (GPL).Version 2,June 1991, + * available at http://www.fsf.org/copyleft/gpl.html + * + * @filename bmg160.h + * @date 2013/11/25 + * @id "7bf4b97" + * @version 1.5 + * + * @brief Header of BMG160 API +*/ + +/* user defined code to be added here ... */ +#ifndef __BMG160_H__ +#define __BMG160_H__ + +#ifdef __KERNEL__ +#define BMG160_U16 unsigned short /* 16 bit achieved with short */ +#define BMG160_S16 signed short +#define BMG160_S32 signed int /* 32 bit achieved with int */ +#else +#include /*needed to test integer limits */ + + +/* find correct data type for signed/unsigned 16 bit variables \ +by checking max of unsigned variant */ +#if USHRT_MAX == 0xFFFF + /* 16 bit achieved with short */ + #define BMG160_U16 unsigned short + #define BMG160_S16 signed short +#elif UINT_MAX == 0xFFFF + /* 16 bit achieved with int */ + #define BMG160_U16 unsigned int + #define BMG160_S16 signed int +#else + #error BMG160_U16 and BMG160_S16 could not be + #error defined automatically, please do so manually +#endif + +/* find correct data type for signed 32 bit variables */ +#if INT_MAX == 0x7FFFFFFF + /* 32 bit achieved with int */ + #define BMG160_S32 signed int +#elif LONG_MAX == 0x7FFFFFFF + /* 32 bit achieved with long int */ + #define BMG160_S32 signed long int +#else + #error BMG160_S32 could not be + #error defined automatically, please do so manually +#endif +#endif + +/**\brief defines the calling parameter types of the BMG160_WR_FUNCTION */ +#define BMG160_BUS_WR_RETURN_TYPE char + +/**\brief links the order of parameters defined in +BMG160_BUS_WR_PARAM_TYPE to function calls used inside the API*/ +#define BMG160_BUS_WR_PARAM_TYPES unsigned char, unsigned char,\ +unsigned char *, unsigned char + +/**\brief links the order of parameters defined in +BMG160_BUS_WR_PARAM_TYPE to function calls used inside the API*/ +#define BMG160_BUS_WR_PARAM_ORDER(device_addr, register_addr,\ +register_data, wr_len) + +/* never change this line */ +#define BMG160_BUS_WRITE_FUNC(device_addr, register_addr,\ +register_data, wr_len) bus_write(device_addr, register_addr,\ +register_data, wr_len) +/**\brief defines the return parameter type of the BMG160_RD_FUNCTION +*/ +#define BMG160_BUS_RD_RETURN_TYPE char +/**\brief defines the calling parameter types of the BMG160_RD_FUNCTION +*/ +#define BMG160_BUS_RD_PARAM_TYPES unsigned char, unsigned char,\ +unsigned char *, unsigned char +/**\brief links the order of parameters defined in \ +BMG160_BUS_RD_PARAM_TYPE to function calls used inside the API +*/ +#define BMG160_BUS_RD_PARAM_ORDER (device_addr, register_addr,\ +register_data) +/* never change this line */ +#define BMG160_BUS_READ_FUNC(device_addr, register_addr,\ +register_data, rd_len)bus_read(device_addr, register_addr,\ +register_data, rd_len) +/**\brief defines the return parameter type of the BMG160_RD_FUNCTION +*/ +#define BMG160_BURST_RD_RETURN_TYPE char +/**\brief defines the calling parameter types of the BMG160_RD_FUNCTION +*/ +#define BMG160_BURST_RD_PARAM_TYPES unsigned char,\ +unsigned char, unsigned char *, signed int +/**\brief links the order of parameters defined in \ +BMG160_BURST_RD_PARAM_TYPE to function calls used inside the API +*/ +#define BMG160_BURST_RD_PARAM_ORDER (device_addr, register_addr,\ +register_data) +/* never change this line */ +#define BMG160_BURST_READ_FUNC(device_addr, register_addr,\ +register_data, rd_len)burst_read(device_addr, \ +register_addr, register_data, rd_len) +/**\brief defines the return parameter type of the BMG160_DELAY_FUNCTION +*/ +#define BMG160_DELAY_RETURN_TYPE void +/* never change this line */ +#define BMG160_DELAY_FUNC(delay_in_msec)\ + delay_func(delay_in_msec) +#define BMG160_RETURN_FUNCTION_TYPE int +/**< This refers BMG160 return type as char */ + +#define BMG160_I2C_ADDR1 0x68 +#define BMG160_I2C_ADDR BMG160_I2C_ADDR1 +#define BMG160_I2C_ADDR2 0x69 + + + +/*Define of registers*/ + +/* Hard Wired */ +#define BMG160_CHIP_ID_ADDR 0x00 +/**
> bitname##__POS) + +/* Set bit slice */ +#define BMG160_SET_BITSLICE(regvar, bitname, val)\ +((regvar&~bitname##__MSK)|((val< +#include +#include +#include +#else +#include +#include +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_HAS_EARLYSUSPEND +#include +#endif + +#include "bmg160.h" +#include + +/* sensor specific */ +#define SENSOR_NAME "bmg160" + +#define SENSOR_CHIP_ID_BMG (0x0f) +#define CHECK_CHIP_ID_TIME_MAX 5 + +#define BMG_REG_NAME(name) BMG160_##name +#define BMG_VAL_NAME(name) BMG160_##name +#define BMG_CALL_API(name) bmg160_##name + +#define BMG_I2C_WRITE_DELAY_TIME 1 + +/* generic */ +#define BMG_MAX_RETRY_I2C_XFER (3) +#define BMG_MAX_RETRY_WAKEUP (5) +#define BMG_MAX_RETRY_WAIT_DRDY (100) + +#define BMG_DELAY_MIN (1) +#define BMG_DELAY_DEFAULT (200) + +#define BMG_VALUE_MAX (32767) +#define BMG_VALUE_MIN (-32768) + +#define BYTES_PER_LINE (16) + +#define BMG_SELF_TEST 0 + +#define BMG_SOFT_RESET_VALUE 0xB6 + + +#ifdef BMG_USE_FIFO +#define MAX_FIFO_F_LEVEL 100 +#define MAX_FIFO_F_BYTES 8 +#define BMG160_FIFO_DAT_SEL_X 1 +#define BMG160_FIFO_DAT_SEL_Y 2 +#define BMG160_FIFO_DAT_SEL_Z 3 +#endif + +/*! + * @brief:BMI058 feature + * macro definition +*/ +#ifdef CONFIG_SENSORS_BMI058 +/*! BMI058 X AXIS definition*/ +#define BMI058_X_AXIS BMG160_Y_AXIS +/*! BMI058 Y AXIS definition*/ +#define BMI058_Y_AXIS BMG160_X_AXIS + +#define C_BMI058_One_U8X 1 +#define C_BMI058_Two_U8X 2 +#endif + +/*! Bosch sensor unknown place*/ +#define BOSCH_SENSOR_PLACE_UNKNOWN (-1) +/*! Bosch sensor remapping table size P0~P7*/ +#define MAX_AXIS_REMAP_TAB_SZ 8 + + +struct bosch_sensor_specific { + char *name; + /* 0 to 7 */ + int place; + int irq; + int (*irq_gpio_cfg)(void); +}; + + +/*! + * we use a typedef to hide the detail, + * because this type might be changed + */ +struct bosch_sensor_axis_remap { + /* src means which source will be mapped to target x, y, z axis */ + /* if an target OS axis is remapped from (-)x, + * src is 0, sign_* is (-)1 */ + /* if an target OS axis is remapped from (-)y, + * src is 1, sign_* is (-)1 */ + /* if an target OS axis is remapped from (-)z, + * src is 2, sign_* is (-)1 */ + int src_x:3; + int src_y:3; + int src_z:3; + + int sign_x:2; + int sign_y:2; + int sign_z:2; +}; + + +struct bosch_sensor_data { + union { + int16_t v[3]; + struct { + int16_t x; + int16_t y; + int16_t z; + }; + }; +}; + +struct bmg_client_data { + struct bmg160_t device; + struct i2c_client *client; + struct input_dev *input; + struct delayed_work work; + +#ifdef CONFIG_HAS_EARLYSUSPEND + struct early_suspend early_suspend_handler; +#endif + + atomic_t delay; + + struct bmg160_data_t value; + u8 enable:1; + unsigned int fifo_count; + unsigned char fifo_datasel; + + /* controls not only reg, but also workqueue */ + struct mutex mutex_op_mode; + struct mutex mutex_enable; + struct bosch_sensor_specific *bst_pd; +}; + +static struct i2c_client *bmg_client; +/* i2c operation for API */ +static void bmg_i2c_delay(BMG160_U16 msec); +static int bmg_i2c_read(struct i2c_client *client, u8 reg_addr, + u8 *data, u8 len); +static int bmg_i2c_write(struct i2c_client *client, u8 reg_addr, + u8 *data, u8 len); + +static void bmg_dump_reg(struct i2c_client *client); +static int bmg_check_chip_id(struct i2c_client *client); + +static int bmg_pre_suspend(struct i2c_client *client); +static int bmg_post_resume(struct i2c_client *client); + +#ifdef CONFIG_HAS_EARLYSUSPEND +static void bmg_early_suspend(struct early_suspend *handler); +static void bmg_late_resume(struct early_suspend *handler); +#endif +/*! +* BMG160 sensor remapping function +* need to give some parameter in BSP files first. +*/ +static const struct bosch_sensor_axis_remap + bst_axis_remap_tab_dft[MAX_AXIS_REMAP_TAB_SZ] = { + /* src_x src_y src_z sign_x sign_y sign_z */ + { 0, 1, 2, 1, 1, 1 }, /* P0 */ + { 1, 0, 2, 1, -1, 1 }, /* P1 */ + { 0, 1, 2, -1, -1, 1 }, /* P2 */ + { 1, 0, 2, -1, 1, 1 }, /* P3 */ + + { 0, 1, 2, -1, 1, -1 }, /* P4 */ + { 1, 0, 2, -1, -1, -1 }, /* P5 */ + { 0, 1, 2, 1, -1, -1 }, /* P6 */ + { 1, 0, 2, 1, 1, -1 }, /* P7 */ +}; + +static void bst_remap_sensor_data(struct bosch_sensor_data *data, + const struct bosch_sensor_axis_remap *remap) +{ + struct bosch_sensor_data tmp; + + tmp.x = data->v[remap->src_x] * remap->sign_x; + tmp.y = data->v[remap->src_y] * remap->sign_y; + tmp.z = data->v[remap->src_z] * remap->sign_z; + + memcpy(data, &tmp, sizeof(*data)); +} + +static void bst_remap_sensor_data_dft_tab(struct bosch_sensor_data *data, + int place) +{ +/* sensor with place 0 needs not to be remapped */ + if ((place <= 0) || (place >= MAX_AXIS_REMAP_TAB_SZ)) + return; + bst_remap_sensor_data(data, &bst_axis_remap_tab_dft[place]); +} + +static void bmg160_remap_sensor_data(struct bmg160_data_t *val, + struct bmg_client_data *client_data) +{ + struct bosch_sensor_data bsd; + int place; + + if ((NULL == client_data->bst_pd) || (BOSCH_SENSOR_PLACE_UNKNOWN + == client_data->bst_pd->place)) + place = BOSCH_SENSOR_PLACE_UNKNOWN; + else + place = client_data->bst_pd->place; + +#ifdef CONFIG_SENSORS_BMI058 +/*x,y need to be invesed becase of HW Register for BMI058*/ + bsd.y = val->datax; + bsd.x = val->datay; + bsd.z = val->dataz; +#else + bsd.x = val->datax; + bsd.y = val->datay; + bsd.z = val->dataz; +#endif + + bst_remap_sensor_data_dft_tab(&bsd, place); + + val->datax = bsd.x; + val->datay = bsd.y; + val->dataz = bsd.z; + +} + +static int bmg_check_chip_id(struct i2c_client *client) +{ + int err = -1; + u8 chip_id = 0; + u8 read_count = 0; + + while (read_count++ < CHECK_CHIP_ID_TIME_MAX) { + err = bmg_i2c_read(client, BMG_REG_NAME(CHIP_ID_ADDR), &chip_id, 1); + if(err) + return err; + + if ((chip_id & 0xff) != SENSOR_CHIP_ID_BMG) { + mdelay(1); + } else { + err = 0; + break; + } + } + return err; +} + +static void bmg_i2c_delay(BMG160_U16 msec) +{ + mdelay(msec); +} + +static void bmg_dump_reg(struct i2c_client *client) +{ + int i; + u8 dbg_buf[64]; + u8 dbg_buf_str[64 * 3 + 1] = ""; + + for (i = 0; i < BYTES_PER_LINE; i++) { + dbg_buf[i] = i; + snprintf(dbg_buf_str + i * 3, (sizeof(dbg_buf_str) - i * 3), "%02x%c", + dbg_buf[i], + (((i + 1) % BYTES_PER_LINE == 0) ? '\n' : ' ')); + } + dev_dbg(&client->dev, "%s\n", dbg_buf_str); + + bmg_i2c_read(client, BMG_REG_NAME(CHIP_ID_ADDR), dbg_buf, 64); + for (i = 0; i < 64; i++) { + snprintf(dbg_buf_str + i * 3, (sizeof(dbg_buf_str) - i * 3), "%02x%c", + dbg_buf[i], + (((i + 1) % BYTES_PER_LINE == 0) ? '\n' : ' ')); + } + dev_dbg(&client->dev, "%s\n", dbg_buf_str); +} + +/*i2c read routine for API*/ +static int bmg_i2c_read(struct i2c_client *client, u8 reg_addr, + u8 *data, u8 len) +{ + int retry; + + struct i2c_msg msg[] = { + { + .addr = client->addr, + .flags = 0, + .len = 1, + .buf = ®_addr, + }, + + { + .addr = client->addr, + .flags = I2C_M_RD, + .len = len, + .buf = data, + }, + }; + + for (retry = 0; retry < BMG_MAX_RETRY_I2C_XFER; retry++) { + if (i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg)) > 0) + break; + else + mdelay(BMG_I2C_WRITE_DELAY_TIME); + } + + if (BMG_MAX_RETRY_I2C_XFER <= retry) { + dev_err(&client->dev, "I2C xfer error"); + return -EIO; + } + + return 0; +} + +#ifdef BMG_USE_FIFO +static int bmg_i2c_burst_read(struct i2c_client *client, u8 reg_addr, + u8 *data, u16 len) +{ + int retry; + + struct i2c_msg msg[] = { + { + .addr = client->addr, + .flags = 0, + .len = 1, + .buf = ®_addr, + }, + + { + .addr = client->addr, + .flags = I2C_M_RD, + .len = len, + .buf = data, + }, + }; + + for (retry = 0; retry < BMG_MAX_RETRY_I2C_XFER; retry++) { + if (i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg)) > 0) + break; + else + mdelay(BMG_I2C_WRITE_DELAY_TIME); + } + + if (BMG_MAX_RETRY_I2C_XFER <= retry) { + dev_err(&client->dev, "I2C xfer error"); + return -EIO; + } + + return 0; +} +#endif + +/*i2c write routine for */ +static int bmg_i2c_write(struct i2c_client *client, u8 reg_addr, + u8 *data, u8 len) +{ + u8 buffer[2]; + int retry; + struct i2c_msg msg[] = { + { + .addr = client->addr, + .flags = 0, + .len = 2, + .buf = buffer, + }, + }; + + while (0 != len--) { + buffer[0] = reg_addr; + buffer[1] = *data; + for (retry = 0; retry < BMG_MAX_RETRY_I2C_XFER; retry++) { + if (i2c_transfer(client->adapter, msg, + ARRAY_SIZE(msg)) > 0) { + break; + } else { + mdelay(BMG_I2C_WRITE_DELAY_TIME); + } + } + if (BMG_MAX_RETRY_I2C_XFER <= retry) { + dev_err(&client->dev, "I2C xfer error"); + return -EIO; + } + reg_addr++; + data++; + } + + return 0; +} + +static int bmg_i2c_read_wrapper(u8 dev_addr, u8 reg_addr, u8 *data, u8 len) +{ + int err; + err = bmg_i2c_read(bmg_client, reg_addr, data, len); + return err; +} + +static int bmg_i2c_write_wrapper(u8 dev_addr, u8 reg_addr, u8 *data, u8 len) +{ + int err; + err = bmg_i2c_write(bmg_client, reg_addr, data, len); + return err; +} + + +static void bmg_work_func(struct work_struct *work) +{ + struct bmg_client_data *client_data = + container_of((struct delayed_work *)work, + struct bmg_client_data, work); + + unsigned long delay = + msecs_to_jiffies(atomic_read(&client_data->delay)); + struct bmg160_data_t gyro_data; + + BMG_CALL_API(get_dataXYZ)(&gyro_data); + /*remapping for BMG160 sensor*/ + bmg160_remap_sensor_data(&gyro_data, client_data); + + input_report_abs(client_data->input, ABS_X, gyro_data.datax); + input_report_abs(client_data->input, ABS_Y, gyro_data.datay); + input_report_abs(client_data->input, ABS_Z, gyro_data.dataz); + input_sync(client_data->input); + + schedule_delayed_work(&client_data->work, delay); +} + +static int bmg_set_soft_reset(struct i2c_client *client) +{ + int err = 0; + unsigned char data = BMG_SOFT_RESET_VALUE; + err = bmg_i2c_write(client, BMG160_BGW_SOFTRESET_ADDR, &data, 1); + return err; +} + +static ssize_t bmg_show_chip_id(struct device *dev, + struct device_attribute *attr, char *buf) +{ + return sprintf(buf, "%d\n", SENSOR_CHIP_ID_BMG); +} + +static ssize_t bmg_show_op_mode(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int ret; + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + u8 op_mode = 0xff; + + mutex_lock(&client_data->mutex_op_mode); + BMG_CALL_API(get_mode)(&op_mode); + mutex_unlock(&client_data->mutex_op_mode); + + ret = sprintf(buf, "%d\n", op_mode); + + return ret; +} + +static ssize_t bmg_store_op_mode(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + + long op_mode; + + err = kstrtoul(buf, 10, &op_mode); + if (err) + return err; + + mutex_lock(&client_data->mutex_op_mode); + + err = BMG_CALL_API(set_mode)(op_mode); + + mutex_unlock(&client_data->mutex_op_mode); + + if (err) + return err; + else + return count; +} + + + +static ssize_t bmg_show_value(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + int count; + + struct bmg160_data_t value_data; + BMG_CALL_API(get_dataXYZ)(&value_data); + /*BMG160 sensor raw data remapping*/ + bmg160_remap_sensor_data(&value_data, client_data); + + count = sprintf(buf, "%hd %hd %hd\n", + value_data.datax, + value_data.datay, + value_data.dataz); + + return count; +} + +static ssize_t bmg_show_range(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char range = 0; + BMG_CALL_API(get_range_reg)(&range); + err = sprintf(buf, "%d\n", range); + return err; +} + +static ssize_t bmg_store_range(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long range; + err = kstrtoul(buf, 10, &range); + if (err) + return err; + BMG_CALL_API(set_range_reg)(range); + return count; +} + +static ssize_t bmg_show_bandwidth(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char bandwidth = 0; + BMG_CALL_API(get_bw)(&bandwidth); + err = sprintf(buf, "%d\n", bandwidth); + return err; +} + +static ssize_t bmg_store_bandwidth(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long bandwidth; + err = kstrtoul(buf, 10, &bandwidth); + if (err) + return err; + BMG_CALL_API(set_bw)(bandwidth); + return count; +} + + +static ssize_t bmg_show_enable(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + int err; + + mutex_lock(&client_data->mutex_enable); + err = sprintf(buf, "%d\n", client_data->enable); + mutex_unlock(&client_data->mutex_enable); + return err; +} + +static ssize_t bmg_store_enable(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + data = data ? 1 : 0; + mutex_lock(&client_data->mutex_enable); + if (data != client_data->enable) { + if (data) { + schedule_delayed_work( + &client_data->work, + msecs_to_jiffies(atomic_read( + &client_data->delay))); + } else { + cancel_delayed_work_sync(&client_data->work); + } + + client_data->enable = data; + } + mutex_unlock(&client_data->mutex_enable); + + return count; +} + +static ssize_t bmg_show_delay(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + + return sprintf(buf, "%d\n", atomic_read(&client_data->delay)); + +} + +static ssize_t bmg_store_delay(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + if (data == 0) { + err = -EINVAL; + return err; + } + + if (data < BMG_DELAY_MIN) + data = BMG_DELAY_MIN; + + atomic_set(&client_data->delay, data); + + return count; +} + + +static ssize_t bmg_store_fastoffset_en(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long fastoffset_en; + err = kstrtoul(buf, 10, &fastoffset_en); + if (err) + return err; + if (fastoffset_en) { + +#ifdef CONFIG_SENSORS_BMI058 + BMG_CALL_API(set_fast_offset_en_ch)(BMI058_X_AXIS, 1); + BMG_CALL_API(set_fast_offset_en_ch)(BMI058_Y_AXIS, 1); +#else + BMG_CALL_API(set_fast_offset_en_ch)(BMG160_X_AXIS, 1); + BMG_CALL_API(set_fast_offset_en_ch)(BMG160_Y_AXIS, 1); +#endif + + BMG_CALL_API(set_fast_offset_en_ch)(BMG160_Z_AXIS, 1); + BMG_CALL_API(enable_fast_offset)(); + } + return count; +} + +static ssize_t bmg_store_slowoffset_en(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long slowoffset_en; + err = kstrtoul(buf, 10, &slowoffset_en); + if (err) + return err; + if (slowoffset_en) { + BMG_CALL_API(set_slow_offset_th)(3); + BMG_CALL_API(set_slow_offset_dur)(0); +#ifdef CONFIG_SENSORS_BMI058 + BMG_CALL_API(set_slow_offset_en_ch)(BMI058_X_AXIS, 1); + BMG_CALL_API(set_slow_offset_en_ch)(BMI058_Y_AXIS, 1); +#else + BMG_CALL_API(set_slow_offset_en_ch)(BMG160_X_AXIS, 1); + BMG_CALL_API(set_slow_offset_en_ch)(BMG160_Y_AXIS, 1); +#endif + BMG_CALL_API(set_slow_offset_en_ch)(BMG160_Z_AXIS, 1); + } else { +#ifdef CONFIG_SENSORS_BMI058 + BMG_CALL_API(set_slow_offset_en_ch)(BMI058_X_AXIS, 0); + BMG_CALL_API(set_slow_offset_en_ch)(BMI058_Y_AXIS, 0); +#else + BMG_CALL_API(set_slow_offset_en_ch)(BMG160_X_AXIS, 0); + BMG_CALL_API(set_slow_offset_en_ch)(BMG160_Y_AXIS, 0); +#endif + BMG_CALL_API(set_slow_offset_en_ch)(BMG160_Z_AXIS, 0); + } + + return count; +} + +static ssize_t bmg_show_selftest(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char selftest; + BMG_CALL_API(selftest)(&selftest); + err = sprintf(buf, "%d\n", selftest); + return err; +} + +static ssize_t bmg_show_sleepdur(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char sleepdur; + BMG_CALL_API(get_sleepdur)(&sleepdur); + err = sprintf(buf, "%d\n", sleepdur); + return err; +} + +static ssize_t bmg_store_sleepdur(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long sleepdur; + err = kstrtoul(buf, 10, &sleepdur); + if (err) + return err; + BMG_CALL_API(set_sleepdur)(sleepdur); + return count; +} + +static ssize_t bmg_show_autosleepdur(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char autosleepdur; + BMG_CALL_API(get_autosleepdur)(&autosleepdur); + err = sprintf(buf, "%d\n", autosleepdur); + return err; +} + +static ssize_t bmg_store_autosleepdur(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long autosleepdur; + unsigned char bandwidth; + err = kstrtoul(buf, 10, &autosleepdur); + if (err) + return err; + BMG_CALL_API(get_bw)(&bandwidth); + BMG_CALL_API(set_autosleepdur)(autosleepdur, bandwidth); + return count; +} + +static ssize_t bmg_place_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + + struct i2c_client *client = to_i2c_client(dev); + struct bmg_client_data *client_data = i2c_get_clientdata(client); + int place = BOSCH_SENSOR_PLACE_UNKNOWN; + + if (NULL != client_data->bst_pd) + place = client_data->bst_pd->place; + + return sprintf(buf, "%d\n", place); +} + +static ssize_t bmg_place_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int error; + struct i2c_client *client = to_i2c_client(dev); + struct bmg_client_data *client_data = i2c_get_clientdata(client); + + error = kstrtoul(buf, 10, &data); + if (error) + return error; + + if ((data >= 0) && (data <= 7)) + client_data->bst_pd->place = data; + + return count; +} + +#ifdef BMG_DEBUG +static ssize_t bmg_store_softreset(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long softreset; + err = kstrtoul(buf, 10, &softreset); + if (err) + return err; + BMG_CALL_API(set_soft_reset)(); + return count; +} + +static ssize_t bmg_show_dumpreg(struct device *dev, + struct device_attribute *attr, char *buf) +{ + size_t count = 0; + u8 reg[0x40]; + int i; + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + + for (i = 0; i < 0x40; i++) { + bmg_i2c_read(client_data->client, i, reg+i, 1); + + count += sprintf(&buf[count], "0x%x: 0x%x\n", i, reg[i]); + } + return count; +} +#endif + +#ifdef BMG_USE_FIFO +static ssize_t bmg_show_fifo_mode(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char fifo_mode; + BMG_CALL_API(get_fifo_mode)(&fifo_mode); + err = sprintf(buf, "%d\n", fifo_mode); + return err; +} + +static ssize_t bmg_store_fifo_mode(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long fifo_mode; + err = kstrtoul(buf, 10, &fifo_mode); + if (err) + return err; + BMG_CALL_API(set_fifo_mode)(fifo_mode); + return count; +} + +static ssize_t bmg_show_fifo_framecount(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char fifo_framecount; + BMG_CALL_API(get_fifo_framecount)(&fifo_framecount); + err = sprintf(buf, "%d\n", fifo_framecount); + return err; +} + +static ssize_t bmg_store_fifo_framecount(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int error; + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + error = kstrtoul(buf, 10, &data); + if (error) + return error; + client_data->fifo_count = (unsigned int) data; + + return count; +} + +static ssize_t bmg_show_fifo_overrun(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char fifo_overrun; + BMG_CALL_API(get_fifo_overrun)(&fifo_overrun); + err = sprintf(buf, "%d\n", fifo_overrun); + return err; +} + +/*! + * brief: bmg single axis data remaping + * @param[i] fifo_datasel fifo axis data select setting + * @param[i/o] remap_dir remapping direction + * @param[i] client_data to transfer sensor place + * + * @return none + */ +static void bmg_single_axis_remaping(unsigned char fifo_datasel, + unsigned char *remap_dir, struct bmg_client_data *client_data) +{ + if ((NULL == client_data->bst_pd) || + (BOSCH_SENSOR_PLACE_UNKNOWN + == client_data->bst_pd->place)) + return; + else { + signed char place = client_data->bst_pd->place; + /* sensor with place 0 needs not to be remapped */ + if ((place <= 0) || + (place >= MAX_AXIS_REMAP_TAB_SZ)) + return; + + if (fifo_datasel < 1 || fifo_datasel > 3) + return; + else { + switch (fifo_datasel) { + /*P2, P3, P4, P5 X axis(andorid) need to reverse*/ + case BMG160_FIFO_DAT_SEL_X: + if (-1 == bst_axis_remap_tab_dft[place].sign_x) + *remap_dir = 1; + else + *remap_dir = 0; + break; + /*P1, P2, P5, P6 Y axis(andorid) need to reverse*/ + case BMG160_FIFO_DAT_SEL_Y: + if (-1 == bst_axis_remap_tab_dft[place].sign_y) + *remap_dir = 1; + else + *remap_dir = 0; + break; + case BMG160_FIFO_DAT_SEL_Z: + /*P4, P5, P6, P7 Z axis(andorid) need to reverse*/ + if (-1 == bst_axis_remap_tab_dft[place].sign_z) + *remap_dir = 1; + else + *remap_dir = 0; + break; + default: + break; + } + } + } + + return; +} + +static ssize_t bmg_show_fifo_data_frame(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err, i, len; + signed char fifo_data_out[MAX_FIFO_F_LEVEL * MAX_FIFO_F_BYTES] = {0}; + unsigned char f_len = 0; + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + struct bmg160_data_t gyro_lsb; + unsigned char axis_dir_remap = 0; + s16 value; + + if (client_data->fifo_count == 0) + return -ENOENT; + + if (client_data->fifo_datasel) + /*Select one axis data output for every fifo frame*/ + f_len = 2; + else + /*Select X Y Z axis data output for every fifo frame*/ + f_len = 6; + + bmg_i2c_burst_read(client_data->client, BMG160_FIFO_DATA_ADDR, + fifo_data_out, client_data->fifo_count * f_len); + err = 0; + + if (f_len == 6) { + /* Select X Y Z axis data output for every frame */ + for (i = 0; i < client_data->fifo_count; i++) { + gyro_lsb.datax = + ((unsigned char)fifo_data_out[i * f_len + 1] << 8 + | (unsigned char)fifo_data_out[i * f_len + 0]); + + gyro_lsb.datay = + ((unsigned char)fifo_data_out[i * f_len + 3] << 8 + | (unsigned char)fifo_data_out[i * f_len + 2]); + + gyro_lsb.dataz = + ((unsigned char)fifo_data_out[i * f_len + 5] << 8 + | (unsigned char)fifo_data_out[i * f_len + 4]); + + bmg160_remap_sensor_data(&gyro_lsb, client_data); + len = sprintf(buf, "%d %d %d ", + gyro_lsb.datax, gyro_lsb.datay, gyro_lsb.dataz); + buf += len; + err += len; + } + } else { + /* single axis data output for every frame */ + bmg_single_axis_remaping(client_data->fifo_datasel, + &axis_dir_remap, client_data); + for (i = 0; i < client_data->fifo_count * f_len / 2; i++) { + value = ((unsigned char)fifo_data_out[2 * i + 1] << 8 | + (unsigned char)fifo_data_out[2 * i]); + if (axis_dir_remap) + value = 0 - value; + len = sprintf(buf, "%d ", value); + buf += len; + err += len; + } + } + + return err; +} + +/*! + * @brief show fifo_data_sel axis definition(Android definition, not sensor HW reg). + * 0--> x, y, z axis fifo data for every frame + * 1--> only x axis fifo data for every frame + * 2--> only y axis fifo data for every frame + * 3--> only z axis fifo data for every frame + */ +static ssize_t bmg_show_fifo_data_sel(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char fifo_data_sel; + struct i2c_client *client = to_i2c_client(dev); + struct bmg_client_data *client_data = i2c_get_clientdata(client); + signed char place = BOSCH_SENSOR_PLACE_UNKNOWN; + + BMG_CALL_API(get_fifo_data_sel)(&fifo_data_sel); + + /*remapping fifo_dat_sel if define virtual place in BSP files*/ + if ((NULL != client_data->bst_pd) && + (BOSCH_SENSOR_PLACE_UNKNOWN != client_data->bst_pd->place)) { + place = client_data->bst_pd->place; + /* sensor with place 0 needs not to be remapped */ + if ((place > 0) && (place < MAX_AXIS_REMAP_TAB_SZ)) { + if (BMG160_FIFO_DAT_SEL_X == fifo_data_sel) + /* BMG160_FIFO_DAT_SEL_X: 1, Y:2, Z:3; + *bst_axis_remap_tab_dft[i].src_x:0, y:1, z:2 + *so we need to +1*/ + fifo_data_sel = + bst_axis_remap_tab_dft[place].src_x + 1; + + else if (BMG160_FIFO_DAT_SEL_Y == fifo_data_sel) + fifo_data_sel = + bst_axis_remap_tab_dft[place].src_y + 1; + } + + } + + err = sprintf(buf, "%d\n", fifo_data_sel); + return err; +} + +/*! + * @brief store fifo_data_sel axis definition(Android definition, not sensor HW reg). + * 0--> x, y, z axis fifo data for every frame + * 1--> only x axis fifo data for every frame + * 2--> only y axis fifo data for every frame + * 3--> only z axis fifo data for every frame + */ +static ssize_t bmg_store_fifo_data_sel(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) + +{ + int err; + unsigned long fifo_data_sel; + + struct input_dev *input = to_input_dev(dev); + struct bmg_client_data *client_data = input_get_drvdata(input); + signed char place; + + err = kstrtoul(buf, 10, &fifo_data_sel); + if (err) + return err; + + /*save fifo_data_sel(android axis definition)*/ + client_data->fifo_datasel = (unsigned char) fifo_data_sel; + + /*remaping fifo_dat_sel if define virtual place*/ + if ((NULL != client_data->bst_pd) && + (BOSCH_SENSOR_PLACE_UNKNOWN != client_data->bst_pd->place)) { + place = client_data->bst_pd->place; + /* sensor with place 0 needs not to be remapped */ + if ((place > 0) && (place < MAX_AXIS_REMAP_TAB_SZ)) { + /*Need X Y axis revesal sensor place: P1, P3, P5, P7 */ + /* BMG160_FIFO_DAT_SEL_X: 1, Y:2, Z:3; + * but bst_axis_remap_tab_dft[i].src_x:0, y:1, z:2 + * so we need to +1*/ + if (BMG160_FIFO_DAT_SEL_X == fifo_data_sel) + fifo_data_sel = + bst_axis_remap_tab_dft[place].src_x + 1; + + else if (BMG160_FIFO_DAT_SEL_Y == fifo_data_sel) + fifo_data_sel = + bst_axis_remap_tab_dft[place].src_y + 1; + } + } + + if (BMG_CALL_API(set_fifo_data_sel)(fifo_data_sel) < 0) + return -EINVAL; + + return count; +} + +static ssize_t bmg_show_fifo_tag(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char fifo_tag; + BMG_CALL_API(get_fifo_tag)(&fifo_tag); + err = sprintf(buf, "%d\n", fifo_tag); + return err; +} + +static ssize_t bmg_store_fifo_tag(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) + +{ + int err; + unsigned long fifo_tag; + err = kstrtoul(buf, 10, &fifo_tag); + if (err) + return err; + BMG_CALL_API(set_fifo_tag)(fifo_tag); + return count; +} +#endif + +static DEVICE_ATTR(chip_id, S_IRUGO, + bmg_show_chip_id, NULL); +static DEVICE_ATTR(op_mode, S_IRUGO|S_IWUSR, + bmg_show_op_mode, bmg_store_op_mode); +static DEVICE_ATTR(value, S_IRUGO, + bmg_show_value, NULL); +static DEVICE_ATTR(range, S_IRUGO|S_IWUSR, + bmg_show_range, bmg_store_range); +static DEVICE_ATTR(bandwidth, S_IRUGO|S_IWUSR, + bmg_show_bandwidth, bmg_store_bandwidth); +static DEVICE_ATTR(enable, S_IRUGO|S_IWUSR, + bmg_show_enable, bmg_store_enable); +static DEVICE_ATTR(delay, S_IRUGO|S_IWUSR, + bmg_show_delay, bmg_store_delay); +static DEVICE_ATTR(fastoffset_en, S_IRUGO|S_IWUSR, + NULL, bmg_store_fastoffset_en); +static DEVICE_ATTR(slowoffset_en, S_IRUGO|S_IWUSR, + NULL, bmg_store_slowoffset_en); +static DEVICE_ATTR(selftest, S_IRUGO, + bmg_show_selftest, NULL); +static DEVICE_ATTR(sleepdur, S_IRUGO|S_IWUSR, + bmg_show_sleepdur, bmg_store_sleepdur); +static DEVICE_ATTR(autosleepdur, S_IRUGO|S_IWUSR, + bmg_show_autosleepdur, bmg_store_autosleepdur); +static DEVICE_ATTR(place, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmg_place_show, bmg_place_store); +#ifdef BMG_DEBUG +static DEVICE_ATTR(softreset, S_IRUGO|S_IWUSR, + NULL, bmg_store_softreset); +static DEVICE_ATTR(regdump, S_IRUGO, + bmg_show_dumpreg, NULL); +#endif +#ifdef BMG_USE_FIFO +static DEVICE_ATTR(fifo_mode, S_IRUGO|S_IWUSR, + bmg_show_fifo_mode, bmg_store_fifo_mode); +static DEVICE_ATTR(fifo_framecount, S_IRUGO|S_IWUSR, + bmg_show_fifo_framecount, bmg_store_fifo_framecount); +static DEVICE_ATTR(fifo_overrun, S_IRUGO|S_IWUSR, + bmg_show_fifo_overrun, NULL); +static DEVICE_ATTR(fifo_data_frame, S_IRUGO|S_IWUSR, + bmg_show_fifo_data_frame, NULL); +static DEVICE_ATTR(fifo_data_sel, S_IRUGO|S_IWUSR, + bmg_show_fifo_data_sel, bmg_store_fifo_data_sel); +static DEVICE_ATTR(fifo_tag, S_IRUGO|S_IWUSR, + bmg_show_fifo_tag, bmg_store_fifo_tag); +#endif + +static struct attribute *bmg_attributes[] = { + &dev_attr_chip_id.attr, + &dev_attr_op_mode.attr, + &dev_attr_value.attr, + &dev_attr_range.attr, + &dev_attr_bandwidth.attr, + &dev_attr_enable.attr, + &dev_attr_delay.attr, + &dev_attr_fastoffset_en.attr, + &dev_attr_slowoffset_en.attr, + &dev_attr_selftest.attr, + &dev_attr_sleepdur.attr, + &dev_attr_autosleepdur.attr, + &dev_attr_place.attr, +#ifdef BMG_DEBUG + &dev_attr_softreset.attr, + &dev_attr_regdump.attr, +#endif +#ifdef BMG_USE_FIFO + &dev_attr_fifo_mode.attr, + &dev_attr_fifo_framecount.attr, + &dev_attr_fifo_overrun.attr, + &dev_attr_fifo_data_frame.attr, + &dev_attr_fifo_data_sel.attr, + &dev_attr_fifo_tag.attr, +#endif + NULL +}; + +static struct attribute_group bmg_attribute_group = { + .attrs = bmg_attributes +}; + + +static int bmg_input_init(struct bmg_client_data *client_data) +{ + struct input_dev *dev; + int err = 0; + + dev = input_allocate_device(); + if (NULL == dev) + return -ENOMEM; + + dev->name = SENSOR_NAME; + dev->id.bustype = BUS_I2C; + + input_set_capability(dev, EV_ABS, ABS_MISC); + input_set_abs_params(dev, ABS_X, BMG_VALUE_MIN, BMG_VALUE_MAX, 0, 0); + input_set_abs_params(dev, ABS_Y, BMG_VALUE_MIN, BMG_VALUE_MAX, 0, 0); + input_set_abs_params(dev, ABS_Z, BMG_VALUE_MIN, BMG_VALUE_MAX, 0, 0); + input_set_drvdata(dev, client_data); + + err = input_register_device(dev); + if (err < 0) { + input_free_device(dev); + return err; + } + client_data->input = dev; + + return 0; +} + +static void bmg_input_destroy(struct bmg_client_data *client_data) +{ + struct input_dev *dev = client_data->input; + + input_unregister_device(dev); + input_free_device(dev); +} + +#ifdef CONFIG_OF +static int bmg_parse_dt(struct device *dev, + struct bosch_sensor_specific *bst_pd) +{ + struct device_node *np = dev->of_node; + u32 temp_val; + int rc; + + rc = of_property_read_u32(np, "bosch,place", &temp_val); + if (rc && (rc != -EINVAL)) { + dev_err(dev, "Unable to read sensor place paramater\n"); + return rc; + } + if (temp_val > 7 || temp_val < 0) { + dev_err(dev, "Invalid place parameter, use default value 0\n"); + bst_pd->place = 0; + } else { + bst_pd->place = temp_val; + } + + return 0; +} +#else +static int bmg_parse_dt(struct device *dev, + struct bosch_sensor_specific *bst_pd) +{ + return -EINVAL; +} +#endif + +static int sensor_set_power(struct i2c_client *client, int enable) +{ + int err = 0; + struct regulator *vdd_reg = NULL; + struct regulator *vio_reg = NULL; + + + vdd_reg = devm_regulator_get(&client->dev, "vdd"); + if (IS_ERR_OR_NULL(vdd_reg)) { + dev_err(&client->dev, "Error of setting voltage\n"); + return PTR_ERR(vdd_reg); + } + regulator_set_voltage(vdd_reg, 2850000, 2850000); + + vio_reg = devm_regulator_get(&client->dev, "vio"); + if (IS_ERR_OR_NULL(vio_reg)) { + dev_err(&client->dev, "Error of setting voltage\n"); + return PTR_ERR(vio_reg); + } + regulator_set_voltage(vio_reg, 1800000, 1800000); + + if (enable) { + err = regulator_enable(vdd_reg); + err = regulator_enable(vio_reg); + } else { + regulator_disable(vdd_reg); + regulator_disable(vio_reg); + } + return 0; +} + +static int bmg_probe(struct i2c_client *client, const struct i2c_device_id *id) +{ + int err = 0; + struct bmg_client_data *client_data = NULL; + + + /* power on */ + sensor_set_power(client,1); + + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { + dev_err(&client->dev, "i2c_check_functionality error!"); + err = -EIO; + goto exit_err_clean; + } + + if (NULL == bmg_client) { + bmg_client = client; + } else { + dev_err(&client->dev, + "this driver does not support multiple clients"); + err = -EINVAL; + goto exit_err_clean; + } + + /* do soft reset */ + mdelay(5); + + err = bmg_set_soft_reset(client); + + if (err < 0) { + dev_err(&client->dev, + "erro soft reset!\n"); + err = -EINVAL; + goto exit_err_clean; + } + mdelay(30); + + /* check chip id */ + err = bmg_check_chip_id(client); + if (err) { + dev_err(&client->dev, + "Bosch Sensortec Device not found, chip id mismatch"); + goto exit_err_clean; + } + + client_data = kzalloc(sizeof(struct bmg_client_data), GFP_KERNEL); + if (NULL == client_data) { + dev_err(&client->dev, "no memory available"); + err = -ENOMEM; + goto exit_err_clean; + } + + i2c_set_clientdata(client, client_data); + client_data->client = client; + + mutex_init(&client_data->mutex_op_mode); + mutex_init(&client_data->mutex_enable); + + /* input device init */ + err = bmg_input_init(client_data); + if (err < 0) + goto exit_err_clean; + + /* sysfs node creation */ + err = sysfs_create_group(&client_data->input->dev.kobj, + &bmg_attribute_group); + + if (err < 0) + goto exit_err_sysfs; + + if (client->dev.of_node) { + client_data->bst_pd = kzalloc(sizeof(*client_data->bst_pd), + GFP_KERNEL); + if (!client_data->bst_pd) { + dev_err(&client->dev, "Failed to allcated memory\n"); + err = -ENOMEM; + goto exit_err_sysfs; + } + err = bmg_parse_dt(&client->dev, client_data->bst_pd); + if (err) { + dev_err(&client->dev, "Failed to parse device tree\n"); + err = -EINVAL; + goto bst_pd_free_exit; + } + } else { + if (NULL != client->dev.platform_data) { + client_data->bst_pd = kzalloc(sizeof(*client_data->bst_pd), + GFP_KERNEL); + + if (NULL != client_data->bst_pd) { + memcpy(client_data->bst_pd, client->dev.platform_data, + sizeof(*client_data->bst_pd)); + dev_notice(&client->dev, "%s sensor driver set place: p%d", + SENSOR_NAME, + client_data->bst_pd->place); + } + } + } + + /* workqueue init */ + INIT_DELAYED_WORK(&client_data->work, bmg_work_func); + atomic_set(&client_data->delay, BMG_DELAY_DEFAULT); + + /* h/w init */ + client_data->device.bus_read = bmg_i2c_read_wrapper; + client_data->device.bus_write = bmg_i2c_write_wrapper; + client_data->device.delay_msec = bmg_i2c_delay; + BMG_CALL_API(init)(&client_data->device); + + bmg_dump_reg(client); + + client_data->enable = 0; + client_data->fifo_datasel = 0; + client_data->fifo_count = 0; + + /* now it's power on which is considered as resuming from suspend */ + err = BMG_CALL_API(set_mode)( + BMG_VAL_NAME(MODE_SUSPEND)); + + if (err < 0) + goto bst_pd_free_exit; + + +#ifdef CONFIG_HAS_EARLYSUSPEND + client_data->early_suspend_handler.suspend = bmg_early_suspend; + client_data->early_suspend_handler.resume = bmg_late_resume; + register_early_suspend(&client_data->early_suspend_handler); +#endif + + dev_notice(&client->dev, "sensor %s probed successfully", SENSOR_NAME); + + dev_dbg(&client->dev, + "i2c_client: %p client_data: %p i2c_device: %p input: %p", + client, client_data, &client->dev, client_data->input); + + return 0; + +bst_pd_free_exit: + if ((NULL != client_data) && (NULL != client_data->bst_pd)) { + kfree(client_data->bst_pd); + client_data->bst_pd = NULL; + } +exit_err_sysfs: + if (err) + bmg_input_destroy(client_data); + +exit_err_clean: + if (err) { + if (client_data != NULL) { + kfree(client_data); + client_data = NULL; + } + + bmg_client = NULL; + } + + return err; +} + +static int bmg_pre_suspend(struct i2c_client *client) +{ + int err = 0; + struct bmg_client_data *client_data = + (struct bmg_client_data *)i2c_get_clientdata(client); + dev_info(&client->dev, "function entrance"); + + mutex_lock(&client_data->mutex_enable); + if (client_data->enable) { + cancel_delayed_work_sync(&client_data->work); + dev_info(&client->dev, "cancel work"); + } + mutex_unlock(&client_data->mutex_enable); + + return err; +} + +static int bmg_post_resume(struct i2c_client *client) +{ + int err = 0; + struct bmg_client_data *client_data = + (struct bmg_client_data *)i2c_get_clientdata(client); + + dev_info(&client->dev, "function entrance"); + mutex_lock(&client_data->mutex_enable); + if (client_data->enable) { + schedule_delayed_work(&client_data->work, + msecs_to_jiffies( + atomic_read(&client_data->delay))); + } + mutex_unlock(&client_data->mutex_enable); + + return err; +} + +#ifdef CONFIG_HAS_EARLYSUSPEND +static void bmg_early_suspend(struct early_suspend *handler) +{ + int err = 0; + struct bmg_client_data *client_data = + (struct bmg_client_data *)container_of(handler, + struct bmg_client_data, early_suspend_handler); + struct i2c_client *client = client_data->client; + + dev_info(&client->dev, "function entrance"); + + mutex_lock(&client_data->mutex_op_mode); + if (client_data->enable) { + err = bmg_pre_suspend(client); + err = BMG_CALL_API(set_mode)( + BMG_VAL_NAME(MODE_SUSPEND)); + } + mutex_unlock(&client_data->mutex_op_mode); +} + +static void bmg_late_resume(struct early_suspend *handler) +{ + + int err = 0; + struct bmg_client_data *client_data = + (struct bmg_client_data *)container_of(handler, + struct bmg_client_data, early_suspend_handler); + struct i2c_client *client = client_data->client; + + dev_info(&client->dev, "function entrance"); + + mutex_lock(&client_data->mutex_op_mode); + + if (client_data->enable) + err = BMG_CALL_API(set_mode)(BMG_VAL_NAME(MODE_NORMAL)); + + /* post resume operation */ + bmg_post_resume(client); + + mutex_unlock(&client_data->mutex_op_mode); +} +#else +static int bmg_suspend(struct i2c_client *client, pm_message_t mesg) +{ + int err = 0; + struct bmg_client_data *client_data = + (struct bmg_client_data *)i2c_get_clientdata(client); + + + mutex_lock(&client_data->mutex_op_mode); + if (client_data->enable) { + err = bmg_pre_suspend(client); + err = BMG_CALL_API(set_mode)( + BMG_VAL_NAME(MODE_SUSPEND)); + } + mutex_unlock(&client_data->mutex_op_mode); + + return err; +} + +static int bmg_resume(struct i2c_client *client) +{ + + int err = 0; + struct bmg_client_data *client_data = + (struct bmg_client_data *)i2c_get_clientdata(client); + + mutex_lock(&client_data->mutex_op_mode); + + if (client_data->enable) + err = BMG_CALL_API(set_mode)(BMG_VAL_NAME(MODE_NORMAL)); + + /* post resume operation */ + bmg_post_resume(client); + + mutex_unlock(&client_data->mutex_op_mode); + return err; +} +#endif + +void bmg_shutdown(struct i2c_client *client) +{ + struct bmg_client_data *client_data = + (struct bmg_client_data *)i2c_get_clientdata(client); + + mutex_lock(&client_data->mutex_op_mode); + BMG_CALL_API(set_mode)( + BMG_VAL_NAME(MODE_DEEPSUSPEND)); + mutex_unlock(&client_data->mutex_op_mode); +} + +static int bmg_remove(struct i2c_client *client) +{ + int err = 0; + u8 op_mode; + + struct bmg_client_data *client_data = + (struct bmg_client_data *)i2c_get_clientdata(client); + + if (NULL != client_data) { +#ifdef CONFIG_HAS_EARLYSUSPEND + unregister_early_suspend(&client_data->early_suspend_handler); +#endif + mutex_lock(&client_data->mutex_op_mode); + BMG_CALL_API(get_mode)(&op_mode); + if (BMG_VAL_NAME(MODE_NORMAL) == op_mode) { + cancel_delayed_work_sync(&client_data->work); + dev_info(&client->dev, "cancel work"); + } + mutex_unlock(&client_data->mutex_op_mode); + + err = BMG_CALL_API(set_mode)( + BMG_VAL_NAME(MODE_SUSPEND)); + mdelay(BMG_I2C_WRITE_DELAY_TIME); + + sysfs_remove_group(&client_data->input->dev.kobj, + &bmg_attribute_group); + bmg_input_destroy(client_data); + kfree(client_data); + + bmg_client = NULL; + } + + return err; +} + +static const struct i2c_device_id bmg_id[] = { + { SENSOR_NAME, 0 }, + { } +}; + +MODULE_DEVICE_TABLE(i2c, bmg_id); + +static struct i2c_driver bmg_driver = { + .driver = { + .owner = THIS_MODULE, + .name = SENSOR_NAME, + }, + .class = I2C_CLASS_HWMON, + .id_table = bmg_id, + .probe = bmg_probe, + .remove = bmg_remove, + .shutdown = bmg_shutdown, +#ifndef CONFIG_HAS_EARLYSUSPEND + .suspend = bmg_suspend, + .resume = bmg_resume, +#endif +}; + +static int __init BMG_init(void) +{ + return i2c_add_driver(&bmg_driver); +} + +static void __exit BMG_exit(void) +{ + i2c_del_driver(&bmg_driver); +} + +MODULE_AUTHOR("contact@bosch-sensortec.com>"); +MODULE_DESCRIPTION("BMG GYROSCOPE SENSOR DRIVER"); +MODULE_LICENSE("GPL v2"); + +module_init(BMG_init); +module_exit(BMG_exit); diff --git a/drivers/input/misc/bmi160.c b/drivers/input/misc/bmi160.c new file mode 100644 index 00000000000..286b975a2a1 --- /dev/null +++ b/drivers/input/misc/bmi160.c @@ -0,0 +1,18752 @@ +/* +* @section LICENSE + * (C) Copyright 2011~2016 Bosch Sensortec GmbH All Rights Reserved + * + * This software program is licensed subject to the GNU General + * Public License (GPL).Version 2,June 1991, + * available at http://www.fsf.org/copyleft/gpl.html +* +* @filename bmi160.c +* @Date: 2015/04/02 +* @id "2e89046" +* @Revision: 2.0.9 $ +* +* Usage: Sensor Driver for BMI160 sensor +* +**************************************************************************** +* \section Disclaimer +* +* Common: +* Bosch Sensortec products are developed for the consumer goods industry. +* They may only be used within the parameters of the respective valid +* product data sheet. Bosch Sensortec products are provided with the +* express understanding that there is no warranty of fitness for a +* particular purpose.They are not fit for use in life-sustaining, +* safety or security sensitive systems or any system or device +* that may lead to bodily harm or property damage if the system +* or device malfunctions. In addition,Bosch Sensortec products are +* not fit for use in products which interact with motor vehicle systems. +* The resale and or use of products are at the purchasers own risk and +* his own responsibility. The examination of fitness for the intended use +* is the sole responsibility of the Purchaser. +* +* The purchaser shall indemnify Bosch Sensortec from all third party +* claims, including any claims for incidental, or consequential damages, +* arising from any product use not covered by the parameters of +* the respective valid product data sheet or not approved by +* Bosch Sensortec and reimburse Bosch Sensortec for all costs in +* connection with such claims. +* +* The purchaser must monitor the market for the purchased products, +* particularly with regard to product safety and inform Bosch Sensortec +* without delay of all security relevant incidents. +* +* Engineering Samples are marked with an asterisk (*) or (e). +* Samples may vary from the valid technical specifications of the product +* series. They are therefore not intended or fit for resale to third +* parties or for use in end products. Their sole purpose is internal +* client testing. The testing of an engineering sample may in no way +* replace the testing of a product series. Bosch Sensortec assumes +* no liability for the use of engineering samples. +* By accepting the engineering samples, the Purchaser agrees to indemnify +* Bosch Sensortec from all claims arising from the use of engineering +* samples. +* +* Special: +* This software module (hereinafter called "Software") and any information +* on application-sheets (hereinafter called "Information") is provided +* free of charge for the sole purpose to support your application work. +* The Software and Information is subject to the following +* terms and conditions: +* +* The Software is specifically designed for the exclusive use for +* Bosch Sensortec products by personnel who have special experience +* and training. Do not use this Software if you do not have the +* proper experience or training. +* +* This Software package is provided `` as is `` and without any expressed +* or implied warranties,including without limitation, the implied warranties +* of merchantability and fitness for a particular purpose. +* +* Bosch Sensortec and their representatives and agents deny any liability +* for the functional impairment +* of this Software in terms of fitness, performance and safety. +* Bosch Sensortec and their representatives and agents shall not be liable +* for any direct or indirect damages or injury, except as +* otherwise stipulated in mandatory applicable law. +* +* The Information provided is believed to be accurate and reliable. +* Bosch Sensortec assumes no responsibility for the consequences of use +* of such Information nor for any infringement of patents or +* other rights of third parties which may result from its use. +* No license is granted by implication or otherwise under any patent or +* patent rights of Bosch. Specifications mentioned in the Information are +* subject to change without notice. +**************************************************************************/ +/*! file + brief */ +#include "bmi160.h" +#include + +/* user defined code to be added here ... */ +struct bmi160_t *p_bmi160; +/* used for reading the mag trim values for compensation*/ +struct trim_data_t mag_trim; +/* the following variable used for avoiding the selecting of auto mode +when it is running in the manual mode of BMM150 mag interface*/ +u8 V_bmm150_maual_auto_condition_u8 = BMI160_INIT_VALUE; +/* used for reading the AKM compensating data */ +struct bst_akm_sensitivity_data_t akm_asa_data; +/* Assign the fifo time */ +u32 V_fifo_time_U32 = BMI160_INIT_VALUE; + +/* FIFO data read for 1024 bytes of data */ +u8 v_fifo_data_u8[FIFO_FRAME] = {BMI160_INIT_VALUE}; +/* YAMAHA-YAS532*/ +/* value of coeff*/ +static const int yas532_version_ac_coef[] = {YAS532_VERSION_AC_COEF_X, +YAS532_VERSION_AC_COEF_Y1, YAS532_VERSION_AC_COEF_Y2}; +/* used for reading the yas532 calibration data*/ +struct yas532_t yas532_data; +/* used for reading the yas537 calibration data*/ +struct yas537_t yas537_data; +/*! + * @brief + * This function is used for initialize + * bus read and bus write functions + * assign the chip id and device address + * chip id is read in the register 0x00 bit from 0 to 7 + * + * @param bmi160 : structure pointer + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * @note + * While changing the parameter of the bmi160_t + * consider the following point: + * Changing the reference value of the parameter + * will changes the local copy or local reference + * make sure your changes will not + * affect the reference value of the parameter + * (Better case don't change the reference value of the parameter) + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_init(struct bmi160_t *bmi160) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + u8 v_pmu_data_u8 = BMI160_INIT_VALUE; + /* assign bmi160 ptr */ + p_bmi160 = bmi160; + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_CHIP_ID__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* read Chip Id */ + p_bmi160->chip_id = v_data_u8; + /* To avoid gyro wakeup it is required to write 0x00 to 0x6C*/ + com_rslt += bmi160_write_reg(BMI160_USER_PMU_TRIGGER_ADDR, + &v_pmu_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + return com_rslt; +} +/*! + * @brief + * This API write the data to + * the given register + * + * + * @param v_addr_u8 -> Address of the register + * @param v_data_u8 -> The data from the register + * @param v_len_u8 -> no of bytes to read + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_write_reg(u8 v_addr_u8, +u8 *v_data_u8, u8 v_len_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write data from register*/ + com_rslt = + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160->dev_addr, + v_addr_u8, v_data_u8, v_len_u8); + } + return com_rslt; +} +/*! + * @brief + * This API reads the data from + * the given register + * + * + * @param v_addr_u8 -> Address of the register + * @param v_data_u8 -> The data from the register + * @param v_len_u8 -> no of bytes to read + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_reg(u8 v_addr_u8, +u8 *v_data_u8, u8 v_len_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* Read data from register*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + v_addr_u8, v_data_u8, v_len_u8); + } + return com_rslt; +} +/*! + * @brief This API used to reads the fatal error + * from the Register 0x02 bit 0 + * This flag will be reset only by power-on-reset and soft reset + * + * + * @param v_fatal_err_u8 : The status of fatal error + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fatal_err(u8 +*v_fatal_err_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* reading the fatal error status*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FATAL_ERR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fatal_err_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FATAL_ERR); + } + return com_rslt; +} +/*! + * @brief This API used to read the error code + * from register 0x02 bit 1 to 4 + * + * + * @param v_err_code_u8 : The status of error codes + * error_code | description + * ------------|--------------- + * 0x00 |no error + * 0x01 |ACC_CONF error (accel ODR and bandwidth not compatible) + * 0x02 |GYR_CONF error (Gyroscope ODR and bandwidth not compatible) + * 0x03 |Under sampling mode and interrupt uses pre filtered data + * 0x04 |reserved + * 0x05 |Selected trigger-readout offset in + * - |MAG_IF greater than selected ODR + * 0x06 |FIFO configuration error for header less mode + * 0x07 |Under sampling mode and pre filtered data as FIFO source + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_err_code(u8 +*v_err_code_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_ERR_CODE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_err_code_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_ERR_CODE); + } + return com_rslt; +} +/*! + * @brief This API Reads the i2c error code from the + * Register 0x02 bit 5. + * This error occurred in I2C master detected + * + * @param v_i2c_err_code_u8 : The status of i2c fail error + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_fail_err(u8 +*v_i2c_err_code_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_I2C_FAIL_ERR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_i2c_err_code_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_I2C_FAIL_ERR); + } + return com_rslt; +} + /*! + * @brief This API Reads the dropped command error + * from the register 0x02 bit 6 + * + * + * @param v_drop_cmd_err_u8 : The status of drop command error + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_drop_cmd_err(u8 +*v_drop_cmd_err_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_DROP_CMD_ERR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_drop_cmd_err_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_DROP_CMD_ERR); + } + return com_rslt; +} +/*! + * @brief This API reads the magnetometer data ready + * interrupt not active. + * It reads from the error register 0x0x2 bit 7 + * + * + * + * + * @param v_mag_data_rdy_err_u8 : The status of mag data ready interrupt + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_dada_rdy_err( +u8 *v_mag_data_rdy_err_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_MAG_DADA_RDY_ERR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_mag_data_rdy_err_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_MAG_DADA_RDY_ERR); + } + return com_rslt; +} +/*! + * @brief This API reads the error status + * from the error register 0x02 bit 0 to 7 + * + * @param v_mag_data_rdy_err_u8 : The status of mag data ready interrupt + * @param v_fatal_er_u8r : The status of fatal error + * @param v_err_code_u8 : The status of error code + * @param v_i2c_fail_err_u8 : The status of I2C fail error + * @param v_drop_cmd_err_u8 : The status of drop command error + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_error_status(u8 *v_fatal_er_u8r, +u8 *v_err_code_u8, u8 *v_i2c_fail_err_u8, +u8 *v_drop_cmd_err_u8, u8 *v_mag_data_rdy_err_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the error codes*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ERR_STAT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* fatal error*/ + *v_fatal_er_u8r = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FATAL_ERR); + /* user error*/ + *v_err_code_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_ERR_CODE); + /* i2c fail error*/ + *v_i2c_fail_err_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_I2C_FAIL_ERR); + /* drop command error*/ + *v_drop_cmd_err_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_DROP_CMD_ERR); + /* mag data ready error*/ + *v_mag_data_rdy_err_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_MAG_DADA_RDY_ERR); + } + return com_rslt; +} +/*! + * @brief This API reads the magnetometer power mode from + * PMU status register 0x03 bit 0 and 1 + * + * @param v_mag_power_mode_stat_u8 : The value of mag power mode + * mag_powermode | value + * ------------------|---------- + * SUSPEND | 0x00 + * NORMAL | 0x01 + * LOW POWER | 0x02 + * + * + * @note The power mode of mag set by the 0x7E command register + * @note using the function "bmi160_set_command_register()" + * value | mode + * ---------|---------------- + * 0x18 | MAG_MODE_SUSPEND + * 0x19 | MAG_MODE_NORMAL + * 0x1A | MAG_MODE_LOWPOWER + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_power_mode_stat(u8 +*v_mag_power_mode_stat_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_POWER_MODE_STAT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_mag_power_mode_stat_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_MAG_POWER_MODE_STAT); + } + return com_rslt; +} +/*! + * @brief This API reads the gyroscope power mode from + * PMU status register 0x03 bit 2 and 3 + * + * @param v_gyro_power_mode_stat_u8 : The value of gyro power mode + * gyro_powermode | value + * ------------------|---------- + * SUSPEND | 0x00 + * NORMAL | 0x01 + * FAST POWER UP | 0x03 + * + * @note The power mode of gyro set by the 0x7E command register + * @note using the function "bmi160_set_command_register()" + * value | mode + * ---------|---------------- + * 0x14 | GYRO_MODE_SUSPEND + * 0x15 | GYRO_MODE_NORMAL + * 0x17 | GYRO_MODE_FASTSTARTUP + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_power_mode_stat(u8 +*v_gyro_power_mode_stat_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_GYRO_POWER_MODE_STAT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_gyro_power_mode_stat_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_POWER_MODE_STAT); + } + return com_rslt; +} +/*! + * @brief This API reads the accelerometer power mode from + * PMU status register 0x03 bit 4 and 5 + * + * + * @param v_accel_power_mode_stat_u8 : The value of accel power mode + * accel_powermode | value + * ------------------|---------- + * SUSPEND | 0x00 + * NORMAL | 0x01 + * LOW POWER | 0x02 + * + * @note The power mode of accel set by the 0x7E command register + * @note using the function "bmi160_set_command_register()" + * value | mode + * ---------|---------------- + * 0x11 | ACCEL_MODE_NORMAL + * 0x12 | ACCEL_LOWPOWER + * 0x10 | ACCEL_SUSPEND + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_power_mode_stat(u8 +*v_accel_power_mode_stat_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_ACCEL_POWER_MODE_STAT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_accel_power_mode_stat_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_ACCEL_POWER_MODE_STAT); + } + return com_rslt; +} +/*! + * @brief This API switch mag interface to normal mode + * and confirm whether the mode switching done successfully or not +* + * @return results of bus communication function and current MAG_PMU result + * @retval 0 -> Success + * @retval -1 -> Error + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_interface_normal(void) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = BMI160_INIT_VALUE; + /* aim to check the result of switching mag normal */ + u8 v_try_times_u8 = BMI160_MAG_NOAMRL_SWITCH_TIMES; + u8 v_mag_pum_status_u8 = BMI160_INIT_VALUE; + + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt = bmi160_set_command_register(MAG_MODE_NORMAL); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + while (v_try_times_u8) { + com_rslt = bmi160_get_mag_power_mode_stat(&v_mag_pum_status_u8); + if (v_mag_pum_status_u8 == MAG_INTERFACE_PMU_ENABLE) + break; + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + v_try_times_u8--; + } + if (v_mag_pum_status_u8 == MAG_INTERFACE_PMU_ENABLE) + com_rslt += SUCCESS; + else + com_rslt += E_BMI160_COMM_RES; + + return com_rslt; +} +/*! + * @brief This API reads magnetometer data X values + * from the register 0x04 and 0x05 + * @brief The mag sensor data read form auxiliary mag + * + * @param v_mag_x_s16 : The value of mag x + * @param v_sensor_select_u8 : Mag selection value + * value | sensor + * ---------|---------------- + * 0 | BMM150 + * 1 | AKM09911 or AKM09912 + * + * @note For mag data output rate configuration use the following function + * @note bmi160_set_mag_output_data_rate() + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_x(s16 *v_mag_x_s16, +u8 v_sensor_select_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the mag X lSB and MSB data + v_data_u8[0] - LSB + v_data_u8[1] - MSB*/ + u8 v_data_u8[BMI160_MAG_X_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_sensor_select_u8) { + case BST_BMM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_DATA_MAG_X_LSB__REG, + v_data_u8, BMI160_MAG_X_DATA_LENGTH); + /* X axis*/ + v_data_u8[BMI160_MAG_X_LSB_BYTE] = + BMI160_GET_BITSLICE(v_data_u8[BMI160_MAG_X_LSB_BYTE], + BMI160_USER_DATA_MAG_X_LSB); + *v_mag_x_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_MAG_X_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_05_BITS) | + (v_data_u8[BMI160_MAG_X_LSB_BYTE])); + break; + case BST_AKM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_0_MAG_X_LSB__REG, + v_data_u8, BMI160_MAG_X_DATA_LENGTH); + *v_mag_x_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_MAG_X_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | + (v_data_u8[BMI160_MAG_X_LSB_BYTE])); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief This API reads magnetometer data Y values + * from the register 0x06 and 0x07 + * @brief The mag sensor data read form auxiliary mag + * + * @param v_mag_y_s16 : The value of mag y + * @param v_sensor_select_u8 : Mag selection value + * value | sensor + * ---------|---------------- + * 0 | BMM150 + * 1 | AKM09911 or AKM09912 + * + * @note For mag data output rate configuration use the following function + * @note bmi160_set_mag_output_data_rate() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_y(s16 *v_mag_y_s16, +u8 v_sensor_select_u8) +{ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_OUT_OF_RANGE; + /* Array contains the mag Y lSB and MSB data + v_data_u8[0] - LSB + v_data_u8[1] - MSB*/ + u8 v_data_u8[BMI160_MAG_Y_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_sensor_select_u8) { + case BST_BMM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_DATA_MAG_Y_LSB__REG, + v_data_u8, BMI160_MAG_Y_DATA_LENGTH); + /*Y-axis lsb value shifting*/ + v_data_u8[BMI160_MAG_Y_LSB_BYTE] = + BMI160_GET_BITSLICE(v_data_u8[BMI160_MAG_Y_LSB_BYTE], + BMI160_USER_DATA_MAG_Y_LSB); + *v_mag_y_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_MAG_Y_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_05_BITS) | + (v_data_u8[BMI160_MAG_Y_LSB_BYTE])); + break; + case BST_AKM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_DATA_2_MAG_Y_LSB__REG, + v_data_u8, BMI160_MAG_Y_DATA_LENGTH); + *v_mag_y_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_MAG_Y_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | + (v_data_u8[BMI160_MAG_Y_LSB_BYTE])); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief This API reads magnetometer data Z values + * from the register 0x08 and 0x09 + * @brief The mag sensor data read form auxiliary mag + * + * @param v_mag_z_s16 : The value of mag z + * @param v_sensor_select_u8 : Mag selection value + * value | sensor + * ---------|---------------- + * 0 | BMM150 + * 1 | AKM09911 or AKM09912 + * + * @note For mag data output rate configuration use the following function + * @note bmi160_set_mag_output_data_rate() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_z(s16 *v_mag_z_s16, +u8 v_sensor_select_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the mag Z lSB and MSB data + v_data_u8[0] - LSB + v_data_u8[1] - MSB*/ + u8 v_data_u8[BMI160_MAG_Z_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_sensor_select_u8) { + case BST_BMM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_DATA_MAG_Z_LSB__REG, + v_data_u8, BMI160_MAG_Z_DATA_LENGTH); + /*Z-axis lsb value shifting*/ + v_data_u8[BMI160_MAG_Z_LSB_BYTE] = + BMI160_GET_BITSLICE(v_data_u8[BMI160_MAG_Z_LSB_BYTE], + BMI160_USER_DATA_MAG_Z_LSB); + *v_mag_z_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_MAG_Z_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_07_BITS) | + (v_data_u8[BMI160_MAG_Z_LSB_BYTE])); + break; + case BST_AKM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_DATA_4_MAG_Z_LSB__REG, + v_data_u8, BMI160_MAG_Z_DATA_LENGTH); + *v_mag_z_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_MAG_Z_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | ( + v_data_u8[BMI160_MAG_Z_LSB_BYTE])); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief This API reads magnetometer data RHALL values + * from the register 0x0A and 0x0B + * + * + * @param v_mag_r_s16 : The value of BMM150 r data + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_r(s16 *v_mag_r_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the mag R lSB and MSB data + v_data_u8[0] - LSB + v_data_u8[1] - MSB*/ + u8 v_data_u8[BMI160_MAG_R_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_6_RHALL_LSB__REG, + v_data_u8, BMI160_MAG_R_DATA_LENGTH); + /*R-axis lsb value shifting*/ + v_data_u8[BMI160_MAG_R_LSB_BYTE] = + BMI160_GET_BITSLICE(v_data_u8[BMI160_MAG_R_LSB_BYTE], + BMI160_USER_DATA_MAG_R_LSB); + *v_mag_r_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_MAG_R_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_06_BITS) | + (v_data_u8[BMI160_MAG_R_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads magnetometer data X,Y,Z values + * from the register 0x04 to 0x09 + * + * @brief The mag sensor data read form auxiliary mag + * + * @param mag : The value of mag xyz data + * @param v_sensor_select_u8 : Mag selection value + * value | sensor + * ---------|---------------- + * 0 | BMM150 + * 1 | AKM09911 or AKM09912 + * + * @note For mag data output rate configuration use the following function + * @note bmi160_set_mag_output_data_rate() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyz( +struct bmi160_mag_t *mag, u8 v_sensor_select_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the mag XYZ lSB and MSB data + v_data_u8[0] - X-LSB + v_data_u8[1] - X-MSB + v_data_u8[0] - Y-LSB + v_data_u8[1] - Y-MSB + v_data_u8[0] - Z-LSB + v_data_u8[1] - Z-MSB + */ + u8 v_data_u8[BMI160_MAG_XYZ_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_sensor_select_u8) { + case BST_BMM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_DATA_MAG_X_LSB__REG, + v_data_u8, BMI160_MAG_XYZ_DATA_LENGTH); + /*X-axis lsb value shifting*/ + v_data_u8[BMI160_DATA_FRAME_MAG_X_LSB_BYTE] = + BMI160_GET_BITSLICE( + v_data_u8[BMI160_DATA_FRAME_MAG_X_LSB_BYTE], + BMI160_USER_DATA_MAG_X_LSB); + /* Data X */ + mag->x = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_MAG_X_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_05_BITS) | + (v_data_u8[BMI160_DATA_FRAME_MAG_X_LSB_BYTE])); + /* Data Y */ + /*Y-axis lsb value shifting*/ + v_data_u8[BMI160_DATA_FRAME_MAG_Y_LSB_BYTE] = + BMI160_GET_BITSLICE( + v_data_u8[BMI160_DATA_FRAME_MAG_Y_LSB_BYTE], + BMI160_USER_DATA_MAG_Y_LSB); + mag->y = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_MAG_Y_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_05_BITS) | + (v_data_u8[BMI160_DATA_FRAME_MAG_Y_LSB_BYTE])); + + /* Data Z */ + /*Z-axis lsb value shifting*/ + v_data_u8[BMI160_DATA_FRAME_MAG_Z_LSB_BYTE] + = BMI160_GET_BITSLICE( + v_data_u8[BMI160_DATA_FRAME_MAG_Z_LSB_BYTE], + BMI160_USER_DATA_MAG_Z_LSB); + mag->z = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_MAG_Z_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_07_BITS) | + (v_data_u8[BMI160_DATA_FRAME_MAG_Z_LSB_BYTE])); + break; + case BST_AKM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_0_MAG_X_LSB__REG, + v_data_u8, BMI160_MAG_XYZ_DATA_LENGTH); + /* Data X */ + mag->x = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_MAG_X_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | + (v_data_u8[BMI160_DATA_FRAME_MAG_X_LSB_BYTE])); + /* Data Y */ + mag->y = ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_MAG_Y_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | + (v_data_u8[BMI160_DATA_FRAME_MAG_Y_LSB_BYTE])); + /* Data Z */ + mag->z = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_MAG_Z_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | + (v_data_u8[BMI160_DATA_FRAME_MAG_Z_LSB_BYTE])); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} + /*!* + * @brief This API reads magnetometer data X,Y,Z,r + * values from the register 0x04 to 0x0B + * + * @brief The mag sensor data read form auxiliary mag + * + * @param mag : The value of mag-BMM150 xyzr data + * + * @note For mag data output rate configuration use the following function + * @note bmi160_set_mag_output_data_rate() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyzr( +struct bmi160_mag_xyzr_t *mag) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8[BMI160_MAG_XYZR_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_MAG_X_LSB__REG, + v_data_u8, BMI160_MAG_XYZR_DATA_LENGTH); + + /* Data X */ + /*X-axis lsb value shifting*/ + v_data_u8[BMI160_DATA_FRAME_MAG_X_LSB_BYTE] + = BMI160_GET_BITSLICE( + v_data_u8[BMI160_DATA_FRAME_MAG_X_LSB_BYTE], + BMI160_USER_DATA_MAG_X_LSB); + mag->x = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_MAG_X_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_05_BITS) + | (v_data_u8[BMI160_DATA_FRAME_MAG_X_LSB_BYTE])); + /* Data Y */ + /*Y-axis lsb value shifting*/ + v_data_u8[BMI160_DATA_FRAME_MAG_Y_LSB_BYTE] + = BMI160_GET_BITSLICE( + v_data_u8[BMI160_DATA_FRAME_MAG_Y_LSB_BYTE], + BMI160_USER_DATA_MAG_Y_LSB); + mag->y = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_MAG_Y_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_05_BITS) + | (v_data_u8[ + BMI160_DATA_FRAME_MAG_Y_LSB_BYTE])); + + /* Data Z */ + /*Z-axis lsb value shifting*/ + v_data_u8[BMI160_DATA_FRAME_MAG_Z_LSB_BYTE] + = BMI160_GET_BITSLICE( + v_data_u8[BMI160_DATA_FRAME_MAG_Z_LSB_BYTE], + BMI160_USER_DATA_MAG_Z_LSB); + mag->z = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_MAG_Z_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_07_BITS) + | (v_data_u8[BMI160_DATA_FRAME_MAG_Z_LSB_BYTE])); + + /* RHall */ + /*R-axis lsb value shifting*/ + v_data_u8[BMI160_DATA_FRAME_MAG_R_LSB_BYTE] + = BMI160_GET_BITSLICE( + v_data_u8[BMI160_DATA_FRAME_MAG_R_LSB_BYTE], + BMI160_USER_DATA_MAG_R_LSB); + mag->r = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_MAG_R_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_06_BITS) + | (v_data_u8[BMI160_DATA_FRAME_MAG_R_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads gyro data X values + * form the register 0x0C and 0x0D + * + * + * + * + * @param v_gyro_x_s16 : The value of gyro x data + * + * @note Gyro Configuration use the following function + * @note bmi160_set_gyro_output_data_rate() + * @note bmi160_set_gyro_bw() + * @note bmi160_set_gyro_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_x(s16 *v_gyro_x_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the gyro X lSB and MSB data + v_data_u8[0] - LSB + v_data_u8[MSB_ONE] - MSB*/ + u8 v_data_u8[BMI160_GYRO_X_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_8_GYRO_X_LSB__REG, + v_data_u8, BMI160_GYRO_DATA_LENGTH); + + *v_gyro_x_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_GYRO_X_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (v_data_u8[BMI160_GYRO_X_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads gyro data Y values + * form the register 0x0E and 0x0F + * + * + * + * + * @param v_gyro_y_s16 : The value of gyro y data + * + * @note Gyro Configuration use the following function + * @note bmi160_set_gyro_output_data_rate() + * @note bmi160_set_gyro_bw() + * @note bmi160_set_gyro_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error result of communication routines + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_y(s16 *v_gyro_y_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the gyro Y lSB and MSB data + v_data_u8[LSB_ZERO] - LSB + v_data_u8[MSB_ONE] - MSB*/ + u8 v_data_u8[BMI160_GYRO_Y_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro y data*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_10_GYRO_Y_LSB__REG, + v_data_u8, BMI160_GYRO_DATA_LENGTH); + + *v_gyro_y_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_GYRO_Y_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (v_data_u8[BMI160_GYRO_Y_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads gyro data Z values + * form the register 0x10 and 0x11 + * + * + * + * + * @param v_gyro_z_s16 : The value of gyro z data + * + * @note Gyro Configuration use the following function + * @note bmi160_set_gyro_output_data_rate() + * @note bmi160_set_gyro_bw() + * @note bmi160_set_gyro_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_z(s16 *v_gyro_z_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the gyro Z lSB and MSB data + v_data_u8[LSB_ZERO] - LSB + v_data_u8[MSB_ONE] - MSB*/ + u8 v_data_u8[BMI160_GYRO_Z_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro z data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_12_GYRO_Z_LSB__REG, + v_data_u8, BMI160_GYRO_DATA_LENGTH); + + *v_gyro_z_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_GYRO_Z_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (v_data_u8[BMI160_GYRO_Z_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads gyro data X,Y,Z values + * from the register 0x0C to 0x11 + * + * + * + * + * @param gyro : The value of gyro xyz + * + * @note Gyro Configuration use the following function + * @note bmi160_set_gyro_output_data_rate() + * @note bmi160_set_gyro_bw() + * @note bmi160_set_gyro_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_xyz(struct bmi160_gyro_t *gyro) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the mag XYZ lSB and MSB data + v_data_u8[0] - X-LSB + v_data_u8[1] - X-MSB + v_data_u8[0] - Y-LSB + v_data_u8[1] - Y-MSB + v_data_u8[0] - Z-LSB + v_data_u8[1] - Z-MSB + */ + u8 v_data_u8[BMI160_GYRO_XYZ_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the gyro xyz data*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_8_GYRO_X_LSB__REG, + v_data_u8, BMI160_GYRO_XYZ_DATA_LENGTH); + + /* Data X */ + gyro->x = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_GYRO_X_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (v_data_u8[BMI160_DATA_FRAME_GYRO_X_LSB_BYTE])); + /* Data Y */ + gyro->y = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_GYRO_Y_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (v_data_u8[BMI160_DATA_FRAME_GYRO_Y_LSB_BYTE])); + + /* Data Z */ + gyro->z = (s16) + ((((s32)((s8)v_data_u8[ + BMI160_DATA_FRAME_GYRO_Z_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (v_data_u8[BMI160_DATA_FRAME_GYRO_Z_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads accelerometer data X values + * form the register 0x12 and 0x13 + * + * + * + * + * @param v_accel_x_s16 : The value of accel x + * + * @note For accel configuration use the following functions + * @note bmi160_set_accel_output_data_rate() + * @note bmi160_set_accel_bw() + * @note bmi160_set_accel_under_sampling_parameter() + * @note bmi160_set_accel_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_x(s16 *v_accel_x_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the accel X lSB and MSB data + v_data_u8[0] - LSB + v_data_u8[1] - MSB*/ + u8 v_data_u8[BMI160_ACCEL_X_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_14_ACCEL_X_LSB__REG, + v_data_u8, BMI160_ACCEL_DATA_LENGTH); + + *v_accel_x_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_ACCEL_X_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (v_data_u8[BMI160_ACCEL_X_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads accelerometer data Y values + * form the register 0x14 and 0x15 + * + * + * + * + * @param v_accel_y_s16 : The value of accel y + * + * @note For accel configuration use the following functions + * @note bmi160_set_accel_output_data_rate() + * @note bmi160_set_accel_bw() + * @note bmi160_set_accel_under_sampling_parameter() + * @note bmi160_set_accel_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_y(s16 *v_accel_y_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the accel Y lSB and MSB data + v_data_u8[0] - LSB + v_data_u8[1] - MSB*/ + u8 v_data_u8[BMI160_ACCEL_Y_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_16_ACCEL_Y_LSB__REG, + v_data_u8, BMI160_ACCEL_DATA_LENGTH); + + *v_accel_y_s16 = (s16) + ((((s32)((s8)v_data_u8[BMI160_ACCEL_Y_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (v_data_u8[BMI160_ACCEL_Y_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads accelerometer data Z values + * form the register 0x16 and 0x17 + * + * + * + * + * @param v_accel_z_s16 : The value of accel z + * + * @note For accel configuration use the following functions + * @note bmi160_set_accel_output_data_rate() + * @note bmi160_set_accel_bw() + * @note bmi160_set_accel_under_sampling_parameter() + * @note bmi160_set_accel_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_z(s16 *v_accel_z_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the accel Z lSB and MSB data + a_data_u8r[LSB_ZERO] - LSB + a_data_u8r[MSB_ONE] - MSB*/ + u8 a_data_u8r[BMI160_ACCEL_Z_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_18_ACCEL_Z_LSB__REG, + a_data_u8r, BMI160_ACCEL_DATA_LENGTH); + + *v_accel_z_s16 = (s16) + ((((s32)((s8)a_data_u8r[BMI160_ACCEL_Z_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (a_data_u8r[BMI160_ACCEL_Z_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads accelerometer data X,Y,Z values + * from the register 0x12 to 0x17 + * + * + * + * + * @param accel :The value of accel xyz + * + * @note For accel configuration use the following functions + * @note bmi160_set_accel_output_data_rate() + * @note bmi160_set_accel_bw() + * @note bmi160_set_accel_under_sampling_parameter() + * @note bmi160_set_accel_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_xyz( +struct bmi160_accel_t *accel) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the accel XYZ lSB and MSB data + a_data_u8r[0] - X-LSB + a_data_u8r[1] - X-MSB + a_data_u8r[0] - Y-LSB + a_data_u8r[1] - Y-MSB + a_data_u8r[0] - Z-LSB + a_data_u8r[1] - Z-MSB + */ + u8 a_data_u8r[BMI160_ACCEL_XYZ_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_14_ACCEL_X_LSB__REG, + a_data_u8r, BMI160_ACCEL_XYZ_DATA_LENGTH); + + /* Data X */ + accel->x = (s16) + ((((s32)((s8)a_data_u8r[ + BMI160_DATA_FRAME_ACCEL_X_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (a_data_u8r[BMI160_DATA_FRAME_ACCEL_X_LSB_BYTE])); + /* Data Y */ + accel->y = (s16) + ((((s32)((s8)a_data_u8r[ + BMI160_DATA_FRAME_ACCEL_Y_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (a_data_u8r[BMI160_DATA_FRAME_ACCEL_Y_LSB_BYTE])); + + /* Data Z */ + accel->z = (s16) + ((((s32)((s8)a_data_u8r[ + BMI160_DATA_FRAME_ACCEL_Z_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (a_data_u8r[BMI160_DATA_FRAME_ACCEL_Z_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads sensor_time from the register + * 0x18 to 0x1A + * + * + * @param v_sensor_time_u32 : The value of sensor time + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_sensor_time(u32 *v_sensor_time_u32) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the sensor time it is 32 bit data + a_data_u8r[0] - sensor time + a_data_u8r[1] - sensor time + a_data_u8r[0] - sensor time + */ + u8 a_data_u8r[BMI160_SENSOR_TIME_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__REG, + a_data_u8r, BMI160_SENSOR_TIME_LENGTH); + + *v_sensor_time_u32 = (u32) + ((((u32)a_data_u8r[BMI160_SENSOR_TIME_MSB_BYTE]) + << BMI160_SHIFT_BIT_POSITION_BY_16_BITS) + |(((u32)a_data_u8r[BMI160_SENSOR_TIME_XLSB_BYTE]) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (a_data_u8r[BMI160_SENSOR_TIME_LSB_BYTE])); + } + return com_rslt; +} +/*! + * @brief This API reads the Gyroscope self test + * status from the register 0x1B bit 1 + * + * + * @param v_gyro_selftest_u8 : The value of gyro self test status + * value | status + * ---------|---------------- + * 0 | Gyroscope self test is running or failed + * 1 | Gyroscope self test completed successfully + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest(u8 +*v_gyro_selftest_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STAT_GYRO_SELFTEST_OK__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_gyro_selftest_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_STAT_GYRO_SELFTEST_OK); + } + return com_rslt; +} +/*! + * @brief This API reads the status of + * mag manual interface operation form the register 0x1B bit 2 + * + * + * + * @param v_mag_manual_stat_u8 : The value of mag manual operation status + * value | status + * ---------|---------------- + * 0 | Indicates no manual magnetometer + * - | interface operation is ongoing + * 1 | Indicates manual magnetometer + * - | interface operation is ongoing + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_operation_stat(u8 +*v_mag_manual_stat_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read manual operation*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STAT_MAG_MANUAL_OPERATION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_mag_manual_stat_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_STAT_MAG_MANUAL_OPERATION); + } + return com_rslt; +} +/*! + * @brief This API reads the fast offset compensation + * status form the register 0x1B bit 3 + * + * + * @param v_foc_rdy_u8 : The status of fast compensation + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_rdy(u8 +*v_foc_rdy_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the FOC status*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STAT_FOC_RDY__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_foc_rdy_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_STAT_FOC_RDY); + } + return com_rslt; +} +/*! + * @brief This API Reads the nvm_rdy status from the + * resister 0x1B bit 4 + * + * + * @param v_nvm_rdy_u8 : The value of NVM ready status + * value | status + * ---------|---------------- + * 0 | NVM write operation in progress + * 1 | NVM is ready to accept a new write trigger + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_rdy(u8 +*v_nvm_rdy_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the nvm ready status*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STAT_NVM_RDY__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_nvm_rdy_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_STAT_NVM_RDY); + } + return com_rslt; +} +/*! + * @brief This API reads the status of mag data ready + * from the register 0x1B bit 5 + * The status get reset when one mag data register is read out + * + * @param v_data_rdy_u8 : The value of mag data ready status + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_data_rdy_mag(u8 +*v_data_rdy_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STAT_DATA_RDY_MAG__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_data_rdy_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_STAT_DATA_RDY_MAG); + } + return com_rslt; +} +/*! + * @brief This API reads the status of gyro data ready form the + * register 0x1B bit 6 + * The status get reset when gyro data register read out + * + * + * @param v_data_rdy_u8 : The value of gyro data ready + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_data_rdy(u8 +*v_data_rdy_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STAT_DATA_RDY_GYRO__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_data_rdy_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_STAT_DATA_RDY_GYRO); + } + return com_rslt; +} +/*! + * @brief This API reads the status of accel data ready form the + * register 0x1B bit 7 + * The status get reset when accel data register read out + * + * + * @param v_data_rdy_u8 : The value of accel data ready status + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_data_rdy(u8 +*v_data_rdy_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /*reads the status of accel data ready*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STAT_DATA_RDY_ACCEL__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_data_rdy_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_STAT_DATA_RDY_ACCEL); + } + return com_rslt; +} +/*! + * @brief This API reads the step detector interrupt status + * from the register 0x1C bit 0 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_step_intr_u8 : The status of step detector interrupt + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_step_intr(u8 +*v_step_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_0_STEP_INTR__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_step_intr_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_0_STEP_INTR); + } + return com_rslt; +} +/*! + * @brief This API reads the + * significant motion interrupt status + * from the register 0x1C bit 1 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * + * @param v_significant_intr_u8 : The status of step + * motion interrupt + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_significant_intr(u8 +*v_significant_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_significant_intr_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR); + } + return com_rslt; +} + /*! + * @brief This API reads the any motion interrupt status + * from the register 0x1C bit 2 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * @param v_any_motion_intr_u8 : The status of any-motion interrupt + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_any_motion_intr(u8 +*v_any_motion_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_0_ANY_MOTION__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_any_motion_intr_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_0_ANY_MOTION); + } + return com_rslt; +} +/*! + * @brief This API reads the power mode trigger interrupt status + * from the register 0x1C bit 3 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * + * @param v_pmu_trigger_intr_u8 : The status of power mode trigger interrupt + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_pmu_trigger_intr(u8 +*v_pmu_trigger_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_0_PMU_TRIGGER__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_pmu_trigger_intr_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_0_PMU_TRIGGER); + } + return com_rslt; +} +/*! + * @brief This API reads the double tab status + * from the register 0x1C bit 4 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_double_tap_intr_u8 :The status of double tab interrupt + * + * @note Double tap interrupt can be configured by the following functions + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_double_tap() + * @note AXIS MAPPING + * @note bmi160_get_stat2_tap_first_x() + * @note bmi160_get_stat2_tap_first_y() + * @note bmi160_get_stat2_tap_first_z() + * @note DURATION + * @note bmi160_set_intr_tap_durn() + * @note THRESHOLD + * @note bmi160_set_intr_tap_thres() + * @note TAP QUIET + * @note bmi160_set_intr_tap_quiet() + * @note TAP SHOCK + * @note bmi160_set_intr_tap_shock() + * @note TAP SOURCE + * @note bmi160_set_intr_tap_source() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_double_tap_intr(u8 +*v_double_tap_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_double_tap_intr_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR); + } + return com_rslt; +} +/*! + * @brief This API reads the single tab status + * from the register 0x1C bit 5 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_single_tap_intr_u8 :The status of single tap interrupt + * + * @note Single tap interrupt can be configured by the following functions + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_single_tap() + * @note AXIS MAPPING + * @note bmi160_get_stat2_tap_first_x() + * @note bmi160_get_stat2_tap_first_y() + * @note bmi160_get_stat2_tap_first_z() + * @note DURATION + * @note bmi160_set_intr_tap_durn() + * @note THRESHOLD + * @note bmi160_set_intr_tap_thres() + * @note TAP QUIET + * @note bmi160_set_intr_tap_quiet() + * @note TAP SHOCK + * @note bmi160_set_intr_tap_shock() + * @note TAP SOURCE + * @note bmi160_set_intr_tap_source() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_single_tap_intr(u8 +*v_single_tap_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_single_tap_intr_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR); + } + return com_rslt; +} +/*! + * @brief This API reads the orient status + * from the register 0x1C bit 6 + * flag is associated with a specific interrupt function. + * It is set when the orient interrupt triggers. The + * setting of INT_LATCH controls if the + * interrupt signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_orient_intr_u8 : The status of orient interrupt + * + * @note For orient interrupt configuration use the following functions + * @note STATUS + * @note bmi160_get_stat0_orient_intr() + * @note AXIS MAPPING + * @note bmi160_get_stat3_orient_xy() + * @note bmi160_get_stat3_orient_z() + * @note bmi160_set_intr_orient_axes_enable() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_orient() + * @note INTERRUPT OUTPUT + * @note bmi160_set_intr_orient_ud_enable() + * @note THETA + * @note bmi160_set_intr_orient_theta() + * @note HYSTERESIS + * @note bmi160_set_intr_orient_hyst() + * @note BLOCKING + * @note bmi160_set_intr_orient_blocking() + * @note MODE + * @note bmi160_set_intr_orient_mode() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_orient_intr(u8 +*v_orient_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_0_ORIENT__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_orient_intr_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_0_ORIENT); + } + return com_rslt; +} +/*! + * @brief This API reads the flat interrupt status + * from the register 0x1C bit 7 + * flag is associated with a specific interrupt function. + * It is set when the flat interrupt triggers. The + * setting of INT_LATCH controls if the + * interrupt signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_flat_intr_u8 : The status of flat interrupt + * + * @note For flat configuration use the following functions + * @note STATS + * @note bmi160_get_stat0_flat_intr() + * @note bmi160_get_stat3_flat() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_flat() + * @note THETA + * @note bmi160_set_intr_flat_theta() + * @note HOLD TIME + * @note bmi160_set_intr_flat_hold() + * @note HYSTERESIS + * @note bmi160_set_intr_flat_hyst() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_flat_intr(u8 +*v_flat_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_0_FLAT__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_flat_intr_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_0_FLAT); + } + return com_rslt; +} +/*! + * @brief This API reads the high_g interrupt status + * from the register 0x1D bit 2 + * flag is associated with a specific interrupt function. + * It is set when the high g interrupt triggers. The + * setting of INT_LATCH controls if the interrupt signal and hence the + * respective interrupt flag will be permanently + * latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_high_g_intr_u8 : The status of high_g interrupt + * + * @note High_g interrupt configured by following functions + * @note STATUS + * @note bmi160_get_stat1_high_g_intr() + * @note AXIS MAPPING + * @note bmi160_get_stat3_high_g_first_x() + * @note bmi160_get_stat3_high_g_first_y() + * @note bmi160_get_stat3_high_g_first_z() + * @note SIGN MAPPING + * @note bmi160_get_stat3_high_g_first_sign() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_high_g() + * @note HYSTERESIS + * @note bmi160_set_intr_high_g_hyst() + * @note DURATION + * @note bmi160_set_intr_high_g_durn() + * @note THRESHOLD + * @note bmi160_set_intr_high_g_thres() + * @note SOURCE + * @note bmi160_set_intr_low_high_source() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_high_g_intr(u8 +*v_high_g_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_1_HIGH_G_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_high_g_intr_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_1_HIGH_G_INTR); + } + return com_rslt; +} +/*! + * @brief This API reads the low g interrupt status + * from the register 0x1D bit 3 + * flag is associated with a specific interrupt function. + * It is set when the low g interrupt triggers. The + * setting of INT_LATCH controls if the interrupt signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_low_g_intr_u8 : The status of low_g interrupt + * + * @note Low_g interrupt configured by following functions + * @note STATUS + * @note bmi160_get_stat1_low_g_intr() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_low_g() + * @note SOURCE + * @note bmi160_set_intr_low_high_source() + * @note DURATION + * @note bmi160_set_intr_low_g_durn() + * @note THRESHOLD + * @note bmi160_set_intr_low_g_thres() + * @note HYSTERESIS + * @note bmi160_set_intr_low_g_hyst() + * @note MODE + * @note bmi160_set_intr_low_g_mode() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_low_g_intr(u8 +*v_low_g_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_1_LOW_G_INTR__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_low_g_intr_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_1_LOW_G_INTR); + } + return com_rslt; +} +/*! + * @brief This API reads data ready interrupt status + * from the register 0x1D bit 4 + * flag is associated with a specific interrupt function. + * It is set when the data ready interrupt triggers. The + * setting of INT_LATCH controls if the interrupt signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_data_rdy_intr_u8 : The status of data ready interrupt + * + * @note Data ready interrupt configured by following functions + * @note STATUS + * @note bmi160_get_stat1_data_rdy_intr() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_data_rdy() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_data_rdy_intr(u8 +*v_data_rdy_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_data_rdy_intr_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_1_DATA_RDY_INTR); + } + return com_rslt; +} +/*! + * @brief This API reads data ready FIFO full interrupt status + * from the register 0x1D bit 5 + * flag is associated with a specific interrupt function. + * It is set when the FIFO full interrupt triggers. The + * setting of INT_LATCH controls if the + * interrupt signal and hence the + * respective interrupt flag will + * be permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_fifo_full_intr_u8 : The status of fifo full interrupt + * + * @note FIFO full interrupt can be configured by following functions + * @note bmi160_set_intr_fifo_full() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_full_intr(u8 +*v_fifo_full_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_full_intr_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR); + } + return com_rslt; +} +/*! + * @brief This API reads data + * ready FIFO watermark interrupt status + * from the register 0x1D bit 6 + * flag is associated with a specific interrupt function. + * It is set when the FIFO watermark interrupt triggers. The + * setting of INT_LATCH controls if the + * interrupt signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_fifo_wm_intr_u8 : The status of fifo water mark interrupt + * + * @note FIFO full interrupt can be configured by following functions + * @note bmi160_set_intr_fifo_wm() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_wm_intr(u8 +*v_fifo_wm_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_wm_intr_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_1_FIFO_WM_INTR); + } + return com_rslt; +} +/*! + * @brief This API reads data ready no motion interrupt status + * from the register 0x1D bit 7 + * flag is associated with a specific interrupt function. + * It is set when the no motion interrupt triggers. The + * setting of INT_LATCH controls if the interrupt signal and hence the + * respective interrupt flag will be permanently + * latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_nomotion_intr_u8 : The status of no motion interrupt + * + * @note No motion interrupt can be configured by following function + * @note STATUS + * @note bmi160_get_stat1_nomotion_intr() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_nomotion() + * @note DURATION + * @note bmi160_set_intr_slow_no_motion_durn() + * @note THRESHOLD + * @note bmi160_set_intr_slow_no_motion_thres() + * @note SLOW/NO MOTION SELECT + * @note bmi160_set_intr_slow_no_motion_select() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_nomotion_intr(u8 +*v_nomotion_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the no motion interrupt*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_1_NOMOTION_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_nomotion_intr_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_1_NOMOTION_INTR); + } + return com_rslt; +} +/*! + *@brief This API reads the status of any motion first x + * from the register 0x1E bit 0 + * + * + *@param v_anymotion_first_x_u8 : The status of any motion first x interrupt + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by x axis + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_x(u8 +*v_anymotion_first_x_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the any motion first x interrupt*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_anymotion_first_x_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X); + } + return com_rslt; +} +/*! + * @brief This API reads the status of any motion first y interrupt + * from the register 0x1E bit 1 + * + * + * + *@param v_any_motion_first_y_u8 : The status of any motion first y interrupt + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_y(u8 +*v_any_motion_first_y_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the any motion first y interrupt*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_any_motion_first_y_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y); + } + return com_rslt; +} +/*! + * @brief This API reads the status of any motion first z interrupt + * from the register 0x1E bit 2 + * + * + * + * + *@param v_any_motion_first_z_u8 : The status of any motion first z interrupt + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_z(u8 +*v_any_motion_first_z_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the any motion first z interrupt*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_any_motion_first_z_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z); + } + return com_rslt; +} +/*! + * @brief This API reads the any motion sign status from the + * register 0x1E bit 3 + * + * + * + * + * @param v_anymotion_sign_u8 : The status of any motion sign + * value | sign + * -----------|------------- + * 0 | positive + * 1 | negative + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_sign(u8 +*v_anymotion_sign_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read any motion sign interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_anymotion_sign_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN); + } + return com_rslt; +} +/*! + * @brief This API reads the any motion tap first x status from the + * register 0x1E bit 4 + * + * + * + * + * @param v_tap_first_x_u8 :The status of any motion tap first x + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by x axis + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_x(u8 +*v_tap_first_x_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read tap first x interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_2_TAP_FIRST_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_tap_first_x_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_2_TAP_FIRST_X); + } + return com_rslt; +} +/*! + * @brief This API reads the tap first y interrupt status from the + * register 0x1E bit 5 + * + * + * + * + * @param v_tap_first_y_u8 :The status of tap first y interrupt + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_y(u8 +*v_tap_first_y_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read tap first y interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_tap_first_y_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_2_TAP_FIRST_Y); + } + return com_rslt; +} +/*! + * @brief This API reads the tap first z interrupt status from the + * register 0x1E bit 6 + * + * + * + * + * @param v_tap_first_z_u8 :The status of tap first z interrupt + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_z(u8 +*v_tap_first_z_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read tap first z interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_tap_first_z_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_2_TAP_FIRST_Z); + } + return com_rslt; +} +/*! + * @brief This API reads the tap sign status from the + * register 0x1E bit 7 + * + * + * + * + * @param v_tap_sign_u8 : The status of tap sign + * value | sign + * -----------|------------- + * 0 | positive + * 1 | negative + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_sign(u8 +*v_tap_sign_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read tap_sign interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_2_TAP_SIGN__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_tap_sign_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_2_TAP_SIGN); + } + return com_rslt; +} +/*! + * @brief This API reads the high_g first x status from the + * register 0x1F bit 0 + * + * + * + * + * @param v_high_g_first_x_u8 :The status of high_g first x + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by x axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_x(u8 +*v_high_g_first_x_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read highg_x interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_high_g_first_x_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X); + } + return com_rslt; +} +/*! + * @brief This API reads the high_g first y status from the + * register 0x1F bit 1 + * + * + * + * + * @param v_high_g_first_y_u8 : The status of high_g first y + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_y(u8 +*v_high_g_first_y_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read highg_y interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_high_g_first_y_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y); + } + return com_rslt; +} +/*! + * @brief This API reads the high_g first z status from the + * register 0x1F bit 3 + * + * + * + * + * @param v_high_g_first_z_u8 : The status of high_g first z + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_z(u8 +*v_high_g_first_z_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read highg_z interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_high_g_first_z_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z); + } + return com_rslt; +} +/*! + * @brief This API reads the high sign status from the + * register 0x1F bit 3 + * + * + * + * + * @param v_high_g_sign_u8 :The status of high sign + * value | sign + * -----------|------------- + * 0 | positive + * 1 | negative + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_sign(u8 +*v_high_g_sign_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read highg_sign interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_high_g_sign_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_3_HIGH_G_SIGN); + } + return com_rslt; +} +/*! + * @brief This API reads the status of orient_xy plane + * from the register 0x1F bit 4 and 5 + * + * + * @param v_orient_xy_u8 :The status of orient_xy plane + * value | status + * -----------|------------- + * 0x00 | portrait upright + * 0x01 | portrait upside down + * 0x02 | landscape left + * 0x03 | landscape right + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_xy(u8 +*v_orient_xy_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read orient plane xy interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_3_ORIENT_XY__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_orient_xy_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_3_ORIENT_XY); + } + return com_rslt; +} +/*! + * @brief This API reads the status of orient z plane + * from the register 0x1F bit 6 + * + * + * @param v_orient_z_u8 :The status of orient z + * value | status + * -----------|------------- + * 0x00 | upward looking + * 0x01 | downward looking + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_z(u8 +*v_orient_z_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read orient z plane interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_3_ORIENT_Z__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_orient_z_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_3_ORIENT_Z); + } + return com_rslt; +} +/*! + * @brief This API reads the flat status from the register + * 0x1F bit 7 + * + * + * @param v_flat_u8 : The status of flat interrupt + * value | status + * -----------|------------- + * 0x00 | non flat + * 0x01 | flat position + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_flat(u8 +*v_flat_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read flat interrupt status */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_INTR_STAT_3_FLAT__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_flat_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_STAT_3_FLAT); + } + return com_rslt; +} +/*! + * @brief This API reads the temperature of the sensor + * from the register 0x21 bit 0 to 7 + * + * + * + * @param v_temp_s16 : The value of temperature + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_temp(s16 +*v_temp_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the temperature lSB and MSB data + v_data_u8[0] - LSB + v_data_u8[1] - MSB*/ + u8 v_data_u8[BMI160_TEMP_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read temperature data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_TEMP_LSB_VALUE__REG, v_data_u8, + BMI160_TEMP_DATA_LENGTH); + *v_temp_s16 = + (s16)(((s32)((s8) (v_data_u8[BMI160_TEMP_MSB_BYTE]) << + BMI160_SHIFT_BIT_POSITION_BY_08_BITS)) + | v_data_u8[BMI160_TEMP_LSB_BYTE]); + } + return com_rslt; +} +/*! + * @brief This API reads the of the sensor + * form the register 0x23 and 0x24 bit 0 to 7 and 0 to 2 + * @brief this byte counter is updated each time a complete frame + * was read or writtern + * + * + * @param v_fifo_length_u32 : The value of fifo byte counter + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_length(u32 *v_fifo_length_u32) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array contains the fifo length data + v_data_u8[0] - fifo length + v_data_u8[1] - fifo length*/ + u8 a_data_u8r[BMI160_FIFO_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read fifo length*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_BYTE_COUNTER_LSB__REG, a_data_u8r, + BMI160_FIFO_DATA_LENGTH); + + a_data_u8r[BMI160_FIFO_LENGTH_MSB_BYTE] = + BMI160_GET_BITSLICE( + a_data_u8r[BMI160_FIFO_LENGTH_MSB_BYTE], + BMI160_USER_FIFO_BYTE_COUNTER_MSB); + + *v_fifo_length_u32 = + (u32)(((u32)((u8) ( + a_data_u8r[BMI160_FIFO_LENGTH_MSB_BYTE]) << + BMI160_SHIFT_BIT_POSITION_BY_08_BITS)) + | a_data_u8r[BMI160_FIFO_LENGTH_LSB_BYTE]); + } + return com_rslt; +} +/*! + * @brief This API reads the fifo data of the sensor + * from the register 0x24 + * @brief Data format depends on the setting of register FIFO_CONFIG + * + * + * + * @param v_fifodata_u8 : Pointer holding the fifo data + * @param fifo_length_u16 : The value of fifo length maximum + * 1024 + * + * @note For reading FIFO data use the following functions + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_data( +u8 *v_fifodata_u8, u16 v_fifo_length_u16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read fifo data*/ + com_rslt = + p_bmi160->BMI160_BURST_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_DATA__REG, + v_fifodata_u8, v_fifo_length_u16); + + } + return com_rslt; +} +/*! + * @brief This API is used to get the + * accel output date rate form the register 0x40 bit 0 to 3 + * + * + * @param v_output_data_rate_u8 :The value of accel output date rate + * value | output data rate + * -------|-------------------------- + * 0 | BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED + * 1 | BMI160_ACCEL_OUTPUT_DATA_RATE_0_78HZ + * 2 | BMI160_ACCEL_OUTPUT_DATA_RATE_1_56HZ + * 3 | BMI160_ACCEL_OUTPUT_DATA_RATE_3_12HZ + * 4 | BMI160_ACCEL_OUTPUT_DATA_RATE_6_25HZ + * 5 | BMI160_ACCEL_OUTPUT_DATA_RATE_12_5HZ + * 6 | BMI160_ACCEL_OUTPUT_DATA_RATE_25HZ + * 7 | BMI160_ACCEL_OUTPUT_DATA_RATE_50HZ + * 8 | BMI160_ACCEL_OUTPUT_DATA_RATE_100HZ + * 9 | BMI160_ACCEL_OUTPUT_DATA_RATE_200HZ + * 10 | BMI160_ACCEL_OUTPUT_DATA_RATE_400HZ + * 11 | BMI160_ACCEL_OUTPUT_DATA_RATE_800HZ + * 12 | BMI160_ACCEL_OUTPUT_DATA_RATE_1600HZ + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_output_data_rate( +u8 *v_output_data_rate_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the accel output data rate*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_output_data_rate_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE); + } + return com_rslt; +} +/*! + * @brief This API is used to set the + * accel output date rate form the register 0x40 bit 0 to 3 + * + * + * @param v_output_data_rate_u8 :The value of accel output date rate + * value | output data rate + * -------|-------------------------- + * 0 | BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED + * 1 | BMI160_ACCEL_OUTPUT_DATA_RATE_0_78HZ + * 2 | BMI160_ACCEL_OUTPUT_DATA_RATE_1_56HZ + * 3 | BMI160_ACCEL_OUTPUT_DATA_RATE_3_12HZ + * 4 | BMI160_ACCEL_OUTPUT_DATA_RATE_6_25HZ + * 5 | BMI160_ACCEL_OUTPUT_DATA_RATE_12_5HZ + * 6 | BMI160_ACCEL_OUTPUT_DATA_RATE_25HZ + * 7 | BMI160_ACCEL_OUTPUT_DATA_RATE_50HZ + * 8 | BMI160_ACCEL_OUTPUT_DATA_RATE_100HZ + * 9 | BMI160_ACCEL_OUTPUT_DATA_RATE_200HZ + * 10 | BMI160_ACCEL_OUTPUT_DATA_RATE_400HZ + * 11 | BMI160_ACCEL_OUTPUT_DATA_RATE_800HZ + * 12 | BMI160_ACCEL_OUTPUT_DATA_RATE_1600HZ + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_output_data_rate( +u8 v_output_data_rate_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* accel output data rate selection */ + if ((v_output_data_rate_u8 != BMI160_INIT_VALUE) && + (v_output_data_rate_u8 <= BMI160_MAX_ACCEL_OUTPUT_DATA_RATE)) { + /* write accel output data rate */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE, + v_output_data_rate_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to get the + * accel bandwidth from the register 0x40 bit 4 to 6 + * @brief bandwidth parameter determines filter configuration(acc_us=0) + * and averaging for under sampling mode(acc_us=1) + * + * + * @param v_bw_u8 : The value of accel bandwidth + * + * @note accel bandwidth depends on under sampling parameter + * @note under sampling parameter cab be set by the function + * "BMI160_SET_ACCEL_UNDER_SAMPLING_PARAMETER" + * + * @note Filter configuration + * accel_us | Filter configuration + * -----------|--------------------- + * 0x00 | OSR4 mode + * 0x01 | OSR2 mode + * 0x02 | normal mode + * 0x03 | CIC mode + * 0x04 | Reserved + * 0x05 | Reserved + * 0x06 | Reserved + * 0x07 | Reserved + * + * @note accel under sampling mode + * accel_us | Under sampling mode + * -----------|--------------------- + * 0x00 | no averaging + * 0x01 | average 2 samples + * 0x02 | average 4 samples + * 0x03 | average 8 samples + * 0x04 | average 16 samples + * 0x05 | average 32 samples + * 0x06 | average 64 samples + * 0x07 | average 128 samples + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_bw(u8 *v_bw_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the accel bandwidth */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_ACCEL_CONFIG_ACCEL_BW__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_bw_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_ACCEL_CONFIG_ACCEL_BW); + } + return com_rslt; +} +/*! + * @brief This API is used to set the + * accel bandwidth from the register 0x40 bit 4 to 6 + * @brief bandwidth parameter determines filter configuration(acc_us=0) + * and averaging for under sampling mode(acc_us=1) + * + * + * @param v_bw_u8 : The value of accel bandwidth + * + * @note accel bandwidth depends on under sampling parameter + * @note under sampling parameter cab be set by the function + * "BMI160_SET_ACCEL_UNDER_SAMPLING_PARAMETER" + * + * @note Filter configuration + * accel_us | Filter configuration + * -----------|--------------------- + * 0x00 | OSR4 mode + * 0x01 | OSR2 mode + * 0x02 | normal mode + * 0x03 | CIC mode + * 0x04 | Reserved + * 0x05 | Reserved + * 0x06 | Reserved + * 0x07 | Reserved + * + * @note accel under sampling mode + * accel_us | Under sampling mode + * -----------|--------------------- + * 0x00 | no averaging + * 0x01 | average 2 samples + * 0x02 | average 4 samples + * 0x03 | average 8 samples + * 0x04 | average 16 samples + * 0x05 | average 32 samples + * 0x06 | average 64 samples + * 0x07 | average 128 samples + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_bw(u8 v_bw_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* select accel bandwidth*/ + if (v_bw_u8 <= BMI160_MAX_ACCEL_BW) { + /* write accel bandwidth*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_ACCEL_CONFIG_ACCEL_BW__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_ACCEL_CONFIG_ACCEL_BW, + v_bw_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ACCEL_CONFIG_ACCEL_BW__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to get the accel + * under sampling parameter form the register 0x40 bit 7 + * + * + * + * + * @param v_accel_under_sampling_u8 : The value of accel under sampling + * value | under_sampling + * ----------|--------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_under_sampling_parameter( +u8 *v_accel_under_sampling_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the accel under sampling parameter */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_accel_under_sampling_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING); + } + return com_rslt; +} +/*! + * @brief This API is used to set the accel + * under sampling parameter form the register 0x40 bit 7 + * + * + * + * + * @param v_accel_under_sampling_u8 : The value of accel under sampling + * value | under_sampling + * ----------|--------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_under_sampling_parameter( +u8 v_accel_under_sampling_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_accel_under_sampling_u8 <= BMI160_MAX_UNDER_SAMPLING) { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + /* write the accel under sampling parameter */ + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING, + v_accel_under_sampling_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } +} +return com_rslt; +} +/*! + * @brief This API is used to get the ranges + * (g values) of the accel from the register 0x41 bit 0 to 3 + * + * + * + * + * @param v_range_u8 : The value of accel g range + * value | g_range + * ----------|----------- + * 0x03 | BMI160_ACCEL_RANGE_2G + * 0x05 | BMI160_ACCEL_RANGE_4G + * 0x08 | BMI160_ACCEL_RANGE_8G + * 0x0C | BMI160_ACCEL_RANGE_16G + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_range( +u8 *v_range_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the accel range*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_ACCEL_RANGE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_range_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_ACCEL_RANGE); + } + return com_rslt; +} +/*! + * @brief This API is used to set the ranges + * (g values) of the accel from the register 0x41 bit 0 to 3 + * + * + * + * + * @param v_range_u8 : The value of accel g range + * value | g_range + * ----------|----------- + * 0x03 | BMI160_ACCEL_RANGE_2G + * 0x05 | BMI160_ACCEL_RANGE_4G + * 0x08 | BMI160_ACCEL_RANGE_8G + * 0x0C | BMI160_ACCEL_RANGE_16G + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_range(u8 v_range_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if ((v_range_u8 == BMI160_ACCEL_RANGE0) || + (v_range_u8 == BMI160_ACCEL_RANGE1) || + (v_range_u8 == BMI160_ACCEL_RANGE3) || + (v_range_u8 == BMI160_ACCEL_RANGE4)) { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_ACCEL_RANGE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE( + v_data_u8, BMI160_USER_ACCEL_RANGE, + v_range_u8); + /* write the accel range*/ + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ACCEL_RANGE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to get the + * gyroscope output data rate from the register 0x42 bit 0 to 3 + * + * + * + * + * @param v_output_data_rate_u8 :The value of gyro output data rate + * value | gyro output data rate + * -----------|----------------------------- + * 0x00 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x01 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x02 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x03 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x04 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x05 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x06 | BMI160_GYRO_OUTPUT_DATA_RATE_25HZ + * 0x07 | BMI160_GYRO_OUTPUT_DATA_RATE_50HZ + * 0x08 | BMI160_GYRO_OUTPUT_DATA_RATE_100HZ + * 0x09 | BMI160_GYRO_OUTPUT_DATA_RATE_200HZ + * 0x0A | BMI160_GYRO_OUTPUT_DATA_RATE_400HZ + * 0x0B | BMI160_GYRO_OUTPUT_DATA_RATE_800HZ + * 0x0C | BMI160_GYRO_OUTPUT_DATA_RATE_1600HZ + * 0x0D | BMI160_GYRO_OUTPUT_DATA_RATE_3200HZ + * 0x0E | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x0F | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_output_data_rate( +u8 *v_output_data_rate_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the gyro output data rate*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_output_data_rate_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE); + } + return com_rslt; +} +/*! + * @brief This API is used to set the + * gyroscope output data rate from the register 0x42 bit 0 to 3 + * + * + * + * + * @param v_output_data_rate_u8 :The value of gyro output data rate + * value | gyro output data rate + * -----------|----------------------------- + * 0x00 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x01 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x02 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x03 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x04 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x05 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x06 | BMI160_GYRO_OUTPUT_DATA_RATE_25HZ + * 0x07 | BMI160_GYRO_OUTPUT_DATA_RATE_50HZ + * 0x08 | BMI160_GYRO_OUTPUT_DATA_RATE_100HZ + * 0x09 | BMI160_GYRO_OUTPUT_DATA_RATE_200HZ + * 0x0A | BMI160_GYRO_OUTPUT_DATA_RATE_400HZ + * 0x0B | BMI160_GYRO_OUTPUT_DATA_RATE_800HZ + * 0x0C | BMI160_GYRO_OUTPUT_DATA_RATE_1600HZ + * 0x0D | BMI160_GYRO_OUTPUT_DATA_RATE_3200HZ + * 0x0E | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x0F | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_output_data_rate( +u8 v_output_data_rate_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* select the gyro output data rate*/ + if ((v_output_data_rate_u8 < BMI160_OUTPUT_DATA_RATE6) && + (v_output_data_rate_u8 != BMI160_INIT_VALUE) + && (v_output_data_rate_u8 != BMI160_OUTPUT_DATA_RATE1) + && (v_output_data_rate_u8 != BMI160_OUTPUT_DATA_RATE2) + && (v_output_data_rate_u8 != BMI160_OUTPUT_DATA_RATE3) + && (v_output_data_rate_u8 != BMI160_OUTPUT_DATA_RATE4) + && (v_output_data_rate_u8 != BMI160_OUTPUT_DATA_RATE5) + && (v_output_data_rate_u8 != BMI160_OUTPUT_DATA_RATE6) + && (v_output_data_rate_u8 != BMI160_OUTPUT_DATA_RATE7)) { + /* write the gyro output data rate */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE, + v_output_data_rate_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to get the + * data of gyro from the register 0x42 bit 4 to 5 + * + * + * + * + * @param v_bw_u8 : The value of gyro bandwidth + * value | gyro bandwidth + * ----------|---------------- + * 0x00 | BMI160_GYRO_OSR4_MODE + * 0x01 | BMI160_GYRO_OSR2_MODE + * 0x02 | BMI160_GYRO_NORMAL_MODE + * 0x03 | BMI160_GYRO_CIC_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_bw(u8 *v_bw_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro bandwidth*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_GYRO_CONFIG_BW__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_bw_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_CONFIG_BW); + } + return com_rslt; +} +/*! + * @brief This API is used to set the + * data of gyro from the register 0x42 bit 4 to 5 + * + * + * + * + * @param v_bw_u8 : The value of gyro bandwidth + * value | gyro bandwidth + * ----------|---------------- + * 0x00 | BMI160_GYRO_OSR4_MODE + * 0x01 | BMI160_GYRO_OSR2_MODE + * 0x02 | BMI160_GYRO_NORMAL_MODE + * 0x03 | BMI160_GYRO_CIC_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_bw(u8 v_bw_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_bw_u8 <= BMI160_MAX_GYRO_BW) { + /* write the gyro bandwidth*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_GYRO_CONFIG_BW__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_CONFIG_BW, v_bw_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_CONFIG_BW__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API reads the range + * of gyro from the register 0x43 bit 0 to 2 + * + * @param v_range_u8 : The value of gyro range + * value | range + * ----------|------------------------------- + * 0x00 | BMI160_GYRO_RANGE_2000_DEG_SEC + * 0x01 | BMI160_GYRO_RANGE_1000_DEG_SEC + * 0x02 | BMI160_GYRO_RANGE_500_DEG_SEC + * 0x03 | BMI160_GYRO_RANGE_250_DEG_SEC + * 0x04 | BMI160_GYRO_RANGE_125_DEG_SEC + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_range(u8 *v_range_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the gyro range */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_GYRO_RANGE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_range_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_RANGE); + } + return com_rslt; +} +/*! + * @brief This API set the range + * of gyro from the register 0x43 bit 0 to 2 + * + * @param v_range_u8 : The value of gyro range + * value | range + * ----------|------------------------------- + * 0x00 | BMI160_GYRO_RANGE_2000_DEG_SEC + * 0x01 | BMI160_GYRO_RANGE_1000_DEG_SEC + * 0x02 | BMI160_GYRO_RANGE_500_DEG_SEC + * 0x03 | BMI160_GYRO_RANGE_250_DEG_SEC + * 0x04 | BMI160_GYRO_RANGE_125_DEG_SEC + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_range(u8 v_range_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_range_u8 <= BMI160_MAX_GYRO_RANGE) { + /* write the gyro range value */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_GYRO_RANGE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_RANGE, + v_range_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_GYRO_RANGE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to get the + * output data rate of magnetometer from the register 0x44 bit 0 to 3 + * + * + * + * + * @param v_output_data_rat_u8e : The value of mag output data rate + * value | mag output data rate + * ---------|--------------------------- + * 0x00 |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED + * 0x01 |BMI160_MAG_OUTPUT_DATA_RATE_0_78HZ + * 0x02 |BMI160_MAG_OUTPUT_DATA_RATE_1_56HZ + * 0x03 |BMI160_MAG_OUTPUT_DATA_RATE_3_12HZ + * 0x04 |BMI160_MAG_OUTPUT_DATA_RATE_6_25HZ + * 0x05 |BMI160_MAG_OUTPUT_DATA_RATE_12_5HZ + * 0x06 |BMI160_MAG_OUTPUT_DATA_RATE_25HZ + * 0x07 |BMI160_MAG_OUTPUT_DATA_RATE_50HZ + * 0x08 |BMI160_MAG_OUTPUT_DATA_RATE_100HZ + * 0x09 |BMI160_MAG_OUTPUT_DATA_RATE_200HZ + * 0x0A |BMI160_MAG_OUTPUT_DATA_RATE_400HZ + * 0x0B |BMI160_MAG_OUTPUT_DATA_RATE_800HZ + * 0x0C |BMI160_MAG_OUTPUT_DATA_RATE_1600HZ + * 0x0D |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED0 + * 0x0E |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED1 + * 0x0F |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED2 + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_output_data_rate( +u8 *v_output_data_rat_u8e) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the mag data output rate*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_output_data_rat_u8e = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE); + } + return com_rslt; +} +/*! + * @brief This API is used to set the + * output data rate of magnetometer from the register 0x44 bit 0 to 3 + * + * + * + * + * @param v_output_data_rat_u8e : The value of mag output data rate + * value | mag output data rate + * ---------|--------------------------- + * 0x00 |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED + * 0x01 |BMI160_MAG_OUTPUT_DATA_RATE_0_78HZ + * 0x02 |BMI160_MAG_OUTPUT_DATA_RATE_1_56HZ + * 0x03 |BMI160_MAG_OUTPUT_DATA_RATE_3_12HZ + * 0x04 |BMI160_MAG_OUTPUT_DATA_RATE_6_25HZ + * 0x05 |BMI160_MAG_OUTPUT_DATA_RATE_12_5HZ + * 0x06 |BMI160_MAG_OUTPUT_DATA_RATE_25HZ + * 0x07 |BMI160_MAG_OUTPUT_DATA_RATE_50HZ + * 0x08 |BMI160_MAG_OUTPUT_DATA_RATE_100HZ + * 0x09 |BMI160_MAG_OUTPUT_DATA_RATE_200HZ + * 0x0A |BMI160_MAG_OUTPUT_DATA_RATE_400HZ + * 0x0B |BMI160_MAG_OUTPUT_DATA_RATE_800HZ + * 0x0C |BMI160_MAG_OUTPUT_DATA_RATE_1600HZ + * 0x0D |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED0 + * 0x0E |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED1 + * 0x0F |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED2 + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_output_data_rate( +u8 v_output_data_rat_u8e) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* select the mag data output rate*/ + if ((v_output_data_rat_u8e + <= BMI160_MAX_ACCEL_OUTPUT_DATA_RATE) + && (v_output_data_rat_u8e + != BMI160_OUTPUT_DATA_RATE0) + && (v_output_data_rat_u8e + != BMI160_OUTPUT_DATA_RATE6) + && (v_output_data_rat_u8e + != BMI160_OUTPUT_DATA_RATE7)) { + /* write the mag data output rate*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE, + v_output_data_rat_u8e); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} + /*! + * @brief This API is used to read Down sampling + * for gyro (2**downs_gyro) in the register 0x45 bit 0 to 2 + * + * + * + * + * @param v_fifo_down_gyro_u8 :The value of gyro fifo down + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_gyro( +u8 *v_fifo_down_gyro_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the gyro fifo down*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_DOWN_GYRO__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_down_gyro_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_DOWN_GYRO); + } + return com_rslt; +} + /*! + * @brief This API is used to set Down sampling + * for gyro (2**downs_gyro) in the register 0x45 bit 0 to 2 + * + * + * + * + * @param v_fifo_down_gyro_u8 :The value of gyro fifo down + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_gyro( +u8 v_fifo_down_gyro_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write the gyro fifo down*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_DOWN_GYRO__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE( + v_data_u8, + BMI160_USER_FIFO_DOWN_GYRO, + v_fifo_down_gyro_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FIFO_DOWN_GYRO__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} +/*! + * @brief This API is used to read gyro fifo filter data + * from the register 0x45 bit 3 + * + * + * + * @param v_gyro_fifo_filter_data_u8 :The value of gyro filter data + * value | gyro_fifo_filter_data + * ------------|------------------------- + * 0x00 | Unfiltered data + * 0x01 | Filtered data + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_fifo_filter_data( +u8 *v_gyro_fifo_filter_data_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the gyro fifo filter data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_FILTER_GYRO__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_gyro_fifo_filter_data_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_FILTER_GYRO); + } + return com_rslt; +} +/*! + * @brief This API is used to set gyro fifo filter data + * from the register 0x45 bit 3 + * + * + * + * @param v_gyro_fifo_filter_data_u8 :The value of gyro filter data + * value | gyro_fifo_filter_data + * ------------|------------------------- + * 0x00 | Unfiltered data + * 0x01 | Filtered data + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_fifo_filter_data( +u8 v_gyro_fifo_filter_data_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_gyro_fifo_filter_data_u8 + <= BMI160_MAX_VALUE_FIFO_FILTER) { + /* write the gyro fifo filter data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_FILTER_GYRO__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE( + v_data_u8, + BMI160_USER_FIFO_FILTER_GYRO, + v_gyro_fifo_filter_data_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FIFO_FILTER_GYRO__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to read Down sampling + * for accel (2*downs_accel) from the register 0x45 bit 4 to 6 + * + * + * + * + * @param v_fifo_down_u8 :The value of accel fifo down + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_accel( +u8 *v_fifo_down_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the accel fifo down data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_DOWN_ACCEL__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_down_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_DOWN_ACCEL); + } + return com_rslt; +} + /*! + * @brief This API is used to set Down sampling + * for accel (2*downs_accel) from the register 0x45 bit 4 to 6 + * + * + * + * + * @param v_fifo_down_u8 :The value of accel fifo down + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_accel( +u8 v_fifo_down_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write the accel fifo down data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_DOWN_ACCEL__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_DOWN_ACCEL, v_fifo_down_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FIFO_DOWN_ACCEL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} +/*! + * @brief This API is used to read accel fifo filter data + * from the register 0x45 bit 7 + * + * + * + * @param v_accel_fifo_filter_u8 :The value of accel filter data + * value | accel_fifo_filter_data + * ------------|------------------------- + * 0x00 | Unfiltered data + * 0x01 | Filtered data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_fifo_filter_data( +u8 *v_accel_fifo_filter_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the accel fifo filter data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_FILTER_ACCEL__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_accel_fifo_filter_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_FILTER_ACCEL); + } + return com_rslt; +} +/*! + * @brief This API is used to set accel fifo filter data + * from the register 0x45 bit 7 + * + * + * + * @param v_accel_fifo_filter_u8 :The value of accel filter data + * value | accel_fifo_filter_data + * ------------|------------------------- + * 0x00 | Unfiltered data + * 0x01 | Filtered data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_fifo_filter_data( +u8 v_accel_fifo_filter_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_accel_fifo_filter_u8 <= BMI160_MAX_VALUE_FIFO_FILTER) { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_FILTER_ACCEL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + /* write accel fifo filter data */ + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_FILTER_ACCEL, + v_accel_fifo_filter_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FIFO_FILTER_ACCEL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to Trigger an interrupt + * when FIFO contains water mark level from the register 0x46 bit 0 to 7 + * + * + * + * @param v_fifo_wm_u8 : The value of fifo water mark level + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_wm( +u8 *v_fifo_wm_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the fifo water mark level*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_WM__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_wm_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_WM); + } + return com_rslt; +} +/*! + * @brief This API is used to Trigger an interrupt + * when FIFO contains water mark level from the register 0x46 bit 0 to 7 + * + * + * + * @param v_fifo_wm_u8 : The value of fifo water mark level + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_wm( +u8 v_fifo_wm_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write the fifo water mark level*/ + com_rslt = + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_WM__REG, + &v_fifo_wm_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + return com_rslt; +} +/*! + * @brief This API reads fifo sensor time + * frame after the last valid data frame form the register 0x47 bit 1 + * + * + * + * + * @param v_fifo_time_enable_u8 : The value of sensor time + * value | fifo sensor time + * ------------|------------------------- + * 0x00 | do not return sensortime frame + * 0x01 | return sensortime frame + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_time_enable( +u8 *v_fifo_time_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the fifo sensor time*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_TIME_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_time_enable_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_TIME_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API set fifo sensor time + * frame after the last valid data frame form the register 0x47 bit 1 + * + * + * + * + * @param v_fifo_time_enable_u8 : The value of sensor time + * value | fifo sensor time + * ------------|------------------------- + * 0x00 | do not return sensortime frame + * 0x01 | return sensortime frame + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_time_enable( +u8 v_fifo_time_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_fifo_time_enable_u8 <= BMI160_MAX_VALUE_FIFO_TIME) { + /* write the fifo sensor time*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_TIME_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_TIME_ENABLE, + v_fifo_time_enable_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FIFO_TIME_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API reads FIFO tag interrupt2 enable status + * from the resister 0x47 bit 2 + * + * @param v_fifo_tag_intr2_u8 : The value of fifo tag interrupt + * value | fifo tag interrupt + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr2_enable( +u8 *v_fifo_tag_intr2_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the fifo tag interrupt2*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_TAG_INTR2_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_tag_intr2_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_TAG_INTR2_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API set FIFO tag interrupt2 enable status + * from the resister 0x47 bit 2 + * + * @param v_fifo_tag_intr2_u8 : The value of fifo tag interrupt + * value | fifo tag interrupt + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr2_enable( +u8 v_fifo_tag_intr2_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_fifo_tag_intr2_u8 <= BMI160_MAX_VALUE_FIFO_INTR) { + /* write the fifo tag interrupt2*/ + com_rslt = bmi160_set_input_enable(1, + v_fifo_tag_intr2_u8); + com_rslt += + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_TAG_INTR2_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_TAG_INTR2_ENABLE, + v_fifo_tag_intr2_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FIFO_TAG_INTR2_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API get FIFO tag interrupt1 enable status + * from the resister 0x47 bit 3 + * + * @param v_fifo_tag_intr1_u8 :The value of fifo tag interrupt1 + * value | fifo tag interrupt + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr1_enable( +u8 *v_fifo_tag_intr1_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read fifo tag interrupt*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_TAG_INTR1_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_tag_intr1_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_TAG_INTR1_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API set FIFO tag interrupt1 enable status + * from the resister 0x47 bit 3 + * + * @param v_fifo_tag_intr1_u8 :The value of fifo tag interrupt1 + * value | fifo tag interrupt + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr1_enable( +u8 v_fifo_tag_intr1_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_fifo_tag_intr1_u8 <= BMI160_MAX_VALUE_FIFO_INTR) { + /* write the fifo tag interrupt*/ + com_rslt = bmi160_set_input_enable(BMI160_INIT_VALUE, + v_fifo_tag_intr1_u8); + com_rslt += + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_TAG_INTR1_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_TAG_INTR1_ENABLE, + v_fifo_tag_intr1_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FIFO_TAG_INTR1_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API reads FIFO frame + * header enable from the register 0x47 bit 4 + * + * @param v_fifo_header_u8 :The value of fifo header + * value | fifo header + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_header_enable( +u8 *v_fifo_header_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read fifo header */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_HEADER_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_header_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_HEADER_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API set FIFO frame + * header enable from the register 0x47 bit 4 + * + * @param v_fifo_header_u8 :The value of fifo header + * value | fifo header + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_header_enable( +u8 v_fifo_header_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_fifo_header_u8 <= BMI160_MAX_VALUE_FIFO_HEADER) { + /* write the fifo header */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_HEADER_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_HEADER_ENABLE, + v_fifo_header_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FIFO_HEADER_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to read stored + * magnetometer data in FIFO (all 3 axes) from the register 0x47 bit 5 + * + * @param v_fifo_mag_u8 : The value of fifo mag enble + * value | fifo mag + * ----------|------------------- + * 0x00 | no magnetometer data is stored + * 0x01 | magnetometer data is stored + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_mag_enable( +u8 *v_fifo_mag_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the fifo mag enable*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_MAG_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_mag_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_MAG_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API is used to set stored + * magnetometer data in FIFO (all 3 axes) from the register 0x47 bit 5 + * + * @param v_fifo_mag_u8 : The value of fifo mag enble + * value | fifo mag + * ----------|------------------- + * 0x00 | no magnetometer data is stored + * 0x01 | magnetometer data is stored + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_mag_enable( +u8 v_fifo_mag_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_fifo_mag_u8 <= BMI160_MAX_VALUE_FIFO_MAG) { + /* write the fifo mag enable*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_FIFO_MAG_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_MAG_ENABLE, + v_fifo_mag_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_FIFO_MAG_ENABLE__REG, + &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to read stored + * accel data in FIFO (all 3 axes) from the register 0x47 bit 6 + * + * @param v_fifo_accel_u8 : The value of fifo accel enble + * value | fifo accel + * ----------|------------------- + * 0x00 | no accel data is stored + * 0x01 | accel data is stored + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_accel_enable( +u8 *v_fifo_accel_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the accel fifo enable*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_ACCEL_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_accel_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_ACCEL_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API is used to set stored + * accel data in FIFO (all 3 axes) from the register 0x47 bit 6 + * + * @param v_fifo_accel_u8 : The value of fifo accel enble + * value | fifo accel + * ----------|------------------- + * 0x00 | no accel data is stored + * 0x01 | accel data is stored + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_accel_enable( +u8 v_fifo_accel_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_fifo_accel_u8 <= BMI160_MAX_VALUE_FIFO_ACCEL) { + /* write the fifo mag enables*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_ACCEL_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_ACCEL_ENABLE, v_fifo_accel_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FIFO_ACCEL_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to read stored + * gyro data in FIFO (all 3 axes) from the resister 0x47 bit 7 + * + * + * @param v_fifo_gyro_u8 : The value of fifo gyro enble + * value | fifo gyro + * ----------|------------------- + * 0x00 | no gyro data is stored + * 0x01 | gyro data is stored + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_gyro_enable( +u8 *v_fifo_gyro_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read fifo gyro enable */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_GYRO_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_fifo_gyro_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_GYRO_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API is used to set stored + * gyro data in FIFO (all 3 axes) from the resister 0x47 bit 7 + * + * + * @param v_fifo_gyro_u8 : The value of fifo gyro enble + * value | fifo gyro + * ----------|------------------- + * 0x00 | no gyro data is stored + * 0x01 | gyro data is stored + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_gyro_enable( +u8 v_fifo_gyro_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_fifo_gyro_u8 <= BMI160_MAX_VALUE_FIFO_GYRO) { + /* write fifo gyro enable*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_FIFO_GYRO_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FIFO_GYRO_ENABLE, v_fifo_gyro_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FIFO_GYRO_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to read + * I2C device address of auxiliary mag from the register 0x4B bit 1 to 7 + * + * + * + * + * @param v_i2c_device_addr_u8 : The value of mag I2C device address + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_device_addr( +u8 *v_i2c_device_addr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the mag I2C device address*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_I2C_DEVICE_ADDR__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_i2c_device_addr_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_I2C_DEVICE_ADDR); + } + return com_rslt; +} +/*! + * @brief This API is used to set + * I2C device address of auxiliary mag from the register 0x4B bit 1 to 7 + * + * + * + * + * @param v_i2c_device_addr_u8 : The value of mag I2C device address + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_device_addr( +u8 v_i2c_device_addr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write the mag I2C device address*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_I2C_DEVICE_ADDR__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_I2C_DEVICE_ADDR, + v_i2c_device_addr_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_I2C_DEVICE_ADDR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} +/*! + * @brief This API is used to read + * Burst data length (1,2,6,8 byte) from the register 0x4C bit 0 to 1 + * + * + * + * + * @param v_mag_burst_u8 : The data of mag burst read lenth + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_burst( +u8 *v_mag_burst_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read mag burst mode length*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_BURST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_mag_burst_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_MAG_BURST); + } + return com_rslt; +} +/*! + * @brief This API is used to set + * Burst data length (1,2,6,8 byte) from the register 0x4C bit 0 to 1 + * + * + * + * + * @param v_mag_burst_u8 : The data of mag burst read lenth + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_burst( +u8 v_mag_burst_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write mag burst mode length*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_BURST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_MAG_BURST, v_mag_burst_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_MAG_BURST__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} +/*! + * @brief This API is used to read + * trigger-readout offset in units of 2.5 ms. If set to zero, + * the offset is maximum, i.e. after readout a trigger + * is issued immediately. from the register 0x4C bit 2 to 5 + * + * + * + * + * @param v_mag_offset_u8 : The value of mag offset + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_offset( +u8 *v_mag_offset_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_OFFSET__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_mag_offset_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_MAG_OFFSET); + } + return com_rslt; +} +/*! + * @brief This API is used to set + * trigger-readout offset in units of 2.5 ms. If set to zero, + * the offset is maximum, i.e. after readout a trigger + * is issued immediately. from the register 0x4C bit 2 to 5 + * + * + * + * + * @param v_mag_offset_u8 : The value of mag offset + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_offset( +u8 v_mag_offset_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_OFFSET__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_MAG_OFFSET, v_mag_offset_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_OFFSET__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } +return com_rslt; +} +/*! + * @brief This API is used to read + * Enable register access on MAG_IF[2] or MAG_IF[3] writes. + * This implies that the DATA registers are not updated with + * magnetometer values. Accessing magnetometer requires + * the magnetometer in normal mode in PMU_STATUS. + * from the register 0x4C bit 7 + * + * + * + * @param v_mag_manual_u8 : The value of mag manual enable + * value | mag manual + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_enable( +u8 *v_mag_manual_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read mag manual */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_MANUAL_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_mag_manual_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_MAG_MANUAL_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API is used to set + * Enable register access on MAG_IF[2] or MAG_IF[3] writes. + * This implies that the DATA registers are not updated with + * magnetometer values. Accessing magnetometer requires + * the magnetometer in normal mode in PMU_STATUS. + * from the register 0x4C bit 7 + * + * + * + * @param v_mag_manual_u8 : The value of mag manual enable + * value | mag manual + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_manual_enable( +u8 v_mag_manual_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = BMI160_INIT_VALUE; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write the mag manual*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_MANUAL_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + if (com_rslt == SUCCESS) { + /* set the bit of mag manual enable*/ + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_MAG_MANUAL_ENABLE, v_mag_manual_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160->dev_addr, + BMI160_USER_MAG_MANUAL_ENABLE__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + if (com_rslt == SUCCESS) + p_bmi160->mag_manual_enable = v_mag_manual_u8; + else + p_bmi160->mag_manual_enable = E_BMI160_COMM_RES; + } +return com_rslt; +} +/*! + * @brief This API is used to read data + * magnetometer address to read from the register 0x4D bit 0 to 7 + * @brief It used to provide mag read address of auxiliary mag + * + * + * + * + * @param v_mag_read_addr_u8 : The value of address need to be read + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_read_addr( +u8 *v_mag_read_addr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the written address*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_READ_ADDR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_mag_read_addr_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_READ_ADDR); + } + return com_rslt; +} +/*! + * @brief This API is used to set + * magnetometer write address from the register 0x4D bit 0 to 7 + * @brief mag write address writes the address of auxiliary mag to write + * + * + * + * @param v_mag_read_addr_u8: + * The data of auxiliary mag address to write data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_read_addr( +u8 v_mag_read_addr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write the mag read address*/ + com_rslt = + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160->dev_addr, + BMI160_USER_READ_ADDR__REG, &v_mag_read_addr_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + return com_rslt; +} +/*! + * @brief This API is used to read + * magnetometer write address from the register 0x4E bit 0 to 7 + * @brief mag write address writes the address of auxiliary mag to write + * + * + * + * @param v_mag_write_addr_u8: + * The data of auxiliary mag address to write data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_addr( +u8 *v_mag_write_addr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the address of last written */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_WRITE_ADDR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_mag_write_addr_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_WRITE_ADDR); + } + return com_rslt; +} +/*! + * @brief This API is used to set + * magnetometer write address from the register 0x4E bit 0 to 7 + * @brief mag write address writes the address of auxiliary mag to write + * + * + * + * @param v_mag_write_addr_u8: + * The data of auxiliary mag address to write data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_addr( +u8 v_mag_write_addr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write the data of mag address to write data */ + com_rslt = + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160->dev_addr, + BMI160_USER_WRITE_ADDR__REG, &v_mag_write_addr_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + return com_rslt; +} +/*! + * @brief This API is used to read magnetometer write data + * form the resister 0x4F bit 0 to 7 + * @brief This writes the data will be wrote to mag + * + * + * + * @param v_mag_write_data_u8: The value of mag data + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_data( +u8 *v_mag_write_data_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_WRITE_DATA__REG, &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_mag_write_data_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_WRITE_DATA); + } + return com_rslt; +} +/*! + * @brief This API is used to set magnetometer write data + * form the resister 0x4F bit 0 to 7 + * @brief This writes the data will be wrote to mag + * + * + * + * @param v_mag_write_data_u8: The value of mag data + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_data( +u8 v_mag_write_data_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160->dev_addr, + BMI160_USER_WRITE_DATA__REG, &v_mag_write_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + return com_rslt; +} +/*! + * @brief This API is used to read + * interrupt enable from the register 0x50 bit 0 to 7 + * + * + * + * + * @param v_enable_u8 : Value to decided to select interrupt + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_ANY_MOTION_X_ENABLE + * 1 | BMI160_ANY_MOTION_Y_ENABLE + * 2 | BMI160_ANY_MOTION_Z_ENABLE + * 3 | BMI160_DOUBLE_TAP_ENABLE + * 4 | BMI160_SINGLE_TAP_ENABLE + * 5 | BMI160_ORIENT_ENABLE + * 6 | BMI160_FLAT_ENABLE + * + * @param v_intr_enable_zero_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_0( +u8 v_enable_u8, u8 *v_intr_enable_zero_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* select interrupt to read*/ + switch (v_enable_u8) { + case BMI160_ANY_MOTION_X_ENABLE: + /* read the any motion interrupt x data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_zero_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE); + break; + case BMI160_ANY_MOTION_Y_ENABLE: + /* read the any motion interrupt y data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_zero_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE); + break; + case BMI160_ANY_MOTION_Z_ENABLE: + /* read the any motion interrupt z data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_zero_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE); + break; + case BMI160_DOUBLE_TAP_ENABLE: + /* read the double tap interrupt data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_zero_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE); + break; + case BMI160_SINGLE_TAP_ENABLE: + /* read the single tap interrupt data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_zero_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE); + break; + case BMI160_ORIENT_ENABLE: + /* read the orient interrupt data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_zero_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE); + break; + case BMI160_FLAT_ENABLE: + /* read the flat interrupt data */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_zero_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief This API is used to set + * interrupt enable from the register 0x50 bit 0 to 7 + * + * + * + * + * @param v_enable_u8 : Value to decided to select interrupt + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_ANY_MOTION_X_ENABLE + * 1 | BMI160_ANY_MOTION_Y_ENABLE + * 2 | BMI160_ANY_MOTION_Z_ENABLE + * 3 | BMI160_DOUBLE_TAP_ENABLE + * 4 | BMI160_SINGLE_TAP_ENABLE + * 5 | BMI160_ORIENT_ENABLE + * 6 | BMI160_FLAT_ENABLE + * + * @param v_intr_enable_zero_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_0( +u8 v_enable_u8, u8 v_intr_enable_zero_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_enable_u8) { + case BMI160_ANY_MOTION_X_ENABLE: + /* write any motion x*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE, + v_intr_enable_zero_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_ANY_MOTION_Y_ENABLE: + /* write any motion y*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE, + v_intr_enable_zero_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_ANY_MOTION_Z_ENABLE: + /* write any motion z*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE, + v_intr_enable_zero_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_DOUBLE_TAP_ENABLE: + /* write double tap*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE, + v_intr_enable_zero_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_SINGLE_TAP_ENABLE: + /* write single tap */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE, + v_intr_enable_zero_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_ORIENT_ENABLE: + /* write orient interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE, + v_intr_enable_zero_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_FLAT_ENABLE: + /* write flat interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE, + v_intr_enable_zero_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} +/*! + * @brief This API is used to read + * interrupt enable byte1 from the register 0x51 bit 0 to 6 + * @brief It read the high_g_x,high_g_y,high_g_z,low_g_enable + * data ready, fifo full and fifo water mark. + * + * + * + * @param v_enable_u8 : The value of interrupt enable + * @param v_enable_u8 : Value to decided to select interrupt + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_HIGH_G_X_ENABLE + * 1 | BMI160_HIGH_G_Y_ENABLE + * 2 | BMI160_HIGH_G_Z_ENABLE + * 3 | BMI160_LOW_G_ENABLE + * 4 | BMI160_DATA_RDY_ENABLE + * 5 | BMI160_FIFO_FULL_ENABLE + * 6 | BMI160_FIFO_WM_ENABLE + * + * @param v_intr_enable_1_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_1( +u8 v_enable_u8, u8 *v_intr_enable_1_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_enable_u8) { + case BMI160_HIGH_G_X_ENABLE: + /* read high_g_x interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_1_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE); + break; + case BMI160_HIGH_G_Y_ENABLE: + /* read high_g_y interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_1_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE); + break; + case BMI160_HIGH_G_Z_ENABLE: + /* read high_g_z interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_1_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE); + break; + case BMI160_LOW_G_ENABLE: + /* read low_g interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_1_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE); + break; + case BMI160_DATA_RDY_ENABLE: + /* read data ready interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_1_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE); + break; + case BMI160_FIFO_FULL_ENABLE: + /* read fifo full interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_1_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE); + break; + case BMI160_FIFO_WM_ENABLE: + /* read fifo water mark interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_1_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief This API is used to set + * interrupt enable byte1 from the register 0x51 bit 0 to 6 + * @brief It read the high_g_x,high_g_y,high_g_z,low_g_enable + * data ready, fifo full and fifo water mark. + * + * + * + * @param v_enable_u8 : The value of interrupt enable + * @param v_enable_u8 : Value to decided to select interrupt + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_HIGH_G_X_ENABLE + * 1 | BMI160_HIGH_G_Y_ENABLE + * 2 | BMI160_HIGH_G_Z_ENABLE + * 3 | BMI160_LOW_G_ENABLE + * 4 | BMI160_DATA_RDY_ENABLE + * 5 | BMI160_FIFO_FULL_ENABLE + * 6 | BMI160_FIFO_WM_ENABLE + * + * @param v_intr_enable_1_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_1( +u8 v_enable_u8, u8 v_intr_enable_1_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_enable_u8) { + case BMI160_HIGH_G_X_ENABLE: + /* write high_g_x interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE, + v_intr_enable_1_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_HIGH_G_Y_ENABLE: + /* write high_g_y interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE, + v_intr_enable_1_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_HIGH_G_Z_ENABLE: + /* write high_g_z interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE, + v_intr_enable_1_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_LOW_G_ENABLE: + /* write low_g interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE, + v_intr_enable_1_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_DATA_RDY_ENABLE: + /* write data ready interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE, + v_intr_enable_1_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_FIFO_FULL_ENABLE: + /* write fifo full interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE, + v_intr_enable_1_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_FIFO_WM_ENABLE: + /* write fifo water mark interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE, + v_intr_enable_1_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief This API is used to read + * interrupt enable byte2 from the register bit 0x52 bit 0 to 3 + * @brief It reads no motion x,y and z + * + * + * + * @param v_enable_u8: The value of interrupt enable + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_NOMOTION_X_ENABLE + * 1 | BMI160_NOMOTION_Y_ENABLE + * 2 | BMI160_NOMOTION_Z_ENABLE + * + * @param v_intr_enable_2_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_2( +u8 v_enable_u8, u8 *v_intr_enable_2_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_enable_u8) { + case BMI160_NOMOTION_X_ENABLE: + /* read no motion x */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_2_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE); + break; + case BMI160_NOMOTION_Y_ENABLE: + /* read no motion y */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_2_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE); + break; + case BMI160_NOMOTION_Z_ENABLE: + /* read no motion z */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_enable_2_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief This API is used to set + * interrupt enable byte2 from the register bit 0x52 bit 0 to 3 + * @brief It reads no motion x,y and z + * + * + * + * @param v_enable_u8: The value of interrupt enable + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_NOMOTION_X_ENABLE + * 1 | BMI160_NOMOTION_Y_ENABLE + * 2 | BMI160_NOMOTION_Z_ENABLE + * + * @param v_intr_enable_2_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_2( +u8 v_enable_u8, u8 v_intr_enable_2_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_enable_u8) { + case BMI160_NOMOTION_X_ENABLE: + /* write no motion x */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE, + v_intr_enable_2_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_NOMOTION_Y_ENABLE: + /* write no motion y */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE, + v_intr_enable_2_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_NOMOTION_Z_ENABLE: + /* write no motion z */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE, + v_intr_enable_2_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} + /*! + * @brief This API is used to read + * interrupt enable step detector interrupt from + * the register bit 0x52 bit 3 + * + * + * + * + * @param v_step_intr_u8 : The value of step detector interrupt enable + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_detector_enable( +u8 *v_step_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the step detector interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_step_intr_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE); + } + return com_rslt; +} + /*! + * @brief This API is used to set + * interrupt enable step detector interrupt from + * the register bit 0x52 bit 3 + * + * + * + * + * @param v_step_intr_u8 : The value of step detector interrupt enable + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_detector_enable( +u8 v_step_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE, + v_step_intr_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} +/*! + * @brief Configure trigger condition of interrupt1 + * and interrupt2 pin from the register 0x53 + * @brief interrupt1 - bit 0 + * @brief interrupt2 - bit 4 + * + * @param v_channel_u8: The value of edge trigger selection + * v_channel_u8 | Edge trigger + * ---------------|--------------- + * 0 | BMI160_INTR1_EDGE_CTRL + * 1 | BMI160_INTR2_EDGE_CTRL + * + * @param v_intr_edge_ctrl_u8 : The value of edge trigger enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_EDGE + * 0x00 | BMI160_LEVEL + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_edge_ctrl( +u8 v_channel_u8, u8 *v_intr_edge_ctrl_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + case BMI160_INTR1_EDGE_CTRL: + /* read the edge trigger interrupt1*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_EDGE_CTRL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_edge_ctrl_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR1_EDGE_CTRL); + break; + case BMI160_INTR2_EDGE_CTRL: + /* read the edge trigger interrupt2*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_EDGE_CTRL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_edge_ctrl_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR2_EDGE_CTRL); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Configure trigger condition of interrupt1 + * and interrupt2 pin from the register 0x53 + * @brief interrupt1 - bit 0 + * @brief interrupt2 - bit 4 + * + * @param v_channel_u8: The value of edge trigger selection + * v_channel_u8 | Edge trigger + * ---------------|--------------- + * 0 | BMI160_INTR1_EDGE_CTRL + * 1 | BMI160_INTR2_EDGE_CTRL + * + * @param v_intr_edge_ctrl_u8 : The value of edge trigger enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_EDGE + * 0x00 | BMI160_LEVEL + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_edge_ctrl( +u8 v_channel_u8, u8 v_intr_edge_ctrl_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + case BMI160_INTR1_EDGE_CTRL: + /* write the edge trigger interrupt1*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_EDGE_CTRL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR1_EDGE_CTRL, + v_intr_edge_ctrl_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_EDGE_CTRL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_EDGE_CTRL: + /* write the edge trigger interrupt2*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_EDGE_CTRL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR2_EDGE_CTRL, + v_intr_edge_ctrl_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_EDGE_CTRL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief API used for get the Configure level condition of interrupt1 + * and interrupt2 pin form the register 0x53 + * @brief interrupt1 - bit 1 + * @brief interrupt2 - bit 5 + * + * @param v_channel_u8: The value of level condition selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_LEVEL + * 1 | BMI160_INTR2_LEVEL + * + * @param v_intr_level_u8 : The value of level of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_LEVEL_HIGH + * 0x00 | BMI160_LEVEL_LOW + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_level( +u8 v_channel_u8, u8 *v_intr_level_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + case BMI160_INTR1_LEVEL: + /* read the interrupt1 level*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_LEVEL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_level_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR1_LEVEL); + break; + case BMI160_INTR2_LEVEL: + /* read the interrupt2 level*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_LEVEL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_level_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR2_LEVEL); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief API used for set the Configure level condition of interrupt1 + * and interrupt2 pin form the register 0x53 + * @brief interrupt1 - bit 1 + * @brief interrupt2 - bit 5 + * + * @param v_channel_u8: The value of level condition selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_LEVEL + * 1 | BMI160_INTR2_LEVEL + * + * @param v_intr_level_u8 : The value of level of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_LEVEL_HIGH + * 0x00 | BMI160_LEVEL_LOW + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_level( +u8 v_channel_u8, u8 v_intr_level_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + case BMI160_INTR1_LEVEL: + /* write the interrupt1 level*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_LEVEL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR1_LEVEL, v_intr_level_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_LEVEL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_LEVEL: + /* write the interrupt2 level*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_LEVEL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR2_LEVEL, v_intr_level_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_LEVEL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief API used to get configured output enable of interrupt1 + * and interrupt2 from the register 0x53 + * @brief interrupt1 - bit 2 + * @brief interrupt2 - bit 6 + * + * + * @param v_channel_u8: The value of output type enable selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_OUTPUT_TYPE + * 1 | BMI160_INTR2_OUTPUT_TYPE + * + * @param v_intr_output_type_u8 : + * The value of output type of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_OPEN_DRAIN + * 0x00 | BMI160_PUSH_PULL + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_output_type( +u8 v_channel_u8, u8 *v_intr_output_type_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + case BMI160_INTR1_OUTPUT_TYPE: + /* read the output type of interrupt1*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_OUTPUT_TYPE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_output_type_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR1_OUTPUT_TYPE); + break; + case BMI160_INTR2_OUTPUT_TYPE: + /* read the output type of interrupt2*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_OUTPUT_TYPE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_output_type_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR2_OUTPUT_TYPE); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief API used to set output enable of interrupt1 + * and interrupt2 from the register 0x53 + * @brief interrupt1 - bit 2 + * @brief interrupt2 - bit 6 + * + * + * @param v_channel_u8: The value of output type enable selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_OUTPUT_TYPE + * 1 | BMI160_INTR2_OUTPUT_TYPE + * + * @param v_intr_output_type_u8 : + * The value of output type of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_OPEN_DRAIN + * 0x00 | BMI160_PUSH_PULL + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_output_type( +u8 v_channel_u8, u8 v_intr_output_type_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + case BMI160_INTR1_OUTPUT_TYPE: + /* write the output type of interrupt1*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_OUTPUT_TYPE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR1_OUTPUT_TYPE, + v_intr_output_type_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_OUTPUT_TYPE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_OUTPUT_TYPE: + /* write the output type of interrupt2*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_OUTPUT_TYPE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR2_OUTPUT_TYPE, + v_intr_output_type_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_OUTPUT_TYPE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} + /*! + * @brief API used to get the Output enable for interrupt1 + * and interrupt1 pin from the register 0x53 + * @brief interrupt1 - bit 3 + * @brief interrupt2 - bit 7 + * + * @param v_channel_u8: The value of output enable selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_OUTPUT_TYPE + * 1 | BMI160_INTR2_OUTPUT_TYPE + * + * @param v_output_enable_u8 : + * The value of output enable of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_INPUT + * 0x00 | BMI160_OUTPUT + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_output_enable( +u8 v_channel_u8, u8 *v_output_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + case BMI160_INTR1_OUTPUT_ENABLE: + /* read the output enable of interrupt1*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_OUTPUT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_output_enable_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR1_OUTPUT_ENABLE); + break; + case BMI160_INTR2_OUTPUT_ENABLE: + /* read the output enable of interrupt2*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_OUTPUT_EN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_output_enable_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR2_OUTPUT_EN); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} + /*! + * @brief API used to set the Output enable for interrupt1 + * and interrupt1 pin from the register 0x53 + * @brief interrupt1 - bit 3 + * @brief interrupt2 - bit 7 + * + * @param v_channel_u8: The value of output enable selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_OUTPUT_TYPE + * 1 | BMI160_INTR2_OUTPUT_TYPE + * + * @param v_output_enable_u8 : + * The value of output enable of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_INPUT + * 0x00 | BMI160_OUTPUT + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_output_enable( +u8 v_channel_u8, u8 v_output_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + case BMI160_INTR1_OUTPUT_ENABLE: + /* write the output enable of interrupt1*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_OUTPUT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR1_OUTPUT_ENABLE, + v_output_enable_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_OUTPUT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_OUTPUT_ENABLE: + /* write the output enable of interrupt2*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_OUTPUT_EN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR2_OUTPUT_EN, + v_output_enable_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_OUTPUT_EN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! +* @brief This API is used to get the latch duration +* from the register 0x54 bit 0 to 3 +* @brief This latch selection is not applicable for data ready, +* orientation and flat interrupts. +* +* +* +* @param v_latch_intr_u8 : The value of latch duration +* Latch Duration | value +* --------------------------------------|------------------ +* BMI160_LATCH_DUR_NONE | 0x00 +* BMI160_LATCH_DUR_312_5_MICRO_SEC | 0x01 +* BMI160_LATCH_DUR_625_MICRO_SEC | 0x02 +* BMI160_LATCH_DUR_1_25_MILLI_SEC | 0x03 +* BMI160_LATCH_DUR_2_5_MILLI_SEC | 0x04 +* BMI160_LATCH_DUR_5_MILLI_SEC | 0x05 +* BMI160_LATCH_DUR_10_MILLI_SEC | 0x06 +* BMI160_LATCH_DUR_20_MILLI_SEC | 0x07 +* BMI160_LATCH_DUR_40_MILLI_SEC | 0x08 +* BMI160_LATCH_DUR_80_MILLI_SEC | 0x09 +* BMI160_LATCH_DUR_160_MILLI_SEC | 0x0A +* BMI160_LATCH_DUR_320_MILLI_SEC | 0x0B +* BMI160_LATCH_DUR_640_MILLI_SEC | 0x0C +* BMI160_LATCH_DUR_1_28_SEC | 0x0D +* BMI160_LATCH_DUR_2_56_SEC | 0x0E +* BMI160_LATCHED | 0x0F +* +* +* +* @return results of bus communication function +* @retval 0 -> Success +* @retval -1 -> Error +* +* +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_latch_intr( +u8 *v_latch_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the latch duration value */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_LATCH__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_latch_intr_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LATCH); + } + return com_rslt; +} +/*! +* @brief This API is used to set the latch duration +* from the register 0x54 bit 0 to 3 +* @brief This latch selection is not applicable for data ready, +* orientation and flat interrupts. +* +* +* +* @param v_latch_intr_u8 : The value of latch duration +* Latch Duration | value +* --------------------------------------|------------------ +* BMI160_LATCH_DUR_NONE | 0x00 +* BMI160_LATCH_DUR_312_5_MICRO_SEC | 0x01 +* BMI160_LATCH_DUR_625_MICRO_SEC | 0x02 +* BMI160_LATCH_DUR_1_25_MILLI_SEC | 0x03 +* BMI160_LATCH_DUR_2_5_MILLI_SEC | 0x04 +* BMI160_LATCH_DUR_5_MILLI_SEC | 0x05 +* BMI160_LATCH_DUR_10_MILLI_SEC | 0x06 +* BMI160_LATCH_DUR_20_MILLI_SEC | 0x07 +* BMI160_LATCH_DUR_40_MILLI_SEC | 0x08 +* BMI160_LATCH_DUR_80_MILLI_SEC | 0x09 +* BMI160_LATCH_DUR_160_MILLI_SEC | 0x0A +* BMI160_LATCH_DUR_320_MILLI_SEC | 0x0B +* BMI160_LATCH_DUR_640_MILLI_SEC | 0x0C +* BMI160_LATCH_DUR_1_28_SEC | 0x0D +* BMI160_LATCH_DUR_2_56_SEC | 0x0E +* BMI160_LATCHED | 0x0F +* +* +* + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error +* +* +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_latch_intr(u8 v_latch_intr_u8) +{ + u8 v_data_u8 = BMI160_INIT_VALUE; + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_latch_intr_u8 <= BMI160_MAX_LATCH_INTR) { + /* write the latch duration value */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_LATCH__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LATCH, v_latch_intr_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_LATCH__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief API used to get input enable for interrupt1 + * and interrupt2 pin from the register 0x54 + * @brief interrupt1 - bit 4 + * @brief interrupt2 - bit 5 + * + * @param v_channel_u8: The value of input enable selection + * v_channel_u8 | input selection + * ---------------|--------------- + * 0 | BMI160_INTR1_INPUT_ENABLE + * 1 | BMI160_INTR2_INPUT_ENABLE + * + * @param v_input_en_u8 : + * The value of input enable of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_INPUT + * 0x00 | BMI160_OUTPUT + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_input_enable( +u8 v_channel_u8, u8 *v_input_en_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* read input enable of interrup1 and interrupt2*/ + case BMI160_INTR1_INPUT_ENABLE: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_INPUT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_input_en_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR1_INPUT_ENABLE); + break; + case BMI160_INTR2_INPUT_ENABLE: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_INPUT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_input_en_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR2_INPUT_ENABLE); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief API used to set input enable for interrupt1 + * and interrupt2 pin from the register 0x54 + * @brief interrupt1 - bit 4 + * @brief interrupt2 - bit 5 + * + * @param v_channel_u8: The value of input enable selection + * v_channel_u8 | input selection + * ---------------|--------------- + * 0 | BMI160_INTR1_INPUT_ENABLE + * 1 | BMI160_INTR2_INPUT_ENABLE + * + * @param v_input_en_u8 : + * The value of input enable of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_INPUT + * 0x00 | BMI160_OUTPUT + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_input_enable( +u8 v_channel_u8, u8 v_input_en_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* write input enable of interrup1 and interrupt2*/ + case BMI160_INTR1_INPUT_ENABLE: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_INPUT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR1_INPUT_ENABLE, v_input_en_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR1_INPUT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_INPUT_ENABLE: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_INPUT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR2_INPUT_ENABLE, v_input_en_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR2_INPUT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} + /*! + * @brief reads the Low g interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 0 in the register 0x55 + * @brief interrupt2 bit 0 in the register 0x57 + * + * + * @param v_channel_u8: The value of low_g selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_LOW_G + * 1 | BMI160_INTR2_MAP_LOW_G + * + * @param v_intr_low_g_u8 : The value of low_g enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g( +u8 v_channel_u8, u8 *v_intr_low_g_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* read the low_g interrupt */ + case BMI160_INTR1_MAP_LOW_G: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_LOW_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_low_g_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_LOW_G); + break; + case BMI160_INTR2_MAP_LOW_G: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_LOW_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_low_g_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_LOW_G); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} + /*! + * @brief set the Low g interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 0 in the register 0x55 + * @brief interrupt2 bit 0 in the register 0x57 + * + * + * @param v_channel_u8: The value of low_g selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_LOW_G + * 1 | BMI160_INTR2_MAP_LOW_G + * + * @param v_intr_low_g_u8 : The value of low_g enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g( +u8 v_channel_u8, u8 v_intr_low_g_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +u8 v_step_cnt_stat_u8 = BMI160_INIT_VALUE; +u8 v_step_det_stat_u8 = BMI160_INIT_VALUE; + +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* check the step detector interrupt enable status*/ + com_rslt = bmi160_get_step_detector_enable(&v_step_det_stat_u8); + /* disable the step detector interrupt */ + if (v_step_det_stat_u8 != BMI160_INIT_VALUE) + com_rslt += bmi160_set_step_detector_enable(BMI160_INIT_VALUE); + /* check the step counter interrupt enable status*/ + com_rslt += bmi160_get_step_counter_enable(&v_step_cnt_stat_u8); + /* disable the step counter interrupt */ + if (v_step_cnt_stat_u8 != BMI160_INIT_VALUE) + com_rslt += bmi160_set_step_counter_enable( + BMI160_INIT_VALUE); + switch (v_channel_u8) { + /* write the low_g interrupt*/ + case BMI160_INTR1_MAP_LOW_G: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_LOW_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_LOW_G, v_intr_low_g_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_LOW_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_LOW_G: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_LOW_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_LOW_G, v_intr_low_g_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_LOW_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} +/*! + * @brief Reads the HIGH g interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 1 in the register 0x55 + * @brief interrupt2 bit 1 in the register 0x57 + * + * + * @param v_channel_u8: The value of high_g selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_HIGH_G + * 1 | BMI160_INTR2_MAP_HIGH_G + * + * @param v_intr_high_g_u8 : The value of high_g enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g( +u8 v_channel_u8, u8 *v_intr_high_g_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the high_g interrupt*/ + switch (v_channel_u8) { + case BMI160_INTR1_MAP_HIGH_G: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_high_g_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_HIGH_G); + break; + case BMI160_INTR2_MAP_HIGH_G: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_high_g_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_HIGH_G); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Write the HIGH g interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 1 in the register 0x55 + * @brief interrupt2 bit 1 in the register 0x57 + * + * + * @param v_channel_u8: The value of high_g selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_HIGH_G + * 1 | BMI160_INTR2_MAP_HIGH_G + * + * @param v_intr_high_g_u8 : The value of high_g enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g( +u8 v_channel_u8, u8 v_intr_high_g_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* write the high_g interrupt*/ + case BMI160_INTR1_MAP_HIGH_G: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_HIGH_G, v_intr_high_g_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_HIGH_G: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_HIGH_G, v_intr_high_g_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} +/*! + * @brief Reads the Any motion interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 2 in the register 0x55 + * @brief interrupt2 bit 2 in the register 0x57 + * + * + * @param v_channel_u8: The value of any motion selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_ANY_MOTION + * 1 | BMI160_INTR2_MAP_ANY_MOTION + * + * @param v_intr_any_motion_u8 : The value of any motion enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion( +u8 v_channel_u8, u8 *v_intr_any_motion_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* read the any motion interrupt */ + case BMI160_INTR1_MAP_ANY_MOTION: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_any_motion_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION); + break; + case BMI160_INTR2_MAP_ANY_MOTION: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_any_motion_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Write the Any motion interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 2 in the register 0x55 + * @brief interrupt2 bit 2 in the register 0x57 + * + * + * @param v_channel_u8: The value of any motion selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_ANY_MOTION + * 1 | BMI160_INTR2_MAP_ANY_MOTION + * + * @param v_intr_any_motion_u8 : The value of any motion enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion( +u8 v_channel_u8, u8 v_intr_any_motion_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +u8 sig_mot_stat = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the status of significant motion interrupt */ + com_rslt = bmi160_get_intr_significant_motion_select(&sig_mot_stat); + /* disable the significant motion interrupt */ + if (sig_mot_stat != BMI160_INIT_VALUE) + com_rslt += bmi160_set_intr_significant_motion_select( + BMI160_INIT_VALUE); + switch (v_channel_u8) { + /* write the any motion interrupt */ + case BMI160_INTR1_MAP_ANY_MOTION: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION, + v_intr_any_motion_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_ANY_MOTION: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION, + v_intr_any_motion_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} +/*! + * @brief Reads the No motion interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 3 in the register 0x55 + * @brief interrupt2 bit 3 in the register 0x57 + * + * + * @param v_channel_u8: The value of no motion selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_NOMO + * 1 | BMI160_INTR2_MAP_NOMO + * + * @param v_intr_nomotion_u8 : The value of no motion enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_nomotion( +u8 v_channel_u8, u8 *v_intr_nomotion_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* read the no motion interrupt*/ + case BMI160_INTR1_MAP_NOMO: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_nomotion_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_NOMOTION); + break; + case BMI160_INTR2_MAP_NOMO: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_nomotion_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_NOMOTION); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Write the No motion interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 3 in the register 0x55 + * @brief interrupt2 bit 3 in the register 0x57 + * + * + * @param v_channel_u8: The value of no motion selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_NOMO + * 1 | BMI160_INTR2_MAP_NOMO + * + * @param v_intr_nomotion_u8 : The value of no motion enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_nomotion( +u8 v_channel_u8, u8 v_intr_nomotion_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* write the no motion interrupt*/ + case BMI160_INTR1_MAP_NOMO: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_NOMOTION, + v_intr_nomotion_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_NOMO: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_NOMOTION, + v_intr_nomotion_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} +/*! + * @brief Reads the Double Tap interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 4 in the register 0x55 + * @brief interrupt2 bit 4 in the register 0x57 + * + * + * @param v_channel_u8: The value of double tap interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_DOUBLE_TAP + * 1 | BMI160_INTR2_MAP_DOUBLE_TAP + * + * @param v_intr_double_tap_u8 : The value of double tap enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_double_tap( +u8 v_channel_u8, u8 *v_intr_double_tap_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + case BMI160_INTR1_MAP_DOUBLE_TAP: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_double_tap_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP); + break; + case BMI160_INTR2_MAP_DOUBLE_TAP: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_double_tap_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Write the Double Tap interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 4 in the register 0x55 + * @brief interrupt2 bit 4 in the register 0x57 + * + * + * @param v_channel_u8: The value of double tap interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_DOUBLE_TAP + * 1 | BMI160_INTR2_MAP_DOUBLE_TAP + * + * @param v_intr_double_tap_u8 : The value of double tap enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_double_tap( +u8 v_channel_u8, u8 v_intr_double_tap_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* set the double tap interrupt */ + case BMI160_INTR1_MAP_DOUBLE_TAP: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP, + v_intr_double_tap_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_DOUBLE_TAP: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP, + v_intr_double_tap_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} +/*! + * @brief Reads the Single Tap interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 5 in the register 0x55 + * @brief interrupt2 bit 5 in the register 0x57 + * + * + * @param v_channel_u8: The value of single tap interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_SINGLE_TAP + * 1 | BMI160_INTR2_MAP_SINGLE_TAP + * + * @param v_intr_single_tap_u8 : The value of single tap enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_single_tap( +u8 v_channel_u8, u8 *v_intr_single_tap_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* reads the single tap interrupt*/ + case BMI160_INTR1_MAP_SINGLE_TAP: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_single_tap_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP); + break; + case BMI160_INTR2_MAP_SINGLE_TAP: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_single_tap_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Write the Single Tap interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 5 in the register 0x55 + * @brief interrupt2 bit 5 in the register 0x57 + * + * + * @param v_channel_u8: The value of single tap interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_SINGLE_TAP + * 1 | BMI160_INTR2_MAP_SINGLE_TAP + * + * @param v_intr_single_tap_u8 : The value of single tap enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_single_tap( +u8 v_channel_u8, u8 v_intr_single_tap_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* write the single tap interrupt */ + case BMI160_INTR1_MAP_SINGLE_TAP: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP, + v_intr_single_tap_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_SINGLE_TAP: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP, + v_intr_single_tap_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} +/*! + * @brief Reads the Orient interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 6 in the register 0x55 + * @brief interrupt2 bit 6 in the register 0x57 + * + * + * @param v_channel_u8: The value of orient interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_ORIENT + * 1 | BMI160_INTR2_MAP_ORIENT + * + * @param v_intr_orient_u8 : The value of orient enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient( +u8 v_channel_u8, u8 *v_intr_orient_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* read the orientation interrupt*/ + case BMI160_INTR1_MAP_ORIENT: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_ORIENT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_orient_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_ORIENT); + break; + case BMI160_INTR2_MAP_ORIENT: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_ORIENT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_orient_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_ORIENT); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Write the Orient interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 6 in the register 0x55 + * @brief interrupt2 bit 6 in the register 0x57 + * + * + * @param v_channel_u8: The value of orient interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_ORIENT + * 1 | BMI160_INTR2_MAP_ORIENT + * + * @param v_intr_orient_u8 : The value of orient enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient( +u8 v_channel_u8, u8 v_intr_orient_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* write the orientation interrupt*/ + case BMI160_INTR1_MAP_ORIENT: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_ORIENT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_ORIENT, v_intr_orient_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_ORIENT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_ORIENT: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_ORIENT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_ORIENT, v_intr_orient_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_ORIENT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} + /*! + * @brief Reads the Flat interrupt + * mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 7 in the register 0x55 + * @brief interrupt2 bit 7 in the register 0x57 + * + * + * @param v_channel_u8: The value of flat interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FLAT + * 1 | BMI160_INTR2_MAP_FLAT + * + * @param v_intr_flat_u8 : The value of flat enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat( +u8 v_channel_u8, u8 *v_intr_flat_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* read the flat interrupt*/ + case BMI160_INTR1_MAP_FLAT: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_FLAT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_flat_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_FLAT); + break; + case BMI160_INTR2_MAP_FLAT: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_FLAT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_flat_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_FLAT); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} + /*! + * @brief Write the Flat interrupt + * mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 7 in the register 0x55 + * @brief interrupt2 bit 7 in the register 0x57 + * + * + * @param v_channel_u8: The value of flat interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FLAT + * 1 | BMI160_INTR2_MAP_FLAT + * + * @param v_intr_flat_u8 : The value of flat enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat( +u8 v_channel_u8, u8 v_intr_flat_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* write the flat interrupt */ + case BMI160_INTR1_MAP_FLAT: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_0_INTR1_FLAT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_0_INTR1_FLAT, + v_intr_flat_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_MAP_0_INTR1_FLAT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_FLAT: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_2_INTR2_FLAT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_2_INTR2_FLAT, + v_intr_flat_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_MAP_2_INTR2_FLAT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Reads PMU trigger interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 0 and 4 + * @brief interrupt1 bit 0 in the register 0x56 + * @brief interrupt2 bit 4 in the register 0x56 + * + * + * @param v_channel_u8: The value of pmu trigger selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_PMUTRIG + * 1 | BMI160_INTR2_MAP_PMUTRIG + * + * @param v_intr_pmu_trig_u8 : The value of pmu trigger enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_pmu_trig( +u8 v_channel_u8, u8 *v_intr_pmu_trig_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* read the pmu trigger interrupt*/ + case BMI160_INTR1_MAP_PMUTRIG: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_pmu_trig_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG); + break; + case BMI160_INTR2_MAP_PMUTRIG: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_pmu_trig_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Write PMU trigger interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 0 and 4 + * @brief interrupt1 bit 0 in the register 0x56 + * @brief interrupt2 bit 4 in the register 0x56 + * + * + * @param v_channel_u8: The value of pmu trigger selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_PMUTRIG + * 1 | BMI160_INTR2_MAP_PMUTRIG + * + * @param v_intr_pmu_trig_u8 : The value of pmu trigger enable + * value | trigger enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_pmu_trig( +u8 v_channel_u8, u8 v_intr_pmu_trig_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* write the pmu trigger interrupt */ + case BMI160_INTR1_MAP_PMUTRIG: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG, + v_intr_pmu_trig_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_PMUTRIG: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG, + v_intr_pmu_trig_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} +/*! + * @brief Reads FIFO Full interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 5 and 1 + * @brief interrupt1 bit 5 in the register 0x56 + * @brief interrupt2 bit 1 in the register 0x56 + * + * + * @param v_channel_u8: The value of fifo full interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FIFO_FULL + * 1 | BMI160_INTR2_MAP_FIFO_FULL + * + * @param v_intr_fifo_full_u8 : The value of fifo full interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_full( +u8 v_channel_u8, u8 *v_intr_fifo_full_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* read the fifo full interrupt */ + case BMI160_INTR1_MAP_FIFO_FULL: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_fifo_full_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL); + break; + case BMI160_INTR2_MAP_FIFO_FULL: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_fifo_full_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Write FIFO Full interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 5 and 1 + * @brief interrupt1 bit 5 in the register 0x56 + * @brief interrupt2 bit 1 in the register 0x56 + * + * + * @param v_channel_u8: The value of fifo full interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FIFO_FULL + * 1 | BMI160_INTR2_MAP_FIFO_FULL + * + * @param v_intr_fifo_full_u8 : The value of fifo full interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_full( +u8 v_channel_u8, u8 v_intr_fifo_full_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* write the fifo full interrupt */ + case BMI160_INTR1_MAP_FIFO_FULL: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL, + v_intr_fifo_full_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_FIFO_FULL: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL, + v_intr_fifo_full_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Reads FIFO Watermark interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 6 and 2 + * @brief interrupt1 bit 6 in the register 0x56 + * @brief interrupt2 bit 2 in the register 0x56 + * + * + * @param v_channel_u8: The value of fifo Watermark interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FIFO_WM + * 1 | BMI160_INTR2_MAP_FIFO_WM + * + * @param v_intr_fifo_wm_u8 : The value of fifo Watermark interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_wm( +u8 v_channel_u8, u8 *v_intr_fifo_wm_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* read the fifo water mark interrupt */ + case BMI160_INTR1_MAP_FIFO_WM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_fifo_wm_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM); + break; + case BMI160_INTR2_MAP_FIFO_WM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_fifo_wm_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Write FIFO Watermark interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 6 and 2 + * @brief interrupt1 bit 6 in the register 0x56 + * @brief interrupt2 bit 2 in the register 0x56 + * + * + * @param v_channel_u8: The value of fifo Watermark interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FIFO_WM + * 1 | BMI160_INTR2_MAP_FIFO_WM + * + * @param v_intr_fifo_wm_u8 : The value of fifo Watermark interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_wm( +u8 v_channel_u8, u8 v_intr_fifo_wm_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /* write the fifo water mark interrupt */ + case BMI160_INTR1_MAP_FIFO_WM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM, + v_intr_fifo_wm_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_FIFO_WM: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM, + v_intr_fifo_wm_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, + BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Reads Data Ready interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 + * @brief interrupt1 bit 7 in the register 0x56 + * @brief interrupt2 bit 3 in the register 0x56 + * + * + * @param v_channel_u8: The value of data ready interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_DATA_RDY + * 1 | BMI160_INTR2_MAP_DATA_RDY + * + * @param v_intr_data_rdy_u8 : The value of data ready interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_data_rdy( +u8 v_channel_u8, u8 *v_intr_data_rdy_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /*Read Data Ready interrupt*/ + case BMI160_INTR1_MAP_DATA_RDY: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_data_rdy_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY); + break; + case BMI160_INTR2_MAP_DATA_RDY: + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_data_rdy_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + } + return com_rslt; +} +/*! + * @brief Write Data Ready interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 + * @brief interrupt1 bit 7 in the register 0x56 + * @brief interrupt2 bit 3 in the register 0x56 + * + * + * @param v_channel_u8: The value of data ready interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_DATA_RDY + * 1 | BMI160_INTR2_MAP_DATA_RDY + * + * @param v_intr_data_rdy_u8 : The value of data ready interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_data_rdy( +u8 v_channel_u8, u8 v_intr_data_rdy_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + switch (v_channel_u8) { + /*Write Data Ready interrupt*/ + case BMI160_INTR1_MAP_DATA_RDY: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY, + v_intr_data_rdy_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + case BMI160_INTR2_MAP_DATA_RDY: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY, + v_intr_data_rdy_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC(p_bmi160-> + dev_addr, BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } +} +return com_rslt; +} + /*! + * @brief This API reads data source for the interrupt + * engine for the single and double tap interrupts from the register + * 0x58 bit 3 + * + * + * @param v_tap_source_u8 : The value of the tap source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_source(u8 *v_tap_source_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the tap source interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_tap_source_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE); + } + return com_rslt; +} + /*! + * @brief This API write data source for the interrupt + * engine for the single and double tap interrupts from the register + * 0x58 bit 3 + * + * + * @param v_tap_source_u8 : The value of the tap source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_source( +u8 v_tap_source_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_tap_source_u8 <= BMI160_MAX_VALUE_SOURCE_INTR) { + /* write the tap source interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE, + v_tap_source_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} + /*! + * @brief This API Reads Data source for the + * interrupt engine for the low and high g interrupts + * from the register 0x58 bit 7 + * + * @param v_low_high_source_u8 : The value of the tap source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_high_source( +u8 *v_low_high_source_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the high_low_g source interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_low_high_source_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE); + } + return com_rslt; +} +/*! + * @brief This API write Data source for the + * interrupt engine for the low and high g interrupts + * from the register 0x58 bit 7 + * + * @param v_low_high_source_u8 : The value of the tap source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_high_source( +u8 v_low_high_source_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_low_high_source_u8 <= BMI160_MAX_VALUE_SOURCE_INTR) { + /* write the high_low_g source interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE, + v_low_high_source_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } +} +return com_rslt; +} + /*! + * @brief This API reads Data source for the + * interrupt engine for the nomotion and anymotion interrupts + * from the register 0x59 bit 7 + * + * @param v_motion_source_u8 : + * The value of the any/no motion interrupt source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_motion_source( +u8 *v_motion_source_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the any/no motion interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_motion_source_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE); + } + return com_rslt; +} + /*! + * @brief This API write Data source for the + * interrupt engine for the nomotion and anymotion interrupts + * from the register 0x59 bit 7 + * + * @param v_motion_source_u8 : + * The value of the any/no motion interrupt source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_motion_source( +u8 v_motion_source_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_motion_source_u8 <= BMI160_MAX_VALUE_SOURCE_INTR) { + /* write the any/no motion interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE, + v_motion_source_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} + /*! + * @brief This API is used to read the low_g duration from register + * 0x5A bit 0 to 7 + * + * + * + * + * @param v_low_g_durn_u8 : The value of low_g duration + * + * @note Low_g duration trigger trigger delay according to + * "(v_low_g_durn_u8 * 2.5)ms" in a range from 2.5ms to 640ms. + * the default corresponds delay is 20ms + * @note When low_g data source of interrupt is unfiltered + * the sensor must not be in low power mode + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_durn( +u8 *v_low_g_durn_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the low_g interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_low_g_durn_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN); + } + return com_rslt; +} + /*! + * @brief This API is used to write the low_g duration from register + * 0x5A bit 0 to 7 + * + * + * + * + * @param v_low_g_durn_u8 : The value of low_g duration + * + * @note Low_g duration trigger trigger delay according to + * "(v_low_g_durn_u8 * 2.5)ms" in a range from 2.5ms to 640ms. + * the default corresponds delay is 20ms + * @note When low_g data source of interrupt is unfiltered + * the sensor must not be in low power mode + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_durn(u8 v_low_g_durn_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write the low_g interrupt */ + com_rslt = p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__REG, + &v_low_g_durn_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + return com_rslt; +} +/*! + * @brief This API is used to read Threshold + * definition for the low-g interrupt from the register 0x5B bit 0 to 7 + * + * + * + * + * @param v_low_g_thres_u8 : The value of low_g threshold + * + * @note Low_g interrupt trigger threshold according to + * (v_low_g_thres_u8 * 7.81)mg for v_low_g_thres_u8 > 0 + * 3.91 mg for v_low_g_thres_u8 = 0 + * The threshold range is form 3.91mg to 2.000mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_thres( +u8 *v_low_g_thres_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read low_g threshold */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_low_g_thres_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES); + } + return com_rslt; +} +/*! + * @brief This API is used to write Threshold + * definition for the low-g interrupt from the register 0x5B bit 0 to 7 + * + * + * + * + * @param v_low_g_thres_u8 : The value of low_g threshold + * + * @note Low_g interrupt trigger threshold according to + * (v_low_g_thres_u8 * 7.81)mg for v_low_g_thres_u8 > 0 + * 3.91 mg for v_low_g_thres_u8 = 0 + * The threshold range is form 3.91mg to 2.000mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_thres( +u8 v_low_g_thres_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write low_g threshold */ + com_rslt = p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__REG, + &v_low_g_thres_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + return com_rslt; +} + /*! + * @brief This API Reads Low-g interrupt hysteresis + * from the register 0x5C bit 0 to 1 + * + * @param v_low_hyst_u8 :The value of low_g hysteresis + * + * @note Low_g hysteresis calculated by v_low_hyst_u8*125 mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_hyst( +u8 *v_low_hyst_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read low_g hysteresis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_low_hyst_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST); + } + return com_rslt; +} + /*! + * @brief This API write Low-g interrupt hysteresis + * from the register 0x5C bit 0 to 1 + * + * @param v_low_hyst_u8 :The value of low_g hysteresis + * + * @note Low_g hysteresis calculated by v_low_hyst_u8*125 mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_hyst( +u8 v_low_hyst_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write low_g hysteresis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST, + v_low_hyst_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} +/*! + * @brief This API reads Low-g interrupt mode + * from the register 0x5C bit 2 + * + * @param v_low_g_mode_u8 : The value of low_g mode + * Value | Description + * ----------|----------------- + * 0 | single-axis + * 1 | axis-summing + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_mode(u8 *v_low_g_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /*read Low-g interrupt mode*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_low_g_mode_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE); + } + return com_rslt; +} +/*! + * @brief This API write Low-g interrupt mode + * from the register 0x5C bit 2 + * + * @param v_low_g_mode_u8 : The value of low_g mode + * Value | Description + * ----------|----------------- + * 0 | single-axis + * 1 | axis-summing + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_mode( +u8 v_low_g_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_low_g_mode_u8 <= BMI160_MAX_VALUE_LOW_G_MODE) { + /*write Low-g interrupt mode*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE, + v_low_g_mode_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API reads High-g interrupt hysteresis + * from the register 0x5C bit 6 and 7 + * + * @param v_high_g_hyst_u8 : The value of high hysteresis + * + * @note High_g hysteresis changes according to accel g range + * accel g range can be set by the function "" + * accel_range | high_g hysteresis + * ----------------|--------------------- + * 2g | high_hy*125 mg + * 4g | high_hy*250 mg + * 8g | high_hy*500 mg + * 16g | high_hy*1000 mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_hyst( +u8 *v_high_g_hyst_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read high_g hysteresis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_high_g_hyst_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST); + } + return com_rslt; +} +/*! + * @brief This API write High-g interrupt hysteresis + * from the register 0x5C bit 6 and 7 + * + * @param v_high_g_hyst_u8 : The value of high hysteresis + * + * @note High_g hysteresis changes according to accel g range + * accel g range can be set by the function "" + * accel_range | high_g hysteresis + * ----------------|--------------------- + * 2g | high_hy*125 mg + * 4g | high_hy*250 mg + * 8g | high_hy*500 mg + * 16g | high_hy*1000 mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_hyst( +u8 v_high_g_hyst_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write high_g hysteresis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST, + v_high_g_hyst_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } +return com_rslt; +} +/*! + * @brief This API is used to read Delay + * time definition for the high-g interrupt from the register + * 0x5D bit 0 to 7 + * + * + * + * @param v_high_g_durn_u8 : The value of high duration + * + * @note High_g interrupt delay triggered according to + * v_high_g_durn_u8 * 2.5ms in a range from 2.5ms to 640ms + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_durn( +u8 *v_high_g_durn_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read high_g duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_high_g_durn_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN); + } + return com_rslt; +} +/*! + * @brief This API is used to write Delay + * time definition for the high-g interrupt from the register + * 0x5D bit 0 to 7 + * + * + * + * @param v_high_g_durn_u8 : The value of high duration + * + * @note High_g interrupt delay triggered according to + * v_high_g_durn_u8 * 2.5ms in a range from 2.5ms to 640ms + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_durn( +u8 v_high_g_durn_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write high_g duration*/ + com_rslt = p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__REG, + &v_high_g_durn_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + return com_rslt; +} +/*! + * @brief This API is used to read Threshold + * definition for the high-g interrupt from the register 0x5E 0 to 7 + * + * + * + * + * @param v_high_g_thres_u8 : Pointer holding the value of Threshold + * @note High_g threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | high_g threshold + * ----------------|--------------------- + * 2g | v_high_g_thres_u8*7.81 mg + * 4g | v_high_g_thres_u8*15.63 mg + * 8g | v_high_g_thres_u8*31.25 mg + * 16g | v_high_g_thres_u8*62.5 mg + * @note when v_high_g_thres_u8 = 0 + * accel_range | high_g threshold + * ----------------|--------------------- + * 2g | 3.91 mg + * 4g | 7.81 mg + * 8g | 15.63 mg + * 16g | 31.25 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_thres( +u8 *v_high_g_thres_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_high_g_thres_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES); + } + return com_rslt; +} +/*! + * @brief This API is used to write Threshold + * definition for the high-g interrupt from the register 0x5E 0 to 7 + * + * + * + * + * @param v_high_g_thres_u8 : Pointer holding the value of Threshold + * @note High_g threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | high_g threshold + * ----------------|--------------------- + * 2g | v_high_g_thres_u8*7.81 mg + * 4g | v_high_g_thres_u8*15.63 mg + * 8g | v_high_g_thres_u8*31.25 mg + * 16g | v_high_g_thres_u8*62.5 mg + * @note when v_high_g_thres_u8 = 0 + * accel_range | high_g threshold + * ----------------|--------------------- + * 2g | 3.91 mg + * 4g | 7.81 mg + * 8g | 15.63 mg + * 16g | 31.25 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_thres( +u8 v_high_g_thres_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + com_rslt = p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__REG, + &v_high_g_thres_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + return com_rslt; +} +/*! + * @brief This API reads any motion duration + * from the register 0x5F bit 0 and 1 + * + * @param v_any_motion_durn_u8 : The value of any motion duration + * + * @note Any motion duration can be calculated by "v_any_motion_durn_u8 + 1" + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_durn( +u8 *v_any_motion_durn_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read any motion duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_any_motion_durn_u8 = BMI160_GET_BITSLICE + (v_data_u8, + BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN); + } + return com_rslt; +} +/*! + * @brief This API write any motion duration + * from the register 0x5F bit 0 and 1 + * + * @param v_any_motion_durn_u8 : The value of any motion duration + * + * @note Any motion duration can be calculated by "v_any_motion_durn_u8 + 1" + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_durn( +u8 v_any_motion_durn_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write any motion duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN, + v_any_motion_durn_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} + /*! + * @brief This API read Slow/no-motion + * interrupt trigger delay duration from the register 0x5F bit 2 to 7 + * + * @param v_slow_no_motion_u8 :The value of slow no motion duration + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * @note + * @note v_slow_no_motion_u8(5:4)=0b00 -> + * [v_slow_no_motion_u8(3:0) + 1] * 1.28s (1.28s-20.48s) + * @note v_slow_no_motion_u8(5:4)=1 -> + * [v_slow_no_motion_u8(3:0)+5] * 5.12s (25.6s-102.4s) + * @note v_slow_no_motion_u8(5)='1' -> + * [(v_slow_no_motion_u8:0)+11] * 10.24s (112.64s-430.08s); + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_durn( +u8 *v_slow_no_motion_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read slow no motion duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_slow_no_motion_u8 = BMI160_GET_BITSLICE + (v_data_u8, + BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN); + } +return com_rslt; +} + /*! + * @brief This API write Slow/no-motion + * interrupt trigger delay duration from the register 0x5F bit 2 to 7 + * + * @param v_slow_no_motion_u8 :The value of slow no motion duration + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * @note + * @note v_slow_no_motion_u8(5:4)=0b00 -> + * [v_slow_no_motion_u8(3:0) + 1] * 1.28s (1.28s-20.48s) + * @note v_slow_no_motion_u8(5:4)=1 -> + * [v_slow_no_motion_u8(3:0)+5] * 5.12s (25.6s-102.4s) + * @note v_slow_no_motion_u8(5)='1' -> + * [(v_slow_no_motion_u8:0)+11] * 10.24s (112.64s-430.08s); + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_durn( +u8 v_slow_no_motion_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write slow no motion duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE + (v_data_u8, + BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN, + v_slow_no_motion_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } +} +return com_rslt; +} +/*! + * @brief This API is used to read threshold + * definition for the any-motion interrupt + * from the register 0x60 bit 0 to 7 + * + * + * @param v_any_motion_thres_u8 : The value of any motion threshold + * + * @note any motion threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | any motion threshold + * ----------------|--------------------- + * 2g | v_any_motion_thres_u8*3.91 mg + * 4g | v_any_motion_thres_u8*7.81 mg + * 8g | v_any_motion_thres_u8*15.63 mg + * 16g | v_any_motion_thres_u8*31.25 mg + * @note when v_any_motion_thres_u8 = 0 + * accel_range | any motion threshold + * ----------------|--------------------- + * 2g | 1.95 mg + * 4g | 3.91 mg + * 8g | 7.81 mg + * 16g | 15.63 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_thres( +u8 *v_any_motion_thres_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read any motion threshold*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_any_motion_thres_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES); + } + return com_rslt; +} +/*! + * @brief This API is used to write threshold + * definition for the any-motion interrupt + * from the register 0x60 bit 0 to 7 + * + * + * @param v_any_motion_thres_u8 : The value of any motion threshold + * + * @note any motion threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | any motion threshold + * ----------------|--------------------- + * 2g | v_any_motion_thres_u8*3.91 mg + * 4g | v_any_motion_thres_u8*7.81 mg + * 8g | v_any_motion_thres_u8*15.63 mg + * 16g | v_any_motion_thres_u8*31.25 mg + * @note when v_any_motion_thres_u8 = 0 + * accel_range | any motion threshold + * ----------------|--------------------- + * 2g | 1.95 mg + * 4g | 3.91 mg + * 8g | 7.81 mg + * 16g | 15.63 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_thres( +u8 v_any_motion_thres_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write any motion threshold*/ + com_rslt = p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__REG, + &v_any_motion_thres_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + return com_rslt; +} + /*! + * @brief This API is used to read threshold + * for the slow/no-motion interrupt + * from the register 0x61 bit 0 to 7 + * + * + * + * + * @param v_slow_no_motion_thres_u8 : The value of slow no motion threshold + * @note slow no motion threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | slow no motion threshold + * ----------------|--------------------- + * 2g | v_slow_no_motion_thres_u8*3.91 mg + * 4g | v_slow_no_motion_thres_u8*7.81 mg + * 8g | v_slow_no_motion_thres_u8*15.63 mg + * 16g | v_slow_no_motion_thres_u8*31.25 mg + * @note when v_slow_no_motion_thres_u8 = 0 + * accel_range | slow no motion threshold + * ----------------|--------------------- + * 2g | 1.95 mg + * 4g | 3.91 mg + * 8g | 7.81 mg + * 16g | 15.63 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_thres( +u8 *v_slow_no_motion_thres_u8) +{ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read slow no motion threshold*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_slow_no_motion_thres_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES); + } +return com_rslt; +} + /*! + * @brief This API is used to write threshold + * for the slow/no-motion interrupt + * from the register 0x61 bit 0 to 7 + * + * + * + * + * @param v_slow_no_motion_thres_u8 : The value of slow no motion threshold + * @note slow no motion threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | slow no motion threshold + * ----------------|--------------------- + * 2g | v_slow_no_motion_thres_u8*3.91 mg + * 4g | v_slow_no_motion_thres_u8*7.81 mg + * 8g | v_slow_no_motion_thres_u8*15.63 mg + * 16g | v_slow_no_motion_thres_u8*31.25 mg + * @note when v_slow_no_motion_thres_u8 = 0 + * accel_range | slow no motion threshold + * ----------------|--------------------- + * 2g | 1.95 mg + * 4g | 3.91 mg + * 8g | 7.81 mg + * 16g | 15.63 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_thres( +u8 v_slow_no_motion_thres_u8) +{ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write slow no motion threshold*/ + com_rslt = p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__REG, + &v_slow_no_motion_thres_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } +return com_rslt; +} + /*! + * @brief This API is used to read + * the slow/no-motion selection from the register 0x62 bit 0 + * + * + * + * + * @param v_intr_slow_no_motion_select_u8 : + * The value of slow/no-motion select + * value | Behaviour + * ----------|------------------- + * 0x00 | SLOW_MOTION + * 0x01 | NO_MOTION + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_select( +u8 *v_intr_slow_no_motion_select_u8) +{ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read slow no motion select*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_slow_no_motion_select_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT); + } +return com_rslt; +} + /*! + * @brief This API is used to write + * the slow/no-motion selection from the register 0x62 bit 0 + * + * + * + * + * @param v_intr_slow_no_motion_select_u8 : + * The value of slow/no-motion select + * value | Behaviour + * ----------|------------------- + * 0x00 | SLOW_MOTION + * 0x01 | NO_MOTION + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_select( +u8 v_intr_slow_no_motion_select_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; +} else { +if (v_intr_slow_no_motion_select_u8 <= BMI160_MAX_VALUE_NO_MOTION) { + /* write slow no motion select*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT, + v_intr_slow_no_motion_select_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } +} else { +com_rslt = E_BMI160_OUT_OF_RANGE; +} +} +return com_rslt; +} + /*! + * @brief This API is used to select + * the significant or any motion interrupt from the register 0x62 bit 1 + * + * + * + * + * @param v_intr_significant_motion_select_u8 : + * the value of significant or any motion interrupt selection + * value | Behaviour + * ----------|------------------- + * 0x00 | ANY_MOTION + * 0x01 | SIGNIFICANT_MOTION + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_select( +u8 *v_intr_significant_motion_select_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the significant or any motion interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_intr_significant_motion_select_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT); + } + return com_rslt; +} + /*! + * @brief This API is used to write, select + * the significant or any motion interrupt from the register 0x62 bit 1 + * + * + * + * + * @param v_intr_significant_motion_select_u8 : + * the value of significant or any motion interrupt selection + * value | Behaviour + * ----------|------------------- + * 0x00 | ANY_MOTION + * 0x01 | SIGNIFICANT_MOTION + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_select( +u8 v_intr_significant_motion_select_u8) +{ +/* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_intr_significant_motion_select_u8 <= + BMI160_MAX_VALUE_SIGNIFICANT_MOTION) { + /* write the significant or any motion interrupt*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT, + v_intr_significant_motion_select_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } +} +return com_rslt; +} + /*! + * @brief This API is used to read + * the significant skip time from the register 0x62 bit 2 and 3 + * + * + * + * + * @param v_int_sig_mot_skip_u8 : the value of significant skip time + * value | Behaviour + * ----------|------------------- + * 0x00 | skip time 1.5 seconds + * 0x01 | skip time 3 seconds + * 0x02 | skip time 6 seconds + * 0x03 | skip time 12 seconds + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_skip( +u8 *v_int_sig_mot_skip_u8) +{ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read significant skip time*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_int_sig_mot_skip_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP); + } + return com_rslt; +} + /*! + * @brief This API is used to write + * the significant skip time from the register 0x62 bit 2 and 3 + * + * + * + * + * @param v_int_sig_mot_skip_u8 : the value of significant skip time + * value | Behaviour + * ----------|------------------- + * 0x00 | skip time 1.5 seconds + * 0x01 | skip time 3 seconds + * 0x02 | skip time 6 seconds + * 0x03 | skip time 12 seconds + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_skip( +u8 v_int_sig_mot_skip_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_int_sig_mot_skip_u8 <= BMI160_MAX_UNDER_SIG_MOTION) { + /* write significant skip time*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP, + v_int_sig_mot_skip_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} + /*! + * @brief This API is used to read + * the significant proof time from the register 0x62 bit 4 and 5 + * + * + * + * + * @param v_significant_motion_proof_u8 : + * the value of significant proof time + * value | Behaviour + * ----------|------------------- + * 0x00 | proof time 0.25 seconds + * 0x01 | proof time 0.5 seconds + * 0x02 | proof time 1 seconds + * 0x03 | proof time 2 seconds + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_proof( +u8 *v_significant_motion_proof_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read significant proof time */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_significant_motion_proof_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF); + } + return com_rslt; +} + /*! + * @brief This API is used to write + * the significant proof time from the register 0x62 bit 4 and 5 + * + * + * + * + * @param v_significant_motion_proof_u8 : + * the value of significant proof time + * value | Behaviour + * ----------|------------------- + * 0x00 | proof time 0.25 seconds + * 0x01 | proof time 0.5 seconds + * 0x02 | proof time 1 seconds + * 0x03 | proof time 2 seconds + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_proof( +u8 v_significant_motion_proof_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_significant_motion_proof_u8 + <= BMI160_MAX_UNDER_SIG_MOTION) { + /* write significant proof time */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF, + v_significant_motion_proof_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API is used to get the tap duration + * from the register 0x63 bit 0 to 2 + * + * + * + * @param v_tap_durn_u8 : The value of tap duration + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_DURN_50MS + * 0x01 | BMI160_TAP_DURN_100MS + * 0x03 | BMI160_TAP_DURN_150MS + * 0x04 | BMI160_TAP_DURN_200MS + * 0x05 | BMI160_TAP_DURN_250MS + * 0x06 | BMI160_TAP_DURN_375MS + * 0x07 | BMI160_TAP_DURN_700MS + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_durn( +u8 *v_tap_durn_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read tap duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_tap_durn_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_INTR_TAP_0_INTR_TAP_DURN); + } + return com_rslt; +} +/*! + * @brief This API is used to write the tap duration + * from the register 0x63 bit 0 to 2 + * + * + * + * @param v_tap_durn_u8 : The value of tap duration + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_DURN_50MS + * 0x01 | BMI160_TAP_DURN_100MS + * 0x03 | BMI160_TAP_DURN_150MS + * 0x04 | BMI160_TAP_DURN_200MS + * 0x05 | BMI160_TAP_DURN_250MS + * 0x06 | BMI160_TAP_DURN_375MS + * 0x07 | BMI160_TAP_DURN_700MS + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_durn( +u8 v_tap_durn_u8) +{ + u8 v_data_u8 = BMI160_INIT_VALUE; + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_tap_durn_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_tap_durn_u8 <= BMI160_MAX_TAP_TURN) { + switch (v_tap_durn_u8) { + case BMI160_TAP_DURN_50MS: + v_data_tap_durn_u8 = BMI160_TAP_DURN_50MS; + break; + case BMI160_TAP_DURN_100MS: + v_data_tap_durn_u8 = BMI160_TAP_DURN_100MS; + break; + case BMI160_TAP_DURN_150MS: + v_data_tap_durn_u8 = BMI160_TAP_DURN_150MS; + break; + case BMI160_TAP_DURN_200MS: + v_data_tap_durn_u8 = BMI160_TAP_DURN_200MS; + break; + case BMI160_TAP_DURN_250MS: + v_data_tap_durn_u8 = BMI160_TAP_DURN_250MS; + break; + case BMI160_TAP_DURN_375MS: + v_data_tap_durn_u8 = BMI160_TAP_DURN_375MS; + break; + case BMI160_TAP_DURN_500MS: + v_data_tap_durn_u8 = BMI160_TAP_DURN_500MS; + break; + case BMI160_TAP_DURN_700MS: + v_data_tap_durn_u8 = BMI160_TAP_DURN_700MS; + break; + default: + break; + } + /* write tap duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_TAP_0_INTR_TAP_DURN, + v_data_tap_durn_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} + /*! + * @brief This API read the + * tap shock duration from the register 0x63 bit 2 + * + * @param v_tap_shock_u8 :The value of tap shock + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_SHOCK_50MS + * 0x01 | BMI160_TAP_SHOCK_75MS + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_shock( +u8 *v_tap_shock_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read tap shock duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_tap_shock_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK); + } + return com_rslt; +} + /*! + * @brief This API write the + * tap shock duration from the register 0x63 bit 2 + * + * @param v_tap_shock_u8 :The value of tap shock + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_SHOCK_50MS + * 0x01 | BMI160_TAP_SHOCK_75MS + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_shock(u8 v_tap_shock_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_tap_shock_u8 <= BMI160_MAX_VALUE_TAP_SHOCK) { + /* write tap shock duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK, + v_tap_shock_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read + * tap quiet duration from the register 0x63 bit 7 + * + * + * @param v_tap_quiet_u8 : The value of tap quiet + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_QUIET_30MS + * 0x01 | BMI160_TAP_QUIET_20MS + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_quiet( +u8 *v_tap_quiet_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read tap quiet duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_tap_quiet_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET); + } + return com_rslt; +} +/*! + * @brief This API write + * tap quiet duration from the register 0x63 bit 7 + * + * + * @param v_tap_quiet_u8 : The value of tap quiet + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_QUIET_30MS + * 0x01 | BMI160_TAP_QUIET_20MS + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_quiet(u8 v_tap_quiet_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_tap_quiet_u8 <= BMI160_MAX_VALUE_TAP_QUIET) { + /* write tap quiet duration*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET, + v_tap_quiet_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} + /*! + * @brief This API read Threshold of the + * single/double tap interrupt from the register 0x64 bit 0 to 4 + * + * + * @param v_tap_thres_u8 : The value of single/double tap threshold + * + * @note single/double tap threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | single/double tap threshold + * ----------------|--------------------- + * 2g | ((v_tap_thres_u8 + 1) * 62.5)mg + * 4g | ((v_tap_thres_u8 + 1) * 125)mg + * 8g | ((v_tap_thres_u8 + 1) * 250)mg + * 16g | ((v_tap_thres_u8 + 1) * 500)mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_thres( +u8 *v_tap_thres_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read tap threshold*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_tap_thres_u8 = BMI160_GET_BITSLICE + (v_data_u8, + BMI160_USER_INTR_TAP_1_INTR_TAP_THRES); + } + return com_rslt; +} + /*! + * @brief This API write Threshold of the + * single/double tap interrupt from the register 0x64 bit 0 to 4 + * + * + * @param v_tap_thres_u8 : The value of single/double tap threshold + * + * @note single/double tap threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | single/double tap threshold + * ----------------|--------------------- + * 2g | ((v_tap_thres_u8 + 1) * 62.5)mg + * 4g | ((v_tap_thres_u8 + 1) * 125)mg + * 8g | ((v_tap_thres_u8 + 1) * 250)mg + * 16g | ((v_tap_thres_u8 + 1) * 500)mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_thres( +u8 v_tap_thres_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write tap threshold*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_TAP_1_INTR_TAP_THRES, + v_tap_thres_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} + /*! + * @brief This API read the threshold for orientation interrupt + * from the register 0x65 bit 0 and 1 + * + * @param v_orient_mode_u8 : The value of threshold for orientation + * value | Behaviour + * ----------|------------------- + * 0x00 | symmetrical + * 0x01 | high-asymmetrical + * 0x02 | low-asymmetrical + * 0x03 | symmetrical + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_mode( +u8 *v_orient_mode_u8) +{ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read orientation threshold*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_orient_mode_u8 = BMI160_GET_BITSLICE + (v_data_u8, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE); + } + return com_rslt; +} + /*! + * @brief This API write the threshold for orientation interrupt + * from the register 0x65 bit 0 and 1 + * + * @param v_orient_mode_u8 : The value of threshold for orientation + * value | Behaviour + * ----------|------------------- + * 0x00 | symmetrical + * 0x01 | high-asymmetrical + * 0x02 | low-asymmetrical + * 0x03 | symmetrical + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_mode( +u8 v_orient_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_orient_mode_u8 <= BMI160_MAX_ORIENT_MODE) { + /* write orientation threshold*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE, + v_orient_mode_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read the orient blocking mode + * that is used for the generation of the orientation interrupt. + * from the register 0x65 bit 2 and 3 + * + * @param v_orient_blocking_u8 : The value of orient blocking mode + * value | Behaviour + * ----------|------------------- + * 0x00 | No blocking + * 0x01 | Theta blocking or acceleration in any axis > 1.5g + * 0x02 | Theta blocking or acceleration slope in any axis > + * - | 0.2g or acceleration in any axis > 1.5g + * 0x03 | Theta blocking or acceleration slope in any axis > + * - | 0.4g or acceleration in any axis > + * - | 1.5g and value of orient is not stable + * - | for at least 100 ms + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_blocking( +u8 *v_orient_blocking_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read orient blocking mode*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_orient_blocking_u8 = BMI160_GET_BITSLICE + (v_data_u8, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING); + } + return com_rslt; +} +/*! + * @brief This API write the orient blocking mode + * that is used for the generation of the orientation interrupt. + * from the register 0x65 bit 2 and 3 + * + * @param v_orient_blocking_u8 : The value of orient blocking mode + * value | Behaviour + * ----------|------------------- + * 0x00 | No blocking + * 0x01 | Theta blocking or acceleration in any axis > 1.5g + * 0x02 | Theta blocking or acceleration slope in any axis > + * - | 0.2g or acceleration in any axis > 1.5g + * 0x03 | Theta blocking or acceleration slope in any axis > + * - | 0.4g or acceleration in any axis > + * - | 1.5g and value of orient is not stable + * - | for at least 100 ms + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_blocking( +u8 v_orient_blocking_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_orient_blocking_u8 <= BMI160_MAX_ORIENT_BLOCKING) { + /* write orient blocking mode*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING, + v_orient_blocking_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } +} +return com_rslt; +} +/*! + * @brief This API read Orient interrupt + * hysteresis, from the register 0x64 bit 4 to 7 + * + * + * + * @param v_orient_hyst_u8 : The value of orient hysteresis + * + * @note 1 LSB corresponds to 62.5 mg, + * irrespective of the selected accel range + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_hyst( +u8 *v_orient_hyst_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read orient hysteresis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_orient_hyst_u8 = BMI160_GET_BITSLICE + (v_data_u8, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST); + } + return com_rslt; +} +/*! + * @brief This API write Orient interrupt + * hysteresis, from the register 0x64 bit 4 to 7 + * + * + * + * @param v_orient_hyst_u8 : The value of orient hysteresis + * + * @note 1 LSB corresponds to 62.5 mg, + * irrespective of the selected accel range + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_hyst( +u8 v_orient_hyst_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write orient hysteresis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST, + v_orient_hyst_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} + /*! + * @brief This API read Orient + * blocking angle (0 to 44.8) from the register 0x66 bit 0 to 5 + * + * @param v_orient_theta_u8 : The value of Orient blocking angle + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_theta( +u8 *v_orient_theta_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read Orient blocking angle*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_orient_theta_u8 = BMI160_GET_BITSLICE + (v_data_u8, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA); + } + return com_rslt; +} + /*! + * @brief This API write Orient + * blocking angle (0 to 44.8) from the register 0x66 bit 0 to 5 + * + * @param v_orient_theta_u8 : The value of Orient blocking angle + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_theta( +u8 v_orient_theta_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_orient_theta_u8 <= BMI160_MAX_ORIENT_THETA) { + /* write Orient blocking angle*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA, + v_orient_theta_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } +} +return com_rslt; +} +/*! + * @brief This API read orient change + * of up/down bit from the register 0x66 bit 6 + * + * @param v_orient_ud_u8 : The value of orient change of up/down + * value | Behaviour + * ----------|------------------- + * 0x00 | Is ignored + * 0x01 | Generates orientation interrupt + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_ud_enable( +u8 *v_orient_ud_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read orient up/down enable*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_orient_ud_u8 = BMI160_GET_BITSLICE + (v_data_u8, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API write orient change + * of up/down bit from the register 0x66 bit 6 + * + * @param v_orient_ud_u8 : The value of orient change of up/down + * value | Behaviour + * ----------|------------------- + * 0x00 | Is ignored + * 0x01 | Generates orientation interrupt + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_ud_enable( +u8 v_orient_ud_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_orient_ud_u8 <= BMI160_MAX_VALUE_ORIENT_UD) { + /* write orient up/down enable */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE, + v_orient_ud_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } +} +return com_rslt; +} + /*! + * @brief This API read orientation axes changes + * from the register 0x66 bit 7 + * + * @param v_orient_axes_u8 : The value of orient axes assignment + * value | Behaviour | Name + * ----------|--------------------|------ + * 0x00 | x = x, y = y, z = z|orient_ax_noex + * 0x01 | x = y, y = z, z = x|orient_ax_ex + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_axes_enable( +u8 *v_orient_axes_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read orientation axes changes */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_orient_axes_u8 = BMI160_GET_BITSLICE + (v_data_u8, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX); + } + return com_rslt; +} + /*! + * @brief This API write orientation axes changes + * from the register 0x66 bit 7 + * + * @param v_orient_axes_u8 : The value of orient axes assignment + * value | Behaviour | Name + * ----------|--------------------|------ + * 0x00 | x = x, y = y, z = z|orient_ax_noex + * 0x01 | x = y, y = z, z = x|orient_ax_ex + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_axes_enable( +u8 v_orient_axes_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_orient_axes_u8 <= BMI160_MAX_VALUE_ORIENT_AXES) { + /*write orientation axes changes */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX, + v_orient_axes_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } +} +return com_rslt; +} + /*! + * @brief This API read Flat angle (0 to 44.8) for flat interrupt + * from the register 0x67 bit 0 to 5 + * + * @param v_flat_theta_u8 : The value of flat angle + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_theta( +u8 *v_flat_theta_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read Flat angle*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_flat_theta_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA); + } + return com_rslt; +} + /*! + * @brief This API write Flat angle (0 to 44.8) for flat interrupt + * from the register 0x67 bit 0 to 5 + * + * @param v_flat_theta_u8 : The value of flat angle + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_theta( +u8 v_flat_theta_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_flat_theta_u8 <= BMI160_MAX_FLAT_THETA) { + /* write Flat angle */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA, + v_flat_theta_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read Flat interrupt hold time; + * from the register 0x68 bit 4 and 5 + * + * @param v_flat_hold_u8 : The value of flat hold time + * value | Behaviour + * ----------|------------------- + * 0x00 | 0ms + * 0x01 | 512ms + * 0x01 | 1024ms + * 0x01 | 2048ms + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hold( +u8 *v_flat_hold_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read flat hold time*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_flat_hold_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD); + } + return com_rslt; +} +/*! + * @brief This API write Flat interrupt hold time; + * from the register 0x68 bit 4 and 5 + * + * @param v_flat_hold_u8 : The value of flat hold time + * value | Behaviour + * ----------|------------------- + * 0x00 | 0ms + * 0x01 | 512ms + * 0x01 | 1024ms + * 0x01 | 2048ms + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hold( +u8 v_flat_hold_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_flat_hold_u8 <= BMI160_MAX_FLAT_HOLD) { + /* write flat hold time*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD, + v_flat_hold_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read flat interrupt hysteresis + * from the register 0x68 bit 0 to 3 + * + * @param v_flat_hyst_u8 : The value of flat hysteresis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hyst( +u8 *v_flat_hyst_u8) +{ + /* variable used to return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the flat hysteresis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_flat_hyst_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST); + } + return com_rslt; +} +/*! + * @brief This API write flat interrupt hysteresis + * from the register 0x68 bit 0 to 3 + * + * @param v_flat_hyst_u8 : The value of flat hysteresis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hyst( +u8 v_flat_hyst_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_flat_hyst_u8 <= BMI160_MAX_FLAT_HYST) { + /* read the flat hysteresis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST, + v_flat_hyst_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} + /*! + * @brief This API read accel offset compensation + * target value for z-axis from the register 0x69 bit 0 and 1 + * + * @param v_foc_accel_z_u8 : the value of accel offset compensation z axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_z(u8 *v_foc_accel_z_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the accel offset compensation for z axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Z__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_foc_accel_z_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FOC_ACCEL_Z); + } + return com_rslt; +} + /*! + * @brief This API write accel offset compensation + * target value for z-axis from the register 0x69 bit 0 and 1 + * + * @param v_foc_accel_z_u8 : the value of accel offset compensation z axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_z( +u8 v_foc_accel_z_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write the accel offset compensation for z axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Z__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FOC_ACCEL_Z, + v_foc_accel_z_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Z__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} +/*! + * @brief This API read accel offset compensation + * target value for y-axis + * from the register 0x69 bit 2 and 3 + * + * @param v_foc_accel_y_u8 : the value of accel offset compensation y axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_y(u8 *v_foc_accel_y_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the accel offset compensation for y axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_foc_accel_y_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FOC_ACCEL_Y); + } + return com_rslt; +} +/*! + * @brief This API write accel offset compensation + * target value for y-axis + * from the register 0x69 bit 2 and 3 + * + * @param v_foc_accel_y_u8 : the value of accel offset compensation y axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x02 | -1g + * 0x03 | 0g + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_y(u8 v_foc_accel_y_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_foc_accel_y_u8 <= BMI160_MAX_ACCEL_FOC) { + /* write the accel offset compensation for y axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FOC_ACCEL_Y, + v_foc_accel_y_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read accel offset compensation + * target value for x-axis is + * from the register 0x69 bit 4 and 5 + * + * @param v_foc_accel_x_u8 : the value of accel offset compensation x axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x02 | -1g + * 0x03 | 0g + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_x(u8 *v_foc_accel_x_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the accel offset compensation for x axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_foc_accel_x_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FOC_ACCEL_X); + } + return com_rslt; +} +/*! + * @brief This API write accel offset compensation + * target value for x-axis is + * from the register 0x69 bit 4 and 5 + * + * @param v_foc_accel_x_u8 : the value of accel offset compensation x axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_x(u8 v_foc_accel_x_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_foc_accel_x_u8 <= BMI160_MAX_ACCEL_FOC) { + /* write the accel offset compensation for x axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FOC_ACCEL_X, + v_foc_accel_x_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API writes accel fast offset compensation + * from the register 0x69 bit 0 to 5 + * @brief This API writes each axis individually + * FOC_X_AXIS - bit 4 and 5 + * FOC_Y_AXIS - bit 2 and 3 + * FOC_Z_AXIS - bit 0 and 1 + * + * @param v_foc_accel_u8: The value of accel offset compensation + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @param v_axis_u8: The value of accel offset axis selection + * value | axis + * ----------|------------------- + * 0 | FOC_X_AXIS + * 1 | FOC_Y_AXIS + * 2 | FOC_Z_AXIS + * + * @param v_accel_offset_s8: The accel offset value + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_foc_trigger(u8 v_axis_u8, +u8 v_foc_accel_u8, s8 *v_accel_offset_s8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +s8 v_status_s8 = SUCCESS; +u8 v_timeout_u8 = BMI160_INIT_VALUE; +s8 v_foc_accel_offset_x_s8 = BMI160_INIT_VALUE; +s8 v_foc_accel_offset_y_s8 = BMI160_INIT_VALUE; +s8 v_foc_accel_offset_z_s8 = BMI160_INIT_VALUE; +u8 focstatus = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; +} else { + v_status_s8 = bmi160_set_accel_offset_enable( + ACCEL_OFFSET_ENABLE); + if (v_status_s8 == SUCCESS) { + switch (v_axis_u8) { + case FOC_X_AXIS: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FOC_ACCEL_X, + v_foc_accel_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + /* trigger the + FOC need to write + 0x03 in the register 0x7e*/ + com_rslt += + bmi160_set_command_register( + START_FOC_ACCEL_GYRO); + + com_rslt += + bmi160_get_foc_rdy(&focstatus); + if ((com_rslt != SUCCESS) || + (focstatus != BMI160_FOC_STAT_HIGH)) { + while ((com_rslt != SUCCESS) || + (focstatus != BMI160_FOC_STAT_HIGH + && v_timeout_u8 < + BMI160_MAXIMUM_TIMEOUT)) { + p_bmi160->delay_msec( + BMI160_DELAY_SETTLING_TIME); + com_rslt = bmi160_get_foc_rdy( + &focstatus); + v_timeout_u8++; + } + } + if ((com_rslt == SUCCESS) && + (focstatus == BMI160_FOC_STAT_HIGH)) { + com_rslt += + bmi160_get_accel_offset_compensation_xaxis( + &v_foc_accel_offset_x_s8); + *v_accel_offset_s8 = + v_foc_accel_offset_x_s8; + } + break; + case FOC_Y_AXIS: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FOC_ACCEL_Y, + v_foc_accel_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + /* trigger the FOC + need to write 0x03 + in the register 0x7e*/ + com_rslt += + bmi160_set_command_register( + START_FOC_ACCEL_GYRO); + + com_rslt += + bmi160_get_foc_rdy(&focstatus); + if ((com_rslt != SUCCESS) || + (focstatus != BMI160_FOC_STAT_HIGH)) { + while ((com_rslt != SUCCESS) || + (focstatus != BMI160_FOC_STAT_HIGH + && v_timeout_u8 < + BMI160_MAXIMUM_TIMEOUT)) { + p_bmi160->delay_msec( + BMI160_DELAY_SETTLING_TIME); + com_rslt = bmi160_get_foc_rdy( + &focstatus); + v_timeout_u8++; + } + } + if ((com_rslt == SUCCESS) && + (focstatus == BMI160_FOC_STAT_HIGH)) { + com_rslt += + bmi160_get_accel_offset_compensation_yaxis( + &v_foc_accel_offset_y_s8); + *v_accel_offset_s8 = + v_foc_accel_offset_y_s8; + } + break; + case FOC_Z_AXIS: + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Z__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FOC_ACCEL_Z, + v_foc_accel_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Z__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + /* trigger the FOC need to write + 0x03 in the register 0x7e*/ + com_rslt += + bmi160_set_command_register( + START_FOC_ACCEL_GYRO); + + com_rslt += + bmi160_get_foc_rdy(&focstatus); + if ((com_rslt != SUCCESS) || + (focstatus != BMI160_FOC_STAT_HIGH)) { + while ((com_rslt != SUCCESS) || + (focstatus != BMI160_FOC_STAT_HIGH + && v_timeout_u8 < + BMI160_MAXIMUM_TIMEOUT)) { + p_bmi160->delay_msec( + BMI160_DELAY_SETTLING_TIME); + com_rslt = bmi160_get_foc_rdy( + &focstatus); + v_timeout_u8++; + } + } + if ((com_rslt == SUCCESS) && + (focstatus == BMI160_FOC_STAT_HIGH)) { + com_rslt += + bmi160_get_accel_offset_compensation_zaxis( + &v_foc_accel_offset_z_s8); + *v_accel_offset_s8 = + v_foc_accel_offset_z_s8; + } + break; + default: + break; + } + } else { + com_rslt = ERROR; + } +} +return com_rslt; +} +/*! + * @brief This API write fast accel offset compensation + * it writes all axis together.To the register 0x69 bit 0 to 5 + * FOC_X_AXIS - bit 4 and 5 + * FOC_Y_AXIS - bit 2 and 3 + * FOC_Z_AXIS - bit 0 and 1 + * + * @param v_foc_accel_x_u8: The value of accel offset x compensation + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @param v_foc_accel_y_u8: The value of accel offset y compensation + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @param v_foc_accel_z_u8: The value of accel offset z compensation + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @param v_accel_off_x_s8: The value of accel offset x axis + * @param v_accel_off_y_s8: The value of accel offset y axis + * @param v_accel_off_z_s8: The value of accel offset z axis + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_accel_foc_trigger_xyz(u8 v_foc_accel_x_u8, +u8 v_foc_accel_y_u8, u8 v_foc_accel_z_u8, s8 *v_accel_off_x_s8, +s8 *v_accel_off_y_s8, s8 *v_accel_off_z_s8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 focx = BMI160_INIT_VALUE; +u8 focy = BMI160_INIT_VALUE; +u8 focz = BMI160_INIT_VALUE; +s8 v_foc_accel_offset_x_s8 = BMI160_INIT_VALUE; +s8 v_foc_accel_offset_y_s8 = BMI160_INIT_VALUE; +s8 v_foc_accel_offset_z_s8 = BMI160_INIT_VALUE; +u8 v_status_s8 = SUCCESS; +u8 v_timeout_u8 = BMI160_INIT_VALUE; +u8 focstatus = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + v_status_s8 = bmi160_set_accel_offset_enable( + ACCEL_OFFSET_ENABLE); + if (v_status_s8 == SUCCESS) { + /* foc x axis*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_X__REG, + &focx, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + focx = BMI160_SET_BITSLICE(focx, + BMI160_USER_FOC_ACCEL_X, + v_foc_accel_x_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_X__REG, + &focx, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + /* foc y axis*/ + com_rslt += + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Y__REG, + &focy, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + focy = BMI160_SET_BITSLICE(focy, + BMI160_USER_FOC_ACCEL_Y, + v_foc_accel_y_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Y__REG, + &focy, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + /* foc z axis*/ + com_rslt += + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Z__REG, + &focz, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + focz = BMI160_SET_BITSLICE(focz, + BMI160_USER_FOC_ACCEL_Z, + v_foc_accel_z_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_ACCEL_Z__REG, + &focz, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + /* trigger the FOC need to + write 0x03 in the register 0x7e*/ + com_rslt += bmi160_set_command_register( + START_FOC_ACCEL_GYRO); + + com_rslt += bmi160_get_foc_rdy( + &focstatus); + if ((com_rslt != SUCCESS) || + (focstatus != BMI160_FOC_STAT_HIGH)) { + while ((com_rslt != SUCCESS) || + (focstatus != BMI160_FOC_STAT_HIGH + && v_timeout_u8 < + BMI160_MAXIMUM_TIMEOUT)) { + p_bmi160->delay_msec( + BMI160_DELAY_SETTLING_TIME); + com_rslt = bmi160_get_foc_rdy( + &focstatus); + v_timeout_u8++; + } + } + if ((com_rslt == SUCCESS) && + (focstatus == BMI160_GEN_READ_WRITE_DATA_LENGTH)) { + com_rslt += + bmi160_get_accel_offset_compensation_xaxis( + &v_foc_accel_offset_x_s8); + *v_accel_off_x_s8 = + v_foc_accel_offset_x_s8; + com_rslt += + bmi160_get_accel_offset_compensation_yaxis( + &v_foc_accel_offset_y_s8); + *v_accel_off_y_s8 = + v_foc_accel_offset_y_s8; + com_rslt += + bmi160_get_accel_offset_compensation_zaxis( + &v_foc_accel_offset_z_s8); + *v_accel_off_z_s8 = + v_foc_accel_offset_z_s8; + } + } else { + com_rslt = ERROR; + } + } +return com_rslt; +} +/*! + * @brief This API read gyro fast offset enable + * from the register 0x69 bit 6 + * + * @param v_foc_gyro_u8 : The value of gyro fast offset enable + * value | Description + * ----------|------------- + * 0 | fast offset compensation disabled + * 1 | fast offset compensation enabled + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_gyro_enable( +u8 *v_foc_gyro_u8) +{ + /* used for return the status of bus communication */ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the gyro fast offset enable*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_FOC_GYRO_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_foc_gyro_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_FOC_GYRO_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API write gyro fast offset enable + * from the register 0x69 bit 6 + * + * @param v_foc_gyro_u8 : The value of gyro fast offset enable + * value | Description + * ----------|------------- + * 0 | fast offset compensation disabled + * 1 | fast offset compensation enabled + * + * @param v_gyro_off_x_s16 : The value of gyro fast offset x axis data + * @param v_gyro_off_y_s16 : The value of gyro fast offset y axis data + * @param v_gyro_off_z_s16 : The value of gyro fast offset z axis data + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_gyro_enable( +u8 v_foc_gyro_u8, s16 *v_gyro_off_x_s16, +s16 *v_gyro_off_y_s16, s16 *v_gyro_off_z_s16) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +u8 v_status_s8 = SUCCESS; +u8 v_timeout_u8 = BMI160_INIT_VALUE; +s16 offsetx = BMI160_INIT_VALUE; +s16 offsety = BMI160_INIT_VALUE; +s16 offsetz = BMI160_INIT_VALUE; +u8 focstatus = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + v_status_s8 = bmi160_set_gyro_offset_enable( + GYRO_OFFSET_ENABLE); + if (v_status_s8 == SUCCESS) { + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_FOC_GYRO_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_FOC_GYRO_ENABLE, + v_foc_gyro_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_FOC_GYRO_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + /* trigger the FOC need to write 0x03 + in the register 0x7e*/ + com_rslt += bmi160_set_command_register + (START_FOC_ACCEL_GYRO); + + com_rslt += bmi160_get_foc_rdy(&focstatus); + if ((com_rslt != SUCCESS) || + (focstatus != BMI160_FOC_STAT_HIGH)) { + while ((com_rslt != SUCCESS) || + (focstatus != BMI160_FOC_STAT_HIGH + && v_timeout_u8 < + BMI160_MAXIMUM_TIMEOUT)) { + p_bmi160->delay_msec( + BMI160_DELAY_SETTLING_TIME); + com_rslt = bmi160_get_foc_rdy( + &focstatus); + v_timeout_u8++; + } + } + if ((com_rslt == SUCCESS) && + (focstatus == BMI160_FOC_STAT_HIGH)) { + com_rslt += + bmi160_get_gyro_offset_compensation_xaxis + (&offsetx); + *v_gyro_off_x_s16 = offsetx; + + com_rslt += + bmi160_get_gyro_offset_compensation_yaxis + (&offsety); + *v_gyro_off_y_s16 = offsety; + + com_rslt += + bmi160_get_gyro_offset_compensation_zaxis( + &offsetz); + *v_gyro_off_z_s16 = offsetz; + } + } else { + com_rslt = ERROR; + } + } +return com_rslt; +} + /*! + * @brief This API read NVM program enable + * from the register 0x6A bit 1 + * + * @param v_nvm_prog_u8 : The value of NVM program enable + * Value | Description + * --------|------------- + * 0 | DISABLE + * 1 | ENABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_prog_enable( +u8 *v_nvm_prog_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read NVM program*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_CONFIG_NVM_PROG_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_nvm_prog_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_CONFIG_NVM_PROG_ENABLE); + } + return com_rslt; +} + /*! + * @brief This API write NVM program enable + * from the register 0x6A bit 1 + * + * @param v_nvm_prog_u8 : The value of NVM program enable + * Value | Description + * --------|------------- + * 0 | DISABLE + * 1 | ENABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_prog_enable( +u8 v_nvm_prog_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_nvm_prog_u8 <= BMI160_MAX_VALUE_NVM_PROG) { + /* write the NVM program*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_CONFIG_NVM_PROG_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_CONFIG_NVM_PROG_ENABLE, + v_nvm_prog_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_CONFIG_NVM_PROG_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read to configure SPI + * Interface Mode for primary and OIS interface + * from the register 0x6B bit 0 + * + * @param v_spi3_u8 : The value of SPI mode selection + * Value | Description + * --------|------------- + * 0 | SPI 4-wire mode + * 1 | SPI 3-wire mode + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi3( +u8 *v_spi3_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read SPI mode*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_SPI3__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_spi3_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_IF_CONFIG_SPI3); + } + return com_rslt; +} +/*! + * @brief This API write to configure SPI + * Interface Mode for primary and OIS interface + * from the register 0x6B bit 0 + * + * @param v_spi3_u8 : The value of SPI mode selection + * Value | Description + * --------|------------- + * 0 | SPI 4-wire mode + * 1 | SPI 3-wire mode + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi3( +u8 v_spi3_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_spi3_u8 <= BMI160_MAX_VALUE_SPI3) { + /* write SPI mode*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_SPI3__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_IF_CONFIG_SPI3, + v_spi3_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_SPI3__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read I2C Watchdog timer + * from the register 0x70 bit 1 + * + * @param v_i2c_wdt_u8 : The value of I2C watch dog timer + * Value | Description + * --------|------------- + * 0 | I2C watchdog v_timeout_u8 after 1 ms + * 1 | I2C watchdog v_timeout_u8 after 50 ms + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_select( +u8 *v_i2c_wdt_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read I2C watch dog timer */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_i2c_wdt_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_IF_CONFIG_I2C_WDT_SELECT); + } + return com_rslt; +} +/*! + * @brief This API write I2C Watchdog timer + * from the register 0x70 bit 1 + * + * @param v_i2c_wdt_u8 : The value of I2C watch dog timer + * Value | Description + * --------|------------- + * 0 | I2C watchdog v_timeout_u8 after 1 ms + * 1 | I2C watchdog v_timeout_u8 after 50 ms + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_select( +u8 v_i2c_wdt_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_i2c_wdt_u8 <= BMI160_MAX_VALUE_I2C_WDT) { + /* write I2C watch dog timer */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_IF_CONFIG_I2C_WDT_SELECT, + v_i2c_wdt_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read I2C watchdog enable + * from the register 0x70 bit 2 + * + * @param v_i2c_wdt_u8 : The value of I2C watchdog enable + * Value | Description + * --------|------------- + * 0 | DISABLE + * 1 | ENABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_enable( +u8 *v_i2c_wdt_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read i2c watch dog eneble */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_i2c_wdt_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API write I2C watchdog enable + * from the register 0x70 bit 2 + * + * @param v_i2c_wdt_u8 : The value of I2C watchdog enable + * Value | Description + * --------|------------- + * 0 | DISABLE + * 1 | ENABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_enable( +u8 v_i2c_wdt_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_i2c_wdt_u8 <= BMI160_MAX_VALUE_I2C_WDT) { + /* write i2c watch dog eneble */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE, + v_i2c_wdt_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read I2C interface configuration(if) moe + * from the register 0x6B bit 4 and 5 + * + * @param v_if_mode_u8 : The value of interface configuration mode + * Value | Description + * --------|------------- + * 0x00 | Primary interface:autoconfig / secondary interface:off + * 0x01 | Primary interface:I2C / secondary interface:OIS + * 0x02 | Primary interface:autoconfig/secondary interface:Magnetometer + * 0x03 | Reserved + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_if_mode( +u8 *v_if_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read if mode*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_IF_MODE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_if_mode_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_IF_CONFIG_IF_MODE); + } + return com_rslt; +} +/*! + * @brief This API write I2C interface configuration(if) moe + * from the register 0x6B bit 4 and 5 + * + * @param v_if_mode_u8 : The value of interface configuration mode + * Value | Description + * --------|------------- + * 0x00 | Primary interface:autoconfig / secondary interface:off + * 0x01 | Primary interface:I2C / secondary interface:OIS + * 0x02 | Primary interface:autoconfig/secondary interface:Magnetometer + * 0x03 | Reserved + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_if_mode( +u8 v_if_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_if_mode_u8 <= BMI160_MAX_IF_MODE) { + /* write if mode*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_IF_MODE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_IF_CONFIG_IF_MODE, + v_if_mode_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_IF_CONFIG_IF_MODE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read gyro sleep trigger + * from the register 0x6C bit 0 to 2 + * + * @param v_gyro_sleep_trigger_u8 : The value of gyro sleep trigger + * Value | Description + * --------|------------- + * 0x00 | nomotion: no / Not INT1 pin: no / INT2 pin: no + * 0x01 | nomotion: no / Not INT1 pin: no / INT2 pin: yes + * 0x02 | nomotion: no / Not INT1 pin: yes / INT2 pin: no + * 0x03 | nomotion: no / Not INT1 pin: yes / INT2 pin: yes + * 0x04 | nomotion: yes / Not INT1 pin: no / INT2 pin: no + * 0x05 | anymotion: yes / Not INT1 pin: no / INT2 pin: yes + * 0x06 | anymotion: yes / Not INT1 pin: yes / INT2 pin: no + * 0x07 | anymotion: yes / Not INT1 pin: yes / INT2 pin: yes + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_trigger( +u8 *v_gyro_sleep_trigger_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro sleep trigger */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_SLEEP_TRIGGER__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_gyro_sleep_trigger_u8 = + BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_SLEEP_TRIGGER); + } + return com_rslt; +} +/*! + * @brief This API write gyro sleep trigger + * from the register 0x6C bit 0 to 2 + * + * @param v_gyro_sleep_trigger_u8 : The value of gyro sleep trigger + * Value | Description + * --------|------------- + * 0x00 | nomotion: no / Not INT1 pin: no / INT2 pin: no + * 0x01 | nomotion: no / Not INT1 pin: no / INT2 pin: yes + * 0x02 | nomotion: no / Not INT1 pin: yes / INT2 pin: no + * 0x03 | nomotion: no / Not INT1 pin: yes / INT2 pin: yes + * 0x04 | nomotion: yes / Not INT1 pin: no / INT2 pin: no + * 0x05 | anymotion: yes / Not INT1 pin: no / INT2 pin: yes + * 0x06 | anymotion: yes / Not INT1 pin: yes / INT2 pin: no + * 0x07 | anymotion: yes / Not INT1 pin: yes / INT2 pin: yes + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_trigger( +u8 v_gyro_sleep_trigger_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_gyro_sleep_trigger_u8 <= BMI160_MAX_GYRO_SLEEP_TIGGER) { + /* write gyro sleep trigger */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_SLEEP_TRIGGER__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_SLEEP_TRIGGER, + v_gyro_sleep_trigger_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_SLEEP_TRIGGER__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read gyro wakeup trigger + * from the register 0x6C bit 3 and 4 + * + * @param v_gyro_wakeup_trigger_u8 : The value of gyro wakeup trigger + * Value | Description + * --------|------------- + * 0x00 | anymotion: no / INT1 pin: no + * 0x01 | anymotion: no / INT1 pin: yes + * 0x02 | anymotion: yes / INT1 pin: no + * 0x03 | anymotion: yes / INT1 pin: yes + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_trigger( +u8 *v_gyro_wakeup_trigger_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro wakeup trigger */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_WAKEUP_TRIGGER__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_gyro_wakeup_trigger_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_GYRO_WAKEUP_TRIGGER); + } + return com_rslt; +} +/*! + * @brief This API write gyro wakeup trigger + * from the register 0x6C bit 3 and 4 + * + * @param v_gyro_wakeup_trigger_u8 : The value of gyro wakeup trigger + * Value | Description + * --------|------------- + * 0x00 | anymotion: no / INT1 pin: no + * 0x01 | anymotion: no / INT1 pin: yes + * 0x02 | anymotion: yes / INT1 pin: no + * 0x03 | anymotion: yes / INT1 pin: yes + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_trigger( +u8 v_gyro_wakeup_trigger_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_gyro_wakeup_trigger_u8 + <= BMI160_MAX_GYRO_WAKEUP_TRIGGER) { + /* write gyro wakeup trigger */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_WAKEUP_TRIGGER__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_WAKEUP_TRIGGER, + v_gyro_wakeup_trigger_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_WAKEUP_TRIGGER__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read Target state for gyro sleep mode + * from the register 0x6C bit 5 + * + * @param v_gyro_sleep_state_u8 : The value of gyro sleep mode + * Value | Description + * --------|------------- + * 0x00 | Sleep transition to fast wake up state + * 0x01 | Sleep transition to suspend state + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_state( +u8 *v_gyro_sleep_state_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro sleep state*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_SLEEP_STATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_gyro_sleep_state_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_GYRO_SLEEP_STATE); + } + return com_rslt; +} +/*! + * @brief This API write Target state for gyro sleep mode + * from the register 0x6C bit 5 + * + * @param v_gyro_sleep_state_u8 : The value of gyro sleep mode + * Value | Description + * --------|------------- + * 0x00 | Sleep transition to fast wake up state + * 0x01 | Sleep transition to suspend state + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_state( +u8 v_gyro_sleep_state_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_gyro_sleep_state_u8 <= BMI160_MAX_VALUE_SLEEP_STATE) { + /* write gyro sleep state*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_SLEEP_STATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_SLEEP_STATE, + v_gyro_sleep_state_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_SLEEP_STATE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read gyro wakeup interrupt + * from the register 0x6C bit 6 + * + * @param v_gyro_wakeup_intr_u8 : The valeu of gyro wakeup interrupt + * Value | Description + * --------|------------- + * 0x00 | DISABLE + * 0x01 | ENABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_intr( +u8 *v_gyro_wakeup_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro wakeup interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_WAKEUP_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_gyro_wakeup_intr_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_GYRO_WAKEUP_INTR); + } + return com_rslt; +} +/*! + * @brief This API write gyro wakeup interrupt + * from the register 0x6C bit 6 + * + * @param v_gyro_wakeup_intr_u8 : The valeu of gyro wakeup interrupt + * Value | Description + * --------|------------- + * 0x00 | DISABLE + * 0x01 | ENABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_intr( +u8 v_gyro_wakeup_intr_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_gyro_wakeup_intr_u8 <= BMI160_MAX_VALUE_WAKEUP_INTR) { + /* write gyro wakeup interrupt */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_WAKEUP_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_WAKEUP_INTR, + v_gyro_wakeup_intr_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_WAKEUP_INTR__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read accel select axis to be self-test + * + * @param v_accel_selftest_axis_u8 : + * The value of accel self test axis selection + * Value | Description + * --------|------------- + * 0x00 | disabled + * 0x01 | x-axis + * 0x02 | y-axis + * 0x03 | z-axis + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_axis( +u8 *v_accel_selftest_axis_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read accel self test axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ACCEL_SELFTEST_AXIS__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_accel_selftest_axis_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_ACCEL_SELFTEST_AXIS); + } + return com_rslt; +} +/*! + * @brief This API write accel select axis to be self-test + * + * @param v_accel_selftest_axis_u8 : + * The value of accel self test axis selection + * Value | Description + * --------|------------- + * 0x00 | disabled + * 0x01 | x-axis + * 0x02 | y-axis + * 0x03 | z-axis + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_axis( +u8 v_accel_selftest_axis_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_accel_selftest_axis_u8 + <= BMI160_MAX_ACCEL_SELFTEST_AXIS) { + /* write accel self test axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ACCEL_SELFTEST_AXIS__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_ACCEL_SELFTEST_AXIS, + v_accel_selftest_axis_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ACCEL_SELFTEST_AXIS__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read accel self test axis sign + * from the register 0x6D bit 2 + * + * @param v_accel_selftest_sign_u8: The value of accel self test axis sign + * Value | Description + * --------|------------- + * 0x00 | negative + * 0x01 | positive + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_sign( +u8 *v_accel_selftest_sign_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read accel self test axis sign*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ACCEL_SELFTEST_SIGN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_accel_selftest_sign_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_ACCEL_SELFTEST_SIGN); + } + return com_rslt; +} +/*! + * @brief This API write accel self test axis sign + * from the register 0x6D bit 2 + * + * @param v_accel_selftest_sign_u8: The value of accel self test axis sign + * Value | Description + * --------|------------- + * 0x00 | negative + * 0x01 | positive + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_sign( +u8 v_accel_selftest_sign_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_accel_selftest_sign_u8 <= + BMI160_MAX_VALUE_SELFTEST_SIGN) { + /* write accel self test axis sign*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ACCEL_SELFTEST_SIGN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_ACCEL_SELFTEST_SIGN, + v_accel_selftest_sign_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_ACCEL_SELFTEST_SIGN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read accel self test amplitude + * from the register 0x6D bit 3 + * select amplitude of the selftest deflection: + * + * @param v_accel_selftest_amp_u8 : The value of accel self test amplitude + * Value | Description + * --------|------------- + * 0x00 | LOW + * 0x01 | HIGH + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_amp( +u8 *v_accel_selftest_amp_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read self test amplitude*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_SELFTEST_AMP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_accel_selftest_amp_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_SELFTEST_AMP); + } + return com_rslt; +} +/*! + * @brief This API write accel self test amplitude + * from the register 0x6D bit 3 + * select amplitude of the selftest deflection: + * + * @param v_accel_selftest_amp_u8 : The value of accel self test amplitude + * Value | Description + * --------|------------- + * 0x00 | LOW + * 0x01 | HIGH + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_amp( +u8 v_accel_selftest_amp_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_accel_selftest_amp_u8 <= + BMI160_MAX_VALUE_SELFTEST_AMP) { + /* write self test amplitude*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_SELFTEST_AMP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_SELFTEST_AMP, + v_accel_selftest_amp_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_SELFTEST_AMP__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} +/*! + * @brief This API read gyro self test trigger + * + * @param v_gyro_selftest_start_u8: The value of gyro self test start + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest_start( +u8 *v_gyro_selftest_start_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro self test start */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_SELFTEST_START__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_gyro_selftest_start_u8 = BMI160_GET_BITSLICE( + v_data_u8, + BMI160_USER_GYRO_SELFTEST_START); + } + return com_rslt; +} +/*! + * @brief This API write gyro self test trigger + * + * @param v_gyro_selftest_start_u8: The value of gyro self test start + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_selftest_start( +u8 v_gyro_selftest_start_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_gyro_selftest_start_u8 <= + BMI160_MAX_VALUE_SELFTEST_START) { + /* write gyro self test start */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_SELFTEST_START__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_GYRO_SELFTEST_START, + v_gyro_selftest_start_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_GYRO_SELFTEST_START__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} + /*! + * @brief This API read primary interface selection I2C or SPI + * from the register 0x70 bit 0 + * + * @param v_spi_enable_u8: The value of Interface selection + * Value | Description + * --------|------------- + * 0x00 | I2C Enable + * 0x01 | I2C DISBALE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi_enable(u8 *v_spi_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read interface section*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_NV_CONFIG_SPI_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_spi_enable_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_NV_CONFIG_SPI_ENABLE); + } + return com_rslt; +} + /*! + * @brief This API write primary interface selection I2C or SPI + * from the register 0x70 bit 0 + * + * @param v_spi_enable_u8: The value of Interface selection + * Value | Description + * --------|------------- + * 0x00 | I2C Enable + * 0x01 | I2C DISBALE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi_enable(u8 v_spi_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write interface section*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_NV_CONFIG_SPI_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_NV_CONFIG_SPI_ENABLE, + v_spi_enable_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_NV_CONFIG_SPI_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} + /*! + * @brief This API read the spare zero + * form register 0x70 bit 3 + * + * + * @param v_spare0_trim_u8: The value of spare zero + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_spare0_trim(u8 *v_spare0_trim_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read spare zero*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_NV_CONFIG_SPARE0__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_spare0_trim_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_NV_CONFIG_SPARE0); + } + return com_rslt; +} + /*! + * @brief This API write the spare zero + * form register 0x70 bit 3 + * + * + * @param v_spare0_trim_u8: The value of spare zero + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_spare0_trim(u8 v_spare0_trim_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write spare zero*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_NV_CONFIG_SPARE0__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_NV_CONFIG_SPARE0, + v_spare0_trim_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_NV_CONFIG_SPARE0__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} + /*! + * @brief This API read the NVM counter + * form register 0x70 bit 4 to 7 + * + * + * @param v_nvm_counter_u8: The value of NVM counter + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_counter(u8 *v_nvm_counter_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read NVM counter*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_NV_CONFIG_NVM_COUNTER__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_nvm_counter_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_NV_CONFIG_NVM_COUNTER); + } + return com_rslt; +} + /*! + * @brief This API write the NVM counter + * form register 0x70 bit 4 to 7 + * + * + * @param v_nvm_counter_u8: The value of NVM counter + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_counter( +u8 v_nvm_counter_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write NVM counter*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_NV_CONFIG_NVM_COUNTER__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_NV_CONFIG_NVM_COUNTER, + v_nvm_counter_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_NV_CONFIG_NVM_COUNTER__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} +/*! + * @brief This API read accel manual offset compensation of x axis + * from the register 0x71 bit 0 to 7 + * + * + * + * @param v_accel_off_x_s8: + * The value of accel manual offset compensation of x axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_xaxis( +s8 *v_accel_off_x_s8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read accel manual offset compensation of x axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_0_ACCEL_OFF_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_accel_off_x_s8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_OFFSET_0_ACCEL_OFF_X); + } + return com_rslt; +} +/*! + * @brief This API write accel manual offset compensation of x axis + * from the register 0x71 bit 0 to 7 + * + * + * + * @param v_accel_off_x_s8: + * The value of accel manual offset compensation of x axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_xaxis( +s8 v_accel_off_x_s8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +u8 v_status_s8 = SUCCESS; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* enable accel offset */ + v_status_s8 = bmi160_set_accel_offset_enable( + ACCEL_OFFSET_ENABLE); + if (v_status_s8 == SUCCESS) { + /* write accel manual offset compensation of x axis*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_0_ACCEL_OFF_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE( + v_data_u8, + BMI160_USER_OFFSET_0_ACCEL_OFF_X, + v_accel_off_x_s8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_0_ACCEL_OFF_X__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = ERROR; + } + } + return com_rslt; +} +/*! + * @brief This API read accel manual offset compensation of y axis + * from the register 0x72 bit 0 to 7 + * + * + * + * @param v_accel_off_y_s8: + * The value of accel manual offset compensation of y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_yaxis( +s8 *v_accel_off_y_s8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read accel manual offset compensation of y axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_1_ACCEL_OFF_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_accel_off_y_s8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_OFFSET_1_ACCEL_OFF_Y); + } + return com_rslt; +} +/*! + * @brief This API write accel manual offset compensation of y axis + * from the register 0x72 bit 0 to 7 + * + * + * + * @param v_accel_off_y_s8: + * The value of accel manual offset compensation of y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_yaxis( +s8 v_accel_off_y_s8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +u8 v_status_s8 = SUCCESS; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* enable accel offset */ + v_status_s8 = bmi160_set_accel_offset_enable( + ACCEL_OFFSET_ENABLE); + if (v_status_s8 == SUCCESS) { + /* write accel manual offset compensation of y axis*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_1_ACCEL_OFF_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE( + v_data_u8, + BMI160_USER_OFFSET_1_ACCEL_OFF_Y, + v_accel_off_y_s8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_1_ACCEL_OFF_Y__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = ERROR; + } + } + return com_rslt; +} +/*! + * @brief This API read accel manual offset compensation of z axis + * from the register 0x73 bit 0 to 7 + * + * + * + * @param v_accel_off_z_s8: + * The value of accel manual offset compensation of z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_zaxis( +s8 *v_accel_off_z_s8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read accel manual offset compensation of z axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_2_ACCEL_OFF_Z__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_accel_off_z_s8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_OFFSET_2_ACCEL_OFF_Z); + } + return com_rslt; +} +/*! + * @brief This API write accel manual offset compensation of z axis + * from the register 0x73 bit 0 to 7 + * + * + * + * @param v_accel_off_z_s8: + * The value of accel manual offset compensation of z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_zaxis( +s8 v_accel_off_z_s8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + u8 v_status_s8 = SUCCESS; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* enable accel offset */ + v_status_s8 = bmi160_set_accel_offset_enable( + ACCEL_OFFSET_ENABLE); + if (v_status_s8 == SUCCESS) { + /* write accel manual offset + compensation of z axis*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_2_ACCEL_OFF_Z__REG, + &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_OFFSET_2_ACCEL_OFF_Z, + v_accel_off_z_s8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_2_ACCEL_OFF_Z__REG, + &v_data_u8, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = ERROR; + } + } + return com_rslt; +} +/*! + * @brief This API read gyro manual offset compensation of x axis + * from the register 0x74 bit 0 to 7 and 0x77 bit 0 and 1 + * + * + * + * @param v_gyro_off_x_s16: + * The value of gyro manual offset compensation of x axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_xaxis( +s16 *v_gyro_off_x_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data1_u8r = BMI160_INIT_VALUE; + u8 v_data2_u8r = BMI160_INIT_VALUE; + s16 v_data3_u8r, v_data4_u8r = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro offset x*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_3_GYRO_OFF_X__REG, + &v_data1_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data1_u8r = BMI160_GET_BITSLICE(v_data1_u8r, + BMI160_USER_OFFSET_3_GYRO_OFF_X); + com_rslt += p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_X__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data2_u8r = BMI160_GET_BITSLICE(v_data2_u8r, + BMI160_USER_OFFSET_6_GYRO_OFF_X); + v_data3_u8r = v_data2_u8r + << BMI160_SHIFT_BIT_POSITION_BY_14_BITS; + v_data4_u8r = v_data1_u8r + << BMI160_SHIFT_BIT_POSITION_BY_06_BITS; + v_data3_u8r = v_data3_u8r | v_data4_u8r; + *v_gyro_off_x_s16 = v_data3_u8r + >> BMI160_SHIFT_BIT_POSITION_BY_06_BITS; + } + return com_rslt; +} +/*! + * @brief This API write gyro manual offset compensation of x axis + * from the register 0x74 bit 0 to 7 and 0x77 bit 0 and 1 + * + * + * + * @param v_gyro_off_x_s16: + * The value of gyro manual offset compensation of x axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_xaxis( +s16 v_gyro_off_x_s16) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data1_u8r, v_data2_u8r = BMI160_INIT_VALUE; +u16 v_data3_u8r = BMI160_INIT_VALUE; +u8 v_status_s8 = SUCCESS; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write gyro offset x*/ + v_status_s8 = bmi160_set_gyro_offset_enable( + GYRO_OFFSET_ENABLE); + if (v_status_s8 == SUCCESS) { + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_3_GYRO_OFF_X__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data1_u8r = + ((s8) (v_gyro_off_x_s16 & + BMI160_GYRO_MANUAL_OFFSET_0_7)); + v_data2_u8r = BMI160_SET_BITSLICE( + v_data2_u8r, + BMI160_USER_OFFSET_3_GYRO_OFF_X, + v_data1_u8r); + /* write 0x74 bit 0 to 7*/ + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_3_GYRO_OFF_X__REG, + &v_data2_u8r, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + com_rslt += p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_X__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data3_u8r = + (u16) (v_gyro_off_x_s16 & + BMI160_GYRO_MANUAL_OFFSET_8_9); + v_data1_u8r = (u8)(v_data3_u8r + >> BMI160_SHIFT_BIT_POSITION_BY_08_BITS); + v_data2_u8r = BMI160_SET_BITSLICE( + v_data2_u8r, + BMI160_USER_OFFSET_6_GYRO_OFF_X, + v_data1_u8r); + /* write 0x77 bit 0 and 1*/ + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_X__REG, + &v_data2_u8r, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + return ERROR; + } + } +return com_rslt; +} +/*! + * @brief This API read gyro manual offset compensation of y axis + * from the register 0x75 bit 0 to 7 and 0x77 bit 2 and 3 + * + * + * + * @param v_gyro_off_y_s16: + * The value of gyro manual offset compensation of y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_yaxis( +s16 *v_gyro_off_y_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data1_u8r = BMI160_INIT_VALUE; + u8 v_data2_u8r = BMI160_INIT_VALUE; + s16 v_data3_u8r, v_data4_u8r = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro offset y*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_4_GYRO_OFF_Y__REG, + &v_data1_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data1_u8r = BMI160_GET_BITSLICE(v_data1_u8r, + BMI160_USER_OFFSET_4_GYRO_OFF_Y); + com_rslt += p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_Y__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data2_u8r = BMI160_GET_BITSLICE(v_data2_u8r, + BMI160_USER_OFFSET_6_GYRO_OFF_Y); + v_data3_u8r = v_data2_u8r + << BMI160_SHIFT_BIT_POSITION_BY_14_BITS; + v_data4_u8r = v_data1_u8r + << BMI160_SHIFT_BIT_POSITION_BY_06_BITS; + v_data3_u8r = v_data3_u8r | v_data4_u8r; + *v_gyro_off_y_s16 = v_data3_u8r + >> BMI160_SHIFT_BIT_POSITION_BY_06_BITS; + } + return com_rslt; +} +/*! + * @brief This API write gyro manual offset compensation of y axis + * from the register 0x75 bit 0 to 7 and 0x77 bit 2 and 3 + * + * + * + * @param v_gyro_off_y_s16: + * The value of gyro manual offset compensation of y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_yaxis( +s16 v_gyro_off_y_s16) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data1_u8r, v_data2_u8r = BMI160_INIT_VALUE; +u16 v_data3_u8r = BMI160_INIT_VALUE; +u8 v_status_s8 = SUCCESS; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* enable gyro offset bit */ + v_status_s8 = bmi160_set_gyro_offset_enable( + GYRO_OFFSET_ENABLE); + /* write gyro offset y*/ + if (v_status_s8 == SUCCESS) { + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_4_GYRO_OFF_Y__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data1_u8r = + ((s8) (v_gyro_off_y_s16 & + BMI160_GYRO_MANUAL_OFFSET_0_7)); + v_data2_u8r = BMI160_SET_BITSLICE( + v_data2_u8r, + BMI160_USER_OFFSET_4_GYRO_OFF_Y, + v_data1_u8r); + /* write 0x75 bit 0 to 7*/ + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_4_GYRO_OFF_Y__REG, + &v_data2_u8r, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + com_rslt += p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_Y__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data3_u8r = + (u16) (v_gyro_off_y_s16 & + BMI160_GYRO_MANUAL_OFFSET_8_9); + v_data1_u8r = (u8)(v_data3_u8r + >> BMI160_SHIFT_BIT_POSITION_BY_08_BITS); + v_data2_u8r = BMI160_SET_BITSLICE( + v_data2_u8r, + BMI160_USER_OFFSET_6_GYRO_OFF_Y, + v_data1_u8r); + /* write 0x77 bit 2 and 3*/ + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_Y__REG, + &v_data2_u8r, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + return ERROR; + } + } +return com_rslt; +} +/*! + * @brief This API read gyro manual offset compensation of z axis + * from the register 0x76 bit 0 to 7 and 0x77 bit 4 and 5 + * + * + * + * @param v_gyro_off_z_s16: + * The value of gyro manual offset compensation of z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_zaxis( +s16 *v_gyro_off_z_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data1_u8r = BMI160_INIT_VALUE; + u8 v_data2_u8r = BMI160_INIT_VALUE; + s16 v_data3_u8r, v_data4_u8r = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro manual offset z axis*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_5_GYRO_OFF_Z__REG, + &v_data1_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data1_u8r = BMI160_GET_BITSLICE + (v_data1_u8r, + BMI160_USER_OFFSET_5_GYRO_OFF_Z); + com_rslt += + p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_Z__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data2_u8r = BMI160_GET_BITSLICE( + v_data2_u8r, + BMI160_USER_OFFSET_6_GYRO_OFF_Z); + v_data3_u8r = v_data2_u8r + << BMI160_SHIFT_BIT_POSITION_BY_14_BITS; + v_data4_u8r = v_data1_u8r + << BMI160_SHIFT_BIT_POSITION_BY_06_BITS; + v_data3_u8r = v_data3_u8r | v_data4_u8r; + *v_gyro_off_z_s16 = v_data3_u8r + >> BMI160_SHIFT_BIT_POSITION_BY_06_BITS; + } + return com_rslt; +} +/*! + * @brief This API write gyro manual offset compensation of z axis + * from the register 0x76 bit 0 to 7 and 0x77 bit 4 and 5 + * + * + * + * @param v_gyro_off_z_s16: + * The value of gyro manual offset compensation of z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_zaxis( +s16 v_gyro_off_z_s16) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data1_u8r, v_data2_u8r = BMI160_INIT_VALUE; +u16 v_data3_u8r = BMI160_INIT_VALUE; +u8 v_status_s8 = SUCCESS; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* enable gyro offset*/ + v_status_s8 = bmi160_set_gyro_offset_enable( + GYRO_OFFSET_ENABLE); + /* write gyro manual offset z axis*/ + if (v_status_s8 == SUCCESS) { + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_5_GYRO_OFF_Z__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data1_u8r = + ((u8) (v_gyro_off_z_s16 & + BMI160_GYRO_MANUAL_OFFSET_0_7)); + v_data2_u8r = BMI160_SET_BITSLICE( + v_data2_u8r, + BMI160_USER_OFFSET_5_GYRO_OFF_Z, + v_data1_u8r); + /* write 0x76 bit 0 to 7*/ + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_5_GYRO_OFF_Z__REG, + &v_data2_u8r, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + com_rslt += p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_Z__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data3_u8r = + (u16) (v_gyro_off_z_s16 & + BMI160_GYRO_MANUAL_OFFSET_8_9); + v_data1_u8r = (u8)(v_data3_u8r + >> BMI160_SHIFT_BIT_POSITION_BY_08_BITS); + v_data2_u8r = BMI160_SET_BITSLICE( + v_data2_u8r, + BMI160_USER_OFFSET_6_GYRO_OFF_Z, + v_data1_u8r); + /* write 0x77 bit 4 and 5*/ + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_Z__REG, + &v_data2_u8r, + BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + return ERROR; + } + } +return com_rslt; +} +/*! + * @brief This API read the accel offset enable bit + * from the register 0x77 bit 6 + * + * + * + * @param v_accel_off_enable_u8: The value of accel offset enable + * value | Description + * ----------|-------------- + * 0x01 | ENABLE + * 0x00 | DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_enable( +u8 *v_accel_off_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read accel offset enable */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_accel_off_enable_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE); + } + return com_rslt; +} +/*! + * @brief This API write the accel offset enable bit + * from the register 0x77 bit 6 + * + * + * + * @param v_accel_off_enable_u8: The value of accel offset enable + * value | Description + * ----------|-------------- + * 0x01 | ENABLE + * 0x00 | DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_enable( +u8 v_accel_off_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write accel offset enable */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE, + v_accel_off_enable_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} +/*! + * @brief This API read the accel offset enable bit + * from the register 0x77 bit 7 + * + * + * + * @param v_gyro_off_enable_u8: The value of gyro offset enable + * value | Description + * ----------|-------------- + * 0x01 | ENABLE + * 0x00 | DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_enable( +u8 *v_gyro_off_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read gyro offset*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_EN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_gyro_off_enable_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_OFFSET_6_GYRO_OFF_EN); + } + return com_rslt; +} +/*! + * @brief This API write the accel offset enable bit + * from the register 0x77 bit 7 + * + * + * + * @param v_gyro_off_enable_u8: The value of gyro offset enable + * value | Description + * ----------|-------------- + * 0x01 | ENABLE + * 0x00 | DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_enable( +u8 v_gyro_off_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write gyro offset*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_EN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_OFFSET_6_GYRO_OFF_EN, + v_gyro_off_enable_u8); + com_rslt += p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_USER_OFFSET_6_GYRO_OFF_EN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} +/*! + * @brief This API reads step counter value + * form the register 0x78 and 0x79 + * + * + * + * + * @param v_step_cnt_s16 : The value of step counter + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_step_count(s16 *v_step_cnt_s16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* array having the step counter LSB and MSB data + v_data_u8[0] - LSB + v_data_u8[1] - MSB*/ + u8 a_data_u8r[BMI160_STEP_COUNT_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read step counter */ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STEP_COUNT_LSB__REG, + a_data_u8r, BMI160_STEP_COUNTER_LENGTH); + + *v_step_cnt_s16 = (s16) + ((((s32)((s8)a_data_u8r[BMI160_STEP_COUNT_MSB_BYTE])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (a_data_u8r[BMI160_STEP_COUNT_LSB_BYTE])); + } + return com_rslt; +} + /*! + * @brief This API Reads + * step counter configuration + * from the register 0x7A bit 0 to 7 + * and from the register 0x7B bit 0 to 2 and 4 to 7 + * + * + * @param v_step_config_u16 : The value of step configuration + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_config( +u16 *v_step_config_u16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data1_u8r = BMI160_INIT_VALUE; + u8 v_data2_u8r = BMI160_INIT_VALUE; + u16 v_data3_u8r = BMI160_INIT_VALUE; + /* Read the 0 to 7 bit*/ + com_rslt = + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_ZERO__REG, + &v_data1_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* Read the 8 to 10 bit*/ + com_rslt += + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_ONE_CNF1__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data2_u8r = BMI160_GET_BITSLICE(v_data2_u8r, + BMI160_USER_STEP_CONFIG_ONE_CNF1); + v_data3_u8r = ((u16)((((u32) + ((u8)v_data2_u8r)) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | (v_data1_u8r))); + /* Read the 11 to 14 bit*/ + com_rslt += + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_ONE_CNF2__REG, + &v_data1_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data1_u8r = BMI160_GET_BITSLICE(v_data1_u8r, + BMI160_USER_STEP_CONFIG_ONE_CNF2); + *v_step_config_u16 = ((u16)((((u32) + ((u8)v_data1_u8r)) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | (v_data3_u8r))); + + return com_rslt; +} + /*! + * @brief This API write + * step counter configuration + * from the register 0x7A bit 0 to 7 + * and from the register 0x7B bit 0 to 2 and 4 to 7 + * + * + * @param v_step_config_u16 : + * the value of Enable step configuration + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_config( +u16 v_step_config_u16) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data1_u8r = BMI160_INIT_VALUE; + u8 v_data2_u8r = BMI160_INIT_VALUE; + u16 v_data3_u16 = BMI160_INIT_VALUE; + + /* write the 0 to 7 bit*/ + v_data1_u8r = (u8)(v_step_config_u16 & + BMI160_STEP_CONFIG_0_7); + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_ZERO__REG, + &v_data1_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* write the 8 to 10 bit*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_ONE_CNF1__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data3_u16 = (u16) (v_step_config_u16 & + BMI160_STEP_CONFIG_8_10); + v_data1_u8r = (u8)(v_data3_u16 + >> BMI160_SHIFT_BIT_POSITION_BY_08_BITS); + v_data2_u8r = BMI160_SET_BITSLICE(v_data2_u8r, + BMI160_USER_STEP_CONFIG_ONE_CNF1, v_data1_u8r); + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_ONE_CNF1__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + /* write the 11 to 14 bit*/ + com_rslt += p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_ONE_CNF2__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data3_u16 = (u16) (v_step_config_u16 & + BMI160_STEP_CONFIG_11_14); + v_data1_u8r = (u8)(v_data3_u16 + >> BMI160_SHIFT_BIT_POSITION_BY_12_BITS); + v_data2_u8r = BMI160_SET_BITSLICE(v_data2_u8r, + BMI160_USER_STEP_CONFIG_ONE_CNF2, v_data1_u8r); + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_ONE_CNF2__REG, + &v_data2_u8r, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + + return com_rslt; +} + /*! + * @brief This API read enable step counter + * from the register 0x7B bit 3 + * + * + * @param v_step_counter_u8 : The value of step counter enable + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_counter_enable( +u8 *v_step_counter_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the step counter */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_step_counter_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE); + } + return com_rslt; +} + /*! + * @brief This API write enable step counter + * from the register 0x7B bit 3 + * + * + * @param v_step_counter_u8 : The value of step counter enable + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_counter_enable(u8 v_step_counter_u8) +{ +/* variable used for return the status of communication result*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_data_u8 = BMI160_INIT_VALUE; +/* check the p_bmi160 structure as NULL*/ +if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; +} else { + if (v_step_counter_u8 <= BMI160_MAX_GYRO_STEP_COUNTER) { + /* write the step counter */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE, + v_step_counter_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } +} + return com_rslt; +} + /*! + * @brief This API set Step counter modes + * + * + * @param v_step_mode_u8 : The value of step counter mode + * value | mode + * ----------|----------- + * 0 | BMI160_STEP_NORMAL_MODE + * 1 | BMI160_STEP_SENSITIVE_MODE + * 2 | BMI160_STEP_ROBUST_MODE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_mode(u8 v_step_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + + switch (v_step_mode_u8) { + case BMI160_STEP_NORMAL_MODE: + com_rslt = bmi160_set_step_config( + STEP_CONFIG_NORMAL); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + case BMI160_STEP_SENSITIVE_MODE: + com_rslt = bmi160_set_step_config( + STEP_CONFIG_SENSITIVE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + case BMI160_STEP_ROBUST_MODE: + com_rslt = bmi160_set_step_config( + STEP_CONFIG_ROBUST); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + + return com_rslt; +} +/*! + * @brief This API used to trigger the signification motion + * interrupt + * + * + * @param v_significant_u8 : The value of interrupt selection + * value | interrupt + * ----------|----------- + * 0 | BMI160_MAP_INTR1 + * 1 | BMI160_MAP_INTR2 + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_map_significant_motion_intr( +u8 v_significant_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_sig_motion_u8 = BMI160_INIT_VALUE; + u8 v_data_u8 = BMI160_INIT_VALUE; + u8 v_any_motion_intr1_stat_u8 = BMI160_ENABLE_ANY_MOTION_INTR1; + u8 v_any_motion_intr2_stat_u8 = BMI160_ENABLE_ANY_MOTION_INTR2; + u8 v_any_motion_axis_stat_u8 = BMI160_ENABLE_ANY_MOTION_AXIS; + /* enable the significant motion interrupt */ + com_rslt = bmi160_get_intr_significant_motion_select(&v_sig_motion_u8); + if (v_sig_motion_u8 != BMI160_SIG_MOTION_STAT_HIGH) + com_rslt += bmi160_set_intr_significant_motion_select( + BMI160_SIG_MOTION_INTR_ENABLE); + switch (v_significant_u8) { + case BMI160_MAP_INTR1: + /* interrupt */ + com_rslt += bmi160_read_reg( + BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data_u8 |= v_any_motion_intr1_stat_u8; + /* map the signification interrupt to any-motion interrupt1*/ + com_rslt += bmi160_write_reg( + BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* axis*/ + com_rslt = bmi160_read_reg(BMI160_USER_INTR_ENABLE_0_ADDR, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data_u8 |= v_any_motion_axis_stat_u8; + com_rslt += bmi160_write_reg( + BMI160_USER_INTR_ENABLE_0_ADDR, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + + case BMI160_MAP_INTR2: + /* map the signification interrupt to any-motion interrupt2*/ + com_rslt += bmi160_read_reg( + BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data_u8 |= v_any_motion_intr2_stat_u8; + com_rslt += bmi160_write_reg( + BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* axis*/ + com_rslt = bmi160_read_reg(BMI160_USER_INTR_ENABLE_0_ADDR, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data_u8 |= v_any_motion_axis_stat_u8; + com_rslt += bmi160_write_reg( + BMI160_USER_INTR_ENABLE_0_ADDR, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + + } + return com_rslt; +} +/*! + * @brief This API used to trigger the step detector + * interrupt + * + * + * @param v_step_detector_u8 : The value of interrupt selection + * value | interrupt + * ----------|----------- + * 0 | BMI160_MAP_INTR1 + * 1 | BMI160_MAP_INTR2 + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_map_step_detector_intr( +u8 v_step_detector_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_step_det_u8 = BMI160_INIT_VALUE; + u8 v_data_u8 = BMI160_INIT_VALUE; + u8 v_low_g_intr_u81_stat_u8 = BMI160_LOW_G_INTR_STAT; + u8 v_low_g_intr_u82_stat_u8 = BMI160_LOW_G_INTR_STAT; + u8 v_low_g_enable_u8 = BMI160_ENABLE_LOW_G; + /* read the v_status_s8 of step detector interrupt*/ + com_rslt = bmi160_get_step_detector_enable(&v_step_det_u8); + if (v_step_det_u8 != BMI160_STEP_DET_STAT_HIGH) + com_rslt += bmi160_set_step_detector_enable( + BMI160_STEP_DETECT_INTR_ENABLE); + switch (v_step_detector_u8) { + case BMI160_MAP_INTR1: + com_rslt += bmi160_read_reg( + BMI160_USER_INTR_MAP_0_INTR1_LOW_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data_u8 |= v_low_g_intr_u81_stat_u8; + /* map the step detector interrupt + to Low-g interrupt 1*/ + com_rslt += bmi160_write_reg( + BMI160_USER_INTR_MAP_0_INTR1_LOW_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* Enable the Low-g interrupt*/ + com_rslt = bmi160_read_reg( + BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data_u8 |= v_low_g_enable_u8; + com_rslt += bmi160_write_reg( + BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + case BMI160_MAP_INTR2: + /* map the step detector interrupt + to Low-g interrupt 1*/ + com_rslt += bmi160_read_reg( + BMI160_USER_INTR_MAP_2_INTR2_LOW_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data_u8 |= v_low_g_intr_u82_stat_u8; + + com_rslt += bmi160_write_reg( + BMI160_USER_INTR_MAP_2_INTR2_LOW_G__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* Enable the Low-g interrupt*/ + com_rslt = bmi160_read_reg( + BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_data_u8 |= v_low_g_enable_u8; + com_rslt += bmi160_write_reg( + BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + return com_rslt; +} + /*! + * @brief This API used to clear the step counter interrupt + * interrupt + * + * + * @param : None + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_clear_step_counter(void) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* clear the step counter*/ + com_rslt = bmi160_set_command_register(RESET_STEP_COUNTER); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + + return com_rslt; + +} + /*! + * @brief This API writes value to the register 0x7E bit 0 to 7 + * + * + * @param v_command_reg_u8 : The value to write command register + * value | Description + * ---------|-------------------------------------------------------- + * 0x00 | Reserved + * 0x03 | Starts fast offset calibration for the accel and gyro + * 0x10 | Sets the PMU mode for the Accelerometer to suspend + * 0x11 | Sets the PMU mode for the Accelerometer to normal + * 0x12 | Sets the PMU mode for the Accelerometer Lowpower + * 0x14 | Sets the PMU mode for the Gyroscope to suspend + * 0x15 | Sets the PMU mode for the Gyroscope to normal + * 0x16 | Reserved + * 0x17 | Sets the PMU mode for the Gyroscope to fast start-up + * 0x18 | Sets the PMU mode for the Magnetometer to suspend + * 0x19 | Sets the PMU mode for the Magnetometer to normal + * 0x1A | Sets the PMU mode for the Magnetometer to Lowpower + * 0xB0 | Clears all data in the FIFO + * 0xB1 | Resets the interrupt engine + * 0xB2 | step_cnt_clr Clears the step counter + * 0xB6 | Triggers a reset + * 0x37 | See extmode_en_last + * 0x9A | See extmode_en_last + * 0xC0 | Enable the extended mode + * 0xC4 | Erase NVM cell + * 0xC8 | Load NVM cell + * 0xF0 | Reset acceleration data path + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_command_register(u8 v_command_reg_u8) +{ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write command register */ + com_rslt = p_bmi160->BMI160_BUS_WRITE_FUNC( + p_bmi160->dev_addr, + BMI160_CMD_COMMANDS__REG, + &v_command_reg_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + return com_rslt; +} + /*! + * @brief This API read target page from the register 0x7F bit 4 and 5 + * + * @param v_target_page_u8: The value of target page + * value | page + * ---------|----------- + * 0 | User data/configure page + * 1 | Chip level trim/test page + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_target_page(u8 *v_target_page_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the page*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_CMD_TARGET_PAGE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_target_page_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_CMD_TARGET_PAGE); + } + return com_rslt; +} + /*! + * @brief This API write target page from the register 0x7F bit 4 and 5 + * + * @param v_target_page_u8: The value of target page + * value | page + * ---------|----------- + * 0 | User data/configure page + * 1 | Chip level trim/test page + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_target_page(u8 v_target_page_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_target_page_u8 <= BMI160_MAX_TARGET_PAGE) { + /* write the page*/ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_CMD_TARGET_PAGE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_CMD_TARGET_PAGE, + v_target_page_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_CMD_TARGET_PAGE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} + /*! + * @brief This API read page enable from the register 0x7F bit 7 + * + * + * + * @param v_page_enable_u8: The value of page enable + * value | page + * ---------|----------- + * 0 | DISABLE + * 1 | ENABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_paging_enable(u8 *v_page_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the page enable */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_CMD_PAGING_EN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_page_enable_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_CMD_PAGING_EN); + } + return com_rslt; +} + /*! + * @brief This API write page enable from the register 0x7F bit 7 + * + * + * + * @param v_page_enable_u8: The value of page enable + * value | page + * ---------|----------- + * 0 | DISABLE + * 1 | ENABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_paging_enable( +u8 v_page_enable_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + if (v_page_enable_u8 <= BMI160_MAX_VALUE_PAGE) { + /* write the page enable */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_CMD_PAGING_EN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_CMD_PAGING_EN, + v_page_enable_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_CMD_PAGING_EN__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } else { + com_rslt = E_BMI160_OUT_OF_RANGE; + } + } + return com_rslt; +} + /*! + * @brief This API read + * pull up configuration from the register 0X85 bit 4 an 5 + * + * + * + * @param v_control_pullup_u8: The value of pull up register + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_pullup_configuration( +u8 *v_control_pullup_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read pull up value */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC( + p_bmi160->dev_addr, + BMI160_COM_C_TRIM_FIVE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + *v_control_pullup_u8 = BMI160_GET_BITSLICE(v_data_u8, + BMI160_COM_C_TRIM_FIVE); + } + return com_rslt; + +} + /*! + * @brief This API write + * pull up configuration from the register 0X85 bit 4 an 5 + * + * + * + * @param v_control_pullup_u8: The value of pull up register + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_pullup_configuration( +u8 v_control_pullup_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* write pull up value */ + com_rslt = p_bmi160->BMI160_BUS_READ_FUNC + (p_bmi160->dev_addr, + BMI160_COM_C_TRIM_FIVE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + if (com_rslt == SUCCESS) { + v_data_u8 = + BMI160_SET_BITSLICE(v_data_u8, + BMI160_COM_C_TRIM_FIVE, + v_control_pullup_u8); + com_rslt += + p_bmi160->BMI160_BUS_WRITE_FUNC + (p_bmi160->dev_addr, + BMI160_COM_C_TRIM_FIVE__REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + } + } + return com_rslt; +} + +/*! + * @brief This function used for read the compensated value of mag + * Before start reading the mag compensated data's + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_compensate_xyz( +struct bmi160_mag_xyz_s32_t *mag_comp_xyz) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + struct bmi160_mag_xyzr_t mag_xyzr; + com_rslt = bmi160_read_mag_xyzr(&mag_xyzr); + if (com_rslt) + return com_rslt; + /* Compensation for X axis */ + mag_comp_xyz->x = bmi160_bmm150_mag_compensate_X( + mag_xyzr.x, mag_xyzr.r); + + /* Compensation for Y axis */ + mag_comp_xyz->y = bmi160_bmm150_mag_compensate_Y( + mag_xyzr.y, mag_xyzr.r); + + /* Compensation for Z axis */ + mag_comp_xyz->z = bmi160_bmm150_mag_compensate_Z( + mag_xyzr.z, mag_xyzr.r); + + return com_rslt; +} + +/*! + * @brief This function used for read the compensated value of mag + * Before start reading the mag compensated data's + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_compensate_xyz_raw( +struct bmi160_mag_xyz_s32_t *mag_comp_xyz, struct bmi160_mag_xyzr_t mag_xyzr) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + + /* Compensation for X axis */ + mag_comp_xyz->x = bmi160_bmm150_mag_compensate_X( + mag_xyzr.x, mag_xyzr.r); + + /* Compensation for Y axis */ + mag_comp_xyz->y = bmi160_bmm150_mag_compensate_Y( + mag_xyzr.y, mag_xyzr.r); + + /* Compensation for Z axis */ + mag_comp_xyz->z = bmi160_bmm150_mag_compensate_Z( + mag_xyzr.z, mag_xyzr.r); + + return com_rslt; +} +/*! + * @brief This API used to get the compensated BMM150-X data + * the out put of X as s32 + * Before start reading the mag compensated X data + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * + * @param v_mag_data_x_s16 : The value of mag raw X data + * @param v_data_r_u16 : The value of mag R data + * + * @return results of compensated X data value output as s32 + * + */ +s32 bmi160_bmm150_mag_compensate_X(s16 v_mag_data_x_s16, u16 v_data_r_u16) +{ +s32 inter_retval = BMI160_INIT_VALUE; +/* no overflow */ +if (v_mag_data_x_s16 != BMI160_MAG_FLIP_OVERFLOW_ADCVAL) { + if ((v_data_r_u16 != 0) + && (mag_trim.dig_xyz1 != 0)) { + inter_retval = ((s32)(((u16) + ((((s32)mag_trim.dig_xyz1) + << BMI160_SHIFT_BIT_POSITION_BY_14_BITS)/ + (v_data_r_u16 != 0 ? + v_data_r_u16 : mag_trim.dig_xyz1))) - + ((u16)0x4000))); + } else { + inter_retval = BMI160_MAG_OVERFLOW_OUTPUT; + return inter_retval; + } + inter_retval = ((s32)((((s32)v_mag_data_x_s16) * + ((((((((s32)mag_trim.dig_xy2) * + ((((s32)inter_retval) * + ((s32)inter_retval)) + >> BMI160_SHIFT_BIT_POSITION_BY_07_BITS)) + + (((s32)inter_retval) * + ((s32)(((s16)mag_trim.dig_xy1) + << BMI160_SHIFT_BIT_POSITION_BY_07_BITS)))) + >> BMI160_SHIFT_BIT_POSITION_BY_09_BITS) + + ((s32)0x100000)) * + ((s32)(((s16)mag_trim.dig_x2) + + ((s16)0xA0)))) + >> BMI160_SHIFT_BIT_POSITION_BY_12_BITS)) + >> BMI160_SHIFT_BIT_POSITION_BY_13_BITS)) + + (((s16)mag_trim.dig_x1) + << BMI160_SHIFT_BIT_POSITION_BY_03_BITS); + /* check the overflow output */ + if (inter_retval == (s32)BMI160_MAG_OVERFLOW_OUTPUT) + inter_retval = BMI160_MAG_OVERFLOW_OUTPUT_S32; +} else { + /* overflow */ + inter_retval = BMI160_MAG_OVERFLOW_OUTPUT; +} +return inter_retval; +} +/*! + * @brief This API used to get the compensated BMM150-Y data + * the out put of Y as s32 + * Before start reading the mag compensated Y data + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * + * @param v_mag_data_y_s16 : The value of mag raw Y data + * @param v_data_r_u16 : The value of mag R data + * + * @return results of compensated Y data value output as s32 + */ +s32 bmi160_bmm150_mag_compensate_Y(s16 v_mag_data_y_s16, u16 v_data_r_u16) +{ +s32 inter_retval = BMI160_INIT_VALUE; +/* no overflow */ +if (v_mag_data_y_s16 != BMI160_MAG_FLIP_OVERFLOW_ADCVAL) { + if ((v_data_r_u16 != 0) + && (mag_trim.dig_xyz1 != 0)) { + inter_retval = ((s32)(((u16)((( + (s32)mag_trim.dig_xyz1) + << BMI160_SHIFT_BIT_POSITION_BY_14_BITS) / + (v_data_r_u16 != 0 ? + v_data_r_u16 : mag_trim.dig_xyz1))) - + ((u16)0x4000))); + } else { + inter_retval = BMI160_MAG_OVERFLOW_OUTPUT; + return inter_retval; + } + inter_retval = ((s32)((((s32)v_mag_data_y_s16) * ((((((((s32) + mag_trim.dig_xy2) * ((((s32) inter_retval) * + ((s32)inter_retval)) >> BMI160_SHIFT_BIT_POSITION_BY_07_BITS)) + + (((s32)inter_retval) * + ((s32)(((s16)mag_trim.dig_xy1) + << BMI160_SHIFT_BIT_POSITION_BY_07_BITS)))) + >> BMI160_SHIFT_BIT_POSITION_BY_09_BITS) + + ((s32)0x100000)) + * ((s32)(((s16)mag_trim.dig_y2) + + ((s16)0xA0)))) + >> BMI160_SHIFT_BIT_POSITION_BY_12_BITS)) + >> BMI160_SHIFT_BIT_POSITION_BY_13_BITS)) + + (((s16)mag_trim.dig_y1) + << BMI160_SHIFT_BIT_POSITION_BY_03_BITS); + /* check the overflow output */ + if (inter_retval == (s32)BMI160_MAG_OVERFLOW_OUTPUT) + inter_retval = BMI160_MAG_OVERFLOW_OUTPUT_S32; +} else { + /* overflow */ + inter_retval = BMI160_MAG_OVERFLOW_OUTPUT; +} +return inter_retval; +} +/*! + * @brief This API used to get the compensated BMM150-Z data + * the out put of Z as s32 + * Before start reading the mag compensated Z data + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * + * @param v_mag_data_z_s16 : The value of mag raw Z data + * @param v_data_r_u16 : The value of mag R data + * + * @return results of compensated Z data value output as s32 + */ +s32 bmi160_bmm150_mag_compensate_Z(s16 v_mag_data_z_s16, u16 v_data_r_u16) +{ + s32 retval = BMI160_INIT_VALUE; + + if (v_mag_data_z_s16 != BMI160_MAG_HALL_OVERFLOW_ADCVAL) { + if ((v_data_r_u16 != 0) + && (mag_trim.dig_z2 != 0) + /* && (mag_trim.dig_z3 != 0)*/ + && (mag_trim.dig_z1 != 0) + && (mag_trim.dig_xyz1 != 0)) { + retval = (((((s32)(v_mag_data_z_s16 - mag_trim.dig_z4)) + << BMI160_SHIFT_BIT_POSITION_BY_15_BITS) - + ((((s32)mag_trim.dig_z3) * + ((s32)(((s16)v_data_r_u16) - + ((s16)mag_trim.dig_xyz1)))) + >> BMI160_SHIFT_BIT_POSITION_BY_02_BITS))/ + (mag_trim.dig_z2 + + ((s16)(((((s32)mag_trim.dig_z1) * + ((((s16)v_data_r_u16) + << BMI160_SHIFT_BIT_POSITION_BY_01_BIT))) + + (1 << BMI160_SHIFT_BIT_POSITION_BY_15_BITS)) + >> BMI160_SHIFT_BIT_POSITION_BY_16_BITS)))); + } + } else { + retval = BMI160_MAG_OVERFLOW_OUTPUT; + } + return retval; +} + /*! + * @brief This function used for initialize the bmm150 sensor + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_interface_init(void) +{ + /* This variable used for provide the communication + results*/ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = BMI160_INIT_VALUE; + u8 v_pull_value_u8 = BMI160_INIT_VALUE; + u8 v_data_u8 = BMI160_INIT_VALUE; + /* accel operation mode to normal*/ + com_rslt = bmi160_set_command_register(ACCEL_MODE_NORMAL); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* write the mag power mode as NORMAL*/ + com_rslt += bmi160_set_mag_interface_normal(); + + /* register 0x7E write the 0x37, 0x9A and 0x30*/ + com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_ONE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_TWO); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_THREE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /*switch the page1*/ + com_rslt += bmi160_set_target_page(BMI160_WRITE_TARGET_PAGE1); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_target_page(&v_data_u8); + com_rslt += bmi160_set_paging_enable(BMI160_WRITE_ENABLE_PAGE1); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_paging_enable(&v_data_u8); + /* enable the pullup configuration from + the register 0x05 bit 4 and 5 as 10*/ + bmi160_get_pullup_configuration(&v_pull_value_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + v_pull_value_u8 = v_pull_value_u8 | BMI160_PULL_UP_DATA; + com_rslt += bmi160_set_pullup_configuration(v_pull_value_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /*switch the page0*/ + com_rslt += bmi160_set_target_page(BMI160_WRITE_TARGET_PAGE0); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_target_page(&v_data_u8); + /* Write the BMM150 i2c address*/ + com_rslt += bmi160_set_i2c_device_addr(BMI160_AUX_BMM150_I2C_ADDRESS); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* enable the mag interface to manual mode*/ + com_rslt += bmi160_set_mag_manual_enable(BMI160_MANUAL_ENABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_mag_manual_enable(&v_data_u8); + /*Enable the MAG interface */ + com_rslt += bmi160_set_if_mode(BMI160_ENABLE_MAG_IF_MODE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_if_mode(&v_data_u8); + /* Mag normal mode*/ + com_rslt += bmi160_bmm150_mag_wakeup(); + printk(KERN_INFO "com_rslt:%d, <%s><%d>\n", + com_rslt, __func__, __LINE__); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* Read the BMM150 device id is 0x32*/ + /*com_rslt += bmi160_set_mag_read_addr(BMI160_BMM150_CHIP_ID);*/ + /*p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY);*/ + /*com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH);*/ + /**v_chip_id_u8 = v_data_u8;*/ + /*p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY);*/ + /* write the power mode register*/ + com_rslt += bmi160_set_mag_write_data(BMI160_BMM_POWER_MODE_REG); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /*write 0x4C register to write set power mode to normal*/ + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_POWE_MODE_REG); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* read the mag trim values*/ + com_rslt += bmi160_read_bmm150_mag_trim(); + printk(KERN_INFO "com_rslt:%d, <%s><%d>\n", + com_rslt, __func__, __LINE__); + /* To avoid the auto mode enable when manual mode operation running*/ + V_bmm150_maual_auto_condition_u8 = BMI160_MANUAL_ENABLE; + /* write the XY and Z repetitions*/ + com_rslt += bmi160_set_bmm150_mag_presetmode( + BMI160_MAG_PRESETMODE_REGULAR); + printk(KERN_INFO "com_rslt:%d, <%s><%d>\n", + com_rslt, __func__, __LINE__); + /* To avoid the auto mode enable when manual mode operation running*/ + V_bmm150_maual_auto_condition_u8 = BMI160_MANUAL_DISABLE; + /* Set the power mode of mag as force mode*/ + /* The data have to write for the register + It write the value in the register 0x4F */ + com_rslt += bmi160_set_mag_write_data(BMI160_BMM150_FORCE_MODE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + printk(KERN_INFO "com_rslt:%d, <%s><%d>\n", + com_rslt, __func__, __LINE__); + /* write into power mode register*/ + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_POWE_MODE_REG); + /* write the mag v_data_bw_u8 as 25Hz*/ + com_rslt += bmi160_set_mag_output_data_rate( + BMI160_MAG_OUTPUT_DATA_RATE_25HZ); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + /* When mag interface is auto mode - The mag read address + starts the register 0x42*/ + com_rslt += bmi160_set_mag_read_addr( + BMI160_BMM150_DATA_REG); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* enable mag interface to auto mode*/ + com_rslt += bmi160_set_mag_manual_enable(BMI160_MANUAL_DISABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_mag_manual_enable(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + return com_rslt; +} + /*! + * @brief This function used for set the mag power control + * bit enable + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_wakeup(void) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = BMI160_INIT_VALUE; + u8 v_try_times_u8 = BMI160_BMM150_MAX_RETRY_WAKEUP; + u8 v_power_control_bit_u8 = BMI160_INIT_VALUE; + u8 i = BMI160_INIT_VALUE; + + for (i = BMI160_INIT_VALUE; i < v_try_times_u8; i++) { + com_rslt = bmi160_set_mag_write_data(BMI160_BMM150_POWER_ON); + p_bmi160->delay_msec(BMI160_BMM150_WAKEUP_DELAY1); + /*write 0x4B register to enable power control bit*/ + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_POWE_CONTROL_REG); + p_bmi160->delay_msec(BMI160_BMM150_WAKEUP_DELAY2); + com_rslt += bmi160_set_mag_read_addr( + BMI160_BMM150_POWE_CONTROL_REG); + /* 0x04 is secondary read mag x lsb register */ + p_bmi160->delay_msec(BMI160_BMM150_WAKEUP_DELAY3); + com_rslt += bmi160_read_reg(BMI160_USER_DATA_0_ADDR, + &v_power_control_bit_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + v_power_control_bit_u8 = BMI160_BMM150_SET_POWER_CONTROL + & v_power_control_bit_u8; + if (v_power_control_bit_u8 == BMI160_BMM150_POWER_ON) + break; + } + com_rslt = (i >= v_try_times_u8) ? + BMI160_BMM150_POWER_ON_FAIL : BMI160_BMM150_POWER_ON_SUCCESS; + return com_rslt; +} + /*! + * @brief This function used for set the magnetometer + * power mode. + * @note + * Before set the mag power mode + * make sure the following two point is addressed + * Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * + * @param v_mag_sec_if_pow_mode_u8 : The value of mag power mode + * value | mode + * ----------|------------ + * 0 | BMI160_MAG_FORCE_MODE + * 1 | BMI160_MAG_SUSPEND_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_bmm150_mag_and_secondary_if_power_mode( +u8 v_mag_sec_if_pow_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = BMI160_INIT_VALUE; + /* set the accel power mode to NORMAL*/ + com_rslt = bmi160_set_command_register(ACCEL_MODE_NORMAL); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + /* set mag interface manual mode*/ + if (p_bmi160->mag_manual_enable != BMI160_MANUAL_ENABLE) { + com_rslt += bmi160_set_mag_manual_enable( + BMI160_MANUAL_ENABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + } + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + + switch (v_mag_sec_if_pow_mode_u8) { + case BMI160_MAG_FORCE_MODE: + /* set the secondary mag power mode as NORMAL*/ + com_rslt += bmi160_set_mag_interface_normal(); + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + /* set the mag power mode as FORCE mode*/ + com_rslt += bmi160_bmm150_mag_set_power_mode(FORCE_MODE); + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + case BMI160_MAG_SUSPEND_MODE: + /* set the mag power mode as SUSPEND mode*/ + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + com_rslt += bmi160_bmm150_mag_set_power_mode(SUSPEND_MODE); + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* set the secondary mag power mode as SUSPEND*/ + com_rslt += bmi160_set_command_register(MAG_MODE_SUSPEND); + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + if (p_bmi160->mag_manual_enable == BMI160_MANUAL_ENABLE) { + /* set mag interface auto mode*/ + com_rslt += bmi160_set_mag_manual_enable( + BMI160_MANUAL_DISABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + } + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + return com_rslt; +} +/*! + * @brief This function used for set the magnetometer + * power mode. + * @note + * Before set the mag power mode + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @param v_mag_pow_mode_u8 : The value of mag power mode + * value | mode + * ----------|------------ + * 0 | FORCE_MODE + * 1 | SUSPEND_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_set_power_mode( +u8 v_mag_pow_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = BMI160_INIT_VALUE; + u8 manual_enable_status = 0; + /* set mag interface manual mode*/ + if (p_bmi160->mag_manual_enable != BMI160_MANUAL_ENABLE) { + com_rslt = bmi160_set_mag_manual_enable( + BMI160_MANUAL_ENABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_get_mag_manual_enable(&manual_enable_status); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + printk(KERN_INFO "1com_rslt:%d, manual:%d, manual_read:%d\n", + com_rslt, p_bmi160->mag_manual_enable, manual_enable_status); + } + printk(KERN_INFO "2com_rslt:%d, manual:%d, manual_read:%d\n", + com_rslt, p_bmi160->mag_manual_enable, manual_enable_status); + + switch (v_mag_pow_mode_u8) { + case FORCE_MODE: + /* Set the power control bit enabled */ + com_rslt = bmi160_bmm150_mag_wakeup(); + /* write the mag power mode as FORCE mode*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_BMM150_FORCE_MODE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_POWE_MODE_REG); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* To avoid the auto mode enable when manual + mode operation running*/ + V_bmm150_maual_auto_condition_u8 = BMI160_MANUAL_ENABLE; + /* set the preset mode */ + com_rslt += bmi160_set_bmm150_mag_presetmode( + BMI160_MAG_PRESETMODE_REGULAR); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* To avoid the auto mode enable when manual + mode operation running*/ + V_bmm150_maual_auto_condition_u8 = BMI160_MANUAL_DISABLE; + /* set the mag read address to data registers*/ + com_rslt += bmi160_set_mag_read_addr( + BMI160_BMM150_DATA_REG); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + case SUSPEND_MODE: + printk(KERN_INFO "3com_rslt:%d, manual:%d, read_manual:%d\n", + com_rslt, p_bmi160->mag_manual_enable, manual_enable_status); + /* Set the power mode of mag as suspend mode*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_BMM150_POWER_OFF); + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_POWE_CONTROL_REG); + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + printk(KERN_INFO "4com_rslt:%d, manual:%d, manual_read:%d\n", + com_rslt, p_bmi160->mag_manual_enable, manual_enable_status); + /* set mag interface auto mode*/ + if (p_bmi160->mag_manual_enable == BMI160_MANUAL_ENABLE) { + com_rslt += bmi160_set_mag_manual_enable( + BMI160_MANUAL_DISABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_get_mag_manual_enable(&manual_enable_status); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + } + printk(KERN_INFO "5com_rslt:%d, manual:%d, manual_read:%d\n", + com_rslt, p_bmi160->mag_manual_enable, manual_enable_status); + return com_rslt; +} +/*! + * @brief This API used to set the pre-set modes of bmm150 + * The pre-set mode setting is depend on data rate and xy and z repetitions + * + * @note + * Before set the mag preset mode + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_mode_u8: The value of pre-set mode selection value + * value | pre_set mode + * ----------|------------ + * 1 | BMI160_MAG_PRESETMODE_LOWPOWER + * 2 | BMI160_MAG_PRESETMODE_REGULAR + * 3 | BMI160_MAG_PRESETMODE_HIGHACCURACY + * 4 | BMI160_MAG_PRESETMODE_ENHANCED + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_bmm150_mag_presetmode(u8 v_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + switch (v_mode_u8) { + case BMI160_MAG_PRESETMODE_LOWPOWER: + /* write the XY and Z repetitions*/ + /* The v_data_u8 have to write for the register + It write the value in the register 0x4F*/ + com_rslt = bmi160_set_mag_write_data( + BMI160_MAG_LOWPOWER_REPXY); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_XY_REP); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* write the Z repetitions*/ + /* The v_data_u8 have to write for the register + It write the value in the register 0x4F*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_MAG_LOWPOWER_REPZ); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_Z_REP); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* set the mag v_data_u8 rate as 10 to the register 0x4C*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_MAG_LOWPOWER_DR); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_POWE_MODE_REG); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + case BMI160_MAG_PRESETMODE_REGULAR: + /* write the XY and Z repetitions*/ + /* The v_data_u8 have to write for the register + It write the value in the register 0x4F*/ + com_rslt = bmi160_set_mag_write_data( + BMI160_MAG_REGULAR_REPXY); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_XY_REP); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* write the Z repetitions*/ + /* The v_data_u8 have to write for the register + It write the value in the register 0x4F*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_MAG_REGULAR_REPZ); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_Z_REP); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* set the mag v_data_u8 rate as 10 to the register 0x4C*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_MAG_REGULAR_DR); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_POWE_MODE_REG); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + case BMI160_MAG_PRESETMODE_HIGHACCURACY: + /* write the XY and Z repetitions*/ + /* The v_data_u8 have to write for the register + It write the value in the register 0x4F*/ + com_rslt = bmi160_set_mag_write_data( + BMI160_MAG_HIGHACCURACY_REPXY); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_XY_REP); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* write the Z repetitions*/ + /* The v_data_u8 have to write for the register + It write the value in the register 0x4F*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_MAG_HIGHACCURACY_REPZ); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_Z_REP); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* set the mag v_data_u8 rate as 20 to the register 0x4C*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_MAG_HIGHACCURACY_DR); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_POWE_MODE_REG); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + case BMI160_MAG_PRESETMODE_ENHANCED: + /* write the XY and Z repetitions*/ + /* The v_data_u8 have to write for the register + It write the value in the register 0x4F*/ + com_rslt = bmi160_set_mag_write_data( + BMI160_MAG_ENHANCED_REPXY); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_XY_REP); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* write the Z repetitions*/ + /* The v_data_u8 have to write for the register + It write the value in the register 0x4F*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_MAG_ENHANCED_REPZ); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_Z_REP); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* set the mag v_data_u8 rate as 10 to the register 0x4C*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_MAG_ENHANCED_DR); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + BMI160_BMM150_POWE_MODE_REG); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + + return com_rslt; +} + /*! + * @brief This function used for read the trim values of magnetometer + * + * @note + * Before reading the mag trimming values + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_bmm150_mag_trim(void) +{ + /* This variable used for provide the communication + results*/ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array holding the bmm150 trim data + */ + u8 v_data_u8[BMI160_MAG_TRIM_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE}; + /* read dig_x1 value */ + com_rslt = bmi160_set_mag_read_addr( + BMI160_MAG_DIG_X1); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_X1], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_x1 = v_data_u8[BMI160_BMM150_DIG_X1]; + /* read dig_y1 value */ + com_rslt += bmi160_set_mag_read_addr( + BMI160_MAG_DIG_Y1); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_Y1], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_y1 = v_data_u8[BMI160_BMM150_DIG_Y1]; + + /* read dig_x2 value */ + com_rslt += bmi160_set_mag_read_addr( + BMI160_MAG_DIG_X2); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_X2], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_x2 = v_data_u8[BMI160_BMM150_DIG_X2]; + /* read dig_y2 value */ + com_rslt += bmi160_set_mag_read_addr( + BMI160_MAG_DIG_Y2); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_Y3], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_y2 = v_data_u8[BMI160_BMM150_DIG_Y3]; + + /* read dig_xy1 value */ + com_rslt += bmi160_set_mag_read_addr( + BMI160_MAG_DIG_XY1); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_XY1], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_xy1 = v_data_u8[BMI160_BMM150_DIG_XY1]; + /* read dig_xy2 value */ + com_rslt += bmi160_set_mag_read_addr( + BMI160_MAG_DIG_XY2); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is v_mag_x_s16 ls register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_XY2], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_xy2 = v_data_u8[BMI160_BMM150_DIG_XY2]; + + /* read dig_z1 lsb value */ + com_rslt += bmi160_set_mag_read_addr( + BMI160_MAG_DIG_Z1_LSB); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_Z1_LSB], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* read dig_z1 msb value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_MAG_DIG_Z1_MSB); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is v_mag_x_s16 msb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_Z1_MSB], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_z1 = + (u16)((((u32)((u8)v_data_u8[BMI160_BMM150_DIG_Z1_MSB])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | + (v_data_u8[BMI160_BMM150_DIG_Z1_LSB])); + + /* read dig_z2 lsb value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_MAG_DIG_Z2_LSB); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_Z2_LSB], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* read dig_z2 msb value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_MAG_DIG_Z2_MSB); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is v_mag_x_s16 msb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_Z2_MSB], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_z2 = + (s16)((((s32)((s8)v_data_u8[BMI160_BMM150_DIG_Z2_MSB])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | + (v_data_u8[BMI160_BMM150_DIG_Z2_LSB])); + + /* read dig_z3 lsb value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_MAG_DIG_Z3_LSB); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_DIG_Z3_LSB], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* read dig_z3 msb value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_MAG_DIG_Z3_MSB); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is v_mag_x_s16 msb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_DIG_Z3_MSB], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_z3 = + (s16)((((s32)((s8)v_data_u8[BMI160_BMM150_DIG_DIG_Z3_MSB])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | + (v_data_u8[BMI160_BMM150_DIG_DIG_Z3_LSB])); + + /* read dig_z4 lsb value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_MAG_DIG_Z4_LSB); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_DIG_Z4_LSB], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* read dig_z4 msb value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_MAG_DIG_Z4_MSB); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is v_mag_x_s16 msb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_DIG_Z4_MSB], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_z4 = + (s16)((((s32)((s8)v_data_u8[BMI160_BMM150_DIG_DIG_Z4_MSB])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | + (v_data_u8[BMI160_BMM150_DIG_DIG_Z4_LSB])); + + /* read dig_xyz1 lsb value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_MAG_DIG_XYZ1_LSB); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_DIG_XYZ1_LSB], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* read dig_xyz1 msb value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_MAG_DIG_XYZ1_MSB); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is v_mag_x_s16 msb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[BMI160_BMM150_DIG_DIG_XYZ1_MSB], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + mag_trim.dig_xyz1 = + (u16)((((u32)((u8)v_data_u8[BMI160_BMM150_DIG_DIG_XYZ1_MSB])) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | + (v_data_u8[BMI160_BMM150_DIG_DIG_XYZ1_LSB])); + + return com_rslt; +} + /*! + * @brief This function used for initialize + * the AKM09911 and AKM09912 sensor + * + * + * @param v_akm_i2c_address_u8: The value of device address + * AKM sensor | Slave address + * --------------|--------------------- + * AKM09911 | AKM09911_I2C_ADDR_1 + * - | and AKM09911_I2C_ADDR_2 + * AKM09912 | AKM09912_I2C_ADDR_1 + * - | AKM09912_I2C_ADDR_2 + * - | AKM09912_I2C_ADDR_3 + * - | AKM09912_I2C_ADDR_4 + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_akm_mag_interface_init( +u8 v_akm_i2c_address_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_pull_value_u8 = BMI160_INIT_VALUE; + u8 v_data_u8 = BMI160_INIT_VALUE; + u8 v_akm_chip_id_u8 = BMI160_INIT_VALUE; + /* accel operation mode to normal*/ + com_rslt = bmi160_set_command_register(ACCEL_MODE_NORMAL); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_command_register(MAG_MODE_NORMAL); + p_bmi160->delay_msec(BMI160_AKM_INIT_DELAY); + bmi160_get_mag_power_mode_stat(&v_data_u8); + /* register 0x7E write the 0x37, 0x9A and 0x30*/ + com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_ONE); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_TWO); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_THREE); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /*switch the page1*/ + com_rslt += bmi160_set_target_page(BMI160_WRITE_TARGET_PAGE1); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_target_page(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_paging_enable(BMI160_WRITE_ENABLE_PAGE1); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_paging_enable(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* enable the pullup configuration from + the register 0x05 bit 4 and 5 to 10*/ + bmi160_get_pullup_configuration(&v_pull_value_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + v_pull_value_u8 = v_pull_value_u8 | BMI160_PULL_UP_DATA; + com_rslt += bmi160_set_pullup_configuration(v_pull_value_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + /*switch the page0*/ + com_rslt += bmi160_set_target_page(BMI160_WRITE_TARGET_PAGE0); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_target_page(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* Write the AKM09911 0r AKM09912 i2c address*/ + com_rslt += bmi160_set_i2c_device_addr(v_akm_i2c_address_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* enable the mag interface to manual mode*/ + com_rslt += bmi160_set_mag_manual_enable(BMI160_MANUAL_ENABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_mag_manual_enable(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /*Enable the MAG interface */ + com_rslt += bmi160_set_if_mode(BMI160_ENABLE_MAG_IF_MODE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_if_mode(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + /* Set the AKM Fuse ROM mode */ + /* Set value for fuse ROM mode*/ + com_rslt += bmi160_set_mag_write_data(AKM_FUSE_ROM_MODE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* AKM mode address is 0x31*/ + com_rslt += bmi160_set_mag_write_addr(AKM_POWER_MODE_REG); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* Read the Fuse ROM v_data_u8 from registers + 0x60,0x61 and 0x62*/ + /* ASAX v_data_u8 */ + com_rslt += bmi160_read_bst_akm_sensitivity_data(); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* read the device id of the AKM sensor + if device id is 0x05 - AKM09911 + if device id is 0x04 - AKM09912*/ + com_rslt += bmi160_set_mag_read_addr(AKM09912_CHIP_ID_REG); + /* 0x04 is mag_x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_akm_chip_id_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + printk(KERN_INFO "bmi160,addr:0x%x, akm_chip_id:0x%x", + v_akm_i2c_address_u8, v_akm_chip_id_u8); + /* Set value power down mode mode*/ + com_rslt += bmi160_set_mag_write_data(AKM_POWER_DOWN_MODE_DATA); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* AKM mode address is 0x31*/ + com_rslt += bmi160_set_mag_write_addr(AKM_POWER_MODE_REG); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* Set AKM Force mode*/ + com_rslt += bmi160_set_mag_write_data( + AKM_SINGLE_MEASUREMENT_MODE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* AKM mode address is 0x31*/ + com_rslt += bmi160_set_mag_write_addr(AKM_POWER_MODE_REG); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* Set the AKM read xyz v_data_u8 address*/ + com_rslt += bmi160_set_mag_read_addr(AKM_DATA_REGISTER); + /* write the mag v_data_bw_u8 as 25Hz*/ + com_rslt += bmi160_set_mag_output_data_rate( + BMI160_MAG_OUTPUT_DATA_RATE_25HZ); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* Enable mag interface to auto mode*/ + com_rslt += bmi160_set_mag_manual_enable(BMI160_MANUAL_DISABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_mag_manual_enable(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + return com_rslt; +} + /*! + * @brief This function used for read the sensitivity data of + * AKM09911 and AKM09912 + * + * @note Before reading the mag sensitivity values + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_bst_akm_sensitivity_data(void) +{ + /* This variable used for provide the communication + results*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array holding the sensitivity ax,ay and az data*/ + u8 v_data_u8[BMI160_AKM_SENSITIVITY_DATA_SIZE] = { + BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* read asax value */ + com_rslt = bmi160_set_mag_read_addr(BMI160_BST_AKM_ASAX); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[AKM_ASAX], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + akm_asa_data.asax = v_data_u8[AKM_ASAX]; + /* read asay value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_BST_AKM_ASAY); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[AKM_ASAY], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + akm_asa_data.asay = v_data_u8[AKM_ASAY]; + /* read asaz value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_BST_AKM_ASAZ); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[AKM_ASAZ], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + akm_asa_data.asaz = v_data_u8[AKM_ASAZ]; + + return com_rslt; +} +/*! + * @brief This API used to get the compensated X data + * of AKM09911 the out put of X as s32 + * @note Before start reading the mag compensated X data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_x_s16 : The value of X data + * + * @return results of compensated X data value output as s32 + * + */ +s32 bmi160_bst_akm09911_compensate_X(s16 v_bst_akm_x_s16) +{ + /*Return value of AKM x compensated v_data_u8*/ + s32 retval = BMI160_INIT_VALUE; + /* Convert raw v_data_u8 into compensated v_data_u8*/ + retval = (v_bst_akm_x_s16 * + ((akm_asa_data.asax/AKM09911_SENSITIVITY_DIV) + + BMI160_GEN_READ_WRITE_DATA_LENGTH)); + return retval; +} +/*! + * @brief This API used to get the compensated Y data + * of AKM09911 the out put of Y as s32 + * @note Before start reading the mag compensated Y data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_y_s16 : The value of Y data + * + * @return results of compensated Y data value output as s32 + * + */ +s32 bmi160_bst_akm09911_compensate_Y(s16 v_bst_akm_y_s16) +{ + /*Return value of AKM y compensated v_data_u8*/ + s32 retval = BMI160_INIT_VALUE; + /* Convert raw v_data_u8 into compensated v_data_u8*/ + retval = (v_bst_akm_y_s16 * + ((akm_asa_data.asay/AKM09911_SENSITIVITY_DIV) + + BMI160_GEN_READ_WRITE_DATA_LENGTH)); + return retval; +} +/*! + * @brief This API used to get the compensated Z data + * of AKM09911 the out put of Z as s32 + * @note Before start reading the mag compensated Z data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_z_s16 : The value of Z data + * + * @return results of compensated Z data value output as s32 + * + */ +s32 bmi160_bst_akm09911_compensate_Z(s16 v_bst_akm_z_s16) +{ + /*Return value of AKM z compensated v_data_u8*/ + s32 retval = BMI160_INIT_VALUE; + /* Convert raw v_data_u8 into compensated v_data_u8*/ + retval = (v_bst_akm_z_s16 * + ((akm_asa_data.asaz/AKM09911_SENSITIVITY_DIV) + + BMI160_GEN_READ_WRITE_DATA_LENGTH)); + return retval; +} +/*! + * @brief This API used to get the compensated X data + * of AKM09912 the out put of X as s32 + * @note Before start reading the mag compensated X data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_x_s16 : The value of X data + * + * @return results of compensated X data value output as s32 + * + */ +s32 bmi160_bst_akm09912_compensate_X(s16 v_bst_akm_x_s16) +{ + /*Return value of AKM x compensated data*/ + s32 retval = BMI160_INIT_VALUE; + /* Convert raw data into compensated data*/ + retval = v_bst_akm_x_s16 * + (akm_asa_data.asax + AKM09912_SENSITIVITY) + / AKM09912_SENSITIVITY_DIV; + return retval; +} +/*! + * @brief This API used to get the compensated Y data + * of AKM09912 the out put of Y as s32 + * @note Before start reading the mag compensated Y data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_y_s16 : The value of Y data + * + * @return results of compensated Y data value output as s32 + * + */ +s32 bmi160_bst_akm09912_compensate_Y(s16 v_bst_akm_y_s16) +{ + /*Return value of AKM y compensated data*/ + s32 retval = BMI160_INIT_VALUE; + /* Convert raw data into compensated data*/ + retval = v_bst_akm_y_s16 * + (akm_asa_data.asax + AKM09912_SENSITIVITY) + / AKM09912_SENSITIVITY_DIV; + return retval; +} +/*! + * @brief This API used to get the compensated Z data + * of AKM09912 the out put of Z as s32 + * @note Before start reading the mag compensated Z data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_z_s16 : The value of Z data + * + * @return results of compensated Z data value output as s32 + * + */ +s32 bmi160_bst_akm09912_compensate_Z(s16 v_bst_akm_z_s16) +{ + /*Return value of AKM z compensated data*/ + s32 retval = BMI160_INIT_VALUE; + /* Convert raw data into compensated data*/ + retval = v_bst_akm_z_s16 * + (akm_asa_data.asax + AKM09912_SENSITIVITY) + / AKM09912_SENSITIVITY_DIV; + return retval; +} + /*! + * @brief This function used for read the compensated value of + * AKM09911 + * @note Before start reading the mag compensated data's + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_akm09911_compensate_xyz( +struct bmi160_mag_xyz_s32_t *bst_akm_xyz) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + struct bmi160_mag_t mag_xyz; + + com_rslt = bmi160_read_mag_xyz(&mag_xyz, BST_AKM); + /* Compensation for X axis */ + bst_akm_xyz->x = bmi160_bst_akm09911_compensate_X(mag_xyz.x); + + /* Compensation for Y axis */ + bst_akm_xyz->y = bmi160_bst_akm09911_compensate_Y(mag_xyz.y); + + /* Compensation for Z axis */ + bst_akm_xyz->z = bmi160_bst_akm09911_compensate_Z(mag_xyz.z); + + return com_rslt; +} + /*! + * @brief This function used for read the compensated value of + * AKM09912 + * @note Before start reading the mag compensated data's + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_akm09912_compensate_xyz( +struct bmi160_mag_xyz_s32_t *bst_akm_xyz) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + struct bmi160_mag_t mag_xyz; + + com_rslt = bmi160_read_mag_xyz(&mag_xyz, BST_AKM); + printk(KERN_INFO "akm09912_raw_x:%d, %d, %d, <%s>,<%d>", + mag_xyz.x, mag_xyz.y, mag_xyz.z, __func__, __LINE__); + /* Compensation for X axis */ + bst_akm_xyz->x = bmi160_bst_akm09912_compensate_X(mag_xyz.x); + + /* Compensation for Y axis */ + bst_akm_xyz->y = bmi160_bst_akm09912_compensate_Y(mag_xyz.y); + + /* Compensation for Z axis */ + bst_akm_xyz->z = bmi160_bst_akm09912_compensate_Z(mag_xyz.z); + return com_rslt; +} + /*! + * @brief This function used for read the compensated value of + * AKM09912 + * @note Before start reading the mag compensated data's + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_akm09912_compensate_xyz_raw( +struct bmi160_mag_xyz_s32_t *bst_akm_xyz) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Compensation for X axis */ + bst_akm_xyz->x = bmi160_bst_akm09912_compensate_X(bst_akm_xyz->x); + + /* Compensation for Y axis */ + bst_akm_xyz->y = bmi160_bst_akm09912_compensate_Y(bst_akm_xyz->y); + + /* Compensation for Z axis */ + bst_akm_xyz->z = bmi160_bst_akm09912_compensate_Z(bst_akm_xyz->z); + + return com_rslt; +} +/*! + * @brief This function used for set the AKM09911 and AKM09912 + * power mode. + * @note Before set the AKM power mode + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @param v_akm_pow_mode_u8 : The value of akm power mode + * value | Description + * ---------|-------------------- + * 0 | AKM_POWER_DOWN_MODE + * 1 | AKM_SINGLE_MEAS_MODE + * 2 | FUSE_ROM_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_akm_set_powermode( +u8 v_akm_pow_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = BMI160_INIT_VALUE; + /* set mag interface manual mode*/ + if (p_bmi160->mag_manual_enable != BMI160_MANUAL_ENABLE) { + com_rslt = bmi160_set_mag_manual_enable( + BMI160_MANUAL_ENABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + } + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__); + switch (v_akm_pow_mode_u8) { + case AKM_POWER_DOWN_MODE: + /* Set the power mode of AKM as power down mode*/ + com_rslt += bmi160_set_mag_write_data(AKM_POWER_DOWN_MODE_DATA); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(AKM_POWER_MODE_REG); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + break; + case AKM_SINGLE_MEAS_MODE: + /* Set the power mode of AKM as + single measurement mode*/ + com_rslt += bmi160_set_mag_write_data + (AKM_SINGLE_MEASUREMENT_MODE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(AKM_POWER_MODE_REG); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_read_addr(AKM_DATA_REGISTER); + break; + case FUSE_ROM_MODE: + /* Set the power mode of AKM as + Fuse ROM mode*/ + com_rslt += bmi160_set_mag_write_data(AKM_FUSE_ROM_MODE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(AKM_POWER_MODE_REG); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* Sensitivity v_data_u8 */ + com_rslt += bmi160_read_bst_akm_sensitivity_data(); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* power down mode*/ + com_rslt += bmi160_set_mag_write_data(AKM_POWER_DOWN_MODE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(AKM_POWER_MODE_REG); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + /* set mag interface auto mode*/ + if (p_bmi160->mag_manual_enable == BMI160_MANUAL_ENABLE) { + com_rslt += bmi160_set_mag_manual_enable( + BMI160_MANUAL_DISABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + } + printk(KERN_INFO "com_rslt:%d, manual:%d, <%s><%d>\n", + com_rslt, p_bmi160->mag_manual_enable, __func__, __LINE__); + return com_rslt; +} + /*! + * @brief This function used for set the magnetometer + * power mode of AKM09911 and AKM09912 + * @note Before set the mag power mode + * make sure the following two point is addressed + * Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * + * @param v_mag_sec_if_pow_mode_u8 : The value of secondary if power mode + * value | Description + * ---------|-------------------- + * 0 | BMI160_MAG_FORCE_MODE + * 1 | BMI160_MAG_SUSPEND_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_bst_akm_and_secondary_if_powermode( +u8 v_mag_sec_if_pow_mode_u8) +{ + /* variable used for return the status of communication result*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* accel operation mode to normal*/ + com_rslt = bmi160_set_command_register(ACCEL_MODE_NORMAL); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* set mag interface manual mode*/ + if (p_bmi160->mag_manual_enable != BMI160_MANUAL_ENABLE) { + com_rslt = bmi160_set_mag_manual_enable( + BMI160_MANUAL_ENABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + } + printk(KERN_ERR "com_rslt:%d, manual:%d,after setacc normal mode\n", + com_rslt, p_bmi160->mag_manual_enable); + switch (v_mag_sec_if_pow_mode_u8) { + case BMI160_MAG_FORCE_MODE: + /* set the secondary mag power mode as NORMAL*/ + com_rslt += bmi160_set_mag_interface_normal(); + /* set the akm power mode as single measurement mode*/ + com_rslt += bmi160_bst_akm_set_powermode(AKM_SINGLE_MEAS_MODE); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_read_addr(AKM_DATA_REGISTER); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + break; + case BMI160_MAG_SUSPEND_MODE: + /* set the akm power mode as power down mode*/ + com_rslt += bmi160_bst_akm_set_powermode(AKM_POWER_DOWN_MODE); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* set the secondary mag power mode as SUSPEND*/ + com_rslt += bmi160_set_command_register(MAG_MODE_SUSPEND); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + break; + default: + com_rslt = E_BMI160_OUT_OF_RANGE; + break; + } + /* set mag interface auto mode*/ + if (p_bmi160->mag_manual_enable == BMI160_MANUAL_ENABLE) + com_rslt += bmi160_set_mag_manual_enable( + BMI160_MANUAL_DISABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + return com_rslt; +} +/*! + * @brief This function used for read the YAMAH-YAS532 init + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas532_mag_interface_init( +void) +{ + /* This variable used for provide the communication + results*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + u8 v_pull_value_u8 = BMI160_INIT_VALUE; + u8 v_data_u8 = BMI160_INIT_VALUE; + u8 i = BMI160_INIT_VALUE; + /* accel operation mode to normal*/ + com_rslt = bmi160_set_command_register(ACCEL_MODE_NORMAL); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* write mag power mode as NORMAL*/ + com_rslt += bmi160_set_mag_interface_normal(); + /* register 0x7E write the 0x37, 0x9A and 0x30*/ + com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_ONE); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_TWO); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_THREE); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /*switch the page1*/ + com_rslt += bmi160_set_target_page(BMI160_WRITE_TARGET_PAGE1); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_target_page(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_paging_enable(BMI160_WRITE_ENABLE_PAGE1); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_paging_enable(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* enable the pullup configuration from + the register 0x05 bit 4 and 5 as 10*/ + bmi160_get_pullup_configuration(&v_pull_value_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + v_pull_value_u8 = v_pull_value_u8 | BMI160_PULL_UP_DATA; + com_rslt += bmi160_set_pullup_configuration(v_pull_value_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /*switch the page0*/ + com_rslt += bmi160_set_target_page(BMI160_WRITE_TARGET_PAGE0); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_target_page(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* Write the YAS532 i2c address*/ + com_rslt += bmi160_set_i2c_device_addr(BMI160_AUX_YAS532_I2C_ADDRESS); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* enable the mag interface to manual mode*/ + com_rslt += bmi160_set_mag_manual_enable(BMI160_MANUAL_ENABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_mag_manual_enable(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /*Enable the MAG interface */ + com_rslt += bmi160_set_if_mode(BMI160_ENABLE_MAG_IF_MODE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_if_mode(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + v_data_u8 = BMI160_MANUAL_DISABLE; + /* Read the YAS532 device id is 0x02*/ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS_DEVICE_ID_REG); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* Read the YAS532 calibration data*/ + com_rslt += bmi160_bst_yamaha_yas532_calib_values(); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* Assign the data acquisition mode*/ + yas532_data.measure_state = YAS532_MAG_STATE_INIT_COIL; + /* Set the default offset as invalid offset*/ + set_vector(yas532_data.v_hard_offset_s8, INVALID_OFFSET); + /* set the transform to zero */ + yas532_data.transform = BMI160_NULL; + /* Assign overflow as zero*/ + yas532_data.overflow = 0; + #if YAS532_MAG_LOG < YAS532_MAG_TEMPERATURE_LOG + yas532_data.temp_data.num = + yas532_data.temp_data.idx = 0; + #endif + /* Assign the coef value*/ + for (i = 0; i < 3; i++) { + yas532_data.coef[i] = yas532_version_ac_coef[i]; + yas532_data.last_raw[i] = 0; + } + yas532_data.last_raw[3] = 0; + /* Set the initial values of yas532*/ + com_rslt += bmi160_bst_yas532_set_initial_values(); + /* write the mag v_data_bw_u8 as 25Hz*/ + com_rslt += bmi160_set_mag_output_data_rate( + BMI160_MAG_OUTPUT_DATA_RATE_25HZ); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* Enable mag interface to auto mode*/ + com_rslt += bmi160_set_mag_manual_enable( + BMI160_MANUAL_DISABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + bmi160_get_mag_manual_enable(&v_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + return com_rslt; +} +/*! + * @brief This function used to set the YAS532 initial values + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_set_initial_values(void) +{ +/* This variable used for provide the communication + results*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* write testr1 as 0x00*/ + com_rslt = bmi160_set_mag_write_data( + BMI160_YAS532_WRITE_TESTR1); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(BMI160_YAS532_TESTR1); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* write testr2 as 0x00*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_YAS532_WRITE_TESTR2); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(BMI160_YAS532_TESTR2); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* write Rcoil as 0x00*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_YAS532_WRITE_RCOIL); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(BMI160_YAS532_RCOIL); + p_bmi160->delay_msec(BMI160_YAS532_SET_INITIAL_VALUE_DELAY); + /* check the valid offset*/ + if (is_valid_offset(yas532_data.v_hard_offset_s8)) { + com_rslt += bmi160_bst_yas532_set_offset( + yas532_data.v_hard_offset_s8); + yas532_data.measure_state = YAS532_MAG_STATE_NORMAL; + } else { + /* set the default offset as invalid offset*/ + set_vector(yas532_data.v_hard_offset_s8, INVALID_OFFSET); + /*Set the default measure state for offset correction*/ + yas532_data.measure_state = YAS532_MAG_STATE_MEASURE_OFFSET; + } + return com_rslt; +} +/*! + * @brief This function used for YAS532 offset correction + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_magnetic_measure_set_offset( +void) +{ + /* This variable used for provide the communication + results*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* used for offset value set to the offset register*/ + s8 v_hard_offset_s8[BMI160_HARD_OFFSET_DATA_SIZE] = { + BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* offset correction factors*/ + static const u8 v_correct_u8[BMI160_YAS_CORRECT_DATA_SIZE] = { + 16, 8, 4, 2, 1}; + /* used for the temperature */ + u16 v_temp_u16 = BMI160_INIT_VALUE; + /* used for the xy1y2 read*/ + u16 v_xy1y2_u16[BMI160_YAS_XY1Y2_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* local flag for assign the values*/ + s32 v_flag_s32[BMI160_YAS_FLAG_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + u8 i, j, v_busy_u8, v_overflow_u8 = BMI160_INIT_VALUE; + + for (i = 0; i < 5; i++) { + /* set the offset values*/ + com_rslt = bmi160_bst_yas532_set_offset(v_hard_offset_s8); + /* read the sensor data*/ + com_rslt += bmi160_bst_yas532_normal_measurement_data( + BMI160_YAS532_ACQ_START, &v_busy_u8, &v_temp_u16, + v_xy1y2_u16, &v_overflow_u8); + /* check the sensor busy status*/ + if (v_busy_u8) + return E_BMI160_BUSY; + /* calculate the magnetic correction with + offset and assign the values + to the offset register */ + for (j = 0; j < 3; j++) { + if (YAS532_DATA_CENTER == v_xy1y2_u16[j]) + v_flag_s32[j] = 0; + if (YAS532_DATA_CENTER < v_xy1y2_u16[j]) + v_flag_s32[j] = 1; + if (v_xy1y2_u16[j] < YAS532_DATA_CENTER) + v_flag_s32[j] = -1; + } + for (j = 0; j < 3; j++) { + if (v_flag_s32[j]) + v_hard_offset_s8[j] = (s8)(v_hard_offset_s8[j] + + v_flag_s32[j] * v_correct_u8[i]); + } + } + /* set the offset */ + com_rslt += bmi160_bst_yas532_set_offset(v_hard_offset_s8); + return com_rslt; +} +/*! + * @brief This function used for read the + * YAMAHA YAS532 calibration data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas532_calib_values(void) +{ + /* This variable used for provide the communication + results*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array holding the YAS532 calibration values */ + u8 v_data_u8[BMI160_YAS532_CALIB_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* Read the DX value */ + com_rslt = bmi160_set_mag_read_addr(BMI160_YAS532_CALIB_CX); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[0], BMI160_GEN_READ_WRITE_DATA_LENGTH); + yas532_data.calib_yas532.cx = (s32)((v_data_u8[0] + * 10) - 1280); + /* Read the DY1 value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB_CY1); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[1], BMI160_GEN_READ_WRITE_DATA_LENGTH); + yas532_data.calib_yas532.cy1 = + (s32)((v_data_u8[1] * 10) - 1280); + /* Read the DY2 value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB_CY2); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[2], BMI160_GEN_READ_WRITE_DATA_LENGTH); + yas532_data.calib_yas532.cy2 = + (s32)((v_data_u8[2] * 10) - 1280); + /* Read the D2 and D3 value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB1); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[3], BMI160_GEN_READ_WRITE_DATA_LENGTH); + yas532_data.calib_yas532.a2 = + (s32)(((v_data_u8[3] >> + BMI160_SHIFT_BIT_POSITION_BY_02_BITS) + & 0x03F) - 32); + /* Read the D3 and D4 value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB2); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[4], BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* calculate a3*/ + yas532_data.calib_yas532.a3 = (s32)((((v_data_u8[3] << + BMI160_SHIFT_BIT_POSITION_BY_02_BITS) & 0x0C) | + ((v_data_u8[4] + >> BMI160_SHIFT_BIT_POSITION_BY_06_BITS) + & 0x03)) - 8); + /* calculate a4*/ + yas532_data.calib_yas532.a4 = (s32)((v_data_u8[4] + & 0x3F) - 32); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* Read the D5 and D6 value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB3); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[5], BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* calculate a5*/ + yas532_data.calib_yas532.a5 = + (s32)(((v_data_u8[5] + >> BMI160_SHIFT_BIT_POSITION_BY_02_BITS) + & 0x3F) + 38); + /* Read the D6 and D7 value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB4); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[6], BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* calculate a6*/ + yas532_data.calib_yas532.a6 = + (s32)((((v_data_u8[5] + << BMI160_SHIFT_BIT_POSITION_BY_04_BITS) + & 0x30) | ((v_data_u8[6] >> + BMI160_SHIFT_BIT_POSITION_BY_04_BITS) + & 0x0F)) - 32); + /* Read the D7 and D8 value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB5); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[7], BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* calculate a7*/ + yas532_data.calib_yas532.a7 = (s32)((((v_data_u8[6] + << BMI160_SHIFT_BIT_POSITION_BY_03_BITS) + & 0x78) | + ((v_data_u8[7] + >> BMI160_SHIFT_BIT_POSITION_BY_05_BITS) & + 0x07)) - 64); + /* Read the D8 and D9 value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CLAIB6); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[8], BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* calculate a8*/ + yas532_data.calib_yas532.a8 = (s32)((((v_data_u8[7] << + BMI160_GEN_READ_WRITE_DATA_LENGTH) & 0x3E) | + ((v_data_u8[8] >> + BMI160_SHIFT_BIT_POSITION_BY_07_BITS) & 0x01)) - + 32); + + /* Read the D8 and D9 value */ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB7); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[9], BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* calculate a9*/ + yas532_data.calib_yas532.a9 = (s32)(((v_data_u8[8] << + BMI160_GEN_READ_WRITE_DATA_LENGTH) & 0xFE) | + ((v_data_u8[9] >> + BMI160_SHIFT_BIT_POSITION_BY_07_BITS) & 0x01)); + /* calculate k*/ + yas532_data.calib_yas532.k = (s32)((v_data_u8[9] >> + BMI160_SHIFT_BIT_POSITION_BY_02_BITS) & 0x1F); + /* Read the value from register 0x9A*/ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB8); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[10], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* Read the value from register 0x9B*/ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIIB9); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[11], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* Read the value from register 0x9C*/ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB10); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[12], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* Read the value from register 0x9D*/ + com_rslt += bmi160_set_mag_read_addr(BMI160_YAS532_CALIB11); + /* 0x04 is secondary read mag x lsb register */ + com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, + &v_data_u8[13], + BMI160_GEN_READ_WRITE_DATA_LENGTH); + /* Calculate the fxy1y2 and rxy1y1*/ + yas532_data.calib_yas532.fxy1y2[0] = + (u8)(((v_data_u8[10] + & 0x01) + << BMI160_SHIFT_BIT_POSITION_BY_01_BIT) + | ((v_data_u8[11] >> + BMI160_SHIFT_BIT_POSITION_BY_07_BITS) & 0x01)); + yas532_data.calib_yas532.rxy1y2[0] = + ((s8)(((v_data_u8[10] + >> BMI160_SHIFT_BIT_POSITION_BY_01_BIT) & 0x3F) + << BMI160_SHIFT_BIT_POSITION_BY_02_BITS)) + >> BMI160_SHIFT_BIT_POSITION_BY_02_BITS; + yas532_data.calib_yas532.fxy1y2[1] = + (u8)(((v_data_u8[11] & 0x01) + << BMI160_SHIFT_BIT_POSITION_BY_01_BIT) + | ((v_data_u8[12] >> + BMI160_SHIFT_BIT_POSITION_BY_07_BITS) & 0x01)); + yas532_data.calib_yas532.rxy1y2[1] = + ((s8)(((v_data_u8[11] + >> BMI160_SHIFT_BIT_POSITION_BY_01_BIT) & 0x3F) + << BMI160_SHIFT_BIT_POSITION_BY_02_BITS)) + >> BMI160_SHIFT_BIT_POSITION_BY_02_BITS; + yas532_data.calib_yas532.fxy1y2[2] = + (u8)(((v_data_u8[12] & 0x01) + << BMI160_SHIFT_BIT_POSITION_BY_01_BIT) + | ((v_data_u8[13] + >> BMI160_SHIFT_BIT_POSITION_BY_07_BITS) & 0x01)); + yas532_data.calib_yas532.rxy1y2[2] = + ((s8)(((v_data_u8[12] + >> BMI160_SHIFT_BIT_POSITION_BY_01_BIT) & 0x3F) + << BMI160_SHIFT_BIT_POSITION_BY_02_BITS)) + >> BMI160_SHIFT_BIT_POSITION_BY_02_BITS; + + return com_rslt; +} +/*! + * @brief This function used for calculate the + * YAS532 read the linear data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_xy1y2_to_linear( +u16 *v_xy1y2_u16, s32 *xy1y2_linear) +{ + /* This variable used for provide the communication + results*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = SUCCESS; + static const u16 v_calib_data[] = { + 3721, 3971, 4221, 4471}; + u8 i = BMI160_INIT_VALUE; + + for (i = 0; i < 3; i++) + xy1y2_linear[i] = v_xy1y2_u16[i] - + v_calib_data[yas532_data.calib_yas532.fxy1y2[i]] + + (yas532_data.v_hard_offset_s8[i] - + yas532_data.calib_yas532.rxy1y2[i]) + * yas532_data.coef[i]; + return com_rslt; +} +/*! + * @brief This function used for read the YAS532 sensor data + * @param v_acquisition_command_u8: used to set the data acquisition + * acquisition_command | operation + * ---------------------|------------------------- + * 0x17 | turn on the acquisition coil + * - | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Deferred acquisition mode + * 0x07 | turn on the acquisition coil + * _ | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Normal acquisition mode + * 0x11 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Deferred acquisition mode + * 0x01 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Normal acquisition mode + * + * @param v_busy_u8 : used to get the busy flay for sensor data read + * @param v_temp_u16 : used to get the temperature data + * @param v_xy1y2_u16 : used to get the sensor xy1y2 data + * @param v_overflow_u8 : used to get the overflow data + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_normal_measurement_data( +u8 v_acquisition_command_u8, u8 *v_busy_u8, +u16 *v_temp_u16, u16 *v_xy1y2_u16, u8 *v_overflow_u8) +{ + /* This variable used for provide the communication + results*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = BMI160_INIT_VALUE; + /* Array holding the YAS532 xyy1 data*/ + u8 v_data_u8[BMI160_YAS_XY1Y2T_DATA_SIZE] = { + BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + u8 i = BMI160_INIT_VALUE; + /* check the p_bmi160 structure as NULL*/ + if (p_bmi160 == BMI160_NULL) { + return E_BMI160_NULL_PTR; + } else { + /* read the sensor data */ + com_rslt = bmi160_bst_yas532_acquisition_command_register( + v_acquisition_command_u8); + com_rslt += + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_MAG_X_LSB__REG, + v_data_u8, BMI160_MAG_YAS_DATA_LENGTH); + /* read the xyy1 data*/ + *v_busy_u8 = + ((v_data_u8[0] + >> BMI160_SHIFT_BIT_POSITION_BY_07_BITS) & 0x01); + *v_temp_u16 = + (u16)((((s32)v_data_u8[0] + << BMI160_SHIFT_BIT_POSITION_BY_03_BITS) + & 0x3F8) | ((v_data_u8[1] + >> BMI160_SHIFT_BIT_POSITION_BY_05_BITS) & 0x07)); + v_xy1y2_u16[0] = + (u16)((((s32)v_data_u8[2] + << BMI160_SHIFT_BIT_POSITION_BY_06_BITS) & 0x1FC0) + | ((v_data_u8[3] >> + BMI160_SHIFT_BIT_POSITION_BY_02_BITS) & 0x3F)); + v_xy1y2_u16[1] = + (u16)((((s32)v_data_u8[4] + << BMI160_SHIFT_BIT_POSITION_BY_06_BITS) + & 0x1FC0) + | ((v_data_u8[5] + >> BMI160_SHIFT_BIT_POSITION_BY_02_BITS) & 0x3F)); + v_xy1y2_u16[2] = + (u16)((((s32)v_data_u8[6] + << BMI160_SHIFT_BIT_POSITION_BY_06_BITS) + & 0x1FC0) + | ((v_data_u8[7] + >> BMI160_SHIFT_BIT_POSITION_BY_02_BITS) & 0x3F)); + *v_overflow_u8 = 0; + for (i = 0; i < 3; i++) { + if (v_xy1y2_u16[i] == YAS532_DATA_OVERFLOW) + *v_overflow_u8 |= (1 << (i * 2)); + if (v_xy1y2_u16[i] == YAS532_DATA_UNDERFLOW) + *v_overflow_u8 |= (1 << (i * 2 + 1)); + } + } + return com_rslt; +} +/*! + * @brief This function used for YAS532 sensor data + * @param v_acquisition_command_u8 : the value of CMDR + * acquisition_command | operation + * ---------------------|------------------------- + * 0x17 | turn on the acquisition coil + * - | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Deferred acquisition mode + * 0x07 | turn on the acquisition coil + * _ | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Normal acquisition mode + * 0x11 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Deferred acquisition mode + * 0x01 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Normal acquisition mode + * + * @param xyz_data : the vector xyz output + * @param v_overflow_s8 : the value of overflow + * @param v_temp_correction_u8 : the value of temperate correction enable + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_measurement_xyz_data( +struct yas532_vector *xyz_data, u8 *v_overflow_s8, u8 v_temp_correction_u8, +u8 v_acquisition_command_u8) +{ + /* This variable used for provide the communication + results*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = BMI160_INIT_VALUE; + /* Array holding the linear calculation output*/ + s32 v_xy1y2_linear_s32[BMI160_YAS_XY1Y2_DATA_SIZE] = { + BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* Array holding the temperature data */ + s32 v_xyz_tmp_s32[BMI160_YAS_TEMP_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + s32 tmp = BMI160_INIT_VALUE; + s32 sx, sy1, sy2, sy, sz = BMI160_INIT_VALUE; + u8 i, v_busy_u8 = BMI160_INIT_VALUE; + u16 v_temp_u16 = BMI160_INIT_VALUE; + /* Array holding the xyy1 sensor raw data*/ + u16 v_xy1y2_u16[BMI160_YAS_XY1Y2_DATA_SIZE] = {BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + #if YAS532_MAG_LOG < YAS532_MAG_TEMPERATURE_LOG + s32 sum = BMI160_INIT_VALUE; + #endif + *v_overflow_s8 = BMI160_INIT_VALUE; + switch (yas532_data.measure_state) { + case YAS532_MAG_STATE_INIT_COIL: + if (p_bmi160->mag_manual_enable != BMI160_MANUAL_ENABLE) + com_rslt = bmi160_set_mag_manual_enable( + BMI160_MANUAL_ENABLE); + /* write Rcoil*/ + com_rslt += bmi160_set_mag_write_data( + BMI160_YAS_DISABLE_RCOIL); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(BMI160_YAS532_RCOIL); + p_bmi160->delay_msec(BMI160_YAS532_MEASUREMENT_DELAY); + if (!yas532_data.overflow && is_valid_offset( + yas532_data.v_hard_offset_s8)) + yas532_data.measure_state = 0; + break; + case YAS532_MAG_STATE_MEASURE_OFFSET: + com_rslt = bmi160_bst_yas532_magnetic_measure_set_offset(); + yas532_data.measure_state = 0; + break; + default: + break; + } + /* Read sensor data*/ + com_rslt += bmi160_bst_yas532_normal_measurement_data( + v_acquisition_command_u8, &v_busy_u8, &v_temp_u16, + v_xy1y2_u16, v_overflow_s8); + /* Calculate the linear data*/ + com_rslt += bmi160_bst_yas532_xy1y2_to_linear(v_xy1y2_u16, + v_xy1y2_linear_s32); + /* Calculate temperature correction */ + #if YAS532_MAG_LOG < YAS532_MAG_TEMPERATURE_LOG + yas532_data.temp_data.log[yas532_data.temp_data.idx++] = + v_temp_u16; + if (YAS532_MAG_TEMPERATURE_LOG <= yas532_data.temp_data.idx) + yas532_data.temp_data.idx = 0; + yas532_data.temp_data.num++; + if (YAS532_MAG_TEMPERATURE_LOG <= yas532_data.temp_data.num) + yas532_data.temp_data.num = YAS532_MAG_TEMPERATURE_LOG; + for (i = 0; i < yas532_data.temp_data.num; i++) + sum += yas532_data.temp_data.log[i]; + tmp = sum * 10 / yas532_data.temp_data.num + - YAS532_TEMP20DEGREE_TYPICAL * 10; + #else + tmp = (v_temp_u16 - YAS532_TEMP20DEGREE_TYPICAL) + * 10; + #endif + sx = v_xy1y2_linear_s32[0]; + sy1 = v_xy1y2_linear_s32[1]; + sy2 = v_xy1y2_linear_s32[2]; + /* Temperature correction */ + if (v_temp_correction_u8) { + sx -= (yas532_data.calib_yas532.cx * tmp) + / 1000; + sy1 -= (yas532_data.calib_yas532.cy1 * tmp) + / 1000; + sy2 -= (yas532_data.calib_yas532.cy2 * tmp) + / 1000; + } + sy = sy1 - sy2; + sz = -sy1 - sy2; + + xyz_data->yas532_vector_xyz[0] = yas532_data.calib_yas532.k * + ((100 * sx + yas532_data.calib_yas532.a2 * sy + + yas532_data.calib_yas532.a3 * sz) / 10); + xyz_data->yas532_vector_xyz[1] = yas532_data.calib_yas532.k * + ((yas532_data.calib_yas532.a4 * sx + yas532_data.calib_yas532.a5 * sy + + yas532_data.calib_yas532.a6 * sz) / 10); + xyz_data->yas532_vector_xyz[2] = yas532_data.calib_yas532.k * + ((yas532_data.calib_yas532.a7 * sx + yas532_data.calib_yas532.a8 * sy + + yas532_data.calib_yas532.a9 * sz) / 10); + if (yas532_data.transform != BMI160_NULL) { + for (i = 0; i < 3; i++) { + v_xyz_tmp_s32[i] = yas532_data.transform[i + * 3] * + xyz_data->yas532_vector_xyz[0] + + yas532_data.transform[i * 3 + 1] * + xyz_data->yas532_vector_xyz[1] + + yas532_data.transform[i * 3 + 2] * + xyz_data->yas532_vector_xyz[2]; + } + set_vector(xyz_data->yas532_vector_xyz, v_xyz_tmp_s32); + } + for (i = 0; i < 3; i++) { + xyz_data->yas532_vector_xyz[i] -= + xyz_data->yas532_vector_xyz[i] % 10; + if (*v_overflow_s8 & (1 + << (i * 2))) + xyz_data->yas532_vector_xyz[i] += + 1; /* set overflow */ + if (*v_overflow_s8 & (1 << + (i * 2 + 1))) + xyz_data->yas532_vector_xyz[i] += 2; /* set underflow */ + } + + +if (v_busy_u8) + return com_rslt; + if (0 < *v_overflow_s8) { + if (!yas532_data.overflow) + yas532_data.overflow = 1; + yas532_data.measure_state = YAS532_MAG_STATE_INIT_COIL; + } else + yas532_data.overflow = 0; + for (i = 0; i < 3; i++) + yas532_data.last_raw[i] = v_xy1y2_u16[i]; + yas532_data.last_raw[i] = v_temp_u16; + return com_rslt; +} +/*! + * @brief This function used for YAS532 write data acquisition + * command register write + * @param v_command_reg_data_u8 : the value of data acquisition + * acquisition_command | operation + * ---------------------|------------------------- + * 0x17 | turn on the acquisition coil + * - | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Deferred acquisition mode + * 0x07 | turn on the acquisition coil + * _ | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Normal acquisition mode + * 0x11 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Deferred acquisition mode + * 0x01 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Normal acquisition mode + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_acquisition_command_register( +u8 v_command_reg_data_u8) +{ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + + if (p_bmi160->mag_manual_enable != BMI160_MANUAL_ENABLE) + com_rslt = bmi160_set_mag_manual_enable( + BMI160_MANUAL_ENABLE); + + com_rslt = bmi160_set_mag_write_data(v_command_reg_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* YAMAHA YAS532-0x82*/ + com_rslt += bmi160_set_mag_write_addr( + BMI160_YAS532_COMMAND_REGISTER); + p_bmi160->delay_msec(BMI160_YAS_ACQ_COMMAND_DELAY); + com_rslt += bmi160_set_mag_read_addr( + BMI160_YAS532_DATA_REGISTER); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + if (p_bmi160->mag_manual_enable == BMI160_MANUAL_ENABLE) + com_rslt += bmi160_set_mag_manual_enable(BMI160_MANUAL_DISABLE); + + return com_rslt; + +} +/*! + * @brief This function used write offset of YAS532 + * + * @param p_offset_s8 : The value of offset to write + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_set_offset( +const s8 *p_offset_s8) +{ + /* This variable used for provide the communication + results*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + + if (p_bmi160->mag_manual_enable != BMI160_MANUAL_ENABLE) + com_rslt = bmi160_set_mag_manual_enable(BMI160_MANUAL_ENABLE); + p_bmi160->delay_msec(BMI160_YAS532_OFFSET_DELAY); + + /* Write offset X data*/ + com_rslt = bmi160_set_mag_write_data(p_offset_s8[0]); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* YAS532 offset x write*/ + com_rslt += bmi160_set_mag_write_addr(BMI160_YAS532_OFFSET_X); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + /* Write offset Y data*/ + com_rslt = bmi160_set_mag_write_data(p_offset_s8[1]); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* YAS532 offset y write*/ + com_rslt += bmi160_set_mag_write_addr(BMI160_YAS532_OFFSET_Y); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + /* Write offset Z data*/ + com_rslt = bmi160_set_mag_write_data(p_offset_s8[2]); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* YAS532 offset z write*/ + com_rslt += bmi160_set_mag_write_addr(BMI160_YAS532_OFFSET_Z); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + set_vector(yas532_data.v_hard_offset_s8, p_offset_s8); + + if (p_bmi160->mag_manual_enable == BMI160_MANUAL_ENABLE) + com_rslt = bmi160_set_mag_manual_enable(BMI160_MANUAL_DISABLE); + return com_rslt; +} +/*! + * @brief This function used to init the YAMAH-YAS537 + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_mag_interface_init( +void) +{ +/* This variable used for provide the communication +results*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +u8 v_pull_value_u8 = BMI160_INIT_VALUE; +u8 v_data_u8 = BMI160_INIT_VALUE; +u8 i = BMI160_INIT_VALUE; +/* accel operation mode to normal*/ +com_rslt = bmi160_set_command_register(ACCEL_MODE_NORMAL); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* write mag power mode as NORMAL*/ +com_rslt += bmi160_set_mag_interface_normal(); +/* register 0x7E write the 0x37, 0x9A and 0x30*/ +com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_ONE); +p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_TWO); +p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +com_rslt += bmi160_set_command_register(BMI160_COMMAND_REG_THREE); +p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +/*switch the page1*/ +com_rslt += bmi160_set_target_page(BMI160_WRITE_TARGET_PAGE1); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +bmi160_get_target_page(&v_data_u8); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +com_rslt += bmi160_set_paging_enable(BMI160_WRITE_ENABLE_PAGE1); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +bmi160_get_paging_enable(&v_data_u8); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* enable the pullup configuration from +the register 0x05 bit 4 and 5 as 10*/ +bmi160_get_pullup_configuration(&v_pull_value_u8); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +v_pull_value_u8 = v_pull_value_u8 | BMI160_PULL_UP_DATA; +com_rslt += bmi160_set_pullup_configuration(v_pull_value_u8); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/*switch the page0*/ +com_rslt += bmi160_set_target_page(BMI160_WRITE_TARGET_PAGE0); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +bmi160_get_target_page(&v_data_u8); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* Write the YAS532 i2c address*/ +com_rslt += bmi160_set_i2c_device_addr(BMI160_YAS537_I2C_ADDRESS); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* enable the mag interface to manual mode*/ +com_rslt += bmi160_set_mag_manual_enable(BMI160_MANUAL_ENABLE); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +bmi160_get_mag_manual_enable(&v_data_u8); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/*Enable the MAG interface */ +com_rslt += bmi160_set_if_mode(BMI160_ENABLE_MAG_IF_MODE); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +bmi160_get_if_mode(&v_data_u8); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +v_data_u8 = BMI160_MANUAL_DISABLE; +/* Read the YAS537 device id*/ +com_rslt += bmi160_set_mag_read_addr(BMI160_YAS_DEVICE_ID_REG); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&v_data_u8, BMI160_GEN_READ_WRITE_DATA_LENGTH); +yas537_data.dev_id = v_data_u8; +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* Read the YAS532 calibration data*/ +com_rslt += +bmi160_bst_yamaha_yas537_calib_values( +BMI160_GEN_READ_WRITE_DATA_LENGTH); +p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +/* set the mode to NORMAL*/ +yas537_data.measure_state = YAS537_MAG_STATE_NORMAL; +/* set the transform to zero */ +yas537_data.transform = BMI160_NULL; +yas537_data.average = 32; +for (i = 0; i < 3; i++) { + yas537_data.hard_offset[i] = -128; + yas537_data.last_after_rcoil[i] = 0; +} +for (i = 0; i < 4; i++) + yas537_data.last_raw[i] = 0; +/* write the mag bandwidth as 25Hz*/ +com_rslt += bmi160_set_mag_output_data_rate( +BMI160_MAG_OUTPUT_DATA_RATE_25HZ); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* Enable mag interface to auto mode*/ +com_rslt += bmi160_set_mag_manual_enable( +BMI160_MANUAL_DISABLE); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +bmi160_get_mag_manual_enable(&v_data_u8); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +return com_rslt; +} +/*! +* @brief This function used for read the +* YAMAHA YAS537 calibration data +* +* +* @param v_rcoil_u8 : The value of r coil +* +* +* @return results of bus communication function +* @retval 0 -> Success +* @retval -1 -> Error +* +* +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_calib_values( +u8 v_rcoil_u8) +{ +/* This variable used for provide the communication +results*/ +BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; +/* Array holding the YAS532 calibration values */ +u8 a_data_u8[BMI160_YAS537_CALIB_DATA_SIZE] = { +BMI160_INIT_VALUE, BMI160_INIT_VALUE, +BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, +BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, +BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, +BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, +BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, +}; +static const u8 v_avrr_u8[] = {0x50, 0x60, 0x70}; +u8 v_cal_valid_u8 = BMI160_INIT_VALUE, i; +/* write soft reset as 0x02*/ +com_rslt = bmi160_set_mag_write_data( +YAS537_SRSTR_DATA); +p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +com_rslt += bmi160_set_mag_write_addr(YAS537_REG_SRSTR); +p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +/* Read the DX value */ +com_rslt = bmi160_set_mag_read_addr(YAS537_REG_CALR_C0); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[0], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the DY1 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_C1); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[1], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the DY2 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_C2); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[2], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the D2 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_C3); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[3], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the D3 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_C4); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[4], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the D4 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_C5); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[5], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the D5 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_C6); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[6], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the D6 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_C7); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[7], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the D7 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_C8); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[8], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the D8 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_C9); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[9], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the D9 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_CA); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[10], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the RX value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_CB); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[11], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the RY1 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_CC); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[12], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the RY2 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_CD); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[13], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the RY2 value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_CE); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[14], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the CHF value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_CF); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[15], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* Read the VER value */ +com_rslt += bmi160_set_mag_read_addr(YAS537_REG_CALR_DO); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +/* 0x04 is secondary read mag x lsb register */ +com_rslt += bmi160_read_reg(BMI160_MAG_DATA_READ_REG, +&a_data_u8[16], BMI160_GEN_READ_WRITE_DATA_LENGTH); +/* get the calib ver*/ +yas537_data.calib_yas537.ver = +(a_data_u8[16] >> BMI160_SHIFT_BIT_POSITION_BY_06_BITS); +for (i = 0; i < 17; i++) { + if (((i < 16 && a_data_u8[i]) != 0)) + v_cal_valid_u8 = 1; + if ((i < 16 && + (a_data_u8[i] & 0x3F)) != 0) + v_cal_valid_u8 = 1; +} +if (!v_cal_valid_u8) + return ERROR; +if (yas537_data.calib_yas537.ver == 0) { + for (i = 0; i < 17; i++) { + if (i < 12) { + /* write offset*/ + com_rslt += bmi160_set_mag_write_data( + a_data_u8[i]); + p_bmi160->delay_msec( + BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + YAS537_REG_MTCR + i); + p_bmi160->delay_msec( + BMI160_GEN_READ_WRITE_DELAY); + } else if (i < 15) { + /* write offset correction*/ + com_rslt += bmi160_set_mag_write_data( + a_data_u8[i]); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(( + (YAS537_REG_OXR + i) - 12)); + p_bmi160->delay_msec( + BMI160_GEN_READ_WRITE_DELAY); + yas537_data.hard_offset[i - 12] + = a_data_u8[i]; + } else { + /* write offset correction*/ + com_rslt += bmi160_set_mag_write_data( + a_data_u8[i]); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(( + (YAS537_REG_OXR + i) - 11)); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + } + +} +} else if (yas537_data.calib_yas537.ver == 1) { + for (i = 0; i < 3; i++) { + /* write offset*/ + com_rslt += bmi160_set_mag_write_data( + a_data_u8[i]); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + YAS537_REG_MTCR + i); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + if (com_rslt == SUCCESS) { + /* write offset*/ + com_rslt += bmi160_set_mag_write_data( + a_data_u8[i + 12]); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + YAS537_REG_OXR + i); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + yas537_data.hard_offset[i] = + a_data_u8[i + 12]; + } else { + com_rslt = ERROR; + } + } + /* write offset*/ + com_rslt += bmi160_set_mag_write_data( + ((a_data_u8[i] & 0xE0) | 0x10)); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr( + YAS537_REG_MTCR + i); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* write offset*/ + com_rslt += bmi160_set_mag_write_data( + ((a_data_u8[15] + >> BMI160_SHIFT_BIT_POSITION_BY_03_BITS) + & 0x1E)); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(YAS537_REG_HCKR); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* write offset*/ + com_rslt += bmi160_set_mag_write_data( + ((a_data_u8[15] << 1) & 0x1E)); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(YAS537_REG_LCKR); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* write offset*/ + com_rslt += bmi160_set_mag_write_data( + (a_data_u8[16] & 0x3F)); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(YAS537_REG_OCR); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + + /* Assign the calibration values*/ + /* a2 */ + yas537_data.calib_yas537.a2 = + ((((a_data_u8[3] + << BMI160_SHIFT_BIT_POSITION_BY_02_BITS) + & 0x7C) + | (a_data_u8[4] + >> BMI160_SHIFT_BIT_POSITION_BY_06_BITS)) - 64); + /* a3 */ + yas537_data.calib_yas537.a3 = + ((((a_data_u8[4] << BMI160_SHIFT_BIT_POSITION_BY_01_BIT) + & 0x7E) + | (a_data_u8[5] + >> BMI160_SHIFT_BIT_POSITION_BY_07_BITS)) - 64); + /* a4 */ + yas537_data.calib_yas537.a4 = + ((((a_data_u8[5] + << BMI160_SHIFT_BIT_POSITION_BY_01_BIT) + & 0xFE) + | (a_data_u8[6] + >> BMI160_SHIFT_BIT_POSITION_BY_07_BITS)) + - 128); + /* a5 */ + yas537_data.calib_yas537.a5 = + ((((a_data_u8[6] + << BMI160_SHIFT_BIT_POSITION_BY_02_BITS) + & 0x1FC) + | (a_data_u8[7] + >> BMI160_SHIFT_BIT_POSITION_BY_06_BITS)) + - 112); + /* a6 */ + yas537_data.calib_yas537.a6 = + ((((a_data_u8[7] + << BMI160_SHIFT_BIT_POSITION_BY_01_BIT) + & 0x7E) + | (a_data_u8[8] + >> BMI160_SHIFT_BIT_POSITION_BY_07_BITS)) - 64); + /* a7 */ + yas537_data.calib_yas537.a7 = + ((((a_data_u8[8] + << BMI160_SHIFT_BIT_POSITION_BY_01_BIT) + & 0xFE) + | (a_data_u8[9] + >> BMI160_SHIFT_BIT_POSITION_BY_07_BITS)) + - 128); + /* a8 */ + yas537_data.calib_yas537.a8 = ((a_data_u8[9] & + 0x7F) - 64); + /* a9 */ + yas537_data.calib_yas537.a9 = ((((a_data_u8[10] + << BMI160_SHIFT_BIT_POSITION_BY_01_BIT) & 0x1FE) + | (a_data_u8[11] + >> BMI160_SHIFT_BIT_POSITION_BY_07_BITS)) + - 112); + /* k */ + yas537_data.calib_yas537.k = ( + a_data_u8[11] & 0x7F); + } else { + return ERROR; + } +/* write A/D converter*/ +com_rslt += bmi160_set_mag_write_data( +YAS537_WRITE_A_D_CONVERTER); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +com_rslt += bmi160_set_mag_write_addr(YAS537_REG_ADCCALR); +p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +/* write A/D converter second register*/ +com_rslt += bmi160_set_mag_write_data( +YAS537_WRITE_A_D_CONVERTER2); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +com_rslt += bmi160_set_mag_write_addr(YAS537_REG_ADCCALR_ONE); +p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +/* write temperature calibration register*/ +com_rslt += bmi160_set_mag_write_data(YAS537_WRITE_TEMP_CALIB); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +com_rslt += bmi160_set_mag_write_addr(YAS537_REG_TRMR); +p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +/* write average filter register*/ +com_rslt += bmi160_set_mag_write_data( +v_avrr_u8[yas537_data.average]); +p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); +com_rslt += bmi160_set_mag_write_addr(YAS537_REG_AVRR); +p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +if (v_rcoil_u8) { + /* write average; filter register*/ + com_rslt += bmi160_set_mag_write_data( + YAS537_WRITE_FILTER); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(YAS537_REG_CONFR); + p_bmi160->delay_msec( + BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); +} + +return com_rslt; + +} +/*! + * @brief This function used for YAS537 write data acquisition + * command register write + * @param v_command_reg_data_u8 : the value of data acquisition + * acquisition_command | operation + * ---------------------|------------------------- + * 0x17 | turn on the acquisition coil + * - | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Deferred acquisition mode + * 0x07 | turn on the acquisition coil + * _ | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Normal acquisition mode + * 0x11 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Deferred acquisition mode + * 0x01 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Normal acquisition mode + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas537_acquisition_command_register( +u8 v_command_reg_data_u8) +{ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + + if (p_bmi160->mag_manual_enable != BMI160_MANUAL_ENABLE) + com_rslt = bmi160_set_mag_manual_enable( + BMI160_MANUAL_ENABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + com_rslt = bmi160_set_mag_write_data(v_command_reg_data_u8); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + /* YAMAHA YAS532-0x82*/ + com_rslt += bmi160_set_mag_write_addr( + BMI160_REG_YAS537_CMDR); + /* set the mode to RECORD*/ + yas537_data.measure_state = YAS537_MAG_STATE_RECORD_DATA; + p_bmi160->delay_msec(BMI160_YAS_ACQ_COMMAND_DELAY); + com_rslt += bmi160_set_mag_read_addr( + YAS537_REG_TEMPERATURE_0); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + if (p_bmi160->mag_manual_enable == BMI160_MANUAL_ENABLE) + com_rslt += bmi160_set_mag_manual_enable( + BMI160_MANUAL_DISABLE); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + + return com_rslt; + +} +/*! + * @brief This function used for read the + * YAMAHA YAS537 xy1y2 data + * + * @param xy1y2: The value of raw xy1y2 data + * @param xyz: The value of xyz data + * + * + * @return None + * + * + */ +static void xy1y2_to_xyz(u16 *xy1y2, s32 *xyz) +{ + xyz[0] = ((xy1y2[0] - 8192) + * 300); + xyz[1] = (((xy1y2[1] - xy1y2[2]) + * 1732) / 10); + xyz[2] = (((-xy1y2[2] - xy1y2[2]) + + 16384) * 300); +} +/*! + * @brief This function used for read the + * YAMAHA YAS537 xy1y2 data + * + * @param v_coil_stat_u8: The value of R coil status + * @param v_busy_u8: The value of busy status + * @param v_temperature_u16: The value of temperature + * @param xy1y2: The value of raw xy1y2 data + * @param v_ouflow_u8: The value of overflow + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_read_xy1y2_data( +u8 *v_coil_stat_u8, u8 *v_busy_u8, +u16 *v_temperature_u16, u16 *xy1y2, u8 *v_ouflow_u8) +{ + /* This variable used for provide the communication + results*/ + BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES; + /* Array holding the YAS532 calibration values */ + u8 a_data_u8[BMI160_YAS_XY1Y2T_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE, + }; + u8 i = BMI160_INIT_VALUE; + s32 a_h_s32[BMI160_YAS_H_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + s32 a_s_s32[BMI160_YAS_S_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + /* set command register*/ + com_rslt = bmi160_bst_yas537_acquisition_command_register( + YAS537_SET_COMMAND_REGISTER); + /* read the yas537 sensor data of xy1y2*/ + com_rslt += + p_bmi160->BMI160_BUS_READ_FUNC(p_bmi160->dev_addr, + BMI160_USER_DATA_MAG_X_LSB__REG, + a_data_u8, BMI160_MAG_YAS_DATA_LENGTH); + /* read the busy flag*/ + *v_busy_u8 = a_data_u8[2] + >> BMI160_SHIFT_BIT_POSITION_BY_07_BITS; + /* read the coil status*/ + *v_coil_stat_u8 = + ((a_data_u8[2] >> + BMI160_SHIFT_BIT_POSITION_BY_06_BITS) & 0X01); + /* read temperature data*/ + *v_temperature_u16 = (u16)((a_data_u8[0] + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) | a_data_u8[1]); + /* read x data*/ + xy1y2[0] = (u16)(((a_data_u8[2] & + 0x3F) + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | (a_data_u8[3])); + /* read y1 data*/ + xy1y2[1] = (u16)((a_data_u8[4] + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | a_data_u8[5]); + /* read y2 data*/ + xy1y2[2] = (u16)((a_data_u8[6] + << BMI160_SHIFT_BIT_POSITION_BY_08_BITS) + | a_data_u8[7]); + for (i = 0; i < 3; i++) + yas537_data.last_raw[i] = xy1y2[i]; + yas537_data.last_raw[i] = *v_temperature_u16; + if (yas537_data.calib_yas537.ver == 1) { + for (i = 0; i < 3; i++) + a_s_s32[i] = xy1y2[i] - 8192; + /* read hx*/ + a_h_s32[0] = ((yas537_data.calib_yas537.k * ( + (128 * a_s_s32[0]) + + (yas537_data.calib_yas537.a2 * a_s_s32[1]) + + (yas537_data.calib_yas537.a3 * a_s_s32[2]))) + / (8192)); + /* read hy1*/ + a_h_s32[1] = ((yas537_data.calib_yas537.k * ( + (yas537_data.calib_yas537.a4 * a_s_s32[0]) + + (yas537_data.calib_yas537.a5 * a_s_s32[1]) + + (yas537_data.calib_yas537.a6 * a_s_s32[2]))) + / (8192)); + /* read hy2*/ + a_h_s32[2] = ((yas537_data.calib_yas537.k * ( + (yas537_data.calib_yas537.a7 * a_s_s32[0]) + + (yas537_data.calib_yas537.a8 * a_s_s32[1]) + + (yas537_data.calib_yas537.a9 * a_s_s32[2]))) + / (8192)); + + for (i = 0; i < 3; i++) { + if (a_h_s32[i] < -8192) + a_h_s32[i] = -8192; + + if (8192 < a_h_s32[i]) + a_h_s32[i] = 8192; + + xy1y2[i] = a_h_s32[i] + 8192; + + } + } + *v_ouflow_u8 = 0; + for (i = 0; i < 3; i++) { + if (YAS537_DATA_OVERFLOW <= xy1y2[i]) + *v_ouflow_u8 |= (1 << (i * 2)); + if (xy1y2[i] == YAS537_DATA_UNDERFLOW) + *v_ouflow_u8 |= (1 << (i * 2 + 1)); + } + + return com_rslt; + +} +/*! + * @brief This function used for read the + * YAMAHA YAS537 xy1y2 data + * + * @param v_ouflow_u8: The value of overflow + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +static BMI160_RETURN_FUNCTION_TYPE invalid_magnetic_field( +u16 *v_cur_u16, u16 *v_last_u16) +{ + s16 invalid_thresh[] = {1500, 1500, 1500}; + u8 i = BMI160_INIT_VALUE; + + for (i = 0; i < 3; i++) + if (invalid_thresh[i] < ABS(v_cur_u16[i] - v_last_u16[i])) + return 1; + return 0; +} +/*! + * @brief This function used for read the + * YAMAHA YAS537 xy1y2 data + * + * @param v_ouflow_u8: The value of overflow + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_measure_xyz_data( +u8 *v_ouflow_u8, struct yas_vector *vector_xyz) +{ + s32 a_xyz_tmp_s32[BMI160_YAS_TEMP_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + u8 i = BMI160_INIT_VALUE; + s8 com_rslt = BMI160_INIT_VALUE; + u8 v_busy_u8 = BMI160_INIT_VALUE; + u8 v_rcoil_u8 = BMI160_INIT_VALUE; + u16 v_temperature_u16 = BMI160_INIT_VALUE; + u16 a_xy1y2_u16[BMI160_YAS_XY1Y2_DATA_SIZE] = { + BMI160_INIT_VALUE, BMI160_INIT_VALUE, BMI160_INIT_VALUE}; + *v_ouflow_u8 = 0; + /* read the yas537 xy1y2 data*/ + com_rslt = bmi160_bst_yamaha_yas537_read_xy1y2_data( + &v_rcoil_u8, &v_busy_u8, + &v_temperature_u16, a_xy1y2_u16, v_ouflow_u8); + /* linear calculation*/ + xy1y2_to_xyz(a_xy1y2_u16, vector_xyz->yas537_vector_xyz); + if (yas537_data.transform != BMI160_NULL) { + for (i = 0; i < 3; i++) { + a_xyz_tmp_s32[i] = (( + yas537_data.transform[i + 3] + * vector_xyz->yas537_vector_xyz[0]) + + (yas537_data.transform[ + i * 3 + 1] + * vector_xyz->yas537_vector_xyz[1]) + + (yas537_data.transform[ + i * 3 + 2] + * vector_xyz->yas537_vector_xyz[2])); + } + yas537_set_vector( + vector_xyz->yas537_vector_xyz, a_xyz_tmp_s32); + } + for (i = 0; i < 3; i++) { + vector_xyz->yas537_vector_xyz[i] -= + vector_xyz->yas537_vector_xyz[i] % 10; + if (*v_ouflow_u8 & (1 << + (i * 2))) + vector_xyz->yas537_vector_xyz[i] += + 1; /* set overflow */ + if (*v_ouflow_u8 & (1 << (i * 2 + 1))) + /* set underflow */ + vector_xyz->yas537_vector_xyz[i] += 2; + } + if (v_busy_u8) + return ERROR; + switch (yas537_data.measure_state) { + case YAS537_MAG_STATE_INIT_COIL: + if (p_bmi160->mag_manual_enable != BMI160_MANUAL_ENABLE) + com_rslt = bmi160_set_mag_manual_enable( + BMI160_MANUAL_ENABLE); + com_rslt += bmi160_set_mag_write_data(YAS537_WRITE_CONFR); + p_bmi160->delay_msec(BMI160_GEN_READ_WRITE_DELAY); + com_rslt += bmi160_set_mag_write_addr(YAS537_REG_CONFR); + p_bmi160->delay_msec(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + yas537_data.measure_state = YAS537_MAG_STATE_RECORD_DATA; + if (p_bmi160->mag_manual_enable == BMI160_MANUAL_ENABLE) + com_rslt = bmi160_set_mag_manual_enable( + BMI160_MANUAL_DISABLE); + break; + case YAS537_MAG_STATE_RECORD_DATA: + if (v_rcoil_u8) + break; + yas537_set_vector(yas537_data.last_after_rcoil, a_xy1y2_u16); + yas537_data.measure_state = YAS537_MAG_STATE_NORMAL; + break; + case YAS537_MAG_STATE_NORMAL: + if (BMI160_INIT_VALUE < v_ouflow_u8 + || invalid_magnetic_field(a_xy1y2_u16, + yas537_data.last_after_rcoil)) { + yas537_data.measure_state = YAS537_MAG_STATE_INIT_COIL; + for (i = 0; i < 3; i++) { + if (!*v_ouflow_u8) + vector_xyz->yas537_vector_xyz[i] += 3; + } + } + break; + } + + return com_rslt; +} +/*! + * @brief This function used for reading + * bmi160_t structure + * + * @return the reference and values of bmi160_t + * + * +*/ +struct bmi160_t *bmi160_get_ptr(void) +{ + return p_bmi160; +} diff --git a/drivers/input/misc/bmi160.h b/drivers/input/misc/bmi160.h new file mode 100644 index 00000000000..fdfa5b77001 --- /dev/null +++ b/drivers/input/misc/bmi160.h @@ -0,0 +1,11605 @@ +/* +**************************************************************************** +* Copyright (C) 2014 Bosch Sensortec GmbH +* +* bmi160.h +* Date : 2015/04/02 +* @id "2e89046" +* Revision : 2.0.9 $ +* @brief +* The head file of BMI160API +* +**************************************************************************** +* +* \section Disclaimer +* +* Common: +* Bosch Sensortec products are developed for the consumer goods industry. +* They may only be used within the parameters of the respective valid +* product data sheet. Bosch Sensortec products are provided with the +* express understanding that there is no warranty of fitness for a +* particular purpose.They are not fit for use in life-sustaining, +* safety or security sensitive systems or any system or device +* that may lead to bodily harm or property damage if the system +* or device malfunctions. In addition,Bosch Sensortec products are +* not fit for use in products which interact with motor vehicle systems. +* The resale and or use of products are at the purchasers own risk and +* his own responsibility. The examination of fitness for the intended use +* is the sole responsibility of the Purchaser. +* +* The purchaser shall indemnify Bosch Sensortec from all third party +* claims, including any claims for incidental, or consequential damages, +* arising from any product use not covered by the parameters of +* the respective valid product data sheet or not approved by +* Bosch Sensortec and reimburse Bosch Sensortec for all costs in +* connection with such claims. +* +* The purchaser must monitor the market for the purchased products, +* particularly with regard to product safety and inform Bosch Sensortec +* without delay of all security relevant incidents. +* +* Engineering Samples are marked with an asterisk (*) or (e). +* Samples may vary from the valid technical specifications of the product +* series. They are therefore not intended or fit for resale to third +* parties or for use in end products. Their sole purpose is internal +* client testing. The testing of an engineering sample may in no way +* replace the testing of a product series. Bosch Sensortec assumes +* no liability for the use of engineering samples. +* By accepting the engineering samples, the Purchaser agrees to indemnify +* Bosch Sensortec from all claims arising from the use of engineering +* samples. +* +* Special: +* This software module (hereinafter called "Software") and any information +* on application-sheets (hereinafter called "Information") is provided +* free of charge for the sole purpose to support your application work. +* The Software and Information is subject to the following +* terms and conditions: +* +* The Software is specifically designed for the exclusive use for +* Bosch Sensortec products by personnel who have special experience +* and training. Do not use this Software if you do not have the +* proper experience or training. +* +* This Software package is provided `` as is `` and without any expressed +* or implied warranties,including without limitation, the implied warranties +* of merchantability and fitness for a particular purpose. +* +* Bosch Sensortec and their representatives and agents deny any liability +* for the functional impairment +* of this Software in terms of fitness, performance and safety. +* Bosch Sensortec and their representatives and agents shall not be liable +* for any direct or indirect damages or injury, except as +* otherwise stipulated in mandatory applicable law. +* +* The Information provided is believed to be accurate and reliable. +* Bosch Sensortec assumes no responsibility for the consequences of use +* of such Information nor for any infringement of patents or +* other rights of third parties which may result from its use. +* No license is granted by implication or otherwise under any patent or +* patent rights of Bosch. Specifications mentioned in the Information are +* subject to change without notice. +**************************************************************************/ +/*! \file bmi160.h + \brief BMI160 Sensor Driver Support Header File */ +/* user defined code to be added here ... */ +#ifndef __BMI160_H__ +#define __BMI160_H__ + + +#include + +/***************************************************************/ +/**\name BUS READ AND WRITE FUNCTION POINTERS */ +/***************************************************************/ +/*! + @brief Define the calling convention of YOUR bus communication routine. + @note This includes types of parameters. This example shows the + configuration for an SPI bus link. + + If your communication function looks like this: + + write_my_bus_xy(u8 device_addr, u8 register_addr, + u8 * data, u8 length); + + The BMI160_WR_FUNC_PTR would equal: + + BMI160_WR_FUNC_PTR s8 (* bus_write)(u8, + u8, u8 *, u8) + + Parameters can be mixed as needed refer to the + @ref BMI160_BUS_WRITE_FUNC macro. + + +*/ +#define BMI160_WR_FUNC_PTR s8 (*bus_write)(u8, u8,\ +u8 *, u8) +/**< link macro between API function calls and bus write function + @note The bus write function can change since this is a + system dependant issue. + + If the bus_write parameter calling order is like: reg_addr, + reg_data, wr_len it would be as it is here. + + If the parameters are differently ordered or your communication + function like I2C need to know the device address, + you can change this macro accordingly. + + + BMI160_BUS_WRITE_FUNC(dev_addr, reg_addr, reg_data, wr_len)\ + bus_write(dev_addr, reg_addr, reg_data, wr_len) + + This macro lets all API functions call YOUR communication routine in a + way that equals your definition in the + @ref BMI160_WR_FUNC_PTR definition. + +*/ +#define BMI160_BUS_WRITE_FUNC(dev_addr, reg_addr, reg_data, wr_len)\ + bus_write(dev_addr, reg_addr, reg_data, wr_len) + +/**< Define the calling convention of YOUR bus communication routine. + @note This includes types of parameters. This example shows the + configuration for an SPI bus link. + + If your communication function looks like this: + + read_my_bus_xy(u8 device_addr, u8 register_addr, + u8 * data, u8 length); + + The BMI160_RD_FUNC_PTR would equal: + + BMI160_RD_FUNC_PTR s8 (* bus_read)(u8, + u8, u8 *, u8) + + Parameters can be mixed as needed refer to the + refer BMI160_BUS_READ_FUNC macro. + +*/ +#define BMI160_SPI_RD_MASK (0x80) /* for spi read transactions on SPI the + MSB has to be set */ +#define BMI160_RD_FUNC_PTR s8 (*bus_read)(u8,\ + u8, u8 *, u8) + +#define BMI160_BRD_FUNC_PTR s8 \ +(*burst_read)(u8, u8, u8 *, u32) + +/**< link macro between API function calls and bus read function + @note The bus write function can change since this is a + system dependant issue. + + If the bus_read parameter calling order is like: reg_addr, + reg_data, wr_len it would be as it is here. + + If the parameters are differently ordered or your communication + function like I2C need to know the device address, + you can change this macro accordingly. + + + BMI160_BUS_READ_FUNC(dev_addr, reg_addr, reg_data, wr_len)\ + bus_read(dev_addr, reg_addr, reg_data, wr_len) + + This macro lets all API functions call YOUR communication routine in a + way that equals your definition in the + refer BMI160_WR_FUNC_PTR definition. + + @note: this macro also includes the "MSB='1' + for reading BMI160 addresses. + +*/ +#define BMI160_BUS_READ_FUNC(dev_addr, reg_addr, reg_data, r_len)\ + bus_read(dev_addr, reg_addr, reg_data, r_len) + +#define BMI160_BURST_READ_FUNC(device_addr, \ +register_addr, register_data, rd_len)\ +burst_read(device_addr, register_addr, register_data, rd_len) + + +#define BMI160_MDELAY_DATA_TYPE u32 + +/***************************************************************/ +/**\name BUS READ AND WRITE FUNCTION POINTERS */ +/***************************************************************/ +#define BMI160_I2C_ADDR1 0x68 /**< I2C Address needs to be changed */ +#define BMI160_I2C_ADDR2 0x69 /**< I2C Address needs to be changed */ +#define BMI160_AUX_BMM150_I2C_ADDRESS (0x10) +#define BMI160_AUX_YAS532_I2C_ADDRESS (0x2E) +/**< I2C address of YAS532*/ +#define BMI160_AKM09911_I2C_ADDRESS 0x0C/**< I2C address of AKM09911*/ +/**< I2C address of AKM09911*/ +#define BMI160_AUX_AKM09911_I2C_ADDR_2 (0x0D) +/**< I2C address of AKM09911*/ +#define BMI160_AUX_AKM09912_I2C_ADDR_1 (0x0C) +/**< I2C address of AKM09912*/ +#define BMI160_AUX_AKM09912_I2C_ADDR_2 (0x0D) +/**< I2C address of AKM09912*/ +#define BMI160_AUX_AKM09912_I2C_ADDR_3 (0x0E) +/**< I2C address of AKM09912*/ +#define BMI160_AKM09912_I2C_ADDRESS 0x0F/**< I2C address of akm09912*/ + +#define BMI160_YAS532_I2C_ADDRESS 0x2E/**< I2C address of YAS532*/ +/*******************************************/ +/**\name CONSTANTS */ +/******************************************/ +#define BMI160_INIT_VALUE (0) +#define BMI160_GEN_READ_WRITE_DATA_LENGTH (1) +#define BMI160_MAXIMUM_TIMEOUT (10) +/* output data rate condition check*/ +#define BMI160_OUTPUT_DATA_RATE0 (0) +#define BMI160_OUTPUT_DATA_RATE1 (1) +#define BMI160_OUTPUT_DATA_RATE2 (2) +#define BMI160_OUTPUT_DATA_RATE3 (3) +#define BMI160_OUTPUT_DATA_RATE4 (4) +#define BMI160_OUTPUT_DATA_RATE5 (5) +#define BMI160_OUTPUT_DATA_RATE6 (14) +#define BMI160_OUTPUT_DATA_RATE7 (15) +/* accel range check*/ +#define BMI160_ACCEL_RANGE0 (3) +#define BMI160_ACCEL_RANGE1 (5) +#define BMI160_ACCEL_RANGE3 (8) +#define BMI160_ACCEL_RANGE4 (12) +/* check the status of registers*/ +#define BMI160_FOC_STAT_HIGH (1) +#define BMI160_SIG_MOTION_STAT_HIGH (1) +#define BMI160_STEP_DET_STAT_HIGH (1) + +/*condition check for reading and writing data*/ +#define BMI160_MAX_VALUE_SIGNIFICANT_MOTION (1) +#define BMI160_MAX_VALUE_FIFO_FILTER (1) +#define BMI160_MAX_VALUE_FIFO_TIME (1) +#define BMI160_MAX_VALUE_FIFO_INTR (1) +#define BMI160_MAX_VALUE_FIFO_HEADER (1) +#define BMI160_MAX_VALUE_FIFO_MAG (1) +#define BMI160_MAX_VALUE_FIFO_ACCEL (1) +#define BMI160_MAX_VALUE_FIFO_GYRO (1) +#define BMI160_MAX_VALUE_SOURCE_INTR (1) +#define BMI160_MAX_VALUE_LOW_G_MODE (1) +#define BMI160_MAX_VALUE_NO_MOTION (1) +#define BMI160_MAX_VALUE_TAP_SHOCK (1) +#define BMI160_MAX_VALUE_TAP_QUIET (1) +#define BMI160_MAX_VALUE_ORIENT_UD (1) +#define BMI160_MAX_VALUE_ORIENT_AXES (1) +#define BMI160_MAX_VALUE_NVM_PROG (1) +#define BMI160_MAX_VALUE_SPI3 (1) +#define BMI160_MAX_VALUE_PAGE (1) +#define BMI160_MAX_VALUE_I2C_WDT (1) +#define BMI160_MAX_VALUE_SLEEP_STATE (1) +#define BMI160_MAX_VALUE_WAKEUP_INTR (1) +#define BMI160_MAX_VALUE_SELFTEST_SIGN (1) +#define BMI160_MAX_VALUE_SELFTEST_AMP (1) +#define BMI160_MAX_VALUE_SELFTEST_START (1) +#define BMI160_MAX_GYRO_WAKEUP_TRIGGER (3) +#define BMI160_MAX_ACCEL_SELFTEST_AXIS (3) +#define BMI160_MAX_GYRO_STEP_COUNTER (1) +#define BMI160_MAX_GYRO_BW (3) +#define BMI160_MAX_ACCEL_BW (7) +#define BMI160_MAX_ORIENT_MODE (3) +#define BMI160_MAX_ORIENT_BLOCKING (3) +#define BMI160_MAX_FLAT_HOLD (3) +#define BMI160_MAX_ACCEL_FOC (3) +#define BMI160_MAX_IF_MODE (3) +#define BMI160_MAX_TARGET_PAGE (3) +#define BMI160_MAX_GYRO_RANGE (4) +#define BMI160_MAX_GYRO_SLEEP_TIGGER (7) +#define BMI160_MAX_TAP_TURN (7) +#define BMI160_MAX_UNDER_SAMPLING (1) +#define BMI160_MAX_UNDER_SIG_MOTION (3) +#define BMI160_MAX_ACCEL_OUTPUT_DATA_RATE (12) +#define BMI160_MAX_LATCH_INTR (15) +#define BMI160_MAX_FLAT_HYST (15) +#define BMI160_MAX_ORIENT_THETA (63) +#define BMI160_MAX_FLAT_THETA (63) + +/* FIFO index definitions*/ +#define BMI160_FIFO_X_LSB_DATA (0) +#define BMI160_FIFO_X_MSB_DATA (1) +#define BMI160_FIFO_Y_LSB_DATA (2) +#define BMI160_FIFO_Y_MSB_DATA (3) +#define BMI160_FIFO_Z_LSB_DATA (4) +#define BMI160_FIFO_Z_MSB_DATA (5) +#define BMI160_FIFO_R_LSB_DATA (6) +#define BMI160_FIFO_R_MSB_DATA (7) +/* FIFO gyro definition*/ +#define BMI160_GA_FIFO_G_X_LSB (0) +#define BMI160_GA_FIFO_G_X_MSB (1) +#define BMI160_GA_FIFO_G_Y_LSB (2) +#define BMI160_GA_FIFO_G_Y_MSB (3) +#define BMI160_GA_FIFO_G_Z_LSB (4) +#define BMI160_GA_FIFO_G_Z_MSB (5) +#define BMI160_GA_FIFO_A_X_LSB (6) +#define BMI160_GA_FIFO_A_X_MSB (7) +#define BMI160_GA_FIFO_A_Y_LSB (8) +#define BMI160_GA_FIFO_A_Y_MSB (9) +#define BMI160_GA_FIFO_A_Z_LSB (10) +#define BMI160_GA_FIFO_A_Z_MSB (11) +/* FIFO mag/gyro/accel definition*/ +#define BMI160_MGA_FIFO_M_X_LSB (0) +#define BMI160_MGA_FIFO_M_X_MSB (1) +#define BMI160_MGA_FIFO_M_Y_LSB (2) +#define BMI160_MGA_FIFO_M_Y_MSB (3) +#define BMI160_MGA_FIFO_M_Z_LSB (4) +#define BMI160_MGA_FIFO_M_Z_MSB (5) +#define BMI160_MGA_FIFO_M_R_LSB (6) +#define BMI160_MGA_FIFO_M_R_MSB (7) +#define BMI160_MGA_FIFO_G_X_LSB (8) +#define BMI160_MGA_FIFO_G_X_MSB (9) +#define BMI160_MGA_FIFO_G_Y_LSB (10) +#define BMI160_MGA_FIFO_G_Y_MSB (11) +#define BMI160_MGA_FIFO_G_Z_LSB (12) +#define BMI160_MGA_FIFO_G_Z_MSB (13) +#define BMI160_MGA_FIFO_A_X_LSB (14) +#define BMI160_MGA_FIFO_A_X_MSB (15) +#define BMI160_MGA_FIFO_A_Y_LSB (16) +#define BMI160_MGA_FIFO_A_Y_MSB (17) +#define BMI160_MGA_FIFO_A_Z_LSB (18) +#define BMI160_MGA_FIFO_A_Z_MSB (19) +/* FIFO mag definition*/ +#define BMI160_MA_FIFO_M_X_LSB (0) +#define BMI160_MA_FIFO_M_X_MSB (1) +#define BMI160_MA_FIFO_M_Y_LSB (2) +#define BMI160_MA_FIFO_M_Y_MSB (3) +#define BMI160_MA_FIFO_M_Z_LSB (4) +#define BMI160_MA_FIFO_M_Z_MSB (5) +#define BMI160_MA_FIFO_M_R_LSB (6) +#define BMI160_MA_FIFO_M_R_MSB (7) +#define BMI160_MA_FIFO_A_X_LSB (8) +#define BMI160_MA_FIFO_A_X_MSB (9) +#define BMI160_MA_FIFO_A_Y_LSB (10) +#define BMI160_MA_FIFO_A_Y_MSB (11) +#define BMI160_MA_FIFO_A_Z_LSB (12) +#define BMI160_MA_FIFO_A_Z_MSB (13) +/* FIFO mag/gyro definition*/ +#define BMI160_MG_FIFO_M_X_LSB (0) +#define BMI160_MG_FIFO_M_X_MSB (1) +#define BMI160_MG_FIFO_M_Y_LSB (2) +#define BMI160_MG_FIFO_M_Y_MSB (3) +#define BMI160_MG_FIFO_M_Z_LSB (4) +#define BMI160_MG_FIFO_M_Z_MSB (5) +#define BMI160_MG_FIFO_M_R_LSB (6) +#define BMI160_MG_FIFO_M_R_MSB (7) +#define BMI160_MG_FIFO_G_X_LSB (8) +#define BMI160_MG_FIFO_G_X_MSB (9) +#define BMI160_MG_FIFO_G_Y_LSB (10) +#define BMI160_MG_FIFO_G_Y_MSB (11) +#define BMI160_MG_FIFO_G_Z_LSB (12) +#define BMI160_MG_FIFO_G_Z_MSB (13) +/* FIFO length definitions*/ +#define BMI160_FIFO_SENSOR_TIME_LSB (0) +#define BMI160_FIFO_SENSOR_TIME_XLSB (1) +#define BMI160_FIFO_SENSOR_TIME_MSB (2) +#define BMI160_FIFO_SENSOR_TIME_LENGTH (3) +#define BMI160_FIFO_A_LENGTH (6) +#define BMI160_FIFO_G_LENGTH (6) +#define BMI160_FIFO_M_LENGTH (8) +#define BMI160_FIFO_AG_LENGTH (12) +#define BMI160_FIFO_AMG_LENGTH (20) +#define BMI160_FIFO_MA_OR_MG_LENGTH (14) + +/* bus read and write length for mag, accel and gyro*/ +#define BMI160_MAG_X_DATA_LENGTH (2) +#define BMI160_MAG_Y_DATA_LENGTH (2) +#define BMI160_MAG_Z_DATA_LENGTH (2) +#define BMI160_MAG_R_DATA_LENGTH (2) +#define BMI160_MAG_XYZ_DATA_LENGTH (6) +#define BMI160_MAG_XYZR_DATA_LENGTH (8) +#define BMI160_MAG_YAS_DATA_LENGTH (8) +#define BMI160_GYRO_DATA_LENGTH (2) +#define BMI160_GYRO_XYZ_DATA_LENGTH (6) +#define BMI160_ACCEL_DATA_LENGTH (2) +#define BMI160_ACCEL_XYZ_DATA_LENGTH (6) +#define BMI160_TEMP_DATA_LENGTH (2) +#define BMI160_FIFO_DATA_LENGTH (2) +#define BMI160_STEP_COUNTER_LENGTH (2) +#define BMI160_SENSOR_TIME_LENGTH (3) + +/* Delay definitions*/ +#define BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY (5) +#define BMI160_BMM150_WAKEUP_DELAY1 (2) +#define BMI160_BMM150_WAKEUP_DELAY2 (3) +#define BMI160_BMM150_WAKEUP_DELAY3 (1) +#define BMI160_YAS532_OFFSET_DELAY (2) +#define BMI160_GEN_READ_WRITE_DELAY (1) +#define BMI160_YAS532_MEASUREMENT_DELAY (25) +#define BMI160_YAS_ACQ_COMMAND_DELAY (50) +#define BMI160_YAS532_SET_INITIAL_VALUE_DELAY (200) +#define BMI160_AKM_INIT_DELAY (60) +/****************************************************/ +/**\name ARRAY SIZE DEFINITIONS */ +/***************************************************/ +#define BMI160_ACCEL_X_DATA_SIZE (2) +#define BMI160_ACCEL_Y_DATA_SIZE (2) +#define BMI160_ACCEL_Z_DATA_SIZE (2) +#define BMI160_ACCEL_XYZ_DATA_SIZE (6) + +#define BMI160_GYRO_X_DATA_SIZE (2) +#define BMI160_GYRO_Y_DATA_SIZE (2) +#define BMI160_GYRO_Z_DATA_SIZE (2) +#define BMI160_GYRO_XYZ_DATA_SIZE (6) + +#define BMI160_MAG_X_DATA_SIZE (2) +#define BMI160_MAG_Y_DATA_SIZE (2) +#define BMI160_MAG_Z_DATA_SIZE (2) +#define BMI160_MAG_R_DATA_SIZE (2) +#define BMI160_MAG_XYZ_DATA_SIZE (6) +#define BMI160_MAG_XYZR_DATA_SIZE (8) +#define BMI160_MAG_TRIM_DATA_SIZE (16) + + +#define BMI160_TEMP_DATA_SIZE (2) +#define BMI160_FIFO_DATA_SIZE (2) +#define BMI160_STEP_COUNT_DATA_SIZE (2) + +#define BMI160_SENSOR_TIME_DATA_SIZE (3) +#define BMI160_AKM_SENSITIVITY_DATA_SIZE (3) +#define BMI160_HARD_OFFSET_DATA_SIZE (3) +#define BMI160_YAS_XY1Y2_DATA_SIZE (3) +#define BMI160_YAS_FLAG_DATA_SIZE (3) +#define BMI160_YAS_TEMP_DATA_SIZE (3) +#define BMI160_YAS_H_DATA_SIZE (3) +#define BMI160_YAS_S_DATA_SIZE (3) +#define BMI160_YAS_CORRECT_DATA_SIZE (5) +#define BMI160_YAS_XY1Y2T_DATA_SIZE (8) +#define BMI160_YAS537_CALIB_DATA_SIZE (17) +#define BMI160_YAS532_CALIB_DATA_SIZE (14) +/****************************************************/ +/**\name ARRAY PARAMETER DEFINITIONS */ +/***************************************************/ +#define BMI160_SENSOR_TIME_MSB_BYTE (2) +#define BMI160_SENSOR_TIME_XLSB_BYTE (1) +#define BMI160_SENSOR_TIME_LSB_BYTE (0) + +#define BMI160_MAG_X_LSB_BYTE (0) +#define BMI160_MAG_X_MSB_BYTE (1) +#define BMI160_MAG_Y_LSB_BYTE (0) +#define BMI160_MAG_Y_MSB_BYTE (1) +#define BMI160_MAG_Z_LSB_BYTE (0) +#define BMI160_MAG_Z_MSB_BYTE (1) +#define BMI160_MAG_R_LSB_BYTE (0) +#define BMI160_MAG_R_MSB_BYTE (1) +#define BMI160_DATA_FRAME_MAG_X_LSB_BYTE (0) +#define BMI160_DATA_FRAME_MAG_X_MSB_BYTE (1) +#define BMI160_DATA_FRAME_MAG_Y_LSB_BYTE (2) +#define BMI160_DATA_FRAME_MAG_Y_MSB_BYTE (3) +#define BMI160_DATA_FRAME_MAG_Z_LSB_BYTE (4) +#define BMI160_DATA_FRAME_MAG_Z_MSB_BYTE (5) +#define BMI160_DATA_FRAME_MAG_R_LSB_BYTE (6) +#define BMI160_DATA_FRAME_MAG_R_MSB_BYTE (7) + +#define BMI160_GYRO_X_LSB_BYTE (0) +#define BMI160_GYRO_X_MSB_BYTE (1) +#define BMI160_GYRO_Y_LSB_BYTE (0) +#define BMI160_GYRO_Y_MSB_BYTE (1) +#define BMI160_GYRO_Z_LSB_BYTE (0) +#define BMI160_GYRO_Z_MSB_BYTE (1) +#define BMI160_DATA_FRAME_GYRO_X_LSB_BYTE (0) +#define BMI160_DATA_FRAME_GYRO_X_MSB_BYTE (1) +#define BMI160_DATA_FRAME_GYRO_Y_LSB_BYTE (2) +#define BMI160_DATA_FRAME_GYRO_Y_MSB_BYTE (3) +#define BMI160_DATA_FRAME_GYRO_Z_LSB_BYTE (4) +#define BMI160_DATA_FRAME_GYRO_Z_MSB_BYTE (5) + +#define BMI160_ACCEL_X_LSB_BYTE (0) +#define BMI160_ACCEL_X_MSB_BYTE (1) +#define BMI160_ACCEL_Y_LSB_BYTE (0) +#define BMI160_ACCEL_Y_MSB_BYTE (1) +#define BMI160_ACCEL_Z_LSB_BYTE (0) +#define BMI160_ACCEL_Z_MSB_BYTE (1) +#define BMI160_DATA_FRAME_ACCEL_X_LSB_BYTE (0) +#define BMI160_DATA_FRAME_ACCEL_X_MSB_BYTE (1) +#define BMI160_DATA_FRAME_ACCEL_Y_LSB_BYTE (2) +#define BMI160_DATA_FRAME_ACCEL_Y_MSB_BYTE (3) +#define BMI160_DATA_FRAME_ACCEL_Z_LSB_BYTE (4) +#define BMI160_DATA_FRAME_ACCEL_Z_MSB_BYTE (5) + +#define BMI160_TEMP_LSB_BYTE (0) +#define BMI160_TEMP_MSB_BYTE (1) + +#define BMI160_FIFO_LENGTH_LSB_BYTE (0) +#define BMI160_FIFO_LENGTH_MSB_BYTE (1) + +#define BMI160_STEP_COUNT_LSB_BYTE (0) +#define BMI160_STEP_COUNT_MSB_BYTE (1) +/****************************************************/ +/**\name ERROR CODES */ +/***************************************************/ + +#define E_BMI160_NULL_PTR ((s8)-127) +#define E_BMI160_COMM_RES ((s8)-1) +#define E_BMI160_OUT_OF_RANGE ((s8)-2) +#define E_BMI160_BUSY ((s8)-3) +#define SUCCESS ((u8)0) +#define ERROR ((s8)-1) + +/* Constants */ +#define BMI160_NULL (0) +#define BMI160_DELAY_SETTLING_TIME (5) +/*This refers BMI160 return type as s8 */ +#define BMI160_RETURN_FUNCTION_TYPE s8 +/****************************************************/ +/**\name REGISTER DEFINITIONS */ +/***************************************************/ +/*******************/ +/**\name CHIP ID */ +/*******************/ +#define BMI160_USER_CHIP_ID_ADDR (0x00) +/*******************/ +/**\name ERROR STATUS */ +/*******************/ +#define BMI160_USER_ERROR_ADDR (0X02) +/*******************/ +/**\name POWER MODE STATUS */ +/*******************/ +#define BMI160_USER_PMU_STAT_ADDR (0X03) +/*******************/ +/**\name MAG DATA REGISTERS */ +/*******************/ +#define BMI160_USER_DATA_0_ADDR (0X04) +#define BMI160_USER_DATA_1_ADDR (0X05) +#define BMI160_USER_DATA_2_ADDR (0X06) +#define BMI160_USER_DATA_3_ADDR (0X07) +#define BMI160_USER_DATA_4_ADDR (0X08) +#define BMI160_USER_DATA_5_ADDR (0X09) +#define BMI160_USER_DATA_6_ADDR (0X0A) +#define BMI160_USER_DATA_7_ADDR (0X0B) +/*******************/ +/**\name GYRO DATA REGISTERS */ +/*******************/ +#define BMI160_USER_DATA_8_ADDR (0X0C) +#define BMI160_USER_DATA_9_ADDR (0X0D) +#define BMI160_USER_DATA_10_ADDR (0X0E) +#define BMI160_USER_DATA_11_ADDR (0X0F) +#define BMI160_USER_DATA_12_ADDR (0X10) +#define BMI160_USER_DATA_13_ADDR (0X11) +#define BMI160_USER_DATA_14_ADDR (0X12) +#define BMI160_USER_DATA_15_ADDR (0X13) +/*******************/ +/**\name ACCEL DATA REGISTERS */ +/*******************/ +#define BMI160_USER_DATA_16_ADDR (0X14) +#define BMI160_USER_DATA_17_ADDR (0X15) +#define BMI160_USER_DATA_18_ADDR (0X16) +#define BMI160_USER_DATA_19_ADDR (0X17) +/*******************/ +/**\name SENSOR TIME REGISTERS */ +/*******************/ +#define BMI160_USER_SENSORTIME_0_ADDR (0X18) +#define BMI160_USER_SENSORTIME_1_ADDR (0X19) +#define BMI160_USER_SENSORTIME_2_ADDR (0X1A) +/*******************/ +/**\name STATUS REGISTER FOR SENSOR STATUS FLAG */ +/*******************/ +#define BMI160_USER_STAT_ADDR (0X1B) +/*******************/ +/**\name INTERRUPY STATUS REGISTERS */ +/*******************/ +#define BMI160_USER_INTR_STAT_0_ADDR (0X1C) +#define BMI160_USER_INTR_STAT_1_ADDR (0X1D) +#define BMI160_USER_INTR_STAT_2_ADDR (0X1E) +#define BMI160_USER_INTR_STAT_3_ADDR (0X1F) +/*******************/ +/**\name TEMPERATURE REGISTERS */ +/*******************/ +#define BMI160_USER_TEMPERATURE_0_ADDR (0X20) +#define BMI160_USER_TEMPERATURE_1_ADDR (0X21) +/*******************/ +/**\name FIFO REGISTERS */ +/*******************/ +#define BMI160_USER_FIFO_LENGTH_0_ADDR (0X22) +#define BMI160_USER_FIFO_LENGTH_1_ADDR (0X23) +#define BMI160_USER_FIFO_DATA_ADDR (0X24) +/***************************************************/ +/**\name ACCEL CONFIG REGISTERS FOR ODR, BANDWIDTH AND UNDERSAMPLING*/ +/******************************************************/ +#define BMI160_USER_ACCEL_CONFIG_ADDR (0X40) +/*******************/ +/**\name ACCEL RANGE */ +/*******************/ +#define BMI160_USER_ACCEL_RANGE_ADDR (0X41) +/***************************************************/ +/**\name GYRO CONFIG REGISTERS FOR ODR AND BANDWIDTH */ +/******************************************************/ +#define BMI160_USER_GYRO_CONFIG_ADDR (0X42) +/*******************/ +/**\name GYRO RANGE */ +/*******************/ +#define BMI160_USER_GYRO_RANGE_ADDR (0X43) +/***************************************************/ +/**\name MAG CONFIG REGISTERS FOR ODR*/ +/******************************************************/ +#define BMI160_USER_MAG_CONFIG_ADDR (0X44) +/***************************************************/ +/**\name REGISTER FOR GYRO AND ACCEL DOWNSAMPLING RATES FOR FIFO*/ +/******************************************************/ +#define BMI160_USER_FIFO_DOWN_ADDR (0X45) +/***************************************************/ +/**\name FIFO CONFIG REGISTERS*/ +/******************************************************/ +#define BMI160_USER_FIFO_CONFIG_0_ADDR (0X46) +#define BMI160_USER_FIFO_CONFIG_1_ADDR (0X47) +/***************************************************/ +/**\name MAG INTERFACE REGISTERS*/ +/******************************************************/ +#define BMI160_USER_MAG_IF_0_ADDR (0X4B) +#define BMI160_USER_MAG_IF_1_ADDR (0X4C) +#define BMI160_USER_MAG_IF_2_ADDR (0X4D) +#define BMI160_USER_MAG_IF_3_ADDR (0X4E) +#define BMI160_USER_MAG_IF_4_ADDR (0X4F) +/***************************************************/ +/**\name INTERRUPT ENABLE REGISTERS*/ +/******************************************************/ +#define BMI160_USER_INTR_ENABLE_0_ADDR (0X50) +#define BMI160_USER_INTR_ENABLE_1_ADDR (0X51) +#define BMI160_USER_INTR_ENABLE_2_ADDR (0X52) +#define BMI160_USER_INTR_OUT_CTRL_ADDR (0X53) +/***************************************************/ +/**\name LATCH DURATION REGISTERS*/ +/******************************************************/ +#define BMI160_USER_INTR_LATCH_ADDR (0X54) +/***************************************************/ +/**\name MAP INTERRUPT 1 and 2 REGISTERS*/ +/******************************************************/ +#define BMI160_USER_INTR_MAP_0_ADDR (0X55) +#define BMI160_USER_INTR_MAP_1_ADDR (0X56) +#define BMI160_USER_INTR_MAP_2_ADDR (0X57) +/***************************************************/ +/**\name DATA SOURCE REGISTERS*/ +/******************************************************/ +#define BMI160_USER_INTR_DATA_0_ADDR (0X58) +#define BMI160_USER_INTR_DATA_1_ADDR (0X59) +/***************************************************/ +/**\name +INTERRUPT THRESHOLD, HYSTERESIS, DURATION, MODE CONFIGURATION REGISTERS*/ +/******************************************************/ +#define BMI160_USER_INTR_LOWHIGH_0_ADDR (0X5A) +#define BMI160_USER_INTR_LOWHIGH_1_ADDR (0X5B) +#define BMI160_USER_INTR_LOWHIGH_2_ADDR (0X5C) +#define BMI160_USER_INTR_LOWHIGH_3_ADDR (0X5D) +#define BMI160_USER_INTR_LOWHIGH_4_ADDR (0X5E) +#define BMI160_USER_INTR_MOTION_0_ADDR (0X5F) +#define BMI160_USER_INTR_MOTION_1_ADDR (0X60) +#define BMI160_USER_INTR_MOTION_2_ADDR (0X61) +#define BMI160_USER_INTR_MOTION_3_ADDR (0X62) +#define BMI160_USER_INTR_TAP_0_ADDR (0X63) +#define BMI160_USER_INTR_TAP_1_ADDR (0X64) +#define BMI160_USER_INTR_ORIENT_0_ADDR (0X65) +#define BMI160_USER_INTR_ORIENT_1_ADDR (0X66) +#define BMI160_USER_INTR_FLAT_0_ADDR (0X67) +#define BMI160_USER_INTR_FLAT_1_ADDR (0X68) +/***************************************************/ +/**\name FAST OFFSET CONFIGURATION REGISTER*/ +/******************************************************/ +#define BMI160_USER_FOC_CONFIG_ADDR (0X69) +/***************************************************/ +/**\name MISCELLANEOUS CONFIGURATION REGISTER*/ +/******************************************************/ +#define BMI160_USER_CONFIG_ADDR (0X6A) +/***************************************************/ +/**\name SERIAL INTERFACE SETTINGS REGISTER*/ +/******************************************************/ +#define BMI160_USER_IF_CONFIG_ADDR (0X6B) +/***************************************************/ +/**\name GYRO POWER MODE TRIGGER REGISTER */ +/******************************************************/ +#define BMI160_USER_PMU_TRIGGER_ADDR (0X6C) +/***************************************************/ +/**\name SELF_TEST REGISTER*/ +/******************************************************/ +#define BMI160_USER_SELF_TEST_ADDR (0X6D) +/***************************************************/ +/**\name SPI,I2C SELECTION REGISTER*/ +/******************************************************/ +#define BMI160_USER_NV_CONFIG_ADDR (0x70) +/***************************************************/ +/**\name ACCEL AND GYRO OFFSET REGISTERS*/ +/******************************************************/ +#define BMI160_USER_OFFSET_0_ADDR (0X71) +#define BMI160_USER_OFFSET_1_ADDR (0X72) +#define BMI160_USER_OFFSET_2_ADDR (0X73) +#define BMI160_USER_OFFSET_3_ADDR (0X74) +#define BMI160_USER_OFFSET_4_ADDR (0X75) +#define BMI160_USER_OFFSET_5_ADDR (0X76) +#define BMI160_USER_OFFSET_6_ADDR (0X77) +/***************************************************/ +/**\name STEP COUNTER INTERRUPT REGISTERS*/ +/******************************************************/ +#define BMI160_USER_STEP_COUNT_0_ADDR (0X78) +#define BMI160_USER_STEP_COUNT_1_ADDR (0X79) +/***************************************************/ +/**\name STEP COUNTER CONFIGURATION REGISTERS*/ +/******************************************************/ +#define BMI160_USER_STEP_CONFIG_0_ADDR (0X7A) +#define BMI160_USER_STEP_CONFIG_1_ADDR (0X7B) +/***************************************************/ +/**\name COMMAND REGISTER*/ +/******************************************************/ +#define BMI160_CMD_COMMANDS_ADDR (0X7E) +/***************************************************/ +/**\name PAGE REGISTERS*/ +/******************************************************/ +#define BMI160_CMD_EXT_MODE_ADDR (0X7F) +#define BMI160_COM_C_TRIM_FIVE_ADDR (0X05) + +/****************************************************/ +/**\name SHIFT VALUE DEFINITION */ +/***************************************************/ +#define BMI160_SHIFT_BIT_POSITION_BY_01_BIT (1) +#define BMI160_SHIFT_BIT_POSITION_BY_02_BITS (2) +#define BMI160_SHIFT_BIT_POSITION_BY_03_BITS (3) +#define BMI160_SHIFT_BIT_POSITION_BY_04_BITS (4) +#define BMI160_SHIFT_BIT_POSITION_BY_05_BITS (5) +#define BMI160_SHIFT_BIT_POSITION_BY_06_BITS (6) +#define BMI160_SHIFT_BIT_POSITION_BY_07_BITS (7) +#define BMI160_SHIFT_BIT_POSITION_BY_08_BITS (8) +#define BMI160_SHIFT_BIT_POSITION_BY_09_BITS (9) +#define BMI160_SHIFT_BIT_POSITION_BY_12_BITS (12) +#define BMI160_SHIFT_BIT_POSITION_BY_13_BITS (13) +#define BMI160_SHIFT_BIT_POSITION_BY_14_BITS (14) +#define BMI160_SHIFT_BIT_POSITION_BY_15_BITS (15) +#define BMI160_SHIFT_BIT_POSITION_BY_16_BITS (16) + +/****************************************************/ +/**\name DEFINITIONS USED FOR YAMAHA-YAS532 */ +/***************************************************/ +#define YAS532_MAG_STATE_NORMAL (0) +#define YAS532_MAG_STATE_INIT_COIL (1) +#define YAS532_MAG_STATE_MEASURE_OFFSET (2) +#define YAS532_MAG_INITCOIL_TIMEOUT (1000) +#define YAS532_MAG_NOTRANS_POSITION (3) +#define YAS532_DEFAULT_SENSOR_DELAY (50) +#define YAS532_DATA_OVERFLOW (8190) +#define YAS532_DATA_UNDERFLOW (0) +#define YAS532_MAG_LOG (20) +#define YAS532_MAG_TEMPERATURE_LOG (10) +#define YAS532_TEMP20DEGREE_TYPICAL (390) +#define YAS532_VERSION_AC_COEF_X (850) +#define YAS532_VERSION_AC_COEF_Y1 (750) +#define YAS532_VERSION_AC_COEF_Y2 (750) +#define YAS532_DATA_CENTER (4096) +/****************************************************/ +/**\name YAMAHA-YAS532 OFFSET DEFINITION */ +/***************************************************/ +static const s8 INVALID_OFFSET[] = {0x7f, 0x7f, 0x7f}; +#define set_vector(to, from) \ + {int _l; for (_l = 0; _l < 3; _l++) (to)[_l] = (from)[_l]; } +#define is_valid_offset(a) \ + (((a)[0] <= 31) && ((a)[1] <= 31) && ((a)[2] <= 31) \ + && (-31 <= (a)[0]) && (-31 <= (a)[1]) && (-31 <= (a)[2])) + +/**************************************************/ +/**\name YAS532 CALIB DATA DEFINITIONS */ +/*************************************************/ + + +/* register address of YAS532*/ +#define BMI160_YAS532_TESTR1 (0x88) +#define BMI160_YAS532_TESTR2 (0x89) +#define BMI160_YAS532_RCOIL (0x81) +#define BMI160_YAS532_COMMAND_REGISTER (0x82) +#define BMI160_YAS532_DATA_REGISTER (0xB0) +/* calib data register definition*/ +#define BMI160_YAS532_CALIB_CX (0x90) +#define BMI160_YAS532_CALIB_CY1 (0x91) +#define BMI160_YAS532_CALIB_CY2 (0x92) +#define BMI160_YAS532_CALIB1 (0x93) +#define BMI160_YAS532_CALIB2 (0x94) +#define BMI160_YAS532_CALIB3 (0x95) +#define BMI160_YAS532_CALIB4 (0x96) +#define BMI160_YAS532_CALIB5 (0x97) +#define BMI160_YAS532_CLAIB6 (0x98) +#define BMI160_YAS532_CALIB7 (0x99) +#define BMI160_YAS532_CALIB8 (0x9A) +#define BMI160_YAS532_CALIIB9 (0x9B) +#define BMI160_YAS532_CALIB10 (0x9C) +#define BMI160_YAS532_CALIB11 (0x9D) +/* offset definition */ +#define BMI160_YAS532_OFFSET_X (0x85) +#define BMI160_YAS532_OFFSET_Y (0x86) +#define BMI160_YAS532_OFFSET_Z (0x87) +/* data to write register for yas532*/ +#define BMI160_YAS532_WRITE_TESTR1 (0x00) +#define BMI160_YAS532_WRITE_TESTR2 (0x00) +#define BMI160_YAS532_WRITE_RCOIL (0x00) +/**************************************************/ +/**\name YAS537 DEFINITION */ +/*************************************************/ + +#define YAS537_SRSTR_DATA (0x02) +#define YAS537_WRITE_A_D_CONVERTER (0x03) +#define YAS537_WRITE_A_D_CONVERTER2 (0xF8) +#define YAS537_WRITE_FILTER (0x08) +#define YAS537_WRITE_CONFR (0x08) +#define YAS537_WRITE_TEMP_CALIB (0xFF) +#define YAS537_SET_COMMAND_REGISTER (0x01) + +/**************************************************/ +/**\name YAS537 REGISTER DEFINITION */ +/*************************************************/ +#define YAS537_REG_SRSTR (0x90) +#define YAS537_REG_CALR_C0 (0xC0) +#define YAS537_REG_CALR_C1 (0xC1) +#define YAS537_REG_CALR_C2 (0xC2) +#define YAS537_REG_CALR_C3 (0xC3) +#define YAS537_REG_CALR_C4 (0xC4) +#define YAS537_REG_CALR_C5 (0xC5) +#define YAS537_REG_CALR_C6 (0xC6) +#define YAS537_REG_CALR_C7 (0xC7) +#define YAS537_REG_CALR_C8 (0xC8) +#define YAS537_REG_CALR_C9 (0xC9) +#define YAS537_REG_CALR_CA (0xCA) +#define YAS537_REG_CALR_CB (0xCB) +#define YAS537_REG_CALR_CC (0xCC) +#define YAS537_REG_CALR_CD (0xCD) +#define YAS537_REG_CALR_CE (0xCE) +#define YAS537_REG_CALR_CF (0xCF) +#define YAS537_REG_CALR_DO (0xD0) +#define YAS537_REG_MTCR (0x93) +#define YAS537_REG_CONFR (0x82) +#define BMI160_REG_YAS537_CMDR (0x81) +#define YAS537_REG_OXR (0x84) +#define YAS537_REG_AVRR (0x87) +#define YAS537_REG_HCKR (0x88) +#define YAS537_REG_LCKR (0x89) +#define YAS537_REG_ADCCALR (0x91) +#define YAS537_REG_ADCCALR_ONE (0x92) +#define YAS537_REG_OCR (0x9E) +#define YAS537_REG_TRMR (0x9F) +#define YAS537_REG_TEMPERATURE_0 (0xB0) +#define YAS537_REG_TEMPERATURE_1 (0xB1) +#define YAS537_REG_DATA_X_0 (0xB2) +#define YAS537_REG_DATA_X_1 (0xB3) +#define YAS537_REG_DATA_Y1_0 (0xB4) +#define YAS537_REG_DATA_Y1_1 (0xB5) +#define YAS537_REG_DATA_Y2_0 (0xB6) +#define YAS537_REG_DATA_Y2_1 (0xB7) +#define YAS537_MAG_STATE_NORMAL (0) +#define YAS537_MAG_STATE_INIT_COIL (1) +#define YAS537_MAG_STATE_RECORD_DATA (2) +#define YAS537_DATA_UNDERFLOW (0) +#define YAS537_DATA_OVERFLOW (16383) +/****************************************************/ +/**\name YAS537_set vector */ +/***************************************************/ +#define yas537_set_vector(to, from) \ + {int _l; for (_l = 0; _l < 3; _l++) (to)[_l] = (from)[_l]; } + +#ifndef ABS +#define ABS(a) ((a) > 0 ? (a) : -(a)) /*!< Absolute value */ +#endif +/****************************************************/ +/**\name AKM09911 AND AKM09912 DEFINITION */ +/***************************************************/ +#define AKM09912_SENSITIVITY_DIV (256) +#define AKM09912_SENSITIVITY (128) +#define AKM09911_SENSITIVITY_DIV (128) +#define AKM_ASAX (0) +#define AKM_ASAY (1) +#define AKM_ASAZ (2) +#define AKM_POWER_DOWN_MODE_DATA (0x00) +#define AKM_FUSE_ROM_MODE (0x1F) +#define AKM_POWER_MODE_REG (0x31) +#define AKM_SINGLE_MEASUREMENT_MODE (0x01) +#define AKM_DATA_REGISTER (0x11) +/*! AKM09912 Register definition */ +#define AKM09912_CHIP_ID_REG (0x01) +/****************************************************/ +/**\name BMM150 DEFINITION */ +/***************************************************/ +#define BMI160_BMM150_SET_POWER_CONTROL (0x01) +#define BMI160_BMM150_MAX_RETRY_WAKEUP (5) +#define BMI160_BMM150_POWER_ON (0x01) +#define BMI160_BMM150_POWER_OFF (0x00) +#define BMI160_BMM150_FORCE_MODE (0x02) +#define BMI160_BMM150_POWER_ON_SUCCESS (0) +#define BMI160_BMM150_POWER_ON_FAIL ((s8)-1) + +#define BMI160_BMM150_DIG_X1 (0) +#define BMI160_BMM150_DIG_Y1 (1) +#define BMI160_BMM150_DIG_X2 (2) +#define BMI160_BMM150_DIG_Y3 (3) +#define BMI160_BMM150_DIG_XY1 (4) +#define BMI160_BMM150_DIG_XY2 (5) +#define BMI160_BMM150_DIG_Z1_LSB (6) +#define BMI160_BMM150_DIG_Z1_MSB (7) +#define BMI160_BMM150_DIG_Z2_LSB (8) +#define BMI160_BMM150_DIG_Z2_MSB (9) +#define BMI160_BMM150_DIG_DIG_Z3_LSB (10) +#define BMI160_BMM150_DIG_DIG_Z3_MSB (11) +#define BMI160_BMM150_DIG_DIG_Z4_LSB (12) +#define BMI160_BMM150_DIG_DIG_Z4_MSB (13) +#define BMI160_BMM150_DIG_DIG_XYZ1_LSB (14) +#define BMI160_BMM150_DIG_DIG_XYZ1_MSB (15) + +/**************************************************************/ +/**\name STRUCTURE DEFINITIONS */ +/**************************************************************/ +/*! +* @brief bmi160 structure +* This structure holds all relevant information about bmi160 +*/ +struct bmi160_t { +u8 chip_id;/**< chip id of BMI160 */ +u8 dev_addr;/**< device address of BMI160 */ +s8 mag_manual_enable;/**< used for check the mag manual/auto mode status */ +BMI160_WR_FUNC_PTR;/**< bus write function pointer */ +BMI160_RD_FUNC_PTR;/**< bus read function pointer */ +BMI160_BRD_FUNC_PTR;/**< burst write function pointer */ +void (*delay_msec)(BMI160_MDELAY_DATA_TYPE);/**< delay function pointer */ +}; +/*! + * @brief Structure containing bmm150 and akm09911 + * magnetometer values for x,y and + * z-axis in s16 + */ +struct bmi160_mag_t { +s16 x;/**< BMM150 and AKM09911 and AKM09912 X raw data*/ +s16 y;/**< BMM150 and AKM09911 and AKM09912 Y raw data*/ +s16 z;/**< BMM150 and AKM09911 and AKM09912 Z raw data*/ +}; +/*! + * @brief Structure containing bmm150 xyz data and temperature + */ +struct bmi160_mag_xyzr_t { +s16 x;/**< BMM150 X raw data*/ +s16 y;/**< BMM150 Y raw data*/ +s16 z;/** (0x00), Bit --> 0...7 */ +#define BMI160_USER_CHIP_ID__POS (0) +#define BMI160_USER_CHIP_ID__MSK (0xFF) +#define BMI160_USER_CHIP_ID__LEN (8) +#define BMI160_USER_CHIP_ID__REG (BMI160_USER_CHIP_ID_ADDR) +/**************************************************************/ +/**\name ERROR STATUS LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* Error Description - Reg Addr --> (0x02), Bit --> 0 */ +#define BMI160_USER_ERR_STAT__POS (0) +#define BMI160_USER_ERR_STAT__LEN (8) +#define BMI160_USER_ERR_STAT__MSK (0xFF) +#define BMI160_USER_ERR_STAT__REG (BMI160_USER_ERROR_ADDR) + +#define BMI160_USER_FATAL_ERR__POS (0) +#define BMI160_USER_FATAL_ERR__LEN (1) +#define BMI160_USER_FATAL_ERR__MSK (0x01) +#define BMI160_USER_FATAL_ERR__REG (BMI160_USER_ERROR_ADDR) + +/* Error Description - Reg Addr --> (0x02), Bit --> 1...4 */ +#define BMI160_USER_ERR_CODE__POS (1) +#define BMI160_USER_ERR_CODE__LEN (4) +#define BMI160_USER_ERR_CODE__MSK (0x1E) +#define BMI160_USER_ERR_CODE__REG (BMI160_USER_ERROR_ADDR) + +/* Error Description - Reg Addr --> (0x02), Bit --> 5 */ +#define BMI160_USER_I2C_FAIL_ERR__POS (5) +#define BMI160_USER_I2C_FAIL_ERR__LEN (1) +#define BMI160_USER_I2C_FAIL_ERR__MSK (0x20) +#define BMI160_USER_I2C_FAIL_ERR__REG (BMI160_USER_ERROR_ADDR) + +/* Error Description - Reg Addr --> (0x02), Bit --> 6 */ +#define BMI160_USER_DROP_CMD_ERR__POS (6) +#define BMI160_USER_DROP_CMD_ERR__LEN (1) +#define BMI160_USER_DROP_CMD_ERR__MSK (0x40) +#define BMI160_USER_DROP_CMD_ERR__REG (BMI160_USER_ERROR_ADDR) +/**************************************************************/ +/**\name MAG DATA READY LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* Error Description - Reg Addr --> (0x02), Bit --> 7 */ +#define BMI160_USER_MAG_DADA_RDY_ERR__POS (7) +#define BMI160_USER_MAG_DADA_RDY_ERR__LEN (1) +#define BMI160_USER_MAG_DADA_RDY_ERR__MSK (0x80) +#define BMI160_USER_MAG_DADA_RDY_ERR__REG (BMI160_USER_ERROR_ADDR) +/**************************************************************/ +/**\name MAG POWER MODE LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* PMU_Status Description of MAG - Reg Addr --> (0x03), Bit --> 1..0 */ +#define BMI160_USER_MAG_POWER_MODE_STAT__POS (0) +#define BMI160_USER_MAG_POWER_MODE_STAT__LEN (2) +#define BMI160_USER_MAG_POWER_MODE_STAT__MSK (0x03) +#define BMI160_USER_MAG_POWER_MODE_STAT__REG \ +(BMI160_USER_PMU_STAT_ADDR) +/**************************************************************/ +/**\name GYRO POWER MODE LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* PMU_Status Description of GYRO - Reg Addr --> (0x03), Bit --> 3...2 */ +#define BMI160_USER_GYRO_POWER_MODE_STAT__POS (2) +#define BMI160_USER_GYRO_POWER_MODE_STAT__LEN (2) +#define BMI160_USER_GYRO_POWER_MODE_STAT__MSK (0x0C) +#define BMI160_USER_GYRO_POWER_MODE_STAT__REG \ +(BMI160_USER_PMU_STAT_ADDR) +/**************************************************************/ +/**\name ACCEL POWER MODE LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* PMU_Status Description of ACCEL - Reg Addr --> (0x03), Bit --> 5...4 */ +#define BMI160_USER_ACCEL_POWER_MODE_STAT__POS (4) +#define BMI160_USER_ACCEL_POWER_MODE_STAT__LEN (2) +#define BMI160_USER_ACCEL_POWER_MODE_STAT__MSK (0x30) +#define BMI160_USER_ACCEL_POWER_MODE_STAT__REG \ +(BMI160_USER_PMU_STAT_ADDR) +/**************************************************************/ +/**\name MAG DATA XYZ LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* Mag_X(LSB) Description - Reg Addr --> (0x04), Bit --> 0...7 */ +#define BMI160_USER_DATA_0_MAG_X_LSB__POS (0) +#define BMI160_USER_DATA_0_MAG_X_LSB__LEN (8) +#define BMI160_USER_DATA_0_MAG_X_LSB__MSK (0xFF) +#define BMI160_USER_DATA_0_MAG_X_LSB__REG (BMI160_USER_DATA_0_ADDR) + +/* Mag_X(LSB) Description - Reg Addr --> (0x04), Bit --> 3...7 */ +#define BMI160_USER_DATA_MAG_X_LSB__POS (3) +#define BMI160_USER_DATA_MAG_X_LSB__LEN (5) +#define BMI160_USER_DATA_MAG_X_LSB__MSK (0xF8) +#define BMI160_USER_DATA_MAG_X_LSB__REG (BMI160_USER_DATA_0_ADDR) + +/* Mag_X(MSB) Description - Reg Addr --> (0x05), Bit --> 0...7 */ +#define BMI160_USER_DATA_1_MAG_X_MSB__POS (0) +#define BMI160_USER_DATA_1_MAG_X_MSB__LEN (8) +#define BMI160_USER_DATA_1_MAG_X_MSB__MSK (0xFF) +#define BMI160_USER_DATA_1_MAG_X_MSB__REG (BMI160_USER_DATA_1_ADDR) + +/* Mag_Y(LSB) Description - Reg Addr --> (0x06), Bit --> 0...7 */ +#define BMI160_USER_DATA_2_MAG_Y_LSB__POS (0) +#define BMI160_USER_DATA_2_MAG_Y_LSB__LEN (8) +#define BMI160_USER_DATA_2_MAG_Y_LSB__MSK (0xFF) +#define BMI160_USER_DATA_2_MAG_Y_LSB__REG (BMI160_USER_DATA_2_ADDR) + +/* Mag_Y(LSB) Description - Reg Addr --> (0x06), Bit --> 3...7 */ +#define BMI160_USER_DATA_MAG_Y_LSB__POS (3) +#define BMI160_USER_DATA_MAG_Y_LSB__LEN (5) +#define BMI160_USER_DATA_MAG_Y_LSB__MSK (0xF8) +#define BMI160_USER_DATA_MAG_Y_LSB__REG (BMI160_USER_DATA_2_ADDR) + +/* Mag_Y(MSB) Description - Reg Addr --> (0x07), Bit --> 0...7 */ +#define BMI160_USER_DATA_3_MAG_Y_MSB__POS (0) +#define BMI160_USER_DATA_3_MAG_Y_MSB__LEN (8) +#define BMI160_USER_DATA_3_MAG_Y_MSB__MSK (0xFF) +#define BMI160_USER_DATA_3_MAG_Y_MSB__REG (BMI160_USER_DATA_3_ADDR) + +/* Mag_Z(LSB) Description - Reg Addr --> (0x08), Bit --> 0...7 */ +#define BMI160_USER_DATA_4_MAG_Z_LSB__POS (0) +#define BMI160_USER_DATA_4_MAG_Z_LSB__LEN (8) +#define BMI160_USER_DATA_4_MAG_Z_LSB__MSK (0xFF) +#define BMI160_USER_DATA_4_MAG_Z_LSB__REG (BMI160_USER_DATA_4_ADDR) + +/* Mag_X(LSB) Description - Reg Addr --> (0x08), Bit --> 3...7 */ +#define BMI160_USER_DATA_MAG_Z_LSB__POS (1) +#define BMI160_USER_DATA_MAG_Z_LSB__LEN (7) +#define BMI160_USER_DATA_MAG_Z_LSB__MSK (0xFE) +#define BMI160_USER_DATA_MAG_Z_LSB__REG (BMI160_USER_DATA_4_ADDR) + +/* Mag_Z(MSB) Description - Reg Addr --> (0x09), Bit --> 0...7 */ +#define BMI160_USER_DATA_5_MAG_Z_MSB__POS (0) +#define BMI160_USER_DATA_5_MAG_Z_MSB__LEN (8) +#define BMI160_USER_DATA_5_MAG_Z_MSB__MSK (0xFF) +#define BMI160_USER_DATA_5_MAG_Z_MSB__REG (BMI160_USER_DATA_5_ADDR) + +/* RHALL(LSB) Description - Reg Addr --> (0x0A), Bit --> 0...7 */ +#define BMI160_USER_DATA_6_RHALL_LSB__POS (0) +#define BMI160_USER_DATA_6_RHALL_LSB__LEN (8) +#define BMI160_USER_DATA_6_RHALL_LSB__MSK (0xFF) +#define BMI160_USER_DATA_6_RHALL_LSB__REG (BMI160_USER_DATA_6_ADDR) + +/* Mag_R(LSB) Description - Reg Addr --> (0x0A), Bit --> 3...7 */ +#define BMI160_USER_DATA_MAG_R_LSB__POS (2) +#define BMI160_USER_DATA_MAG_R_LSB__LEN (6) +#define BMI160_USER_DATA_MAG_R_LSB__MSK (0xFC) +#define BMI160_USER_DATA_MAG_R_LSB__REG (BMI160_USER_DATA_6_ADDR) + +/* RHALL(MSB) Description - Reg Addr --> (0x0B), Bit --> 0...7 */ +#define BMI160_USER_DATA_7_RHALL_MSB__POS (0) +#define BMI160_USER_DATA_7_RHALL_MSB__LEN (8) +#define BMI160_USER_DATA_7_RHALL_MSB__MSK (0xFF) +#define BMI160_USER_DATA_7_RHALL_MSB__REG (BMI160_USER_DATA_7_ADDR) +/**************************************************************/ +/**\name GYRO DATA XYZ LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* GYR_X (LSB) Description - Reg Addr --> (0x0C), Bit --> 0...7 */ +#define BMI160_USER_DATA_8_GYRO_X_LSB__POS (0) +#define BMI160_USER_DATA_8_GYRO_X_LSB__LEN (8) +#define BMI160_USER_DATA_8_GYRO_X_LSB__MSK (0xFF) +#define BMI160_USER_DATA_8_GYRO_X_LSB__REG (BMI160_USER_DATA_8_ADDR) + +/* GYR_X (MSB) Description - Reg Addr --> (0x0D), Bit --> 0...7 */ +#define BMI160_USER_DATA_9_GYRO_X_MSB__POS (0) +#define BMI160_USER_DATA_9_GYRO_X_MSB__LEN (8) +#define BMI160_USER_DATA_9_GYRO_X_MSB__MSK (0xFF) +#define BMI160_USER_DATA_9_GYRO_X_MSB__REG (BMI160_USER_DATA_9_ADDR) + +/* GYR_Y (LSB) Description - Reg Addr --> 0x0E, Bit --> 0...7 */ +#define BMI160_USER_DATA_10_GYRO_Y_LSB__POS (0) +#define BMI160_USER_DATA_10_GYRO_Y_LSB__LEN (8) +#define BMI160_USER_DATA_10_GYRO_Y_LSB__MSK (0xFF) +#define BMI160_USER_DATA_10_GYRO_Y_LSB__REG (BMI160_USER_DATA_10_ADDR) + +/* GYR_Y (MSB) Description - Reg Addr --> (0x0F), Bit --> 0...7 */ +#define BMI160_USER_DATA_11_GYRO_Y_MSB__POS (0) +#define BMI160_USER_DATA_11_GYRO_Y_MSB__LEN (8) +#define BMI160_USER_DATA_11_GYRO_Y_MSB__MSK (0xFF) +#define BMI160_USER_DATA_11_GYRO_Y_MSB__REG (BMI160_USER_DATA_11_ADDR) + +/* GYR_Z (LSB) Description - Reg Addr --> (0x10), Bit --> 0...7 */ +#define BMI160_USER_DATA_12_GYRO_Z_LSB__POS (0) +#define BMI160_USER_DATA_12_GYRO_Z_LSB__LEN (8) +#define BMI160_USER_DATA_12_GYRO_Z_LSB__MSK (0xFF) +#define BMI160_USER_DATA_12_GYRO_Z_LSB__REG (BMI160_USER_DATA_12_ADDR) + +/* GYR_Z (MSB) Description - Reg Addr --> (0x11), Bit --> 0...7 */ +#define BMI160_USER_DATA_13_GYRO_Z_MSB__POS (0) +#define BMI160_USER_DATA_13_GYRO_Z_MSB__LEN (8) +#define BMI160_USER_DATA_13_GYRO_Z_MSB__MSK (0xFF) +#define BMI160_USER_DATA_13_GYRO_Z_MSB__REG (BMI160_USER_DATA_13_ADDR) +/**************************************************************/ +/**\name ACCEL DATA XYZ LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* ACC_X (LSB) Description - Reg Addr --> (0x12), Bit --> 0...7 */ +#define BMI160_USER_DATA_14_ACCEL_X_LSB__POS (0) +#define BMI160_USER_DATA_14_ACCEL_X_LSB__LEN (8) +#define BMI160_USER_DATA_14_ACCEL_X_LSB__MSK (0xFF) +#define BMI160_USER_DATA_14_ACCEL_X_LSB__REG (BMI160_USER_DATA_14_ADDR) + +/* ACC_X (MSB) Description - Reg Addr --> 0x13, Bit --> 0...7 */ +#define BMI160_USER_DATA_15_ACCEL_X_MSB__POS (0) +#define BMI160_USER_DATA_15_ACCEL_X_MSB__LEN (8) +#define BMI160_USER_DATA_15_ACCEL_X_MSB__MSK (0xFF) +#define BMI160_USER_DATA_15_ACCEL_X_MSB__REG (BMI160_USER_DATA_15_ADDR) + +/* ACC_Y (LSB) Description - Reg Addr --> (0x14), Bit --> 0...7 */ +#define BMI160_USER_DATA_16_ACCEL_Y_LSB__POS (0) +#define BMI160_USER_DATA_16_ACCEL_Y_LSB__LEN (8) +#define BMI160_USER_DATA_16_ACCEL_Y_LSB__MSK (0xFF) +#define BMI160_USER_DATA_16_ACCEL_Y_LSB__REG (BMI160_USER_DATA_16_ADDR) + +/* ACC_Y (MSB) Description - Reg Addr --> (0x15), Bit --> 0...7 */ +#define BMI160_USER_DATA_17_ACCEL_Y_MSB__POS (0) +#define BMI160_USER_DATA_17_ACCEL_Y_MSB__LEN (8) +#define BMI160_USER_DATA_17_ACCEL_Y_MSB__MSK (0xFF) +#define BMI160_USER_DATA_17_ACCEL_Y_MSB__REG (BMI160_USER_DATA_17_ADDR) + +/* ACC_Z (LSB) Description - Reg Addr --> 0x16, Bit --> 0...7 */ +#define BMI160_USER_DATA_18_ACCEL_Z_LSB__POS (0) +#define BMI160_USER_DATA_18_ACCEL_Z_LSB__LEN (8) +#define BMI160_USER_DATA_18_ACCEL_Z_LSB__MSK (0xFF) +#define BMI160_USER_DATA_18_ACCEL_Z_LSB__REG (BMI160_USER_DATA_18_ADDR) + +/* ACC_Z (MSB) Description - Reg Addr --> (0x17), Bit --> 0...7 */ +#define BMI160_USER_DATA_19_ACCEL_Z_MSB__POS (0) +#define BMI160_USER_DATA_19_ACCEL_Z_MSB__LEN (8) +#define BMI160_USER_DATA_19_ACCEL_Z_MSB__MSK (0xFF) +#define BMI160_USER_DATA_19_ACCEL_Z_MSB__REG (BMI160_USER_DATA_19_ADDR) +/**************************************************************/ +/**\name SENSOR TIME LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* SENSORTIME_0 (LSB) Description - Reg Addr --> (0x18), Bit --> 0...7 */ +#define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__POS (0) +#define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__LEN (8) +#define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__MSK (0xFF) +#define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__REG \ + (BMI160_USER_SENSORTIME_0_ADDR) + +/* SENSORTIME_1 (MSB) Description - Reg Addr --> (0x19), Bit --> 0...7 */ +#define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__POS (0) +#define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__LEN (8) +#define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__MSK (0xFF) +#define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__REG \ + (BMI160_USER_SENSORTIME_1_ADDR) + +/* SENSORTIME_2 (MSB) Description - Reg Addr --> (0x1A), Bit --> 0...7 */ +#define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__POS (0) +#define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__LEN (8) +#define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__MSK (0xFF) +#define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__REG \ + (BMI160_USER_SENSORTIME_2_ADDR) +/**************************************************************/ +/**\name GYRO SELF TEST LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* Status Description - Reg Addr --> 0x1B, Bit --> 1 */ +#define BMI160_USER_STAT_GYRO_SELFTEST_OK__POS (1) +#define BMI160_USER_STAT_GYRO_SELFTEST_OK__LEN (1) +#define BMI160_USER_STAT_GYRO_SELFTEST_OK__MSK (0x02) +#define BMI160_USER_STAT_GYRO_SELFTEST_OK__REG \ + (BMI160_USER_STAT_ADDR) +/**************************************************************/ +/**\name MAG MANUAL OPERATION LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* Status Description - Reg Addr --> 0x1B, Bit --> 2 */ +#define BMI160_USER_STAT_MAG_MANUAL_OPERATION__POS (2) +#define BMI160_USER_STAT_MAG_MANUAL_OPERATION__LEN (1) +#define BMI160_USER_STAT_MAG_MANUAL_OPERATION__MSK (0x04) +#define BMI160_USER_STAT_MAG_MANUAL_OPERATION__REG \ + (BMI160_USER_STAT_ADDR) +/**************************************************************/ +/**\name FOC STATUS LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* Status Description - Reg Addr --> 0x1B, Bit --> 3 */ +#define BMI160_USER_STAT_FOC_RDY__POS (3) +#define BMI160_USER_STAT_FOC_RDY__LEN (1) +#define BMI160_USER_STAT_FOC_RDY__MSK (0x08) +#define BMI160_USER_STAT_FOC_RDY__REG (BMI160_USER_STAT_ADDR) +/**************************************************************/ +/**\name NVM READY LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* Status Description - Reg Addr --> 0x1B, Bit --> 4 */ +#define BMI160_USER_STAT_NVM_RDY__POS (4) +#define BMI160_USER_STAT_NVM_RDY__LEN (1) +#define BMI160_USER_STAT_NVM_RDY__MSK (0x10) +#define BMI160_USER_STAT_NVM_RDY__REG (BMI160_USER_STAT_ADDR) +/**************************************************************/ +/**\name DATA READY LENGTH, POSITION AND MASK FOR ACCEL, MAG AND GYRO*/ +/**************************************************************/ +/* Status Description - Reg Addr --> 0x1B, Bit --> 5 */ +#define BMI160_USER_STAT_DATA_RDY_MAG__POS (5) +#define BMI160_USER_STAT_DATA_RDY_MAG__LEN (1) +#define BMI160_USER_STAT_DATA_RDY_MAG__MSK (0x20) +#define BMI160_USER_STAT_DATA_RDY_MAG__REG (BMI160_USER_STAT_ADDR) + +/* Status Description - Reg Addr --> 0x1B, Bit --> 6 */ +#define BMI160_USER_STAT_DATA_RDY_GYRO__POS (6) +#define BMI160_USER_STAT_DATA_RDY_GYRO__LEN (1) +#define BMI160_USER_STAT_DATA_RDY_GYRO__MSK (0x40) +#define BMI160_USER_STAT_DATA_RDY_GYRO__REG (BMI160_USER_STAT_ADDR) + +/* Status Description - Reg Addr --> 0x1B, Bit --> 7 */ +#define BMI160_USER_STAT_DATA_RDY_ACCEL__POS (7) +#define BMI160_USER_STAT_DATA_RDY_ACCEL__LEN (1) +#define BMI160_USER_STAT_DATA_RDY_ACCEL__MSK (0x80) +#define BMI160_USER_STAT_DATA_RDY_ACCEL__REG (BMI160_USER_STAT_ADDR) +/**************************************************************/ +/**\name INTERRUPT STATUS LENGTH, POSITION AND MASK */ +/**************************************************************/ +/* Int_Status_0 Description - Reg Addr --> 0x1C, Bit --> 0 */ +#define BMI160_USER_INTR_STAT_0_STEP_INTR__POS (0) +#define BMI160_USER_INTR_STAT_0_STEP_INTR__LEN (1) +#define BMI160_USER_INTR_STAT_0_STEP_INTR__MSK (0x01) +#define BMI160_USER_INTR_STAT_0_STEP_INTR__REG \ + (BMI160_USER_INTR_STAT_0_ADDR) +/**************************************************************/ +/**\name SIGNIFICANT INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_0 Description - Reg Addr --> 0x1C, Bit --> 1 */ +#define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__POS (1) +#define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__LEN (1) +#define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__MSK (0x02) +#define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__REG \ + (BMI160_USER_INTR_STAT_0_ADDR) +/**************************************************************/ +/**\name ANY_MOTION INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_0 Description - Reg Addr --> 0x1C, Bit --> 2 */ +#define BMI160_USER_INTR_STAT_0_ANY_MOTION__POS (2) +#define BMI160_USER_INTR_STAT_0_ANY_MOTION__LEN (1) +#define BMI160_USER_INTR_STAT_0_ANY_MOTION__MSK (0x04) +#define BMI160_USER_INTR_STAT_0_ANY_MOTION__REG \ + (BMI160_USER_INTR_STAT_0_ADDR) +/**************************************************************/ +/**\name PMU TRIGGER INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_0 Description - Reg Addr --> 0x1C, Bit --> 3 */ +#define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__POS 3 +#define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__LEN (1) +#define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__MSK (0x08) +#define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__REG \ + (BMI160_USER_INTR_STAT_0_ADDR) +/**************************************************************/ +/**\name DOUBLE TAP INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_0 Description - Reg Addr --> 0x1C, Bit --> 4 */ +#define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__POS 4 +#define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__LEN (1) +#define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__MSK (0x10) +#define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__REG \ + (BMI160_USER_INTR_STAT_0_ADDR) +/**************************************************************/ +/**\name SINGLE TAP INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_0 Description - Reg Addr --> 0x1C, Bit --> 5 */ +#define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__POS 5 +#define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__LEN (1) +#define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__MSK (0x20) +#define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__REG \ + (BMI160_USER_INTR_STAT_0_ADDR) +/**************************************************************/ +/**\name ORIENT INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_0 Description - Reg Addr --> 0x1C, Bit --> 6 */ +#define BMI160_USER_INTR_STAT_0_ORIENT__POS (6) +#define BMI160_USER_INTR_STAT_0_ORIENT__LEN (1) +#define BMI160_USER_INTR_STAT_0_ORIENT__MSK (0x40) +#define BMI160_USER_INTR_STAT_0_ORIENT__REG \ + (BMI160_USER_INTR_STAT_0_ADDR) +/**************************************************************/ +/**\name FLAT INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_0 Description - Reg Addr --> 0x1C, Bit --> 7 */ +#define BMI160_USER_INTR_STAT_0_FLAT__POS (7) +#define BMI160_USER_INTR_STAT_0_FLAT__LEN (1) +#define BMI160_USER_INTR_STAT_0_FLAT__MSK (0x80) +#define BMI160_USER_INTR_STAT_0_FLAT__REG \ + (BMI160_USER_INTR_STAT_0_ADDR) +/**************************************************************/ +/**\name HIGH_G INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_1 Description - Reg Addr --> 0x1D, Bit --> 2 */ +#define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__POS (2) +#define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__LEN (1) +#define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__MSK (0x04) +#define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__REG \ + (BMI160_USER_INTR_STAT_1_ADDR) +/**************************************************************/ +/**\name LOW_G INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_1 Description - Reg Addr --> 0x1D, Bit --> 3 */ +#define BMI160_USER_INTR_STAT_1_LOW_G_INTR__POS (3) +#define BMI160_USER_INTR_STAT_1_LOW_G_INTR__LEN (1) +#define BMI160_USER_INTR_STAT_1_LOW_G_INTR__MSK (0x08) +#define BMI160_USER_INTR_STAT_1_LOW_G_INTR__REG \ + (BMI160_USER_INTR_STAT_1_ADDR) +/**************************************************************/ +/**\name DATA READY INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_1 Description - Reg Addr --> 0x1D, Bit --> 4 */ +#define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__POS (4) +#define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__LEN (1) +#define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__MSK (0x10) +#define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__REG \ + (BMI160_USER_INTR_STAT_1_ADDR) +/**************************************************************/ +/**\name FIFO FULL INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_1 Description - Reg Addr --> 0x1D, Bit --> 5 */ +#define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__POS (5) +#define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__LEN (1) +#define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__MSK (0x20) +#define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__REG \ + (BMI160_USER_INTR_STAT_1_ADDR) +/**************************************************************/ +/**\name FIFO WATERMARK INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_1 Description - Reg Addr --> 0x1D, Bit --> 6 */ +#define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__POS (6) +#define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__LEN (1) +#define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__MSK (0x40) +#define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__REG \ + (BMI160_USER_INTR_STAT_1_ADDR) +/**************************************************************/ +/**\name NO MOTION INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_1 Description - Reg Addr --> 0x1D, Bit --> 7 */ +#define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__POS (7) +#define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__LEN (1) +#define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__MSK (0x80) +#define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__REG \ + (BMI160_USER_INTR_STAT_1_ADDR) +/**************************************************************/ +/**\name ANY MOTION-XYZ AXIS INTERRUPT STATUS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_2 Description - Reg Addr --> 0x1E, Bit --> 0 */ +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__POS (0) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__LEN (1) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__MSK (0x01) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__REG \ + (BMI160_USER_INTR_STAT_2_ADDR) + +/* Int_Status_2 Description - Reg Addr --> 0x1E, Bit --> 1 */ +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__POS (1) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__LEN (1) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__MSK (0x02) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__REG \ + (BMI160_USER_INTR_STAT_2_ADDR) + +/* Int_Status_2 Description - Reg Addr --> 0x1E, Bit --> 2 */ +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__POS (2) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__LEN (1) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__MSK (0x04) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__REG \ + (BMI160_USER_INTR_STAT_2_ADDR) +/**************************************************************/ +/**\name ANY MOTION SIGN LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_2 Description - Reg Addr --> 0x1E, Bit --> 3 */ +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__POS (3) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__LEN (1) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__MSK (0x08) +#define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__REG \ + (BMI160_USER_INTR_STAT_2_ADDR) +/**************************************************************/ +/**\name TAP_XYZ AND SIGN LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_2 Description - Reg Addr --> 0x1E, Bit --> 4 */ +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__POS (4) +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__LEN (1) +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__MSK (0x10) +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__REG \ + (BMI160_USER_INTR_STAT_2_ADDR) + +/* Int_Status_2 Description - Reg Addr --> 0x1E, Bit --> 5 */ +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__POS (5) +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__LEN (1) +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__MSK (0x20) +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__REG \ + (BMI160_USER_INTR_STAT_2_ADDR) + +/* Int_Status_2 Description - Reg Addr --> 0x1E, Bit --> 6 */ +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__POS (6) +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__LEN (1) +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__MSK (0x40) +#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__REG \ + (BMI160_USER_INTR_STAT_2_ADDR) + +/* Int_Status_2 Description - Reg Addr --> 0x1E, Bit --> 7 */ +#define BMI160_USER_INTR_STAT_2_TAP_SIGN__POS (7) +#define BMI160_USER_INTR_STAT_2_TAP_SIGN__LEN (1) +#define BMI160_USER_INTR_STAT_2_TAP_SIGN__MSK (0x80) +#define BMI160_USER_INTR_STAT_2_TAP_SIGN__REG \ + (BMI160_USER_INTR_STAT_2_ADDR) +/**************************************************************/ +/**\name INTERRUPT SATAUS FOR WHOLE 0x1E LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_2 Description - Reg Addr --> 0x1E, Bit --> 0...7 */ +#define BMI160_USER_INTR_STAT_2__POS (0) +#define BMI160_USER_INTR_STAT_2__LEN (8) +#define BMI160_USER_INTR_STAT_2__MSK (0xFF) +#define BMI160_USER_INTR_STAT_2__REG \ + (BMI160_USER_INTR_STAT_2_ADDR) +/**************************************************************/ +/**\name HIGH_G-XYZ AND SIGN LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_3 Description - Reg Addr --> (0x1F), Bit --> 0 */ +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__POS (0) +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__LEN (1) +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__MSK (0x01) +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__REG \ + (BMI160_USER_INTR_STAT_3_ADDR) + +/* Int_Status_3 Description - Reg Addr --> 0x1E, Bit --> 1 */ +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__POS (1) +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__LEN (1) +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__MSK (0x02) +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__REG \ + (BMI160_USER_INTR_STAT_3_ADDR) + +/* Int_Status_3 Description - Reg Addr --> (0x1F), Bit --> 2 */ +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__POS (2) +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__LEN (1) +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__MSK (0x04) +#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__REG \ + (BMI160_USER_INTR_STAT_3_ADDR) + +/* Int_Status_3 Description - Reg Addr --> (0x1F), Bit --> 3 */ +#define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__POS (3) +#define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__LEN (1) +#define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__MSK (0x08) +#define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__REG \ + (BMI160_USER_INTR_STAT_3_ADDR) +/**************************************************************/ +/**\name ORIENT XY and Z AXIS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_3 Description - Reg Addr --> (0x1F), Bit --> 4...5 */ +#define BMI160_USER_INTR_STAT_3_ORIENT_XY__POS (4) +#define BMI160_USER_INTR_STAT_3_ORIENT_XY__LEN (2) +#define BMI160_USER_INTR_STAT_3_ORIENT_XY__MSK (0x30) +#define BMI160_USER_INTR_STAT_3_ORIENT_XY__REG \ + (BMI160_USER_INTR_STAT_3_ADDR) + +/* Int_Status_3 Description - Reg Addr --> (0x1F), Bit --> 6 */ +#define BMI160_USER_INTR_STAT_3_ORIENT_Z__POS (6) +#define BMI160_USER_INTR_STAT_3_ORIENT_Z__LEN (1) +#define BMI160_USER_INTR_STAT_3_ORIENT_Z__MSK (0x40) +#define BMI160_USER_INTR_STAT_3_ORIENT_Z__REG \ + (BMI160_USER_INTR_STAT_3_ADDR) +/**************************************************************/ +/**\name FLAT LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_3 Description - Reg Addr --> (0x1F), Bit --> 7 */ +#define BMI160_USER_INTR_STAT_3_FLAT__POS (7) +#define BMI160_USER_INTR_STAT_3_FLAT__LEN (1) +#define BMI160_USER_INTR_STAT_3_FLAT__MSK (0x80) +#define BMI160_USER_INTR_STAT_3_FLAT__REG \ + (BMI160_USER_INTR_STAT_3_ADDR) +/**************************************************************/ +/**\name (0x1F) LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Status_3 Description - Reg Addr --> (0x1F), Bit --> 0...7 */ +#define BMI160_USER_INTR_STAT_3__POS (0) +#define BMI160_USER_INTR_STAT_3__LEN (8) +#define BMI160_USER_INTR_STAT_3__MSK (0xFF) +#define BMI160_USER_INTR_STAT_3__REG \ + (BMI160_USER_INTR_STAT_3_ADDR) +/**************************************************************/ +/**\name TEMPERATURE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Temperature Description - LSB Reg Addr --> (0x20), Bit --> 0...7 */ +#define BMI160_USER_TEMP_LSB_VALUE__POS (0) +#define BMI160_USER_TEMP_LSB_VALUE__LEN (8) +#define BMI160_USER_TEMP_LSB_VALUE__MSK (0xFF) +#define BMI160_USER_TEMP_LSB_VALUE__REG \ + (BMI160_USER_TEMPERATURE_0_ADDR) + +/* Temperature Description - LSB Reg Addr --> 0x21, Bit --> 0...7 */ +#define BMI160_USER_TEMP_MSB_VALUE__POS (0) +#define BMI160_USER_TEMP_MSB_VALUE__LEN (8) +#define BMI160_USER_TEMP_MSB_VALUE__MSK (0xFF) +#define BMI160_USER_TEMP_MSB_VALUE__REG \ + (BMI160_USER_TEMPERATURE_1_ADDR) +/**************************************************************/ +/**\name FIFO BYTE COUNTER LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_Length0 Description - Reg Addr --> 0x22, Bit --> 0...7 */ +#define BMI160_USER_FIFO_BYTE_COUNTER_LSB__POS (0) +#define BMI160_USER_FIFO_BYTE_COUNTER_LSB__LEN (8) +#define BMI160_USER_FIFO_BYTE_COUNTER_LSB__MSK (0xFF) +#define BMI160_USER_FIFO_BYTE_COUNTER_LSB__REG \ + (BMI160_USER_FIFO_LENGTH_0_ADDR) + +/*Fifo_Length1 Description - Reg Addr --> 0x23, Bit --> 0...2 */ +#define BMI160_USER_FIFO_BYTE_COUNTER_MSB__POS (0) +#define BMI160_USER_FIFO_BYTE_COUNTER_MSB__LEN 3 +#define BMI160_USER_FIFO_BYTE_COUNTER_MSB__MSK (0x07) +#define BMI160_USER_FIFO_BYTE_COUNTER_MSB__REG \ + (BMI160_USER_FIFO_LENGTH_1_ADDR) + +/**************************************************************/ +/**\name FIFO DATA LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_Data Description - Reg Addr --> 0x24, Bit --> 0...7 */ +#define BMI160_USER_FIFO_DATA__POS (0) +#define BMI160_USER_FIFO_DATA__LEN (8) +#define BMI160_USER_FIFO_DATA__MSK (0xFF) +#define BMI160_USER_FIFO_DATA__REG (BMI160_USER_FIFO_DATA_ADDR) + +/**************************************************************/ +/**\name ACCEL CONFIGURATION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Acc_Conf Description - Reg Addr --> (0x40), Bit --> 0...3 */ +#define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__POS (0) +#define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__LEN (4) +#define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__MSK (0x0F) +#define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__REG \ +(BMI160_USER_ACCEL_CONFIG_ADDR) + +/* Acc_Conf Description - Reg Addr --> (0x40), Bit --> 4...6 */ +#define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__POS (4) +#define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__LEN (3) +#define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__MSK (0x70) +#define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__REG (BMI160_USER_ACCEL_CONFIG_ADDR) + +/* Acc_Conf Description - Reg Addr --> (0x40), Bit --> 7 */ +#define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__POS (7) +#define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__LEN (1) +#define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__MSK (0x80) +#define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__REG \ +(BMI160_USER_ACCEL_CONFIG_ADDR) + +/* Acc_Range Description - Reg Addr --> 0x41, Bit --> 0...3 */ +#define BMI160_USER_ACCEL_RANGE__POS (0) +#define BMI160_USER_ACCEL_RANGE__LEN (4) +#define BMI160_USER_ACCEL_RANGE__MSK (0x0F) +#define BMI160_USER_ACCEL_RANGE__REG \ +(BMI160_USER_ACCEL_RANGE_ADDR) +/**************************************************************/ +/**\name GYRO CONFIGURATION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Gyro_Conf Description - Reg Addr --> (0x42), Bit --> 0...3 */ +#define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__POS (0) +#define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__LEN (4) +#define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__MSK (0x0F) +#define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__REG \ +(BMI160_USER_GYRO_CONFIG_ADDR) + +/* Gyro_Conf Description - Reg Addr --> (0x42), Bit --> 4...5 */ +#define BMI160_USER_GYRO_CONFIG_BW__POS (4) +#define BMI160_USER_GYRO_CONFIG_BW__LEN (2) +#define BMI160_USER_GYRO_CONFIG_BW__MSK (0x30) +#define BMI160_USER_GYRO_CONFIG_BW__REG \ +(BMI160_USER_GYRO_CONFIG_ADDR) + +/* Gyr_Range Description - Reg Addr --> 0x43, Bit --> 0...2 */ +#define BMI160_USER_GYRO_RANGE__POS (0) +#define BMI160_USER_GYRO_RANGE__LEN (3) +#define BMI160_USER_GYRO_RANGE__MSK (0x07) +#define BMI160_USER_GYRO_RANGE__REG (BMI160_USER_GYRO_RANGE_ADDR) +/**************************************************************/ +/**\name MAG CONFIGURATION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Mag_Conf Description - Reg Addr --> (0x44), Bit --> 0...3 */ +#define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__POS (0) +#define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__LEN (4) +#define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__MSK (0x0F) +#define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__REG \ +(BMI160_USER_MAG_CONFIG_ADDR) +/**************************************************************/ +/**\name FIFO DOWNS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_Downs Description - Reg Addr --> 0x45, Bit --> 0...2 */ +#define BMI160_USER_FIFO_DOWN_GYRO__POS (0) +#define BMI160_USER_FIFO_DOWN_GYRO__LEN (3) +#define BMI160_USER_FIFO_DOWN_GYRO__MSK (0x07) +#define BMI160_USER_FIFO_DOWN_GYRO__REG (BMI160_USER_FIFO_DOWN_ADDR) +/**************************************************************/ +/**\name FIFO FILTER FOR ACCEL AND GYRO LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_filt Description - Reg Addr --> 0x45, Bit --> 3 */ +#define BMI160_USER_FIFO_FILTER_GYRO__POS (3) +#define BMI160_USER_FIFO_FILTER_GYRO__LEN (1) +#define BMI160_USER_FIFO_FILTER_GYRO__MSK (0x08) +#define BMI160_USER_FIFO_FILTER_GYRO__REG (BMI160_USER_FIFO_DOWN_ADDR) + +/* Fifo_Downs Description - Reg Addr --> 0x45, Bit --> 4...6 */ +#define BMI160_USER_FIFO_DOWN_ACCEL__POS (4) +#define BMI160_USER_FIFO_DOWN_ACCEL__LEN (3) +#define BMI160_USER_FIFO_DOWN_ACCEL__MSK (0x70) +#define BMI160_USER_FIFO_DOWN_ACCEL__REG (BMI160_USER_FIFO_DOWN_ADDR) + +/* Fifo_FILT Description - Reg Addr --> 0x45, Bit --> 7 */ +#define BMI160_USER_FIFO_FILTER_ACCEL__POS (7) +#define BMI160_USER_FIFO_FILTER_ACCEL__LEN (1) +#define BMI160_USER_FIFO_FILTER_ACCEL__MSK (0x80) +#define BMI160_USER_FIFO_FILTER_ACCEL__REG (BMI160_USER_FIFO_DOWN_ADDR) +/**************************************************************/ +/**\name FIFO WATER MARK LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_Config_0 Description - Reg Addr --> 0x46, Bit --> 0...7 */ +#define BMI160_USER_FIFO_WM__POS (0) +#define BMI160_USER_FIFO_WM__LEN (8) +#define BMI160_USER_FIFO_WM__MSK (0xFF) +#define BMI160_USER_FIFO_WM__REG (BMI160_USER_FIFO_CONFIG_0_ADDR) +/**************************************************************/ +/**\name FIFO TIME LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_Config_1 Description - Reg Addr --> 0x47, Bit --> 1 */ +#define BMI160_USER_FIFO_TIME_ENABLE__POS (1) +#define BMI160_USER_FIFO_TIME_ENABLE__LEN (1) +#define BMI160_USER_FIFO_TIME_ENABLE__MSK (0x02) +#define BMI160_USER_FIFO_TIME_ENABLE__REG (BMI160_USER_FIFO_CONFIG_1_ADDR) +/**************************************************************/ +/**\name FIFO TAG INTERRUPT LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_Config_1 Description - Reg Addr --> 0x47, Bit --> 2 */ +#define BMI160_USER_FIFO_TAG_INTR2_ENABLE__POS (2) +#define BMI160_USER_FIFO_TAG_INTR2_ENABLE__LEN (1) +#define BMI160_USER_FIFO_TAG_INTR2_ENABLE__MSK (0x04) +#define BMI160_USER_FIFO_TAG_INTR2_ENABLE__REG (BMI160_USER_FIFO_CONFIG_1_ADDR) + +/* Fifo_Config_1 Description - Reg Addr --> 0x47, Bit --> 3 */ +#define BMI160_USER_FIFO_TAG_INTR1_ENABLE__POS (3) +#define BMI160_USER_FIFO_TAG_INTR1_ENABLE__LEN (1) +#define BMI160_USER_FIFO_TAG_INTR1_ENABLE__MSK (0x08) +#define BMI160_USER_FIFO_TAG_INTR1_ENABLE__REG (BMI160_USER_FIFO_CONFIG_1_ADDR) +/**************************************************************/ +/**\name FIFO HEADER LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_Config_1 Description - Reg Addr --> 0x47, Bit --> 4 */ +#define BMI160_USER_FIFO_HEADER_ENABLE__POS (4) +#define BMI160_USER_FIFO_HEADER_ENABLE__LEN (1) +#define BMI160_USER_FIFO_HEADER_ENABLE__MSK (0x10) +#define BMI160_USER_FIFO_HEADER_ENABLE__REG \ +(BMI160_USER_FIFO_CONFIG_1_ADDR) +/**************************************************************/ +/**\name FIFO MAG ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_Config_1 Description - Reg Addr --> 0x47, Bit --> 5 */ +#define BMI160_USER_FIFO_MAG_ENABLE__POS (5) +#define BMI160_USER_FIFO_MAG_ENABLE__LEN (1) +#define BMI160_USER_FIFO_MAG_ENABLE__MSK (0x20) +#define BMI160_USER_FIFO_MAG_ENABLE__REG \ +(BMI160_USER_FIFO_CONFIG_1_ADDR) +/**************************************************************/ +/**\name FIFO ACCEL ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_Config_1 Description - Reg Addr --> 0x47, Bit --> 6 */ +#define BMI160_USER_FIFO_ACCEL_ENABLE__POS (6) +#define BMI160_USER_FIFO_ACCEL_ENABLE__LEN (1) +#define BMI160_USER_FIFO_ACCEL_ENABLE__MSK (0x40) +#define BMI160_USER_FIFO_ACCEL_ENABLE__REG \ +(BMI160_USER_FIFO_CONFIG_1_ADDR) +/**************************************************************/ +/**\name FIFO GYRO ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Fifo_Config_1 Description - Reg Addr --> 0x47, Bit --> 7 */ +#define BMI160_USER_FIFO_GYRO_ENABLE__POS (7) +#define BMI160_USER_FIFO_GYRO_ENABLE__LEN (1) +#define BMI160_USER_FIFO_GYRO_ENABLE__MSK (0x80) +#define BMI160_USER_FIFO_GYRO_ENABLE__REG \ +(BMI160_USER_FIFO_CONFIG_1_ADDR) + +/**************************************************************/ +/**\name MAG I2C ADDRESS SELECTION LENGTH, POSITION AND MASK*/ +/**************************************************************/ + +/* Mag_IF_0 Description - Reg Addr --> 0x4b, Bit --> 1...7 */ +#define BMI160_USER_I2C_DEVICE_ADDR__POS (1) +#define BMI160_USER_I2C_DEVICE_ADDR__LEN (7) +#define BMI160_USER_I2C_DEVICE_ADDR__MSK (0xFE) +#define BMI160_USER_I2C_DEVICE_ADDR__REG (BMI160_USER_MAG_IF_0_ADDR) +/**************************************************************/ +/**\name MAG CONFIGURATION FOR SECONDARY + INTERFACE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Mag_IF_1 Description - Reg Addr --> 0x4c, Bit --> 0...1 */ +#define BMI160_USER_MAG_BURST__POS (0) +#define BMI160_USER_MAG_BURST__LEN (2) +#define BMI160_USER_MAG_BURST__MSK (0x03) +#define BMI160_USER_MAG_BURST__REG (BMI160_USER_MAG_IF_1_ADDR) + +/* Mag_IF_1 Description - Reg Addr --> 0x4c, Bit --> 2...5 */ +#define BMI160_USER_MAG_OFFSET__POS (2) +#define BMI160_USER_MAG_OFFSET__LEN (4) +#define BMI160_USER_MAG_OFFSET__MSK (0x3C) +#define BMI160_USER_MAG_OFFSET__REG (BMI160_USER_MAG_IF_1_ADDR) + +/* Mag_IF_1 Description - Reg Addr --> 0x4c, Bit --> 7 */ +#define BMI160_USER_MAG_MANUAL_ENABLE__POS (7) +#define BMI160_USER_MAG_MANUAL_ENABLE__LEN (1) +#define BMI160_USER_MAG_MANUAL_ENABLE__MSK (0x80) +#define BMI160_USER_MAG_MANUAL_ENABLE__REG \ +(BMI160_USER_MAG_IF_1_ADDR) + +/* Mag_IF_2 Description - Reg Addr --> 0x4d, Bit -->0... 7 */ +#define BMI160_USER_READ_ADDR__POS (0) +#define BMI160_USER_READ_ADDR__LEN (8) +#define BMI160_USER_READ_ADDR__MSK (0xFF) +#define BMI160_USER_READ_ADDR__REG (BMI160_USER_MAG_IF_2_ADDR) + +/* Mag_IF_3 Description - Reg Addr --> 0x4e, Bit -->0... 7 */ +#define BMI160_USER_WRITE_ADDR__POS (0) +#define BMI160_USER_WRITE_ADDR__LEN (8) +#define BMI160_USER_WRITE_ADDR__MSK (0xFF) +#define BMI160_USER_WRITE_ADDR__REG (BMI160_USER_MAG_IF_3_ADDR) + +/* Mag_IF_4 Description - Reg Addr --> 0x4f, Bit -->0... 7 */ +#define BMI160_USER_WRITE_DATA__POS (0) +#define BMI160_USER_WRITE_DATA__LEN (8) +#define BMI160_USER_WRITE_DATA__MSK (0xFF) +#define BMI160_USER_WRITE_DATA__REG (BMI160_USER_MAG_IF_4_ADDR) +/**************************************************************/ +/**\name ANY MOTION XYZ AXIS ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_0 Description - Reg Addr --> 0x50, Bit -->0 */ +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__POS (0) +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__MSK (0x01) +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_0_ADDR) + +/* Int_En_0 Description - Reg Addr --> 0x50, Bit -->1 */ +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__POS (1) +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__MSK (0x02) +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_0_ADDR) + +/* Int_En_0 Description - Reg Addr --> 0x50, Bit -->2 */ +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__POS (2) +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__MSK (0x04) +#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_0_ADDR) +/**************************************************************/ +/**\name DOUBLE TAP ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_0 Description - Reg Addr --> 0x50, Bit -->4 */ +#define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__POS (4) +#define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__MSK (0x10) +#define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_0_ADDR) +/**************************************************************/ +/**\name SINGLE TAP ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_0 Description - Reg Addr --> 0x50, Bit -->5 */ +#define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__POS (5) +#define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__MSK (0x20) +#define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_0_ADDR) +/**************************************************************/ +/**\name ORIENT ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_0 Description - Reg Addr --> 0x50, Bit -->6 */ +#define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__POS (6) +#define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__MSK (0x40) +#define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_0_ADDR) +/**************************************************************/ +/**\name FLAT ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_0 Description - Reg Addr --> 0x50, Bit -->7 */ +#define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__POS (7) +#define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__MSK (0x80) +#define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_0_ADDR) +/**************************************************************/ +/**\name HIGH_G XYZ ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_1 Description - Reg Addr --> (0x51), Bit -->0 */ +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__POS (0) +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__MSK (0x01) +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_1_ADDR) + +/* Int_En_1 Description - Reg Addr --> (0x51), Bit -->1 */ +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__POS (1) +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__MSK (0x02) +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_1_ADDR) + +/* Int_En_1 Description - Reg Addr --> (0x51), Bit -->2 */ +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__POS (2) +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__MSK (0x04) +#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_1_ADDR) +/**************************************************************/ +/**\name LOW_G ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_1 Description - Reg Addr --> (0x51), Bit -->3 */ +#define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__POS (3) +#define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__MSK (0x08) +#define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_1_ADDR) +/**************************************************************/ +/**\name DATA READY ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_1 Description - Reg Addr --> (0x51), Bit -->4 */ +#define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__POS (4) +#define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__MSK (0x10) +#define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_1_ADDR) +/**************************************************************/ +/**\name FIFO FULL AND WATER MARK ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_1 Description - Reg Addr --> (0x51), Bit -->5 */ +#define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__POS (5) +#define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__MSK (0x20) +#define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_1_ADDR) + +/* Int_En_1 Description - Reg Addr --> (0x51), Bit -->6 */ +#define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__POS (6) +#define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__MSK (0x40) +#define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_1_ADDR) +/**************************************************************/ +/**\name NO MOTION XYZ ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_2 Description - Reg Addr --> (0x52), Bit -->0 */ +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__POS (0) +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__MSK (0x01) +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_2_ADDR) + +/* Int_En_2 Description - Reg Addr --> (0x52), Bit -->1 */ +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__POS (1) +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__MSK (0x02) +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_2_ADDR) + +/* Int_En_2 Description - Reg Addr --> (0x52), Bit -->2 */ +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__POS (2) +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__MSK (0x04) +#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_2_ADDR) +/**************************************************************/ +/**\name STEP DETECTOR ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_En_2 Description - Reg Addr --> (0x52), Bit -->3 */ +#define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__POS (3) +#define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__LEN (1) +#define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__MSK (0x08) +#define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__REG \ +(BMI160_USER_INTR_ENABLE_2_ADDR) +/**************************************************************/ +/**\name EDGE CONTROL ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Out_Ctrl Description - Reg Addr --> 0x53, Bit -->0 */ +#define BMI160_USER_INTR1_EDGE_CTRL__POS (0) +#define BMI160_USER_INTR1_EDGE_CTRL__LEN (1) +#define BMI160_USER_INTR1_EDGE_CTRL__MSK (0x01) +#define BMI160_USER_INTR1_EDGE_CTRL__REG \ +(BMI160_USER_INTR_OUT_CTRL_ADDR) +/**************************************************************/ +/**\name LEVEL CONTROL ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Out_Ctrl Description - Reg Addr --> 0x53, Bit -->1 */ +#define BMI160_USER_INTR1_LEVEL__POS (1) +#define BMI160_USER_INTR1_LEVEL__LEN (1) +#define BMI160_USER_INTR1_LEVEL__MSK (0x02) +#define BMI160_USER_INTR1_LEVEL__REG \ +(BMI160_USER_INTR_OUT_CTRL_ADDR) +/**************************************************************/ +/**\name OUTPUT TYPE ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Out_Ctrl Description - Reg Addr --> 0x53, Bit -->2 */ +#define BMI160_USER_INTR1_OUTPUT_TYPE__POS (2) +#define BMI160_USER_INTR1_OUTPUT_TYPE__LEN (1) +#define BMI160_USER_INTR1_OUTPUT_TYPE__MSK (0x04) +#define BMI160_USER_INTR1_OUTPUT_TYPE__REG \ +(BMI160_USER_INTR_OUT_CTRL_ADDR) +/**************************************************************/ +/**\name OUTPUT TYPE ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Out_Ctrl Description - Reg Addr --> 0x53, Bit -->3 */ +#define BMI160_USER_INTR1_OUTPUT_ENABLE__POS (3) +#define BMI160_USER_INTR1_OUTPUT_ENABLE__LEN (1) +#define BMI160_USER_INTR1_OUTPUT_ENABLE__MSK (0x08) +#define BMI160_USER_INTR1_OUTPUT_ENABLE__REG \ +(BMI160_USER_INTR_OUT_CTRL_ADDR) +/**************************************************************/ +/**\name EDGE CONTROL ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Out_Ctrl Description - Reg Addr --> 0x53, Bit -->4 */ +#define BMI160_USER_INTR2_EDGE_CTRL__POS (4) +#define BMI160_USER_INTR2_EDGE_CTRL__LEN (1) +#define BMI160_USER_INTR2_EDGE_CTRL__MSK (0x10) +#define BMI160_USER_INTR2_EDGE_CTRL__REG \ +(BMI160_USER_INTR_OUT_CTRL_ADDR) +/**************************************************************/ +/**\name LEVEL CONTROL ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Out_Ctrl Description - Reg Addr --> 0x53, Bit -->5 */ +#define BMI160_USER_INTR2_LEVEL__POS (5) +#define BMI160_USER_INTR2_LEVEL__LEN (1) +#define BMI160_USER_INTR2_LEVEL__MSK (0x20) +#define BMI160_USER_INTR2_LEVEL__REG \ +(BMI160_USER_INTR_OUT_CTRL_ADDR) +/**************************************************************/ +/**\name OUTPUT TYPE ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Out_Ctrl Description - Reg Addr --> 0x53, Bit -->6 */ +#define BMI160_USER_INTR2_OUTPUT_TYPE__POS (6) +#define BMI160_USER_INTR2_OUTPUT_TYPE__LEN (1) +#define BMI160_USER_INTR2_OUTPUT_TYPE__MSK (0x40) +#define BMI160_USER_INTR2_OUTPUT_TYPE__REG \ +(BMI160_USER_INTR_OUT_CTRL_ADDR) + +/* Int_Out_Ctrl Description - Reg Addr --> 0x53, Bit -->7 */ +#define BMI160_USER_INTR2_OUTPUT_EN__POS (7) +#define BMI160_USER_INTR2_OUTPUT_EN__LEN (1) +#define BMI160_USER_INTR2_OUTPUT_EN__MSK (0x80) +#define BMI160_USER_INTR2_OUTPUT_EN__REG \ +(BMI160_USER_INTR_OUT_CTRL_ADDR) +/**************************************************************/ +/**\name LATCH INTERRUPT LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Latch Description - Reg Addr --> 0x54, Bit -->0...3 */ +#define BMI160_USER_INTR_LATCH__POS (0) +#define BMI160_USER_INTR_LATCH__LEN (4) +#define BMI160_USER_INTR_LATCH__MSK (0x0F) +#define BMI160_USER_INTR_LATCH__REG (BMI160_USER_INTR_LATCH_ADDR) +/**************************************************************/ +/**\name INPUT ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Latch Description - Reg Addr --> 0x54, Bit -->4 */ +#define BMI160_USER_INTR1_INPUT_ENABLE__POS (4) +#define BMI160_USER_INTR1_INPUT_ENABLE__LEN (1) +#define BMI160_USER_INTR1_INPUT_ENABLE__MSK (0x10) +#define BMI160_USER_INTR1_INPUT_ENABLE__REG \ +(BMI160_USER_INTR_LATCH_ADDR) + +/* Int_Latch Description - Reg Addr --> 0x54, Bit -->5*/ +#define BMI160_USER_INTR2_INPUT_ENABLE__POS (5) +#define BMI160_USER_INTR2_INPUT_ENABLE__LEN (1) +#define BMI160_USER_INTR2_INPUT_ENABLE__MSK (0x20) +#define BMI160_USER_INTR2_INPUT_ENABLE__REG \ +(BMI160_USER_INTR_LATCH_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF LOW_G LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_0 Description - Reg Addr --> 0x55, Bit -->0 */ +#define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__POS (0) +#define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__LEN (1) +#define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__MSK (0x01) +#define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__REG (BMI160_USER_INTR_MAP_0_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF HIGH_G LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_0 Description - Reg Addr --> 0x55, Bit -->1 */ +#define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__POS (1) +#define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__LEN (1) +#define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__MSK (0x02) +#define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__REG \ +(BMI160_USER_INTR_MAP_0_ADDR) +/**************************************************************/ +/**\name INTERRUPT MAPPIONG OF ANY MOTION_G LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_0 Description - Reg Addr --> 0x55, Bit -->2 */ +#define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__POS (2) +#define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__LEN (1) +#define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__MSK (0x04) +#define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__REG \ +(BMI160_USER_INTR_MAP_0_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF NO MOTION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_0 Description - Reg Addr --> 0x55, Bit -->3 */ +#define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__POS (3) +#define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__LEN (1) +#define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__MSK (0x08) +#define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__REG (BMI160_USER_INTR_MAP_0_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF DOUBLE TAP LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_0 Description - Reg Addr --> 0x55, Bit -->4 */ +#define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__POS (4) +#define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__LEN (1) +#define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__MSK (0x10) +#define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__REG \ +(BMI160_USER_INTR_MAP_0_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF SINGLE TAP LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_0 Description - Reg Addr --> 0x55, Bit -->5 */ +#define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__POS (5) +#define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__LEN (1) +#define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__MSK (0x20) +#define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__REG \ +(BMI160_USER_INTR_MAP_0_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF ORIENT LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_0 Description - Reg Addr --> 0x55, Bit -->6 */ +#define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__POS (6) +#define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__LEN (1) +#define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__MSK (0x40) +#define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__REG \ +(BMI160_USER_INTR_MAP_0_ADDR) +/**************************************************************/ +/**\name INTERRUPT MAPPIONG OF FLAT LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_0 Description - Reg Addr --> 0x56, Bit -->7 */ +#define BMI160_USER_INTR_MAP_0_INTR1_FLAT__POS (7) +#define BMI160_USER_INTR_MAP_0_INTR1_FLAT__LEN (1) +#define BMI160_USER_INTR_MAP_0_INTR1_FLAT__MSK (0x80) +#define BMI160_USER_INTR_MAP_0_INTR1_FLAT__REG (BMI160_USER_INTR_MAP_0_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF PMU TRIGGER LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_1 Description - Reg Addr --> 0x56, Bit -->0 */ +#define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__POS (0) +#define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__LEN (1) +#define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__MSK (0x01) +#define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__REG (BMI160_USER_INTR_MAP_1_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF FIFO FULL AND + WATER MARK LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_1 Description - Reg Addr --> 0x56, Bit -->1 */ +#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__POS (1) +#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__LEN (1) +#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__MSK (0x02) +#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__REG \ +(BMI160_USER_INTR_MAP_1_ADDR) + +/* Int_Map_1 Description - Reg Addr --> 0x56, Bit -->2 */ +#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__POS (2) +#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__LEN (1) +#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__MSK (0x04) +#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__REG \ +(BMI160_USER_INTR_MAP_1_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF DATA READY LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_1 Description - Reg Addr --> 0x56, Bit -->3 */ +#define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__POS (3) +#define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__LEN (1) +#define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__MSK (0x08) +#define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__REG \ +(BMI160_USER_INTR_MAP_1_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF PMU TRIGGER LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_1 Description - Reg Addr --> 0x56, Bit -->4 */ +#define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__POS (4) +#define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__LEN (1) +#define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__MSK (0x10) +#define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__REG (BMI160_USER_INTR_MAP_1_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF FIFO FULL AND + WATER MARK LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_1 Description - Reg Addr --> 0x56, Bit -->5 */ +#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__POS (5) +#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__LEN (1) +#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__MSK (0x20) +#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__REG \ +(BMI160_USER_INTR_MAP_1_ADDR) + +/* Int_Map_1 Description - Reg Addr --> 0x56, Bit -->6 */ +#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__POS (6) +#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__LEN (1) +#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__MSK (0x40) +#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__REG \ +(BMI160_USER_INTR_MAP_1_ADDR) +/**************************************************************/ +/**\name INTERRUPT1 MAPPIONG OF DATA READY LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_1 Description - Reg Addr --> 0x56, Bit -->7 */ +#define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__POS (7) +#define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__LEN (1) +#define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__MSK (0x80) +#define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__REG \ +(BMI160_USER_INTR_MAP_1_ADDR) +/**************************************************************/ +/**\name INTERRUPT2 MAPPIONG OF LOW_G LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_2 Description - Reg Addr --> 0x57, Bit -->0 */ +#define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__POS (0) +#define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__LEN (1) +#define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__MSK (0x01) +#define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__REG (BMI160_USER_INTR_MAP_2_ADDR) +/**************************************************************/ +/**\name INTERRUPT2 MAPPIONG OF HIGH_G LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_2 Description - Reg Addr --> 0x57, Bit -->1 */ +#define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__POS (1) +#define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__LEN (1) +#define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__MSK (0x02) +#define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__REG \ +(BMI160_USER_INTR_MAP_2_ADDR) +/**************************************************************/ +/**\name INTERRUPT2 MAPPIONG OF ANY MOTION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_2 Description - Reg Addr --> 0x57, Bit -->2 */ +#define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__POS (2) +#define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__LEN (1) +#define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__MSK (0x04) +#define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__REG \ +(BMI160_USER_INTR_MAP_2_ADDR) +/**************************************************************/ +/**\name INTERRUPT2 MAPPIONG OF NO MOTION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_2 Description - Reg Addr --> 0x57, Bit -->3 */ +#define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__POS (3) +#define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__LEN (1) +#define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__MSK (0x08) +#define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__REG (BMI160_USER_INTR_MAP_2_ADDR) +/**************************************************************/ +/**\name INTERRUPT2 MAPPIONG OF DOUBLE TAP LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_2 Description - Reg Addr --> 0x57, Bit -->4 */ +#define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__POS (4) +#define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__LEN (1) +#define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__MSK (0x10) +#define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__REG \ +(BMI160_USER_INTR_MAP_2_ADDR) +/**************************************************************/ +/**\name INTERRUPT2 MAPPIONG OF SINGLE TAP LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_2 Description - Reg Addr --> 0x57, Bit -->5 */ +#define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__POS (5) +#define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__LEN (1) +#define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__MSK (0x20) +#define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__REG \ +(BMI160_USER_INTR_MAP_2_ADDR) +/**************************************************************/ +/**\name INTERRUPT2 MAPPIONG OF ORIENT LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_2 Description - Reg Addr --> 0x57, Bit -->6 */ +#define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__POS (6) +#define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__LEN (1) +#define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__MSK (0x40) +#define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__REG \ +(BMI160_USER_INTR_MAP_2_ADDR) +/**************************************************************/ +/**\name INTERRUPT2 MAPPIONG OF FLAT LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Map_2 Description - Reg Addr --> 0x57, Bit -->7 */ +#define BMI160_USER_INTR_MAP_2_INTR2_FLAT__POS (7) +#define BMI160_USER_INTR_MAP_2_INTR2_FLAT__LEN (1) +#define BMI160_USER_INTR_MAP_2_INTR2_FLAT__MSK (0x80) +#define BMI160_USER_INTR_MAP_2_INTR2_FLAT__REG (BMI160_USER_INTR_MAP_2_ADDR) + +/**************************************************************/ +/**\name TAP SOURCE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Data_0 Description - Reg Addr --> 0x58, Bit --> 3 */ +#define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__POS (3) +#define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__LEN (1) +#define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__MSK (0x08) +#define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__REG \ +(BMI160_USER_INTR_DATA_0_ADDR) + +/**************************************************************/ +/**\name HIGH SOURCE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Data_0 Description - Reg Addr --> 0x58, Bit --> 7 */ +#define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__POS (7) +#define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__LEN (1) +#define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__MSK (0x80) +#define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__REG \ +(BMI160_USER_INTR_DATA_0_ADDR) + +/**************************************************************/ +/**\name MOTION SOURCE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Data_1 Description - Reg Addr --> 0x59, Bit --> 7 */ +#define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__POS (7) +#define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__LEN (1) +#define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__MSK (0x80) +#define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__REG \ + (BMI160_USER_INTR_DATA_1_ADDR) +/**************************************************************/ +/**\name LOW HIGH DURATION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_LowHigh_0 Description - Reg Addr --> 0x5a, Bit --> 0...7 */ +#define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__POS (0) +#define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__LEN (8) +#define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__MSK (0xFF) +#define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__REG \ + (BMI160_USER_INTR_LOWHIGH_0_ADDR) +/**************************************************************/ +/**\name LOW THRESHOLD LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_LowHigh_1 Description - Reg Addr --> 0x5b, Bit --> 0...7 */ +#define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__POS (0) +#define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__LEN (8) +#define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__MSK (0xFF) +#define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__REG \ + (BMI160_USER_INTR_LOWHIGH_1_ADDR) +/**************************************************************/ +/**\name LOW HYSTERESIS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_LowHigh_2 Description - Reg Addr --> 0x5c, Bit --> 0...1 */ +#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__POS (0) +#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__LEN (2) +#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__MSK (0x03) +#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__REG \ + (BMI160_USER_INTR_LOWHIGH_2_ADDR) +/**************************************************************/ +/**\name LOW MODE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_LowHigh_2 Description - Reg Addr --> 0x5c, Bit --> 2 */ +#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__POS (2) +#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__LEN (1) +#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__MSK (0x04) +#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__REG \ + (BMI160_USER_INTR_LOWHIGH_2_ADDR) +/**************************************************************/ +/**\name HIGH_G HYSTERESIS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_LowHigh_2 Description - Reg Addr --> 0x5c, Bit --> 6...7 */ +#define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__POS (6) +#define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__LEN (2) +#define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__MSK (0xC0) +#define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__REG \ + (BMI160_USER_INTR_LOWHIGH_2_ADDR) +/**************************************************************/ +/**\name HIGH_G DURATION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_LowHigh_3 Description - Reg Addr --> 0x5d, Bit --> 0...7 */ +#define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__POS (0) +#define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__LEN (8) +#define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__MSK (0xFF) +#define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__REG \ + (BMI160_USER_INTR_LOWHIGH_3_ADDR) +/**************************************************************/ +/**\name HIGH_G THRESHOLD LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_LowHigh_4 Description - Reg Addr --> 0x5e, Bit --> 0...7 */ +#define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__POS (0) +#define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__LEN (8) +#define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__MSK (0xFF) +#define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__REG \ + (BMI160_USER_INTR_LOWHIGH_4_ADDR) +/**************************************************************/ +/**\name ANY MOTION DURATION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Motion_0 Description - Reg Addr --> 0x5f, Bit --> 0...1 */ +#define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__POS (0) +#define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__LEN (2) +#define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__MSK (0x03) +#define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__REG \ + (BMI160_USER_INTR_MOTION_0_ADDR) +/**************************************************************/ +/**\name SLOW/NO MOTION DURATION LENGTH, POSITION AND MASK*/ +/**************************************************************/ + /* Int_Motion_0 Description - Reg Addr --> 0x5f, Bit --> 2...7 */ +#define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__POS (2) +#define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__LEN (6) +#define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__MSK (0xFC) +#define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__REG \ + (BMI160_USER_INTR_MOTION_0_ADDR) +/**************************************************************/ +/**\name ANY MOTION THRESHOLD LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Motion_1 Description - Reg Addr --> (0x60), Bit --> 0...7 */ +#define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__POS (0) +#define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__LEN (8) +#define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__MSK (0xFF) +#define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__REG \ + (BMI160_USER_INTR_MOTION_1_ADDR) +/**************************************************************/ +/**\name SLOW/NO MOTION THRESHOLD LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Motion_2 Description - Reg Addr --> 0x61, Bit --> 0...7 */ +#define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__POS (0) +#define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__LEN (8) +#define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__MSK (0xFF) +#define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__REG \ + (BMI160_USER_INTR_MOTION_2_ADDR) +/**************************************************************/ +/**\name SLOW/NO MOTION SELECT LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Motion_3 Description - Reg Addr --> (0x62), Bit --> 0 */ +#define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__POS (0) +#define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__LEN (1) +#define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__MSK (0x01) +#define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__REG \ +(BMI160_USER_INTR_MOTION_3_ADDR) +/**************************************************************/ +/**\name SIGNIFICANT MOTION SELECT LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Motion_3 Description - Reg Addr --> (0x62), Bit --> 1 */ +#define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__POS (1) +#define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__LEN (1) +#define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__MSK (0x02) +#define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__REG \ + (BMI160_USER_INTR_MOTION_3_ADDR) + +/* Int_Motion_3 Description - Reg Addr --> (0x62), Bit --> 3..2 */ +#define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__POS (2) +#define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__LEN (2) +#define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__MSK (0x0C) +#define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__REG \ + (BMI160_USER_INTR_MOTION_3_ADDR) + +/* Int_Motion_3 Description - Reg Addr --> (0x62), Bit --> 5..4 */ +#define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__POS (4) +#define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__LEN (2) +#define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__MSK (0x30) +#define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__REG \ + (BMI160_USER_INTR_MOTION_3_ADDR) +/**************************************************************/ +/**\name TAP DURATION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* INT_TAP_0 Description - Reg Addr --> (0x63), Bit --> 0..2*/ +#define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__POS (0) +#define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__LEN (3) +#define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__MSK (0x07) +#define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__REG \ +(BMI160_USER_INTR_TAP_0_ADDR) +/**************************************************************/ +/**\name TAP SHOCK LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Tap_0 Description - Reg Addr --> (0x63), Bit --> 6 */ +#define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__POS (6) +#define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__LEN (1) +#define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__MSK (0x40) +#define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__REG (BMI160_USER_INTR_TAP_0_ADDR) +/**************************************************************/ +/**\name TAP QUIET LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Tap_0 Description - Reg Addr --> (0x63), Bit --> 7 */ +#define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__POS (7) +#define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__LEN (1) +#define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__MSK (0x80) +#define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__REG (BMI160_USER_INTR_TAP_0_ADDR) +/**************************************************************/ +/**\name TAP THRESHOLD LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Tap_1 Description - Reg Addr --> (0x64), Bit --> 0...4 */ +#define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__POS (0) +#define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__LEN (5) +#define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__MSK (0x1F) +#define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__REG (BMI160_USER_INTR_TAP_1_ADDR) +/**************************************************************/ +/**\name ORIENT MODE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Orient_0 Description - Reg Addr --> (0x65), Bit --> 0...1 */ +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__POS (0) +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__LEN (2) +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__MSK (0x03) +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__REG \ + (BMI160_USER_INTR_ORIENT_0_ADDR) +/**************************************************************/ +/**\name ORIENT BLOCKING LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Orient_0 Description - Reg Addr --> (0x65), Bit --> 2...3 */ +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__POS (2) +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__LEN (2) +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__MSK (0x0C) +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__REG \ + (BMI160_USER_INTR_ORIENT_0_ADDR) +/**************************************************************/ +/**\name ORIENT HYSTERESIS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Orient_0 Description - Reg Addr --> (0x65), Bit --> 4...7 */ +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__POS (4) +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__LEN (4) +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__MSK (0xF0) +#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__REG \ + (BMI160_USER_INTR_ORIENT_0_ADDR) +/**************************************************************/ +/**\name ORIENT THETA LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Orient_1 Description - Reg Addr --> 0x66, Bit --> 0...5 */ +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__POS (0) +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__LEN (6) +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__MSK (0x3F) +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__REG \ + (BMI160_USER_INTR_ORIENT_1_ADDR) +/**************************************************************/ +/**\name ORIENT UD LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Orient_1 Description - Reg Addr --> 0x66, Bit --> 6 */ +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__POS (6) +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__LEN (1) +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__MSK (0x40) +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__REG \ + (BMI160_USER_INTR_ORIENT_1_ADDR) +/**************************************************************/ +/**\name ORIENT AXIS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Orient_1 Description - Reg Addr --> 0x66, Bit --> 7 */ +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__POS (7) +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__LEN (1) +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__MSK (0x80) +#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__REG \ + (BMI160_USER_INTR_ORIENT_1_ADDR) +/**************************************************************/ +/**\name FLAT THETA LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Flat_0 Description - Reg Addr --> 0x67, Bit --> 0...5 */ +#define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__POS (0) +#define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__LEN (6) +#define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__MSK (0x3F) +#define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__REG \ + (BMI160_USER_INTR_FLAT_0_ADDR) +/**************************************************************/ +/**\name FLAT HYSTERESIS LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Flat_1 Description - Reg Addr --> (0x68), Bit --> 0...3 */ +#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__POS (0) +#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__LEN (4) +#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__MSK (0x0F) +#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__REG \ +(BMI160_USER_INTR_FLAT_1_ADDR) +/**************************************************************/ +/**\name FLAT HOLD LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Int_Flat_1 Description - Reg Addr --> (0x68), Bit --> 4...5 */ +#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__POS (4) +#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__LEN (2) +#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__MSK (0x30) +#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__REG \ +(BMI160_USER_INTR_FLAT_1_ADDR) +/**************************************************************/ +/**\name FOC ACCEL XYZ LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Foc_Conf Description - Reg Addr --> (0x69), Bit --> 0...1 */ +#define BMI160_USER_FOC_ACCEL_Z__POS (0) +#define BMI160_USER_FOC_ACCEL_Z__LEN (2) +#define BMI160_USER_FOC_ACCEL_Z__MSK (0x03) +#define BMI160_USER_FOC_ACCEL_Z__REG (BMI160_USER_FOC_CONFIG_ADDR) + +/* Foc_Conf Description - Reg Addr --> (0x69), Bit --> 2...3 */ +#define BMI160_USER_FOC_ACCEL_Y__POS (2) +#define BMI160_USER_FOC_ACCEL_Y__LEN (2) +#define BMI160_USER_FOC_ACCEL_Y__MSK (0x0C) +#define BMI160_USER_FOC_ACCEL_Y__REG (BMI160_USER_FOC_CONFIG_ADDR) + +/* Foc_Conf Description - Reg Addr --> (0x69), Bit --> 4...5 */ +#define BMI160_USER_FOC_ACCEL_X__POS (4) +#define BMI160_USER_FOC_ACCEL_X__LEN (2) +#define BMI160_USER_FOC_ACCEL_X__MSK (0x30) +#define BMI160_USER_FOC_ACCEL_X__REG (BMI160_USER_FOC_CONFIG_ADDR) +/**************************************************************/ +/**\name FOC GYRO LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Foc_Conf Description - Reg Addr --> (0x69), Bit --> 6 */ +#define BMI160_USER_FOC_GYRO_ENABLE__POS (6) +#define BMI160_USER_FOC_GYRO_ENABLE__LEN (1) +#define BMI160_USER_FOC_GYRO_ENABLE__MSK (0x40) +#define BMI160_USER_FOC_GYRO_ENABLE__REG \ +(BMI160_USER_FOC_CONFIG_ADDR) +/**************************************************************/ +/**\name NVM PROGRAM LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* CONF Description - Reg Addr --> (0x6A), Bit --> 1 */ +#define BMI160_USER_CONFIG_NVM_PROG_ENABLE__POS (1) +#define BMI160_USER_CONFIG_NVM_PROG_ENABLE__LEN (1) +#define BMI160_USER_CONFIG_NVM_PROG_ENABLE__MSK (0x02) +#define BMI160_USER_CONFIG_NVM_PROG_ENABLE__REG \ +(BMI160_USER_CONFIG_ADDR) + +/*IF_CONF Description - Reg Addr --> (0x6B), Bit --> 0 */ + +#define BMI160_USER_IF_CONFIG_SPI3__POS (0) +#define BMI160_USER_IF_CONFIG_SPI3__LEN (1) +#define BMI160_USER_IF_CONFIG_SPI3__MSK (0x01) +#define BMI160_USER_IF_CONFIG_SPI3__REG \ +(BMI160_USER_IF_CONFIG_ADDR) + +/*IF_CONF Description - Reg Addr --> (0x6B), Bit --> 5..4 */ +#define BMI160_USER_IF_CONFIG_IF_MODE__POS (4) +#define BMI160_USER_IF_CONFIG_IF_MODE__LEN (2) +#define BMI160_USER_IF_CONFIG_IF_MODE__MSK (0x30) +#define BMI160_USER_IF_CONFIG_IF_MODE__REG \ +(BMI160_USER_IF_CONFIG_ADDR) +/**************************************************************/ +/**\name GYRO SLEEP CONFIGURATION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Pmu_Trigger Description - Reg Addr --> 0x6c, Bit --> 0...2 */ +#define BMI160_USER_GYRO_SLEEP_TRIGGER__POS (0) +#define BMI160_USER_GYRO_SLEEP_TRIGGER__LEN (3) +#define BMI160_USER_GYRO_SLEEP_TRIGGER__MSK (0x07) +#define BMI160_USER_GYRO_SLEEP_TRIGGER__REG (BMI160_USER_PMU_TRIGGER_ADDR) + +/* Pmu_Trigger Description - Reg Addr --> 0x6c, Bit --> 3...4 */ +#define BMI160_USER_GYRO_WAKEUP_TRIGGER__POS (3) +#define BMI160_USER_GYRO_WAKEUP_TRIGGER__LEN (2) +#define BMI160_USER_GYRO_WAKEUP_TRIGGER__MSK (0x18) +#define BMI160_USER_GYRO_WAKEUP_TRIGGER__REG (BMI160_USER_PMU_TRIGGER_ADDR) + +/* Pmu_Trigger Description - Reg Addr --> 0x6c, Bit --> 5 */ +#define BMI160_USER_GYRO_SLEEP_STATE__POS (5) +#define BMI160_USER_GYRO_SLEEP_STATE__LEN (1) +#define BMI160_USER_GYRO_SLEEP_STATE__MSK (0x20) +#define BMI160_USER_GYRO_SLEEP_STATE__REG (BMI160_USER_PMU_TRIGGER_ADDR) + +/* Pmu_Trigger Description - Reg Addr --> 0x6c, Bit --> 6 */ +#define BMI160_USER_GYRO_WAKEUP_INTR__POS (6) +#define BMI160_USER_GYRO_WAKEUP_INTR__LEN (1) +#define BMI160_USER_GYRO_WAKEUP_INTR__MSK (0x40) +#define BMI160_USER_GYRO_WAKEUP_INTR__REG (BMI160_USER_PMU_TRIGGER_ADDR) +/**************************************************************/ +/**\name ACCEL SELF TEST LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Self_Test Description - Reg Addr --> 0x6d, Bit --> 0...1 */ +#define BMI160_USER_ACCEL_SELFTEST_AXIS__POS (0) +#define BMI160_USER_ACCEL_SELFTEST_AXIS__LEN (2) +#define BMI160_USER_ACCEL_SELFTEST_AXIS__MSK (0x03) +#define BMI160_USER_ACCEL_SELFTEST_AXIS__REG (BMI160_USER_SELF_TEST_ADDR) + +/* Self_Test Description - Reg Addr --> 0x6d, Bit --> 2 */ +#define BMI160_USER_ACCEL_SELFTEST_SIGN__POS (2) +#define BMI160_USER_ACCEL_SELFTEST_SIGN__LEN (1) +#define BMI160_USER_ACCEL_SELFTEST_SIGN__MSK (0x04) +#define BMI160_USER_ACCEL_SELFTEST_SIGN__REG (BMI160_USER_SELF_TEST_ADDR) + +/* Self_Test Description - Reg Addr --> 0x6d, Bit --> 3 */ +#define BMI160_USER_SELFTEST_AMP__POS (3) +#define BMI160_USER_SELFTEST_AMP__LEN (1) +#define BMI160_USER_SELFTEST_AMP__MSK (0x08) +#define BMI160_USER_SELFTEST_AMP__REG (BMI160_USER_SELF_TEST_ADDR) +/**************************************************************/ +/**\name GYRO SELF TEST LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Self_Test Description - Reg Addr --> 0x6d, Bit --> 4 */ +#define BMI160_USER_GYRO_SELFTEST_START__POS (4) +#define BMI160_USER_GYRO_SELFTEST_START__LEN (1) +#define BMI160_USER_GYRO_SELFTEST_START__MSK (0x10) +#define BMI160_USER_GYRO_SELFTEST_START__REG \ +(BMI160_USER_SELF_TEST_ADDR) +/**************************************************************/ +/**\name NV_CONFIG LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* NV_CONF Description - Reg Addr --> (0x70), Bit --> 0 */ +#define BMI160_USER_NV_CONFIG_SPI_ENABLE__POS (0) +#define BMI160_USER_NV_CONFIG_SPI_ENABLE__LEN (1) +#define BMI160_USER_NV_CONFIG_SPI_ENABLE__MSK (0x01) +#define BMI160_USER_NV_CONFIG_SPI_ENABLE__REG (BMI160_USER_NV_CONFIG_ADDR) + +/*IF_CONF Description - Reg Addr --> (0x70), Bit --> 1 */ +#define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__POS (1) +#define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__LEN (1) +#define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__MSK (0x02) +#define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__REG \ +(BMI160_USER_NV_CONFIG_ADDR) + +/*IF_CONF Description - Reg Addr --> (0x70), Bit --> 2 */ +#define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__POS (2) +#define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__LEN (1) +#define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__MSK (0x04) +#define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__REG \ +(BMI160_USER_NV_CONFIG_ADDR) + +/* NV_CONF Description - Reg Addr --> (0x70), Bit --> 3 */ +#define BMI160_USER_NV_CONFIG_SPARE0__POS (3) +#define BMI160_USER_NV_CONFIG_SPARE0__LEN (1) +#define BMI160_USER_NV_CONFIG_SPARE0__MSK (0x08) +#define BMI160_USER_NV_CONFIG_SPARE0__REG (BMI160_USER_NV_CONFIG_ADDR) + +/* NV_CONF Description - Reg Addr --> (0x70), Bit --> 4...7 */ +#define BMI160_USER_NV_CONFIG_NVM_COUNTER__POS (4) +#define BMI160_USER_NV_CONFIG_NVM_COUNTER__LEN (4) +#define BMI160_USER_NV_CONFIG_NVM_COUNTER__MSK (0xF0) +#define BMI160_USER_NV_CONFIG_NVM_COUNTER__REG (BMI160_USER_NV_CONFIG_ADDR) +/**************************************************************/ +/**\name ACCEL MANUAL OFFSET LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Offset_0 Description - Reg Addr --> (0x71), Bit --> 0...7 */ +#define BMI160_USER_OFFSET_0_ACCEL_OFF_X__POS (0) +#define BMI160_USER_OFFSET_0_ACCEL_OFF_X__LEN (8) +#define BMI160_USER_OFFSET_0_ACCEL_OFF_X__MSK (0xFF) +#define BMI160_USER_OFFSET_0_ACCEL_OFF_X__REG (BMI160_USER_OFFSET_0_ADDR) + +/* Offset_1 Description - Reg Addr --> 0x72, Bit --> 0...7 */ +#define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__POS (0) +#define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__LEN (8) +#define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__MSK (0xFF) +#define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__REG (BMI160_USER_OFFSET_1_ADDR) + +/* Offset_2 Description - Reg Addr --> 0x73, Bit --> 0...7 */ +#define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__POS (0) +#define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__LEN (8) +#define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__MSK (0xFF) +#define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__REG (BMI160_USER_OFFSET_2_ADDR) +/**************************************************************/ +/**\name GYRO MANUAL OFFSET LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Offset_3 Description - Reg Addr --> 0x74, Bit --> 0...7 */ +#define BMI160_USER_OFFSET_3_GYRO_OFF_X__POS (0) +#define BMI160_USER_OFFSET_3_GYRO_OFF_X__LEN (8) +#define BMI160_USER_OFFSET_3_GYRO_OFF_X__MSK (0xFF) +#define BMI160_USER_OFFSET_3_GYRO_OFF_X__REG (BMI160_USER_OFFSET_3_ADDR) + +/* Offset_4 Description - Reg Addr --> 0x75, Bit --> 0...7 */ +#define BMI160_USER_OFFSET_4_GYRO_OFF_Y__POS (0) +#define BMI160_USER_OFFSET_4_GYRO_OFF_Y__LEN (8) +#define BMI160_USER_OFFSET_4_GYRO_OFF_Y__MSK (0xFF) +#define BMI160_USER_OFFSET_4_GYRO_OFF_Y__REG (BMI160_USER_OFFSET_4_ADDR) + +/* Offset_5 Description - Reg Addr --> 0x76, Bit --> 0...7 */ +#define BMI160_USER_OFFSET_5_GYRO_OFF_Z__POS (0) +#define BMI160_USER_OFFSET_5_GYRO_OFF_Z__LEN (8) +#define BMI160_USER_OFFSET_5_GYRO_OFF_Z__MSK (0xFF) +#define BMI160_USER_OFFSET_5_GYRO_OFF_Z__REG (BMI160_USER_OFFSET_5_ADDR) + + +/* Offset_6 Description - Reg Addr --> 0x77, Bit --> 0..1 */ +#define BMI160_USER_OFFSET_6_GYRO_OFF_X__POS (0) +#define BMI160_USER_OFFSET_6_GYRO_OFF_X__LEN (2) +#define BMI160_USER_OFFSET_6_GYRO_OFF_X__MSK (0x03) +#define BMI160_USER_OFFSET_6_GYRO_OFF_X__REG (BMI160_USER_OFFSET_6_ADDR) + +/* Offset_6 Description - Reg Addr --> 0x77, Bit --> 2...3 */ +#define BMI160_USER_OFFSET_6_GYRO_OFF_Y__POS (2) +#define BMI160_USER_OFFSET_6_GYRO_OFF_Y__LEN (2) +#define BMI160_USER_OFFSET_6_GYRO_OFF_Y__MSK (0x0C) +#define BMI160_USER_OFFSET_6_GYRO_OFF_Y__REG (BMI160_USER_OFFSET_6_ADDR) + +/* Offset_6 Description - Reg Addr --> 0x77, Bit --> 4...5 */ +#define BMI160_USER_OFFSET_6_GYRO_OFF_Z__POS (4) +#define BMI160_USER_OFFSET_6_GYRO_OFF_Z__LEN (2) +#define BMI160_USER_OFFSET_6_GYRO_OFF_Z__MSK (0x30) +#define BMI160_USER_OFFSET_6_GYRO_OFF_Z__REG (BMI160_USER_OFFSET_6_ADDR) +/**************************************************************/ +/**\name ACCEL OFFSET ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Offset_6 Description - Reg Addr --> 0x77, Bit --> 6 */ +#define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__POS (6) +#define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__LEN (1) +#define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__MSK (0x40) +#define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__REG \ +(BMI160_USER_OFFSET_6_ADDR) +/**************************************************************/ +/**\name GYRO OFFSET ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Offset_6 Description - Reg Addr --> 0x77, Bit --> 7 */ +#define BMI160_USER_OFFSET_6_GYRO_OFF_EN__POS (7) +#define BMI160_USER_OFFSET_6_GYRO_OFF_EN__LEN (1) +#define BMI160_USER_OFFSET_6_GYRO_OFF_EN__MSK (0x80) +#define BMI160_USER_OFFSET_6_GYRO_OFF_EN__REG (BMI160_USER_OFFSET_6_ADDR) +/**************************************************************/ +/**\name STEP COUNTER LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* STEP_CNT_0 Description - Reg Addr --> 0x78, Bit --> 0 to 7 */ +#define BMI160_USER_STEP_COUNT_LSB__POS (0) +#define BMI160_USER_STEP_COUNT_LSB__LEN (7) +#define BMI160_USER_STEP_COUNT_LSB__MSK (0xFF) +#define BMI160_USER_STEP_COUNT_LSB__REG (BMI160_USER_STEP_COUNT_0_ADDR) + +/* STEP_CNT_1 Description - Reg Addr --> 0x79, Bit --> 0 to 7 */ +#define BMI160_USER_STEP_COUNT_MSB__POS (0) +#define BMI160_USER_STEP_COUNT_MSB__LEN (7) +#define BMI160_USER_STEP_COUNT_MSB__MSK (0xFF) +#define BMI160_USER_STEP_COUNT_MSB__REG (BMI160_USER_STEP_COUNT_1_ADDR) +/**************************************************************/ +/**\name STEP COUNTER CONFIGURATION LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* STEP_CONFIG_0 Description - Reg Addr --> 0x7A, Bit --> 0 to 7 */ +#define BMI160_USER_STEP_CONFIG_ZERO__POS (0) +#define BMI160_USER_STEP_CONFIG_ZERO__LEN (7) +#define BMI160_USER_STEP_CONFIG_ZERO__MSK (0xFF) +#define BMI160_USER_STEP_CONFIG_ZERO__REG \ +(BMI160_USER_STEP_CONFIG_0_ADDR) + + +/* STEP_CONFIG_1 Description - Reg Addr --> 0x7B, Bit --> 0 to 2 and +4 to 7 */ +#define BMI160_USER_STEP_CONFIG_ONE_CNF1__POS (0) +#define BMI160_USER_STEP_CONFIG_ONE_CNF1__LEN (3) +#define BMI160_USER_STEP_CONFIG_ONE_CNF1__MSK (0x07) +#define BMI160_USER_STEP_CONFIG_ONE_CNF1__REG \ +(BMI160_USER_STEP_CONFIG_1_ADDR) + +#define BMI160_USER_STEP_CONFIG_ONE_CNF2__POS (4) +#define BMI160_USER_STEP_CONFIG_ONE_CNF2__LEN (4) +#define BMI160_USER_STEP_CONFIG_ONE_CNF2__MSK (0xF0) +#define BMI160_USER_STEP_CONFIG_ONE_CNF2__REG \ +(BMI160_USER_STEP_CONFIG_1_ADDR) +/**************************************************************/ +/**\name STEP COUNTER ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* STEP_CONFIG_1 Description - Reg Addr --> 0x7B, Bit --> 0 to 2 */ +#define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__POS (3) +#define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__LEN (1) +#define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__MSK (0x08) +#define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__REG \ +(BMI160_USER_STEP_CONFIG_1_ADDR) + +/* USER REGISTERS DEFINITION END */ +/**************************************************************************/ +/* CMD REGISTERS DEFINITION START */ +/**************************************************************/ +/**\name COMMAND REGISTER LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Command description address - Reg Addr --> 0x7E, Bit --> 0....7 */ +#define BMI160_CMD_COMMANDS__POS (0) +#define BMI160_CMD_COMMANDS__LEN (8) +#define BMI160_CMD_COMMANDS__MSK (0xFF) +#define BMI160_CMD_COMMANDS__REG (BMI160_CMD_COMMANDS_ADDR) +/**************************************************************/ +/**\name PAGE ENABLE LENGTH, POSITION AND MASK*/ +/**************************************************************/ +/* Target page address - Reg Addr --> 0x7F, Bit --> 4....5 */ +#define BMI160_CMD_TARGET_PAGE__POS (4) +#define BMI160_CMD_TARGET_PAGE__LEN (2) +#define BMI160_CMD_TARGET_PAGE__MSK (0x30) +#define BMI160_CMD_TARGET_PAGE__REG (BMI160_CMD_EXT_MODE_ADDR) + +/* Target page address - Reg Addr --> 0x7F, Bit --> 4....5 */ +#define BMI160_CMD_PAGING_EN__POS (7) +#define BMI160_CMD_PAGING_EN__LEN (1) +#define BMI160_CMD_PAGING_EN__MSK (0x80) +#define BMI160_CMD_PAGING_EN__REG (BMI160_CMD_EXT_MODE_ADDR) + +/* Target page address - Reg Addr --> 0x7F, Bit --> 4....5 */ +#define BMI160_COM_C_TRIM_FIVE__POS (0) +#define BMI160_COM_C_TRIM_FIVE__LEN (8) +#define BMI160_COM_C_TRIM_FIVE__MSK (0xFF) +#define BMI160_COM_C_TRIM_FIVE__REG (BMI160_COM_C_TRIM_FIVE_ADDR) + +/**************************************************************************/ +/* CMD REGISTERS DEFINITION END */ + +/**************************************************/ +/**\name FIFO FRAME COUNT DEFINITION */ +/*************************************************/ +#define FIFO_FRAME (1024) +#define FIFO_CONFIG_CHECK1 (0x00) +#define FIFO_CONFIG_CHECK2 (0x80) +/**************************************************/ +/**\name MAG SENSOR SELECT */ +/*************************************************/ +#define BST_BMM (0) +#define BST_AKM (1) +#define BMI160_YAS537_I2C_ADDRESS (0x2E) +/**************************************************/ +/**\name ACCEL RANGE */ +/*************************************************/ +#define BMI160_ACCEL_RANGE_2G (0X03) +#define BMI160_ACCEL_RANGE_4G (0X05) +#define BMI160_ACCEL_RANGE_8G (0X08) +#define BMI160_ACCEL_RANGE_16G (0X0C) +/**************************************************/ +/**\name ACCEL ODR */ +/*************************************************/ +#define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED (0x00) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_0_78HZ (0x01) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_1_56HZ (0x02) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_3_12HZ (0x03) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_6_25HZ (0x04) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_12_5HZ (0x05) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_25HZ (0x06) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_50HZ (0x07) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_100HZ (0x08) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_200HZ (0x09) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_400HZ (0x0A) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_800HZ (0x0B) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_1600HZ (0x0C) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED0 (0x0D) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED1 (0x0E) +#define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED2 (0x0F) +/**************************************************/ +/**\name ACCEL BANDWIDTH PARAMETER */ +/*************************************************/ +#define BMI160_ACCEL_OSR4_AVG1 (0x00) +#define BMI160_ACCEL_OSR2_AVG2 (0x01) +#define BMI160_ACCEL_NORMAL_AVG4 (0x02) +#define BMI160_ACCEL_CIC_AVG8 (0x03) +#define BMI160_ACCEL_RES_AVG16 (0x04) +#define BMI160_ACCEL_RES_AVG32 (0x05) +#define BMI160_ACCEL_RES_AVG64 (0x06) +#define BMI160_ACCEL_RES_AVG128 (0x07) +/**************************************************/ +/**\name GYRO ODR */ +/*************************************************/ +#define BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED (0x00) +#define BMI160_GYRO_OUTPUT_DATA_RATE_25HZ (0x06) +#define BMI160_GYRO_OUTPUT_DATA_RATE_50HZ (0x07) +#define BMI160_GYRO_OUTPUT_DATA_RATE_100HZ (0x08) +#define BMI160_GYRO_OUTPUT_DATA_RATE_200HZ (0x09) +#define BMI160_GYRO_OUTPUT_DATA_RATE_400HZ (0x0A) +#define BMI160_GYRO_OUTPUT_DATA_RATE_800HZ (0x0B) +#define BMI160_GYRO_OUTPUT_DATA_RATE_1600HZ (0x0C) +#define BMI160_GYRO_OUTPUT_DATA_RATE_3200HZ (0x0D) +/**************************************************/ +/**\name GYRO BANDWIDTH PARAMETER */ +/*************************************************/ +#define BMI160_GYRO_OSR4_MODE (0x00) +#define BMI160_GYRO_OSR2_MODE (0x01) +#define BMI160_GYRO_NORMAL_MODE (0x02) +#define BMI160_GYRO_CIC_MODE (0x03) +/**************************************************/ +/**\name GYROSCOPE RANGE PARAMETER */ +/*************************************************/ +#define BMI160_GYRO_RANGE_2000_DEG_SEC (0x00) +#define BMI160_GYRO_RANGE_1000_DEG_SEC (0x01) +#define BMI160_GYRO_RANGE_500_DEG_SEC (0x02) +#define BMI160_GYRO_RANGE_250_DEG_SEC (0x03) +#define BMI160_GYRO_RANGE_125_DEG_SEC (0x04) +/**************************************************/ +/**\name MAG ODR */ +/*************************************************/ +#define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED (0x00) +#define BMI160_MAG_OUTPUT_DATA_RATE_0_78HZ (0x01) +#define BMI160_MAG_OUTPUT_DATA_RATE_1_56HZ (0x02) +#define BMI160_MAG_OUTPUT_DATA_RATE_3_12HZ (0x03) +#define BMI160_MAG_OUTPUT_DATA_RATE_6_25HZ (0x04) +#define BMI160_MAG_OUTPUT_DATA_RATE_12_5HZ (0x05) +#define BMI160_MAG_OUTPUT_DATA_RATE_25HZ (0x06) +#define BMI160_MAG_OUTPUT_DATA_RATE_50HZ (0x07) +#define BMI160_MAG_OUTPUT_DATA_RATE_100HZ (0x08) +#define BMI160_MAG_OUTPUT_DATA_RATE_200HZ (0x09) +#define BMI160_MAG_OUTPUT_DATA_RATE_400HZ (0x0A) +#define BMI160_MAG_OUTPUT_DATA_RATE_800HZ (0x0B) +#define BMI160_MAG_OUTPUT_DATA_RATE_1600HZ (0x0C) +#define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED0 (0x0D) +#define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED1 (0x0E) +#define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED2 (0x0F) + +/**************************************************/ +/**\name ENABLE/DISABLE SELECTIONS */ +/*************************************************/ + +/* Enable accel and gyro offset */ +#define ACCEL_OFFSET_ENABLE (0x01) +#define GYRO_OFFSET_ENABLE (0x01) + +/* command register definition */ +#define START_FOC_ACCEL_GYRO (0X03) + + /* INT ENABLE 1 */ +#define BMI160_ANY_MOTION_X_ENABLE (0) +#define BMI160_ANY_MOTION_Y_ENABLE (1) +#define BMI160_ANY_MOTION_Z_ENABLE (2) +#define BMI160_DOUBLE_TAP_ENABLE (4) +#define BMI160_SINGLE_TAP_ENABLE (5) +#define BMI160_ORIENT_ENABLE (6) +#define BMI160_FLAT_ENABLE (7) + +/* INT ENABLE 1 */ +#define BMI160_HIGH_G_X_ENABLE (0) +#define BMI160_HIGH_G_Y_ENABLE (1) +#define BMI160_HIGH_G_Z_ENABLE (2) +#define BMI160_LOW_G_ENABLE (3) +#define BMI160_DATA_RDY_ENABLE (4) +#define BMI160_FIFO_FULL_ENABLE (5) +#define BMI160_FIFO_WM_ENABLE (6) + +/* INT ENABLE 2 */ +#define BMI160_NOMOTION_X_ENABLE (0) +#define BMI160_NOMOTION_Y_ENABLE (1) +#define BMI160_NOMOTION_Z_ENABLE (2) +#define BMI160_STEP_DETECTOR_EN (3) + +/* FOC axis selection for accel*/ +#define FOC_X_AXIS (0) +#define FOC_Y_AXIS (1) +#define FOC_Z_AXIS (2) + +/* IN OUT CONTROL */ +#define BMI160_INTR1_EDGE_CTRL (0) +#define BMI160_INTR2_EDGE_CTRL (1) +#define BMI160_INTR1_LEVEL (0) +#define BMI160_INTR2_LEVEL (1) +#define BMI160_INTR1_OUTPUT_TYPE (0) +#define BMI160_INTR2_OUTPUT_TYPE (1) +#define BMI160_INTR1_OUTPUT_ENABLE (0) +#define BMI160_INTR2_OUTPUT_ENABLE (1) + +#define BMI160_INTR1_INPUT_ENABLE (0) +#define BMI160_INTR2_INPUT_ENABLE (1) + +/* INTERRUPT MAPS */ +#define BMI160_INTR1_MAP_LOW_G (0) +#define BMI160_INTR2_MAP_LOW_G (1) +#define BMI160_INTR1_MAP_HIGH_G (0) +#define BMI160_INTR2_MAP_HIGH_G (1) +#define BMI160_INTR1_MAP_ANY_MOTION (0) +#define BMI160_INTR2_MAP_ANY_MOTION (1) +#define BMI160_INTR1_MAP_NOMO (0) +#define BMI160_INTR2_MAP_NOMO (1) +#define BMI160_INTR1_MAP_DOUBLE_TAP (0) +#define BMI160_INTR2_MAP_DOUBLE_TAP (1) +#define BMI160_INTR1_MAP_SINGLE_TAP (0) +#define BMI160_INTR2_MAP_SINGLE_TAP (1) +#define BMI160_INTR1_MAP_ORIENT (0) +#define BMI160_INTR2_MAP_ORIENT (1) +#define BMI160_INTR1_MAP_FLAT (0) +#define BMI160_INTR2_MAP_FLAT (1) +#define BMI160_INTR1_MAP_DATA_RDY (0) +#define BMI160_INTR2_MAP_DATA_RDY (1) +#define BMI160_INTR1_MAP_FIFO_WM (0) +#define BMI160_INTR2_MAP_FIFO_WM (1) +#define BMI160_INTR1_MAP_FIFO_FULL (0) +#define BMI160_INTR2_MAP_FIFO_FULL (1) +#define BMI160_INTR1_MAP_PMUTRIG (0) +#define BMI160_INTR2_MAP_PMUTRIG (1) + +/* Interrupt mapping*/ +#define BMI160_MAP_INTR1 (0) +#define BMI160_MAP_INTR2 (1) +/**************************************************/ +/**\name TAP DURATION */ +/*************************************************/ +#define BMI160_TAP_DURN_50MS (0x00) +#define BMI160_TAP_DURN_100MS (0x01) +#define BMI160_TAP_DURN_150MS (0x02) +#define BMI160_TAP_DURN_200MS (0x03) +#define BMI160_TAP_DURN_250MS (0x04) +#define BMI160_TAP_DURN_375MS (0x05) +#define BMI160_TAP_DURN_500MS (0x06) +#define BMI160_TAP_DURN_700MS (0x07) +/**************************************************/ +/**\name TAP SHOCK */ +/*************************************************/ +#define BMI160_TAP_SHOCK_50MS (0x00) +#define BMI160_TAP_SHOCK_75MS (0x01) +/**************************************************/ +/**\name TAP QUIET */ +/*************************************************/ +#define BMI160_TAP_QUIET_30MS (0x00) +#define BMI160_TAP_QUIET_20MS (0x01) +/**************************************************/ +/**\name STEP DETECTION SELECTION MODES */ +/*************************************************/ +#define BMI160_STEP_NORMAL_MODE (0) +#define BMI160_STEP_SENSITIVE_MODE (1) +#define BMI160_STEP_ROBUST_MODE (2) +/**************************************************/ +/**\name STEP CONFIGURATION SELECT MODE */ +/*************************************************/ +#define STEP_CONFIG_NORMAL (0X315) +#define STEP_CONFIG_SENSITIVE (0X2D) +#define STEP_CONFIG_ROBUST (0X71D) +/**************************************************/ +/**\name BMM150 TRIM DATA DEFINITIONS */ +/*************************************************/ +#define BMI160_MAG_DIG_X1 (0x5D) +#define BMI160_MAG_DIG_Y1 (0x5E) +#define BMI160_MAG_DIG_Z4_LSB (0x62) +#define BMI160_MAG_DIG_Z4_MSB (0x63) +#define BMI160_MAG_DIG_X2 (0x64) +#define BMI160_MAG_DIG_Y2 (0x65) +#define BMI160_MAG_DIG_Z2_LSB (0x68) +#define BMI160_MAG_DIG_Z2_MSB (0x69) +#define BMI160_MAG_DIG_Z1_LSB (0x6A) +#define BMI160_MAG_DIG_Z1_MSB (0x6B) +#define BMI160_MAG_DIG_XYZ1_LSB (0x6C) +#define BMI160_MAG_DIG_XYZ1_MSB (0x6D) +#define BMI160_MAG_DIG_Z3_LSB (0x6E) +#define BMI160_MAG_DIG_Z3_MSB (0x6F) +#define BMI160_MAG_DIG_XY2 (0x70) +#define BMI160_MAG_DIG_XY1 (0x71) +/**************************************************/ +/**\name BMM150 PRE-SET MODE DEFINITIONS */ +/*************************************************/ +#define BMI160_MAG_PRESETMODE_LOWPOWER (1) +#define BMI160_MAG_PRESETMODE_REGULAR (2) +#define BMI160_MAG_PRESETMODE_HIGHACCURACY (3) +#define BMI160_MAG_PRESETMODE_ENHANCED (4) +/**************************************************/ +/**\name BMM150 PRESET MODES - DATA RATES */ +/*************************************************/ +#define BMI160_MAG_LOWPOWER_DR (0x02) +#define BMI160_MAG_REGULAR_DR (0x02) +#define BMI160_MAG_HIGHACCURACY_DR (0x2A) +#define BMI160_MAG_ENHANCED_DR (0x02) +/**************************************************/ +/**\name BMM150 PRESET MODES - REPETITIONS-XY RATES */ +/*************************************************/ +#define BMI160_MAG_LOWPOWER_REPXY (1) +#define BMI160_MAG_REGULAR_REPXY (4) +#define BMI160_MAG_HIGHACCURACY_REPXY (23) +#define BMI160_MAG_ENHANCED_REPXY (7) +/**************************************************/ +/**\name BMM150 PRESET MODES - REPETITIONS-Z RATES */ +/*************************************************/ +#define BMI160_MAG_LOWPOWER_REPZ (2) +#define BMI160_MAG_REGULAR_REPZ (14) +#define BMI160_MAG_HIGHACCURACY_REPZ (82) +#define BMI160_MAG_ENHANCED_REPZ (26) +#define BMI160_MAG_NOAMRL_SWITCH_TIMES (5) +#define MAG_INTERFACE_PMU_ENABLE (1) +#define MAG_INTERFACE_PMU_DISABLE (0) +/**************************************************/ +/**\name USED FOR MAG OVERFLOW CHECK FOR BMM150 */ +/*************************************************/ +#define BMI160_MAG_OVERFLOW_OUTPUT ((s16)-32768) +#define BMI160_MAG_OVERFLOW_OUTPUT_S32 ((s32)(-2147483647-1)) +#define BMI160_MAG_NEGATIVE_SATURATION_Z ((s16)-32767) +#define BMI160_MAG_POSITIVE_SATURATION_Z ((u16)32767) +#define BMI160_MAG_FLIP_OVERFLOW_ADCVAL ((s16)-4096) +#define BMI160_MAG_HALL_OVERFLOW_ADCVAL ((s16)-16384) +/**************************************************/ +/**\name BMM150 REGISTER DEFINITION */ +/*************************************************/ +#define BMI160_BMM150_CHIP_ID (0x40) +#define BMI160_BMM150_POWE_CONTROL_REG (0x4B) +#define BMI160_BMM150_POWE_MODE_REG (0x4C) +#define BMI160_BMM150_DATA_REG (0x42) +#define BMI160_BMM150_XY_REP (0x51) +#define BMI160_BMM150_Z_REP (0x52) +/**************************************************/ +/**\name AKM COMPENSATING DATA REGISTERS */ +/*************************************************/ +#define BMI160_BST_AKM_ASAX (0x60) +#define BMI160_BST_AKM_ASAY (0x61) +#define BMI160_BST_AKM_ASAZ (0x62) +/**************************************************/ +/**\name AKM POWER MODE SELECTION */ +/*************************************************/ +#define AKM_POWER_DOWN_MODE (0) +#define AKM_SINGLE_MEAS_MODE (1) +#define FUSE_ROM_MODE (2) +/**************************************************/ +/**\name SECONDARY_MAG POWER MODE SELECTION */ +/*************************************************/ +#define BMI160_MAG_FORCE_MODE (0) +#define BMI160_MAG_SUSPEND_MODE (1) +/**************************************************/ +/**\name MAG POWER MODE SELECTION */ +/*************************************************/ +#define FORCE_MODE (0) +#define SUSPEND_MODE (1) +#define NORMAL_MODE (2) +#define MAG_SUSPEND_MODE (1) +/**************************************************/ +/**\name FIFO CONFIGURATIONS */ +/*************************************************/ +#define FIFO_HEADER_ENABLE (0x01) +#define FIFO_MAG_ENABLE (0x01) +#define FIFO_ACCEL_ENABLE (0x01) +#define FIFO_GYRO_ENABLE (0x01) +#define FIFO_TIME_ENABLE (0x01) +#define FIFO_STOPONFULL_ENABLE (0x01) +#define FIFO_WM_INTERRUPT_ENABLE (0x01) +#define BMI160_FIFO_INDEX_LENGTH (1) +#define BMI160_FIFO_TAG_INTR_MASK (0xFC) + +/**************************************************/ +/**\name ACCEL POWER MODE */ +/*************************************************/ +#define ACCEL_MODE_NORMAL (0x11) +#define ACCEL_LOWPOWER (0X12) +#define ACCEL_SUSPEND (0X10) +/**************************************************/ +/**\name GYRO POWER MODE */ +/*************************************************/ +#define GYRO_MODE_SUSPEND (0x14) +#define GYRO_MODE_NORMAL (0x15) +#define GYRO_MODE_FASTSTARTUP (0x17) +/**************************************************/ +/**\name MAG POWER MODE */ +/*************************************************/ +#define MAG_MODE_SUSPEND (0x18) +#define MAG_MODE_NORMAL (0x19) +#define MAG_MODE_LOWPOWER (0x1A) +/**************************************************/ +/**\name ENABLE/DISABLE BIT VALUES */ +/*************************************************/ +#define BMI160_ENABLE (0x01) +#define BMI160_DISABLE (0x00) +/**************************************************/ +/**\name INTERRUPT EDGE TRIGGER ENABLE */ +/*************************************************/ +#define BMI160_EDGE (0x01) +#define BMI160_LEVEL (0x00) +/**************************************************/ +/**\name INTERRUPT LEVEL ENABLE */ +/*************************************************/ +#define BMI160_LEVEL_LOW (0x00) +#define BMI160_LEVEL_HIGH (0x01) +/**************************************************/ +/**\name INTERRUPT OUTPUT ENABLE */ +/*************************************************/ +#define BMI160_OPEN_DRAIN (0x01) +#define BMI160_PUSH_PULL (0x00) + +/* interrupt output enable*/ +#define BMI160_INPUT (0x01) +#define BMI160_OUTPUT (0x00) + +/**************************************************/ +/**\name INTERRUPT TAP SOURCE ENABLE */ +/*************************************************/ +#define FILTER_DATA (0x00) +#define UNFILTER_DATA (0x01) +/**************************************************/ +/**\name SLOW MOTION/ NO MOTION SELECT */ +/*************************************************/ +#define SLOW_MOTION (0x00) +#define NO_MOTION (0x01) +/**************************************************/ +/**\name SIGNIFICANT MOTION SELECTION */ +/*************************************************/ +#define ANY_MOTION (0x00) +#define SIGNIFICANT_MOTION (0x01) +/**************************************************/ +/**\name LATCH DURATION */ +/*************************************************/ +#define BMI160_LATCH_DUR_NONE (0x00) +#define BMI160_LATCH_DUR_312_5_MICRO_SEC (0x01) +#define BMI160_LATCH_DUR_625_MICRO_SEC (0x02) +#define BMI160_LATCH_DUR_1_25_MILLI_SEC (0x03) +#define BMI160_LATCH_DUR_2_5_MILLI_SEC (0x04) +#define BMI160_LATCH_DUR_5_MILLI_SEC (0x05) +#define BMI160_LATCH_DUR_10_MILLI_SEC (0x06) +#define BMI160_LATCH_DUR_20_MILLI_SEC (0x07) +#define BMI160_LATCH_DUR_40_MILLI_SEC (0x08) +#define BMI160_LATCH_DUR_80_MILLI_SEC (0x09) +#define BMI160_LATCH_DUR_160_MILLI_SEC (0x0A) +#define BMI160_LATCH_DUR_320_MILLI_SEC (0x0B) +#define BMI160_LATCH_DUR_640_MILLI_SEC (0x0C) +#define BMI160_LATCH_DUR_1_28_SEC (0x0D) +#define BMI160_LATCH_DUR_2_56_SEC (0x0E) +#define BMI160_LATCHED (0x0F) +/**************************************************/ +/**\name GYRO OFFSET MASK DEFINITION */ +/*************************************************/ +#define BMI160_GYRO_MANUAL_OFFSET_0_7 (0x00FF) +#define BMI160_GYRO_MANUAL_OFFSET_8_9 (0x0300) +/**************************************************/ +/**\name STEP CONFIGURATION MASK DEFINITION */ +/*************************************************/ +#define BMI160_STEP_CONFIG_0_7 (0x00FF) +#define BMI160_STEP_CONFIG_8_10 (0x0700) +#define BMI160_STEP_CONFIG_11_14 (0xF000) +/**************************************************/ +/**\name DEFINITION USED FOR DIFFERENT WRITE */ +/*************************************************/ +#define BMI160_WRITE_TARGET_PAGE0 (0x00) +#define BMI160_WRITE_TARGET_PAGE1 (0x01) +#define BMI160_WRITE_ENABLE_PAGE1 (0x01) +#define BMI160_MANUAL_DISABLE (0x00) +#define BMI160_MANUAL_ENABLE (0x01) +#define BMI160_YAS_DISABLE_RCOIL (0x00) +#define BMI160_ENABLE_MAG_IF_MODE (0x02) +#define BMI160_ENABLE_ANY_MOTION_INTR1 (0x04) +#define BMI160_ENABLE_ANY_MOTION_INTR2 (0x04) +#define BMI160_MAG_DATA_READ_REG (0x04) +#define BMI160_BMM_POWER_MODE_REG (0x06) +#define BMI160_ENABLE_ANY_MOTION_AXIS (0x07) +#define BMI160_ENABLE_LOW_G (0x08) +#define BMI160_YAS532_ACQ_START (0x11) +#define BMI160_YAS_DEVICE_ID_REG (0x80) +#define BMI160_FIFO_GYRO_ENABLE (0x80) +#define BMI160_SIG_MOTION_INTR_ENABLE (0x01) +#define BMI160_STEP_DETECT_INTR_ENABLE (0x01) +#define BMI160_LOW_G_INTR_STAT (0x01) +#define BMI160_PULL_UP_DATA (0x30) +#define BMI160_FIFO_M_G_A_ENABLE (0xE0) +#define BMI160_FIFO_M_G_ENABLE (0xA0) +#define BMI160_FIFO_M_A_ENABLE (0x60) +#define BMI160_FIFO_G_A_ENABLE (0xC0) +#define BMI160_FIFO_A_ENABLE (0x40) +#define BMI160_FIFO_M_ENABLE (0x20) +/**************************************************/ +/**\name MAG INIT DEFINITION */ +/*************************************************/ +#define BMI160_COMMAND_REG_ONE (0x37) +#define BMI160_COMMAND_REG_TWO (0x9A) +#define BMI160_COMMAND_REG_THREE (0xC0) +#define RESET_STEP_COUNTER (0xB2) +/**************************************************/ +/**\name BIT SLICE GET AND SET FUNCTIONS */ +/*************************************************/ +#define BMI160_GET_BITSLICE(regvar, bitname)\ + ((regvar & bitname##__MSK) >> bitname##__POS) + + +#define BMI160_SET_BITSLICE(regvar, bitname, val)\ + ((regvar & ~bitname##__MSK) | \ + ((val< Success + * @retval -1 -> Error + * + * @note + * While changing the parameter of the bmi160_t + * consider the following point: + * Changing the reference value of the parameter + * will changes the local copy or local reference + * make sure your changes will not + * affect the reference value of the parameter + * (Better case don't change the reference value of the parameter) + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_init(struct bmi160_t *bmi160); +/**************************************************/ +/**\name FUNCTION FOR READ AND WRITE REGISTERS */ +/*************************************************/ +/*! + * @brief + * This API write the data to + * the given register + * + * + * @param v_addr_u8 -> Address of the register + * @param v_data_u8 -> The data from the register + * @param v_len_u8 -> no of bytes to read + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_write_reg(u8 v_addr_u8, +u8 *v_data_u8, u8 v_len_u8); +/*! + * @brief + * This API reads the data from + * the given register + * + * + * @param v_addr_u8 -> Address of the register + * @param v_data_u8 -> The data from the register + * @param v_len_u8 -> no of bytes to read + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_reg(u8 v_addr_u8, +u8 *v_data_u8, u8 v_len_u8); +/**************************************************/ +/**\name FUNCTION FOR ERROR CODES */ +/*************************************************/ +/*! + * @brief This API used to reads the fatal error + * from the Register 0x02 bit 0 + * This flag will be reset only by power-on-reset and soft reset + * + * + * @param v_fatal_err_u8 : The status of fatal error + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fatal_err(u8 +*v_fatal_err_u8); +/*! + * @brief This API used to read the error code + * from register 0x02 bit 1 to 4 + * + * + * @param v_err_code_u8 : The status of error codes + * error_code | description + * ------------|--------------- + * 0x00 |no error + * 0x01 |ACC_CONF error (accel ODR and bandwidth not compatible) + * 0x02 |GYR_CONF error (Gyroscope ODR and bandwidth not compatible) + * 0x03 |Under sampling mode and interrupt uses pre filtered data + * 0x04 |reserved + * 0x05 |Selected trigger-readout offset in + * - |MAG_IF greater than selected ODR + * 0x06 |FIFO configuration error for header less mode + * 0x07 |Under sampling mode and pre filtered data as FIFO source + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_err_code(u8 +*v_error_code_u8); +/*! + * @brief This API Reads the i2c error code from the + * Register 0x02 bit 5. + * This error occurred in I2C master detected + * + * @param v_i2c_err_code_u8 : The status of i2c fail error + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_fail_err(u8 +*v_i2c_error_code_u8); + /*! + * @brief This API Reads the dropped command error + * from the register 0x02 bit 6 + * + * + * @param v_drop_cmd_err_u8 : The status of drop command error + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_drop_cmd_err(u8 +*v_drop_cmd_err_u8); +/*! + * @brief This API reads the magnetometer data ready + * interrupt not active. + * It reads from the error register 0x0x2 bit 7 + * + * + * + * + * @param v_mag_data_rdy_err_u8 : The status of mag data ready interrupt + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_dada_rdy_err(u8 +*v_mag_data_rdy_err_u8); +/*! + * @brief This API reads the error status + * from the error register 0x02 bit 0 to 7 + * + * @param v_mag_data_rdy_err_u8 : The status of mag data ready interrupt + * @param v_fatal_er_u8r : The status of fatal error + * @param v_err_code_u8 : The status of error code + * @param v_i2c_fail_err_u8 : The status of I2C fail error + * @param v_drop_cmd_err_u8 : The status of drop command error + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_error_status(u8 *v_fatal_er_u8r, +u8 *v_err_code_u8, u8 *v_i2c_fail_err_u8, +u8 *v_drop_cmd_err_u8, u8 *v_mag_data_rdy_err_u8); +/******************************************************************/ +/**\name FUNCTIONS FOR MAG,ACCEL AND GYRO POWER MODE STATUS */ +/*****************************************************************/ +/*! + * @brief This API reads the magnetometer power mode from + * PMU status register 0x03 bit 0 and 1 + * + * @param v_mag_power_mode_stat_u8 : The value of mag power mode + * mag_powermode | value + * ------------------|---------- + * SUSPEND | 0x00 + * NORMAL | 0x01 + * LOW POWER | 0x02 + * + * + * @note The power mode of mag set by the 0x7E command register + * @note using the function "bmi160_set_command_register()" + * value | mode + * ---------|---------------- + * 0x18 | MAG_MODE_SUSPEND + * 0x19 | MAG_MODE_NORMAL + * 0x1A | MAG_MODE_LOWPOWER + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_power_mode_stat(u8 +*v_mag_power_mode_stat_u8); +/*! + * @brief This API reads the gyroscope power mode from + * PMU status register 0x03 bit 2 and 3 + * + * @param v_gyro_power_mode_stat_u8 : The value of gyro power mode + * gyro_powermode | value + * ------------------|---------- + * SUSPEND | 0x00 + * NORMAL | 0x01 + * FAST POWER UP | 0x03 + * + * @note The power mode of gyro set by the 0x7E command register + * @note using the function "bmi160_set_command_register()" + * value | mode + * ---------|---------------- + * 0x14 | GYRO_MODE_SUSPEND + * 0x15 | GYRO_MODE_NORMAL + * 0x17 | GYRO_MODE_FASTSTARTUP + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_power_mode_stat(u8 +*v_gyro_power_mode_stat_u8); +/*! + * @brief This API reads the accelerometer power mode from + * PMU status register 0x03 bit 4 and 5 + * + * + * @param v_accel_power_mode_stat_u8 : The value of accel power mode + * accel_powermode | value + * ------------------|---------- + * SUSPEND | 0x00 + * NORMAL | 0x01 + * LOW POWER | 0x03 + * + * @note The power mode of accel set by the 0x7E command register + * @note using the function "bmi160_set_command_register()" + * value | mode + * ---------|---------------- + * 0x11 | ACCEL_MODE_NORMAL + * 0x12 | ACCEL_LOWPOWER + * 0x10 | ACCEL_SUSPEND + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_power_mode_stat(u8 +*v_accel_power_mode_stat_u8); +/*! + * @brief This API switch mag interface to normal mode + * and confirm whether the mode switching done successfully or not +* + * @return results of bus communication function and current MAG_PMU result + * @retval 0 -> Success + * @retval -1 -> Error + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_interface_normal(void); +/**************************************************/ +/**\name FUNCTION FOR Mag XYZ data read */ +/*************************************************/ +/*! + * @brief This API reads magnetometer data X values + * from the register 0x04 and 0x05 + * @brief The mag sensor data read form auxiliary mag + * + * @param v_mag_x_s16 : The value of mag x + * @param v_sensor_select_u8 : Mag selection value + * value | sensor + * ---------|---------------- + * 0 | BMM150 + * 1 | AKM09911 or AKM09912 + * + * @note For mag data output rate configuration use the following function + * @note bmi160_set_mag_output_data_rate() + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_x(s16 *v_mag_x_s16, +u8 v_sensor_select_u8); +/*! + * @brief This API reads magnetometer data Y values + * from the register 0x06 and 0x07 + * @brief The mag sensor data read form auxiliary mag + * + * @param v_mag_y_s16 : The value of mag y + * @param v_sensor_select_u8 : Mag selection value + * value | sensor + * ---------|---------------- + * 0 | BMM150 + * 1 | AKM09911 or AKM09912 + * + * @note For mag data output rate configuration use the following function + * @note bmi160_set_mag_output_data_rate() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_y(s16 *v_mag_y_s16, +u8 v_sensor_select_u8); +/*! + * @brief This API reads magnetometer data Z values + * from the register 0x08 and 0x09 + * @brief The mag sensor data read form auxiliary mag + * + * @param v_mag_z_s16 : The value of mag z + * @param v_sensor_select_u8 : Mag selection value + * value | sensor + * ---------|---------------- + * 0 | BMM150 + * 1 | AKM09911 or AKM09912 + * + * @note For mag data output rate configuration use the following function + * @note bmi160_set_mag_output_data_rate() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_z(s16 *v_mag_z_s16, +u8 v_sensor_select_u8); +/*! + * @brief This API reads magnetometer data RHALL values + * from the register 0x0A and 0x0B + * + * + * @param v_mag_r_s16 : The value of BMM150 r data + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_r( +s16 *v_mag_r_s16); +/*! + * @brief This API reads magnetometer data X,Y,Z values + * from the register 0x04 to 0x09 + * + * @brief The mag sensor data read form auxiliary mag + * + * @param mag : The value of mag xyz data + * @param v_sensor_select_u8 : Mag selection value + * value | sensor + * ---------|---------------- + * 0 | BMM150 + * 1 | AKM09911 or AKM09912 + * + * @note For mag data output rate configuration use the following function + * @note bmi160_set_mag_output_data_rate() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyz( +struct bmi160_mag_t *mag, u8 v_sensor_select_u8); + /*!* + * @brief This API reads magnetometer data X,Y,Z,r + * values from the register 0x04 to 0x0B + * + * @brief The mag sensor data read form auxiliary mag + * + * @param mag : The value of mag-BMM150 xyzr data + * + * @note For mag data output rate configuration use the following function + * @note bmi160_set_mag_output_data_rate() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyzr( +struct bmi160_mag_xyzr_t *mag); +/**************************************************/ +/**\name FUNCTION FOR GYRO XYZ DATA READ */ +/*************************************************/ +/*! + * @brief This API reads gyro data X values + * form the register 0x0C and 0x0D + * + * + * + * + * @param v_gyro_x_s16 : The value of gyro x data + * + * @note Gyro Configuration use the following function + * @note bmi160_set_gyro_output_data_rate() + * @note bmi160_set_gyro_bw() + * @note bmi160_set_gyro_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_x( +s16 *v_gyro_x_s16); +/*! + * @brief This API reads gyro data Y values + * form the register 0x0E and 0x0F + * + * + * + * + * @param v_gyro_y_s16 : The value of gyro y data + * + * @note Gyro Configuration use the following function + * @note bmi160_set_gyro_output_data_rate() + * @note bmi160_set_gyro_bw() + * @note bmi160_set_gyro_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error result of communication routines + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_y( +s16 *v_gyro_y_s16); +/*! + * @brief This API reads gyro data Z values + * form the register 0x10 and 0x11 + * + * + * + * + * @param v_gyro_z_s16 : The value of gyro z data + * + * @note Gyro Configuration use the following function + * @note bmi160_set_gyro_output_data_rate() + * @note bmi160_set_gyro_bw() + * @note bmi160_set_gyro_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_z( +s16 *v_gyro_z_s16); +/*! + * @brief This API reads gyro data X,Y,Z values + * from the register 0x0C to 0x11 + * + * + * + * + * @param gyro : The value of gyro xyz + * + * @note Gyro Configuration use the following function + * @note bmi160_set_gyro_output_data_rate() + * @note bmi160_set_gyro_bw() + * @note bmi160_set_gyro_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_xyz( +struct bmi160_gyro_t *gyro); +/**************************************************/ +/**\name FUNCTION FOR ACCEL XYZ DATA READ */ +/*************************************************/ +/*! + * @brief This API reads accelerometer data X values + * form the register 0x12 and 0x13 + * + * + * + * + * @param v_accel_x_s16 : The value of accel x + * + * @note For accel configuration use the following functions + * @note bmi160_set_accel_output_data_rate() + * @note bmi160_set_accel_bw() + * @note bmi160_set_accel_under_sampling_parameter() + * @note bmi160_set_accel_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_x( +s16 *v_accel_x_s16); +/*! + * @brief This API reads accelerometer data Y values + * form the register 0x14 and 0x15 + * + * + * + * + * @param v_accel_y_s16 : The value of accel y + * + * @note For accel configuration use the following functions + * @note bmi160_set_accel_output_data_rate() + * @note bmi160_set_accel_bw() + * @note bmi160_set_accel_under_sampling_parameter() + * @note bmi160_set_accel_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_y( +s16 *v_accel_y_s16); +/*! + * @brief This API reads accelerometer data Z values + * form the register 0x16 and 0x17 + * + * + * + * + * @param v_accel_z_s16 : The value of accel z + * + * @note For accel configuration use the following functions + * @note bmi160_set_accel_output_data_rate() + * @note bmi160_set_accel_bw() + * @note bmi160_set_accel_under_sampling_parameter() + * @note bmi160_set_accel_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_z( +s16 *v_accel_z_s16); +/*! + * @brief This API reads accelerometer data X,Y,Z values + * from the register 0x12 to 0x17 + * + * + * + * + * @param accel :The value of accel xyz + * + * @note For accel configuration use the following functions + * @note bmi160_set_accel_output_data_rate() + * @note bmi160_set_accel_bw() + * @note bmi160_set_accel_under_sampling_parameter() + * @note bmi160_set_accel_range() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_xyz( +struct bmi160_accel_t *accel); +/**************************************************/ +/**\name FUNCTION FOR SENSOR TIME */ +/*************************************************/ +/*! + * @brief This API reads sensor_time from the register + * 0x18 to 0x1A + * + * + * @param v_sensor_time_u32 : The value of sensor time + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_sensor_time( +u32 *v_sensor_time_u32); +/**************************************************/ +/**\name FUNCTION FOR GYRO SLEF TEST */ +/*************************************************/ +/*! + * @brief This API reads the Gyroscope self test + * status from the register 0x1B bit 1 + * + * + * @param v_gyro_selftest_u8 : The value of gyro self test status + * value | status + * ---------|---------------- + * 0 | Gyroscope self test is running or failed + * 1 | Gyroscope self test completed successfully + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest(u8 +*v_gyro_selftest_u8); +/**************************************************/ +/**\name FUNCTION FOR MANUAL INTERFACE */ +/*************************************************/ +/*! + * @brief This API reads the status of + * mag manual interface operation form the register 0x1B bit 2 + * + * + * + * @param v_mag_manual_stat_u8 : The value of mag manual operation status + * value | status + * ---------|---------------- + * 0 | Indicates no manual magnetometer + * - | interface operation is ongoing + * 1 | Indicates manual magnetometer + * - | interface operation is ongoing + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_operation_stat(u8 +*v_mag_manual_stat_u8); +/**************************************************/ +/**\name FUNCTION FOR FAST OFFSET READY */ +/*************************************************/ +/*! + * @brief This API reads the fast offset compensation + * status form the register 0x1B bit 3 + * + * + * @param v_foc_rdy_u8 : The status of fast compensation + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_rdy(u8 +*v_foc_rdy_u8); +/**************************************************/ +/**\name FUNCTION FOR NVM READY */ +/*************************************************/ +/*! + * @brief This API Reads the nvm_rdy status from the + * resister 0x1B bit 4 + * + * + * @param v_nvm_rdy_u8 : The value of NVM ready status + * value | status + * ---------|---------------- + * 0 | NVM write operation in progress + * 1 | NVM is ready to accept a new write trigger + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_rdy(u8 +*v_nvm_rdy_u8); +/**************************************************/ +/**\name FUNCTION FOR DATA READY FOR MAG, GYRO, AND ACCEL */ +/*************************************************/ +/*! + * @brief This API reads the status of mag data ready + * from the register 0x1B bit 5 + * The status get reset when one mag data register is read out + * + * @param v_data_rdy_u8 : The value of mag data ready status + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_data_rdy_mag(u8 +*v_data_rdy_u8); +/*! + * @brief This API reads the status of gyro data ready form the + * register 0x1B bit 6 + * The status get reset when gyro data register read out + * + * + * @param v_data_rdy_u8 : The value of gyro data ready + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_data_rdy(u8 +*v_data_rdy_u8); +/*! + * @brief This API reads the status of accel data ready form the + * register 0x1B bit 7 + * The status get reset when accel data register read out + * + * + * @param v_data_rdy_u8 : The value of accel data ready status + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_data_rdy(u8 +*drdy_acc); +/**************************************************/ +/**\name FUNCTION FOR STEP INTERRUPT STATUS */ +/*************************************************/ +/*! + * @brief This API reads the step detector interrupt status + * from the register 0x1C bit 0 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_step_intr_u8 : The status of step detector interrupt + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_step_intr(u8 +*v_step_intr_u8); +/**************************************************/ +/**\name FUNCTION FOR SIGNIFICANT INTERRUPT STATUS */ +/*************************************************/ +/*! + * @brief This API reads the + * significant motion interrupt status + * from the register 0x1C bit 1 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * + * @param v_significant_intr_u8 : The status of step + * motion interrupt + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_significant_intr(u8 +*sigmot_intr); +/**************************************************/ +/**\name FUNCTION FOR ANY MOTION INTERRUPT STATUS */ +/*************************************************/ + /*! + * @brief This API reads the any motion interrupt status + * from the register 0x1C bit 2 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * @param v_any_motion_intr_u8 : The status of any-motion interrupt + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_any_motion_intr(u8 +*v_any_motion_intr_u8); +/**************************************************/ +/**\name FUNCTION FOR PMU TRIGGER INTERRUPT STATUS */ +/*************************************************/ +/*! + * @brief This API reads the power mode trigger interrupt status + * from the register 0x1C bit 3 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * + * @param v_pmu_trigger_intr_u8 : The status of power mode trigger interrupt + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_pmu_trigger_intr(u8 +*v_pmu_trigger_intr_u8); +/**************************************************/ +/**\name FUNCTION FOR DOUBLE TAB STATUS */ +/*************************************************/ +/*! + * @brief This API reads the double tab status + * from the register 0x1C bit 4 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_double_tap_intr_u8 :The status of double tab interrupt + * + * @note Double tap interrupt can be configured by the following functions + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_double_tap() + * @note AXIS MAPPING + * @note bmi160_get_stat2_tap_first_x() + * @note bmi160_get_stat2_tap_first_y() + * @note bmi160_get_stat2_tap_first_z() + * @note DURATION + * @note bmi160_set_intr_tap_durn() + * @note THRESHOLD + * @note bmi160_set_intr_tap_thres() + * @note TAP QUIET + * @note bmi160_set_intr_tap_quiet() + * @note TAP SHOCK + * @note bmi160_set_intr_tap_shock() + * @note TAP SOURCE + * @note bmi160_set_intr_tap_source() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_double_tap_intr(u8 +*v_double_tap_intr_u8); +/**************************************************/ +/**\name FUNCTION FOR SINGLE TAB STATUS */ +/*************************************************/ +/*! + * @brief This API reads the single tab status + * from the register 0x1C bit 5 + * flag is associated with a specific interrupt function. + * It is set when the single tab interrupt triggers. The + * setting of INT_LATCH controls if the interrupt + * signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_single_tap_intr_u8 :The status of single tap interrupt + * + * @note Single tap interrupt can be configured by the following functions + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_single_tap() + * @note AXIS MAPPING + * @note bmi160_get_stat2_tap_first_x() + * @note bmi160_get_stat2_tap_first_y() + * @note bmi160_get_stat2_tap_first_z() + * @note DURATION + * @note bmi160_set_intr_tap_durn() + * @note THRESHOLD + * @note bmi160_set_intr_tap_thres() + * @note TAP QUIET + * @note bmi160_set_intr_tap_quiet() + * @note TAP SHOCK + * @note bmi160_set_intr_tap_shock() + * @note TAP SOURCE + * @note bmi160_set_intr_tap_source() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_single_tap_intr(u8 +*v_single_tap_intr_u8); +/**************************************************/ +/**\name FUNCTION FOR ORIENT INTERRUPT STATUS */ +/*************************************************/ +/*! + * @brief This API reads the orient status + * from the register 0x1C bit 6 + * flag is associated with a specific interrupt function. + * It is set when the orient interrupt triggers. The + * setting of INT_LATCH controls if the + * interrupt signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_orient_intr_u8 : The status of orient interrupt + * + * @note For orient interrupt configuration use the following functions + * @note STATUS + * @note bmi160_get_stat0_orient_intr() + * @note AXIS MAPPING + * @note bmi160_get_stat3_orient_xy() + * @note bmi160_get_stat3_orient_z() + * @note bmi160_set_intr_orient_axes_enable() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_orient() + * @note INTERRUPT OUTPUT + * @note bmi160_set_intr_orient_ud_enable() + * @note THETA + * @note bmi160_set_intr_orient_theta() + * @note HYSTERESIS + * @note bmi160_set_intr_orient_hyst() + * @note BLOCKING + * @note bmi160_set_intr_orient_blocking() + * @note MODE + * @note bmi160_set_intr_orient_mode() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_orient_intr(u8 +*v_orient_intr_u8); +/**************************************************/ +/**\name FUNCTION FOR FLAT INTERRUPT STATUS */ +/*************************************************/ +/*! + * @brief This API reads the flat interrupt status + * from the register 0x1C bit 7 + * flag is associated with a specific interrupt function. + * It is set when the flat interrupt triggers. The + * setting of INT_LATCH controls if the + * interrupt signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_flat_intr_u8 : The status of flat interrupt + * + * @note For flat configuration use the following functions + * @note STATS + * @note bmi160_get_stat0_flat_intr() + * @note bmi160_get_stat3_flat() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_flat() + * @note THETA + * @note bmi160_set_intr_flat_theta() + * @note HOLD TIME + * @note bmi160_set_intr_flat_hold() + * @note HYSTERESIS + * @note bmi160_set_intr_flat_hyst() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_flat_intr(u8 +*v_flat_intr_u8); +/**************************************************/ +/**\name FUNCTION FOR HIGH_G INTERRUPT STATUS */ +/*************************************************/ +/*! + * @brief This API reads the high_g interrupt status + * from the register 0x1D bit 2 + * flag is associated with a specific interrupt function. + * It is set when the high g interrupt triggers. The + * setting of INT_LATCH controls if the interrupt signal and hence the + * respective interrupt flag will be permanently + * latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_high_g_intr_u8 : The status of high_g interrupt + * + * @note High_g interrupt configured by following functions + * @note STATUS + * @note bmi160_get_stat1_high_g_intr() + * @note AXIS MAPPING + * @note bmi160_get_stat3_high_g_first_x() + * @note bmi160_get_stat3_high_g_first_y() + * @note bmi160_get_stat3_high_g_first_z() + * @note SIGN MAPPING + * @note bmi160_get_stat3_high_g_first_sign() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_high_g() + * @note HYSTERESIS + * @note bmi160_set_intr_high_g_hyst() + * @note DURATION + * @note bmi160_set_intr_high_g_durn() + * @note THRESHOLD + * @note bmi160_set_intr_high_g_thres() + * @note SOURCE + * @note bmi160_set_intr_low_high_source() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_high_g_intr(u8 +*v_high_g_intr_u8); +/**************************************************/ +/**\name FUNCTION FOR LOW_G INTERRUPT STATUS */ +/*************************************************/ +/*! + * @brief This API reads the low g interrupt status + * from the register 0x1D bit 3 + * flag is associated with a specific interrupt function. + * It is set when the low g interrupt triggers. The + * setting of INT_LATCH controls if the interrupt signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_low_g_intr_u8 : The status of low_g interrupt + * + * @note Low_g interrupt configured by following functions + * @note STATUS + * @note bmi160_get_stat1_low_g_intr() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_low_g() + * @note SOURCE + * @note bmi160_set_intr_low_high_source() + * @note DURATION + * @note bmi160_set_intr_low_g_durn() + * @note THRESHOLD + * @note bmi160_set_intr_low_g_thres() + * @note HYSTERESIS + * @note bmi160_set_intr_low_g_hyst() + * @note MODE + * @note bmi160_set_intr_low_g_mode() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_low_g_intr(u8 +*v_low_g_intr_u8); +/**************************************************/ +/**\name FUNCTION FOR DATA READY INTERRUPT STATUS */ +/*************************************************/ +/*! + * @brief This API reads data ready interrupt status + * from the register 0x1D bit 4 + * flag is associated with a specific interrupt function. + * It is set when the data ready interrupt triggers. The + * setting of INT_LATCH controls if the interrupt signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_data_rdy_intr_u8 : The status of data ready interrupt + * + * @note Data ready interrupt configured by following functions + * @note STATUS + * @note bmi160_get_stat1_data_rdy_intr() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_data_rdy() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_data_rdy_intr(u8 +*v_data_rdy_intr_u8); +/**************************************************/ +/**\name FUNCTIONS FOR FIFO FULL AND WATER MARK INTERRUPT STATUS*/ +/*************************************************/ +/*! + * @brief This API reads data ready FIFO full interrupt status + * from the register 0x1D bit 5 + * flag is associated with a specific interrupt function. + * It is set when the FIFO full interrupt triggers. The + * setting of INT_LATCH controls if the + * interrupt signal and hence the + * respective interrupt flag will + * be permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_fifo_full_intr_u8 : The status of fifo full interrupt + * + * @note FIFO full interrupt can be configured by following functions + * @note bmi160_set_intr_fifo_full() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_full_intr(u8 +*v_fifo_full_intr_u8); +/*! + * @brief This API reads data + * ready FIFO watermark interrupt status + * from the register 0x1D bit 6 + * flag is associated with a specific interrupt function. + * It is set when the FIFO watermark interrupt triggers. The + * setting of INT_LATCH controls if the + * interrupt signal and hence the + * respective interrupt flag will be + * permanently latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_fifo_wm_intr_u8 : The status of fifo water mark interrupt + * + * @note FIFO full interrupt can be configured by following functions + * @note bmi160_set_intr_fifo_wm() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_wm_intr(u8 +*v_fifo_wm_intr_u8); +/**************************************************/ +/**\name FUNCTIONS FOR NO MOTION INTERRUPT STATUS*/ +/*************************************************/ +/*! + * @brief This API reads data ready no motion interrupt status + * from the register 0x1D bit 7 + * flag is associated with a specific interrupt function. + * It is set when the no motion interrupt triggers. The + * setting of INT_LATCH controls if the interrupt signal and hence the + * respective interrupt flag will be permanently + * latched, temporarily latched + * or not latched. + * + * + * + * + * @param v_nomotion_intr_u8 : The status of no motion interrupt + * + * @note No motion interrupt can be configured by following function + * @note STATUS + * @note bmi160_get_stat1_nomotion_intr() + * @note INTERRUPT MAPPING + * @note bmi160_set_intr_nomotion() + * @note DURATION + * @note bmi160_set_intr_slow_no_motion_durn() + * @note THRESHOLD + * @note bmi160_set_intr_slow_no_motion_thres() + * @note SLOW/NO MOTION SELECT + * @note bmi160_set_intr_slow_no_motion_select() + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_nomotion_intr(u8 +*nomo_intr); +/**************************************************/ +/**\name FUNCTIONS FOR ANY MOTION FIRST XYZ AND SIGN INTERRUPT STATUS*/ +/*************************************************/ +/*! + * @brief This API reads the status of any motion first x + * from the register 0x1E bit 0 + * + * + * @param v_anymotion_first_x_u8 : The status of any motion first x interrupt + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by x axis + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_x(u8 +*v_anymotion_first_x_u8); +/*! + * @brief This API reads the status of any motion first y interrupt + * from the register 0x1E bit 1 + * + * + * + *@param v_any_motion_first_y_u8 : The status of any motion first y interrupt + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_y(u8 +*v_any_motion_first_y_u8); +/*! + * @brief This API reads the status of any motion first z interrupt + * from the register 0x1E bit 2 + * + * + * + * + *@param v_any_motion_first_z_u8 : The status of any motion first z interrupt + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_z(u8 +*v_any_motion_first_z_u8); +/*! + * @brief This API reads the any motion sign status from the + * register 0x1E bit 3 + * + * + * + * + * @param v_anymotion_sign_u8 : The status of any motion sign + * value | sign + * -----------|------------- + * 0 | positive + * 1 | negative + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_sign(u8 +*v_anymotion_sign_u8); +/**************************************************/ +/**\name FUNCTIONS FOR TAP FIRST XYZ AND SIGN INTERRUPT STATUS*/ +/*************************************************/ +/*! + * @brief This API reads the any motion tap first x status from the + * register 0x1E bit 4 + * + * + * + * + * @param v_tap_first_x_u8 :The status of any motion tap first x + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by x axis + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_x(u8 +*v_tap_first_x_u8); +/*! + * @brief This API reads the tap first y interrupt status from the + * register 0x1E bit 5 + * + * + * + * + * @param v_tap_first_y_u8 :The status of tap first y interrupt + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_y(u8 +*v_tap_first_y_u8); +/*! + * @brief This API reads the tap first z interrupt status from the + * register 0x1E bit 6 + * + * + * + * + * @param v_tap_first_z_u8 :The status of tap first z interrupt + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_z(u8 +*v_tap_first_z_u8); +/*! + * @brief This API reads the tap sign status from the + * register 0x1E bit 7 + * + * + * + * + * @param v_tap_sign_u8 : The status of tap sign + * value | sign + * -----------|------------- + * 0 | positive + * 1 | negative + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_sign(u8 +*tap_sign); +/**************************************************/ +/**\name FUNCTIONS FOR HIGH_G FIRST XYZ AND SIGN INTERRUPT STATUS*/ +/*************************************************/ +/*! + * @brief This API reads the high_g first x status from the + * register 0x1F bit 0 + * + * + * + * + * @param v_high_g_first_x_u8 :The status of high_g first x + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by x axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_x(u8 +*v_high_g_first_x_u8); +/*! + * @brief This API reads the high_g first y status from the + * register 0x1F bit 1 + * + * + * + * + * @param v_high_g_first_y_u8 : The status of high_g first y + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_y(u8 +*v_high_g_first_y_u8); +/*! + * @brief This API reads the high_g first z status from the + * register 0x1F bit 3 + * + * + * + * + * @param v_high_g_first_z_u8 : The status of high_g first z + * value | status + * -----------|------------- + * 0 | not triggered + * 1 | triggered by z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_z(u8 +*v_high_g_first_z_u8); +/*! + * @brief This API reads the high sign status from the + * register 0x1F bit 3 + * + * + * + * + * @param v_high_g_sign_u8 :The status of high sign + * value | sign + * -----------|------------- + * 0 | positive + * 1 | negative + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_sign(u8 +*v_high_g_sign_u8); +/**************************************************/ +/**\name FUNCTIONS FOR ORIENT XY AND Z INTERRUPT STATUS*/ +/*************************************************/ +/*! + * @brief This API reads the status of orient_xy plane + * from the register 0x1F bit 4 and 5 + * + * + * @param v_orient_xy_u8 :The status of orient_xy plane + * value | status + * -----------|------------- + * 0x00 | portrait upright + * 0x01 | portrait upside down + * 0x02 | landscape left + * 0x03 | landscape right + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_xy(u8 +*v_orient_xy_u8); +/*! + * @brief This API reads the status of orient z plane + * from the register 0x1F bit 6 + * + * + * @param v_orient_z_u8 :The status of orient z + * value | status + * -----------|------------- + * 0x00 | upward looking + * 0x01 | downward looking + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_z(u8 +*v_orient_z_u8); +/**************************************************/ +/**\name FUNCTIONS FOR FLAT INTERRUPT STATUS*/ +/*************************************************/ +/*! + * @brief This API reads the flat status from the register + * 0x1F bit 7 + * + * + * @param v_flat_u8 : The status of flat interrupt + * value | status + * -----------|------------- + * 0x00 | non flat + * 0x01 | flat position + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_flat(u8 +*flat); +/**************************************************/ +/**\name FUNCTION FOR TEMPERATUE READ */ +/*************************************************/ +/*! + * @brief This API reads the temperature of the sensor + * from the register 0x21 bit 0 to 7 + * + * + * + * @param v_temp_s16 : The value of temperature + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_temp(s16 +*v_temp_s16); +/**************************************************/ +/**\name FUNCTION FOR FIFO LENGTH AND FIFO DATA READ */ +/*************************************************/ +/*! + * @brief This API reads the of the sensor + * form the register 0x23 and 0x24 bit 0 to 7 and 0 to 2 + * @brief this byte counter is updated each time a complete frame + * was read or writtern + * + * + * @param v_fifo_length_u32 : The value of fifo byte counter + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_length( +u32 *v_fifo_length_u32); +/*! + * @brief This API reads the fifo data of the sensor + * from the register 0x24 + * @brief Data format depends on the setting of register FIFO_CONFIG + * + * + * + * @param v_fifodata_u8 : Pointer holding the fifo data + * + * @note For reading FIFO data use the following functions + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_data( +u8 *v_fifodata_u8, u16 v_fifo_length_u16); +/**************************************************/ +/**\name FUNCTION FOR ACCEL CONFIGURATIONS */ +/*************************************************/ +/*! + * @brief This API is used to get the + * accel output date rate form the register 0x40 bit 0 to 3 + * + * + * @param v_output_data_rate_u8 :The value of accel output date rate + * value | output data rate + * -------|-------------------------- + * 0 | BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED + * 1 | BMI160_ACCEL_OUTPUT_DATA_RATE_0_78HZ + * 2 | BMI160_ACCEL_OUTPUT_DATA_RATE_1_56HZ + * 3 | BMI160_ACCEL_OUTPUT_DATA_RATE_3_12HZ + * 4 | BMI160_ACCEL_OUTPUT_DATA_RATE_6_25HZ + * 5 | BMI160_ACCEL_OUTPUT_DATA_RATE_12_5HZ + * 6 | BMI160_ACCEL_OUTPUT_DATA_RATE_25HZ + * 7 | BMI160_ACCEL_OUTPUT_DATA_RATE_50HZ + * 8 | BMI160_ACCEL_OUTPUT_DATA_RATE_100HZ + * 9 | BMI160_ACCEL_OUTPUT_DATA_RATE_200HZ + * 10 | BMI160_ACCEL_OUTPUT_DATA_RATE_400HZ + * 11 | BMI160_ACCEL_OUTPUT_DATA_RATE_800HZ + * 12 | BMI160_ACCEL_OUTPUT_DATA_RATE_1600HZ + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_output_data_rate( +u8 *v_output_data_rate_u8); +/*! + * @brief This API is used to set the + * accel output date rate form the register 0x40 bit 0 to 3 + * + * + * @param v_output_data_rate_u8 :The value of accel output date rate + * value | output data rate + * -------|-------------------------- + * 0 | BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED + * 1 | BMI160_ACCEL_OUTPUT_DATA_RATE_0_78HZ + * 2 | BMI160_ACCEL_OUTPUT_DATA_RATE_1_56HZ + * 3 | BMI160_ACCEL_OUTPUT_DATA_RATE_3_12HZ + * 4 | BMI160_ACCEL_OUTPUT_DATA_RATE_6_25HZ + * 5 | BMI160_ACCEL_OUTPUT_DATA_RATE_12_5HZ + * 6 | BMI160_ACCEL_OUTPUT_DATA_RATE_25HZ + * 7 | BMI160_ACCEL_OUTPUT_DATA_RATE_50HZ + * 8 | BMI160_ACCEL_OUTPUT_DATA_RATE_100HZ + * 9 | BMI160_ACCEL_OUTPUT_DATA_RATE_200HZ + * 10 | BMI160_ACCEL_OUTPUT_DATA_RATE_400HZ + * 11 | BMI160_ACCEL_OUTPUT_DATA_RATE_800HZ + * 12 | BMI160_ACCEL_OUTPUT_DATA_RATE_1600HZ + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_output_data_rate(u8 odr); +/*! + * @brief This API is used to get the + * accel bandwidth from the register 0x40 bit 4 to 6 + * @brief bandwidth parameter determines filter configuration(acc_us=0) + * and averaging for under sampling mode(acc_us=1) + * + * + * @param v_bw_u8 : The value of accel bandwidth + * + * @note accel bandwidth depends on under sampling parameter + * @note under sampling parameter cab be set by the function + * "BMI160_SET_ACCEL_UNDER_SAMPLING_PARAMETER" + * + * @note Filter configuration + * accel_us | Filter configuration + * -----------|--------------------- + * 0x00 | OSR4 mode + * 0x01 | OSR2 mode + * 0x02 | normal mode + * 0x03 | CIC mode + * 0x04 | Reserved + * 0x05 | Reserved + * 0x06 | Reserved + * 0x07 | Reserved + * + * @note accel under sampling mode + * accel_us | Under sampling mode + * -----------|--------------------- + * 0x00 | no averaging + * 0x01 | average 2 samples + * 0x02 | average 4 samples + * 0x03 | average 8 samples + * 0x04 | average 16 samples + * 0x05 | average 32 samples + * 0x06 | average 64 samples + * 0x07 | average 128 samples + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_bw(u8 *v_bw_u8); +/*! + * @brief This API is used to set the + * accel bandwidth from the register 0x40 bit 4 to 6 + * @brief bandwidth parameter determines filter configuration(acc_us=0) + * and averaging for under sampling mode(acc_us=1) + * + * + * @param v_bw_u8 : The value of accel bandwidth + * + * @note accel bandwidth depends on under sampling parameter + * @note under sampling parameter cab be set by the function + * "BMI160_SET_ACCEL_UNDER_SAMPLING_PARAMETER" + * + * @note Filter configuration + * accel_us | Filter configuration + * -----------|--------------------- + * 0x00 | OSR4 mode + * 0x01 | OSR2 mode + * 0x02 | normal mode + * 0x03 | CIC mode + * 0x04 | Reserved + * 0x05 | Reserved + * 0x06 | Reserved + * 0x07 | Reserved + * + * @note accel under sampling mode + * accel_us | Under sampling mode + * -----------|--------------------- + * 0x00 | no averaging + * 0x01 | average 2 samples + * 0x02 | average 4 samples + * 0x03 | average 8 samples + * 0x04 | average 16 samples + * 0x05 | average 32 samples + * 0x06 | average 64 samples + * 0x07 | average 128 samples + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_bw(u8 v_bw_u8); +/*! + * @brief This API is used to get the accel + * under sampling parameter form the register 0x40 bit 7 + * + * + * + * + * @param v_accel_under_sampling_u8 : The value of accel under sampling + * value | under_sampling + * ----------|--------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_under_sampling_parameter( +u8 *v_accel_under_sampling_u8); +/*! + * @brief This API is used to set the accel + * under sampling parameter form the register 0x40 bit 7 + * + * + * + * + * @param v_accel_under_sampling_u8 : The value of accel under sampling + * value | under_sampling + * ----------|--------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_under_sampling_parameter( +u8 v_accel_under_sampling_u8); +/*! + * @brief This API is used to get the ranges + * (g values) of the accel from the register 0x41 bit 0 to 3 + * + * + * + * + * @param v_range_u8 : The value of accel g range + * value | g_range + * ----------|----------- + * 0x03 | BMI160_ACCEL_RANGE_2G + * 0x05 | BMI160_ACCEL_RANGE_4G + * 0x08 | BMI160_ACCEL_RANGE_8G + * 0x0C | BMI160_ACCEL_RANGE_16G + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_range( +u8 *v_range_u8); +/*! + * @brief This API is used to set the ranges + * (g values) of the accel from the register 0x41 bit 0 to 3 + * + * + * + * + * @param v_range_u8 : The value of accel g range + * value | g_range + * ----------|----------- + * 0x03 | BMI160_ACCEL_RANGE_2G + * 0x05 | BMI160_ACCEL_RANGE_4G + * 0x08 | BMI160_ACCEL_RANGE_8G + * 0x0C | BMI160_ACCEL_RANGE_16G + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_range( +u8 v_range_u8); +/**************************************************/ +/**\name FUNCTION FOR GYRO CONFIGURATIONS */ +/*************************************************/ +/*! + * @brief This API is used to get the + * gyroscope output data rate from the register 0x42 bit 0 to 3 + * + * + * + * + * @param v_output_data_rate_u8 :The value of gyro output data rate + * value | gyro output data rate + * -----------|----------------------------- + * 0x00 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x01 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x02 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x03 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x04 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x05 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x06 | BMI160_GYRO_OUTPUT_DATA_RATE_25HZ + * 0x07 | BMI160_GYRO_OUTPUT_DATA_RATE_50HZ + * 0x08 | BMI160_GYRO_OUTPUT_DATA_RATE_100HZ + * 0x09 | BMI160_GYRO_OUTPUT_DATA_RATE_200HZ + * 0x0A | BMI160_GYRO_OUTPUT_DATA_RATE_400HZ + * 0x0B | BMI160_GYRO_OUTPUT_DATA_RATE_800HZ + * 0x0C | BMI160_GYRO_OUTPUT_DATA_RATE_1600HZ + * 0x0D | BMI160_GYRO_OUTPUT_DATA_RATE_3200HZ + * 0x0E | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x0F | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_output_data_rate( +u8 *gyro_output_typer); +/*! + * @brief This API is used to set the + * gyroscope output data rate from the register 0x42 bit 0 to 3 + * + * + * + * + * @param v_output_data_rate_u8 :The value of gyro output data rate + * value | gyro output data rate + * -----------|----------------------------- + * 0x00 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x01 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x02 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x03 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x04 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x05 | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x06 | BMI160_GYRO_OUTPUT_DATA_RATE_25HZ + * 0x07 | BMI160_GYRO_OUTPUT_DATA_RATE_50HZ + * 0x08 | BMI160_GYRO_OUTPUT_DATA_RATE_100HZ + * 0x09 | BMI160_GYRO_OUTPUT_DATA_RATE_200HZ + * 0x0A | BMI160_GYRO_OUTPUT_DATA_RATE_400HZ + * 0x0B | BMI160_GYRO_OUTPUT_DATA_RATE_800HZ + * 0x0C | BMI160_GYRO_OUTPUT_DATA_RATE_1600HZ + * 0x0D | BMI160_GYRO_OUTPUT_DATA_RATE_3200HZ + * 0x0E | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * 0x0F | BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_output_data_rate( +u8 gyro_output_typer); +/*! + * @brief This API is used to get the + * data of gyro from the register 0x42 bit 4 to 5 + * + * + * + * + * @param v_bw_u8 : The value of gyro bandwidth + * value | gyro bandwidth + * ----------|---------------- + * 0x00 | BMI160_GYRO_OSR4_MODE + * 0x01 | BMI160_GYRO_OSR2_MODE + * 0x02 | BMI160_GYRO_NORMAL_MODE + * 0x03 | BMI160_GYRO_CIC_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_bw(u8 *v_bw_u8); +/*! + * @brief This API is used to set the + * data of gyro from the register 0x42 bit 4 to 5 + * + * + * + * + * @param v_bw_u8 : The value of gyro bandwidth + * value | gyro bandwidth + * ----------|---------------- + * 0x00 | BMI160_GYRO_OSR4_MODE + * 0x01 | BMI160_GYRO_OSR2_MODE + * 0x02 | BMI160_GYRO_NORMAL_MODE + * 0x03 | BMI160_GYRO_CIC_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_bw(u8 v_bw_u8); +/*! + * @brief This API reads the range + * of gyro from the register 0x43 bit 0 to 2 + * + * @param v_range_u8 : The value of gyro range + * value | range + * ----------|------------------------------- + * 0x00 | BMI160_GYRO_RANGE_2000_DEG_SEC + * 0x01 | BMI160_GYRO_RANGE_1000_DEG_SEC + * 0x02 | BMI160_GYRO_RANGE_500_DEG_SEC + * 0x03 | BMI160_GYRO_RANGE_250_DEG_SEC + * 0x04 | BMI160_GYRO_RANGE_125_DEG_SEC + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_range( +u8 *v_range_u8); +/*! + * @brief This API set the range + * of gyro from the register 0x43 bit 0 to 2 + * + * @param v_range_u8 : The value of gyro range + * value | range + * ----------|------------------------------- + * 0x00 | BMI160_GYRO_RANGE_2000_DEG_SEC + * 0x01 | BMI160_GYRO_RANGE_1000_DEG_SEC + * 0x02 | BMI160_GYRO_RANGE_500_DEG_SEC + * 0x03 | BMI160_GYRO_RANGE_250_DEG_SEC + * 0x04 | BMI160_GYRO_RANGE_125_DEG_SEC + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_range( +u8 v_range_u8); +/**************************************************/ +/**\name FUNCTION FOR MAG CONFIGURATIONS */ +/*************************************************/ +/*! + * @brief This API is used to get the + * output data rate of magnetometer from the register 0x44 bit 0 to 3 + * + * + * + * + * @param v_output_data_rat_u8e : The value of mag output data rate + * value | mag output data rate + * ---------|--------------------------- + * 0x00 |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED + * 0x01 |BMI160_MAG_OUTPUT_DATA_RATE_0_78HZ + * 0x02 |BMI160_MAG_OUTPUT_DATA_RATE_1_56HZ + * 0x03 |BMI160_MAG_OUTPUT_DATA_RATE_3_12HZ + * 0x04 |BMI160_MAG_OUTPUT_DATA_RATE_6_25HZ + * 0x05 |BMI160_MAG_OUTPUT_DATA_RATE_12_5HZ + * 0x06 |BMI160_MAG_OUTPUT_DATA_RATE_25HZ + * 0x07 |BMI160_MAG_OUTPUT_DATA_RATE_50HZ + * 0x08 |BMI160_MAG_OUTPUT_DATA_RATE_100HZ + * 0x09 |BMI160_MAG_OUTPUT_DATA_RATE_200HZ + * 0x0A |BMI160_MAG_OUTPUT_DATA_RATE_400HZ + * 0x0B |BMI160_MAG_OUTPUT_DATA_RATE_800HZ + * 0x0C |BMI160_MAG_OUTPUT_DATA_RATE_1600HZ + * 0x0D |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED0 + * 0x0E |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED1 + * 0x0F |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED2 + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_output_data_rate(u8 *odr); +/*! + * @brief This API is used to set the + * output data rate of magnetometer from the register 0x44 bit 0 to 3 + * + * + * + * + * @param v_output_data_rat_u8e : The value of mag output data rate + * value | mag output data rate + * ---------|--------------------------- + * 0x00 |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED + * 0x01 |BMI160_MAG_OUTPUT_DATA_RATE_0_78HZ + * 0x02 |BMI160_MAG_OUTPUT_DATA_RATE_1_56HZ + * 0x03 |BMI160_MAG_OUTPUT_DATA_RATE_3_12HZ + * 0x04 |BMI160_MAG_OUTPUT_DATA_RATE_6_25HZ + * 0x05 |BMI160_MAG_OUTPUT_DATA_RATE_12_5HZ + * 0x06 |BMI160_MAG_OUTPUT_DATA_RATE_25HZ + * 0x07 |BMI160_MAG_OUTPUT_DATA_RATE_50HZ + * 0x08 |BMI160_MAG_OUTPUT_DATA_RATE_100HZ + * 0x09 |BMI160_MAG_OUTPUT_DATA_RATE_200HZ + * 0x0A |BMI160_MAG_OUTPUT_DATA_RATE_400HZ + * 0x0B |BMI160_MAG_OUTPUT_DATA_RATE_800HZ + * 0x0C |BMI160_MAG_OUTPUT_DATA_RATE_1600HZ + * 0x0D |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED0 + * 0x0E |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED1 + * 0x0F |BMI160_MAG_OUTPUT_DATA_RATE_RESERVED2 + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_output_data_rate(u8 odr); +/**************************************************/ +/**\name FUNCTION FOR FIFO CONFIGURATIONS */ +/*************************************************/ + /*! + * @brief This API is used to read Down sampling + * for gyro (2**downs_gyro) in the register 0x45 bit 0 to 2 + * + * + * + * + * @param v_fifo_down_gyro_u8 :The value of gyro fifo down + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_gyro( +u8 *v_fifo_down_gyro_u8); + /*! + * @brief This API is used to set Down sampling + * for gyro (2**downs_gyro) in the register 0x45 bit 0 to 2 + * + * + * + * + * @param v_fifo_down_gyro_u8 :The value of gyro fifo down + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_gyro( +u8 v_fifo_down_gyro_u8); +/*! + * @brief This API is used to read gyro fifo filter data + * from the register 0x45 bit 3 + * + * + * + * @param v_gyro_fifo_filter_data_u8 :The value of gyro filter data + * value | gyro_fifo_filter_data + * ------------|------------------------- + * 0x00 | Unfiltered data + * 0x01 | Filtered data + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_fifo_filter_data( +u8 *v_gyro_fifo_filter_data_u8); +/*! + * @brief This API is used to set gyro fifo filter data + * from the register 0x45 bit 3 + * + * + * + * @param v_gyro_fifo_filter_data_u8 :The value of gyro filter data + * value | gyro_fifo_filter_data + * ------------|------------------------- + * 0x00 | Unfiltered data + * 0x01 | Filtered data + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_fifo_filter_data( +u8 v_gyro_fifo_filter_data_u8); +/*! + * @brief This API is used to read Down sampling + * for accel (2*downs_accel) from the register 0x45 bit 4 to 6 + * + * + * + * + * @param v_fifo_down_u8 :The value of accel fifo down + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_accel( +u8 *v_fifo_down_u8); + /*! + * @brief This API is used to set Down sampling + * for accel (2*downs_accel) from the register 0x45 bit 4 to 6 + * + * + * + * + * @param v_fifo_down_u8 :The value of accel fifo down + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_accel( +u8 v_fifo_down_u8); +/*! + * @brief This API is used to read accel fifo filter data + * from the register 0x45 bit 7 + * + * + * + * @param v_accel_fifo_filter_u8 :The value of accel filter data + * value | accel_fifo_filter_data + * ------------|------------------------- + * 0x00 | Unfiltered data + * 0x01 | Filtered data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_fifo_filter_data( +u8 *v_accel_fifo_filter_u8); +/*! + * @brief This API is used to set accel fifo filter data + * from the register 0x45 bit 7 + * + * + * + * @param v_accel_fifo_filter_u8 :The value of accel filter data + * value | accel_fifo_filter_data + * ------------|------------------------- + * 0x00 | Unfiltered data + * 0x01 | Filtered data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_fifo_filter_data( +u8 v_accel_fifo_filter_u8); +/**************************************************/ +/**\name FUNCTION FOR FIFO WATER MARK ENABLE */ +/*************************************************/ +/*! + * @brief This API is used to Trigger an interrupt + * when FIFO contains water mark level from the register 0x46 bit 0 to 7 + * + * + * + * @param v_fifo_wm_u8 : The value of fifo water mark level + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_wm( +u8 *v_fifo_wm_u8); +/*! + * @brief This API is used to Trigger an interrupt + * when FIFO contains water mark level from the register 0x46 bit 0 to 7 + * + * + * + * @param v_fifo_wm_u8 : The value of fifo water mark level + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_wm( +u8 v_fifo_wm_u8); +/**************************************************/ +/**\name FUNCTION FOR FIFO CONFIGURATIONS */ +/*************************************************/ +/*! + * @brief This API reads fifo sensor time + * frame after the last valid data frame form the register 0x47 bit 1 + * + * + * + * + * @param v_fifo_time_enable_u8 : The value of sensor time + * value | fifo sensor time + * ------------|------------------------- + * 0x00 | do not return sensortime frame + * 0x01 | return sensortime frame + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_time_enable( +u8 *v_fifo_time_enable_u8); +/*! + * @brief This API set fifo sensor time + * frame after the last valid data frame form the register 0x47 bit 1 + * + * + * + * + * @param v_fifo_time_enable_u8 : The value of sensor time + * value | fifo sensor time + * ------------|------------------------- + * 0x00 | do not return sensortime frame + * 0x01 | return sensortime frame + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_time_enable( +u8 v_fifo_time_enable_u8); +/*! + * @brief This API reads FIFO tag interrupt2 enable status + * from the resister 0x47 bit 2 + * + * @param v_fifo_tag_intr2_u8 : The value of fifo tag interrupt + * value | fifo tag interrupt + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr2_enable( +u8 *v_fifo_tag_intr2_u8); +/*! + * @brief This API set FIFO tag interrupt2 enable status + * from the resister 0x47 bit 2 + * + * @param v_fifo_tag_intr2_u8 : The value of fifo tag interrupt + * value | fifo tag interrupt + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr2_enable( +u8 v_fifo_tag_intr2_u8); +/*! + * @brief This API get FIFO tag interrupt1 enable status + * from the resister 0x47 bit 3 + * + * @param v_fifo_tag_intr1_u8 :The value of fifo tag interrupt1 + * value | fifo tag interrupt + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr1_enable( +u8 *v_fifo_tag_intr1_u8); +/*! + * @brief This API set FIFO tag interrupt1 enable status + * from the resister 0x47 bit 3 + * + * @param v_fifo_tag_intr1_u8 :The value of fifo tag interrupt1 + * value | fifo tag interrupt + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr1_enable( +u8 v_fifo_tag_intr1_u8); +/*! + * @brief This API reads FIFO frame + * header enable from the register 0x47 bit 4 + * + * @param v_fifo_header_u8 :The value of fifo header + * value | fifo header + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_header_enable( +u8 *v_fifo_header_u8); +/*! + * @brief This API set FIFO frame + * header enable from the register 0x47 bit 4 + * + * @param v_fifo_header_u8 :The value of fifo header + * value | fifo header + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_header_enable( +u8 v_fifo_header_u8); +/*! + * @brief This API is used to read stored + * magnetometer data in FIFO (all 3 axes) from the register 0x47 bit 5 + * + * @param v_fifo_mag_u8 : The value of fifo mag enble + * value | fifo mag + * ----------|------------------- + * 0x00 | no magnetometer data is stored + * 0x01 | magnetometer data is stored + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_mag_enable( +u8 *v_fifo_mag_u8); +/*! + * @brief This API is used to set stored + * magnetometer data in FIFO (all 3 axes) from the register 0x47 bit 5 + * + * @param v_fifo_mag_u8 : The value of fifo mag enble + * value | fifo mag + * ----------|------------------- + * 0x00 | no magnetometer data is stored + * 0x01 | magnetometer data is stored + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_mag_enable( +u8 v_fifo_mag_u8); +/*! + * @brief This API is used to read stored + * accel data in FIFO (all 3 axes) from the register 0x47 bit 6 + * + * @param v_fifo_accel_u8 : The value of fifo accel enble + * value | fifo accel + * ----------|------------------- + * 0x00 | no accel data is stored + * 0x01 | accel data is stored + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_accel_enable( +u8 *v_fifo_accel_u8); +/*! + * @brief This API is used to set stored + * accel data in FIFO (all 3 axes) from the register 0x47 bit 6 + * + * @param v_fifo_accel_u8 : The value of fifo accel enble + * value | fifo accel + * ----------|------------------- + * 0x00 | no accel data is stored + * 0x01 | accel data is stored + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_accel_enable( +u8 v_fifo_accel_u8); +/*! + * @brief This API is used to read stored + * gyro data in FIFO (all 3 axes) from the resister 0x47 bit 7 + * + * + * @param v_fifo_gyro_u8 : The value of fifo gyro enble + * value | fifo gyro + * ----------|------------------- + * 0x00 | no gyro data is stored + * 0x01 | gyro data is stored + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_gyro_enable( +u8 *v_fifo_gyro_u8); +/*! + * @brief This API is used to set stored + * gyro data in FIFO (all 3 axes) from the resister 0x47 bit 7 + * + * + * @param v_fifo_gyro_u8 : The value of fifo gyro enble + * value | fifo gyro + * ----------|------------------- + * 0x00 | no gyro data is stored + * 0x01 | gyro data is stored + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_gyro_enable( +u8 v_fifo_gyro_u8); +/***************************************************************/ +/**\name FUNCTION FOR MAG I2C ADDRESS SELECTION */ +/***************************************************************/ +/*! + * @brief This API is used to read + * I2C device address of auxiliary mag from the register 0x4B bit 1 to 7 + * + * + * + * + * @param v_i2c_device_addr_u8 : The value of mag I2C device address + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_device_addr( +u8 *v_i2c_device_addr_u8); +/*! + * @brief This API is used to set + * I2C device address of auxiliary mag from the register 0x4B bit 1 to 7 + * + * + * + * + * @param v_i2c_device_addr_u8 : The value of mag I2C device address + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_device_addr( +u8 v_i2c_device_addr_u8); +/*! + * @brief This API is used to read + * Burst data length (1,2,6,8 byte) from the register 0x4C bit 0 to 1 + * + * + * + * + * @param v_mag_burst_u8 : The data of mag burst read lenth + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_burst( +u8 *v_mag_burst_u8); +/*! + * @brief This API is used to set + * Burst data length (1,2,6,8 byte) from the register 0x4C bit 0 to 1 + * + * + * + * + * @param v_mag_burst_u8 : The data of mag burst read lenth + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_burst( +u8 v_mag_burst_u8); +/***************************************************************/ +/**\name FUNCTION FOR MAG OFFSET */ +/***************************************************************/ +/*! + * @brief This API is used to read + * trigger-readout offset in units of 2.5 ms. If set to zero, + * the offset is maximum, i.e. after readout a trigger + * is issued immediately. from the register 0x4C bit 2 to 5 + * + * + * + * + * @param v_mag_offset_u8 : The value of mag offset + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_offset( +u8 *v_mag_offset_u8); +/*! + * @brief This API is used to set + * trigger-readout offset in units of 2.5 ms. If set to zero, + * the offset is maximum, i.e. after readout a trigger + * is issued immediately. from the register 0x4C bit 2 to 5 + * + * + * + * + * @param v_mag_offset_u8 : The value of mag offset + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_offset( +u8 v_mag_offset_u8); +/***************************************************************/ +/**\name FUNCTION FOR MAG MANUAL/AUTO MODE SELECTION */ +/***************************************************************/ +/*! + * @brief This API is used to read + * Enable register access on MAG_IF[2] or MAG_IF[3] writes. + * This implies that the DATA registers are not updated with + * magnetometer values. Accessing magnetometer requires + * the magnetometer in normal mode in PMU_STATUS. + * from the register 0x4C bit 7 + * + * + * + * @param v_mag_manual_u8 : The value of mag manual enable + * value | mag manual + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_enable( +u8 *v_mag_manual_u8); +/*! + * @brief This API is used to set + * Enable register access on MAG_IF[2] or MAG_IF[3] writes. + * This implies that the DATA registers are not updated with + * magnetometer values. Accessing magnetometer requires + * the magnetometer in normal mode in PMU_STATUS. + * from the register 0x4C bit 7 + * + * + * + * @param v_mag_manual_u8 : The value of mag manual enable + * value | mag manual + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_manual_enable( +u8 v_mag_manual_u8); +/***************************************************************/ +/**\name FUNCTIONS FOR MAG READ, WRITE AND WRITE DATA ADDRESS */ +/***************************************************************/ +/*! + * @brief This API is used to read data + * magnetometer address to read from the register 0x4D bit 0 to 7 + * @brief It used to provide mag read address of auxiliary mag + * + * + * + * + * @param v_mag_read_addr_u8 : The value of address need to be read + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_read_addr( +u8 *v_mag_read_addr_u8); +/*! + * @brief This API is used to set + * magnetometer write address from the register 0x4D bit 0 to 7 + * @brief mag write address writes the address of auxiliary mag to write + * + * + * + * @param v_mag_read_addr_u8: + * The data of auxiliary mag address to write data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_read_addr( +u8 v_mag_read_addr_u8); +/*! + * @brief This API is used to read + * magnetometer write address from the register 0x4E bit 0 to 7 + * @brief mag write address writes the address of auxiliary mag to write + * + * + * + * @param v_mag_write_addr_u8: + * The data of auxiliary mag address to write data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_addr( +u8 *v_mag_write_addr_u8); +/*! + * @brief This API is used to set + * magnetometer write address from the register 0x4E bit 0 to 7 + * @brief mag write address writes the address of auxiliary mag to write + * + * + * + * @param v_mag_write_addr_u8: + * The data of auxiliary mag address to write data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_addr( +u8 v_mag_write_addr_u8); +/*! + * @brief This API is used to read magnetometer write data + * form the resister 0x4F bit 0 to 7 + * @brief This writes the data will be wrote to mag + * + * + * + * @param v_mag_write_data_u8: The value of mag data + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_data( +u8 *v_mag_write_data_u8); +/*! + * @brief This API is used to set magnetometer write data + * form the resister 0x4F bit 0 to 7 + * @brief This writes the data will be wrote to mag + * + * + * + * @param v_mag_write_data_u8: The value of mag data + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_data( +u8 v_mag_write_data_u8); +/***************************************************************/ +/**\name FUNCTION FOR INTERRUPT ENABLE OF +ANY-MOTION XYZ, DOUBLE AND SINGLE TAP, ORIENT AND FLAT */ +/***************************************************************/ +/*! + * @brief This API is used to read + * interrupt enable from the register 0x50 bit 0 to 7 + * + * + * + * + * @param v_enable_u8 : Value to decided to select interrupt + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_ANY_MOTION_X_ENABLE + * 1 | BMI160_ANY_MOTION_Y_ENABLE + * 2 | BMI160_ANY_MOTION_Z_ENABLE + * 3 | BMI160_DOUBLE_TAP_ENABLE + * 4 | BMI160_SINGLE_TAP_ENABLE + * 5 | BMI160_ORIENT_ENABLE + * 6 | BMI160_FLAT_ENABLE + * + * @param v_intr_enable_zero_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_0( +u8 enable, u8 *v_intr_enable_zero_u8); +/*! + * @brief This API is used to set + * interrupt enable from the register 0x50 bit 0 to 7 + * + * + * + * + * @param v_enable_u8 : Value to decided to select interrupt + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_ANY_MOTION_X_ENABLE + * 1 | BMI160_ANY_MOTION_Y_ENABLE + * 2 | BMI160_ANY_MOTION_Z_ENABLE + * 3 | BMI160_DOUBLE_TAP_ENABLE + * 4 | BMI160_SINGLE_TAP_ENABLE + * 5 | BMI160_ORIENT_ENABLE + * 6 | BMI160_FLAT_ENABLE + * + * @param v_intr_enable_zero_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_0( +u8 enable, u8 v_intr_enable_zero_u8); +/***************************************************************/ +/**\name FUNCTION FOR INTERRUPT ENABLE OF +HIGH_G XYZ, LOW_G, DATA READY, FIFO FULL AND FIFO WATER MARK */ +/***************************************************************/ +/*! + * @brief This API is used to read + * interrupt enable byte1 from the register 0x51 bit 0 to 6 + * @brief It read the high_g_x,high_g_y,high_g_z,low_g_enable + * data ready, fifo full and fifo water mark. + * + * + * + * @param v_enable_u8 : The value of interrupt enable + * @param v_enable_u8 : Value to decided to select interrupt + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_HIGH_G_X_ENABLE + * 1 | BMI160_HIGH_G_Y_ENABLE + * 2 | BMI160_HIGH_G_Z_ENABLE + * 3 | BMI160_LOW_G_ENABLE + * 4 | BMI160_DATA_RDY_ENABLE + * 5 | BMI160_FIFO_FULL_ENABLE + * 6 | BMI160_FIFO_WM_ENABLE + * + * @param v_intr_enable_1_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_1( +u8 enable, u8 *v_intr_enable_1_u8); +/*! + * @brief This API is used to set + * interrupt enable byte1 from the register 0x51 bit 0 to 6 + * @brief It read the high_g_x,high_g_y,high_g_z,low_g_enable + * data ready, fifo full and fifo water mark. + * + * + * + * @param v_enable_u8 : The value of interrupt enable + * @param v_enable_u8 : Value to decided to select interrupt + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_HIGH_G_X_ENABLE + * 1 | BMI160_HIGH_G_Y_ENABLE + * 2 | BMI160_HIGH_G_Z_ENABLE + * 3 | BMI160_LOW_G_ENABLE + * 4 | BMI160_DATA_RDY_ENABLE + * 5 | BMI160_FIFO_FULL_ENABLE + * 6 | BMI160_FIFO_WM_ENABLE + * + * @param v_intr_enable_1_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_1( +u8 enable, u8 v_intr_enable_1_u8); +/***************************************************************/ +/**\name FUNCTION FOR INTERRUPT ENABLE OF +NO MOTION XYZ */ +/***************************************************************/ +/*! + * @brief This API is used to read + * interrupt enable byte2 from the register bit 0x52 bit 0 to 3 + * @brief It reads no motion x,y and z + * + * + * + * @param v_enable_u8: The value of interrupt enable + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_NOMOTION_X_ENABLE + * 1 | BMI160_NOMOTION_Y_ENABLE + * 2 | BMI160_NOMOTION_Z_ENABLE + * + * @param v_intr_enable_2_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_2( +u8 enable, u8 *v_intr_enable_2_u8); +/*! + * @brief This API is used to set + * interrupt enable byte2 from the register bit 0x52 bit 0 to 3 + * @brief It reads no motion x,y and z + * + * + * + * @param v_enable_u8: The value of interrupt enable + * v_enable_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_NOMOTION_X_ENABLE + * 1 | BMI160_NOMOTION_Y_ENABLE + * 2 | BMI160_NOMOTION_Z_ENABLE + * + * @param v_intr_enable_2_u8 : The interrupt enable value + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_2( +u8 enable, u8 v_intr_enable_2_u8); +/***************************************************************/ +/**\name FUNCTION FOR INTERRUPT ENABLE OF + STEP DETECTOR */ +/***************************************************************/ + /*! + * @brief This API is used to read + * interrupt enable step detector interrupt from + * the register bit 0x52 bit 3 + * + * + * + * + * @param v_step_intr_u8 : The value of step detector interrupt enable + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_detector_enable( +u8 *v_step_intr_u8); + /*! + * @brief This API is used to set + * interrupt enable step detector interrupt from + * the register bit 0x52 bit 3 + * + * + * + * + * @param v_step_intr_u8 : The value of step detector interrupt enable + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_detector_enable( +u8 v_step_intr_u8); +/***************************************************************/ +/**\name FUNCTION FOR INTERRUPT CONTROL */ +/***************************************************************/ +/*! + * @brief Configure trigger condition of interrupt1 + * and interrupt2 pin from the register 0x53 + * @brief interrupt1 - bit 0 + * @brief interrupt2 - bit 4 + * + * @param v_channel_u8: The value of edge trigger selection + * v_channel_u8 | Edge trigger + * ---------------|--------------- + * 0 | BMI160_INTR1_EDGE_CTRL + * 1 | BMI160_INTR2_EDGE_CTRL + * + * @param v_intr_edge_ctrl_u8 : The value of edge trigger enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_EDGE + * 0x00 | BMI160_LEVEL + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_edge_ctrl( +u8 v_channel_u8, u8 *v_intr_edge_ctrl_u8); +/*! + * @brief Configure trigger condition of interrupt1 + * and interrupt2 pin from the register 0x53 + * @brief interrupt1 - bit 0 + * @brief interrupt2 - bit 4 + * + * @param v_channel_u8: The value of edge trigger selection + * v_channel_u8 | Edge trigger + * ---------------|--------------- + * 0 | BMI160_INTR1_EDGE_CTRL + * 1 | BMI160_INTR2_EDGE_CTRL + * + * @param v_intr_edge_ctrl_u8 : The value of edge trigger enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_EDGE + * 0x00 | BMI160_LEVEL + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_edge_ctrl( +u8 v_channel_u8, u8 v_intr_edge_ctrl_u8); +/*! + * @brief API used for get the Configure level condition of interrupt1 + * and interrupt2 pin form the register 0x53 + * @brief interrupt1 - bit 1 + * @brief interrupt2 - bit 5 + * + * @param v_channel_u8: The value of level condition selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_LEVEL + * 1 | BMI160_INTR2_LEVEL + * + * @param v_intr_level_u8 : The value of level of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_LEVEL_HIGH + * 0x00 | BMI160_LEVEL_LOW + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_level( +u8 v_channel_u8, u8 *v_intr_level_u8); +/*! + * @brief API used for set the Configure level condition of interrupt1 + * and interrupt2 pin form the register 0x53 + * @brief interrupt1 - bit 1 + * @brief interrupt2 - bit 5 + * + * @param v_channel_u8: The value of level condition selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_LEVEL + * 1 | BMI160_INTR2_LEVEL + * + * @param v_intr_level_u8 : The value of level of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_LEVEL_HIGH + * 0x00 | BMI160_LEVEL_LOW + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_level( +u8 v_channel_u8, u8 v_intr_level_u8); +/*! + * @brief API used to get configured output enable of interrupt1 + * and interrupt2 from the register 0x53 + * @brief interrupt1 - bit 2 + * @brief interrupt2 - bit 6 + * + * + * @param v_channel_u8: The value of output type enable selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_OUTPUT_TYPE + * 1 | BMI160_INTR2_OUTPUT_TYPE + * + * @param v_intr_output_type_u8 : + * The value of output type of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_OPEN_DRAIN + * 0x00 | BMI160_PUSH_PULL + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_output_type( +u8 v_channel_u8, u8 *v_intr_output_type_u8); +/*! + * @brief API used to set output enable of interrupt1 + * and interrupt2 from the register 0x53 + * @brief interrupt1 - bit 2 + * @brief interrupt2 - bit 6 + * + * + * @param v_channel_u8: The value of output type enable selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_OUTPUT_TYPE + * 1 | BMI160_INTR2_OUTPUT_TYPE + * + * @param v_intr_output_type_u8 : + * The value of output type of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_OPEN_DRAIN + * 0x00 | BMI160_PUSH_PULL + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_output_type( +u8 v_channel_u8, u8 v_intr_output_type_u8); + /*! + * @brief API used to get the Output enable for interrupt1 + * and interrupt1 pin from the register 0x53 + * @brief interrupt1 - bit 3 + * @brief interrupt2 - bit 7 + * + * @param v_channel_u8: The value of output enable selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_OUTPUT_TYPE + * 1 | BMI160_INTR2_OUTPUT_TYPE + * + * @param v_output_enable_u8 : + * The value of output enable of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_INPUT + * 0x00 | BMI160_OUTPUT + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_output_enable( +u8 v_channel_u8, u8 *v_output_enable_u8); + /*! + * @brief API used to set the Output enable for interrupt1 + * and interrupt1 pin from the register 0x53 + * @brief interrupt1 - bit 3 + * @brief interrupt2 - bit 7 + * + * @param v_channel_u8: The value of output enable selection + * v_channel_u8 | level selection + * ---------------|--------------- + * 0 | BMI160_INTR1_OUTPUT_TYPE + * 1 | BMI160_INTR2_OUTPUT_TYPE + * + * @param v_output_enable_u8 : + * The value of output enable of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_INPUT + * 0x00 | BMI160_OUTPUT + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_output_enable( +u8 v_channel_u8, u8 v_output_enable_u8); +/***************************************************************/ +/**\name FUNCTION FOR INTERRUPT LATCH INTERRUPT */ +/***************************************************************/ +/*! +* @brief This API is used to get the latch duration +* from the register 0x54 bit 0 to 3 +* @brief This latch selection is not applicable for data ready, +* orientation and flat interrupts. +* +* +* +* @param v_latch_intr_u8 : The value of latch duration +* Latch Duration | value +* --------------------------------------|------------------ +* BMI160_LATCH_DUR_NONE | 0x00 +* BMI160_LATCH_DUR_312_5_MICRO_SEC | 0x01 +* BMI160_LATCH_DUR_625_MICRO_SEC | 0x02 +* BMI160_LATCH_DUR_1_25_MILLI_SEC | 0x03 +* BMI160_LATCH_DUR_2_5_MILLI_SEC | 0x04 +* BMI160_LATCH_DUR_5_MILLI_SEC | 0x05 +* BMI160_LATCH_DUR_10_MILLI_SEC | 0x06 +* BMI160_LATCH_DUR_20_MILLI_SEC | 0x07 +* BMI160_LATCH_DUR_40_MILLI_SEC | 0x08 +* BMI160_LATCH_DUR_80_MILLI_SEC | 0x09 +* BMI160_LATCH_DUR_160_MILLI_SEC | 0x0A +* BMI160_LATCH_DUR_320_MILLI_SEC | 0x0B +* BMI160_LATCH_DUR_640_MILLI_SEC | 0x0C +* BMI160_LATCH_DUR_1_28_SEC | 0x0D +* BMI160_LATCH_DUR_2_56_SEC | 0x0E +* BMI160_LATCHED | 0x0F +* +* +* +* @return results of bus communication function +* @retval 0 -> Success +* @retval -1 -> Error +* +* +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_latch_intr( +u8 *v_latch_intr_u8); +/*! +* @brief This API is used to set the latch duration +* from the register 0x54 bit 0 to 3 +* @brief This latch selection is not applicable for data ready, +* orientation and flat interrupts. +* +* +* +* @param v_latch_intr_u8 : The value of latch duration +* Latch Duration | value +* --------------------------------------|------------------ +* BMI160_LATCH_DUR_NONE | 0x00 +* BMI160_LATCH_DUR_312_5_MICRO_SEC | 0x01 +* BMI160_LATCH_DUR_625_MICRO_SEC | 0x02 +* BMI160_LATCH_DUR_1_25_MILLI_SEC | 0x03 +* BMI160_LATCH_DUR_2_5_MILLI_SEC | 0x04 +* BMI160_LATCH_DUR_5_MILLI_SEC | 0x05 +* BMI160_LATCH_DUR_10_MILLI_SEC | 0x06 +* BMI160_LATCH_DUR_20_MILLI_SEC | 0x07 +* BMI160_LATCH_DUR_40_MILLI_SEC | 0x08 +* BMI160_LATCH_DUR_80_MILLI_SEC | 0x09 +* BMI160_LATCH_DUR_160_MILLI_SEC | 0x0A +* BMI160_LATCH_DUR_320_MILLI_SEC | 0x0B +* BMI160_LATCH_DUR_640_MILLI_SEC | 0x0C +* BMI160_LATCH_DUR_1_28_SEC | 0x0D +* BMI160_LATCH_DUR_2_56_SEC | 0x0E +* BMI160_LATCHED | 0x0F +* +* +* +* @return results of bus communication function +* @retval 0 -> Success +* @retval -1 -> Error +* +* +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_latch_intr( +u8 v_latch_intr_u8); +/*! + * @brief API used to get input enable for interrupt1 + * and interrupt2 pin from the register 0x54 + * @brief interrupt1 - bit 4 + * @brief interrupt2 - bit 5 + * + * @param v_channel_u8: The value of input enable selection + * v_channel_u8 | input selection + * ---------------|--------------- + * 0 | BMI160_INTR1_INPUT_ENABLE + * 1 | BMI160_INTR2_INPUT_ENABLE + * + * @param v_input_en_u8 : + * The value of input enable of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_INPUT + * 0x00 | BMI160_OUTPUT + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_input_enable( +u8 v_channel_u8, u8 *v_input_en_u8); +/*! + * @brief API used to set input enable for interrupt1 + * and interrupt2 pin from the register 0x54 + * @brief interrupt1 - bit 4 + * @brief interrupt2 - bit 5 + * + * @param v_channel_u8: The value of input enable selection + * v_channel_u8 | input selection + * ---------------|--------------- + * 0 | BMI160_INTR1_INPUT_ENABLE + * 1 | BMI160_INTR2_INPUT_ENABLE + * + * @param v_input_en_u8 : + * The value of input enable of interrupt enable + * value | Behaviour + * ----------|------------------- + * 0x01 | BMI160_INPUT + * 0x00 | BMI160_OUTPUT + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_input_enable( +u8 v_channel_u8, u8 v_input_en_u8); +/***************************************************************/ +/**\name FUNCTION FOR INTERRUPT1 AND INTERRUPT2 MAPPING */ +/***************************************************************/ + /*! + * @brief reads the Low g interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 0 in the register 0x55 + * @brief interrupt2 bit 0 in the register 0x57 + * + * + * @param v_channel_u8: The value of low_g selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_LOW_G + * 1 | BMI160_INTR2_MAP_LOW_G + * + * @param v_intr_low_g_u8 : The value of low_g enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g( +u8 v_channel_u8, u8 *v_intr_low_g_u8); + /*! + * @brief set the Low g interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 0 in the register 0x55 + * @brief interrupt2 bit 0 in the register 0x57 + * + * + * @param v_channel_u8: The value of low_g selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_LOW_G + * 1 | BMI160_INTR2_MAP_LOW_G + * + * @param v_intr_low_g_u8 : The value of low_g enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g( +u8 v_channel_u8, u8 v_intr_low_g_u8); +/*! + * @brief Reads the HIGH g interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 1 in the register 0x55 + * @brief interrupt2 bit 1 in the register 0x57 + * + * + * @param v_channel_u8: The value of high_g selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_HIGH_G + * 1 | BMI160_INTR2_MAP_HIGH_G + * + * @param v_intr_high_g_u8 : The value of high_g enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g( +u8 v_channel_u8, u8 *v_intr_high_g_u8); +/*! + * @brief Write the HIGH g interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 1 in the register 0x55 + * @brief interrupt2 bit 1 in the register 0x57 + * + * + * @param v_channel_u8: The value of high_g selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_HIGH_G + * 1 | BMI160_INTR2_MAP_HIGH_G + * + * @param v_intr_high_g_u8 : The value of high_g enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g( +u8 v_channel_u8, u8 v_intr_high_g_u8); +/*! + * @brief Reads the Any motion interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 2 in the register 0x55 + * @brief interrupt2 bit 2 in the register 0x57 + * + * + * @param v_channel_u8: The value of any motion selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_ANY_MOTION + * 1 | BMI160_INTR2_MAP_ANY_MOTION + * + * @param v_intr_any_motion_u8 : The value of any motion enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion( +u8 v_channel_u8, u8 *v_intr_any_motion_u8); +/*! + * @brief Write the Any motion interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 2 in the register 0x55 + * @brief interrupt2 bit 2 in the register 0x57 + * + * + * @param v_channel_u8: The value of any motion selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_ANY_MOTION + * 1 | BMI160_INTR2_MAP_ANY_MOTION + * + * @param v_intr_any_motion_u8 : The value of any motion enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion( +u8 v_channel_u8, u8 v_intr_any_motion_u8); +/*! + * @brief Reads the No motion interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 3 in the register 0x55 + * @brief interrupt2 bit 3 in the register 0x57 + * + * + * @param v_channel_u8: The value of no motion selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_NOMO + * 1 | BMI160_INTR2_MAP_NOMO + * + * @param v_intr_nomotion_u8 : The value of no motion enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_nomotion( +u8 v_channel_u8, u8 *v_intr_nomotion_u8); +/*! + * @brief Write the No motion interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 3 in the register 0x55 + * @brief interrupt2 bit 3 in the register 0x57 + * + * + * @param v_channel_u8: The value of no motion selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_NOMO + * 1 | BMI160_INTR2_MAP_NOMO + * + * @param v_intr_nomotion_u8 : The value of no motion enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_nomotion( +u8 v_channel_u8, u8 v_intr_nomotion_u8); +/*! + * @brief Reads the Double Tap interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 4 in the register 0x55 + * @brief interrupt2 bit 4 in the register 0x57 + * + * + * @param v_channel_u8: The value of double tap interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_DOUBLE_TAP + * 1 | BMI160_INTR2_MAP_DOUBLE_TAP + * + * @param v_intr_double_tap_u8 : The value of double tap enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_double_tap( +u8 v_channel_u8, u8 *v_intr_double_tap_u8); +/*! + * @brief Write the Double Tap interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 4 in the register 0x55 + * @brief interrupt2 bit 4 in the register 0x57 + * + * + * @param v_channel_u8: The value of double tap interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_DOUBLE_TAP + * 1 | BMI160_INTR2_MAP_DOUBLE_TAP + * + * @param v_intr_double_tap_u8 : The value of double tap enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_double_tap( +u8 v_channel_u8, u8 v_intr_double_tap_u8); +/*! + * @brief Reads the Single Tap interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 5 in the register 0x55 + * @brief interrupt2 bit 5 in the register 0x57 + * + * + * @param v_channel_u8: The value of single tap interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_SINGLE_TAP + * 1 | BMI160_INTR2_MAP_SINGLE_TAP + * + * @param v_intr_single_tap_u8 : The value of single tap enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_single_tap( +u8 v_channel_u8, u8 *v_intr_single_tap_u8); +/*! + * @brief Write the Single Tap interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 5 in the register 0x55 + * @brief interrupt2 bit 5 in the register 0x57 + * + * + * @param v_channel_u8: The value of single tap interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_SINGLE_TAP + * 1 | BMI160_INTR2_MAP_SINGLE_TAP + * + * @param v_intr_single_tap_u8 : The value of single tap enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_single_tap( +u8 v_channel_u8, u8 v_intr_single_tap_u8); +/*! + * @brief Reads the Orient interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 6 in the register 0x55 + * @brief interrupt2 bit 6 in the register 0x57 + * + * + * @param v_channel_u8: The value of orient interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_ORIENT + * 1 | BMI160_INTR2_MAP_ORIENT + * + * @param v_intr_orient_u8 : The value of orient enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient( +u8 v_channel_u8, u8 *v_intr_orient_u8); +/*! + * @brief Write the Orient interrupt + * interrupt mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 6 in the register 0x55 + * @brief interrupt2 bit 6 in the register 0x57 + * + * + * @param v_channel_u8: The value of orient interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_ORIENT + * 1 | BMI160_INTR2_MAP_ORIENT + * + * @param v_intr_orient_u8 : The value of orient enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient( +u8 v_channel_u8, u8 v_intr_orient_u8); + /*! + * @brief Reads the Flat interrupt + * mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 7 in the register 0x55 + * @brief interrupt2 bit 7 in the register 0x57 + * + * + * @param v_channel_u8: The value of flat interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FLAT + * 1 | BMI160_INTR2_MAP_FLAT + * + * @param v_intr_flat_u8 : The value of flat enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat( +u8 v_channel_u8, u8 *v_intr_flat_u8); + /*! + * @brief Write the Flat interrupt + * mapped to interrupt1 + * and interrupt2 from the register 0x55 and 0x57 + * @brief interrupt1 bit 7 in the register 0x55 + * @brief interrupt2 bit 7 in the register 0x57 + * + * + * @param v_channel_u8: The value of flat interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FLAT + * 1 | BMI160_INTR2_MAP_FLAT + * + * @param v_intr_flat_u8 : The value of flat enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat( +u8 v_channel_u8, u8 v_intr_flat_u8); +/*! + * @brief Reads PMU trigger interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 0 and 4 + * @brief interrupt1 bit 0 in the register 0x56 + * @brief interrupt2 bit 4 in the register 0x56 + * + * + * @param v_channel_u8: The value of pmu trigger selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_PMUTRIG + * 1 | BMI160_INTR2_MAP_PMUTRIG + * + * @param v_intr_pmu_trig_u8 : The value of pmu trigger enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_pmu_trig( +u8 v_channel_u8, u8 *v_intr_pmu_trig_u8); +/*! + * @brief Write PMU trigger interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 0 and 4 + * @brief interrupt1 bit 0 in the register 0x56 + * @brief interrupt2 bit 4 in the register 0x56 + * + * + * @param v_channel_u8: The value of pmu trigger selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_PMUTRIG + * 1 | BMI160_INTR2_MAP_PMUTRIG + * + * @param v_intr_pmu_trig_u8 : The value of pmu trigger enable + * value | trigger enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_pmu_trig( +u8 v_channel_u8, u8 v_intr_pmu_trig_u8); +/*! + * @brief Reads FIFO Full interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 5 and 1 + * @brief interrupt1 bit 5 in the register 0x56 + * @brief interrupt2 bit 1 in the register 0x56 + * + * + * @param v_channel_u8: The value of fifo full interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FIFO_FULL + * 1 | BMI160_INTR2_MAP_FIFO_FULL + * + * @param v_intr_fifo_full_u8 : The value of fifo full interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_full( +u8 v_channel_u8, u8 *v_intr_fifo_full_u8); +/*! + * @brief Write FIFO Full interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 5 and 1 + * @brief interrupt1 bit 5 in the register 0x56 + * @brief interrupt2 bit 1 in the register 0x56 + * + * + * @param v_channel_u8: The value of fifo full interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FIFO_FULL + * 1 | BMI160_INTR2_MAP_FIFO_FULL + * + * @param v_intr_fifo_full_u8 : The value of fifo full interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_full( +u8 v_channel_u8, u8 v_intr_fifo_full_u8); +/*! + * @brief Reads FIFO Watermark interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 6 and 2 + * @brief interrupt1 bit 6 in the register 0x56 + * @brief interrupt2 bit 2 in the register 0x56 + * + * + * @param v_channel_u8: The value of fifo Watermark interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FIFO_WM + * 1 | BMI160_INTR2_MAP_FIFO_WM + * + * @param v_intr_fifo_wm_u8 : The value of fifo Watermark interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_wm( +u8 v_channel_u8, u8 *v_intr_fifo_wm_u8); +/*! + * @brief Write FIFO Watermark interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 bit 6 and 2 + * @brief interrupt1 bit 6 in the register 0x56 + * @brief interrupt2 bit 2 in the register 0x56 + * + * + * @param v_channel_u8: The value of fifo Watermark interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_FIFO_WM + * 1 | BMI160_INTR2_MAP_FIFO_WM + * + * @param v_intr_fifo_wm_u8 : The value of fifo Watermark interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_wm( +u8 v_channel_u8, u8 v_intr_fifo_wm_u8); +/*! + * @brief Reads Data Ready interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 + * @brief interrupt1 bit 7 in the register 0x56 + * @brief interrupt2 bit 3 in the register 0x56 + * + * + * @param v_channel_u8: The value of data ready interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_DATA_RDY + * 1 | BMI160_INTR2_MAP_DATA_RDY + * + * @param v_intr_data_rdy_u8 : The value of data ready interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_data_rdy( +u8 v_channel_u8, u8 *v_intr_data_rdy_u8); +/*! + * @brief Write Data Ready interrupt mapped to interrupt1 + * and interrupt2 form the register 0x56 + * @brief interrupt1 bit 7 in the register 0x56 + * @brief interrupt2 bit 3 in the register 0x56 + * + * + * @param v_channel_u8: The value of data ready interrupt selection + * v_channel_u8 | interrupt + * ---------------|--------------- + * 0 | BMI160_INTR1_MAP_DATA_RDY + * 1 | BMI160_INTR2_MAP_DATA_RDY + * + * @param v_intr_data_rdy_u8 : The value of data ready interrupt enable + * value | interrupt enable + * ----------|------------------- + * 0x01 | BMI160_ENABLE + * 0x00 | BMI160_DISABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_data_rdy( +u8 v_channel_u8, u8 v_intr_data_rdy_u8); +/***************************************************************/ +/**\name FUNCTION FOR TAP SOURCE CONFIGURATION */ +/***************************************************************/ + /*! + * @brief This API reads data source for the interrupt + * engine for the single and double tap interrupts from the register + * 0x58 bit 3 + * + * + * @param v_tap_source_u8 : The value of the tap source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_source( +u8 *v_tap_source_u8); + /*! + * @brief This API write data source for the interrupt + * engine for the single and double tap interrupts from the register + * 0x58 bit 3 + * + * + * @param v_tap_source_u8 : The value of the tap source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_source( +u8 v_tap_source_u8); +/***************************************************************/ +/**\name FUNCTION FOR LOW_G AND HIGH_G SOURCE CONFIGURATION */ +/***************************************************************/ + /*! + * @brief This API Reads Data source for the + * interrupt engine for the low and high g interrupts + * from the register 0x58 bit 7 + * + * @param v_low_high_source_u8 : The value of the tap source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_high_source( +u8 *v_low_high_source_u8); + /*! + * @brief This API write Data source for the + * interrupt engine for the low and high g interrupts + * from the register 0x58 bit 7 + * + * @param v_low_high_source_u8 : The value of the tap source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_high_source( +u8 v_low_high_source_u8); +/***************************************************************/ +/**\name FUNCTION FOR MOTION SOURCE CONFIGURATION */ +/***************************************************************/ + /*! + * @brief This API reads Data source for the + * interrupt engine for the nomotion and anymotion interrupts + * from the register 0x59 bit 7 + * + * @param v_motion_source_u8 : + * The value of the any/no motion interrupt source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_motion_source( +u8 *v_motion_source_u8); + /*! + * @brief This API write Data source for the + * interrupt engine for the nomotion and anymotion interrupts + * from the register 0x59 bit 7 + * + * @param v_motion_source_u8 : + * The value of the any/no motion interrupt source + * value | Description + * ----------|------------------- + * 0x01 | UNFILTER_DATA + * 0x00 | FILTER_DATA + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_motion_source( +u8 v_motion_source_u8); +/***************************************************************/ +/**\name FUNCTION FOR LOW_G DURATION CONFIGURATION */ +/***************************************************************/ +/*! + * @brief This API is used to read the low_g duration from register + * 0x5A bit 0 to 7 + * + * + * + * + * @param v_low_g_durn_u8 : The value of low_g duration + * + * @note Low_g duration trigger trigger delay according to + * "(v_low_g_durn_u8 * 2.5)ms" in a range from 2.5ms to 640ms. + * the default corresponds delay is 20ms + * @note When low_g data source of interrupt is unfiltered + * the sensor must not be in low power mode + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_durn( +u8 *v_low_durn_u8); + /*! + * @brief This API is used to write the low_g duration from register + * 0x5A bit 0 to 7 + * + * + * + * + * @param v_low_g_durn_u8 : The value of low_g duration + * + * @note Low_g duration trigger trigger delay according to + * "(v_low_g_durn_u8 * 2.5)ms" in a range from 2.5ms to 640ms. + * the default corresponds delay is 20ms + * @note When low_g data source of interrupt is unfiltered + * the sensor must not be in low power mode + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_durn( +u8 v_low_durn_u8); +/***************************************************************/ +/**\name FUNCTION FOR LOW_G THRESH CONFIGURATION */ +/***************************************************************/ +/*! + * @brief This API is used to read Threshold + * definition for the low-g interrupt from the register 0x5B bit 0 to 7 + * + * + * + * + * @param v_low_g_thres_u8 : The value of low_g threshold + * + * @note Low_g interrupt trigger threshold according to + * (v_low_g_thres_u8 * 7.81)mg for v_low_g_thres_u8 > 0 + * 3.91 mg for v_low_g_thres_u8 = 0 + * The threshold range is form 3.91mg to 2.000mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_thres( +u8 *v_low_g_thres_u8); +/*! + * @brief This API is used to write Threshold + * definition for the low-g interrupt from the register 0x5B bit 0 to 7 + * + * + * + * + * @param v_low_g_thres_u8 : The value of low_g threshold + * + * @note Low_g interrupt trigger threshold according to + * (v_low_g_thres_u8 * 7.81)mg for v_low_g_thres_u8 > 0 + * 3.91 mg for v_low_g_thres_u8 = 0 + * The threshold range is form 3.91mg to 2.000mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_thres( +u8 v_low_g_thres_u8); +/***************************************************************/ +/**\name FUNCTION FOR LOW_G HYSTERESIS CONFIGURATION */ +/***************************************************************/ + /*! + * @brief This API Reads Low-g interrupt hysteresis + * from the register 0x5C bit 0 to 1 + * + * @param v_low_hyst_u8 :The value of low_g hysteresis + * + * @note Low_g hysteresis calculated by v_low_hyst_u8*125 mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_hyst( +u8 *v_low_hyst_u8); + /*! + * @brief This API write Low-g interrupt hysteresis + * from the register 0x5C bit 0 to 1 + * + * @param v_low_hyst_u8 :The value of low_g hysteresis + * + * @note Low_g hysteresis calculated by v_low_hyst_u8*125 mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_hyst( +u8 v_low_hyst_u8); +/***************************************************************/ +/**\name FUNCTION FOR LOW_G MODE CONFIGURATION */ +/***************************************************************/ +/*! + * @brief This API reads Low-g interrupt mode + * from the register 0x5C bit 2 + * + * @param v_low_g_mode_u8 : The value of low_g mode + * Value | Description + * ----------|----------------- + * 0 | single-axis + * 1 | axis-summing + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_mode( +u8 *v_low_g_mode_u8); +/*! + * @brief This API write Low-g interrupt mode + * from the register 0x5C bit 2 + * + * @param v_low_g_mode_u8 : The value of low_g mode + * Value | Description + * ----------|----------------- + * 0 | single-axis + * 1 | axis-summing + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_mode( +u8 v_low_g_mode_u8); +/***************************************************************/ +/**\name FUNCTION FOR HIGH_G HYST CONFIGURATION */ +/***************************************************************/ +/*! + * @brief This API reads High-g interrupt hysteresis + * from the register 0x5C bit 6 and 7 + * + * @param v_high_g_hyst_u8 : The value of high hysteresis + * + * @note High_g hysteresis changes according to accel g range + * accel g range can be set by the function "" + * accel_range | high_g hysteresis + * ----------------|--------------------- + * 2g | high_hy*125 mg + * 4g | high_hy*250 mg + * 8g | high_hy*500 mg + * 16g | high_hy*1000 mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_hyst( +u8 *v_high_g_hyst_u8); +/*! + * @brief This API write High-g interrupt hysteresis + * from the register 0x5C bit 6 and 7 + * + * @param v_high_g_hyst_u8 : The value of high hysteresis + * + * @note High_g hysteresis changes according to accel g range + * accel g range can be set by the function "" + * accel_range | high_g hysteresis + * ----------------|--------------------- + * 2g | high_hy*125 mg + * 4g | high_hy*250 mg + * 8g | high_hy*500 mg + * 16g | high_hy*1000 mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_hyst( +u8 v_high_g_hyst_u8); +/***************************************************************/ +/**\name FUNCTION FOR HIGH_G DURATION CONFIGURATION */ +/***************************************************************/ +/*! + * @brief This API is used to read Delay + * time definition for the high-g interrupt from the register + * 0x5D bit 0 to 7 + * + * + * + * @param v_high_g_durn_u8 : The value of high duration + * + * @note High_g interrupt delay triggered according to + * v_high_g_durn_u8 * 2.5ms in a range from 2.5ms to 640ms + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_durn( +u8 *v_high_g_durn_u8); +/*! + * @brief This API is used to write Delay + * time definition for the high-g interrupt from the register + * 0x5D bit 0 to 7 + * + * + * + * @param v_high_g_durn_u8 : The value of high duration + * + * @note High_g interrupt delay triggered according to + * v_high_g_durn_u8 * 2.5ms in a range from 2.5ms to 640ms + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_durn( +u8 v_high_g_durn_u8); +/***************************************************************/ +/**\name FUNCTION FOR HIGH_G THRESHOLD CONFIGURATION */ +/***************************************************************/ +/*! + * @brief This API is used to read Threshold + * definition for the high-g interrupt from the register 0x5E 0 to 7 + * + * + * + * + * @param v_high_g_thres_u8 : Pointer holding the value of Threshold + * @note High_g threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | high_g threshold + * ----------------|--------------------- + * 2g | v_high_g_thres_u8*7.81 mg + * 4g | v_high_g_thres_u8*15.63 mg + * 8g | v_high_g_thres_u8*31.25 mg + * 16g | v_high_g_thres_u8*62.5 mg + * @note when v_high_g_thres_u8 = 0 + * accel_range | high_g threshold + * ----------------|--------------------- + * 2g | 3.91 mg + * 4g | 7.81 mg + * 8g | 15.63 mg + * 16g | 31.25 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_thres( +u8 *v_high_g_thres_u8); +/*! + * @brief This API is used to write Threshold + * definition for the high-g interrupt from the register 0x5E 0 to 7 + * + * + * + * + * @param v_high_g_thres_u8 : Pointer holding the value of Threshold + * @note High_g threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | high_g threshold + * ----------------|--------------------- + * 2g | v_high_g_thres_u8*7.81 mg + * 4g | v_high_g_thres_u8*15.63 mg + * 8g | v_high_g_thres_u8*31.25 mg + * 16g | v_high_g_thres_u8*62.5 mg + * @note when v_high_g_thres_u8 = 0 + * accel_range | high_g threshold + * ----------------|--------------------- + * 2g | 3.91 mg + * 4g | 7.81 mg + * 8g | 15.63 mg + * 16g | 31.25 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_thres( +u8 v_high_g_thres_u8); +/***************************************************************/ +/**\name FUNCTION FOR ANY MOTION DURATION CONFIGURATION */ +/***************************************************************/ +/*! + * @brief This API reads any motion duration + * from the register 0x5F bit 0 and 1 + * + * @param v_any_motion_durn_u8 : The value of any motion duration + * + * @note Any motion duration can be calculated by "v_any_motion_durn_u8 + 1" + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_durn( +u8 *v_any_motion_durn_u8); +/*! + * @brief This API write any motion duration + * from the register 0x5F bit 0 and 1 + * + * @param v_any_motion_durn_u8 : The value of any motion duration + * + * @note Any motion duration can be calculated by "v_any_motion_durn_u8 + 1" + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_durn( +u8 nomotion); +/***************************************************************/ +/**\name FUNCTION FOR SLOW NO MOTION DURATION CONFIGURATION */ +/***************************************************************/ + /*! + * @brief This API read Slow/no-motion + * interrupt trigger delay duration from the register 0x5F bit 2 to 7 + * + * @param v_slow_no_motion_u8 :The value of slow no motion duration + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * @note + * @note v_slow_no_motion_u8(5:4)=0b00 -> + * [v_slow_no_motion_u8(3:0) + 1] * 1.28s (1.28s-20.48s) + * @note v_slow_no_motion_u8(5:4)=1 -> + * [v_slow_no_motion_u8(3:0)+5] * 5.12s (25.6s-102.4s) + * @note v_slow_no_motion_u8(5)='1' -> + * [(v_slow_no_motion_u8:0)+11] * 10.24s (112.64s-430.08s); + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_durn( +u8 *v_slow_no_motion_u8); + /*! + * @brief This API write Slow/no-motion + * interrupt trigger delay duration from the register 0x5F bit 2 to 7 + * + * @param v_slow_no_motion_u8 :The value of slow no motion duration + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * @note + * @note v_slow_no_motion_u8(5:4)=0b00 -> + * [v_slow_no_motion_u8(3:0) + 1] * 1.28s (1.28s-20.48s) + * @note v_slow_no_motion_u8(5:4)=1 -> + * [v_slow_no_motion_u8(3:0)+5] * 5.12s (25.6s-102.4s) + * @note v_slow_no_motion_u8(5)='1' -> + * [(v_slow_no_motion_u8:0)+11] * 10.24s (112.64s-430.08s); + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_durn( +u8 v_slow_no_motion_u8); +/***************************************************************/ +/**\name FUNCTION FOR ANY MOTION THRESHOLD CONFIGURATION */ +/***************************************************************/ +/*! + * @brief This API is used to read threshold + * definition for the any-motion interrupt + * from the register 0x60 bit 0 to 7 + * + * + * @param v_any_motion_thres_u8 : The value of any motion threshold + * + * @note any motion threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | any motion threshold + * ----------------|--------------------- + * 2g | v_any_motion_thres_u8*3.91 mg + * 4g | v_any_motion_thres_u8*7.81 mg + * 8g | v_any_motion_thres_u8*15.63 mg + * 16g | v_any_motion_thres_u8*31.25 mg + * @note when v_any_motion_thres_u8 = 0 + * accel_range | any motion threshold + * ----------------|--------------------- + * 2g | 1.95 mg + * 4g | 3.91 mg + * 8g | 7.81 mg + * 16g | 15.63 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_thres( +u8 *v_any_motion_thres_u8); +/*! + * @brief This API is used to write threshold + * definition for the any-motion interrupt + * from the register 0x60 bit 0 to 7 + * + * + * @param v_any_motion_thres_u8 : The value of any motion threshold + * + * @note any motion threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | any motion threshold + * ----------------|--------------------- + * 2g | v_any_motion_thres_u8*3.91 mg + * 4g | v_any_motion_thres_u8*7.81 mg + * 8g | v_any_motion_thres_u8*15.63 mg + * 16g | v_any_motion_thres_u8*31.25 mg + * @note when v_any_motion_thres_u8 = 0 + * accel_range | any motion threshold + * ----------------|--------------------- + * 2g | 1.95 mg + * 4g | 3.91 mg + * 8g | 7.81 mg + * 16g | 15.63 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_thres( +u8 v_any_motion_thres_u8); +/***************************************************************/ +/**\name FUNCTION FOR SLO/NO MOTION THRESHOLD CONFIGURATION */ +/***************************************************************/ + /*! + * @brief This API is used to read threshold + * for the slow/no-motion interrupt + * from the register 0x61 bit 0 to 7 + * + * + * + * + * @param v_slow_no_motion_thres_u8 : The value of slow no motion threshold + * @note slow no motion threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | slow no motion threshold + * ----------------|--------------------- + * 2g | v_slow_no_motion_thres_u8*3.91 mg + * 4g | v_slow_no_motion_thres_u8*7.81 mg + * 8g | v_slow_no_motion_thres_u8*15.63 mg + * 16g | v_slow_no_motion_thres_u8*31.25 mg + * @note when v_slow_no_motion_thres_u8 = 0 + * accel_range | slow no motion threshold + * ----------------|--------------------- + * 2g | 1.95 mg + * 4g | 3.91 mg + * 8g | 7.81 mg + * 16g | 15.63 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_thres( +u8 *v_slow_no_motion_thres_u8); + /*! + * @brief This API is used to write threshold + * for the slow/no-motion interrupt + * from the register 0x61 bit 0 to 7 + * + * + * + * + * @param v_slow_no_motion_thres_u8 : The value of slow no motion threshold + * @note slow no motion threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | slow no motion threshold + * ----------------|--------------------- + * 2g | v_slow_no_motion_thres_u8*3.91 mg + * 4g | v_slow_no_motion_thres_u8*7.81 mg + * 8g | v_slow_no_motion_thres_u8*15.63 mg + * 16g | v_slow_no_motion_thres_u8*31.25 mg + * @note when v_slow_no_motion_thres_u8 = 0 + * accel_range | slow no motion threshold + * ----------------|--------------------- + * 2g | 1.95 mg + * 4g | 3.91 mg + * 8g | 7.81 mg + * 16g | 15.63 mg + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_thres( +u8 v_slow_no_motion_thres_u8); +/***************************************************************/ +/**\name FUNCTION FOR SLO/NO MOTION SELECT CONFIGURATION */ +/***************************************************************/ + /*! + * @brief This API is used to read + * the slow/no-motion selection from the register 0x62 bit 0 + * + * + * + * + * @param v_intr_slow_no_motion_select_u8 : + * The value of slow/no-motion select + * value | Behaviour + * ----------|------------------- + * 0x00 | SLOW_MOTION + * 0x01 | NO_MOTION + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_select( +u8 *v_intr_slow_no_motion_select_u8); + /*! + * @brief This API is used to write + * the slow/no-motion selection from the register 0x62 bit 0 + * + * + * + * + * @param v_intr_slow_no_motion_select_u8 : + * The value of slow/no-motion select + * value | Behaviour + * ----------|------------------- + * 0x00 | SLOW_MOTION + * 0x01 | NO_MOTION + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_select( +u8 v_intr_slow_no_motion_select_u8); +/***************************************************************/ +/**\name FUNCTION FOR SIGNIFICANT MOTION SELECT CONFIGURATION*/ +/***************************************************************/ + /*! + * @brief This API is used to select + * the significant or any motion interrupt from the register 0x62 bit 1 + * + * + * + * + * @param v_intr_significant_motion_select_u8 : + * the value of significant or any motion interrupt selection + * value | Behaviour + * ----------|------------------- + * 0x00 | ANY_MOTION + * 0x01 | SIGNIFICANT_MOTION + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_select( +u8 *int_sig_mot_sel); + /*! + * @brief This API is used to write, select + * the significant or any motion interrupt from the register 0x62 bit 1 + * + * + * + * + * @param v_intr_significant_motion_select_u8 : + * the value of significant or any motion interrupt selection + * value | Behaviour + * ----------|------------------- + * 0x00 | ANY_MOTION + * 0x01 | SIGNIFICANT_MOTION + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_select( +u8 int_sig_mot_sel); + /*! + * @brief This API is used to read + * the significant skip time from the register 0x62 bit 2 and 3 + * + * + * + * + * @param v_int_sig_mot_skip_u8 : the value of significant skip time + * value | Behaviour + * ----------|------------------- + * 0x00 | skip time 1.5 seconds + * 0x01 | skip time 3 seconds + * 0x02 | skip time 6 seconds + * 0x03 | skip time 12 seconds + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_skip( +u8 *v_int_sig_mot_skip_u8); + /*! + * @brief This API is used to write + * the significant skip time from the register 0x62 bit 2 and 3 + * + * + * + * + * @param v_int_sig_mot_skip_u8 : the value of significant skip time + * value | Behaviour + * ----------|------------------- + * 0x00 | skip time 1.5 seconds + * 0x01 | skip time 3 seconds + * 0x02 | skip time 6 seconds + * 0x03 | skip time 12 seconds + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_skip( +u8 v_int_sig_mot_skip_u8); + /*! + * @brief This API is used to read + * the significant proof time from the register 0x62 bit 4 and 5 + * + * + * + * + * @param v_significant_motion_proof_u8 : + * the value of significant proof time + * value | Behaviour + * ----------|------------------- + * 0x00 | proof time 0.25 seconds + * 0x01 | proof time 0.5 seconds + * 0x02 | proof time 1 seconds + * 0x03 | proof time 2 seconds + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_proof( +u8 *int_sig_mot_proof); + /*! + * @brief This API is used to write + * the significant proof time from the register 0x62 bit 4 and 5 + * + * + * + * + * @param v_significant_motion_proof_u8 : + * the value of significant proof time + * value | Behaviour + * ----------|------------------- + * 0x00 | proof time 0.25 seconds + * 0x01 | proof time 0.5 seconds + * 0x02 | proof time 1 seconds + * 0x03 | proof time 2 seconds + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_proof( +u8 int_sig_mot_proof); +/***************************************************************/ +/**\name FUNCTION FOR TAP DURATION CONFIGURATION*/ +/***************************************************************/ +/*! + * @brief This API is used to get the tap duration + * from the register 0x63 bit 0 to 2 + * + * + * + * @param v_tap_durn_u8 : The value of tap duration + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_DURN_50MS + * 0x01 | BMI160_TAP_DURN_100MS + * 0x03 | BMI160_TAP_DURN_150MS + * 0x04 | BMI160_TAP_DURN_200MS + * 0x05 | BMI160_TAP_DURN_250MS + * 0x06 | BMI160_TAP_DURN_375MS + * 0x07 | BMI160_TAP_DURN_700MS + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_durn( +u8 *v_tap_durn_u8); +/*! + * @brief This API is used to write the tap duration + * from the register 0x63 bit 0 to 2 + * + * + * + * @param v_tap_durn_u8 : The value of tap duration + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_DURN_50MS + * 0x01 | BMI160_TAP_DURN_100MS + * 0x03 | BMI160_TAP_DURN_150MS + * 0x04 | BMI160_TAP_DURN_200MS + * 0x05 | BMI160_TAP_DURN_250MS + * 0x06 | BMI160_TAP_DURN_375MS + * 0x07 | BMI160_TAP_DURN_700MS + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_durn( +u8 v_tap_durn_u8); +/***************************************************************/ +/**\name FUNCTION FOR TAP SHOCK CONFIGURATION*/ +/***************************************************************/ + /*! + * @brief This API read the + * tap shock duration from the register 0x63 bit 2 + * + * @param v_tap_shock_u8 :The value of tap shock + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_SHOCK_50MS + * 0x01 | BMI160_TAP_SHOCK_75MS + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_shock( +u8 *v_tap_shock_u8); + /*! + * @brief This API write the + * tap shock duration from the register 0x63 bit 2 + * + * @param v_tap_shock_u8 :The value of tap shock + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_SHOCK_50MS + * 0x01 | BMI160_TAP_SHOCK_75MS + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_shock( +u8 v_tap_shock_u8); +/***************************************************************/ +/**\name FUNCTION FOR TAP QUIET CONFIGURATION*/ +/***************************************************************/ +/*! + * @brief This API read + * tap quiet duration from the register 0x63 bit 7 + * + * + * @param v_tap_quiet_u8 : The value of tap quiet + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_QUIET_30MS + * 0x01 | BMI160_TAP_QUIET_20MS + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_quiet( +u8 *v_tap_quiet_u8); +/*! + * @brief This API write + * tap quiet duration from the register 0x63 bit 7 + * + * + * @param v_tap_quiet_u8 : The value of tap quiet + * value | Behaviour + * ----------|------------------- + * 0x00 | BMI160_TAP_QUIET_30MS + * 0x01 | BMI160_TAP_QUIET_20MS + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_quiet( +u8 v_tap_quiet_u8); +/***************************************************************/ +/**\name FUNCTION FOR TAP THRESHOLD CONFIGURATION*/ +/***************************************************************/ + /*! + * @brief This API read Threshold of the + * single/double tap interrupt from the register 0x64 bit 0 to 4 + * + * + * @param v_tap_thres_u8 : The value of single/double tap threshold + * + * @note single/double tap threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | single/double tap threshold + * ----------------|--------------------- + * 2g | ((v_tap_thres_u8 + 1) * 62.5)mg + * 4g | ((v_tap_thres_u8 + 1) * 125)mg + * 8g | ((v_tap_thres_u8 + 1) * 250)mg + * 16g | ((v_tap_thres_u8 + 1) * 500)mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_thres( +u8 *v_tap_thres_u8); + /*! + * @brief This API write Threshold of the + * single/double tap interrupt from the register 0x64 bit 0 to 4 + * + * + * @param v_tap_thres_u8 : The value of single/double tap threshold + * + * @note single/double tap threshold changes according to accel g range + * accel g range can be set by the function "" + * accel_range | single/double tap threshold + * ----------------|--------------------- + * 2g | ((v_tap_thres_u8 + 1) * 62.5)mg + * 4g | ((v_tap_thres_u8 + 1) * 125)mg + * 8g | ((v_tap_thres_u8 + 1) * 250)mg + * 16g | ((v_tap_thres_u8 + 1) * 500)mg + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_thres( +u8 v_tap_thres_u8); +/***************************************************************/ +/**\name FUNCTION FOR ORIENT MODE CONFIGURATION*/ +/***************************************************************/ + /*! + * @brief This API read the threshold for orientation interrupt + * from the register 0x65 bit 0 and 1 + * + * @param v_orient_mode_u8 : The value of threshold for orientation + * value | Behaviour + * ----------|------------------- + * 0x00 | symmetrical + * 0x01 | high-asymmetrical + * 0x02 | low-asymmetrical + * 0x03 | symmetrical + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_mode( +u8 *v_orient_mode_u8); + /*! + * @brief This API write the threshold for orientation interrupt + * from the register 0x65 bit 0 and 1 + * + * @param v_orient_mode_u8 : The value of threshold for orientation + * value | Behaviour + * ----------|------------------- + * 0x00 | symmetrical + * 0x01 | high-asymmetrical + * 0x02 | low-asymmetrical + * 0x03 | symmetrical + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_mode( +u8 v_orient_mode_u8); +/***************************************************************/ +/**\name FUNCTION FOR ORIENT BLOCKING CONFIGURATION*/ +/***************************************************************/ +/*! + * @brief This API read the orient blocking mode + * that is used for the generation of the orientation interrupt. + * from the register 0x65 bit 2 and 3 + * + * @param v_orient_blocking_u8 : The value of orient blocking mode + * value | Behaviour + * ----------|------------------- + * 0x00 | No blocking + * 0x01 | Theta blocking or acceleration in any axis > 1.5g + * 0x02 | Theta blocking or acceleration slope in any axis > + * - | 0.2g or acceleration in any axis > 1.5g + * 0x03 | Theta blocking or acceleration slope in any axis > + * - | 0.4g or acceleration in any axis > + * - | 1.5g and value of orient is not stable + * - | for at least 100 ms + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_blocking( +u8 *v_orient_blocking_u8); +/*! + * @brief This API write the orient blocking mode + * that is used for the generation of the orientation interrupt. + * from the register 0x65 bit 2 and 3 + * + * @param v_orient_blocking_u8 : The value of orient blocking mode + * value | Behaviour + * ----------|------------------- + * 0x00 | No blocking + * 0x01 | Theta blocking or acceleration in any axis > 1.5g + * 0x02 | Theta blocking or acceleration slope in any axis > + * - | 0.2g or acceleration in any axis > 1.5g + * 0x03 | Theta blocking or acceleration slope in any axis > + * - | 0.4g or acceleration in any axis > + * - | 1.5g and value of orient is not stable + * - | for at least 100 ms + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_blocking( +u8 v_orient_blocking_u8); +/***************************************************************/ +/**\name FUNCTION FOR ORIENT HYSTERESIS CONFIGURATION*/ +/***************************************************************/ +/*! + * @brief This API read Orient interrupt + * hysteresis, from the register 0x64 bit 4 to 7 + * + * + * + * @param v_orient_hyst_u8 : The value of orient hysteresis + * + * @note 1 LSB corresponds to 62.5 mg, + * irrespective of the selected accel range + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_hyst( +u8 *v_orient_hyst_u8); +/*! + * @brief This API write Orient interrupt + * hysteresis, from the register 0x64 bit 4 to 7 + * + * + * + * @param v_orient_hyst_u8 : The value of orient hysteresis + * + * @note 1 LSB corresponds to 62.5 mg, + * irrespective of the selected accel range + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_hyst( +u8 v_orient_hyst_u8); +/***************************************************************/ +/**\name FUNCTION FOR ORIENT THETA CONFIGURATION*/ +/***************************************************************/ + /*! + * @brief This API read Orient + * blocking angle (0 to 44.8) from the register 0x66 bit 0 to 5 + * + * @param v_orient_theta_u8 : The value of Orient blocking angle + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_theta( +u8 *v_orient_theta_u8); + /*! + * @brief This API write Orient + * blocking angle (0 to 44.8) from the register 0x66 bit 0 to 5 + * + * @param v_orient_theta_u8 : The value of Orient blocking angle + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_theta( +u8 v_orient_theta_u8); +/***************************************************************/ +/**\name FUNCTION FOR ORIENT OUTPUT ENABLE CONFIGURATION*/ +/***************************************************************/ +/*! + * @brief This API read orient change + * of up/down bit from the register 0x66 bit 6 + * + * @param v_orient_ud_u8 : The value of orient change of up/down + * value | Behaviour + * ----------|------------------- + * 0x00 | Is ignored + * 0x01 | Generates orientation interrupt + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_ud_enable( +u8 *v_orient_ud_u8); +/*! + * @brief This API write orient change + * of up/down bit from the register 0x66 bit 6 + * + * @param v_orient_ud_u8 : The value of orient change of up/down + * value | Behaviour + * ----------|------------------- + * 0x00 | Is ignored + * 0x01 | Generates orientation interrupt + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_ud_enable( +u8 v_orient_ud_u8); +/***************************************************************/ +/**\name FUNCTION FOR ORIENT AXIS ENABLE CONFIGURATION*/ +/***************************************************************/ + /*! + * @brief This API read orientation axes changes + * from the register 0x66 bit 7 + * + * @param v_orient_axes_u8 : The value of orient axes assignment + * value | Behaviour | Name + * ----------|--------------------|------ + * 0x00 | x = x, y = y, z = z|orient_ax_noex + * 0x01 | x = y, y = z, z = x|orient_ax_ex + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_axes_enable( +u8 *v_orient_axes_u8); + /*! + * @brief This API write orientation axes changes + * from the register 0x66 bit 7 + * + * @param v_orient_axes_u8 : The value of orient axes assignment + * value | Behaviour | Name + * ----------|--------------------|------ + * 0x00 | x = x, y = y, z = z|orient_ax_noex + * 0x01 | x = y, y = z, z = x|orient_ax_ex + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_axes_enable( +u8 v_orient_axes_u8); +/***************************************************************/ +/**\name FUNCTION FOR FLAT THETA CONFIGURATION*/ +/***************************************************************/ + /*! + * @brief This API read Flat angle (0 to 44.8) for flat interrupt + * from the register 0x67 bit 0 to 5 + * + * @param v_flat_theta_u8 : The value of flat angle + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_theta( +u8 *v_flat_theta_u8); + /*! + * @brief This API write Flat angle (0 to 44.8) for flat interrupt + * from the register 0x67 bit 0 to 5 + * + * @param v_flat_theta_u8 : The value of flat angle + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_theta( +u8 v_flat_theta_u8); +/***************************************************************/ +/**\name FUNCTION FOR FLAT HOLD CONFIGURATION*/ +/***************************************************************/ +/*! + * @brief This API read Flat interrupt hold time; + * from the register 0x68 bit 4 and 5 + * + * @param v_flat_hold_u8 : The value of flat hold time + * value | Behaviour + * ----------|------------------- + * 0x00 | 0ms + * 0x01 | 512ms + * 0x01 | 1024ms + * 0x01 | 2048ms + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hold( +u8 *v_flat_hold_u8); +/*! + * @brief This API write Flat interrupt hold time; + * from the register 0x68 bit 4 and 5 + * + * @param v_flat_hold_u8 : The value of flat hold time + * value | Behaviour + * ----------|------------------- + * 0x00 | 0ms + * 0x01 | 512ms + * 0x01 | 1024ms + * 0x01 | 2048ms + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hold( +u8 v_flat_hold_u8); +/***************************************************************/ +/**\name FUNCTION FOR FLAT HYSTERESIS CONFIGURATION*/ +/***************************************************************/ +/*! + * @brief This API read flat interrupt hysteresis + * from the register 0x68 bit 0 to 3 + * + * @param v_flat_hyst_u8 : The value of flat hysteresis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hyst( +u8 *v_flat_hyst_u8); +/*! + * @brief This API write flat interrupt hysteresis + * from the register 0x68 bit 0 to 3 + * + * @param v_flat_hyst_u8 : The value of flat hysteresis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hyst( +u8 v_flat_hyst_u8); +/***************************************************************/ +/**\name FUNCTION FAST OFFSET COMPENSATION FOR ACCEL */ +/***************************************************************/ + /*! + * @brief This API read accel offset compensation + * target value for z-axis from the register 0x69 bit 0 and 1 + * + * @param v_foc_accel_z_u8 : the value of accel offset compensation z axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_z( +u8 *v_foc_accel_z_u8); + /*! + * @brief This API write accel offset compensation + * target value for z-axis from the register 0x69 bit 0 and 1 + * + * @param v_foc_accel_z_u8 : the value of accel offset compensation z axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_z( +u8 v_foc_accel_z_u8); +/*! + * @brief This API read accel offset compensation + * target value for y-axis + * from the register 0x69 bit 2 and 3 + * + * @param v_foc_accel_y_u8 : the value of accel offset compensation y axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_y( +u8 *v_foc_accel_y_u8); +/*! + * @brief This API write accel offset compensation + * target value for y-axis + * from the register 0x69 bit 2 and 3 + * + * @param v_foc_accel_y_u8 : the value of accel offset compensation y axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_y( +u8 v_foc_accel_y_u8); +/*! + * @brief This API read accel offset compensation + * target value for x-axis is + * from the register 0x69 bit 4 and 5 + * + * @param v_foc_accel_x_u8 : the value of accel offset compensation x axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_x( +u8 *v_foc_accel_x_u8); +/*! + * @brief This API write accel offset compensation + * target value for x-axis is + * from the register 0x69 bit 4 and 5 + * + * @param v_foc_accel_x_u8 : the value of accel offset compensation x axis + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_x( +u8 v_foc_accel_x_u8); +/***************************************************************/ +/**\name FUNCTION FAST OFFSET COMPENSATION FOR GYRO */ +/***************************************************************/ +/*! + * @brief This API write gyro fast offset enable + * from the register 0x69 bit 6 + * + * @param v_foc_gyro_u8 : The value of gyro fast offset enable + * value | Description + * ----------|------------- + * 0 | fast offset compensation disabled + * 1 | fast offset compensation enabled + * + * @param v_gyro_off_x_s16 : The value of gyro fast offset x axis data + * @param v_gyro_off_y_s16 : The value of gyro fast offset y axis data + * @param v_gyro_off_z_s16 : The value of gyro fast offset z axis data + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_gyro_enable( +u8 v_foc_gyro_u8, s16 *v_gyro_off_x_s16, +s16 *v_gyro_off_y_s16, s16 *v_gyro_off_z_s16); +/***************************************************/ +/**\name FUNCTION FOR NVM*/ +/***************************************************/ + /*! + * @brief This API read NVM program enable + * from the register 0x6A bit 1 + * + * @param v_nvm_prog_u8 : The value of NVM program enable + * Value | Description + * --------|------------- + * 0 | DISABLE + * 1 | ENABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_prog_enable( +u8 *v_nvm_prog_u8); + /*! + * @brief This API write NVM program enable + * from the register 0x6A bit 1 + * + * @param v_nvm_prog_u8 : The value of NVM program enable + * Value | Description + * --------|------------- + * 0 | DISABLE + * 1 | ENABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_prog_enable( +u8 v_nvm_prog_u8); +/***************************************************/ +/**\name FUNCTION FOR SPI MODE*/ +/***************************************************/ +/*! + * @brief This API read to configure SPI + * Interface Mode for primary and OIS interface + * from the register 0x6B bit 0 + * + * @param v_spi3_u8 : The value of SPI mode selection + * Value | Description + * --------|------------- + * 0 | SPI 4-wire mode + * 1 | SPI 3-wire mode + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi3( +u8 *v_spi3_u8); +/*! + * @brief This API write to configure SPI + * Interface Mode for primary and OIS interface + * from the register 0x6B bit 0 + * + * @param v_spi3_u8 : The value of SPI mode selection + * Value | Description + * --------|------------- + * 0 | SPI 4-wire mode + * 1 | SPI 3-wire mode + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi3( +u8 v_spi3_u8); +/***************************************************/ +/**\name FUNCTION FOR FOC GYRO */ +/***************************************************/ +/*! + * @brief This API read gyro fast offset enable + * from the register 0x69 bit 6 + * + * @param v_foc_gyro_u8 : The value of gyro fast offset enable + * value | Description + * ----------|------------- + * 0 | fast offset compensation disabled + * 1 | fast offset compensation enabled + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_gyro_enable( +u8 *v_foc_gyro_u8); +/***************************************************/ +/**\name FUNCTION FOR I2C WATCHDOG TIMBER */ +/***************************************************/ +/*! + * @brief This API read I2C Watchdog timer + * from the register 0x70 bit 1 + * + * @param v_i2c_wdt_u8 : The value of I2C watch dog timer + * Value | Description + * --------|------------- + * 0 | I2C watchdog v_timeout_u8 after 1 ms + * 1 | I2C watchdog v_timeout_u8 after 50 ms + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_select( +u8 *v_i2c_wdt_u8); +/*! + * @brief This API write I2C Watchdog timer + * from the register 0x70 bit 1 + * + * @param v_i2c_wdt_u8 : The value of I2C watch dog timer + * Value | Description + * --------|------------- + * 0 | I2C watchdog v_timeout_u8 after 1 ms + * 1 | I2C watchdog v_timeout_u8 after 50 ms + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE +bmi160_set_i2c_wdt_select(u8 v_i2c_wdt_u8); +/*! + * @brief This API read I2C watchdog enable + * from the register 0x70 bit 2 + * + * @param v_i2c_wdt_u8 : The value of I2C watchdog enable + * Value | Description + * --------|------------- + * 0 | DISABLE + * 1 | ENABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_enable( +u8 *v_i2c_wdt_u8); +/*! + * @brief This API write I2C watchdog enable + * from the register 0x70 bit 2 + * + * @param v_i2c_wdt_u8 : The value of I2C watchdog enable + * Value | Description + * --------|------------- + * 0 | DISABLE + * 1 | ENABLE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_enable( +u8 v_i2c_wdt_u8); +/***************************************************/ +/**\name FUNCTION FOR IF MODE*/ +/***************************************************/ +/*! + * @brief This API read I2C interface configuration(if) moe + * from the register 0x6B bit 4 and 5 + * + * @param v_if_mode_u8 : The value of interface configuration mode + * Value | Description + * --------|------------- + * 0x00 | Primary interface:autoconfig / secondary interface:off + * 0x01 | Primary interface:I2C / secondary interface:OIS + * 0x02 | Primary interface:autoconfig/secondary interface:Magnetometer + * 0x03 | Reserved + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_if_mode( +u8 *v_if_mode_u8); +/*! + * @brief This API write I2C interface configuration(if) moe + * from the register 0x6B bit 4 and 5 + * + * @param v_if_mode_u8 : The value of interface configuration mode + * Value | Description + * --------|------------- + * 0x00 | Primary interface:autoconfig / secondary interface:off + * 0x01 | Primary interface:I2C / secondary interface:OIS + * 0x02 | Primary interface:autoconfig/secondary interface:Magnetometer + * 0x03 | Reserved + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_if_mode( +u8 v_if_mode_u8); +/***************************************************/ +/**\name FUNCTION FOR GYRO SLEEP TRIGGER INTERRUPT CONFIGURATION*/ +/***************************************************/ +/*! + * @brief This API read gyro sleep trigger + * from the register 0x6C bit 0 to 2 + * + * @param v_gyro_sleep_trigger_u8 : The value of gyro sleep trigger + * Value | Description + * --------|------------- + * 0x00 | nomotion: no / Not INT1 pin: no / INT2 pin: no + * 0x01 | nomotion: no / Not INT1 pin: no / INT2 pin: yes + * 0x02 | nomotion: no / Not INT1 pin: yes / INT2 pin: no + * 0x03 | nomotion: no / Not INT1 pin: yes / INT2 pin: yes + * 0x04 | nomotion: yes / Not INT1 pin: no / INT2 pin: no + * 0x05 | anymotion: yes / Not INT1 pin: no / INT2 pin: yes + * 0x06 | anymotion: yes / Not INT1 pin: yes / INT2 pin: no + * 0x07 | anymotion: yes / Not INT1 pin: yes / INT2 pin: yes + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_trigger( +u8 *v_gyro_sleep_trigger_u8); +/*! + * @brief This API write gyro sleep trigger + * from the register 0x6C bit 0 to 2 + * + * @param v_gyro_sleep_trigger_u8 : The value of gyro sleep trigger + * Value | Description + * --------|------------- + * 0x00 | nomotion: no / Not INT1 pin: no / INT2 pin: no + * 0x01 | nomotion: no / Not INT1 pin: no / INT2 pin: yes + * 0x02 | nomotion: no / Not INT1 pin: yes / INT2 pin: no + * 0x03 | nomotion: no / Not INT1 pin: yes / INT2 pin: yes + * 0x04 | nomotion: yes / Not INT1 pin: no / INT2 pin: no + * 0x05 | anymotion: yes / Not INT1 pin: no / INT2 pin: yes + * 0x06 | anymotion: yes / Not INT1 pin: yes / INT2 pin: no + * 0x07 | anymotion: yes / Not INT1 pin: yes / INT2 pin: yes + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_trigger( +u8 v_gyro_sleep_trigger_u8); +/*! + * @brief This API read gyro wakeup trigger + * from the register 0x6C bit 3 and 4 + * + * @param v_gyro_wakeup_trigger_u8 : The value of gyro wakeup trigger + * Value | Description + * --------|------------- + * 0x00 | anymotion: no / INT1 pin: no + * 0x01 | anymotion: no / INT1 pin: yes + * 0x02 | anymotion: yes / INT1 pin: no + * 0x03 | anymotion: yes / INT1 pin: yes + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_trigger( +u8 *v_gyro_wakeup_trigger_u8); +/*! + * @brief This API write gyro wakeup trigger + * from the register 0x6C bit 3 and 4 + * + * @param v_gyro_wakeup_trigger_u8 : The value of gyro wakeup trigger + * Value | Description + * --------|------------- + * 0x00 | anymotion: no / INT1 pin: no + * 0x01 | anymotion: no / INT1 pin: yes + * 0x02 | anymotion: yes / INT1 pin: no + * 0x03 | anymotion: yes / INT1 pin: yes + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_trigger( +u8 v_gyro_wakeup_trigger_u8); +/*! + * @brief This API read Target state for gyro sleep mode + * from the register 0x6C bit 5 + * + * @param v_gyro_sleep_state_u8 : The value of gyro sleep mode + * Value | Description + * --------|------------- + * 0x00 | Sleep transition to fast wake up state + * 0x01 | Sleep transition to suspend state + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_state( +u8 *v_gyro_sleep_state_u8); +/*! + * @brief This API write Target state for gyro sleep mode + * from the register 0x6C bit 5 + * + * @param v_gyro_sleep_state_u8 : The value of gyro sleep mode + * Value | Description + * --------|------------- + * 0x00 | Sleep transition to fast wake up state + * 0x01 | Sleep transition to suspend state + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_state( +u8 v_gyro_sleep_state_u8); +/*! + * @brief This API read gyro wakeup interrupt + * from the register 0x6C bit 6 + * + * @param v_gyro_wakeup_intr_u8 : The valeu of gyro wakeup interrupt + * Value | Description + * --------|------------- + * 0x00 | DISABLE + * 0x01 | ENABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_intr( +u8 *v_gyro_wakeup_intr_u8); +/*! + * @brief This API write gyro wakeup interrupt + * from the register 0x6C bit 6 + * + * @param v_gyro_wakeup_intr_u8 : The valeu of gyro wakeup interrupt + * Value | Description + * --------|------------- + * 0x00 | DISABLE + * 0x01 | ENABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_intr( +u8 v_gyro_wakeup_intr_u8); +/***************************************************/ +/**\name FUNCTION FOR ACCEL SELF TEST */ +/***************************************************/ +/*! + * @brief This API read accel select axis to be self-test + * + * @param v_accel_selftest_axis_u8 : + * The value of accel self test axis selection + * Value | Description + * --------|------------- + * 0x00 | disabled + * 0x01 | x-axis + * 0x02 | y-axis + * 0x03 | z-axis + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_axis( +u8 *acc_selftest_axis); +/*! + * @brief This API write accel select axis to be self-test + * + * @param v_accel_selftest_axis_u8 : + * The value of accel self test axis selection + * Value | Description + * --------|------------- + * 0x00 | disabled + * 0x01 | x-axis + * 0x02 | y-axis + * 0x03 | z-axis + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_axis( +u8 acc_selftest_axis); +/*! + * @brief This API read accel self test axis sign + * from the register 0x6D bit 2 + * + * @param v_accel_selftest_sign_u8: The value of accel self test axis sign + * Value | Description + * --------|------------- + * 0x00 | negative + * 0x01 | positive + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_sign( +u8 *acc_selftest_sign); +/*! + * @brief This API write accel self test axis sign + * from the register 0x6D bit 2 + * + * @param v_accel_selftest_sign_u8: The value of accel self test axis sign + * Value | Description + * --------|------------- + * 0x00 | negative + * 0x01 | positive + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_sign( +u8 acc_selftest_sign); +/*! + * @brief This API read accel self test amplitude + * from the register 0x6D bit 3 + * select amplitude of the selftest deflection: + * + * @param v_accel_selftest_amp_u8 : The value of accel self test amplitude + * Value | Description + * --------|------------- + * 0x00 | LOW + * 0x01 | HIGH + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_amp( +u8 *acc_selftest_amp); +/*! + * @brief This API write accel self test amplitude + * from the register 0x6D bit 3 + * select amplitude of the selftest deflection: + * + * @param v_accel_selftest_amp_u8 : The value of accel self test amplitude + * Value | Description + * --------|------------- + * 0x00 | LOW + * 0x01 | HIGH + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_amp( +u8 acc_selftest_amp); +/***************************************************/ +/**\name FUNCTION FOR GYRO SELF TEST */ +/***************************************************/ +/*! + * @brief This API read gyro self test trigger + * + * @param v_gyro_selftest_start_u8: The value of gyro self test start + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest_start( +u8 *v_gyro_selftest_start_u8); +/*! + * @brief This API write gyro self test trigger + * + * @param v_gyro_selftest_start_u8: The value of gyro self test start + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_selftest_start( +u8 v_gyro_selftest_start_u8); +/***************************************************/ +/**\name FUNCTION FOR SPI/I2C ENABLE */ +/***************************************************/ + /*! + * @brief This API read primary interface selection I2C or SPI + * from the register 0x70 bit 0 + * + * @param v_spi_enable_u8: The value of Interface selection + * Value | Description + * --------|------------- + * 0x00 | I2C Enable + * 0x01 | I2C DISBALE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi_enable( +u8 *v_spi_enable_u8); + /*! + * @brief This API write primary interface selection I2C or SPI + * from the register 0x70 bit 0 + * + * @param v_spi_enable_u8: The value of Interface selection + * Value | Description + * --------|------------- + * 0x00 | I2C Enable + * 0x01 | I2C DISBALE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi_enable( +u8 v_spi_enable_u8); + /*! + * @brief This API read the spare zero + * form register 0x70 bit 3 + * + * + * @param v_spare0_trim_u8: The value of spare zero + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_spare0_trim +(u8 *v_spare0_trim_u8); + /*! + * @brief This API write the spare zero + * form register 0x70 bit 3 + * + * + * @param v_spare0_trim_u8: The value of spare zero + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_spare0_trim +(u8 v_spare0_trim_u8); +/***************************************************/ +/**\name FUNCTION FOR NVM COUNTER */ +/***************************************************/ + /*! + * @brief This API read the NVM counter + * form register 0x70 bit 4 to 7 + * + * + * @param v_nvm_counter_u8: The value of NVM counter + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_counter( +u8 *v_nvm_counter_u8); + /*! + * @brief This API write the NVM counter + * form register 0x70 bit 4 to 7 + * + * + * @param v_nvm_counter_u8: The value of NVM counter + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_counter( +u8 v_nvm_counter_u8); +/***************************************************/ +/**\name FUNCTION FOR ACCEL MANUAL OFFSET COMPENSATION */ +/***************************************************/ +/*! + * @brief This API read accel manual offset compensation of x axis + * from the register 0x71 bit 0 to 7 + * + * + * + * @param v_accel_off_x_s8: + * The value of accel manual offset compensation of x axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_xaxis( +s8 *v_accel_off_x_s8); +/*! + * @brief This API write accel manual offset compensation of x axis + * from the register 0x71 bit 0 to 7 + * + * + * + * @param v_accel_off_x_s8: + * The value of accel manual offset compensation of x axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_xaxis( +s8 v_accel_off_x_s8); +/*! + * @brief This API read accel manual offset compensation of y axis + * from the register 0x72 bit 0 to 7 + * + * + * + * @param v_accel_off_y_s8: + * The value of accel manual offset compensation of y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_yaxis( +s8 *v_accel_off_y_s8); +/*! + * @brief This API write accel manual offset compensation of y axis + * from the register 0x72 bit 0 to 7 + * + * + * + * @param v_accel_off_y_s8: + * The value of accel manual offset compensation of y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_yaxis( +s8 v_accel_off_y_s8); +/*! + * @brief This API read accel manual offset compensation of z axis + * from the register 0x73 bit 0 to 7 + * + * + * + * @param v_accel_off_z_s8: + * The value of accel manual offset compensation of z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_zaxis( +s8 *v_accel_off_z_s8); +/*! + * @brief This API write accel manual offset compensation of z axis + * from the register 0x73 bit 0 to 7 + * + * + * + * @param v_accel_off_z_s8: + * The value of accel manual offset compensation of z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_zaxis( +s8 v_accel_off_z_s8); +/***************************************************/ +/**\name FUNCTION FOR GYRO MANUAL OFFSET COMPENSATION */ +/***************************************************/ +/*! + * @brief This API read gyro manual offset compensation of x axis + * from the register 0x74 bit 0 to 7 and 0x77 bit 0 and 1 + * + * + * + * @param v_gyro_off_x_s16: + * The value of gyro manual offset compensation of x axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_xaxis( +s16 *v_gyro_off_x_s16); +/*! + * @brief This API write gyro manual offset compensation of x axis + * from the register 0x74 bit 0 to 7 and 0x77 bit 0 and 1 + * + * + * + * @param v_gyro_off_x_s16: + * The value of gyro manual offset compensation of x axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_xaxis( +s16 v_gyro_off_x_s16); +/*! + * @brief This API read gyro manual offset compensation of y axis + * from the register 0x75 bit 0 to 7 and 0x77 bit 2 and 3 + * + * + * + * @param v_gyro_off_y_s16: + * The value of gyro manual offset compensation of y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_yaxis( +s16 *v_gyro_off_y_s16); +/*! + * @brief This API write gyro manual offset compensation of y axis + * from the register 0x75 bit 0 to 7 and 0x77 bit 2 and 3 + * + * + * + * @param v_gyro_off_y_s16: + * The value of gyro manual offset compensation of y axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_yaxis( +s16 v_gyro_off_y_s16); +/*! + * @brief This API read gyro manual offset compensation of z axis + * from the register 0x76 bit 0 to 7 and 0x77 bit 4 and 5 + * + * + * + * @param v_gyro_off_z_s16: + * The value of gyro manual offset compensation of z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_zaxis( +s16 *v_gyro_off_z_s16); +/*! + * @brief This API write gyro manual offset compensation of z axis + * from the register 0x76 bit 0 to 7 and 0x77 bit 4 and 5 + * + * + * + * @param v_gyro_off_z_s16: + * The value of gyro manual offset compensation of z axis + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_zaxis( +s16 v_gyro_off_z_s16); +/*! + * @brief This API writes accel fast offset compensation + * from the register 0x69 bit 0 to 5 + * @brief This API writes each axis individually + * FOC_X_AXIS - bit 4 and 5 + * FOC_Y_AXIS - bit 2 and 3 + * FOC_Z_AXIS - bit 0 and 1 + * + * @param v_foc_accel_u8: The value of accel offset compensation + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @param v_axis_u8: The value of accel offset axis selection + * value | axis + * ----------|------------------- + * 0 | FOC_X_AXIS + * 1 | FOC_Y_AXIS + * 2 | FOC_Z_AXIS + * + * @param v_accel_offset_s8: The accel offset value + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_foc_trigger(u8 axis, +u8 foc_acc, s8 *accel_offset); +/*! + * @brief This API write fast accel offset compensation + * it writes all axis together.To the register 0x69 bit 0 to 5 + * FOC_X_AXIS - bit 4 and 5 + * FOC_Y_AXIS - bit 2 and 3 + * FOC_Z_AXIS - bit 0 and 1 + * + * @param v_foc_accel_x_u8: The value of accel offset x compensation + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @param v_foc_accel_y_u8: The value of accel offset y compensation + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @param v_foc_accel_z_u8: The value of accel offset z compensation + * value | Behaviour + * ----------|------------------- + * 0x00 | disable + * 0x01 | +1g + * 0x01 | -1g + * 0x01 | 0g + * + * @param v_accel_off_x_s8: The value of accel offset x axis + * @param v_accel_off_y_s8: The value of accel offset y axis + * @param v_accel_off_z_s8: The value of accel offset z axis + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_accel_foc_trigger_xyz(u8 v_foc_accel_x_u8, +u8 v_foc_accel_y_u8, u8 v_foc_accel_z_u8, +s8 *acc_off_x, s8 *acc_off_y, s8 *acc_off_z); +/***************************************************/ +/**\name FUNCTION FOR ACEL AND GYRO OFFSET ENABLE */ +/***************************************************/ +/*! + * @brief This API read the accel offset enable bit + * from the register 0x77 bit 6 + * + * + * + * @param v_accel_off_enable_u8: The value of accel offset enable + * value | Description + * ----------|-------------- + * 0x01 | ENABLE + * 0x00 | DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_enable( +u8 *acc_off_en); +/*! + * @brief This API write the accel offset enable bit + * from the register 0x77 bit 6 + * + * + * + * @param v_accel_off_enable_u8: The value of accel offset enable + * value | Description + * ----------|-------------- + * 0x01 | ENABLE + * 0x00 | DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_enable( +u8 acc_off_en); +/*! + * @brief This API read the accel offset enable bit + * from the register 0x77 bit 7 + * + * + * + * @param v_gyro_off_enable_u8: The value of gyro offset enable + * value | Description + * ----------|-------------- + * 0x01 | ENABLE + * 0x00 | DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_enable( +u8 *v_gyro_off_enable_u8); +/*! + * @brief This API write the accel offset enable bit + * from the register 0x77 bit 7 + * + * + * + * @param v_gyro_off_enable_u8: The value of gyro offset enable + * value | Description + * ----------|-------------- + * 0x01 | ENABLE + * 0x00 | DISABLE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_enable( +u8 v_gyro_off_enable_u8); +/***************************************************/ +/**\name FUNCTION FOR STEP COUNTER INTERRUPT */ +/***************************************************/ +/*! + * @brief This API reads step counter value + * form the register 0x78 and 0x79 + * + * + * + * + * @param v_step_cnt_s16 : The value of step counter + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_step_count(s16 *v_step_cnt_s16); + /*! + * @brief This API Reads + * step counter configuration + * from the register 0x7A bit 0 to 7 + * and from the register 0x7B bit 0 to 2 and 4 to 7 + * + * + * @param v_step_config_u16 : The value of step configuration + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_config( +u16 *v_step_config_u16); + /*! + * @brief This API write + * step counter configuration + * from the register 0x7A bit 0 to 7 + * and from the register 0x7B bit 0 to 2 and 4 to 7 + * + * + * @param v_step_config_u16 : + * the value of Enable step configuration + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_config( +u16 v_step_config_u16); + /*! + * @brief This API read enable step counter + * from the register 0x7B bit 3 + * + * + * @param v_step_counter_u8 : The value of step counter enable + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_counter_enable( +u8 *v_step_counter_u8); + /*! + * @brief This API write enable step counter + * from the register 0x7B bit 3 + * + * + * @param v_step_counter_u8 : The value of step counter enable + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_counter_enable( +u8 v_step_counter_u8); + /*! + * @brief This API set Step counter modes + * + * + * @param v_step_mode_u8 : The value of step counter mode + * value | mode + * ----------|----------- + * 0 | BMI160_STEP_NORMAL_MODE + * 1 | BMI160_STEP_SENSITIVE_MODE + * 2 | BMI160_STEP_ROBUST_MODE + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_mode(u8 v_step_mode_u8); +/*! + * @brief This API used to trigger the signification motion + * interrupt + * + * + * @param v_significant_u8 : The value of interrupt selection + * value | interrupt + * ----------|----------- + * 0 | BMI160_MAP_INTR1 + * 1 | BMI160_MAP_INTR2 + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_map_significant_motion_intr( +u8 v_significant_u8); +/*! + * @brief This API used to trigger the step detector + * interrupt + * + * + * @param v_step_detector_u8 : The value of interrupt selection + * value | interrupt + * ----------|----------- + * 0 | BMI160_MAP_INTR1 + * 1 | BMI160_MAP_INTR2 + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_map_step_detector_intr( +u8 v_step_detector_u8); + /*! + * @brief This API used to clear the step counter interrupt + * interrupt + * + * + * @param : None + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_clear_step_counter(void); +/***************************************************/ +/**\name FUNCTION FOR STEP COMMAND REGISTER WRITE */ +/***************************************************/ + /*! + * @brief This API writes value to the register 0x7E bit 0 to 7 + * + * + * @param v_command_reg_u8 : The value to write command register + * value | Description + * ---------|-------------------------------------------------------- + * 0x00 | Reserved + * 0x03 | Starts fast offset calibration for the accel and gyro + * 0x10 | Sets the PMU mode for the Accelerometer to suspend + * 0x11 | Sets the PMU mode for the Accelerometer to normal + * 0x12 | Sets the PMU mode for the Accelerometer Lowpower + * 0x14 | Sets the PMU mode for the Gyroscope to suspend + * 0x15 | Sets the PMU mode for the Gyroscope to normal + * 0x16 | Reserved + * 0x17 | Sets the PMU mode for the Gyroscope to fast start-up + * 0x18 | Sets the PMU mode for the Magnetometer to suspend + * 0x19 | Sets the PMU mode for the Magnetometer to normal + * 0x1A | Sets the PMU mode for the Magnetometer to Lowpower + * 0xB0 | Clears all data in the FIFO + * 0xB1 | Resets the interrupt engine + * 0xB2 | step_cnt_clr Clears the step counter + * 0xB6 | Triggers a reset + * 0x37 | See extmode_en_last + * 0x9A | See extmode_en_last + * 0xC0 | Enable the extended mode + * 0xC4 | Erase NVM cell + * 0xC8 | Load NVM cell + * 0xF0 | Reset acceleration data path + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_command_register( +u8 v_command_reg_u8); +/***************************************************/ +/**\name FUNCTION FOR PAGE ENABLE */ +/***************************************************/ + /*! + * @brief This API read target page from the register 0x7F bit 4 and 5 + * + * @param v_target_page_u8: The value of target page + * value | page + * ---------|----------- + * 0 | User data/configure page + * 1 | Chip level trim/test page + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_target_page( +u8 *v_target_page_u8); + /*! + * @brief This API write target page from the register 0x7F bit 4 and 5 + * + * @param v_target_page_u8: The value of target page + * value | page + * ---------|----------- + * 0 | User data/configure page + * 1 | Chip level trim/test page + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_target_page( +u8 v_target_page_u8); + /*! + * @brief This API read page enable from the register 0x7F bit 7 + * + * + * + * @param v_page_enable_u8: The value of page enable + * value | page + * ---------|----------- + * 0 | DISABLE + * 1 | ENABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_paging_enable( +u8 *v_page_enable_u8); + /*! + * @brief This API write page enable from the register 0x7F bit 7 + * + * + * + * @param v_page_enable_u8: The value of page enable + * value | page + * ---------|----------- + * 0 | DISABLE + * 1 | ENABLE + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_paging_enable( +u8 v_page_enable_u8); + /*! + * @brief This API read + * pull up configuration from the register 0X85 bit 4 an 5 + * + * + * + * @param v_control_pullup_u8: The value of pull up register + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_get_pullup_configuration( +u8 *v_control_pullup_u8); + /*! + * @brief This API write + * pull up configuration from the register 0X85 bit 4 an 5 + * + * + * + * @param v_control_pullup_u8: The value of pull up register + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_pullup_configuration( +u8 v_control_pullup_u8); +/***************************************************/ +/**\name FUNCTION FOR BMM150 */ +/***************************************************/ + /*! + * @brief This function used for initialize the bmm150 sensor + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_interface_init(void); + /*! + * @brief This function used for set the mag power control + * bit enable + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_wakeup(void); + /*! + * @brief This function used for read the trim values of magnetometer + * + * @note + * Before reading the mag trimming values + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_bmm150_mag_trim(void); + /*! + * @brief This function used for read the compensated value of mag + * Before start reading the mag compensated data's + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_compensate_xyz( +struct bmi160_mag_xyz_s32_t *mag_comp_xyz); +BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_compensate_xyz_raw( +struct bmi160_mag_xyz_s32_t *mag_comp_xyz, struct bmi160_mag_xyzr_t mag_xyzr); + +/*! + * @brief This API used to get the compensated BMM150-X data + * the out put of X as s32 + * Before start reading the mag compensated X data + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * + * @param v_mag_data_x_s16 : The value of mag raw X data + * @param v_data_r_u16 : The value of mag R data + * + * @return results of compensated X data value output as s32 + * + */ +s32 bmi160_bmm150_mag_compensate_X(s16 v_mag_data_x_s16, u16 v_data_r_u16); +/*! + * @brief This API used to get the compensated BMM150-Y data + * the out put of Y as s32 + * Before start reading the mag compensated Y data + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * + * @param v_mag_data_y_s16 : The value of mag raw Y data + * @param v_data_r_u16 : The value of mag R data + * + * @return results of compensated Y data value output as s32 + */ +s32 bmi160_bmm150_mag_compensate_Y(s16 v_mag_data_y_s16, u16 v_data_r_u16); +/*! + * @brief This API used to get the compensated BMM150-Z data + * the out put of Z as s32 + * Before start reading the mag compensated Z data + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * + * @param v_mag_data_z_s16 : The value of mag raw Z data + * @param v_data_r_u16 : The value of mag R data + * + * @return results of compensated Z data value output as s32 + */ +s32 bmi160_bmm150_mag_compensate_Z(s16 v_mag_data_z_s16, u16 v_data_r_u16); +/*! + * @brief This API used to set the pre-set modes of bmm150 + * The pre-set mode setting is depend on data rate and xy and z repetitions + * + * @note + * Before set the mag preset mode + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_mode_u8: The value of pre-set mode selection value + * value | pre_set mode + * ----------|------------ + * 1 | BMI160_MAG_PRESETMODE_LOWPOWER + * 2 | BMI160_MAG_PRESETMODE_REGULAR + * 3 | BMI160_MAG_PRESETMODE_HIGHACCURACY + * 4 | BMI160_MAG_PRESETMODE_ENHANCED + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_bmm150_mag_presetmode(u8 mode); +/*! + * @brief This function used for set the magnetometer + * power mode. + * @note + * Before set the mag power mode + * make sure the following two points are addressed + * @note + * 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note + * 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @param v_mag_pow_mode_u8 : The value of mag power mode + * value | mode + * ----------|------------ + * 0 | FORCE_MODE + * 1 | SUSPEND_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_set_power_mode(u8 mag_pow_mode); + /*! + * @brief This function used for set the magnetometer + * power mode. + * @note + * Before set the mag power mode + * make sure the following two point is addressed + * Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * + * @param v_mag_sec_if_pow_mode_u8 : The value of mag power mode + * value | mode + * ----------|------------ + * 0 | BMI160_MAG_FORCE_MODE + * 1 | BMI160_MAG_SUSPEND_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_bmm150_mag_and_secondary_if_power_mode( +u8 v_mag_sec_if_pow_mode_u8); +/***************************************************/ +/**\name FUNCTIONS FOR AKM09911 AND AKM09912*/ +/***************************************************/ + /*! + * @brief This function used for initialize + * the AKM09911 and AKM09912 sensor + * + * + * @param v_akm_i2c_address_u8: The value of device address + * AKM sensor | Slave address + * --------------|--------------------- + * AKM09911 | AKM09911_I2C_ADDR_1 + * - | and AKM09911_I2C_ADDR_2 + * AKM09912 | AKM09912_I2C_ADDR_1 + * - | AKM09912_I2C_ADDR_2 + * - | AKM09912_I2C_ADDR_3 + * - | AKM09912_I2C_ADDR_4 + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_akm_mag_interface_init( +u8 v_akm_i2c_address_u8); + /*! + * @brief This function used for read the sensitivity data of + * AKM09911 and AKM09912 + * + * @note Before reading the mag sensitivity values + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_bst_akm_sensitivity_data(void); +/*! + * @brief This API used to get the compensated X data + * of AKM09911 the out put of X as s32 + * @note Before start reading the mag compensated X data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_x_s16 : The value of X data + * + * @return results of compensated X data value output as s32 + * + */ +s32 bmi160_bst_akm09911_compensate_X(s16 v_bst_akm_x_s16); +/*! + * @brief This API used to get the compensated Y data + * of AKM09911 the out put of Y as s32 + * @note Before start reading the mag compensated Y data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_y_s16 : The value of Y data + * + * @return results of compensated Y data value output as s32 + * + */ +s32 bmi160_bst_akm09911_compensate_Y(s16 v_bst_akm_y_s16); +/*! + * @brief This API used to get the compensated Z data + * of AKM09911 the out put of Z as s32 + * @note Before start reading the mag compensated Z data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_z_s16 : The value of Z data + * + * @return results of compensated Z data value output as s32 + * + */ +s32 bmi160_bst_akm09911_compensate_Z(s16 v_bst_akm_z_s16); +/*! + * @brief This API used to get the compensated X data + * of AKM09912 the out put of X as s32 + * @note Before start reading the mag compensated X data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_x_s16 : The value of X data + * + * @return results of compensated X data value output as s32 + * + */ +s32 bmi160_bst_akm09912_compensate_X(s16 v_bst_akm_x_s16); +/*! + * @brief This API used to get the compensated Y data + * of AKM09912 the out put of Y as s32 + * @note Before start reading the mag compensated Y data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_y_s16 : The value of Y data + * + * @return results of compensated Y data value output as s32 + * + */ +s32 bmi160_bst_akm09912_compensate_Y(s16 v_bst_akm_y_s16); +/*! + * @brief This API used to get the compensated Z data + * of AKM09912 the out put of Z as s32 + * @note Before start reading the mag compensated Z data + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * + * @param v_bst_akm_z_s16 : The value of Z data + * + * @return results of compensated Z data value output as s32 + * + */ +s32 bmi160_bst_akm09912_compensate_Z(s16 v_bst_akm_z_s16); + /*! + * @brief This function used for read the compensated value of + * AKM09911 + * @note Before start reading the mag compensated data's + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_akm09911_compensate_xyz( +struct bmi160_mag_xyz_s32_t *bst_akm_xyz); + /*! + * @brief This function used for read the compensated value of + * AKM09912 + * @note Before start reading the mag compensated data's + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_akm09912_compensate_xyz( +struct bmi160_mag_xyz_s32_t *bst_akm_xyz); +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_akm09912_compensate_xyz_raw( +struct bmi160_mag_xyz_s32_t *bst_akm_xyz); +/*! + * @brief This function used for set the AKM09911 and AKM09912 + * power mode. + * @note Before set the AKM power mode + * make sure the following two points are addressed + * @note 1. Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * @note 2. And also confirm the secondary-interface power mode + * is not in the SUSPEND mode. + * by using the function bmi160_get_mag_pmu_status(). + * If the secondary-interface power mode is in SUSPEND mode + * set the value of 0x19(NORMAL mode)by using the + * bmi160_set_command_register(0x19) function. + * + * @param v_akm_pow_mode_u8 : The value of akm power mode + * value | Description + * ---------|-------------------- + * 0 | AKM_POWER_DOWN_MODE + * 1 | AKM_SINGLE_MEAS_MODE + * 2 | FUSE_ROM_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_akm_set_powermode(u8 v_akm_pow_mode_u8); + /*! + * @brief This function used for set the magnetometer + * power mode of AKM09911 and AKM09912 + * @note Before set the mag power mode + * make sure the following two point is addressed + * Make sure the mag interface is enabled or not, + * by using the bmi160_get_if_mode() function. + * If mag interface is not enabled set the value of 0x02 + * to the function bmi160_get_if_mode(0x02) + * + * @param v_mag_sec_if_pow_mode_u8 : The value of secondary if power mode + * value | Description + * ---------|-------------------- + * 0 | BMI160_MAG_FORCE_MODE + * 1 | BMI160_MAG_SUSPEND_MODE + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_set_bst_akm_and_secondary_if_powermode( +u8 v_mag_sec_if_pow_mode_u8); +/***************************************************/ +/**\name FUNCTIONS FOR YAMAH-YAS532 */ +/***************************************************/ +/*! + * @brief This function used for read the YAMAH-YAS532 init + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas532_mag_interface_init( +void); +/*! + * @brief This function used to set the YAS532 initial values + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_set_initial_values(void); +/*! + * @brief This function used for YAS532 offset correction + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_magnetic_measure_set_offset( +void); +/*! + * @brief This function used for read the + * YAMAHA YAS532 calibration data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas532_calib_values(void); +/*! + * @brief This function used for calculate the + * YAS532 read the linear data + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_xy1y2_to_linear( +u16 *v_xy1y2_u16, s32 *xy1y2_linear); +/*! + * @brief This function used for read the YAS532 sensor data + * @param v_acquisition_command_u8: used to set the data acquisition + * acquisition_command | operation + * ---------------------|------------------------- + * 0x17 | turn on the acquisition coil + * - | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Deferred acquisition mode + * 0x07 | turn on the acquisition coil + * _ | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Normal acquisition mode + * 0x11 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Deferred acquisition mode + * 0x01 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Normal acquisition mode + * + * @param v_busy_u8 : used to get the busy flay for sensor data read + * @param v_temp_u16 : used to get the temperature data + * @param v_xy1y2_u16 : used to get the sensor xy1y2 data + * @param v_overflow_u8 : used to get the overflow data + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_normal_measurement_data( +u8 v_acquisition_command_u8, u8 *v_busy_u8, +u16 *v_temp_u16, u16 *v_xy1y2_u16, u8 *v_overflow_u8); +/*! + * @brief This function used for YAS532 sensor data + * @param v_acquisition_command_u8 : the value of CMDR + * acquisition_command | operation + * ---------------------|------------------------- + * 0x17 | turn on the acquisition coil + * - | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Deferred acquisition mode + * 0x07 | turn on the acquisition coil + * _ | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Normal acquisition mode + * 0x11 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Deferred acquisition mode + * 0x01 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Normal acquisition mode + * + * @param xyz_data : the vector xyz output + * @param v_overflow_s8 : the value of overflow + * @param v_temp_correction_u8 : the value of temperate correction enable + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_measurement_xyz_data( +struct yas532_vector *xyz_data, u8 *v_overflow_s8, u8 v_temp_correction_u8, +u8 v_acquisition_command_u8); +/*! + * @brief This function used for YAS532 write data acquisition + * command register write + * @param v_command_reg_data_u8 : the value of data acquisition + * acquisition_command | operation + * ---------------------|------------------------- + * 0x17 | turn on the acquisition coil + * - | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Deferred acquisition mode + * 0x07 | turn on the acquisition coil + * _ | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Normal acquisition mode + * 0x11 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Deferred acquisition mode + * 0x01 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Normal acquisition mode + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_acquisition_command_register( +u8 v_command_reg_data_u8); +/*! + * @brief This function used write offset of YAS532 + * + * @param p_offset_s8 : The value of offset to write + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas532_set_offset( +const s8 *p_offset_s8); +/*! + * @brief This function used to init the YAMAH-YAS537 + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * +*/ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_mag_interface_init( +void); +/*! + * @brief This function used for read the + * YAMAHA YAS537 calibration data + * + * + * @param v_rcoil_u8 : The value of r coil + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_calib_values( +u8 v_rcoil_u8); +/*! + * @brief This function used for YAS537 write data acquisition + * command register write + * @param v_command_reg_data_u8 : the value of data acquisition + * acquisition_command | operation + * ---------------------|------------------------- + * 0x17 | turn on the acquisition coil + * - | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Deferred acquisition mode + * 0x07 | turn on the acquisition coil + * _ | set direction of the coil + * _ | (x and y as minus(-)) + * _ | Normal acquisition mode + * 0x11 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Deferred acquisition mode + * 0x01 | turn OFF the acquisition coil + * _ | set direction of the coil + * _ | (x and y as plus(+)) + * _ | Normal acquisition mode + * + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas537_acquisition_command_register( +u8 v_command_reg_data_u8); + +/*! + * @brief This function used for read the + * YAMAHA YAS537 xy1y2 data + * + * @param v_coil_stat_u8: The value of R coil status + * @param v_busy_u8: The value of busy status + * @param v_temperature_u16: The value of temperature + * @param xy1y2: The value of raw xy1y2 data + * @param v_ouflow_u8: The value of overflow + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_read_xy1y2_data( +u8 *v_coil_stat_u8, u8 *v_busy_u8, +u16 *v_temperature_u16, u16 *xy1y2, u8 *v_ouflow_u8); +/*! + * @brief This function used for read the + * YAMAHA YAS537 xy1y2 data + * + * @param v_ouflow_u8: The value of overflow + * + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_measure_xyz_data( +u8 *v_ouflow_u8, struct yas_vector *vector_xyz); + +/***************************************************/ +/**\name FUNCTIONS FOR FIFO DATA READ */ +/***************************************************/ +/*! + * @brief This function used for reading the + * fifo data of header less mode + * + * + * + * @note Configure the below functions for FIFO header less mode + * @note 1. bmi160_set_fifo_down_gyro + * @note 2. bmi160_set_gyro_fifo_filter_data + * @note 3. bmi160_set_fifo_down_accel + * @note 4. bmi160_set_accel_fifo_filter_dat + * @note 5. bmi160_set_fifo_mag_enable + * @note 6. bmi160_set_fifo_accel_enable + * @note 7. bmi160_set_fifo_gyro_enable + * @note For interrupt configuration + * @note 1. bmi160_set_intr_fifo_full + * @note 2. bmi160_set_intr_fifo_wm + * @note 3. bmi160_set_fifo_tag_intr2_enable + * @note 4. bmi160_set_fifo_tag_intr1_enable + * + * @note The fifo reads the whole 1024 bytes + * and processing the data + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_headerless_mode( +void); +/*! + * @brief This function used for reading the + * fifo data of header less mode for using user defined length + * + * + * @param v_fifo_user_length_u16: The value of length of fifo read data + * + * @note Configure the below functions for FIFO header less mode + * @note 1. bmi160_set_fifo_down_gyro + * @note 2. bmi160_set_gyro_fifo_filter_data + * @note 3. bmi160_set_fifo_down_accel + * @note 4. bmi160_set_accel_fifo_filter_dat + * @note 5. bmi160_set_fifo_mag_enable + * @note 6. bmi160_set_fifo_accel_enable + * @note 7. bmi160_set_fifo_gyro_enable + * @note For interrupt configuration + * @note 1. bmi160_set_intr_fifo_full + * @note 2. bmi160_set_intr_fifo_wm + * @note 3. bmi160_set_fifo_tag_intr2_enable + * @note 4. bmi160_set_fifo_tag_intr1_enable + * + * @note The fifo reads the whole 1024 bytes + * and processing the data + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE +bmi160_read_fifo_headerless_mode_user_defined_length( +u16 v_fifo_user_length_u16); +/*! + * @brief This function used for reading the + * fifo data of header mode + * + * + * @note Configure the below functions for FIFO header mode + * @note 1. bmi160_set_fifo_down_gyro() + * @note 2. bmi160_set_gyro_fifo_filter_data() + * @note 3. bmi160_set_fifo_down_accel() + * @note 4. bmi160_set_accel_fifo_filter_dat() + * @note 5. bmi160_set_fifo_mag_enable() + * @note 6. bmi160_set_fifo_accel_enable() + * @note 7. bmi160_set_fifo_gyro_enable() + * @note 8. bmi160_set_fifo_header_enable() + * @note For interrupt configuration + * @note 1. bmi160_set_intr_fifo_full() + * @note 2. bmi160_set_intr_fifo_wm() + * @note 3. bmi160_set_fifo_tag_intr2_enable() + * @note 4. bmi160_set_fifo_tag_intr1_enable() + * + * @note The fifo reads the whole 1024 bytes + * and processing the data + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_header_data( +void); +/*! + * @brief This function used for reading the + * fifo data of header mode for using user defined length + * + * + * @note Configure the below functions for FIFO header mode + * @note 1. bmi160_set_fifo_down_gyro() + * @note 2. bmi160_set_gyro_fifo_filter_data() + * @note 3. bmi160_set_fifo_down_accel() + * @note 4. bmi160_set_accel_fifo_filter_dat() + * @note 5. bmi160_set_fifo_mag_enable() + * @note 6. bmi160_set_fifo_accel_enable() + * @note 7. bmi160_set_fifo_gyro_enable() + * @note 8. bmi160_set_fifo_header_enable() + * @note For interrupt configuration + * @note 1. bmi160_set_intr_fifo_full() + * @note 2. bmi160_set_intr_fifo_wm() + * @note 3. bmi160_set_fifo_tag_intr2_enable() + * @note 4. bmi160_set_fifo_tag_intr1_enable() + * + * @note The fifo reads the whole 1024 bytes + * and processing the data + * + * @return results of bus communication function + * @retval 0 -> Success + * @retval -1 -> Error + * + * + */ +BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_header_data_user_defined_length( +u16 v_fifo_user_length_u16); +/*! + * @brief This function used for reading + * bmi160_t structure + * + * @return the reference and values of bmi160_t + * + * +*/ +struct bmi160_t *bmi160_get_ptr(void); + +#endif + diff --git a/drivers/input/misc/bmi160_driver.c b/drivers/input/misc/bmi160_driver.c new file mode 100755 index 00000000000..4cd6b526983 --- /dev/null +++ b/drivers/input/misc/bmi160_driver.c @@ -0,0 +1,5365 @@ +/*! + * @section LICENSE + * (C) Copyright 2011~2016 Bosch Sensortec GmbH All Rights Reserved + * + * This software program is licensed subject to the GNU General + * Public License (GPL).Version 2,June 1991, + * available at http://www.fsf.org/copyleft/gpl.html + * + * @filename bmi160_driver.c + * @date 2015/08/17 14:40 + * @id "09afbe6" + * @version 1.4 + * + * @brief + * The core code of BMI160 device driver + * + * @detail + * This file implements the core code of BMI160 device driver, + * which includes hardware related functions, input device register, + * device attribute files, etc. +*/ + +#include "bmi160_driver.h" +#include +#include +#include +#include + +#define I2C_BURST_READ_MAX_LEN (256) +#define BMI160_STORE_COUNT (6000) +#define LMADA (1) +uint64_t g_current_apts_us; +static unsigned char g_fifo_data_arr[2048];/*1024 + 12*4*/ + +/*BMI power supply VDD 1.71V-3.6V VIO 1.2-3.6V */ +#define BMI160_VDD_MIN_UV 1750000 +#define BMI160_VDD_MAX_UV 3600000 +#define BMI160_VIO_MIN_UV 1200000 +#define BMI160_VIO_MAX_UV 3600000 + +/* Polling delay in msecs */ +#define POLL_INTERVAL_MIN_MS 10 +#define POLL_INTERVAL_MAX_MS 4000 +#define RETRY_COUNT 50 + + +static struct sensors_classdev accel_cdev = { + .name = "bmi160-accel", + .vendor = "Bosch Corporation", + .version = 1, + .handle = SENSORS_ACCELERATION_HANDLE, + .type = SENSOR_TYPE_ACCELEROMETER, + .max_range = "156.8", + .resolution = "0.153125", + .sensor_power = "0.13", + .min_delay = POLL_INTERVAL_MIN_MS * 1000, /* in microseconds */ + .max_delay = POLL_INTERVAL_MAX_MS, + .fifo_reserved_event_count = 0, + .fifo_max_event_count = 0, + .enabled = 0, + .delay_msec = 200, + .sensors_enable = NULL, + .sensors_poll_delay = NULL, + .sensors_calibrate = NULL, + .sensors_write_cal_params = NULL, + .params = NULL, +}; + +static struct sensors_classdev gyro_cdev = { + .name = "bmi160-gyro", + .vendor = "Bosch Corporation", + .version = 1, + .handle = SENSORS_GYROSCOPE_HANDLE, + .type = SENSOR_TYPE_GYROSCOPE, + .max_range = "35", + .resolution = "0.06", + .sensor_power = "0.13", + .min_delay = POLL_INTERVAL_MIN_MS * 1000, /* in microseconds */ + .max_delay = POLL_INTERVAL_MAX_MS, + .fifo_reserved_event_count = 0, + .fifo_max_event_count = 0, + .enabled = 0, + .delay_msec = 200, + .sensors_enable = NULL, + .sensors_poll_delay = NULL, + .sensors_calibrate = NULL, + .sensors_write_cal_params = NULL, + .params = NULL, +}; + +enum BMI_SENSOR_INT_T { + /* Interrupt enable0*/ + BMI_ANYMO_X_INT = 0, + BMI_ANYMO_Y_INT, + BMI_ANYMO_Z_INT, + BMI_D_TAP_INT, + BMI_S_TAP_INT, + BMI_ORIENT_INT, + BMI_FLAT_INT, + /* Interrupt enable1*/ + BMI_HIGH_X_INT, + BMI_HIGH_Y_INT, + BMI_HIGH_Z_INT, + BMI_LOW_INT, + BMI_DRDY_INT, + BMI_FFULL_INT, + BMI_FWM_INT, + /* Interrupt enable2 */ + BMI_NOMOTION_X_INT, + BMI_NOMOTION_Y_INT, + BMI_NOMOTION_Z_INT, + BMI_STEP_DETECTOR_INT, + INT_TYPE_MAX +}; + +/*bmi fifo sensor type combination*/ +enum BMI_SENSOR_FIFO_COMBINATION { + BMI_FIFO_A = 0, + BMI_FIFO_G, + BMI_FIFO_M, + BMI_FIFO_G_A, + BMI_FIFO_M_A, + BMI_FIFO_M_G, + BMI_FIFO_M_G_A, + BMI_FIFO_COM_MAX +}; + +/*bmi fifo analyse return err status*/ +enum BMI_FIFO_ANALYSE_RETURN_T { + FIFO_OVER_READ_RETURN = -10, + FIFO_SENSORTIME_RETURN = -9, + FIFO_SKIP_OVER_LEN = -8, + FIFO_M_G_A_OVER_LEN = -7, + FIFO_M_G_OVER_LEN = -6, + FIFO_M_A_OVER_LEN = -5, + FIFO_G_A_OVER_LEN = -4, + FIFO_M_OVER_LEN = -3, + FIFO_G_OVER_LEN = -2, + FIFO_A_OVER_LEN = -1 +}; + +/*!bmi sensor generic power mode enum */ +enum BMI_DEV_OP_MODE { + SENSOR_PM_NORMAL = 0, + SENSOR_PM_LP1, + SENSOR_PM_SUSPEND, + SENSOR_PM_LP2 +}; + +/*! bmi acc sensor power mode enum */ +enum BMI_ACC_PM_TYPE { + BMI_ACC_PM_NORMAL = 0, + BMI_ACC_PM_LP1, + BMI_ACC_PM_SUSPEND, + BMI_ACC_PM_LP2, + BMI_ACC_PM_MAX +}; + +/*! bmi gyro sensor power mode enum */ +enum BMI_GYRO_PM_TYPE { + BMI_GYRO_PM_NORMAL = 0, + BMI_GYRO_PM_FAST_START, + BMI_GYRO_PM_SUSPEND, + BMI_GYRO_PM_MAX +}; + +/*! bmi mag sensor power mode enum */ +enum BMI_MAG_PM_TYPE { + BMI_MAG_PM_NORMAL = 0, + BMI_MAG_PM_LP1, + BMI_MAG_PM_SUSPEND, + BMI_MAG_PM_LP2, + BMI_MAG_PM_MAX +}; + + +/*! bmi sensor support type*/ +enum BMI_SENSOR_TYPE { + BMI_ACC_SENSOR, + BMI_GYRO_SENSOR, + BMI_MAG_SENSOR, + BMI_SENSOR_TYPE_MAX +}; + +/*!bmi sensor generic power mode enum */ +enum BMI_AXIS_TYPE { + X_AXIS = 0, + Y_AXIS, + Z_AXIS, + AXIS_MAX +}; + +/*!bmi sensor generic intterrupt enum */ +enum BMI_INT_TYPE { + BMI160_INT0 = 0, + BMI160_INT1, + BMI160_INT_MAX +}; + +/*! bmi sensor time resolution definition*/ +enum BMI_SENSOR_TIME_RS_TYPE { + TS_0_78_HZ = 1,/*0.78HZ*/ + TS_1_56_HZ,/*1.56HZ*/ + TS_3_125_HZ,/*3.125HZ*/ + TS_6_25_HZ,/*6.25HZ*/ + TS_12_5_HZ,/*12.5HZ*/ + TS_25_HZ,/*25HZ, odr=6*/ + TS_50_HZ,/*50HZ*/ + TS_100_HZ,/*100HZ*/ + TS_200_HZ,/*200HZ*/ + TS_400_HZ,/*400HZ*/ + TS_800_HZ,/*800HZ*/ + TS_1600_HZ,/*1600HZ*/ + TS_MAX_HZ +}; + +/*! bmi sensor interface mode */ +enum BMI_SENSOR_IF_MODE_TYPE { + /*primary interface:autoconfig/secondary interface off*/ + P_AUTO_S_OFF = 0, + /*primary interface:I2C/secondary interface:OIS*/ + P_I2C_S_OIS, + /*primary interface:autoconfig/secondary interface:Magnetometer*/ + P_AUTO_S_MAG, + /*interface mode reseved*/ + IF_MODE_RESEVED + +}; + +/*! bmi160 acc/gyro calibration status in H/W layer */ +enum BMI_CALIBRATION_STATUS_TYPE { + /*BMI FAST Calibration ready x/y/z status*/ + BMI_ACC_X_FAST_CALI_RDY = 0, + BMI_ACC_Y_FAST_CALI_RDY, + BMI_ACC_Z_FAST_CALI_RDY +}; + +unsigned int reg_op_addr; + +static const int bmi_pmu_cmd_acc_arr[BMI_ACC_PM_MAX] = { + /*!bmi pmu for acc normal, low power1, + * suspend, low power2 mode command */ + CMD_PMU_ACC_NORMAL, + CMD_PMU_ACC_LP1, + CMD_PMU_ACC_SUSPEND, + CMD_PMU_ACC_LP2 +}; + +static const int bmi_pmu_cmd_gyro_arr[BMI_GYRO_PM_MAX] = { + /*!bmi pmu for gyro normal, fast startup, + * suspend mode command */ + CMD_PMU_GYRO_NORMAL, + CMD_PMU_GYRO_FASTSTART, + CMD_PMU_GYRO_SUSPEND +}; + +static const int bmi_pmu_cmd_mag_arr[BMI_MAG_PM_MAX] = { + /*!bmi pmu for mag normal, low power1, + * suspend, low power2 mode command */ + CMD_PMU_MAG_NORMAL, + CMD_PMU_MAG_LP1, + CMD_PMU_MAG_SUSPEND, + CMD_PMU_MAG_LP2 +}; + +static const char *bmi_axis_name[AXIS_MAX] = {"x", "y", "z"}; + +static const int bmi_interrupt_type[] = { + /*!bmi interrupt type */ + /* Interrupt enable0 , index=0~6*/ + BMI160_ANY_MOTION_X_ENABLE, + BMI160_ANY_MOTION_Y_ENABLE, + BMI160_ANY_MOTION_Z_ENABLE, + BMI160_DOUBLE_TAP_ENABLE, + BMI160_SINGLE_TAP_ENABLE, + BMI160_ORIENT_ENABLE, + BMI160_FLAT_ENABLE, + /* Interrupt enable1, index=7~13*/ + BMI160_HIGH_G_X_ENABLE, + BMI160_HIGH_G_Y_ENABLE, + BMI160_HIGH_G_Z_ENABLE, + BMI160_LOW_G_ENABLE, + BMI160_DATA_RDY_ENABLE, + BMI160_FIFO_FULL_ENABLE, + BMI160_FIFO_WM_ENABLE, + /* Interrupt enable2, index = 14~17*/ + BMI160_NOMOTION_X_ENABLE, + BMI160_NOMOTION_Y_ENABLE, + BMI160_NOMOTION_Z_ENABLE, + BMI160_STEP_DETECTOR_EN +}; + +/*! bmi sensor time depend on ODR*/ +struct bmi_sensor_time_odr_tbl { + u32 ts_duration_lsb; + u32 ts_duration_us; + u32 ts_delat;/*sub current delat fifo_time*/ +}; + +struct bmi160_axis_data_t { + s16 x; + s16 y; + s16 z; +}; +struct bmi160_value_t { + struct bmi160_axis_data_t acc; + struct bmi160_axis_data_t gyro; +#ifdef BMI160_MAG_INTERFACE_SUPPORT + struct bmi160_axis_data_t mag; +#endif + int64_t ts_intvl; +}; +struct bmi160_type_mapping_type { + + /*! bmi16x sensor chip id */ + uint16_t chip_id; + + /*! bmi16x chip revision code */ + uint16_t revision_id; + + /*! bmi160 sensor name */ + const char *sensor_name; +}; + +struct bmi160_store_info_t { + uint8_t current_frm_cnt; + uint64_t current_apts_us[2]; + uint8_t fifo_ts_total_frmcnt; + uint64_t fifo_time; +}; +static struct workqueue_struct *reportdata_wq; +#define FIFO_READ_LENGTH_RECOMMENDED (67) +#define FIFO_SENSORTIME_OVERFLOW_MASK (0x1000000) +#define FIFO_SENSORTIME_RESOLUTION (390625) + +static uint8_t s_fifo_data_buf[FIFO_DATA_BUFSIZE * 2] = {0}; +static uint64_t sensor_time_old = 0; +static uint64_t sensor_time_new = 0; +static uint64_t host_time_old = 0; +static uint64_t host_time_new = 0; + +#define BMI_RING_BUF_SIZE 100 + +static struct bmi160_value_t bmi_ring_buf[BMI_RING_BUF_SIZE]; +static int s_ring_buf_head = 0; +static int s_ring_buf_tail = 0; + + +uint64_t get_current_timestamp(void) +{ + uint64_t ts; + struct timeval tv; + + do_gettimeofday(&tv); + ts = (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; + + return ts; +} + + +/*! sensor support type map */ +static const struct bmi160_type_mapping_type sensor_type_map[] = { + + {SENSOR_CHIP_ID_BMI, SENSOR_CHIP_REV_ID_BMI, "BMI160/162AB"}, + {SENSOR_CHIP_ID_BMI_C2, SENSOR_CHIP_REV_ID_BMI, "BMI160C2"}, + {SENSOR_CHIP_ID_BMI_C3, SENSOR_CHIP_REV_ID_BMI, "BMI160C3"}, + +}; + +/*!bmi160 sensor time depends on ODR */ +static const struct bmi_sensor_time_odr_tbl + sensortime_duration_tbl[TS_MAX_HZ] = { + {0x010000, 2560000, 0x00ffff},/*2560ms, 0.39hz, odr=resver*/ + {0x008000, 1280000, 0x007fff},/*1280ms, 0.78hz, odr_acc=1*/ + {0x004000, 640000, 0x003fff},/*640ms, 1.56hz, odr_acc=2*/ + {0x002000, 320000, 0x001fff},/*320ms, 3.125hz, odr_acc=3*/ + {0x001000, 160000, 0x000fff},/*160ms, 6.25hz, odr_acc=4*/ + {0x000800, 80000, 0x0007ff},/*80ms, 12.5hz*/ + {0x000400, 40000, 0x0003ff},/*40ms, 25hz, odr_acc = odr_gyro =6*/ + {0x000200, 20000, 0x0001ff},/*20ms, 50hz, odr = 7*/ + {0x000100, 10000, 0x0000ff},/*10ms, 100hz, odr=8*/ + {0x000080, 5000, 0x00007f},/*5ms, 200hz, odr=9*/ + {0x000040, 2500, 0x00003f},/*2.5ms, 400hz, odr=10*/ + {0x000020, 1250, 0x00001f},/*1.25ms, 800hz, odr=11*/ + {0x000010, 625, 0x00000f},/*0.625ms, 1600hz, odr=12*/ + +}; + +static void bmi_dump_reg(struct bmi_client_data *client_data) +{ + #define REG_MAX0 0x24 + #define REG_MAX1 0x56 + int i; + u8 dbg_buf0[REG_MAX0]; + u8 dbg_buf1[REG_MAX1]; + u8 dbg_buf_str0[REG_MAX0 * 3 + 1] = ""; + u8 dbg_buf_str1[REG_MAX1 * 3 + 1] = ""; + + dev_notice(client_data->dev, "\nFrom 0x00:\n"); + + client_data->device.bus_read(client_data->device.dev_addr, + BMI_REG_NAME(USER_CHIP_ID), dbg_buf0, REG_MAX0); + for (i = 0; i < REG_MAX0; i++) { + sprintf(dbg_buf_str0 + i * 3, "%02x%c", dbg_buf0[i], + (((i + 1) % BYTES_PER_LINE == 0) ? '\n' : ' ')); + } + dev_notice(client_data->dev, "%s\n", dbg_buf_str0); + + client_data->device.bus_read(client_data->device.dev_addr, + BMI160_USER_ACCEL_CONFIG_ADDR, dbg_buf1, REG_MAX1); + dev_notice(client_data->dev, "\nFrom 0x40:\n"); + for (i = 0; i < REG_MAX1; i++) { + sprintf(dbg_buf_str1 + i * 3, "%02x%c", dbg_buf1[i], + (((i + 1) % BYTES_PER_LINE == 0) ? '\n' : ' ')); + } + dev_notice(client_data->dev, "\n%s\n", dbg_buf_str1); + +} + +/*! +* BMI160 sensor remapping function +* need to give some parameter in BSP files first. +*/ +static const struct bosch_sensor_axis_remap + bst_axis_remap_tab_dft[MAX_AXIS_REMAP_TAB_SZ] = { + /* src_x src_y src_z sign_x sign_y sign_z */ + { 0, 1, 2, 1, 1, 1 }, /* P0 */ + { 1, 0, 2, 1, -1, 1 }, /* P1 */ + { 0, 1, 2, -1, -1, 1 }, /* P2 */ + { 1, 0, 2, -1, 1, 1 }, /* P3 */ + + { 0, 1, 2, -1, 1, -1 }, /* P4 */ + { 1, 0, 2, -1, -1, -1 }, /* P5 */ + { 0, 1, 2, 1, -1, -1 }, /* P6 */ + { 1, 0, 2, 1, 1, -1 }, /* P7 */ +}; + +static int bmi160_power_ctl(struct bmi_client_data *data, bool enable) +{ + int ret = 0; + int err = 0; + + if (!enable && data->power_enabled) { + ret = regulator_disable(data->vdd); + if (ret) { + dev_err(&data->i2c->dev, + "Regulator vdd disable failed ret=%d\n", ret); + return ret; + } + + ret = regulator_disable(data->vio); + if (ret) { + dev_err(&data->i2c->dev, + "Regulator vio disable failed ret=%d\n", ret); + err = regulator_enable(data->vdd); + return ret; + } + data->power_enabled = enable; + } else if (enable && !data->power_enabled) { + ret = regulator_enable(data->vdd); + if (ret) { + dev_err(&data->i2c->dev, + "Regulator vdd enable failed ret=%d\n", ret); + return ret; + } + + ret = regulator_enable(data->vio); + if (ret) { + dev_err(&data->i2c->dev, + "Regulator vio enable failed ret=%d\n", ret); + err = regulator_disable(data->vdd); + return ret; + } + data->power_enabled = enable; + } else { + dev_info(&data->i2c->dev, + "Power on=%d. enabled=%d\n", + enable, data->power_enabled); + } + + return ret; +} + +static int bmi160_power_init(struct bmi_client_data *data) +{ + int ret; + + data->vdd = regulator_get(&data->i2c->dev, "vdd"); + if (IS_ERR(data->vdd)) { + ret = PTR_ERR(data->vdd); + dev_err(&data->i2c->dev, + "Regulator get failed vdd ret=%d\n", ret); + return ret; + } + + if (regulator_count_voltages(data->vdd) > 0) { + ret = regulator_set_voltage(data->vdd, + BMI160_VDD_MIN_UV, + BMI160_VDD_MAX_UV); + if (ret) { + dev_err(&data->i2c->dev, + "Regulator set failed vdd ret=%d\n", + ret); + goto reg_vdd_put; + } + } + + data->vio = regulator_get(&data->i2c->dev, "vio"); + if (IS_ERR(data->vio)) { + ret = PTR_ERR(data->vio); + dev_err(&data->i2c->dev, + "Regulator get failed vio ret=%d\n", ret); + goto reg_vdd_set; + } + + if (regulator_count_voltages(data->vio) > 0) { + ret = regulator_set_voltage(data->vio, + BMI160_VIO_MIN_UV, + BMI160_VIO_MAX_UV); + if (ret) { + dev_err(&data->i2c->dev, + "Regulator set failed vio ret=%d\n", ret); + goto reg_vio_put; + } + } + + return 0; + +reg_vio_put: + regulator_put(data->vio); +reg_vdd_set: + if (regulator_count_voltages(data->vdd) > 0) + regulator_set_voltage(data->vdd, 0, BMI160_VDD_MAX_UV); +reg_vdd_put: + regulator_put(data->vdd); + return ret; +} + +static int bmi160_power_deinit(struct bmi_client_data *data) +{ + if (regulator_count_voltages(data->vdd) > 0) + regulator_set_voltage(data->vdd, + 0, BMI160_VDD_MAX_UV); + + regulator_put(data->vdd); + + if (regulator_count_voltages(data->vio) > 0) + regulator_set_voltage(data->vio, + 0, BMI160_VIO_MAX_UV); + + regulator_put(data->vio); + + return 0; +} + +static void bst_remap_sensor_data(struct bosch_sensor_data *data, + const struct bosch_sensor_axis_remap *remap) +{ + struct bosch_sensor_data tmp; + + tmp.x = data->v[remap->src_x] * remap->sign_x; + tmp.y = data->v[remap->src_y] * remap->sign_y; + tmp.z = data->v[remap->src_z] * remap->sign_z; + + memcpy(data, &tmp, sizeof(*data)); +} + +static void bst_remap_sensor_data_dft_tab(struct bosch_sensor_data *data, + int place) +{ +/* sensor with place 0 needs not to be remapped */ + if ((place <= 0) || (place >= MAX_AXIS_REMAP_TAB_SZ)) + return; + bst_remap_sensor_data(data, &bst_axis_remap_tab_dft[place]); +} + +static void bmi_remap_sensor_data(struct bmi160_axis_data_t *val, + struct bmi_client_data *client_data) +{ + struct bosch_sensor_data bsd; + + if ((NULL == client_data->pdata) || + (BOSCH_SENSOR_PLACE_UNKNOWN + == client_data->pdata->place)) + return; + + bsd.x = val->x; + bsd.y = val->y; + bsd.z = val->z; + + bst_remap_sensor_data_dft_tab(&bsd, + client_data->pdata->place); + + val->x = bsd.x; + val->y = bsd.y; + val->z = bsd.z; + +} + +static void bmi_remap_data_acc(struct bmi_client_data *client_data, + struct bmi160_accel_t *acc_frame) +{ + struct bosch_sensor_data bsd; + + if ((NULL == client_data->pdata) || + (BOSCH_SENSOR_PLACE_UNKNOWN + == client_data->pdata->place)) + return; + + bsd.x = acc_frame->x; + bsd.y = acc_frame->y; + bsd.z = acc_frame->z; + + bst_remap_sensor_data_dft_tab(&bsd, + client_data->pdata->place); + + acc_frame->x = bsd.x; + acc_frame->y = bsd.y; + acc_frame->z = bsd.z; + + +} + +static void bmi_remap_data_gyro(struct bmi_client_data *client_data, + struct bmi160_gyro_t *gyro_frame) +{ + struct bosch_sensor_data bsd; + + if ((NULL == client_data->pdata) || + (BOSCH_SENSOR_PLACE_UNKNOWN + == client_data->pdata->place)) + return; + + bsd.x = gyro_frame->x; + bsd.y = gyro_frame->y; + bsd.z = gyro_frame->z; + + bst_remap_sensor_data_dft_tab(&bsd, + client_data->pdata->place); + + gyro_frame->x = bsd.x; + gyro_frame->y = bsd.y; + gyro_frame->z = bsd.z; + + +} + +static void bmi_fifo_frame_bytes_extend_calc( + struct bmi_client_data *client_data, + unsigned int *fifo_frmbytes_extend) +{ + + switch (client_data->fifo_data_sel) { + case BMI_FIFO_A_SEL: + case BMI_FIFO_G_SEL: + *fifo_frmbytes_extend = 7; + break; + case BMI_FIFO_G_A_SEL: + *fifo_frmbytes_extend = 13; + break; + case BMI_FIFO_M_SEL: + *fifo_frmbytes_extend = 9; + break; + case BMI_FIFO_M_A_SEL: + case BMI_FIFO_M_G_SEL: + /*8(mag) + 6(gyro or acc) +1(head) = 15*/ + *fifo_frmbytes_extend = 15; + break; + case BMI_FIFO_M_G_A_SEL: + /*8(mag) + 6(gyro or acc) + 6 + 1 = 21*/ + *fifo_frmbytes_extend = 21; + break; + default: + *fifo_frmbytes_extend = 0; + break; + + }; + +} + +static int bmi_input_init(struct bmi_client_data *client_data) +{ + struct input_dev *dev; + int err = 0; + + dev = devm_input_allocate_device(&client_data->i2c->dev); + if (NULL == dev) + return -ENOMEM; + + dev->name = BMI160_ACCEL_INPUT_NAME; + dev->id.bustype = BUS_I2C; + + input_set_capability(dev, EV_ABS, ABS_MISC); + input_set_abs_params(dev, ABS_X, ABSMIN, ABSMAX, 0, 0); + input_set_abs_params(dev, ABS_Y, ABSMIN, ABSMAX, 0, 0); + input_set_abs_params(dev, ABS_Z, ABSMIN, ABSMAX, 0, 0); + + input_set_drvdata(dev, client_data); + err = input_register_device(dev); + if (err < 0) { + input_free_device(dev); + dev_notice(client_data->dev, "bmi160 accel input free!\n"); + return err; + } + client_data->input_accel = dev; + dev_notice(client_data->dev, + "bmi160 accel input register successfully, %s!\n", + client_data->input_accel->name); + + dev = devm_input_allocate_device(&client_data->i2c->dev); + if (NULL == dev) + return -ENOMEM; + + dev->name = BMI160_GYRO_INPUT_NAME; + dev->id.bustype = BUS_I2C; + + + input_set_capability(dev, EV_ABS, ABS_MISC); + input_set_abs_params(dev, ABS_RX, GYRO_MAX_VALUE, GYRO_MIN_VALUE, 0, 0); + input_set_abs_params(dev, ABS_RY, GYRO_MAX_VALUE, GYRO_MIN_VALUE, 0, 0); + input_set_abs_params(dev, ABS_RZ, GYRO_MAX_VALUE, GYRO_MIN_VALUE, 0, 0); + input_set_drvdata(dev, client_data); + + err = input_register_device(dev); + if (err < 0) { + input_free_device(dev); + dev_notice(client_data->dev, "bmi160 accel input free!\n"); + return err; + } + client_data->input_gyro = dev; + dev_notice(client_data->dev, + "bmi160 gyro input register successfully, %s!\n", + client_data->input_gyro->name); + + return err; +} + + +static void bmi_input_destroy(struct bmi_client_data *client_data) +{ + struct input_dev *dev = client_data->input_accel; + + input_unregister_device(dev); + input_free_device(dev); + + dev = client_data->input_gyro; + input_unregister_device(dev); + input_free_device(dev); +} + +static int bmi_check_chip_id(struct bmi_client_data *client_data) +{ + int8_t err = 0; + int8_t i = 0; + uint8_t chip_id = 0; + uint8_t read_count = 0; + u8 bmi_sensor_cnt = sizeof(sensor_type_map) + / sizeof(struct bmi160_type_mapping_type); + /* read and check chip id */ + while (read_count++ < CHECK_CHIP_ID_TIME_MAX) { + if (client_data->device.bus_read(client_data->device.dev_addr, + BMI_REG_NAME(USER_CHIP_ID), &chip_id, 1) < 0) { + + dev_err(client_data->dev, + "Bosch Sensortec Device not found" + "read chip_id:%d\n", chip_id); + continue; + } else { + for (i = 0; i < bmi_sensor_cnt; i++) { + if (sensor_type_map[i].chip_id == chip_id) { + client_data->chip_id = chip_id; + dev_notice(client_data->dev, + "Bosch Sensortec Device detected, " + "HW IC name: %s\n", sensor_type_map[i].sensor_name); + break; + } + } + if (i < bmi_sensor_cnt) + break; + else { + if (read_count == CHECK_CHIP_ID_TIME_MAX) { + dev_err(client_data->dev, + "Failed!Bosch Sensortec Device not found" + " mismatch chip_id:%d\n", chip_id); + err = -ENODEV; + return err; + } + } + mdelay(1); + } + } + return err; + +} + +static int bmi_pmu_set_suspend(struct bmi_client_data *client_data) +{ + int err = 0; + if (client_data == NULL) + return -EINVAL; + else { + err += BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_acc_arr[SENSOR_PM_SUSPEND]); + err += BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_gyro_arr[SENSOR_PM_SUSPEND]); + err += BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_mag_arr[SENSOR_PM_SUSPEND]); + client_data->pw.acc_pm = BMI_ACC_PM_SUSPEND; + client_data->pw.gyro_pm = BMI_GYRO_PM_SUSPEND; + client_data->pw.mag_pm = BMI_MAG_PM_SUSPEND; + } + + return err; +} + +static int bmi_get_err_status(struct bmi_client_data *client_data) +{ + int err = 0; + + err = BMI_CALL_API(get_error_status)(&client_data->err_st.fatal_err, + &client_data->err_st.err_code, &client_data->err_st.i2c_fail, + &client_data->err_st.drop_cmd, &client_data->err_st.mag_drdy_err); + return err; +} + + +static enum hrtimer_restart reportdata_timer_fun( + struct hrtimer *hrtimer) +{ + struct bmi_client_data *client_data = + container_of(hrtimer, struct bmi_client_data, timer); + int32_t delay = 0; + delay = atomic_read(&client_data->delay); + queue_work(reportdata_wq, &(client_data->report_data_work)); + client_data->work_delay_kt = ns_to_ktime(delay*1000000); + hrtimer_forward(hrtimer, ktime_get(), client_data->work_delay_kt); + + return HRTIMER_RESTART; +} + +static ssize_t bmi_show_enable_timer(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + return snprintf(buf, 16, "%d\n", client_data->is_timer_running); +} + +static ssize_t bmi_store_enable_timer(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int error; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + error = kstrtoul(buf, 10, &data); + if (error) + return error; + if (data) { + if (0 == client_data->is_timer_running) { + hrtimer_start(&client_data->timer, + ns_to_ktime(10000000), + HRTIMER_MODE_REL); + client_data->is_timer_running = 1; + } + } else { + if (1 == client_data->is_timer_running) { + hrtimer_cancel(&client_data->timer); + client_data->is_timer_running = 0; + } + } + return count; +} + +static void bmi_work_func(struct work_struct *work) +{ + struct bmi_client_data *client_data = + container_of((struct delayed_work *)work, + struct bmi_client_data, work); + unsigned long delay = + msecs_to_jiffies(atomic_read(&client_data->acc_delay)); + struct bmi160_accel_t data; + struct bmi160_axis_data_t bmi160_udata; + ktime_t ts; + int err; + + ts = ktime_get_boottime(); + err = BMI_CALL_API(read_accel_xyz)(&data); + if (err < 0) + return; + + bmi160_udata.x = data.x; + bmi160_udata.y = data.y; + bmi160_udata.z = data.z; + + bmi_remap_sensor_data(&bmi160_udata, client_data); + /*report current frame via input event*/ + input_event(client_data->input_accel, EV_ABS, ABS_X, bmi160_udata.x); + input_event(client_data->input_accel, EV_ABS, ABS_Y, bmi160_udata.y); + input_event(client_data->input_accel, EV_ABS, ABS_Z, bmi160_udata.z); + input_event(client_data->input_accel, EV_SYN, SYN_TIME_SEC, + ktime_to_timespec(ts).tv_sec); + input_event(client_data->input_accel, EV_SYN, SYN_TIME_NSEC, + ktime_to_timespec(ts).tv_nsec); + input_sync(client_data->input_accel); + + schedule_delayed_work(&client_data->work, delay); +} + +static void bmi_gyro_work_func(struct work_struct *work) +{ + struct bmi_client_data *client_data = container_of( + (struct delayed_work *)work, + struct bmi_client_data, gyro_work); + unsigned long delay = + msecs_to_jiffies(atomic_read(&client_data->gyro_delay)); + struct bmi160_gyro_t data; + struct bmi160_axis_data_t bmi160_udata; + ktime_t ts; + int err; + + ts = ktime_get_boottime(); + err = BMI_CALL_API(read_gyro_xyz)(&data); + if (err < 0) + return; + + bmi160_udata.x = data.x; + bmi160_udata.y = data.y; + bmi160_udata.z = data.z; + + bmi_remap_sensor_data(&bmi160_udata, client_data); + /*report current frame via input event*/ + input_event(client_data->input_gyro, EV_ABS, ABS_RX, -bmi160_udata.x); + input_event(client_data->input_gyro, EV_ABS, ABS_RY, bmi160_udata.y); + input_event(client_data->input_gyro, EV_ABS, ABS_RZ, -bmi160_udata.z); + input_event(client_data->input_gyro, EV_SYN, SYN_TIME_SEC, + ktime_to_timespec(ts).tv_sec); + input_event(client_data->input_gyro, EV_SYN, SYN_TIME_NSEC, + ktime_to_timespec(ts).tv_nsec); + input_sync(client_data->input_gyro); + + schedule_delayed_work(&client_data->gyro_work, delay); +} + +static uint8_t dbg_buf_str[2048] = ""; +static void bmi_hrtimer_work_func(struct work_struct *work) +{ + struct bmi_client_data *client_data = + container_of((struct delayed_work *)work, + struct bmi_client_data, work); + + unsigned int fifo_len0 = 0; + unsigned int fifo_frmbytes_ext = 0; + unsigned int fifo_read_len = 0; + int i, err; + + bmi_fifo_frame_bytes_extend_calc(client_data, &fifo_frmbytes_ext); + + err = BMI_CALL_API(fifo_length)(&fifo_len0); + client_data->fifo_bytecount = fifo_len0; + + if (client_data->fifo_bytecount == 0 || err) { + return ; + } + + fifo_read_len = client_data->fifo_bytecount + fifo_frmbytes_ext; + if (fifo_read_len > FIFO_DATA_BUFSIZE) { + fifo_read_len = FIFO_DATA_BUFSIZE; + } + + if (!err) { + err = bmi_burst_read_wrapper(client_data->device.dev_addr, + BMI160_USER_FIFO_DATA__REG, s_fifo_data_buf, + fifo_read_len); + } + + for (i = 0; i < fifo_read_len; i++) { + sprintf(dbg_buf_str + i * 3, "%02x%c", s_fifo_data_buf[i], + (((i + 1) % BYTES_PER_LINE == 0) ? '\n' : ' ')); + } + pr_info("%s\n", dbg_buf_str); + +} + +static ssize_t bmi160_chip_id_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + return sprintf(buf, "0x%x\n", client_data->chip_id); +} + +static ssize_t bmi160_err_st_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err = 0; + err = bmi_get_err_status(client_data); + if (err) + return err; + else { + return sprintf(buf, "fatal_err:0x%x, err_code:%d,\n\n" + "i2c_fail_err:%d, drop_cmd_err:%d, mag_drdy_err:%d\n", + client_data->err_st.fatal_err, + client_data->err_st.err_code, + client_data->err_st.i2c_fail, + client_data->err_st.drop_cmd, + client_data->err_st.mag_drdy_err); + } +} + +static ssize_t bmi160_sensor_time_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err = 0; + u32 sensor_time; + err = BMI_CALL_API(get_sensor_time)(&sensor_time); + if (err) + return err; + else + return sprintf(buf, "0x%x\n", (unsigned int)sensor_time); +} + +static ssize_t bmi160_fifo_flush_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long enable; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &enable); + if (err) + return err; + if (enable) + err = BMI_CALL_API(set_command_register)(CMD_CLR_FIFO_DATA); + + if (err) + dev_err(client_data->dev, "fifo flush failed!\n"); + + return count; + +} + + +static ssize_t bmi160_fifo_bytecount_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned int fifo_bytecount = 0; + + BMI_CALL_API(fifo_length)(&fifo_bytecount); + err = sprintf(buf, "%u\n", fifo_bytecount); + return err; +} + +static ssize_t bmi160_fifo_bytecount_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err; + unsigned long data; + err = kstrtoul(buf, 10, &data); + if (err) + return err; + client_data->fifo_bytecount = (unsigned int) data; + + return count; +} + +int bmi160_fifo_data_sel_get(struct bmi_client_data *client_data) +{ + int err = 0; + unsigned char fifo_acc_en, fifo_gyro_en, fifo_mag_en; + unsigned char fifo_datasel; + + err += BMI_CALL_API(get_fifo_accel_enable)(&fifo_acc_en); + err += BMI_CALL_API(get_fifo_gyro_enable)(&fifo_gyro_en); + err += BMI_CALL_API(get_fifo_mag_enable)(&fifo_mag_en); + + if (err) + return err; + + fifo_datasel = (fifo_acc_en << BMI_ACC_SENSOR) | + (fifo_gyro_en << BMI_GYRO_SENSOR) | + (fifo_mag_en << BMI_MAG_SENSOR); + + client_data->fifo_data_sel = fifo_datasel; + + return err; + + +} + +static ssize_t bmi160_fifo_data_sel_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err = 0; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + err = bmi160_fifo_data_sel_get(client_data); + if (err) + return -EINVAL; + return sprintf(buf, "%d\n", client_data->fifo_data_sel); +} + +/* write any value to clear all the fifo data. */ +static ssize_t bmi160_fifo_data_sel_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err; + unsigned long data; + unsigned char fifo_datasel; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + /* data format: aimed 0b0000 0x(m)x(g)x(a), x:1 enable, 0:disable*/ + if (data > 7) + return -EINVAL; + + + fifo_datasel = (unsigned char)data; + + + err += BMI_CALL_API(set_fifo_accel_enable) + ((fifo_datasel & (1 << BMI_ACC_SENSOR)) ? 1 : 0); + err += BMI_CALL_API(set_fifo_gyro_enable) + (fifo_datasel & (1 << BMI_GYRO_SENSOR) ? 1 : 0); + err += BMI_CALL_API(set_fifo_mag_enable) + ((fifo_datasel & (1 << BMI_MAG_SENSOR)) ? 1 : 0); + + /*err += BMI_CALL_API(set_command_register)(CMD_CLR_FIFO_DATA);*/ + if (err) + return -EIO; + else { + dev_notice(client_data->dev, "FIFO A_en:%d, G_en:%d, M_en:%d\n", + (fifo_datasel & (1 << BMI_ACC_SENSOR)) ? 1 : 0, + (fifo_datasel & (1 << BMI_GYRO_SENSOR) ? 1 : 0), + ((fifo_datasel & (1 << BMI_MAG_SENSOR)) ? 1 : 0)); + client_data->fifo_data_sel = fifo_datasel; + } + + return count; +} + +static int bmi_fifo_analysis_handle(struct bmi_client_data *client_data, + u8 *fifo_data, u16 fifo_length, char *buf) +{ + u8 frame_head = 0;/* every frame head*/ + int len = 0; + + /*u8 skip_frame_cnt = 0;*/ + u8 acc_frm_cnt = 0;/*0~146*/ + u8 gyro_frm_cnt = 0; + u8 mag_frm_cnt = 0; + u8 tmp_frm_cnt = 0; + /*u8 tmp_odr = 0;*/ + /*uint64_t current_apts_us = 0;*/ + /*fifo data last frame start_index A G M*/ + u64 fifo_time = 0; + static uint32_t current_frm_ts; + u16 fifo_index = 0;/* fifo data buff index*/ + u16 fifo_index_tmp = 0; + u16 i = 0; + s8 last_return_st = 0; + int err = 0; + unsigned int frame_bytes = 0; + struct bmi160_mag_xyzr_t mag; + struct bmi160_mag_xyz_s32_t mag_comp_xyz; + struct bmi160_accel_t acc_frame_arr[FIFO_FRAME_CNT]; + struct bmi160_gyro_t gyro_frame_arr[FIFO_FRAME_CNT]; + struct bmi160_mag_xyzr_t mag_frame_arr[FIFO_FRAME_CNT]; + + struct odr_t odr; + + memset(&odr, 0, sizeof(odr)); + memset(&mag, 0, sizeof(mag)); + memset(&mag_comp_xyz, 0, sizeof(mag_comp_xyz)); + for (i = 0; i < FIFO_FRAME_CNT; i++) { + memset(&mag_frame_arr[i], 0, sizeof(struct bmi160_mag_xyzr_t)); + memset(&acc_frame_arr[i], 0, sizeof(struct bmi160_accel_t)); + memset(&gyro_frame_arr[i], 0, sizeof(struct bmi160_gyro_t)); + } + /*current_apts_us = get_current_timestamp();*/ + /* no fifo select for bmi sensor*/ + if (!client_data->fifo_data_sel) { + dev_err(client_data->dev, + "No select any sensor FIFO for BMI16x\n"); + return -EINVAL; + } + /*driver need read acc_odr/gyro_odr/mag_odr*/ + if ((client_data->fifo_data_sel) & (1 << BMI_ACC_SENSOR)) + odr.acc_odr = client_data->odr.acc_odr; + if ((client_data->fifo_data_sel) & (1 << BMI_GYRO_SENSOR)) + odr.gyro_odr = client_data->odr.gyro_odr; + if ((client_data->fifo_data_sel) & (1 << BMI_MAG_SENSOR)) + odr.mag_odr = client_data->odr.mag_odr; + bmi_fifo_frame_bytes_extend_calc(client_data, &frame_bytes); +/* search sensor time sub function firstly */ + for (fifo_index = 0; fifo_index < fifo_length;) { + /* conside limited HW i2c burst reading issue, + need to re-calc index 256 512 768 1024...*/ + if ((fifo_index_tmp >> 8) != (fifo_index >> 8)) { + if (fifo_data[fifo_index_tmp] == + fifo_data[(fifo_index >> 8)<<8]) { + fifo_index = (fifo_index >> 8) << 8; + fifo_length += + (fifo_index - fifo_index_tmp + 1); + } + } + fifo_index_tmp = fifo_index; + /* compare index with 256/512/ before doing parsing*/ + if (((fifo_index + frame_bytes) >> 8) != (fifo_index >> 8)) { + fifo_index = ((fifo_index + frame_bytes) >> 8) << 8; + continue; + } + + frame_head = fifo_data[fifo_index]; + + switch (frame_head) { + /*skip frame 0x40 22 0x84*/ + case FIFO_HEAD_SKIP_FRAME: + /*fifo data frame index + 1*/ + fifo_index = fifo_index + 1; + if (fifo_index + 1 > fifo_length) { + last_return_st = FIFO_SKIP_OVER_LEN; + break; + } + /*skip_frame_cnt = fifo_data[fifo_index];*/ + fifo_index = fifo_index + 1; + break; + + /*M & G & A*/ + case FIFO_HEAD_M_G_A: + {/*fifo data frame index + 1*/ + fifo_index = fifo_index + 1; + if (fifo_index + MGA_BYTES_FRM > fifo_length) { + last_return_st = FIFO_M_G_A_OVER_LEN; + break; + } + + /* mag frm index = gyro */ + mag_frm_cnt = gyro_frm_cnt; + mag_frame_arr[mag_frm_cnt].x = + fifo_data[fifo_index + 1] << 8 | + fifo_data[fifo_index + 0]; + mag_frame_arr[mag_frm_cnt].y = + fifo_data[fifo_index + 3] << 8 | + fifo_data[fifo_index + 2]; + mag_frame_arr[mag_frm_cnt].z = + fifo_data[fifo_index + 5] << 8 | + fifo_data[fifo_index + 4]; + mag_frame_arr[mag_frm_cnt].r = + fifo_data[fifo_index + 7] << 8 | + fifo_data[fifo_index + 6]; + + gyro_frame_arr[gyro_frm_cnt].x = + fifo_data[fifo_index + 9] << 8 | + fifo_data[fifo_index + 8]; + gyro_frame_arr[gyro_frm_cnt].y = + fifo_data[fifo_index + 11] << 8 | + fifo_data[fifo_index + 10]; + gyro_frame_arr[gyro_frm_cnt].z = + fifo_data[fifo_index + 13] << 8 | + fifo_data[fifo_index + 12]; + + acc_frame_arr[acc_frm_cnt].x = + fifo_data[fifo_index + 15] << 8 | + fifo_data[fifo_index + 14]; + acc_frame_arr[acc_frm_cnt].y = + fifo_data[fifo_index + 17] << 8 | + fifo_data[fifo_index + 16]; + acc_frame_arr[acc_frm_cnt].z = + fifo_data[fifo_index + 19] << 8 | + fifo_data[fifo_index + 18]; + + mag_frm_cnt++;/* M fram_cnt++ */ + gyro_frm_cnt++;/* G fram_cnt++ */ + acc_frm_cnt++;/* A fram_cnt++ */ + + fifo_index = fifo_index + MGA_BYTES_FRM; + break; + } + + case FIFO_HEAD_M_A: + {/*fifo data frame index + 1*/ + fifo_index = fifo_index + 1; + if (fifo_index + MA_BYTES_FRM > fifo_length) { + last_return_st = FIFO_M_A_OVER_LEN; + break; + } + + mag_frm_cnt = acc_frm_cnt; + + mag_frame_arr[mag_frm_cnt].x = + fifo_data[fifo_index + 1] << 8 | + fifo_data[fifo_index + 0]; + mag_frame_arr[mag_frm_cnt].y = + fifo_data[fifo_index + 3] << 8 | + fifo_data[fifo_index + 2]; + mag_frame_arr[mag_frm_cnt].z = + fifo_data[fifo_index + 5] << 8 | + fifo_data[fifo_index + 4]; + mag_frame_arr[mag_frm_cnt].r = + fifo_data[fifo_index + 7] << 8 | + fifo_data[fifo_index + 6]; + + acc_frame_arr[acc_frm_cnt].x = + fifo_data[fifo_index + 9] << 8 | + fifo_data[fifo_index + 8]; + acc_frame_arr[acc_frm_cnt].y = + fifo_data[fifo_index + 11] << 8 | + fifo_data[fifo_index + 10]; + acc_frame_arr[acc_frm_cnt].z = + fifo_data[fifo_index + 13] << 8 | + fifo_data[fifo_index + 12]; + + mag_frm_cnt++;/* M fram_cnt++ */ + acc_frm_cnt++;/* A fram_cnt++ */ + + fifo_index = fifo_index + MA_BYTES_FRM; + break; + } + + case FIFO_HEAD_M_G: + {/*fifo data frame index + 1*/ + fifo_index = fifo_index + 1; + if (fifo_index + MG_BYTES_FRM > fifo_length) { + last_return_st = FIFO_M_G_OVER_LEN; + break; + } + + mag_frm_cnt = gyro_frm_cnt; + mag_frame_arr[mag_frm_cnt].x = + fifo_data[fifo_index + 1] << 8 | + fifo_data[fifo_index + 0]; + mag_frame_arr[mag_frm_cnt].y = + fifo_data[fifo_index + 3] << 8 | + fifo_data[fifo_index + 2]; + mag_frame_arr[mag_frm_cnt].z = + fifo_data[fifo_index + 5] << 8 | + fifo_data[fifo_index + 4]; + mag_frame_arr[mag_frm_cnt].r = + fifo_data[fifo_index + 7] << 8 | + fifo_data[fifo_index + 6]; + + gyro_frame_arr[gyro_frm_cnt].x = + fifo_data[fifo_index + 9] << 8 | + fifo_data[fifo_index + 8]; + gyro_frame_arr[gyro_frm_cnt].y = + fifo_data[fifo_index + 11] << 8 | + fifo_data[fifo_index + 10]; + gyro_frame_arr[gyro_frm_cnt].z = + fifo_data[fifo_index + 13] << 8 | + fifo_data[fifo_index + 12]; + + mag_frm_cnt++;/* M fram_cnt++ */ + gyro_frm_cnt++;/* G fram_cnt++ */ + fifo_index = fifo_index + MG_BYTES_FRM; + break; + } + + case FIFO_HEAD_G_A: + { /*fifo data frame index + 1*/ + fifo_index = fifo_index + 1; + if (fifo_index + GA_BYTES_FRM > fifo_length) { + last_return_st = FIFO_G_A_OVER_LEN; + break; + } + gyro_frame_arr[gyro_frm_cnt].x = + fifo_data[fifo_index + 1] << 8 | + fifo_data[fifo_index + 0]; + gyro_frame_arr[gyro_frm_cnt].y = + fifo_data[fifo_index + 3] << 8 | + fifo_data[fifo_index + 2]; + gyro_frame_arr[gyro_frm_cnt].z = + fifo_data[fifo_index + 5] << 8 | + fifo_data[fifo_index + 4]; + + acc_frame_arr[acc_frm_cnt].x = + fifo_data[fifo_index + 7] << 8 | + fifo_data[fifo_index + 6]; + acc_frame_arr[acc_frm_cnt].y = + fifo_data[fifo_index + 9] << 8 | + fifo_data[fifo_index + 8]; + acc_frame_arr[acc_frm_cnt].z = + fifo_data[fifo_index + 11] << 8 | + fifo_data[fifo_index + 10]; + + bmi_remap_data_gyro(client_data, + &gyro_frame_arr[gyro_frm_cnt]); + bmi_remap_data_acc(client_data, + &acc_frame_arr[acc_frm_cnt]); + + gyro_frm_cnt++; + acc_frm_cnt++; + fifo_index = fifo_index + GA_BYTES_FRM; + + break; + } + case FIFO_HEAD_A: + { /*fifo data frame index + 1*/ + fifo_index = fifo_index + 1; + if (fifo_index + A_BYTES_FRM > fifo_length) { + last_return_st = FIFO_A_OVER_LEN; + break; + } + + acc_frame_arr[acc_frm_cnt].x = + fifo_data[fifo_index + 1] << 8 | + fifo_data[fifo_index + 0]; + acc_frame_arr[acc_frm_cnt].y = + fifo_data[fifo_index + 3] << 8 | + fifo_data[fifo_index + 2]; + acc_frame_arr[acc_frm_cnt].z = + fifo_data[fifo_index + 5] << 8 | + fifo_data[fifo_index + 4]; + + bmi_remap_data_acc(client_data, + &acc_frame_arr[acc_frm_cnt]); + + acc_frm_cnt++;/*acc_frm_cnt*/ + fifo_index = fifo_index + A_BYTES_FRM; + break; + } + case FIFO_HEAD_G: + { /*fifo data frame index + 1*/ + fifo_index = fifo_index + 1; + if (fifo_index + G_BYTES_FRM > fifo_length) { + last_return_st = FIFO_G_OVER_LEN; + break; + } + + gyro_frame_arr[gyro_frm_cnt].x = + fifo_data[fifo_index + 1] << 8 | + fifo_data[fifo_index + 0]; + gyro_frame_arr[gyro_frm_cnt].y = + fifo_data[fifo_index + 3] << 8 | + fifo_data[fifo_index + 2]; + gyro_frame_arr[gyro_frm_cnt].z = + fifo_data[fifo_index + 5] << 8 | + fifo_data[fifo_index + 4]; + + bmi_remap_data_gyro(client_data, + &gyro_frame_arr[gyro_frm_cnt]); + + gyro_frm_cnt++;/*gyro_frm_cnt*/ + + fifo_index = fifo_index + G_BYTES_FRM; + break; + } + case FIFO_HEAD_M: + { /*fifo data frame index + 1*/ + fifo_index = fifo_index + 1; + if (fifo_index + A_BYTES_FRM > fifo_length) { + last_return_st = FIFO_M_OVER_LEN; + break; + } + + mag_frame_arr[mag_frm_cnt].x = + fifo_data[fifo_index + 1] << 8 | + fifo_data[fifo_index + 0]; + mag_frame_arr[mag_frm_cnt].y = + fifo_data[fifo_index + 3] << 8 | + fifo_data[fifo_index + 2]; + mag_frame_arr[mag_frm_cnt].z = + fifo_data[fifo_index + 5] << 8 | + fifo_data[fifo_index + 4]; + mag_frame_arr[mag_frm_cnt].r = + fifo_data[fifo_index + 7] << 8 | + fifo_data[fifo_index + 6]; + + mag_frm_cnt++;/* M fram_cnt++ */ + + fifo_index = fifo_index + M_BYTES_FRM; + break; + } + + /* sensor time frame*/ + case FIFO_HEAD_SENSOR_TIME: + { + /*fifo data frame index + 1*/ + fifo_index = fifo_index + 1; + + if (fifo_index + 3 > fifo_length) { + last_return_st = FIFO_SENSORTIME_RETURN; + break; + } + fifo_time = + fifo_data[fifo_index + 2] << 16 | + fifo_data[fifo_index + 1] << 8 | + fifo_data[fifo_index + 0]; + + client_data->fifo_time = fifo_time; + /*fifo sensor time frame index + 3*/ + fifo_index = fifo_index + 3; + break; + } + case FIFO_HEAD_OVER_READ_LSB: + /*fifo data frame index + 1*/ + fifo_index = fifo_index + 1; + + if (fifo_index + 1 > fifo_length) { + last_return_st = FIFO_OVER_READ_RETURN; + break; + } + if (fifo_data[fifo_index] == + FIFO_HEAD_OVER_READ_MSB) { + /*fifo over read frame index + 1*/ + fifo_index = fifo_index + 1; + break; + } else { + last_return_st = FIFO_OVER_READ_RETURN; + break; + } + + default: + last_return_st = 1; + break; + + } + if (last_return_st) + break; + } + fifo_time = 0; +/*current_frm_ts = current_apts_us - +((fifo_time & (sensortime_duration_tbl[odr.acc_odr].ts_delat)) + +(sensortime_duration_tbl[odr.acc_odr].ts_duration_lsb +*(acc_frm_cnt - i - 1)))*625/16;*/ +/*Acc Only*/ + if (client_data->fifo_data_sel == BMI_FIFO_A_SEL) { + for (i = 0; i < acc_frm_cnt; i++) { + /*current_frm_ts += 256;*/ + current_frm_ts += + sensortime_duration_tbl[odr.acc_odr].ts_duration_us*LMADA; + + len = sprintf(buf, "%s %d %d %d %u ", + ACC_FIFO_HEAD, + acc_frame_arr[i].x, + acc_frame_arr[i].y, + acc_frame_arr[i].z, + current_frm_ts); + buf += len; + err += len; + } + } + + + /*only for G*/ + if (client_data->fifo_data_sel == BMI_FIFO_G_SEL) { + for (i = 0; i < gyro_frm_cnt; i++) { + /*current_frm_ts += 256;*/ + current_frm_ts += + sensortime_duration_tbl[odr.gyro_odr].ts_duration_us*LMADA; + + len = sprintf(buf, "%s %d %d %d %u ", + GYRO_FIFO_HEAD, + gyro_frame_arr[i].x, + gyro_frame_arr[i].y, + gyro_frame_arr[i].z, + current_frm_ts + ); + buf += len; + err += len; + } + } + + /*only for M*/ + if (client_data->fifo_data_sel == BMI_FIFO_M_SEL) { + for (i = 0; i < mag_frm_cnt; i++) { + /*current_frm_ts += 256;*/ + current_frm_ts += + sensortime_duration_tbl[odr.mag_odr].ts_duration_us*LMADA; +#ifdef BMI160_AKM09912_SUPPORT + mag_comp_xyz.x = mag_frame_arr[i].x; + mag_comp_xyz.y = mag_frame_arr[i].y; + mag_comp_xyz.z = mag_frame_arr[i].z; + bmi160_bst_akm09912_compensate_xyz_raw( + &mag_comp_xyz); +#else + mag.x = mag_frame_arr[i].x >> 3; + mag.y = mag_frame_arr[i].y >> 3; + mag.z = mag_frame_arr[i].z >> 1; + mag.r = mag_frame_arr[i].r >> 2; + bmi160_bmm150_mag_compensate_xyz_raw( + &mag_comp_xyz, mag); +#endif + len = sprintf(buf, "%s %d %d %d %u ", + MAG_FIFO_HEAD, + mag_comp_xyz.x, + mag_comp_xyz.y, + mag_comp_xyz.z, + current_frm_ts + ); + + buf += len; + err += len; + } + + } + +/*only for A M G*/ +if (client_data->fifo_data_sel == BMI_FIFO_M_G_A_SEL) { + + for (i = 0; i < gyro_frm_cnt; i++) { + /*sensor timeLSB*/ + /*dia(sensor_time) = fifo_time & (0xff), uint:LSB, 39.0625us*/ + /*AP tinmestamp 390625/10000 = 625 /16 */ + current_frm_ts += + sensortime_duration_tbl[odr.gyro_odr].ts_duration_us*LMADA; + + if (mag_frame_arr[i].x) { +#ifdef BMI160_AKM09912_SUPPORT + mag_comp_xyz.x = mag_frame_arr[i].x; + mag_comp_xyz.y = mag_frame_arr[i].y; + mag_comp_xyz.z = mag_frame_arr[i].z; + bmi160_bst_akm09912_compensate_xyz_raw( + &mag_comp_xyz); +#else + mag.x = mag_frame_arr[i].x >> 3; + mag.y = mag_frame_arr[i].y >> 3; + mag.z = mag_frame_arr[i].z >> 1; + mag.r = mag_frame_arr[i].r >> 2; + bmi160_bmm150_mag_compensate_xyz_raw( + &mag_comp_xyz, mag); +#endif + len = sprintf(buf, + "%s %d %d %d %u %s %d %d %d %u %s %d %d %d %u ", + GYRO_FIFO_HEAD, + gyro_frame_arr[i].x, + gyro_frame_arr[i].y, + gyro_frame_arr[i].z, + current_frm_ts, + ACC_FIFO_HEAD, + acc_frame_arr[i].x, + acc_frame_arr[i].y, + acc_frame_arr[i].z, + current_frm_ts, + MAG_FIFO_HEAD, + mag_comp_xyz.x, + mag_comp_xyz.y, + mag_comp_xyz.z, + current_frm_ts); + buf += len; + err += len; + } else { + len = sprintf(buf, + "%s %d %d %d %u %s %d %d %d %u ", + GYRO_FIFO_HEAD, + gyro_frame_arr[i].x, + gyro_frame_arr[i].y, + gyro_frame_arr[i].z, + current_frm_ts, + ACC_FIFO_HEAD, + acc_frame_arr[i].x, + acc_frame_arr[i].y, + acc_frame_arr[i].z, + current_frm_ts + ); + + buf += len; + err += len; + } + } + +} +/*only for A G*/ +if (client_data->fifo_data_sel == BMI_FIFO_G_A_SEL) { + + for (i = 0; i < gyro_frm_cnt; i++) { + /*sensor timeLSB*/ + /*dia(sensor_time) = fifo_time & (0xff), uint:LSB, 39.0625us*/ + /*AP tinmestamp 390625/10000 = 625 /16 */ + current_frm_ts += + sensortime_duration_tbl[odr.gyro_odr].ts_duration_us*LMADA; + len = sprintf(buf, + "%s %d %d %d %u %s %d %d %d %u ", + GYRO_FIFO_HEAD, + gyro_frame_arr[i].x, + gyro_frame_arr[i].y, + gyro_frame_arr[i].z, + current_frm_ts, + ACC_FIFO_HEAD, + acc_frame_arr[i].x, + acc_frame_arr[i].y, + acc_frame_arr[i].z, + current_frm_ts + ); + buf += len; + err += len; + } + } + +/*only for A M */ +if (client_data->fifo_data_sel == BMI_FIFO_M_A_SEL) { + for (i = 0; i < acc_frm_cnt; i++) { + /*sensor timeLSB*/ + /*dia(sensor_time) = fifo_time & (0xff), uint:LSB, 39.0625us*/ + /*AP tinmestamp 390625/10000 = 625 /16 */ + /*current_frm_ts += 256;*/ + current_frm_ts += + sensortime_duration_tbl[odr.acc_odr].ts_duration_us*LMADA; + + if (mag_frame_arr[i].x) { +#ifdef BMI160_AKM09912_SUPPORT + mag_comp_xyz.x = mag_frame_arr[i].x; + mag_comp_xyz.y = mag_frame_arr[i].y; + mag_comp_xyz.z = mag_frame_arr[i].z; + bmi160_bst_akm09912_compensate_xyz_raw( + &mag_comp_xyz); +#else + mag.x = mag_frame_arr[i].x >> 3; + mag.y = mag_frame_arr[i].y >> 3; + mag.z = mag_frame_arr[i].z >> 1; + mag.r = mag_frame_arr[i].r >> 2; + bmi160_bmm150_mag_compensate_xyz_raw( + &mag_comp_xyz, mag); +#endif + len = sprintf(buf, + "%s %d %d %d %u %s %d %d %d %u ", + ACC_FIFO_HEAD, + acc_frame_arr[i].x, + acc_frame_arr[i].y, + acc_frame_arr[i].z, + current_frm_ts, + MAG_FIFO_HEAD, + mag_comp_xyz.x, + mag_comp_xyz.y, + mag_comp_xyz.z, + current_frm_ts); + buf += len; + err += len; + } else { + len = sprintf(buf, "%s %d %d %d %u ", + ACC_FIFO_HEAD, + acc_frame_arr[i].x, + acc_frame_arr[i].y, + acc_frame_arr[i].z, + current_frm_ts + ); + + buf += len; + err += len; + } + } +} + +/*only forG M*/ +if (client_data->fifo_data_sel == BMI_FIFO_M_G_SEL) { + if (gyro_frm_cnt) { + tmp_frm_cnt = gyro_frm_cnt; + /*tmp_odr = odr.gyro_odr;*/ + } + + for (i = 0; i < tmp_frm_cnt; i++) { + current_frm_ts += + sensortime_duration_tbl[odr.gyro_odr].ts_duration_us*LMADA; + if (mag_frame_arr[i].x) { +#ifdef BMI160_AKM09912_SUPPORT + mag_comp_xyz.x = mag_frame_arr[i].x; + mag_comp_xyz.y = mag_frame_arr[i].y; + mag_comp_xyz.z = mag_frame_arr[i].z; + bmi160_bst_akm09912_compensate_xyz_raw( + &mag_comp_xyz); +#else + mag.x = mag_frame_arr[i].x >> 3; + mag.y = mag_frame_arr[i].y >> 3; + mag.z = mag_frame_arr[i].z >> 1; + mag.r = mag_frame_arr[i].r >> 2; + bmi160_bmm150_mag_compensate_xyz_raw( + &mag_comp_xyz, mag); +#endif + len = sprintf(buf, + "%s %d %d %d %u %s %d %d %d %u ", + GYRO_FIFO_HEAD, + gyro_frame_arr[i].x, + gyro_frame_arr[i].y, + gyro_frame_arr[i].z, + current_frm_ts, + MAG_FIFO_HEAD, + mag_comp_xyz.x, + mag_comp_xyz.y, + mag_comp_xyz.z, + current_frm_ts); + buf += len; + err += len; + } else { + len = sprintf(buf, "%s %d %d %d %u ", + GYRO_FIFO_HEAD, + gyro_frame_arr[i].x, + gyro_frame_arr[i].y, + gyro_frame_arr[i].z, + current_frm_ts + ); + + buf += len; + err += len; + } + } +} + + + return err; + + +} + + +static ssize_t bmi160_fifo_data_out_frame_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err = 0; + unsigned int fifo_bytecount_tmp; + + if (client_data->selftest > 0) { + dev_err(client_data->dev, + "in selftest no data available in fifo_data_frame\n"); + return -ENOMEM; + } + + if (NULL == g_fifo_data_arr) { + dev_err(client_data->dev, + "no memory available in fifo_data_frame\n"); + return -ENOMEM; + } + + if (client_data->pw.acc_pm == 2 && client_data->pw.gyro_pm == 2 + && client_data->pw.mag_pm == 2) { + dev_err(client_data->dev, "pw_acc: %d, pw_gyro: %d, pw_mag:%d\n", + client_data->pw.acc_pm, client_data->pw.gyro_pm, + client_data->pw.mag_pm); + return -EINVAL; + } + if (!client_data->fifo_data_sel) + return sprintf(buf, + "no selsect sensor fifo, fifo_data_sel:%d\n", + client_data->fifo_data_sel); + + if (client_data->fifo_bytecount == 0) + return -EINVAL; + + g_current_apts_us = get_current_timestamp(); + + BMI_CALL_API(fifo_length)(&fifo_bytecount_tmp); + if (fifo_bytecount_tmp > client_data->fifo_bytecount) + client_data->fifo_bytecount = fifo_bytecount_tmp; + if (client_data->fifo_bytecount > 210) { + /*err += BMI_CALL_API(set_command_register)( + CMD_CLR_FIFO_DATA);*/ + client_data->fifo_bytecount = 210; + } + if (!err) { + memset(g_fifo_data_arr, 0, 2048); + err = bmi_burst_read_wrapper(client_data->device.dev_addr, + BMI160_USER_FIFO_DATA__REG, g_fifo_data_arr, + client_data->fifo_bytecount); + } else + dev_err(client_data->dev, "read fifo leght err"); + if (err) { + dev_err(client_data->dev, "brust read fifo err\n"); + return err; + } + err = bmi_fifo_analysis_handle(client_data, g_fifo_data_arr, + client_data->fifo_bytecount, buf); + + + return err; +} + +static ssize_t bmi160_fifo_watermark_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char data = 0xff; + + err = BMI_CALL_API(get_fifo_wm)(&data); + + if (err) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_fifo_watermark_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long data; + unsigned char fifo_watermark; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + fifo_watermark = (unsigned char)data; + err = BMI_CALL_API(set_fifo_wm)(fifo_watermark); + if (err) + return -EIO; + + pr_info("fifo_watermark count %d", count); + + if (BMI_CALL_API(set_intr_enable_1) + (BMI160_FIFO_WM_ENABLE, 1) < 0) { + pr_info("set fifo wm enable failed"); + return -EIO; + } + mutex_lock(&client_data->mutex_ring_buf); + s_ring_buf_head = s_ring_buf_tail = 0; + mutex_unlock(&client_data->mutex_ring_buf); + + return count; +} + + +static ssize_t bmi160_fifo_header_en_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char data = 0xff; + + err = BMI_CALL_API(get_fifo_header_enable)(&data); + + if (err) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_fifo_header_en_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err; + unsigned long data; + unsigned char fifo_header_en; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + if (data > 1) + return -ENOENT; + + fifo_header_en = (unsigned char)data; + err = BMI_CALL_API(set_fifo_header_enable)(fifo_header_en); + if (err) + return -EIO; + + client_data->fifo_head_en = fifo_header_en; + + return count; +} + +static ssize_t bmi160_fifo_time_en_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char data = 0; + + err = BMI_CALL_API(get_fifo_time_enable)(&data); + + if (!err) + err = sprintf(buf, "%d\n", data); + + return err; +} + +static ssize_t bmi160_fifo_time_en_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long data; + unsigned char fifo_ts_en; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + fifo_ts_en = (unsigned char)data; + + err = BMI_CALL_API(set_fifo_time_enable)(fifo_ts_en); + if (err) + return -EIO; + + return count; +} + +static ssize_t bmi160_fifo_int_tag_en_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err = 0; + unsigned char fifo_tag_int1 = 0; + unsigned char fifo_tag_int2 = 0; + unsigned char fifo_tag_int; + + err += BMI_CALL_API(get_fifo_tag_intr1_enable)(&fifo_tag_int1); + err += BMI_CALL_API(get_fifo_tag_intr2_enable)(&fifo_tag_int2); + + fifo_tag_int = (fifo_tag_int1 << BMI160_INT0) | + (fifo_tag_int2 << BMI160_INT1); + + if (!err) + err = sprintf(buf, "%d\n", fifo_tag_int); + + return err; +} + +static ssize_t bmi160_fifo_int_tag_en_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err; + unsigned long data; + unsigned char fifo_tag_int_en; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + if (data > 3) + return -EINVAL; + + fifo_tag_int_en = (unsigned char)data; + + err += BMI_CALL_API(set_fifo_tag_intr1_enable) + ((fifo_tag_int_en & (1 << BMI160_INT0)) ? 1 : 0); + err += BMI_CALL_API(set_fifo_tag_intr2_enable) + ((fifo_tag_int_en & (1 << BMI160_INT1)) ? 1 : 0); + + if (err) { + dev_err(client_data->dev, "fifo int tag en err:%d\n", err); + return -EIO; + } + client_data->fifo_int_tag_en = fifo_tag_int_en; + + return count; +} + +static int bmi160_set_acc_op_mode(struct bmi_client_data *client_data, + unsigned long op_mode) +{ + int err = 0; + unsigned char stc_enable; + unsigned char std_enable; + mutex_lock(&client_data->mutex_op_mode); + + if (op_mode < BMI_ACC_PM_MAX) { + switch (op_mode) { + case BMI_ACC_PM_NORMAL: + err = BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_acc_arr[BMI_ACC_PM_NORMAL]); + client_data->pw.acc_pm = BMI_ACC_PM_NORMAL; + mdelay(10); + break; + case BMI_ACC_PM_LP1: + err = BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_acc_arr[BMI_ACC_PM_LP1]); + client_data->pw.acc_pm = BMI_ACC_PM_LP1; + mdelay(3); + break; + case BMI_ACC_PM_SUSPEND: + BMI_CALL_API(get_step_counter_enable)(&stc_enable); + BMI_CALL_API(get_step_detector_enable)(&std_enable); + if ((stc_enable == 0) && (std_enable == 0) && + (client_data->sig_flag == 0)) { + err = BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_acc_arr[BMI_ACC_PM_SUSPEND]); + client_data->pw.acc_pm = BMI_ACC_PM_SUSPEND; + mdelay(10); + } + break; + case BMI_ACC_PM_LP2: + err = BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_acc_arr[BMI_ACC_PM_LP2]); + client_data->pw.acc_pm = BMI_ACC_PM_LP2; + mdelay(3); + break; + default: + mutex_unlock(&client_data->mutex_op_mode); + return -EINVAL; + } + } else { + mutex_unlock(&client_data->mutex_op_mode); + return -EINVAL; + } + + mutex_unlock(&client_data->mutex_op_mode); + + return err; + + +} + +static int bmi160_set_gyro_op_mode(struct bmi_client_data *client_data, + unsigned long op_mode) +{ + int err = 0; + + mutex_lock(&client_data->mutex_op_mode); + + if (op_mode < BMI_GYRO_PM_MAX) { + switch (op_mode) { + case BMI_GYRO_PM_NORMAL: + err = BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_gyro_arr[BMI_GYRO_PM_NORMAL]); + client_data->pw.gyro_pm = BMI_GYRO_PM_NORMAL; + msleep(60); + break; + case BMI_GYRO_PM_FAST_START: + err = BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_gyro_arr[BMI_GYRO_PM_FAST_START]); + client_data->pw.gyro_pm = BMI_GYRO_PM_FAST_START; + msleep(60); + break; + case BMI_GYRO_PM_SUSPEND: + err = BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_gyro_arr[BMI_GYRO_PM_SUSPEND]); + client_data->pw.gyro_pm = BMI_GYRO_PM_SUSPEND; + msleep(60); + break; + default: + mutex_unlock(&client_data->mutex_op_mode); + return -EINVAL; + } + } else { + mutex_unlock(&client_data->mutex_op_mode); + return -EINVAL; + } + + mutex_unlock(&client_data->mutex_op_mode); + return err; + +} + +static ssize_t bmi160_temperature_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + s16 temp = 0xff; + + err = BMI_CALL_API(get_temp)(&temp); + + if (!err) + err = sprintf(buf, "0x%x\n", temp); + + return err; +} + +static ssize_t bmi160_place_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int place = BOSCH_SENSOR_PLACE_UNKNOWN; + + if (NULL != client_data->pdata) + place = client_data->pdata->place; + + return sprintf(buf, "%d\n", place); +} + +static ssize_t bmi160_delay_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + return sprintf(buf, "%d\n", atomic_read(&client_data->delay)); + +} + +static ssize_t bmi160_delay_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err; + unsigned long data; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + if (data == 0) { + err = -EINVAL; + return err; + } + + if (data < BMI_DELAY_MIN) + data = BMI_DELAY_MIN; + + atomic_set(&client_data->delay, (unsigned int)data); + + return count; +} + +static ssize_t bmi160_enable_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + return sprintf(buf, "%d\n", atomic_read(&client_data->wkqueue_en)); + +} + +static ssize_t bmi160_enable_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err; + unsigned long enable; + int pre_enable = atomic_read(&client_data->wkqueue_en); + + err = kstrtoul(buf, 10, &enable); + if (err) + return err; + + enable = enable ? 1 : 0; + mutex_lock(&client_data->mutex_enable); + if (enable) { + if (pre_enable == 0) { + if (bmi160_power_ctl(client_data, true)) { + dev_err(dev, "power up sensor failed.\n"); + goto mutex_exit; + } + bmi160_set_acc_op_mode(client_data, + BMI_ACC_PM_NORMAL); + schedule_delayed_work(&client_data->work, + msecs_to_jiffies(atomic_read(&client_data->acc_delay))); + atomic_set(&client_data->wkqueue_en, 1); + } + + } else { + if (pre_enable == 1) { + bmi160_set_acc_op_mode(client_data, + BMI_ACC_PM_SUSPEND); + + cancel_delayed_work_sync(&client_data->work); + atomic_set(&client_data->wkqueue_en, 0); + if (bmi160_power_ctl(client_data, false)) { + dev_err(dev, "power down sensor failed.\n"); + goto mutex_exit; + } + } + } + +mutex_exit: + mutex_unlock(&client_data->mutex_enable); + + mutex_lock(&client_data->mutex_ring_buf); + s_ring_buf_head = s_ring_buf_tail = 0; + mutex_unlock(&client_data->mutex_ring_buf); + + return count; +} + +#if defined(BMI160_ENABLE_INT1) || defined(BMI160_ENABLE_INT2) +/* accel sensor part */ +static ssize_t bmi160_anymot_duration_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char data; + + err = BMI_CALL_API(get_intr_any_motion_durn)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_anymot_duration_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) +{ + unsigned long data; + int err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_intr_any_motion_durn)((unsigned char)data); + if (err < 0) + return -EIO; + + return count; +} + +static ssize_t bmi160_anymot_threshold_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + + err = BMI_CALL_API(get_intr_any_motion_thres)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_anymot_threshold_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_intr_any_motion_thres)((unsigned char)data); + + if (err < 0) + return -EIO; + return count; +} + +static ssize_t bmi160_step_detector_status_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + u8 data = 0; + u8 step_det; + int err; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + err = BMI_CALL_API(get_step_detector_enable)(&step_det); + /*bmi160_get_status0_step_int*/ + if (err < 0) + return err; +/*client_data->std will be updated in bmi_stepdetector_interrupt_handle */ + if ((step_det == 1) && (client_data->std == 1)) { + data = 1; + client_data->std = 0; + } + else { + data = 0; + } + return snprintf(buf, 16, "%d\n", data); +} + +static ssize_t bmi160_step_detector_enable_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + + err = BMI_CALL_API(get_step_detector_enable)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_step_detector_enable_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_step_detector_enable)((unsigned char)data); + if (err < 0) + return -EIO; + if (data == 0) + client_data->pedo_data.wkar_step_detector_status = 0; + return count; +} + +static ssize_t bmi160_signification_motion_enable_store( + struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + /*0x62 (bit 1) INT_MOTION_3 int_sig_mot_sel*/ + err = BMI_CALL_API(set_intr_significant_motion_select)( + (unsigned char)data); + if (err < 0) + return -EIO; + if (data == 1) { + err = BMI_CALL_API(set_intr_enable_0) + (BMI160_ANY_MOTION_X_ENABLE, 1); + err += BMI_CALL_API(set_intr_enable_0) + (BMI160_ANY_MOTION_Y_ENABLE, 1); + err += BMI_CALL_API(set_intr_enable_0) + (BMI160_ANY_MOTION_Z_ENABLE, 1); + if (err < 0) + return -EIO; + client_data->sig_flag = 1; + } else { + err = BMI_CALL_API(set_intr_enable_0) + (BMI160_ANY_MOTION_X_ENABLE, 0); + err += BMI_CALL_API(set_intr_enable_0) + (BMI160_ANY_MOTION_Y_ENABLE, 0); + err += BMI_CALL_API(set_intr_enable_0) + (BMI160_ANY_MOTION_Z_ENABLE, 0); + if (err < 0) + return -EIO; + client_data->sig_flag = 0; + } + return count; +} + +static ssize_t bmi160_signification_motion_enable_show( + struct device *dev, struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + /*0x62 (bit 1) INT_MOTION_3 int_sig_mot_sel*/ + err = BMI_CALL_API(get_intr_significant_motion_select)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static int sigmotion_init_interrupts(u8 sig_map_int_pin) +{ + int ret = 0; +/*0x60 */ + ret += bmi160_set_intr_any_motion_thres(0x1e); +/* 0x62(bit 3~2) 0=1.5s */ + ret += bmi160_set_intr_significant_motion_skip(0); +/*0x62(bit 5~4) 1=0.5s*/ + ret += bmi160_set_intr_significant_motion_proof(1); +/*0x50 (bit 0, 1, 2) INT_EN_0 anymo x y z*/ + ret += bmi160_map_significant_motion_intr(sig_map_int_pin); +/*0x62 (bit 1) INT_MOTION_3 int_sig_mot_sel +close the signification_motion*/ + ret += bmi160_set_intr_significant_motion_select(0); +/*close the anymotion interrupt*/ + ret += BMI_CALL_API(set_intr_enable_0) + (BMI160_ANY_MOTION_X_ENABLE, 0); + ret += BMI_CALL_API(set_intr_enable_0) + (BMI160_ANY_MOTION_Y_ENABLE, 0); + ret += BMI_CALL_API(set_intr_enable_0) + (BMI160_ANY_MOTION_Z_ENABLE, 0); + if (ret) + pr_info("bmi160 sig motion failed setting,%d!\n", ret); + return ret; + +} +#endif + +static ssize_t bmi160_acc_range_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char range; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = BMI_CALL_API(get_accel_range)(&range); + if (err) + return err; + + client_data->range.acc_range = range; + return sprintf(buf, "%d\n", range); +} + +static ssize_t bmi160_acc_range_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long range; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &range); + if (err) + return err; + + err = BMI_CALL_API(set_accel_range)(range); + if (err) + return -EIO; + + client_data->range.acc_range = range; + return count; +} + +static ssize_t bmi160_acc_odr_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char acc_odr; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = BMI_CALL_API(get_accel_output_data_rate)(&acc_odr); + if (err) + return err; + + client_data->odr.acc_odr = acc_odr; + return sprintf(buf, "%d\n", acc_odr); +} + +static ssize_t bmi160_acc_odr_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long acc_odr; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &acc_odr); + if (err) + return err; + + if (acc_odr < 1 || acc_odr > 12) + return -EIO; + + if (acc_odr < 5) + err = BMI_CALL_API(set_accel_under_sampling_parameter)(1); + else + err = BMI_CALL_API(set_accel_under_sampling_parameter)(0); + + if (err) + return err; + + err = BMI_CALL_API(set_accel_output_data_rate)(acc_odr); + if (err) + return -EIO; + client_data->odr.acc_odr = acc_odr; + return count; +} + +static ssize_t bmi160_acc_op_mode_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err = 0; + u8 accel_pmu_status = 0; + err = BMI_CALL_API(get_accel_power_mode_stat)( + &accel_pmu_status); + + if (err) + return err; + else + return sprintf(buf, "reg:%d, val:%d\n", accel_pmu_status, + client_data->pw.acc_pm); +} + +static ssize_t bmi160_acc_op_mode_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err; + unsigned long op_mode; + err = kstrtoul(buf, 10, &op_mode); + if (err) + return err; + + err = bmi160_set_acc_op_mode(client_data, op_mode); + if (err) + return err; + else + return count; + +} + +static ssize_t bmi160_acc_value_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + struct bmi160_accel_t data; + struct bmi160_axis_data_t bmi160_udata; + int err; + + err = BMI_CALL_API(read_accel_xyz)(&data); + if (err < 0) + return err; + + bmi160_udata.x = data.x; + bmi160_udata.y = data.y; + bmi160_udata.z = data.z; + + bmi_remap_sensor_data(&bmi160_udata, client_data); + return sprintf(buf, "%hd %hd %hd\n", + bmi160_udata.x, bmi160_udata.y, bmi160_udata.z); +} + +static ssize_t bmi160_acc_fast_calibration_x_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + + err = BMI_CALL_API(get_foc_accel_x)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_acc_fast_calibration_x_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + s8 accel_offset_x = 0; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + /* 0: disable, 1: +1g, 2: -1g, 3: 0g */ + if (data > 3) + return -EINVAL; + + err = BMI_CALL_API(set_accel_foc_trigger)(X_AXIS, + data, &accel_offset_x); + if (err) + return -EIO; + else + client_data->calib_status |= + BMI_FAST_CALI_TRUE << BMI_ACC_X_FAST_CALI_RDY; + return count; +} + +static ssize_t bmi160_acc_fast_calibration_y_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + + err = BMI_CALL_API(get_foc_accel_y)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_acc_fast_calibration_y_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + s8 accel_offset_y = 0; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + /* 0: disable, 1: +1g, 2: -1g, 3: 0g */ + if (data > 3) + return -EINVAL; + + err = BMI_CALL_API(set_accel_foc_trigger)(Y_AXIS, + data, &accel_offset_y); + if (err) + return -EIO; + else + client_data->calib_status |= + BMI_FAST_CALI_TRUE << BMI_ACC_Y_FAST_CALI_RDY; + return count; +} + +static ssize_t bmi160_acc_fast_calibration_z_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + + err = BMI_CALL_API(get_foc_accel_z)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_acc_fast_calibration_z_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + s8 accel_offset_z = 0; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + /* 0: disable, 1: +1g, 2: -1g, 3: 0g */ + if (data > 3) + return -EINVAL; + + err = BMI_CALL_API(set_accel_foc_trigger)(Z_AXIS, + data, &accel_offset_z); + if (err) + return -EIO; + else + client_data->calib_status |= + BMI_FAST_CALI_TRUE << BMI_ACC_Z_FAST_CALI_RDY; + + if (client_data->calib_status == BMI_FAST_CALI_ALL_RDY) { + input_event(client_data->input_accel, EV_MSC, + INPUT_EVENT_FAST_ACC_CALIB_DONE, 1); + input_sync(client_data->input_accel); + client_data->calib_status = 0; + } + + return count; +} + +static ssize_t bmi160_acc_offset_x_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + + err = BMI_CALL_API(get_accel_offset_compensation_xaxis)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + + +static ssize_t bmi160_acc_offset_x_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_accel_offset_compensation_xaxis) + ((unsigned char)data); + + if (err < 0) + return -EIO; + return count; +} + +static ssize_t bmi160_acc_offset_y_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + + err = BMI_CALL_API(get_accel_offset_compensation_yaxis)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_acc_offset_y_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_accel_offset_compensation_yaxis) + ((unsigned char)data); + + if (err < 0) + return -EIO; + return count; +} + +static ssize_t bmi160_acc_offset_z_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + + err = BMI_CALL_API(get_accel_offset_compensation_zaxis)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_acc_offset_z_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_accel_offset_compensation_zaxis) + ((unsigned char)data); + + if (err < 0) + return -EIO; + return count; +} + +static ssize_t bmi160_test_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + u8 raw_data[15] = {0}; + unsigned int sensor_time = 0; + + int err; + memset(raw_data, 0, sizeof(raw_data)); + + err = client_data->device.bus_read(client_data->device.dev_addr, + BMI160_USER_DATA_8_GYRO_X_LSB__REG, raw_data, 15); + if (err) + return err; + + udelay(10); + sensor_time = (u32)(raw_data[14] << 16 | raw_data[13] << 8 + | raw_data[12]); + + return sprintf(buf, "%d %d %d %d %d %d %u", + (s16)(raw_data[1] << 8 | raw_data[0]), + (s16)(raw_data[3] << 8 | raw_data[2]), + (s16)(raw_data[5] << 8 | raw_data[4]), + (s16)(raw_data[7] << 8 | raw_data[6]), + (s16)(raw_data[9] << 8 | raw_data[8]), + (s16)(raw_data[11] << 8 | raw_data[10]), + sensor_time); + +} + +static ssize_t bmi160_step_counter_enable_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = BMI_CALL_API(get_step_counter_enable)(&data); + + client_data->stc_enable = data; + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_step_counter_enable_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_step_counter_enable)((unsigned char)data); + + client_data->stc_enable = data; + + if (err < 0) + return -EIO; + return count; +} + + +static ssize_t bmi160_step_counter_mode_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_step_mode)((unsigned char)data); + + if (err < 0) + return -EIO; + return count; +} + +static ssize_t bmi160_step_counter_clc_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = bmi160_clear_step_counter(); + + if (err < 0) + return -EIO; + return count; +} + +static ssize_t bmi160_step_counter_value_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + s16 data; + int err; + static u16 last_stc_value; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = BMI_CALL_API(read_step_count)(&data); + + if (err < 0) + return err; + if (data >= last_stc_value) { + client_data->pedo_data.last_step_counter_value += ( + data - last_stc_value); + last_stc_value = data; + } else + last_stc_value = data; + return sprintf(buf, "%d\n", + client_data->pedo_data.last_step_counter_value); +} + +static ssize_t bmi160_bmi_value_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + u8 raw_data[12] = {0}; + + int err; + memset(raw_data, 0, sizeof(raw_data)); + + err = client_data->device.bus_read(client_data->device.dev_addr, + BMI160_USER_DATA_8_GYRO_X_LSB__REG, raw_data, 12); + if (err) + return err; + /*output:gyro x y z acc x y z*/ + return sprintf(buf, "%hd %d %hd %hd %hd %hd\n", + (s16)(raw_data[1] << 8 | raw_data[0]), + (s16)(raw_data[3] << 8 | raw_data[2]), + (s16)(raw_data[5] << 8 | raw_data[4]), + (s16)(raw_data[7] << 8 | raw_data[6]), + (s16)(raw_data[9] << 8 | raw_data[8]), + (s16)(raw_data[11] << 8 | raw_data[10])); + +} + +static int bmi_ring_buf_get(struct bmi160_value_t *pData); +static ssize_t bmi160_ring_buf_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err = 0; + int len; + struct bmi160_value_t data; + char *tmp = buf; + + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + mutex_lock(&client_data->mutex_ring_buf); + while (bmi_ring_buf_get(&data) != 0) + { +#ifdef BMI160_MAG_INTERFACE_SUPPORT + len = snprintf(tmp, PAGE_SIZE, + "%d %d %d %d %d %d %d %d %d %lld", + data.acc.x, data.acc.y, data.acc.z, + data.gyro.x, data.gyro.y, data.gyro.z, + data.mag.x, data.mag.y, data.mag.z, + data.ts_intvl); + pr_info("%d %d %d %lld\n", + data.mag.x, + data.mag.y, + data.mag.z, + data.ts_intvl); +#else + len = snprintf(tmp, PAGE_SIZE, + "%d %d %d %d %d %d %lld", + data.acc.x, data.acc.y, data.acc.z, + data.gyro.x, data.gyro.y, data.gyro.z, + data.ts_intvl); +#endif + tmp += len; + err += len; + pr_info("%d %d %d %d %d %d %lld\n", + data.acc.x, data.acc.y, data.acc.z, + data.gyro.x, data.gyro.y, data.gyro.z, + data.ts_intvl); + + } + mutex_unlock(&client_data->mutex_ring_buf); + return err; + +} + +static ssize_t bmi160_selftest_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + return sprintf(buf, "0x%x\n", + atomic_read(&client_data->selftest_result)); +} + +static int bmi_restore_hw_cfg(struct bmi_client_data *client); +static void bmi_delay(u32 msec); +/*! + * @brief store selftest result which make up of acc and gyro + * format: 0b 0000 xxxx x:1 failed, 0 success + * bit3: gyro_self + * bit2..0: acc_self z y x + */ +static ssize_t bmi160_selftest_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err = 0; + int i = 0; + + u8 acc_selftest = 0; + u8 gyro_selftest = 0; + u8 bmi_selftest = 0; + s16 axis_p_value, axis_n_value; + u16 diff_axis[3] = {0xff, 0xff, 0xff}; + u8 acc_odr, range, acc_selftest_amp, acc_selftest_sign; + +#ifdef BMI160_MAG_INTERFACE_SUPPORT + struct bmi160_mag_xyz_s32_t pos_data; + struct bmi160_mag_xyz_s32_t neg_data; +#endif + + dev_notice(client_data->dev, "Selftest for BMI16x starting.\n"); + + client_data->selftest = 1; + +#ifdef BMI160_MAG_INTERFACE_SUPPORT + /* Power mode value 0x06 */ + err += bmi160_set_mag_write_data(BMI160_BMM_POWER_MODE_REG); + bmi_delay(BMI160_GEN_READ_WRITE_DELAY); + /*write 0x4C register to write set power mode to normal*/ + err += bmi160_set_mag_write_addr(BMI160_BMM150_POWE_MODE_REG); + bmi_delay(BMI160_GEN_READ_WRITE_DELAY); + + /* 0x18 Sets the PMU mode for the Magnetometer to suspend */ + err += bmi160_set_mag_write_data(MAG_MODE_SUSPEND); + bmi_delay(BMI160_GEN_READ_WRITE_DELAY); + /* write 0x18 to register 0x4E */ + err += bmi160_set_mag_write_addr(BMI160_USER_MAG_IF_3_ADDR); + /* write the Z repetitions*/ + /* The v_data_u8 have to write for the register + It write the value in the register 0x4F*/ + err += bmi160_set_mag_write_data(BMI160_MAG_REGULAR_REPZ); + bmi_delay(BMI160_GEN_READ_WRITE_DELAY); + err += bmi160_set_mag_write_addr(BMI160_BMM150_Z_REP); + bmi_delay(BMI160_GEN_READ_WRITE_DELAY); + + /* 0xC2 */ + err += bmi160_set_mag_write_data(0xC2); + bmi_delay(BMI160_GEN_READ_WRITE_DELAY); + /* write register 0x4C */ + err += bmi160_set_mag_write_addr(BMI160_BMM150_POWE_MODE_REG); + bmi_delay(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + + err += bmi160_bmm150_mag_compensate_xyz(&pos_data); + bmi_delay(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + /* 0X82 */ + err += bmi160_set_mag_write_data(0x82); + bmi_delay(BMI160_GEN_READ_WRITE_DELAY); + /* write register 0x4C */ + err += bmi160_set_mag_write_addr(BMI160_BMM150_POWE_MODE_REG); + + bmi_delay(BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY); + err += bmi160_bmm150_mag_compensate_xyz(&neg_data); + + diff_axis[2] = pos_data.z - neg_data.z; + dev_info(client_data->dev, + "pos_data.x:%d, pos_data.y:%d, pos_data.z:%d,\nneg_data.x:%d, neg_data.y:%d, neg_data.z:%d\n", + pos_data.x, pos_data.y, pos_data.z, neg_data.x, neg_data.y, neg_data.z); +#endif + + /*soft reset*/ + err = BMI_CALL_API(set_command_register)(CMD_RESET_USER_REG); + msleep(70); + err += BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_acc_arr[BMI_ACC_PM_NORMAL]); + err += BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_gyro_arr[BMI_GYRO_PM_NORMAL]); + err += BMI_CALL_API(set_accel_under_sampling_parameter)(0); + err += BMI_CALL_API(set_accel_output_data_rate)( + BMI160_ACCEL_OUTPUT_DATA_RATE_1600HZ); + + /* set to 8G range*/ + err += BMI_CALL_API(set_accel_range)(BMI160_ACCEL_RANGE_8G); + /* set to self amp high */ + err += BMI_CALL_API(set_accel_selftest_amp)(BMI_SELFTEST_AMP_HIGH); + + + err += BMI_CALL_API(get_accel_output_data_rate)(&acc_odr); + err += BMI_CALL_API(get_accel_range)(&range); + err += BMI_CALL_API(get_accel_selftest_amp)(&acc_selftest_amp); + err += BMI_CALL_API(read_accel_x)(&axis_n_value); + + dev_info(client_data->dev, + "acc_odr:%d, acc_range:%d, acc_selftest_amp:%d, acc_x:%d\n", + acc_odr, range, acc_selftest_amp, axis_n_value); + + for (i = X_AXIS; i < AXIS_MAX; i++) { + axis_n_value = 0; + axis_p_value = 0; + /* set every selftest axis */ + /*set_acc_selftest_axis(param),param x:1, y:2, z:3 + * but X_AXIS:0, Y_AXIS:1, Z_AXIS:2 + * so we need to +1*/ + err += BMI_CALL_API(set_accel_selftest_axis)(i + 1); + msleep(50); + switch (i) { + case X_AXIS: + /* set negative sign */ + err += BMI_CALL_API(set_accel_selftest_sign)(0); + err += BMI_CALL_API(get_accel_selftest_sign)( + &acc_selftest_sign); + + msleep(60); + err += BMI_CALL_API(read_accel_x)(&axis_n_value); + dev_info(client_data->dev, + "acc_x_selftest_sign:%d, axis_n_value:%d\n", + acc_selftest_sign, axis_n_value); + + /* set postive sign */ + err += BMI_CALL_API(set_accel_selftest_sign)(1); + err += BMI_CALL_API(get_accel_selftest_sign)( + &acc_selftest_sign); + + msleep(60); + err += BMI_CALL_API(read_accel_x)(&axis_p_value); + dev_info(client_data->dev, + "acc_x_selftest_sign:%d, axis_p_value:%d\n", + acc_selftest_sign, axis_p_value); + diff_axis[i] = abs(axis_p_value - axis_n_value); + break; + + case Y_AXIS: + /* set negative sign */ + err += BMI_CALL_API(set_accel_selftest_sign)(0); + msleep(60); + err += BMI_CALL_API(read_accel_y)(&axis_n_value); + /* set postive sign */ + err += BMI_CALL_API(set_accel_selftest_sign)(1); + msleep(60); + err += BMI_CALL_API(read_accel_y)(&axis_p_value); + diff_axis[i] = abs(axis_p_value - axis_n_value); + break; + + case Z_AXIS: + /* set negative sign */ + err += BMI_CALL_API(set_accel_selftest_sign)(0); + msleep(60); + err += BMI_CALL_API(read_accel_z)(&axis_n_value); + /* set postive sign */ + err += BMI_CALL_API(set_accel_selftest_sign)(1); + msleep(60); + err += BMI_CALL_API(read_accel_z)(&axis_p_value); + /* also start gyro self test */ + err += BMI_CALL_API(set_gyro_selftest_start)(1); + msleep(60); + err += BMI_CALL_API(get_gyro_selftest)(&gyro_selftest); + + diff_axis[i] = abs(axis_p_value - axis_n_value); + break; + default: + err += -EINVAL; + break; + } + if (err) { + dev_err(client_data->dev, + "Failed selftest axis:%s, p_val=%d, n_val=%d\n", + bmi_axis_name[i], axis_p_value, axis_n_value); + client_data->selftest = 0; + return -EINVAL; + } + + /*400mg for acc z axis*/ + if (Z_AXIS == i) { + if (diff_axis[i] < 1639) { + acc_selftest |= 1 << i; + dev_err(client_data->dev, + "Over selftest minimum for " + "axis:%s,diff=%d,p_val=%d, n_val=%d\n", + bmi_axis_name[i], diff_axis[i], + axis_p_value, axis_n_value); + } + } else { + /*800mg for x or y axis*/ + if (diff_axis[i] < 3277) { + acc_selftest |= 1 << i; + + if (bmi_get_err_status(client_data) < 0) + return err; + dev_err(client_data->dev, + "Over selftest minimum for " + "axis:%s,diff=%d, p_val=%d, n_val=%d\n", + bmi_axis_name[i], diff_axis[i], + axis_p_value, axis_n_value); + dev_err(client_data->dev, "err_st:0x%x\n", + client_data->err_st.err_st_all); + + } + } + + } + /* gyro_selftest==1,gyro selftest successfully, + * but bmi_result bit4 0 is successful, 1 is failed*/ + bmi_selftest = (acc_selftest & 0x0f) | ((!gyro_selftest) << AXIS_MAX); + atomic_set(&client_data->selftest_result, bmi_selftest); + /*soft reset*/ + err = BMI_CALL_API(set_command_register)(CMD_RESET_USER_REG); + if (err) { + client_data->selftest = 0; + return err; + } + msleep(50); + + bmi_restore_hw_cfg(client_data); + + client_data->selftest = 0; + dev_notice(client_data->dev, "Selftest for BMI16x finished\n"); + + return count; +} + +/* gyro sensor part */ +static ssize_t bmi160_gyro_op_mode_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + int err = 0; + u8 gyro_pmu_status = 0; + + err = BMI_CALL_API(get_gyro_power_mode_stat)( + &gyro_pmu_status); + + if (err) + return err; + else + return sprintf(buf, "reg:%d, val:%d\n", gyro_pmu_status, + client_data->pw.gyro_pm); +} + +static ssize_t bmi160_gyro_op_mode_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + unsigned long op_mode; + int err; + + err = kstrtoul(buf, 10, &op_mode); + if (err) + return err; + + mutex_lock(&client_data->mutex_op_mode); + + if (op_mode < BMI_GYRO_PM_MAX) { + switch (op_mode) { + case BMI_GYRO_PM_NORMAL: + err = BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_gyro_arr[BMI_GYRO_PM_NORMAL]); + client_data->pw.gyro_pm = BMI_GYRO_PM_NORMAL; + mdelay(60); + break; + case BMI_GYRO_PM_FAST_START: + err = BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_gyro_arr[BMI_GYRO_PM_FAST_START]); + client_data->pw.gyro_pm = BMI_GYRO_PM_FAST_START; + mdelay(60); + break; + case BMI_GYRO_PM_SUSPEND: + err = BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_gyro_arr[BMI_GYRO_PM_SUSPEND]); + client_data->pw.gyro_pm = BMI_GYRO_PM_SUSPEND; + mdelay(60); + break; + default: + mutex_unlock(&client_data->mutex_op_mode); + return -EINVAL; + } + } else { + mutex_unlock(&client_data->mutex_op_mode); + return -EINVAL; + } + + mutex_unlock(&client_data->mutex_op_mode); + + if (err) + return err; + else + return count; + +} + +static ssize_t bmi160_gyro_value_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + struct bmi160_gyro_t data; + struct bmi160_axis_data_t bmi160_udata; + int err; + + err = BMI_CALL_API(read_gyro_xyz)(&data); + if (err < 0) + return err; + + bmi160_udata.x = data.x; + bmi160_udata.y = data.y; + bmi160_udata.z = data.z; + + bmi_remap_sensor_data(&bmi160_udata, client_data); + + return sprintf(buf, "%hd %hd %hd\n", bmi160_udata.x, + bmi160_udata.y, bmi160_udata.z); +} + +static ssize_t bmi160_gyro_range_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char range; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = BMI_CALL_API(get_gyro_range)(&range); + if (err) + return err; + + client_data->range.gyro_range = range; + return sprintf(buf, "%d\n", range); +} + +static ssize_t bmi160_gyro_range_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long range; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &range); + if (err) + return err; + + err = BMI_CALL_API(set_gyro_range)(range); + if (err) + return -EIO; + + client_data->range.gyro_range = range; + return count; +} + +static ssize_t bmi160_gyro_odr_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err; + unsigned char gyro_odr; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = BMI_CALL_API(get_gyro_output_data_rate)(&gyro_odr); + if (err) + return err; + + client_data->odr.gyro_odr = gyro_odr; + return sprintf(buf, "%d\n", gyro_odr); +} + +static ssize_t bmi160_gyro_odr_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long gyro_odr; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &gyro_odr); + if (err) + return err; + + if (gyro_odr < 6 || gyro_odr > 13) + return -EIO; + + err = BMI_CALL_API(set_gyro_output_data_rate)(gyro_odr); + if (err) + return -EIO; + + client_data->odr.gyro_odr = gyro_odr; + return count; +} + +static ssize_t bmi160_gyro_fast_calibration_en_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data; + int err; + + err = BMI_CALL_API(get_foc_gyro_enable)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_gyro_fast_calibration_en_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long enable; + s8 err; + s16 gyr_off_x; + s16 gyr_off_y; + s16 gyr_off_z; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &enable); + if (err) + return err; + + err = BMI_CALL_API(set_foc_gyro_enable)((u8)enable, + &gyr_off_x, &gyr_off_y, &gyr_off_z); + + if (err < 0) + return -EIO; + else { + input_event(client_data->input_gyro, EV_MSC, + INPUT_EVENT_FAST_GYRO_CALIB_DONE, 1); + input_sync(client_data->input_gyro); + } + return count; +} + +static ssize_t bmi160_gyro_offset_x_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + s16 data = 0; + s8 err = 0; + + err = BMI_CALL_API(get_gyro_offset_compensation_xaxis)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_gyro_offset_x_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + s8 err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_gyro_offset_compensation_xaxis)((s16)data); + + if (err < 0) + return -EIO; + return count; +} + +static ssize_t bmi160_gyro_offset_y_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + s16 data = 0; + s8 err = 0; + + err = BMI_CALL_API(get_gyro_offset_compensation_yaxis)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_gyro_offset_y_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + s8 err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_gyro_offset_compensation_yaxis)((s16)data); + + if (err < 0) + return -EIO; + return count; +} + +static ssize_t bmi160_gyro_offset_z_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + s16 data = 0; + int err = 0; + + err = BMI_CALL_API(get_gyro_offset_compensation_zaxis)(&data); + + if (err < 0) + return err; + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmi160_gyro_offset_z_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err = BMI_CALL_API(set_gyro_offset_compensation_zaxis)((s16)data); + + if (err < 0) + return -EIO; + return count; +} + + +/* mag sensor part */ +#ifdef BMI160_MAG_INTERFACE_SUPPORT +static ssize_t bmi160_mag_op_mode_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + u8 mag_op_mode; + s8 err; + err = bmi160_get_mag_power_mode_stat(&mag_op_mode); + if (err) { + dev_err(client_data->dev, + "Failed to get BMI160 mag power mode:%d\n", err); + return err; + } else + return sprintf(buf, "%d, reg:%d\n", + client_data->pw.mag_pm, mag_op_mode); +} + +static ssize_t bmi160_mag_op_mode_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + unsigned long op_mode; + int err; + + err = kstrtoul(buf, 10, &op_mode); + if (err) + return err; + + if (op_mode == client_data->pw.mag_pm) + return count; + + mutex_lock(&client_data->mutex_op_mode); + + + if (op_mode < BMI_MAG_PM_MAX) { + switch (op_mode) { + case BMI_MAG_PM_NORMAL: + /* need to modify as mag sensor connected, + * set write address to 0x4c and triggers + * write operation + * 0x4c(op mode control reg) + * enables normal mode in magnetometer */ +#ifdef BMI160_AKM09912_SUPPORT + err = bmi160_set_bst_akm_and_secondary_if_powermode + (BMI160_MAG_FORCE_MODE); +#else + err = bmi160_set_bmm150_mag_and_secondary_if_power_mode + (BMI160_MAG_FORCE_MODE); +#endif + client_data->pw.mag_pm = BMI_MAG_PM_NORMAL; + mdelay(5); + break; + case BMI_MAG_PM_LP1: + /* need to modify as mag sensor connected, + * set write address to 0x4 band triggers + * write operation + * 0x4b(bmm150, power control reg, bit0) + * enables power in magnetometer*/ +#ifdef BMI160_AKM09912_SUPPORT + err = bmi160_set_bst_akm_and_secondary_if_powermode + (BMI160_MAG_FORCE_MODE); +#else + err = bmi160_set_bmm150_mag_and_secondary_if_power_mode + (BMI160_MAG_FORCE_MODE); +#endif + client_data->pw.mag_pm = BMI_MAG_PM_LP1; + mdelay(5); + break; + case BMI_MAG_PM_SUSPEND: + case BMI_MAG_PM_LP2: +#ifdef BMI160_AKM09912_SUPPORT + err = bmi160_set_bst_akm_and_secondary_if_powermode + (BMI160_MAG_SUSPEND_MODE); +#else + err = bmi160_set_bmm150_mag_and_secondary_if_power_mode + (BMI160_MAG_SUSPEND_MODE); +#endif + client_data->pw.mag_pm = op_mode; + mdelay(5); + break; + default: + mutex_unlock(&client_data->mutex_op_mode); + return -EINVAL; + } + } else { + mutex_unlock(&client_data->mutex_op_mode); + return -EINVAL; + } + + mutex_unlock(&client_data->mutex_op_mode); + + if (err) { + dev_err(client_data->dev, + "Failed to switch BMI160 mag power mode:%d\n", + client_data->pw.mag_pm); + return err; + } else + return count; + +} + +static ssize_t bmi160_mag_odr_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err = 0; + unsigned char mag_odr = 0; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = BMI_CALL_API(get_mag_output_data_rate)(&mag_odr); + if (err) + return err; + + client_data->odr.mag_odr = mag_odr; + return sprintf(buf, "%d\n", mag_odr); +} + +static ssize_t bmi160_mag_odr_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err; + unsigned long mag_odr; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = kstrtoul(buf, 10, &mag_odr); + if (err) + return err; + /*1~25/32hz,..6(25hz),7(50hz),... */ + err = BMI_CALL_API(set_mag_output_data_rate)(mag_odr); + if (err) + return -EIO; + + client_data->odr.mag_odr = mag_odr; + return count; +} + +static ssize_t bmi160_mag_i2c_address_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + u8 data; + s8 err; + + err = BMI_CALL_API(set_mag_manual_enable)(1); + err += BMI_CALL_API(get_i2c_device_addr)(&data); + err += BMI_CALL_API(set_mag_manual_enable)(0); + + if (err < 0) + return err; + return sprintf(buf, "0x%x\n", data); +} + +static ssize_t bmi160_mag_i2c_address_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err += BMI_CALL_API(set_mag_manual_enable)(1); + if (!err) + err += BMI_CALL_API(set_i2c_device_addr)((unsigned char)data); + err += BMI_CALL_API(set_mag_manual_enable)(0); + + if (err < 0) + return -EIO; + return count; +} + +static ssize_t bmi160_mag_value_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + struct bmi160_mag_xyz_s32_t data; + + struct bmi160_axis_data_t bmi160_udata; + int err; + /* raw data with compensation */ +#ifdef BMI160_AKM09912_SUPPORT + err = bmi160_bst_akm09912_compensate_xyz(&data); +#else + err = bmi160_bmm150_mag_compensate_xyz(&data); +#endif + + if (err < 0) { + memset(&data, 0, sizeof(data)); + dev_err(client_data->dev, "mag not ready!\n"); + } + bmi160_udata.x = data.x; + bmi160_udata.y = data.y; + bmi160_udata.z = data.z; + + bmi_remap_sensor_data(&bmi160_udata, client_data); + return sprintf(buf, "%hd %hd %hd\n", bmi160_udata.x, + bmi160_udata.y, bmi160_udata.z); + +} + +static ssize_t bmi160_mag_offset_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err = 0; + unsigned char mag_offset; + err = BMI_CALL_API(get_mag_offset)(&mag_offset); + if (err) + return err; + + return sprintf(buf, "%d\n", mag_offset); + +} + +static ssize_t bmi160_mag_offset_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + err += BMI_CALL_API(set_mag_manual_enable)(1); + if (err == 0) + err += BMI_CALL_API(set_mag_offset)((unsigned char)data); + err += BMI_CALL_API(set_mag_manual_enable)(0); + + if (err < 0) + return -EIO; + return count; +} + +static ssize_t bmi160_mag_chip_id_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + s8 err = 0; + u8 mag_chipid; + + err = bmi160_set_mag_manual_enable(0x01); + /* read mag chip_id value */ +#ifdef BMI160_AKM09912_SUPPORT + err += bmi160_set_mag_read_addr(AKM09912_CHIP_ID_REG); + /* 0x04 is mag_x lsb register */ + err += bmi160_read_reg(BMI160_USER_DATA_0_MAG_X_LSB__REG, + &mag_chipid, 1); + + /* Must add this commands to re-set data register addr of mag sensor */ + err += bmi160_set_mag_read_addr(AKM_DATA_REGISTER); +#else + err += bmi160_set_mag_read_addr(BMI160_BMM150_CHIP_ID); + /* 0x04 is mag_x lsb register */ + err += bmi160_read_reg(BMI160_USER_DATA_0_MAG_X_LSB__REG, + &mag_chipid, 1); + + /* Must add this commands to re-set data register addr of mag sensor */ + /* 0x42 is bmm150 data register address */ + err += bmi160_set_mag_read_addr(BMI160_BMM150_DATA_REG); +#endif + + err += bmi160_set_mag_manual_enable(0x00); + + if (err) + return err; + + return sprintf(buf, "chip_id:0x%x\n", mag_chipid); + +} + +#endif + +#if defined(BMI160_ENABLE_INT1) || defined(BMI160_ENABLE_INT2) +static ssize_t bmi_enable_int_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int interrupt_type, value; + + sscanf(buf, "%3d %3d", &interrupt_type, &value); + + if (interrupt_type < 0 || interrupt_type > 16) + return -EINVAL; + + if (interrupt_type <= BMI_FLAT_INT) { + if (BMI_CALL_API(set_intr_enable_0) + (bmi_interrupt_type[interrupt_type], value) < 0) + return -EINVAL; + } else if (interrupt_type <= BMI_FWM_INT) { + if (BMI_CALL_API(set_intr_enable_1) + (bmi_interrupt_type[interrupt_type], value) < 0) + return -EINVAL; + } else { + if (BMI_CALL_API(set_intr_enable_2) + (bmi_interrupt_type[interrupt_type], value) < 0) + return -EINVAL; + } + + return count; +} + +#endif + +static ssize_t bmi_register_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmi_client_data *client_data = dev_get_drvdata(dev); + bmi_dump_reg(client_data); + + return sprintf(buf, "Dump OK\n"); +} + +static ssize_t bmi_register_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) +{ + int err; + int reg_addr = 0; + int data; + u8 write_reg_add = 0; + u8 write_data = 0; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + err = sscanf(buf, "%3d %3d", ®_addr, &data); + if (err < 2) + return err; + + if (data > 0xff) + return -EINVAL; + + write_reg_add = (u8)reg_addr; + write_data = (u8)data; + err += BMI_CALL_API(write_reg)(write_reg_add, &write_data, 1); + + if (!err) { + dev_info(client_data->dev, "write reg 0x%2x, value= 0x%2x\n", + reg_addr, data); + } else { + dev_err(client_data->dev, "write reg fail\n"); + return err; + } + return count; +} + +static DEVICE_ATTR(chip_id, S_IRUGO, + bmi160_chip_id_show, NULL); +static DEVICE_ATTR(err_st, S_IRUGO, + bmi160_err_st_show, NULL); +static DEVICE_ATTR(sensor_time, S_IRUGO, + bmi160_sensor_time_show, NULL); + +static DEVICE_ATTR(selftest, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_selftest_show, bmi160_selftest_store); +static DEVICE_ATTR(fifo_flush, S_IWUSR|S_IWGRP|S_IWOTH, + NULL, bmi160_fifo_flush_store); +static DEVICE_ATTR(fifo_bytecount, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_fifo_bytecount_show, bmi160_fifo_bytecount_store); +static DEVICE_ATTR(fifo_data_sel, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_fifo_data_sel_show, bmi160_fifo_data_sel_store); +static DEVICE_ATTR(fifo_data_frame, S_IRUGO, + bmi160_fifo_data_out_frame_show, NULL); + +static DEVICE_ATTR(fifo_watermark, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_fifo_watermark_show, bmi160_fifo_watermark_store); + +static DEVICE_ATTR(fifo_header_en, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_fifo_header_en_show, bmi160_fifo_header_en_store); +static DEVICE_ATTR(fifo_time_en, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_fifo_time_en_show, bmi160_fifo_time_en_store); +static DEVICE_ATTR(fifo_int_tag_en, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_fifo_int_tag_en_show, bmi160_fifo_int_tag_en_store); + +static DEVICE_ATTR(temperature, S_IRUGO, + bmi160_temperature_show, NULL); +static DEVICE_ATTR(place, S_IRUGO, + bmi160_place_show, NULL); +static DEVICE_ATTR(delay, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_delay_show, bmi160_delay_store); +static DEVICE_ATTR(enable, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_enable_show, bmi160_enable_store); +static DEVICE_ATTR(acc_range, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_acc_range_show, bmi160_acc_range_store); +static DEVICE_ATTR(acc_odr, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_acc_odr_show, bmi160_acc_odr_store); +static DEVICE_ATTR(acc_op_mode, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_acc_op_mode_show, bmi160_acc_op_mode_store); +static DEVICE_ATTR(acc_value, S_IRUGO, + bmi160_acc_value_show, NULL); +static DEVICE_ATTR(acc_fast_calibration_x, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_acc_fast_calibration_x_show, + bmi160_acc_fast_calibration_x_store); +static DEVICE_ATTR(acc_fast_calibration_y, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_acc_fast_calibration_y_show, + bmi160_acc_fast_calibration_y_store); +static DEVICE_ATTR(acc_fast_calibration_z, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_acc_fast_calibration_z_show, + bmi160_acc_fast_calibration_z_store); +static DEVICE_ATTR(acc_offset_x, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_acc_offset_x_show, + bmi160_acc_offset_x_store); +static DEVICE_ATTR(acc_offset_y, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_acc_offset_y_show, + bmi160_acc_offset_y_store); +static DEVICE_ATTR(acc_offset_z, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_acc_offset_z_show, + bmi160_acc_offset_z_store); +static DEVICE_ATTR(test, S_IRUGO, + bmi160_test_show, NULL); +static DEVICE_ATTR(stc_enable, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_step_counter_enable_show, + bmi160_step_counter_enable_store); +static DEVICE_ATTR(stc_mode, S_IWUSR|S_IWGRP|S_IWOTH, + NULL, bmi160_step_counter_mode_store); +static DEVICE_ATTR(stc_clc, S_IWUSR|S_IWGRP|S_IWOTH, + NULL, bmi160_step_counter_clc_store); +static DEVICE_ATTR(stc_value, S_IRUGO, + bmi160_step_counter_value_show, NULL); + + +/* gyro part */ +static DEVICE_ATTR(gyro_op_mode, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_gyro_op_mode_show, bmi160_gyro_op_mode_store); +static DEVICE_ATTR(gyro_value, S_IRUGO, + bmi160_gyro_value_show, NULL); +static DEVICE_ATTR(gyro_range, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_gyro_range_show, bmi160_gyro_range_store); +static DEVICE_ATTR(gyro_odr, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_gyro_odr_show, bmi160_gyro_odr_store); +static DEVICE_ATTR(gyro_fast_calibration_en, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, +bmi160_gyro_fast_calibration_en_show, bmi160_gyro_fast_calibration_en_store); +static DEVICE_ATTR(gyro_offset_x, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, +bmi160_gyro_offset_x_show, bmi160_gyro_offset_x_store); +static DEVICE_ATTR(gyro_offset_y, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, +bmi160_gyro_offset_y_show, bmi160_gyro_offset_y_store); +static DEVICE_ATTR(gyro_offset_z, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, +bmi160_gyro_offset_z_show, bmi160_gyro_offset_z_store); + +#ifdef BMI160_MAG_INTERFACE_SUPPORT +static DEVICE_ATTR(mag_op_mode, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_mag_op_mode_show, bmi160_mag_op_mode_store); +static DEVICE_ATTR(mag_odr, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_mag_odr_show, bmi160_mag_odr_store); +static DEVICE_ATTR(mag_i2c_addr, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_mag_i2c_address_show, bmi160_mag_i2c_address_store); +static DEVICE_ATTR(mag_value, S_IRUGO, + bmi160_mag_value_show, NULL); +static DEVICE_ATTR(mag_offset, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_mag_offset_show, bmi160_mag_offset_store); + +static DEVICE_ATTR(mag_chip_id, S_IRUGO, + bmi160_mag_chip_id_show, NULL); + +#endif + + +#if defined(BMI160_ENABLE_INT1) || defined(BMI160_ENABLE_INT2) +static DEVICE_ATTR(enable_int, S_IWUSR|S_IWGRP|S_IWOTH, + NULL, bmi_enable_int_store); +static DEVICE_ATTR(anymot_duration, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_anymot_duration_show, bmi160_anymot_duration_store); +static DEVICE_ATTR(anymot_threshold, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_anymot_threshold_show, bmi160_anymot_threshold_store); +static DEVICE_ATTR(std_stu, S_IRUGO, + bmi160_step_detector_status_show, NULL); +static DEVICE_ATTR(std_en, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_step_detector_enable_show, + bmi160_step_detector_enable_store); +static DEVICE_ATTR(sig_en, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi160_signification_motion_enable_show, + bmi160_signification_motion_enable_store); + +#endif +static DEVICE_ATTR(enable_timer, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi_show_enable_timer, bmi_store_enable_timer); + +static DEVICE_ATTR(register, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmi_register_show, bmi_register_store); + +static DEVICE_ATTR(bmi_value, S_IRUGO, + bmi160_bmi_value_show, NULL); + +static DEVICE_ATTR(bmi_ring_buf, S_IRUGO, + bmi160_ring_buf_show, NULL); + + +static struct attribute *bmi160_attributes[] = { + &dev_attr_chip_id.attr, + &dev_attr_err_st.attr, + &dev_attr_sensor_time.attr, + &dev_attr_selftest.attr, + + &dev_attr_test.attr, + &dev_attr_fifo_flush.attr, + &dev_attr_fifo_header_en.attr, + &dev_attr_fifo_time_en.attr, + &dev_attr_fifo_int_tag_en.attr, + &dev_attr_fifo_bytecount.attr, + &dev_attr_fifo_data_sel.attr, + &dev_attr_fifo_data_frame.attr, + + &dev_attr_fifo_watermark.attr, + + &dev_attr_enable.attr, + &dev_attr_delay.attr, + &dev_attr_temperature.attr, + &dev_attr_place.attr, + + &dev_attr_acc_range.attr, + &dev_attr_acc_odr.attr, + &dev_attr_acc_op_mode.attr, + &dev_attr_acc_value.attr, + + &dev_attr_acc_fast_calibration_x.attr, + &dev_attr_acc_fast_calibration_y.attr, + &dev_attr_acc_fast_calibration_z.attr, + &dev_attr_acc_offset_x.attr, + &dev_attr_acc_offset_y.attr, + &dev_attr_acc_offset_z.attr, + + &dev_attr_stc_enable.attr, + &dev_attr_stc_mode.attr, + &dev_attr_stc_clc.attr, + &dev_attr_stc_value.attr, + + &dev_attr_gyro_op_mode.attr, + &dev_attr_gyro_value.attr, + &dev_attr_gyro_range.attr, + &dev_attr_gyro_odr.attr, + &dev_attr_gyro_fast_calibration_en.attr, + &dev_attr_gyro_offset_x.attr, + &dev_attr_gyro_offset_y.attr, + &dev_attr_gyro_offset_z.attr, + +#ifdef BMI160_MAG_INTERFACE_SUPPORT + &dev_attr_mag_chip_id.attr, + &dev_attr_mag_op_mode.attr, + &dev_attr_mag_odr.attr, + &dev_attr_mag_i2c_addr.attr, + &dev_attr_mag_value.attr, + &dev_attr_mag_offset.attr, + +#endif + +#if defined(BMI160_ENABLE_INT1) || defined(BMI160_ENABLE_INT2) + &dev_attr_enable_int.attr, + + &dev_attr_anymot_duration.attr, + &dev_attr_anymot_threshold.attr, + &dev_attr_std_stu.attr, + &dev_attr_std_en.attr, + &dev_attr_sig_en.attr, + +#endif + &dev_attr_enable_timer.attr, + &dev_attr_register.attr, + &dev_attr_bmi_value.attr, + &dev_attr_bmi_ring_buf.attr, + NULL +}; + +static struct attribute_group bmi160_attribute_group = { + .attrs = bmi160_attributes +}; + +static void bmi_delay(u32 msec) +{ + mdelay(msec); +} + +#if defined(BMI160_ENABLE_INT1) || defined(BMI160_ENABLE_INT2) +static void bmi_slope_interrupt_handle(struct bmi_client_data *client_data) +{ + /* anym_first[0..2]: x, y, z */ + u8 anym_first[3] = {0}; + u8 status2; + u8 anym_sign; + u8 i = 0; + + client_data->device.bus_read(client_data->device.dev_addr, + BMI160_USER_INTR_STAT_2_ADDR, &status2, 1); + anym_first[0] = BMI160_GET_BITSLICE(status2, + BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X); + anym_first[1] = BMI160_GET_BITSLICE(status2, + BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y); + anym_first[2] = BMI160_GET_BITSLICE(status2, + BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z); + anym_sign = BMI160_GET_BITSLICE(status2, + BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN); + + for (i = 0; i < 3; i++) { + if (anym_first[i]) { + /*1: negative*/ + if (anym_sign) + dev_notice(client_data->dev, + "Anymotion interrupt happend!" + "%s axis, negative sign\n", bmi_axis_name[i]); + else + dev_notice(client_data->dev, + "Anymotion interrupt happend!" + "%s axis, postive sign\n", bmi_axis_name[i]); + } + } + + +} + +static uint64_t bmi_get_alarm_timestamp_ns(void) +{ + uint64_t ts_ap; + struct timespec tmp_time; + get_monotonic_boottime(&tmp_time); + ts_ap = (uint64_t)tmp_time.tv_sec * 1000000000L + tmp_time.tv_nsec; + return ts_ap; +} + + +static int bmi_ring_buf_empty(void) +{ + return s_ring_buf_head == s_ring_buf_tail; +} + +static int bmi_ring_buf_full(void) +{ + return (s_ring_buf_tail + 1) % BMI_RING_BUF_SIZE == s_ring_buf_head; +} + +static int bmi_ring_buf_put(struct bmi160_value_t data) +{ + if (bmi_ring_buf_full()) + return 0; + + bmi_ring_buf[s_ring_buf_tail].acc.x = data.acc.x; + bmi_ring_buf[s_ring_buf_tail].acc.y = data.acc.y; + bmi_ring_buf[s_ring_buf_tail].acc.z = data.acc.z; + bmi_ring_buf[s_ring_buf_tail].gyro.x = data.gyro.x; + bmi_ring_buf[s_ring_buf_tail].gyro.y = data.gyro.y; + bmi_ring_buf[s_ring_buf_tail].gyro.z = data.gyro.z; +#ifdef BMI160_MAG_INTERFACE_SUPPORT + bmi_ring_buf[s_ring_buf_tail].mag.x = data.mag.x; + bmi_ring_buf[s_ring_buf_tail].mag.y = data.mag.y; + bmi_ring_buf[s_ring_buf_tail].mag.z = data.mag.z; +#endif + bmi_ring_buf[s_ring_buf_tail].ts_intvl= data.ts_intvl; + s_ring_buf_tail = (s_ring_buf_tail + 1) % BMI_RING_BUF_SIZE; + + return 1; +} + +static int bmi_ring_buf_get(struct bmi160_value_t *pData) +{ + if (bmi_ring_buf_empty()) + return 0; + + pData->acc.x = bmi_ring_buf[s_ring_buf_head].acc.x; + pData->acc.y = bmi_ring_buf[s_ring_buf_head].acc.y; + pData->acc.z = bmi_ring_buf[s_ring_buf_head].acc.z; + pData->gyro.x = bmi_ring_buf[s_ring_buf_head].gyro.x; + pData->gyro.y = bmi_ring_buf[s_ring_buf_head].gyro.y; + pData->gyro.z = bmi_ring_buf[s_ring_buf_head].gyro.z; +#ifdef BMI160_MAG_INTERFACE_SUPPORT + pData->mag.x = bmi_ring_buf[s_ring_buf_head].mag.x; + pData->mag.y = bmi_ring_buf[s_ring_buf_head].mag.y; + pData->mag.z = bmi_ring_buf[s_ring_buf_head].mag.z; +#endif + pData->ts_intvl = bmi_ring_buf[s_ring_buf_head].ts_intvl; + + s_ring_buf_head = (s_ring_buf_head + 1) % BMI_RING_BUF_SIZE; + + return 1; +} + + +static int bmi_fifo_get_decode_data(struct bmi160_axis_data_t *acc, + struct bmi160_axis_data_t *gyro, + struct bmi160_axis_data_t *mag, + u8 *fifo_data, + u16 fifo_index) +{ + /* array index to get elements from fifo data*/ + u16 array_index = 0; + + /* get xyzr axis mag data */ + if (mag != NULL) + { + struct bmi160_mag_xyzr_t mag_valid; + struct bmi160_mag_xyzr_t mag_data; + struct bmi160_mag_xyz_s32_t mag_comp_xyz; + mag_data.x = fifo_data[fifo_index + 0] + | fifo_data[fifo_index + 1] << 8; + mag_data.y = fifo_data[fifo_index + 2] + | fifo_data[fifo_index + 3] << 8; + mag_data.z = fifo_data[fifo_index + 4] + | fifo_data[fifo_index + 5] << 8; + mag_data.r = fifo_data[fifo_index + 6] + | fifo_data[fifo_index + 7] << 8; + fifo_index += 8; + mag_valid.x = mag_data.x >> 3; + mag_valid.y = mag_data.y >> 3; + mag_valid.z = mag_data.z >> 1; + mag_valid.r = mag_data.r >> 2; + bmi160_bmm150_mag_compensate_xyz_raw(&mag_comp_xyz, mag_valid); + mag->x = mag_comp_xyz.x; + mag->y = mag_comp_xyz.y; + mag->z = mag_comp_xyz.z; + } + + /* get xyz axis gyro data */ + if (gyro != NULL) + { + gyro->x = fifo_data[fifo_index + 0] + | fifo_data[fifo_index + 1] << 8; + gyro->y = fifo_data[fifo_index + 2] + | fifo_data[fifo_index + 3] << 8; + gyro->z = fifo_data[fifo_index + 4] + | fifo_data[fifo_index + 5] << 8; + fifo_index += 6; + } + + /* get xyz axis accel data */ + if (acc != NULL) + { + acc->x = fifo_data[fifo_index + 0] + | fifo_data[fifo_index + 1] << 8; + acc->y = fifo_data[fifo_index + 2] + | fifo_data[fifo_index + 3] << 8; + acc->z = fifo_data[fifo_index + 4] + | fifo_data[fifo_index + 5] << 8; + fifo_index += 6; + } + + return array_index; + +} + +static int bmi_pow(int x, int y) +{ + int result = 1; + + if (y == 1) + return x; + + + if (y > 0) { + while (--y) { + result *= x; + } + } else { + result = 0; + } + + return result; +} + +/* +* Decoding of FIFO frames (only exemplary subset). Calculates accurate timestamps based on the +* drift information. Returns value of the SENSORTIME frame. +* +* fifo_data_buf - pointer to fetched FIFO buffer +* fifo_length - number of valid bytes in the FIFO buffer +* drift - clock drift value, needed to calculate accurate timestamps +* timestamp - initial timestamp for the first sample of the FIFO chunk +* acc_odr - current value of the ACC_CONF.acc_odr register field +*/ +static uint64_t bmi_fifo_data_decode(uint8_t *fifo_data_buf, uint16_t fifo_length, + int drift, uint64_t timestamp, int odr_pow) +{ + int idx = 0; + uint8_t header; + uint64_t fifo_time = 0; + uint64_t timestamp_next = timestamp; + struct bmi160_value_t bmi160_value; + + while (idx < fifo_length) { + header = fifo_data_buf[idx]; + memset(&bmi160_value, 0, sizeof (bmi160_value)); + switch (header) { + case FIFO_HEAD_SENSOR_TIME: + /* sensortime frame, length = 4 bytes*/ + if (idx + 3 < fifo_length) { + fifo_time = fifo_data_buf[idx + 1] | + fifo_data_buf[idx + 2] << 8 | + fifo_data_buf[idx + 3] << 16; + return fifo_time; + } + idx += 4; + break; + case FIFO_HEAD_A: + /* accel frame, length = 7 bytes */ + idx += 1; + if (idx + 6 < fifo_length) { + bmi_fifo_get_decode_data( + &bmi160_value.acc, + NULL, NULL, + fifo_data_buf, idx); + bmi160_value.ts_intvl = + (int64_t)(625 * odr_pow * (drift > 0 ? drift : 1000)); + if (bmi_ring_buf_put(bmi160_value) == 0) + pr_info("bmi ring buf full head %d, tail %d", + s_ring_buf_head, s_ring_buf_tail); + if (drift > 0) + timestamp_next += (uint64_t)(625 * odr_pow * drift); + else + timestamp_next += (uint64_t)(625 * odr_pow * 1000); + } + idx += 6; + break; + case FIFO_HEAD_G: + /* gyro frame, length = 7 bytes */ + idx += 1; + if (idx + 6 < fifo_length) { + bmi_fifo_get_decode_data(NULL, + &bmi160_value.gyro, + NULL, fifo_data_buf, idx); + bmi160_value.ts_intvl = + (int64_t)(625 * odr_pow * (drift > 0 ? drift : 1000)); + if (bmi_ring_buf_put(bmi160_value) == 0) + pr_info("bmi ring buf full head %d, tail %d", + s_ring_buf_head, s_ring_buf_tail); + } + + idx += 6; + break; + case FIFO_HEAD_G_A: + idx += 1; + if (idx + 12 < fifo_length) { + bmi_fifo_get_decode_data(&bmi160_value.acc, + &bmi160_value.gyro, + NULL, fifo_data_buf, idx); + bmi160_value.ts_intvl = + (int64_t)(625 * odr_pow * (drift > 0 ? drift : 1000)); + if (bmi_ring_buf_put(bmi160_value) == 0) + pr_info("bmi ring buf full head %d, tail %d", + s_ring_buf_head, s_ring_buf_tail); + } + + idx += 12; + break; +#ifdef BMI160_MAG_INTERFACE_SUPPORT + case FIFO_HEAD_M: + idx +=1; + if (idx + 8 < fifo_length) { + bmi_fifo_get_decode_data(NULL, NULL, + &bmi160_value.mag, + fifo_data_buf, idx); + bmi160_value.ts_intvl = + (int64_t)(625 * odr_pow * (drift > 0 ? drift : 1000)); + if (bmi_ring_buf_put(bmi160_value) == 0) + pr_info("bmi ring buf full head %d, tail %d", + s_ring_buf_head, s_ring_buf_tail); + } + + idx += 8; + break; + case FIFO_HEAD_M_A: + idx +=1; + if (idx + 14 < fifo_length) { + bmi_fifo_get_decode_data(&bmi160_value.acc, NULL, + &bmi160_value.mag, fifo_data_buf, idx); + bmi160_value.ts_intvl = + (int64_t)(625 * odr_pow * (drift > 0 ? drift : 1000)); + if (bmi_ring_buf_put(bmi160_value) == 0) + pr_info("bmi ring buf full head %d, tail %d", + s_ring_buf_head, s_ring_buf_tail); + } + + idx += 14; + break; + + case FIFO_HEAD_M_G: + idx +=1; + if (idx + 14 < fifo_length) { + bmi_fifo_get_decode_data(NULL, &bmi160_value.gyro, + &bmi160_value.mag, fifo_data_buf, idx); + bmi160_value.ts_intvl = + (int64_t)(625 * odr_pow * (drift > 0 ? drift : 1000)); + if (bmi_ring_buf_put(bmi160_value) == 0) + pr_info("bmi ring buf full head %d, tail %d", + s_ring_buf_head, s_ring_buf_tail); + } + + idx += 14; + break; + case FIFO_HEAD_M_G_A: + idx +=1; + if (idx + 20 < fifo_length) { + bmi_fifo_get_decode_data(&bmi160_value.acc, + &bmi160_value.gyro, + &bmi160_value.mag, fifo_data_buf, idx); + bmi160_value.ts_intvl = + (int64_t)(625 * odr_pow * (drift > 0 ? drift : 1000)); + if (bmi_ring_buf_put(bmi160_value) == 0) + pr_info("bmi ring buf full head %d, tail %d", + s_ring_buf_head, s_ring_buf_tail); + } + + idx += 20; + pr_info("second interface mag"); + break; +#endif + case FIFO_HEAD_OVER_READ_LSB: + /* end of fifo chunk */ + idx = fifo_length; + break; + default: + pr_info("ERROR parsing FIFO!! header 0x%x", header); + idx = fifo_length; + break; + } + } + + return -1; +} + +static uint64_t bmi_fifo_next_timestamp_calc(uint64_t host_time_new, + uint64_t sensor_time_new, + int drift, int odr_pow, + uint8_t bmi_odr) +{ + uint64_t time_age = ((sensor_time_new & (0xFFFF >> bmi_odr)) + * (drift > 0 ? drift : 1000)) * 390625; + return ((host_time_new - div64_u64(time_age, 10000000) + + ((drift > 0 ? drift : 1000) * (625 * odr_pow)))); +} + +static int bmi_fifo_time_drift_calc(uint64_t host_time_new, + uint64_t sensor_time_new, + uint64_t host_time_old, + uint64_t sensor_time_old) +{ + uint64_t delta_st, delta_ht; + int drift = 0; + + if (host_time_old > 0) { + delta_st = sensor_time_new >= sensor_time_old ? + (sensor_time_new - sensor_time_old) : + (sensor_time_new + FIFO_SENSORTIME_OVERFLOW_MASK - sensor_time_old); + delta_ht = host_time_new - host_time_old; + if (delta_st != 0) + drift = (int)div64_u64(delta_ht * 10000, + (delta_st * FIFO_SENSORTIME_RESOLUTION)); + else + drift = 0; + + } else { + drift = 0; + } + + return drift; +} + +static void bmi_fifo_watermark_interrupt_handle + (struct bmi_client_data *client_data) +{ + int err = 0; + unsigned int fifo_len0 = 0; + unsigned int fifo_frmbytes_ext = 0; + static int time_drift = 0; + static uint64_t timestamp_next = 0; + uint8_t bmi_odr = client_data->odr.acc_odr; + int odr_pow = bmi_pow(2, 12 - bmi_odr + 1); + /*TO DO*/ + + if (client_data->fifo_data_sel == 4) + { + bmi_odr = client_data->odr.mag_odr; + odr_pow = bmi_pow(2, 12 - bmi_odr + 1); + } + + bmi_fifo_frame_bytes_extend_calc(client_data, &fifo_frmbytes_ext); + + if (client_data->pw.acc_pm == 2 && client_data->pw.gyro_pm == 2 + && client_data->pw.mag_pm == 2) + pr_info("pw_acc: %d, pw_gyro: %d\n", + client_data->pw.acc_pm, client_data->pw.gyro_pm); + if (!client_data->fifo_data_sel) + pr_info("no selsect sensor fifo, fifo_data_sel:%d\n", + client_data->fifo_data_sel); + + err = BMI_CALL_API(fifo_length)(&fifo_len0); + client_data->fifo_bytecount = fifo_len0; + + if (client_data->fifo_bytecount == 0 || err) + { + pr_info("fifo_bytecount is 0!!"); + return ; + } + if (client_data->fifo_bytecount + fifo_frmbytes_ext > FIFO_DATA_BUFSIZE) + client_data->fifo_bytecount = FIFO_DATA_BUFSIZE; + /* need give attention for the time of burst read*/ + memset (s_fifo_data_buf, 0, sizeof (s_fifo_data_buf)); + if (!err) { + err = bmi_burst_read_wrapper(client_data->device.dev_addr, + BMI160_USER_FIFO_DATA__REG, s_fifo_data_buf, + client_data->fifo_bytecount + fifo_frmbytes_ext); + /* store host timestamp after reading fifo */ + host_time_new = bmi_get_alarm_timestamp_ns(); + if (timestamp_next == 0) { + sensor_time_new = bmi_fifo_data_decode(s_fifo_data_buf, + client_data->fifo_bytecount + fifo_frmbytes_ext, + time_drift, timestamp_next, odr_pow); + } else { + sensor_time_new = bmi_fifo_data_decode(s_fifo_data_buf, + client_data->fifo_bytecount + fifo_frmbytes_ext, + time_drift, host_time_new, odr_pow); + } + if (sensor_time_new >= 0) { + time_drift = bmi_fifo_time_drift_calc(host_time_new, + sensor_time_new, host_time_old, sensor_time_old); + timestamp_next = bmi_fifo_next_timestamp_calc(host_time_new, + sensor_time_new, time_drift, odr_pow, bmi_odr); + /* store current timestamps as the old ones + for next delta calculation */ + host_time_old = host_time_new; + sensor_time_old = sensor_time_new; + } + } else { + dev_err(client_data->dev, "read fifo leght err"); + } + + if (err) + dev_err(client_data->dev, "brust read fifo err\n"); + +} + +static void bmi_signification_motion_interrupt_handle( + struct bmi_client_data *client_data) +{ + pr_info("bmi_signification_motion_interrupt_handle\n"); + input_event(client_data->input_accel, EV_MSC, INPUT_EVENT_SGM, 1); + input_sync(client_data->input_accel); + input_event(client_data->input_gyro, EV_MSC, INPUT_EVENT_SGM, 1); + input_sync(client_data->input_gyro); + bmi160_set_command_register(CMD_RESET_INT_ENGINE); + +} +static void bmi_stepdetector_interrupt_handle( + struct bmi_client_data *client_data) +{ + u8 current_step_dector_st = 0; + client_data->pedo_data.wkar_step_detector_status++; + current_step_dector_st = + client_data->pedo_data.wkar_step_detector_status; + client_data->std = ((current_step_dector_st == 1) ? 0 : 1); +} + +static void bmi_irq_work_func(struct work_struct *work) +{ + struct bmi_client_data *client_data = + container_of((struct work_struct *)work, + struct bmi_client_data, irq_work); + + unsigned char int_status[4] = {0, 0, 0, 0}; + + client_data->device.bus_read(client_data->device.dev_addr, + BMI160_USER_INTR_STAT_0_ADDR, int_status, 4); + + if (BMI160_GET_BITSLICE(int_status[0], + BMI160_USER_INTR_STAT_0_ANY_MOTION)) + bmi_slope_interrupt_handle(client_data); + + if (BMI160_GET_BITSLICE(int_status[0], + BMI160_USER_INTR_STAT_0_STEP_INTR)) + bmi_stepdetector_interrupt_handle(client_data); + if (BMI160_GET_BITSLICE(int_status[1], + BMI160_USER_INTR_STAT_1_FIFO_WM_INTR)) + bmi_fifo_watermark_interrupt_handle(client_data); + + /* Clear ALL inputerrupt status after handler sig mition*/ + /* Put this commads intot the last one*/ + if (BMI160_GET_BITSLICE(int_status[0], + BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR)) + bmi_signification_motion_interrupt_handle(client_data); + +} + +static irqreturn_t bmi_irq_handler(int irq, void *handle) +{ + struct bmi_client_data *client_data = handle; + + if (client_data == NULL) + return IRQ_HANDLED; + if (client_data->dev == NULL) + return IRQ_HANDLED; + schedule_work(&client_data->irq_work); + + return IRQ_HANDLED; +} +#endif /* defined(BMI_ENABLE_INT1)||defined(BMI_ENABLE_INT2) */ + +static int bmi_restore_hw_cfg(struct bmi_client_data *client) +{ + int err = 0; + + if ((client->fifo_data_sel) & (1 << BMI_ACC_SENSOR)) { + err += BMI_CALL_API(set_accel_range)(client->range.acc_range); + err += BMI_CALL_API(set_accel_output_data_rate) + (client->odr.acc_odr); + err += BMI_CALL_API(set_fifo_accel_enable)(1); + } + if ((client->fifo_data_sel) & (1 << BMI_GYRO_SENSOR)) { + err += BMI_CALL_API(set_gyro_range)(client->range.gyro_range); + err += BMI_CALL_API(set_gyro_output_data_rate) + (client->odr.gyro_odr); + err += BMI_CALL_API(set_fifo_gyro_enable)(1); + } + if ((client->fifo_data_sel) & (1 << BMI_MAG_SENSOR)) { + err += BMI_CALL_API(set_mag_output_data_rate) + (client->odr.mag_odr); + err += BMI_CALL_API(set_fifo_mag_enable)(1); + } + err += BMI_CALL_API(set_command_register)(CMD_CLR_FIFO_DATA); + + mutex_lock(&client->mutex_op_mode); + if (client->pw.acc_pm != BMI_ACC_PM_SUSPEND) { + err += BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_acc_arr[BMI_ACC_PM_NORMAL]); + mdelay(3); + } + mutex_unlock(&client->mutex_op_mode); + + mutex_lock(&client->mutex_op_mode); + if (client->pw.gyro_pm != BMI_GYRO_PM_SUSPEND) { + err += BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_gyro_arr[BMI_GYRO_PM_NORMAL]); + mdelay(3); + } + mutex_unlock(&client->mutex_op_mode); + + mutex_lock(&client->mutex_op_mode); + + if (client->pw.mag_pm != BMI_MAG_PM_SUSPEND) { +#ifdef BMI160_AKM09912_SUPPORT + err += bmi160_set_bst_akm_and_secondary_if_powermode + (BMI160_MAG_FORCE_MODE); +#else + err += bmi160_set_bmm150_mag_and_secondary_if_power_mode + (BMI160_MAG_FORCE_MODE); +#endif + mdelay(3); + } + mutex_unlock(&client->mutex_op_mode); + + return err; +} + +static void bmi160_set_acc_enable(struct device *dev, unsigned int enable) +{ + struct i2c_client *client = to_i2c_client(dev); + struct bmi_client_data *client_data = i2c_get_clientdata(client); + int acc_pre_enable = atomic_read(&client_data->wkqueue_en); + int gyro_current_enable; + + mutex_lock(&client_data->mutex_enable); + if (enable) { + if (acc_pre_enable == 0) { + if (!client_data->power_enabled) { + if (bmi160_power_ctl(client_data, true)) { + dev_err(dev, "power up sensor failed.\n"); + goto mutex_exit; + } + } + + bmi160_set_acc_op_mode(client_data, BMI_ACC_PM_NORMAL); + schedule_delayed_work(&client_data->work, + msecs_to_jiffies(atomic_read(&client_data->delay))); + atomic_set(&client_data->wkqueue_en, 1); + } + } else { + if ((acc_pre_enable == 1) && client_data->power_enabled) { + bmi160_set_acc_op_mode(client_data, BMI_ACC_PM_SUSPEND); + cancel_delayed_work_sync(&client_data->work); + atomic_set(&client_data->wkqueue_en, 0); + gyro_current_enable = atomic_read(&client_data->gyro_en); + if (!gyro_current_enable) { + if (bmi160_power_ctl(client_data, false)) { + dev_err(dev, "power down sensor failed.\n"); + goto mutex_exit; + } + } + } + } + +mutex_exit: + mutex_unlock(&client_data->mutex_enable); + dev_notice(dev, + "acc_enable en_state=%d\n", + atomic_read(&client_data->wkqueue_en)); +} + + +static void bmi160_set_gyro_enable(struct device *dev, unsigned int enable) +{ + struct i2c_client *client = to_i2c_client(dev); + struct bmi_client_data *client_data = i2c_get_clientdata(client); + int gyro_pre_enable = atomic_read(&client_data->gyro_en); + int acc_current_enable; + + mutex_lock(&client_data->mutex_enable); + if (enable) { + if (gyro_pre_enable == 0) { + if (!client_data->power_enabled) { + if (bmi160_power_ctl(client_data, true)) { + dev_err(dev, "power up sensor failed.\n"); + goto mutex_exit; + } + } + bmi160_set_gyro_op_mode(client_data, BMI_GYRO_PM_NORMAL); + schedule_delayed_work(&client_data->gyro_work, + msecs_to_jiffies(atomic_read(&client_data->delay))); + atomic_set(&client_data->gyro_en, 1); + } + } else { + if ((gyro_pre_enable == 1) && client_data->power_enabled) { + bmi160_set_gyro_op_mode(client_data, BMI_GYRO_PM_SUSPEND); + cancel_delayed_work_sync(&client_data->gyro_work); + atomic_set(&client_data->gyro_en, 0); + acc_current_enable = atomic_read(&client_data->wkqueue_en); + if (!acc_current_enable) { + if (bmi160_power_ctl(client_data, false)) { + dev_err(dev, "power down sensor failed.\n"); + goto mutex_exit; + } + } + } + } + +mutex_exit: + mutex_unlock(&client_data->mutex_enable); + dev_notice(&client->dev, "gyro_enable en_state=%d\n", + atomic_read(&client_data->gyro_en)); +} + + +static int bmi160_self_calibration_xyz(struct sensors_classdev *sensors_cdev, + int axis, int apply_now) +{ + int err = 0; + int timeout = 0; + s8 accel_offset_x = 0; + s8 accel_offset_y = 0; + s8 accel_offset_z = 0; + u8 nvm_prog = 0; + u8 nvm_rdy = 0; + + struct bmi_client_data *client_data = container_of(sensors_cdev, + struct bmi_client_data, accel_cdev); + int acc_pre_enable = atomic_read(&client_data->wkqueue_en); + if (acc_pre_enable) + bmi160_set_acc_enable(&client_data->i2c->dev, 0); + + err = bmi160_power_ctl(client_data, true); + if (err) { + dev_err(&client_data->i2c->dev, "power up sensor failed.\n"); + err = -EINVAL; + goto exit; + } + + err += BMI_CALL_API(set_accel_output_data_rate)( + BMI160_ACCEL_OUTPUT_DATA_RATE_100HZ); + + /* set to 2G range*/ + err += BMI_CALL_API(set_accel_range)(BMI160_ACCEL_RANGE_2G); + err = bmi160_set_acc_op_mode(client_data, BMI_ACC_PM_NORMAL); + if (err) + dev_err(&client_data->i2c->dev, + "the acc normal mode set fail\n"); + + err = BMI_CALL_API(accel_foc_trigger_xyz)(3, 3, 2, + &accel_offset_x, &accel_offset_y, &accel_offset_z); + + err = BMI_CALL_API(get_nvm_prog_enable)(&nvm_prog); + if (err) { + err = -EIO; + goto exit; + } + /*set num program enable */ + if (!nvm_prog) { + err = BMI_CALL_API(set_nvm_prog_enable)(0x1); + if (err) { + err = -EIO; + goto exit_power_off; + } + } + err = BMI_CALL_API(set_command_register)(0xA0); + do { + err = BMI_CALL_API(get_nvm_rdy)(&nvm_rdy); + if (err) { + dev_err(&client_data->i2c->dev, + "read nvm_ready error\n"); + goto exit_power_off; + } + timeout++; + if (timeout == RETRY_COUNT) { + dev_err(&client_data->i2c->dev, + "get fast calibration ready error\n"); + goto exit_power_off; + }; + } while(nvm_rdy == 0); + /*set nvm disable */ + err = BMI_CALL_API(set_nvm_prog_enable)(0x0); + snprintf(client_data->calibrate_buf, sizeof(client_data->calibrate_buf), + "%d,%d,%d", 0, 0, 0); + sensors_cdev->params = client_data->calibrate_buf; + +exit_power_off: + err = bmi160_power_ctl(client_data, false); + if (err) { + dev_err(&client_data->i2c->dev, "power down sensor failed.\n"); + err = -EINVAL; + } +exit: + if (acc_pre_enable) + bmi160_set_acc_enable(&client_data->i2c->dev, 1); + + return err; +} + +static int bmi160_accel_poll_delay(struct sensors_classdev *sensors_cdev, + unsigned int delay_ms) +{ + struct bmi_client_data *data = container_of(sensors_cdev, + struct bmi_client_data, accel_cdev); + + if (delay_ms < POLL_INTERVAL_MIN_MS) + delay_ms = POLL_INTERVAL_MIN_MS; + if (delay_ms > POLL_INTERVAL_MAX_MS) + delay_ms = POLL_INTERVAL_MAX_MS; + atomic_set(&data->acc_delay, (unsigned int) delay_ms); + return 0; +} + +static int bmi160_cdev_enable_accel(struct sensors_classdev *sensors_cdev, + unsigned int enable) +{ + struct bmi_client_data *client_data = container_of(sensors_cdev, + struct bmi_client_data, accel_cdev); + bmi160_set_acc_enable(&client_data->i2c->dev, enable); + return 0; +} + +static int bmi160_gyro_poll_delay(struct sensors_classdev *sensors_cdev, + unsigned int delay_ms) +{ + struct bmi_client_data *data = container_of(sensors_cdev, + struct bmi_client_data, gyro_cdev); + + if (delay_ms < POLL_INTERVAL_MIN_MS) + delay_ms = POLL_INTERVAL_MIN_MS; + if (delay_ms > POLL_INTERVAL_MAX_MS) + delay_ms = POLL_INTERVAL_MAX_MS; + atomic_set(&data->gyro_delay, (unsigned int) delay_ms); + return 0; +} + + +static int bmi160_cdev_enable_gyro(struct sensors_classdev *sensors_cdev, + unsigned int enable) +{ + struct bmi_client_data *client_data = container_of(sensors_cdev, + struct bmi_client_data, gyro_cdev); + bmi160_set_gyro_enable(&client_data->i2c->dev, enable); + return 0; +} + + + +static int bmi160_parse_dt(struct device *dev, + struct bmi160_platform_data *pdata) +{ + struct device_node *np = dev->of_node; + u32 temp_val; + int rc; + + rc = of_property_read_u32(np, "bosch,place", &temp_val); + if (rc && (rc != -EINVAL)) { + dev_err(dev, "Unable to read sensor place paramater\n"); + return rc; + } + if (temp_val > 7 || temp_val < 0) { + dev_err(dev, "Invalid place parameter, use default value 0\n"); + pdata->place = 0; + } else { + pdata->place = temp_val; + } +#ifdef BMI160_ENABLE_INT1 + pdata->gpio_pin = of_get_named_gpio_flags(dev->of_node, + "bosch,gpio-int1", 0, &pdata->int_flag); +#endif +#ifdef BMI160_ENABLE_INT2 + pdata->gpio_pin = of_get_named_gpio_flags(dev->of_node, + "bosch,gpio-int2", 0, &pdata->int_flag); +#endif + return 0; +} + + + + +int bmi_probe(struct bmi_client_data *client_data, struct device *dev) +{ + int err = 0; + struct bmi160_platform_data *pdata; +#ifdef BMI160_MAG_INTERFACE_SUPPORT + u8 mag_dev_addr; + u8 mag_urst_len; + u8 mag_op_mode; +#endif + + err = bmi160_power_init(client_data); + if (err) { + dev_err(&client_data->i2c->dev, + "Failed to get sensor regulators\n"); + err = -EINVAL; + goto exit; + } + err = bmi160_power_ctl(client_data, true); + if (err) { + dev_err(&client_data->i2c->dev, + "Failed to enable sensor power\n"); + err = -EINVAL; + goto deinit_power_exit; + } + + if (client_data->i2c->dev.of_node) { + pdata = devm_kzalloc(&client_data->i2c->dev, + sizeof(*pdata), GFP_KERNEL); + if (!pdata) { + dev_err(dev, "Failed to allcated memory\n"); + err = -ENOMEM; + goto disable_power_exit; + } + err = bmi160_parse_dt(&client_data->i2c->dev, pdata); + if (err) { + dev_err(dev, "Failed to parse device tree\n"); + err = -EINVAL; + goto pdata_free_exit; + } + } else { + pdata = client_data->i2c->dev.platform_data; + dev_err(dev, "Use platform data\n"); + } + + if (!pdata) { + dev_err(&client_data->i2c->dev, "Cannot get device platform data\n"); + err = -EINVAL; + goto exit; + } + client_data->pdata = pdata; + + /* check chip id */ + err = bmi_check_chip_id(client_data); + if (err) + goto exit; + + dev_set_drvdata(dev, client_data); + client_data->dev = dev; + + mutex_init(&client_data->mutex_enable); + mutex_init(&client_data->mutex_op_mode); + mutex_init(&client_data->mutex_ring_buf); + + /* input device init */ + err = bmi_input_init(client_data); + if (err < 0) + goto free_i2c_clientdata_exit; + + /* sysfs node creation */ + err = sysfs_create_group(&client_data->i2c->dev.kobj, + &bmi160_attribute_group); + + if (err < 0) + goto exit_err_sysfs; + + /*to do*/ + client_data->accel_cdev = accel_cdev; + client_data->accel_cdev.min_delay = POLL_INTERVAL_MIN_MS * 1000; + client_data->accel_cdev.delay_msec = 200; + client_data->accel_cdev.sensors_enable = bmi160_cdev_enable_accel; + client_data->accel_cdev.sensors_poll_delay = bmi160_accel_poll_delay; + client_data->accel_cdev.sensors_calibrate = bmi160_self_calibration_xyz; + err = sensors_classdev_register(&client_data->input_accel->dev, + &client_data->accel_cdev); + if (err) { + dev_err(&client_data->i2c->dev, "sensors class register failed.\n"); + return err; + } + + client_data->gyro_cdev = gyro_cdev; + client_data->gyro_cdev.min_delay = POLL_INTERVAL_MIN_MS * 1000; + client_data->gyro_cdev.delay_msec = 200; + client_data->gyro_cdev.sensors_enable = bmi160_cdev_enable_gyro; + client_data->gyro_cdev.sensors_poll_delay = bmi160_gyro_poll_delay; + err = sensors_classdev_register(&client_data->input_gyro->dev, + &client_data->gyro_cdev); + if (err) { + dev_err(&client_data->i2c->dev, "sensors class register failed.\n"); + return err; + } + + /* workqueue init */ + INIT_DELAYED_WORK(&client_data->work, bmi_work_func); + INIT_DELAYED_WORK(&client_data->gyro_work, bmi_gyro_work_func); + atomic_set(&client_data->delay, BMI_DELAY_DEFAULT); + atomic_set(&client_data->acc_delay, BMI_DELAY_DEFAULT); + atomic_set(&client_data->gyro_delay, BMI_DELAY_DEFAULT); + atomic_set(&client_data->wkqueue_en, 0); + atomic_set(&client_data->gyro_en, 0); + + /* h/w init */ + client_data->device.delay_msec = bmi_delay; + err = BMI_CALL_API(init)(&client_data->device); + + /*workqueue init*/ + INIT_WORK(&client_data->report_data_work, bmi_hrtimer_work_func); + reportdata_wq = create_singlethread_workqueue("bmi160_wq"); + if (NULL == reportdata_wq) { + pr_info("fail to create the reportdta_wq %d", -ENOMEM); + } + hrtimer_init(&client_data->timer, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); + client_data->timer.function = reportdata_timer_fun; + client_data->work_delay_kt = ns_to_ktime(10000000); + client_data->is_timer_running = 0; + client_data->time_odr = 500000; /*200Hz*/ + + bmi_dump_reg(client_data); + + /*power on detected*/ + /*or softrest(cmd 0xB6) */ + /*fatal err check*/ + /*soft reset*/ + err += BMI_CALL_API(set_command_register)(CMD_RESET_USER_REG); + mdelay(3); + if (err) + dev_err(dev, "Failed soft reset, er=%d", err); + /*usr data config page*/ + err += BMI_CALL_API(set_target_page)(USER_DAT_CFG_PAGE); + if (err) + dev_err(dev, "Failed cffg page, er=%d", err); + err += bmi_get_err_status(client_data); + if (err) { + dev_err(dev, "Failed to bmi16x init!err_st=0x%x\n", + client_data->err_st.err_st_all); + goto exit_err_sysfs; + } + +#ifdef BMI160_MAG_INTERFACE_SUPPORT + err += bmi160_set_command_register(MAG_MODE_NORMAL); + mdelay(2); + err += bmi160_get_mag_power_mode_stat(&mag_op_mode); + mdelay(2); + err += BMI_CALL_API(get_i2c_device_addr)(&mag_dev_addr); + mdelay(2); +#ifdef BMI160_AKM09912_SUPPORT + err += BMI_CALL_API(set_i2c_device_addr)(BMI160_AKM09912_I2C_ADDRESS); + /*do not need to check the return value for mag 2nd interface*/ + bmi160_bst_akm_mag_interface_init(BMI160_AKM09912_I2C_ADDRESS); +#else + err += BMI_CALL_API(set_i2c_device_addr)(BMI160_AUX_BMM150_I2C_ADDRESS); + /*do not need to check the return value for mag 2nd interface*/ + bmi160_bmm150_mag_interface_init(); +#endif + err += bmi160_set_mag_burst(3); + err += bmi160_get_mag_burst(&mag_urst_len); + dev_info(client_data->dev, + "BMI160 mag_urst_len:%d, mag_add:0x%x, mag_op_mode:%d\n", + mag_urst_len, mag_dev_addr, mag_op_mode); +#endif + if (err < 0) + goto exit_err_sysfs; + + err = gpio_request_one(client_data->pdata->gpio_pin, + GPIOF_IN, "bmi160_int"); + if (err < 0) { + dev_err(client_data->dev, + "failed to request gpio %d, error %d\n", + client_data->pdata->gpio_pin, err); + } + client_data->IRQ = gpio_to_irq(client_data->pdata->gpio_pin); + if (err) { + dev_err(client_data->dev, + "can not request gpio to irq number\n"); + client_data->pdata->gpio_pin = 0; + } + +#ifdef BMI160_ENABLE_INT1 + /* maps interrupt to INT1/InT2 pin */ + BMI_CALL_API(set_intr_any_motion)(BMI_INT0, ENABLE); + BMI_CALL_API(set_intr_fifo_wm)(BMI_INT0, ENABLE); + /*BMI_CALL_API(set_int_drdy)(BMI_INT0, ENABLE);*/ + + /*Set interrupt trige level way */ + BMI_CALL_API(set_intr_edge_ctrl)(BMI_INT0, BMI_INT_LEVEL); + bmi160_set_intr_level(BMI_INT0, 1); + /*set interrupt latch temporary, 5 ms*/ + /*bmi160_set_latch_int(5);*/ + + BMI_CALL_API(set_output_enable)( + BMI160_INTR1_OUTPUT_ENABLE, ENABLE); + sigmotion_init_interrupts(BMI160_MAP_INTR1); + BMI_CALL_API(map_step_detector_intr)(BMI160_MAP_INTR1); + /*close step_detector in init function*/ + BMI_CALL_API(set_step_detector_enable)(0); +#endif + +#ifdef BMI160_ENABLE_INT2 + /* maps interrupt to INT1/InT2 pin */ + BMI_CALL_API(set_intr_any_motion)(BMI_INT1, ENABLE); + BMI_CALL_API(set_intr_fifo_wm)(BMI_INT1, ENABLE); + BMI_CALL_API(set_int_drdy)(BMI_INT1, ENABLE); + + /*Set interrupt trige level way */ + BMI_CALL_API(set_intr_edge_ctrl)(BMI_INT1, BMI_INT_LEVEL); + bmi160_set_intr_level(BMI_INT1, 1); + /*set interrupt latch temporary, 5 ms*/ + /*bmi160_set_latch_int(5);*/ + + BMI_CALL_API(set_output_enable)( + BMI160_INTR2_OUTPUT_ENABLE, ENABLE); + sigmotion_init_interrupts(BMI160_MAP_INTR2); + BMI_CALL_API(map_step_detector_intr)(BMI160_MAP_INTR2); + /*close step_detector in init function*/ + BMI_CALL_API(set_step_detector_enable)(0); +#endif + err = request_irq(client_data->IRQ, bmi_irq_handler, + IRQF_TRIGGER_RISING, "bmi160", client_data); + if (err) + dev_err(client_data->dev, "could not request irq\n"); + INIT_WORK(&client_data->irq_work, bmi_irq_work_func); + disable_irq(client_data->IRQ); + + client_data->selftest = 0; + + client_data->fifo_data_sel = 0; + BMI_CALL_API(get_accel_output_data_rate)(&client_data->odr.acc_odr); + BMI_CALL_API(get_gyro_output_data_rate)(&client_data->odr.gyro_odr); + BMI_CALL_API(get_mag_output_data_rate)(&client_data->odr.mag_odr); + BMI_CALL_API(set_fifo_time_enable)(1); + BMI_CALL_API(get_accel_range)(&client_data->range.acc_range); + BMI_CALL_API(get_gyro_range)(&client_data->range.gyro_range); + /* now it's power on which is considered as resuming from suspend */ + + /* set sensor PMU into suspend power mode for all */ + if (bmi_pmu_set_suspend(client_data) < 0) { + dev_err(dev, "Failed to set BMI160 to suspend power mode\n"); + goto exit_err_sysfs; + } + + bmi160_power_ctl(client_data, false); + + dev_notice(dev, "sensor_time:%d, %d", + sensortime_duration_tbl[0].ts_delat, + sensortime_duration_tbl[0].ts_duration_lsb); + dev_notice(dev, "sensor %s probed successfully", SENSOR_NAME); + + return 0; + +exit_err_sysfs: + if (err) + bmi_input_destroy(client_data); +free_i2c_clientdata_exit: + dev_set_drvdata(dev, NULL); +pdata_free_exit: + if (pdata && (&client_data->i2c->dev.of_node)) + devm_kfree(&client_data->i2c->dev, pdata); + client_data->pdata = NULL; +disable_power_exit: + bmi160_power_ctl(client_data, false); +deinit_power_exit: + bmi160_power_deinit(client_data); +exit: + kfree(client_data); + return err; +} +EXPORT_SYMBOL(bmi_probe); + +/*! + * @brief remove bmi client + * + * @param dev the pointer of device + * + * @return zero + * @retval zero +*/ +int bmi_remove(struct device *dev) +{ + int err = 0; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + + if (NULL != client_data) { +#ifdef CONFIG_HAS_EARLYSUSPEND + unregister_early_suspend(&client_data->early_suspend_handler); +#endif + mutex_lock(&client_data->mutex_enable); + if (BMI_ACC_PM_NORMAL == client_data->pw.acc_pm || + BMI_GYRO_PM_NORMAL == client_data->pw.gyro_pm || + BMI_MAG_PM_NORMAL == client_data->pw.mag_pm) { + cancel_delayed_work_sync(&client_data->work); + cancel_delayed_work_sync(&client_data->gyro_work); + } + mutex_unlock(&client_data->mutex_enable); + + err = bmi_pmu_set_suspend(client_data); + + mdelay(5); + + sysfs_remove_group(&client_data->i2c->dev.kobj, + &bmi160_attribute_group); + bmi_input_destroy(client_data); + + if (NULL != client_data->pdata) { + kfree(client_data->pdata); + client_data->pdata = NULL; + } + kfree(client_data); + } + return err; +} +EXPORT_SYMBOL(bmi_remove); + +static int bmi_post_resume(struct bmi_client_data *client_data) +{ + int err = 0; + + mutex_lock(&client_data->mutex_enable); + + if (atomic_read(&client_data->wkqueue_en) == 1) { + bmi160_set_acc_op_mode(client_data, BMI_ACC_PM_NORMAL); + schedule_delayed_work(&client_data->work, + msecs_to_jiffies( + atomic_read(&client_data->acc_delay))); + } + + if (atomic_read(&client_data->gyro_en) == 1) { + bmi160_set_gyro_op_mode(client_data, BMI_GYRO_PM_NORMAL); + schedule_delayed_work(&client_data->gyro_work, + msecs_to_jiffies( + atomic_read(&client_data->gyro_delay))); + } + mutex_unlock(&client_data->mutex_enable); + if (client_data->is_timer_running) { + hrtimer_start(&client_data->timer, + ns_to_ktime(client_data->time_odr), + HRTIMER_MODE_REL); + client_data->base_time = 0; + client_data->timestamp = 0; + client_data->is_timer_running = 1; + } + + return err; +} + + +int bmi_suspend(struct device *dev) +{ + int err = 0; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + dev_err(client_data->dev, "bmi suspend function entrance"); + + if (client_data->is_timer_running) { + hrtimer_cancel(&client_data->timer); + client_data->base_time = 0; + client_data->timestamp = 0; + client_data->fifo_time = 0; + } + + if (atomic_read(&client_data->wkqueue_en) == 1) { + bmi160_set_acc_op_mode(client_data, BMI_ACC_PM_SUSPEND); + cancel_delayed_work_sync(&client_data->work); + } + + if (atomic_read(&client_data->gyro_en) == 1) { + bmi160_set_gyro_op_mode(client_data, BMI_GYRO_PM_SUSPEND); + cancel_delayed_work_sync(&client_data->gyro_work); + } + + return err; +} +EXPORT_SYMBOL(bmi_suspend); + +int bmi_resume(struct device *dev) +{ + int err = 0; + struct bmi_client_data *client_data = dev_get_drvdata(dev); + dev_err(client_data->dev, "bmi resume function entrance"); + + if (client_data->pw.acc_pm != BMI_ACC_PM_SUSPEND) { + err += BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_acc_arr[BMI_ACC_PM_NORMAL]); + mdelay(3); + } + if (client_data->pw.gyro_pm != BMI_GYRO_PM_SUSPEND) { + err += BMI_CALL_API(set_command_register) + (bmi_pmu_cmd_gyro_arr[BMI_GYRO_PM_NORMAL]); + mdelay(3); + } + + if (client_data->pw.mag_pm != BMI_MAG_PM_SUSPEND) { +#ifdef BMI160_AKM09912_SUPPORT + err += bmi160_set_bst_akm_and_secondary_if_powermode + (BMI160_MAG_FORCE_MODE); +#else + err += bmi160_set_bmm150_mag_and_secondary_if_power_mode + (BMI160_MAG_FORCE_MODE); +#endif + mdelay(3); + } + /* post resume operation */ + err += bmi_post_resume(client_data); + + return err; +} +EXPORT_SYMBOL(bmi_resume); + diff --git a/drivers/input/misc/bmi160_driver.h b/drivers/input/misc/bmi160_driver.h new file mode 100644 index 00000000000..77ba92830f7 --- /dev/null +++ b/drivers/input/misc/bmi160_driver.h @@ -0,0 +1,410 @@ +/*! + * @section LICENSE + * (C) Copyright 2011~2016 Bosch Sensortec GmbH All Rights Reserved + * + * This software program is licensed subject to the GNU General + * Public License (GPL).Version 2,June 1991, + * available at http://www.fsf.org/copyleft/gpl.html + * + * @filename bmi160_driver.h + * @date 2015/08/17 14:40 + * @id "09afbe6" + * @version 1.4 + * + * @brief + * The head file of BMI160 device driver core code +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef CONFIG_HAS_EARLYSUSPEND +#include +#endif + +#include "bmi160.h" + +/* sensor specific */ +#define SENSOR_NAME "bmi160" +#define BMI160_ACCEL_INPUT_NAME "bmi160-accel" +#define BMI160_GYRO_INPUT_NAME "bmi160-gyro" +#define ABSMIN -512 +#define ABSMAX 512 +#define GYRO_MIN_VALUE -32768 +#define GYRO_MAX_VALUE 32767 +#define BMI_CAL_BUF_SIZE 99 + +#define SENSOR_CHIP_ID_BMI (0xD0) +#define SENSOR_CHIP_ID_BMI_C2 (0xD1) +#define SENSOR_CHIP_ID_BMI_C3 (0xD3) + +#define SENSOR_CHIP_REV_ID_BMI (0x00) + +#define CHECK_CHIP_ID_TIME_MAX 5 + +#define BMI_REG_NAME(name) BMI160_##name##__REG +#define BMI_VAL_NAME(name) BMI160_##name +#define BMI_CALL_API(name) bmi160_##name + +#define BMI_I2C_WRITE_DELAY_TIME (1) + +/* generic */ +#define BMI_MAX_RETRY_I2C_XFER (100) +#define BMI_MAX_RETRY_WAKEUP (5) +#define BMI_MAX_RETRY_WAIT_DRDY (100) + +#define BMI_DELAY_MIN (1) +#define BMI_DELAY_DEFAULT (200) + +#define BMI_VALUE_MAX (32767) +#define BMI_VALUE_MIN (-32768) + +#define BYTES_PER_LINE (16) + +#define BUF_SIZE_PRINT (16) + +#define BMI_FAST_CALI_TRUE (1) +#define BMI_FAST_CALI_ALL_RDY (7) + +/*! FIFO 1024 byte, max fifo frame count not over 150 */ +#define FIFO_FRAME_CNT 20 +#define FIFO_DATA_BUFSIZE 1024 + + +#define FRAME_LEN_ACC 6 +#define FRAME_LEN_GYRO 6 +#define FRAME_LEN_MAG 8 + +/*! BMI Self test */ +#define BMI_SELFTEST_AMP_HIGH 1 + +/* CMD */ +#define CMD_FOC_START 0x03 +#define CMD_PMU_ACC_SUSPEND 0x10 +#define CMD_PMU_ACC_NORMAL 0x11 +#define CMD_PMU_ACC_LP1 0x12 +#define CMD_PMU_ACC_LP2 0x13 +#define CMD_PMU_GYRO_SUSPEND 0x14 +#define CMD_PMU_GYRO_NORMAL 0x15 +#define CMD_PMU_GYRO_FASTSTART 0x17 +#define CMD_PMU_MAG_SUSPEND 0x18 +#define CMD_PMU_MAG_NORMAL 0x19 +#define CMD_PMU_MAG_LP1 0x1A +#define CMD_PMU_MAG_LP2 0x1B +#define CMD_CLR_FIFO_DATA 0xB0 +#define CMD_RESET_INT_ENGINE 0xB1 +#define CMD_RESET_USER_REG 0xB6 + +#define USER_DAT_CFG_PAGE 0x00 + +/*! FIFO Head definition*/ +#define FIFO_HEAD_A 0x84 +#define FIFO_HEAD_G 0x88 +#define FIFO_HEAD_M 0x90 + +#define FIFO_HEAD_G_A (FIFO_HEAD_G | FIFO_HEAD_A) +#define FIFO_HEAD_M_A (FIFO_HEAD_M | FIFO_HEAD_A) +#define FIFO_HEAD_M_G (FIFO_HEAD_M | FIFO_HEAD_G) + +#define FIFO_HEAD_M_G_A (FIFO_HEAD_M | FIFO_HEAD_G | FIFO_HEAD_A) + +#define FIFO_HEAD_SENSOR_TIME 0x44 +#define FIFO_HEAD_SKIP_FRAME 0x40 +#define FIFO_HEAD_OVER_READ_LSB 0x80 +#define FIFO_HEAD_OVER_READ_MSB 0x00 + +/*! FIFO head mode Frame bytes number definition */ +#define A_BYTES_FRM 6 +#define G_BYTES_FRM 6 +#define M_BYTES_FRM 8 +#define GA_BYTES_FRM 12 +#define MG_BYTES_FRM 14 +#define MA_BYTES_FRM 14 +#define MGA_BYTES_FRM 20 + +#define ACC_FIFO_HEAD "acc" +#define GYRO_FIFO_HEAD "gyro" +#define MAG_FIFO_HEAD "mag" + +/*! Bosch sensor unknown place*/ +#define BOSCH_SENSOR_PLACE_UNKNOWN (-1) +/*! Bosch sensor remapping table size P0~P7*/ +#define MAX_AXIS_REMAP_TAB_SZ 8 + +#define ENABLE 1 +#define DISABLE 0 + +/* bmi sensor HW interrupt pin number */ +#define BMI_INT0 0 +#define BMI_INT1 1 + +#define BMI_INT_LEVEL 0 +#define BMI_INT_EDGE 1 + +/*! BMI mag interface */ + + +/* compensated output value returned if sensor had overflow */ +#define BMM050_OVERFLOW_OUTPUT -32768 +#define BMM050_OVERFLOW_OUTPUT_S32 ((s32)(-2147483647-1)) + +/* Trim Extended Registers */ +#define BMM050_DIG_X1 0x5D +#define BMM050_DIG_Y1 0x5E +#define BMM050_DIG_Z4_LSB 0x62 +#define BMM050_DIG_Z4_MSB 0x63 +#define BMM050_DIG_X2 0x64 +#define BMM050_DIG_Y2 0x65 +#define BMM050_DIG_Z2_LSB 0x68 +#define BMM050_DIG_Z2_MSB 0x69 +#define BMM050_DIG_Z1_LSB 0x6A +#define BMM050_DIG_Z1_MSB 0x6B +#define BMM050_DIG_XYZ1_LSB 0x6C +#define BMM050_DIG_XYZ1_MSB 0x6D +#define BMM050_DIG_Z3_LSB 0x6E +#define BMM050_DIG_Z3_MSB 0x6F +#define BMM050_DIG_XY2 0x70 +#define BMM050_DIG_XY1 0x71 + +struct regulator_map { + struct regulator *regulator; + int min_uv; + int max_uv; + char *supply; +}; + +struct bmi160mag_compensate_t { + signed char dig_x1; + signed char dig_y1; + + signed char dig_x2; + signed char dig_y2; + + u16 dig_z1; + s16 dig_z2; + s16 dig_z3; + s16 dig_z4; + + unsigned char dig_xy1; + signed char dig_xy2; + + u16 dig_xyz1; +}; + +/*bmi fifo sensor type combination*/ +enum BMI_FIFO_DATA_SELECT_T { + BMI_FIFO_A_SEL = 1, + BMI_FIFO_G_SEL, + BMI_FIFO_G_A_SEL, + BMI_FIFO_M_SEL, + BMI_FIFO_M_A_SEL, + BMI_FIFO_M_G_SEL, + BMI_FIFO_M_G_A_SEL, + BMI_FIFO_DATA_SEL_MAX +}; + +/*bmi interrupt about step_detector and sgm*/ +#define INPUT_EVENT_STEP_DETECTOR 5 +#define INPUT_EVENT_SGM REL_DIAL/*7*/ +#define INPUT_EVENT_FAST_ACC_CALIB_DONE 6 +#define INPUT_EVENT_FAST_GYRO_CALIB_DONE 4 + + +/*! +* Bst sensor common definition, +* please give parameters in BSP file. +*/ +struct bmi160_platform_data { + int gpio_pin; + unsigned int int_flag; + s8 place; +}; + +struct bosch_sensor_specific { + char *name; + /* 0 to 7 */ + unsigned int place:3; + int irq; + int (*irq_gpio_cfg)(void); +}; + +/*! bmi160 sensor spec of power mode */ +struct pw_mode { + u8 acc_pm; + u8 gyro_pm; + u8 mag_pm; +}; + +/*! bmi160 sensor spec of odr */ +struct odr_t { + u8 acc_odr; + u8 gyro_odr; + u8 mag_odr; +}; + +/*! bmi160 sensor spec of range */ +struct range_t { + u8 acc_range; + u8 gyro_range; +}; + +/*! bmi160 sensor error status */ +struct err_status { + u8 fatal_err; + u8 err_code; + u8 i2c_fail; + u8 drop_cmd; + u8 mag_drdy_err; + u8 err_st_all; +}; + +/*! bmi160 fifo frame for all sensors */ +struct fifo_frame_t { + struct bmi160_accel_t *acc_farr; + struct bmi160_gyro_t *gyro_farr; + struct bmi160_mag_xyz_s32_t *mag_farr; + + unsigned char acc_frame_cnt; + unsigned char gyro_frame_cnt; + unsigned char mag_frame_cnt; + + u32 acc_lastf_ts; + u32 gyro_lastf_ts; + u32 mag_lastf_ts; +}; + +/*! bmi160 fifo sensor time */ +struct fifo_sensor_time_t { + u32 acc_ts; + u32 gyro_ts; + u32 mag_ts; +}; + +struct pedometer_data_t { + /*! Fix step detector misinformation for the first time*/ + u8 wkar_step_detector_status; + u_int32_t last_step_counter_value; +}; + +struct bmi_client_data { + struct bmi160_t device; + struct i2c_client *i2c; + struct device *dev; + struct input_dev *input_accel; + struct input_dev *input_gyro; + struct sensors_classdev accel_cdev; + struct sensors_classdev gyro_cdev; + struct regulator *vdd; + struct regulator *vio; + struct delayed_work work; + struct delayed_work gyro_work; + struct work_struct irq_work; + + struct work_struct report_data_work; + int is_timer_running; + struct hrtimer timer; + ktime_t work_delay_kt; + uint64_t timestamp; + uint64_t base_time; + uint64_t fifo_time; + uint64_t gyro_count; + uint64_t time_odr; + + u8 chip_id; + + struct pw_mode pw; + struct odr_t odr; + struct range_t range; /*TO DO*/ + struct err_status err_st; + struct pedometer_data_t pedo_data; + s8 place; + u8 selftest; + + atomic_t wkqueue_en; /*TO DO acc gyro mag*/ + atomic_t gyro_en; + atomic_t delay; + atomic_t acc_delay; + atomic_t gyro_delay; + atomic_t selftest_result; + char calibrate_buf[BMI_CAL_BUF_SIZE]; + + u8 fifo_data_sel; + u16 fifo_bytecount; + u8 fifo_head_en; + unsigned char fifo_int_tag_en; + struct fifo_frame_t fifo_frame; + + unsigned char *fifo_data; + u8 stc_enable; + u8 std; + u8 sig_flag; + unsigned char calib_status; + struct mutex mutex_op_mode; + struct mutex mutex_enable; + struct mutex mutex_ring_buf; + struct bmi160_platform_data *pdata; + bool power_enabled; + int IRQ; +#ifdef CONFIG_HAS_EARLYSUSPEND + struct early_suspend early_suspend_handler; +#endif +}; + + +/*! + * we use a typedef to hide the detail, + * because this type might be changed + */ +struct bosch_sensor_axis_remap { + /* src means which source will be mapped to target x, y, z axis */ + /* if an target OS axis is remapped from (-)x, + * src is 0, sign_* is (-)1 */ + /* if an target OS axis is remapped from (-)y, + * src is 1, sign_* is (-)1 */ + /* if an target OS axis is remapped from (-)z, + * src is 2, sign_* is (-)1 */ + int src_x:3; + int src_y:3; + int src_z:3; + + int sign_x:2; + int sign_y:2; + int sign_z:2; +}; + + +struct bosch_sensor_data { + union { + int16_t v[3]; + struct { + int16_t x; + int16_t y; + int16_t z; + }; + }; +}; + +s8 bmi_burst_read_wrapper(u8 dev_addr, u8 reg_addr, u8 *data, u16 len); +int bmi_probe(struct bmi_client_data *client_data, struct device *dev); +int bmi_remove(struct device *dev); +int bmi_suspend(struct device *dev); +int bmi_resume(struct device *dev); + + diff --git a/drivers/input/misc/bmi160_i2c.c b/drivers/input/misc/bmi160_i2c.c new file mode 100644 index 00000000000..64648529ce5 --- /dev/null +++ b/drivers/input/misc/bmi160_i2c.c @@ -0,0 +1,366 @@ +/*! + * @section LICENSE + * (C) Copyright 2011~2016 Bosch Sensortec GmbH All Rights Reserved + * + * This software program is licensed subject to the GNU General + * Public License (GPL).Version 2,June 1991, + * available at http://www.fsf.org/copyleft/gpl.html + * + * @filename bmi160_i2c.c + * @date 2014/11/25 14:40 + * @id "ba266c5" + * @version 1.3 + * + * @brief + * This file implements moudle function, which add + * the driver to I2C core. +*/ + +#include +#include +#include +#include "bmi160_driver.h" + +/*! @defgroup bmi160_i2c_src + * @brief bmi160 i2c driver module + @{*/ + +static struct i2c_client *bmi_client; +/*! + * @brief define i2c wirte function + * + * @param client the pointer of i2c client + * @param reg_addr register address + * @param data the pointer of data buffer + * @param len block size need to write + * + * @return zero success, non-zero failed + * @retval zero success + * @retval non-zero failed +*/ +/* i2c read routine for API*/ +static s8 bmi_i2c_read(struct i2c_client *client, u8 reg_addr, + u8 *data, u8 len) + { +#if !defined BMI_USE_BASIC_I2C_FUNC + s32 dummy; + if (NULL == client) + return -EINVAL; + + while (0 != len--) { +#ifdef BMI_SMBUS + dummy = i2c_smbus_read_byte_data(client, reg_addr); + if (dummy < 0) { + dev_err(&client->dev, "i2c smbus read error"); + return -EIO; + } + *data = (u8)(dummy & 0xff); +#else + dummy = i2c_master_send(client, (char *)®_addr, 1); + if (dummy < 0) { + dev_err(&client->dev, "i2c bus master write error"); + return -EIO; + } + + dummy = i2c_master_recv(client, (char *)data, 1); + if (dummy < 0) { + dev_err(&client->dev, "i2c bus master read error"); + return -EIO; + } +#endif + reg_addr++; + data++; + } + return 0; +#else + int retry; + + struct i2c_msg msg[] = { + { + .addr = client->addr, + .flags = 0, + .len = 1, + .buf = ®_addr, + }, + + { + .addr = client->addr, + .flags = I2C_M_RD, + .len = len, + .buf = data, + }, + }; + + for (retry = 0; retry < BMI_MAX_RETRY_I2C_XFER; retry++) { + if (i2c_transfer(client->adapter, msg, + ARRAY_SIZE(msg)) > 0) + break; + else + mdelay(BMI_I2C_WRITE_DELAY_TIME); + } + + if (BMI_MAX_RETRY_I2C_XFER <= retry) { + dev_err(&client->dev, "I2C xfer error"); + return -EIO; + } + + return 0; +#endif + } + + +static s8 bmi_i2c_burst_read(struct i2c_client *client, u8 reg_addr, + u8 *data, u16 len) +{ + int retry; + + struct i2c_msg msg[] = { + { + .addr = client->addr, + .flags = 0, + .len = 1, + .buf = ®_addr, + }, + + { + .addr = client->addr, + .flags = I2C_M_RD, + .len = len, + .buf = data, + }, + }; + + for (retry = 0; retry < BMI_MAX_RETRY_I2C_XFER; retry++) { + if (i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg)) > 0) + break; + else + mdelay(BMI_I2C_WRITE_DELAY_TIME); + } + + if (BMI_MAX_RETRY_I2C_XFER <= retry) { + dev_err(&client->dev, "I2C xfer error"); + return -EIO; + } + + return 0; +} + + +/* i2c write routine for */ +static s8 bmi_i2c_write(struct i2c_client *client, u8 reg_addr, + u8 *data, u8 len) +{ +#if !defined BMI_USE_BASIC_I2C_FUNC + s32 dummy; + +#ifndef BMI_SMBUS + u8 buffer[2]; +#endif + + if (NULL == client) + return -EPERM; + + while (0 != len--) { +#ifdef BMI_SMBUS + dummy = i2c_smbus_write_byte_data(client, reg_addr, *data); +#else + buffer[0] = reg_addr; + buffer[1] = *data; + dummy = i2c_master_send(client, (char *)buffer, 2); +#endif + reg_addr++; + data++; + if (dummy < 0) { + dev_err(&client->dev, "error writing i2c bus"); + return -EPERM; + } + + } + mdelay(2); + return 0; +#else + u8 buffer[2]; + int retry; + struct i2c_msg msg[] = { + { + .addr = client->addr, + .flags = 0, + .len = 2, + .buf = buffer, + }, + }; + + while (0 != len--) { + buffer[0] = reg_addr; + buffer[1] = *data; + for (retry = 0; retry < BMI_MAX_RETRY_I2C_XFER; retry++) { + if (i2c_transfer(client->adapter, msg, + ARRAY_SIZE(msg)) > 0) { + break; + } else { + mdelay(BMI_I2C_WRITE_DELAY_TIME); + } + } + if (BMI_MAX_RETRY_I2C_XFER <= retry) { + dev_err(&client->dev, "I2C xfer error"); + return -EIO; + } + reg_addr++; + data++; + } + + mdelay(2); + return 0; +#endif +} + + +static s8 bmi_i2c_read_wrapper(u8 dev_addr, u8 reg_addr, u8 *data, u8 len) +{ + int err = 0; + err = bmi_i2c_read(bmi_client, reg_addr, data, len); + return err; +} + +static s8 bmi_i2c_write_wrapper(u8 dev_addr, u8 reg_addr, u8 *data, u8 len) +{ + int err = 0; + err = bmi_i2c_write(bmi_client, reg_addr, data, len); + return err; +} + +s8 bmi_burst_read_wrapper(u8 dev_addr, u8 reg_addr, u8 *data, u16 len) +{ + int err = 0; + err = bmi_i2c_burst_read(bmi_client, reg_addr, data, len); + return err; +} +EXPORT_SYMBOL(bmi_burst_read_wrapper); +/*! + * @brief BMI probe function via i2c bus + * + * @param client the pointer of i2c client + * @param id the pointer of i2c device id + * + * @return zero success, non-zero failed + * @retval zero success + * @retval non-zero failed +*/ +static int bmi_i2c_probe(struct i2c_client *client, + const struct i2c_device_id *id) +{ + int err = 0; + struct bmi_client_data *client_data = NULL; + + dev_info(&client->dev, "BMI160 i2c function probe entrance"); + + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { + dev_err(&client->dev, "i2c_check_functionality error!"); + err = -EIO; + goto exit_err_clean; + } + + if (NULL == bmi_client) { + bmi_client = client; + } else { + dev_err(&client->dev, + "this driver does not support multiple clients"); + err = -EBUSY; + goto exit_err_clean; + } + + client_data = kzalloc(sizeof(struct bmi_client_data), + GFP_KERNEL); + if (NULL == client_data) { + dev_err(&client->dev, "no memory available"); + err = -ENOMEM; + goto exit_err_clean; + } + + client_data->i2c = client; + client_data->device.bus_read = bmi_i2c_read_wrapper; + client_data->device.bus_write = bmi_i2c_write_wrapper; + + return bmi_probe(client_data, &client->dev); + +exit_err_clean: + if (err) + bmi_client = NULL; + return err; +} + +static int bmi_i2c_suspend(struct i2c_client *client, pm_message_t mesg) +{ + int err = 0; + err = bmi_suspend(&client->dev); + return err; +} + +static int bmi_i2c_resume(struct i2c_client *client) +{ + int err = 0; + + /* post resume operation */ + err = bmi_resume(&client->dev); + + return err; +} + + +static int bmi_i2c_remove(struct i2c_client *client) +{ + int err = 0; + err = bmi_remove(&client->dev); + bmi_client = NULL; + + return err; +} + + + +static const struct i2c_device_id bmi_id[] = { + {SENSOR_NAME, 0}, + {} +}; + +MODULE_DEVICE_TABLE(i2c, bmi_id); + +static const struct of_device_id bmi160_of_match[] = { + { .compatible = "bosch-sensortec,bmi160", }, + { .compatible = "bmi160", }, + { .compatible = "bosch,bmi160", }, + { } +}; +MODULE_DEVICE_TABLE(of, bmi160_of_match); + +static struct i2c_driver bmi_i2c_driver = { + .driver = { + .owner = THIS_MODULE, + .name = SENSOR_NAME, + .of_match_table = bmi160_of_match, + }, + .class = I2C_CLASS_HWMON, + .id_table = bmi_id, + .probe = bmi_i2c_probe, + .remove = bmi_i2c_remove, + .suspend = bmi_i2c_suspend, + .resume = bmi_i2c_resume, +}; + +static int __init BMI_i2c_init(void) +{ + return i2c_add_driver(&bmi_i2c_driver); +} + +static void __exit BMI_i2c_exit(void) +{ + i2c_del_driver(&bmi_i2c_driver); +} + +MODULE_AUTHOR("Contact "); +MODULE_DESCRIPTION("driver for " SENSOR_NAME); +MODULE_LICENSE("GPL v2"); + +module_init(BMI_i2c_init); +module_exit(BMI_i2c_exit); + diff --git a/drivers/input/misc/bmm050.c b/drivers/input/misc/bmm050.c new file mode 100644 index 00000000000..264b9b7290c --- /dev/null +++ b/drivers/input/misc/bmm050.c @@ -0,0 +1,1220 @@ +/*! + * @section LICENSE + * (C) Copyright 2011~2014 Bosch Sensortec GmbH All Rights Reserved + * + * This software program is licensed subject to the GNU General + * Public License (GPL).Version 2,June 1991, + * available at http://www.fsf.org/copyleft/gpl.html + * + * @filename bmm050.c + * @date: 2013/11/25 + * @id "fcff9b1" + * @version: 1.2 + * + * @brief BMM050API + */ + +#include "bmm050.h" +static struct bmm050 *p_bmm050; + +BMM050_RETURN_FUNCTION_TYPE bmm050_init(struct bmm050 *bmm050) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char a_data_u8r[2] = { 0 }; + p_bmm050 = bmm050; + + p_bmm050->dev_addr = BMM050_I2C_ADDRESS; + + /* set device from suspend into sleep mode */ + bmm050_set_powermode(BMM050_ON); + + /* wait two millisecond for bmc to settle */ + p_bmm050->delay_msec(BMM050_DELAY_SETTLING_TIME); + + /*Read CHIP_ID and REv. info */ + comres = p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_CHIP_ID, a_data_u8r, 1); + p_bmm050->company_id = a_data_u8r[0]; + + /* Function to initialise trim values */ + bmm050_init_trim_registers(); + bmm050_set_presetmode(BMM050_PRESETMODE_REGULAR); + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_presetmode(unsigned char mode) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + switch (mode) { + case BMM050_PRESETMODE_LOWPOWER: + /* Set the data rate for Low Power mode */ + comres = bmm050_set_datarate(BMM050_LOWPOWER_DR); + /* Set the XY-repetitions number for Low Power mode */ + comres += bmm050_set_repetitions_XY(BMM050_LOWPOWER_REPXY); + /* Set the Z-repetitions number for Low Power mode */ + comres += bmm050_set_repetitions_Z(BMM050_LOWPOWER_REPZ); + break; + case BMM050_PRESETMODE_REGULAR: + /* Set the data rate for Regular mode */ + comres = bmm050_set_datarate(BMM050_REGULAR_DR); + /* Set the XY-repetitions number for Regular mode */ + comres += bmm050_set_repetitions_XY(BMM050_REGULAR_REPXY); + /* Set the Z-repetitions number for Regular mode */ + comres += bmm050_set_repetitions_Z(BMM050_REGULAR_REPZ); + break; + case BMM050_PRESETMODE_HIGHACCURACY: + /* Set the data rate for High Accuracy mode */ + comres = bmm050_set_datarate(BMM050_HIGHACCURACY_DR); + /* Set the XY-repetitions number for High Accuracy mode */ + comres += bmm050_set_repetitions_XY(BMM050_HIGHACCURACY_REPXY); + /* Set the Z-repetitions number for High Accuracy mode */ + comres += bmm050_set_repetitions_Z(BMM050_HIGHACCURACY_REPZ); + break; + case BMM050_PRESETMODE_ENHANCED: + /* Set the data rate for Enhanced Accuracy mode */ + comres = bmm050_set_datarate(BMM050_ENHANCED_DR); + /* Set the XY-repetitions number for High Enhanced mode */ + comres += bmm050_set_repetitions_XY(BMM050_ENHANCED_REPXY); + /* Set the Z-repetitions number for High Enhanced mode */ + comres += bmm050_set_repetitions_Z(BMM050_ENHANCED_REPZ); + break; + default: + comres = E_BMM050_OUT_OF_RANGE; + break; + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_functional_state( +unsigned char functional_state) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data1_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + switch (functional_state) { + case BMM050_NORMAL_MODE: + comres = bmm050_get_powermode(&v_data1_u8r); + if (v_data1_u8r == BMM050_OFF) { + comres += bmm050_set_powermode(BMM050_ON); + p_bmm050->delay_msec( + BMM050_DELAY_SUSPEND_SLEEP); + } + { + comres += p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_OPMODE__REG, + &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE( + v_data1_u8r, + BMM050_CNTL_OPMODE, + BMM050_NORMAL_MODE); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_OPMODE__REG, + &v_data1_u8r, 1); + } + break; + case BMM050_SUSPEND_MODE: + comres = bmm050_set_powermode(BMM050_OFF); + break; + case BMM050_FORCED_MODE: + comres = bmm050_get_powermode(&v_data1_u8r); + if (v_data1_u8r == BMM050_OFF) { + comres = bmm050_set_powermode(BMM050_ON); + p_bmm050->delay_msec( + BMM050_DELAY_SUSPEND_SLEEP); + } + comres += p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_OPMODE__REG, + &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE( + v_data1_u8r, + BMM050_CNTL_OPMODE, BMM050_ON); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_OPMODE__REG, + &v_data1_u8r, 1); + break; + case BMM050_SLEEP_MODE: + bmm050_get_powermode(&v_data1_u8r); + if (v_data1_u8r == BMM050_OFF) { + comres = bmm050_set_powermode(BMM050_ON); + p_bmm050->delay_msec( + BMM050_DELAY_SUSPEND_SLEEP); + } + comres += p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_OPMODE__REG, + &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE( + v_data1_u8r, + BMM050_CNTL_OPMODE, + BMM050_SLEEP_MODE); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_OPMODE__REG, + &v_data1_u8r, 1); + break; + default: + comres = E_BMM050_OUT_OF_RANGE; + break; + } + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_get_functional_state( +unsigned char *functional_state) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_OPMODE__REG, + &v_data_u8r, 1); + *functional_state = BMM050_GET_BITSLICE( + v_data_u8r, BMM050_CNTL_OPMODE); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_read_mdataXYZ(struct bmm050_mdata *mdata) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + + unsigned char a_data_u8r[8] = { 0 }; + + struct { + BMM050_S16 raw_datax; + BMM050_S16 raw_datay; + BMM050_S16 raw_dataz; + BMM050_U16 raw_datar; + } raw_dataxyz; + + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DATAX_LSB, a_data_u8r, 8); + + /* Reading data for X axis */ + a_data_u8r[0] = BMM050_GET_BITSLICE(a_data_u8r[0], + BMM050_DATAX_LSB_VALUEX); + raw_dataxyz.raw_datax = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[1])) << + SHIFT_LEFT_5_POSITION) | a_data_u8r[0]); + + /* Reading data for Y axis */ + a_data_u8r[2] = BMM050_GET_BITSLICE(a_data_u8r[2], + BMM050_DATAY_LSB_VALUEY); + raw_dataxyz.raw_datay = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[3])) << + SHIFT_LEFT_5_POSITION) | a_data_u8r[2]); + + /* Reading data for Z axis */ + a_data_u8r[4] = BMM050_GET_BITSLICE(a_data_u8r[4], + BMM050_DATAZ_LSB_VALUEZ); + raw_dataxyz.raw_dataz = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[5])) << + SHIFT_LEFT_7_POSITION) | a_data_u8r[4]); + + /* Reading data for Resistance*/ + a_data_u8r[6] = BMM050_GET_BITSLICE(a_data_u8r[6], + BMM050_R_LSB_VALUE); + raw_dataxyz.raw_datar = (BMM050_U16)((((BMM050_U16) + a_data_u8r[7]) << + SHIFT_LEFT_6_POSITION) | a_data_u8r[6]); + + /* Compensation for X axis */ + mdata->datax = bmm050_compensate_X(raw_dataxyz.raw_datax, + raw_dataxyz.raw_datar); + + /* Compensation for Y axis */ + mdata->datay = bmm050_compensate_Y(raw_dataxyz.raw_datay, + raw_dataxyz.raw_datar); + + /* Compensation for Z axis */ + mdata->dataz = bmm050_compensate_Z(raw_dataxyz.raw_dataz, + raw_dataxyz.raw_datar); + + /* Output raw resistance value */ + mdata->resistance = raw_dataxyz.raw_datar; + } + return comres; +} + +/* In this function X and Y axis is remapped, + * this API is only applicable for BMX055*/ +BMM050_RETURN_FUNCTION_TYPE bmm050_read_bmx055_remapped_mdataXYZ( +struct bmm050_remapped_mdata *mdata) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + + unsigned char a_data_u8r[8] = { 0 }; + + struct { + BMM050_S16 raw_datax; + BMM050_S16 raw_datay; + BMM050_S16 raw_dataz; + BMM050_U16 raw_datar; + } raw_dataxyz; + + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_BMX055_REMAPPED_DATAY_LSB, a_data_u8r, 8); + + /* Reading data for Y axis */ + a_data_u8r[0] = BMM050_GET_BITSLICE(a_data_u8r[0], + BMM050_BMX055_REMAPPED_DATAY_LSB_VALUEY); + raw_dataxyz.raw_datay = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[1])) << + SHIFT_LEFT_5_POSITION) | a_data_u8r[0]); + + + /* Reading data for X axis */ + a_data_u8r[2] = BMM050_GET_BITSLICE(a_data_u8r[2], + BMM050_BMX055_REMAPPED_DATAX_LSB_VALUEX); + raw_dataxyz.raw_datax = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[3])) << + SHIFT_LEFT_5_POSITION) | a_data_u8r[2]); + raw_dataxyz.raw_datax = -raw_dataxyz.raw_datax; + + /* Reading data for Z axis */ + a_data_u8r[4] = BMM050_GET_BITSLICE(a_data_u8r[4], + BMM050_DATAZ_LSB_VALUEZ); + raw_dataxyz.raw_dataz = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[5])) << + SHIFT_LEFT_7_POSITION) | a_data_u8r[4]); + + /* Reading data for Resistance*/ + a_data_u8r[6] = BMM050_GET_BITSLICE(a_data_u8r[6], + BMM050_R_LSB_VALUE); + raw_dataxyz.raw_datar = (BMM050_U16)((((BMM050_U16) + a_data_u8r[7]) << + SHIFT_LEFT_6_POSITION) | a_data_u8r[6]); + + /* Compensation for X axis */ + mdata->datax = bmm050_compensate_X(raw_dataxyz.raw_datax, + raw_dataxyz.raw_datar); + + /* Compensation for Y axis */ + mdata->datay = bmm050_compensate_Y(raw_dataxyz.raw_datay, + raw_dataxyz.raw_datar); + + /* Compensation for Z axis */ + mdata->dataz = bmm050_compensate_Z(raw_dataxyz.raw_dataz, + raw_dataxyz.raw_datar); + + /* Output raw resistance value */ + mdata->resistance = raw_dataxyz.raw_datar; + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_read_mdataXYZ_s32( +struct bmm050_mdata_s32 *mdata) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + + unsigned char a_data_u8r[8] = { 0 }; + + struct { + BMM050_S16 raw_datax; + BMM050_S16 raw_datay; + BMM050_S16 raw_dataz; + BMM050_U16 raw_datar; + } raw_dataxyz; + + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DATAX_LSB, a_data_u8r, 8); + + /* Reading data for X axis */ + a_data_u8r[0] = BMM050_GET_BITSLICE(a_data_u8r[0], + BMM050_DATAX_LSB_VALUEX); + raw_dataxyz.raw_datax = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[1])) << + SHIFT_LEFT_5_POSITION) | a_data_u8r[0]); + + /* Reading data for Y axis */ + a_data_u8r[2] = BMM050_GET_BITSLICE(a_data_u8r[2], + BMM050_DATAY_LSB_VALUEY); + raw_dataxyz.raw_datay = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[3])) << + SHIFT_LEFT_5_POSITION) | a_data_u8r[2]); + + /* Reading data for Z axis */ + a_data_u8r[4] = BMM050_GET_BITSLICE(a_data_u8r[4], + BMM050_DATAZ_LSB_VALUEZ); + raw_dataxyz.raw_dataz = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[5])) << + SHIFT_LEFT_7_POSITION) | a_data_u8r[4]); + + /* Reading data for Resistance*/ + if (!comres) + mdata->drdy = BMM050_GET_BITSLICE(a_data_u8r[6], + BMM050_DATA_RDYSTAT); + + a_data_u8r[6] = BMM050_GET_BITSLICE(a_data_u8r[6], + BMM050_R_LSB_VALUE); + raw_dataxyz.raw_datar = (BMM050_U16)((((BMM050_U16) + a_data_u8r[7]) << + SHIFT_LEFT_6_POSITION) | a_data_u8r[6]); + + /* Compensation for X axis */ + mdata->datax = bmm050_compensate_X_s32(raw_dataxyz.raw_datax, + raw_dataxyz.raw_datar); + + /* Compensation for Y axis */ + mdata->datay = bmm050_compensate_Y_s32(raw_dataxyz.raw_datay, + raw_dataxyz.raw_datar); + + /* Compensation for Z axis */ + mdata->dataz = bmm050_compensate_Z_s32(raw_dataxyz.raw_dataz, + raw_dataxyz.raw_datar); + + /* Output raw resistance value */ + mdata->resistance = raw_dataxyz.raw_datar; + } + return comres; +} + +/* In this function X and Y axis is remapped, + * this API is only applicable for BMX055*/ +BMM050_RETURN_FUNCTION_TYPE bmm050_read_bmx055_remapped_mdataXYZ_s32( +struct bmm050_remapped_mdata_s32 *mdata) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + + unsigned char a_data_u8r[8] = { 0 }; + + struct { + BMM050_S16 raw_datax; + BMM050_S16 raw_datay; + BMM050_S16 raw_dataz; + BMM050_U16 raw_datar; + } raw_dataxyz; + + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_BMX055_REMAPPED_DATAY_LSB, a_data_u8r, 8); + + /* Reading data for Y axis */ + a_data_u8r[0] = BMM050_GET_BITSLICE(a_data_u8r[0], + BMM050_BMX055_REMAPPED_DATAY_LSB_VALUEY); + raw_dataxyz.raw_datay = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[1])) << + SHIFT_LEFT_5_POSITION) | a_data_u8r[0]); + + + /* Reading data for X axis */ + a_data_u8r[2] = BMM050_GET_BITSLICE(a_data_u8r[2], + BMM050_BMX055_REMAPPED_DATAX_LSB_VALUEX); + raw_dataxyz.raw_datax = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[3])) << + SHIFT_LEFT_5_POSITION) | a_data_u8r[2]); + raw_dataxyz.raw_datax = -raw_dataxyz.raw_datax; + + /* Reading data for Z axis */ + a_data_u8r[4] = BMM050_GET_BITSLICE(a_data_u8r[4], + BMM050_DATAZ_LSB_VALUEZ); + raw_dataxyz.raw_dataz = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[5])) << + SHIFT_LEFT_7_POSITION) | a_data_u8r[4]); + + /* Reading data for Resistance*/ + a_data_u8r[6] = BMM050_GET_BITSLICE(a_data_u8r[6], + BMM050_R_LSB_VALUE); + raw_dataxyz.raw_datar = (BMM050_U16)((((BMM050_U16) + a_data_u8r[7]) << + SHIFT_LEFT_6_POSITION) | a_data_u8r[6]); + + /* Compensation for X axis */ + mdata->datax = bmm050_compensate_X_s32(raw_dataxyz.raw_datax, + raw_dataxyz.raw_datar); + + /* Compensation for Y axis */ + mdata->datay = bmm050_compensate_Y_s32(raw_dataxyz.raw_datay, + raw_dataxyz.raw_datar); + + /* Compensation for Z axis */ + mdata->dataz = bmm050_compensate_Z_s32(raw_dataxyz.raw_dataz, + raw_dataxyz.raw_datar); + + /* Output raw resistance value */ + mdata->resistance = raw_dataxyz.raw_datar; + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_read_register(unsigned char addr, + unsigned char *data, unsigned char len) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + addr, data, len); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_write_register(unsigned char addr, + unsigned char *data, unsigned char len) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_WRITE_FUNC(p_bmm050->dev_addr, + addr, data, len); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_selftest(unsigned char selftest) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data1_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, BMM050_CNTL_S_TEST__REG, + &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE( + v_data1_u8r, BMM050_CNTL_S_TEST, selftest); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, BMM050_CNTL_S_TEST__REG, + &v_data1_u8r, 1); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_get_self_test_XYZ( +unsigned char *self_testxyz) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char a_data_u8r[5] = { 0 }; + unsigned char v_result_u8r = 0x00; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, BMM050_DATAX_LSB_TESTX__REG, + a_data_u8r, 5); + + v_result_u8r = BMM050_GET_BITSLICE(a_data_u8r[4], + BMM050_DATAZ_LSB_TESTZ); + + v_result_u8r = (v_result_u8r << 1); + v_result_u8r = (v_result_u8r | BMM050_GET_BITSLICE( + a_data_u8r[2], BMM050_DATAY_LSB_TESTY)); + + v_result_u8r = (v_result_u8r << 1); + v_result_u8r = (v_result_u8r | BMM050_GET_BITSLICE( + a_data_u8r[0], BMM050_DATAX_LSB_TESTX)); + + *self_testxyz = v_result_u8r; + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_spi3(unsigned char value) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data1_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_POWER_CNTL_SPI3_EN__REG, &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE(v_data1_u8r, + BMM050_POWER_CNTL_SPI3_EN, value); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC(p_bmm050->dev_addr, + BMM050_POWER_CNTL_SPI3_EN__REG, &v_data1_u8r, 1); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_datarate(unsigned char data_rate) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data1_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_DR__REG, + &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE(v_data1_u8r, + BMM050_CNTL_DR, data_rate); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_DR__REG, + &v_data1_u8r, 1); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_get_datarate(unsigned char *data_rate) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_DR__REG, + &v_data_u8r, 1); + *data_rate = BMM050_GET_BITSLICE(v_data_u8r, + BMM050_CNTL_DR); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_perform_advanced_selftest( +BMM050_S16 *diff_z) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + BMM050_S16 result_positive = BMM050_Zero_U8X; + BMM050_S16 result_negative = BMM050_Zero_U8X; + struct bmm050_mdata mdata = {0, 0, 0, 0}; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + /* set sleep mode to prepare for forced measurement. + * If sensor is off, this will turn it on + * and respect needed delays. */ + comres = bmm050_set_functional_state(BMM050_SLEEP_MODE); + + /* set normal accuracy mode */ + comres += bmm050_set_repetitions_Z(BMM050_LOWPOWER_REPZ); + /* 14 repetitions Z in normal accuracy mode */ + + /* disable X, Y channel */ + comres += bmm050_set_control_measurement_x( + BMM050_CHANNEL_DISABLE); + comres += bmm050_set_control_measurement_y( + BMM050_CHANNEL_DISABLE); + + /* enable positive current and force a + * measurement with positive field */ + comres += bmm050_set_adv_selftest( + BMM050_ADVANCED_SELFTEST_POSITIVE); + comres += bmm050_set_functional_state(BMM050_FORCED_MODE); + /* wait for measurement to complete */ + p_bmm050->delay_msec(4); + + /* read result from positive field measurement */ + comres += bmm050_read_mdataXYZ(&mdata); + result_positive = mdata.dataz; + + /* enable negative current and force a + * measurement with negative field */ + comres += bmm050_set_adv_selftest( + BMM050_ADVANCED_SELFTEST_NEGATIVE); + comres += bmm050_set_functional_state(BMM050_FORCED_MODE); + p_bmm050->delay_msec(4); /* wait for measurement to complete */ + + /* read result from negative field measurement */ + comres += bmm050_read_mdataXYZ(&mdata); + result_negative = mdata.dataz; + + /* turn off self test current */ + comres += bmm050_set_adv_selftest( + BMM050_ADVANCED_SELFTEST_OFF); + + /* enable X, Y channel */ + comres += bmm050_set_control_measurement_x( + BMM050_CHANNEL_ENABLE); + comres += bmm050_set_control_measurement_y( + BMM050_CHANNEL_ENABLE); + + /* write out difference in positive and negative field. + * This should be ~ 200 mT = 3200 LSB */ + *diff_z = (result_positive - result_negative); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_init_trim_registers(void) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char a_data_u8r[2] = { 0 }; + comres = p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_X1, (unsigned char *)&p_bmm050->dig_x1, 1); + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_Y1, (unsigned char *)&p_bmm050->dig_y1, 1); + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_X2, (unsigned char *)&p_bmm050->dig_x2, 1); + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_Y2, (unsigned char *)&p_bmm050->dig_y2, 1); + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_XY1, (unsigned char *)&p_bmm050->dig_xy1, 1); + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_XY2, (unsigned char *)&p_bmm050->dig_xy2, 1); + + /* shorts can not be recast into (unsigned char*) + * due to possible mix up between trim data + * arrangement and memory arrangement */ + + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_Z1_LSB, a_data_u8r, 2); + p_bmm050->dig_z1 = (BMM050_U16)((((BMM050_U16)((unsigned char) + a_data_u8r[1])) << + SHIFT_LEFT_8_POSITION) | a_data_u8r[0]); + + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_Z2_LSB, a_data_u8r, 2); + p_bmm050->dig_z2 = (BMM050_S16)((((BMM050_S16)( + (signed char)a_data_u8r[1])) << + SHIFT_LEFT_8_POSITION) | a_data_u8r[0]); + + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_Z3_LSB, a_data_u8r, 2); + p_bmm050->dig_z3 = (BMM050_S16)((((BMM050_S16)( + (signed char)a_data_u8r[1])) << + SHIFT_LEFT_8_POSITION) | a_data_u8r[0]); + + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_Z4_LSB, a_data_u8r, 2); + p_bmm050->dig_z4 = (BMM050_S16)((((BMM050_S16)( + (signed char)a_data_u8r[1])) << + SHIFT_LEFT_8_POSITION) | a_data_u8r[0]); + + comres += p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DIG_XYZ1_LSB, a_data_u8r, 2); + a_data_u8r[1] = BMM050_GET_BITSLICE(a_data_u8r[1], BMM050_DIG_XYZ1_MSB); + p_bmm050->dig_xyz1 = (BMM050_U16)((((BMM050_U16) + ((unsigned char)a_data_u8r[1])) << + SHIFT_LEFT_8_POSITION) | a_data_u8r[0]); + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_adv_selftest( +unsigned char adv_selftest) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data1_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + switch (adv_selftest) { + case BMM050_ADVANCED_SELFTEST_OFF: + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_ADV_ST__REG, + &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE( + v_data1_u8r, + BMM050_CNTL_ADV_ST, + BMM050_ADVANCED_SELFTEST_OFF); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_ADV_ST__REG, + &v_data1_u8r, 1); + break; + case BMM050_ADVANCED_SELFTEST_POSITIVE: + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_ADV_ST__REG, + &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE( + v_data1_u8r, + BMM050_CNTL_ADV_ST, + BMM050_ADVANCED_SELFTEST_POSITIVE); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_ADV_ST__REG, + &v_data1_u8r, 1); + break; + case BMM050_ADVANCED_SELFTEST_NEGATIVE: + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_ADV_ST__REG, + &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE( + v_data1_u8r, + BMM050_CNTL_ADV_ST, + BMM050_ADVANCED_SELFTEST_NEGATIVE); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_CNTL_ADV_ST__REG, + &v_data1_u8r, 1); + break; + default: + break; + } + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_get_adv_selftest( +unsigned char *adv_selftest) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_CNTL_ADV_ST__REG, &v_data_u8r, 1); + *adv_selftest = BMM050_GET_BITSLICE(v_data_u8r, + BMM050_CNTL_ADV_ST); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_get_presetmode( +unsigned char *mode) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char data_rate = BMM050_Zero_U8X; + unsigned char repetitionsxy = BMM050_Zero_U8X; + unsigned char repetitionsz = BMM050_Zero_U8X; + + /* Get the current data rate */ + comres = bmm050_get_datarate(&data_rate); + /* Get the preset number of XY Repetitions */ + comres += bmm050_get_repetitions_XY(&repetitionsxy); + /* Get the preset number of Z Repetitions */ + comres += bmm050_get_repetitions_Z(&repetitionsz); + if ((data_rate == BMM050_LOWPOWER_DR) && ( + repetitionsxy == BMM050_LOWPOWER_REPXY) && ( + repetitionsz == BMM050_LOWPOWER_REPZ)) { + *mode = BMM050_PRESETMODE_LOWPOWER; + } else { + if ((data_rate == BMM050_REGULAR_DR) && ( + repetitionsxy == BMM050_REGULAR_REPXY) && ( + repetitionsz == BMM050_REGULAR_REPZ)) { + *mode = BMM050_PRESETMODE_REGULAR; + } else { + if ((data_rate == BMM050_HIGHACCURACY_DR) && ( + repetitionsxy == BMM050_HIGHACCURACY_REPXY) && ( + repetitionsz == BMM050_HIGHACCURACY_REPZ)) { + *mode = BMM050_PRESETMODE_HIGHACCURACY; + } else { + if ((data_rate == BMM050_ENHANCED_DR) && ( + repetitionsxy == BMM050_ENHANCED_REPXY) && ( + repetitionsz == BMM050_ENHANCED_REPZ)) { + *mode = BMM050_PRESETMODE_ENHANCED; + } else { + *mode = E_BMM050_UNDEFINED_MODE; + } + } + } + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_get_powermode(unsigned char *mode) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_POWER_CNTL_PCB__REG, + &v_data_u8r, 1); + *mode = BMM050_GET_BITSLICE(v_data_u8r, + BMM050_POWER_CNTL_PCB); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_powermode(unsigned char mode) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_POWER_CNTL_PCB__REG, + &v_data_u8r, 1); + v_data_u8r = BMM050_SET_BITSLICE(v_data_u8r, + BMM050_POWER_CNTL_PCB, mode); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_POWER_CNTL_PCB__REG, + &v_data_u8r, 1); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_get_repetitions_XY( +unsigned char *no_repetitions_xy) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_NO_REPETITIONS_XY, + &v_data_u8r, 1); + *no_repetitions_xy = v_data_u8r; + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_repetitions_XY( +unsigned char no_repetitions_xy) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + v_data_u8r = no_repetitions_xy; + comres = p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_NO_REPETITIONS_XY, + &v_data_u8r, 1); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_get_repetitions_Z( +unsigned char *no_repetitions_z) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_NO_REPETITIONS_Z, + &v_data_u8r, 1); + *no_repetitions_z = v_data_u8r; + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_repetitions_Z( +unsigned char no_repetitions_z) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + v_data_u8r = no_repetitions_z; + comres = p_bmm050->BMM050_BUS_WRITE_FUNC(p_bmm050->dev_addr, + BMM050_NO_REPETITIONS_Z, &v_data_u8r, 1); + } + return comres; +} + +BMM050_S16 bmm050_compensate_X(BMM050_S16 mdata_x, BMM050_U16 data_r) +{ + BMM050_S16 inter_retval = BMM050_Zero_U8X; + if (mdata_x != BMM050_FLIP_OVERFLOW_ADCVAL /* no overflow */ + ) { + inter_retval = ((BMM050_S16)(((BMM050_U16) + ((((BMM050_S32)p_bmm050->dig_xyz1) << 14)/ + (data_r != 0 ? data_r : p_bmm050->dig_xyz1))) - + ((BMM050_U16)0x4000))); + inter_retval = ((BMM050_S16)((((BMM050_S32)mdata_x) * + ((((((((BMM050_S32)p_bmm050->dig_xy2) * + ((((BMM050_S32)inter_retval) * + ((BMM050_S32)inter_retval)) >> 7)) + + (((BMM050_S32)inter_retval) * + ((BMM050_S32)(((BMM050_S16)p_bmm050->dig_xy1) + << 7)))) >> 9) + + ((BMM050_S32)0x100000)) * + ((BMM050_S32)(((BMM050_S16)p_bmm050->dig_x2) + + ((BMM050_S16)0xA0)))) >> 12)) >> 13)) + + (((BMM050_S16)p_bmm050->dig_x1) << 3); + } else { + /* overflow */ + inter_retval = BMM050_OVERFLOW_OUTPUT; + } + return inter_retval; +} + +BMM050_S32 bmm050_compensate_X_s32 (BMM050_S16 mdata_x, BMM050_U16 data_r) +{ + BMM050_S32 retval = BMM050_Zero_U8X; + + retval = bmm050_compensate_X(mdata_x, data_r); + if (retval == (BMM050_S32)BMM050_OVERFLOW_OUTPUT) + retval = BMM050_OVERFLOW_OUTPUT_S32; + return retval; +} + +BMM050_S16 bmm050_compensate_Y(BMM050_S16 mdata_y, BMM050_U16 data_r) +{ + BMM050_S16 inter_retval = BMM050_Zero_U8X; + if (mdata_y != BMM050_FLIP_OVERFLOW_ADCVAL /* no overflow */ + ) { + inter_retval = ((BMM050_S16)(((BMM050_U16)((( + (BMM050_S32)p_bmm050->dig_xyz1) << 14)/ + (data_r != 0 ? + data_r : p_bmm050->dig_xyz1))) - + ((BMM050_U16)0x4000))); + inter_retval = ((BMM050_S16)((((BMM050_S32)mdata_y) * + ((((((((BMM050_S32) + p_bmm050->dig_xy2) * + ((((BMM050_S32) inter_retval) * + ((BMM050_S32)inter_retval)) >> 7)) + + (((BMM050_S32)inter_retval) * + ((BMM050_S32)(((BMM050_S16) + p_bmm050->dig_xy1) << 7)))) >> 9) + + ((BMM050_S32)0x100000)) * + ((BMM050_S32)(((BMM050_S16)p_bmm050->dig_y2) + + ((BMM050_S16)0xA0)))) + >> 12)) >> 13)) + + (((BMM050_S16)p_bmm050->dig_y1) << 3); + } else { + /* overflow */ + inter_retval = BMM050_OVERFLOW_OUTPUT; + } + return inter_retval; +} + +BMM050_S32 bmm050_compensate_Y_s32 (BMM050_S16 mdata_y, BMM050_U16 data_r) +{ + BMM050_S32 retval = BMM050_Zero_U8X; + + retval = bmm050_compensate_Y(mdata_y, data_r); + if (retval == BMM050_OVERFLOW_OUTPUT) + retval = BMM050_OVERFLOW_OUTPUT_S32; + return retval; +} + +BMM050_S16 bmm050_compensate_Z(BMM050_S16 mdata_z, BMM050_U16 data_r) +{ + BMM050_S32 retval = BMM050_Zero_U8X; + if ((mdata_z != BMM050_HALL_OVERFLOW_ADCVAL) /* no overflow */ + ) { + retval = (((((BMM050_S32)(mdata_z - p_bmm050->dig_z4)) << 15) - + ((((BMM050_S32)p_bmm050->dig_z3) * + ((BMM050_S32)(((BMM050_S16)data_r) - + ((BMM050_S16) + p_bmm050->dig_xyz1))))>>2))/ + (p_bmm050->dig_z2 + + ((BMM050_S16)(((((BMM050_S32) + p_bmm050->dig_z1) * + ((((BMM050_S16)data_r) << 1)))+ + (1<<15))>>16)))); + /* saturate result to +/- 2 mT */ + if (retval > BMM050_POSITIVE_SATURATION_Z) { + retval = BMM050_POSITIVE_SATURATION_Z; + } else { + if (retval < BMM050_NEGATIVE_SATURATION_Z) + retval = BMM050_NEGATIVE_SATURATION_Z; + } + } else { + /* overflow */ + retval = BMM050_OVERFLOW_OUTPUT; + } + return (BMM050_S16)retval; +} + +BMM050_S32 bmm050_compensate_Z_s32(BMM050_S16 mdata_z, BMM050_U16 data_r) +{ + BMM050_S32 retval = BMM050_Zero_U8X; + if (mdata_z != BMM050_HALL_OVERFLOW_ADCVAL) { + retval = (((((BMM050_S32)(mdata_z - p_bmm050->dig_z4)) << 15) - + ((((BMM050_S32)p_bmm050->dig_z3) * + ((BMM050_S32)(((BMM050_S16)data_r) - + ((BMM050_S16)p_bmm050->dig_xyz1))))>>2))/ + (p_bmm050->dig_z2 + + ((BMM050_S16)(((((BMM050_S32)p_bmm050->dig_z1) * + ((((BMM050_S16)data_r) << 1)))+(1<<15))>>16)))); + } else { + retval = BMM050_OVERFLOW_OUTPUT_S32; + } + return retval; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_control_measurement_x( +unsigned char enable_disable) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data1_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_SENS_CNTL_CHANNELX__REG, + &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE(v_data1_u8r, + BMM050_SENS_CNTL_CHANNELX, + enable_disable); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_SENS_CNTL_CHANNELX__REG, + &v_data1_u8r, 1); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_set_control_measurement_y( +unsigned char enable_disable) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data1_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_SENS_CNTL_CHANNELY__REG, + &v_data1_u8r, 1); + v_data1_u8r = BMM050_SET_BITSLICE( + v_data1_u8r, + BMM050_SENS_CNTL_CHANNELY, + enable_disable); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_SENS_CNTL_CHANNELY__REG, + &v_data1_u8r, 1); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_soft_reset(void) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char v_data_u8r = BMM050_Zero_U8X; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + v_data_u8r = BMM050_ON; + + comres = p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_POWER_CNTL_SRST7__REG, + &v_data_u8r, 1); + v_data_u8r = BMM050_SET_BITSLICE(v_data_u8r, + BMM050_POWER_CNTL_SRST7, + BMM050_SOFT_RESET7_ON); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_POWER_CNTL_SRST7__REG, &v_data_u8r, 1); + + comres += p_bmm050->BMM050_BUS_READ_FUNC( + p_bmm050->dev_addr, + BMM050_POWER_CNTL_SRST1__REG, + &v_data_u8r, 1); + v_data_u8r = BMM050_SET_BITSLICE(v_data_u8r, + BMM050_POWER_CNTL_SRST1, + BMM050_SOFT_RESET1_ON); + comres += p_bmm050->BMM050_BUS_WRITE_FUNC( + p_bmm050->dev_addr, + BMM050_POWER_CNTL_SRST1__REG, + &v_data_u8r, 1); + + p_bmm050->delay_msec(BMM050_DELAY_SOFTRESET); + } + return comres; +} + +BMM050_RETURN_FUNCTION_TYPE bmm050_get_raw_xyz(struct bmm050_mdata *mdata) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char a_data_u8r[8] = { 0 }; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_DATAX_LSB, a_data_u8r, 8); + + a_data_u8r[0] = BMM050_GET_BITSLICE(a_data_u8r[0], + BMM050_DATAX_LSB_VALUEX); + mdata->datax = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[1])) + << SHIFT_LEFT_5_POSITION) + | a_data_u8r[0]); + + a_data_u8r[2] = BMM050_GET_BITSLICE(a_data_u8r[2], + BMM050_DATAY_LSB_VALUEY); + mdata->datay = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[3])) + << SHIFT_LEFT_5_POSITION) + | a_data_u8r[2]); + + a_data_u8r[4] = BMM050_GET_BITSLICE(a_data_u8r[4], + BMM050_DATAZ_LSB_VALUEZ); + mdata->dataz = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[5])) + << SHIFT_LEFT_7_POSITION) + | a_data_u8r[4]); + + a_data_u8r[6] = BMM050_GET_BITSLICE(a_data_u8r[6], + BMM050_R_LSB_VALUE); + mdata->resistance = (BMM050_U16)((((BMM050_U16) + a_data_u8r[7]) << + SHIFT_LEFT_6_POSITION) | a_data_u8r[6]); + } + return comres; +} + +/* In this function X and Y axis is remapped, + * this API is only applicable for BMX055*/ +BMM050_RETURN_FUNCTION_TYPE bmm050_get_bmx055_remapped_raw_xyz( +struct bmm050_remapped_mdata *mdata) +{ + BMM050_RETURN_FUNCTION_TYPE comres = BMM050_Zero_U8X; + unsigned char a_data_u8r[8] = { 0 }; + if (p_bmm050 == BMM050_NULL) { + return E_BMM050_NULL_PTR; + } else { + comres = p_bmm050->BMM050_BUS_READ_FUNC(p_bmm050->dev_addr, + BMM050_BMX055_REMAPPED_DATAY_LSB, a_data_u8r, 8); + + a_data_u8r[0] = BMM050_GET_BITSLICE(a_data_u8r[0], + BMM050_BMX055_REMAPPED_DATAY_LSB_VALUEY); + mdata->datay = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[1])) + << SHIFT_LEFT_5_POSITION) + | a_data_u8r[0]); + + + a_data_u8r[2] = BMM050_GET_BITSLICE(a_data_u8r[2], + BMM050_BMX055_REMAPPED_DATAX_LSB_VALUEX); + mdata->datax = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[3])) + << SHIFT_LEFT_5_POSITION) + | a_data_u8r[2]); + mdata->datax = -mdata->datax; + + a_data_u8r[4] = BMM050_GET_BITSLICE(a_data_u8r[4], + BMM050_DATAZ_LSB_VALUEZ); + mdata->dataz = (BMM050_S16)((((BMM050_S16) + ((signed char)a_data_u8r[5])) + << SHIFT_LEFT_7_POSITION) + | a_data_u8r[4]); + + a_data_u8r[6] = BMM050_GET_BITSLICE(a_data_u8r[6], + BMM050_R_LSB_VALUE); + mdata->resistance = (BMM050_U16)((((BMM050_U16) + a_data_u8r[7]) << + SHIFT_LEFT_6_POSITION) | a_data_u8r[6]); + } + return comres; +} diff --git a/drivers/input/misc/bmm050.h b/drivers/input/misc/bmm050.h new file mode 100644 index 00000000000..21b885ac34a --- /dev/null +++ b/drivers/input/misc/bmm050.h @@ -0,0 +1,623 @@ +/*! + * @section LICENSE + * (C) Copyright 2011~2014 Bosch Sensortec GmbH All Rights Reserved + * + * This software program is licensed subject to the GNU General + * Public License (GPL).Version 2,June 1991, + * available at http://www.fsf.org/copyleft/gpl.html + * + * @filename bmm050.h + * @date: 2013/11/25 + * @id "7bf4b97" + * @version: 1.2 + * + * @brief Header of BMM050API + */ + +#ifndef __BMM050_H__ +#define __BMM050_H__ + +#define BMM050_U16 unsigned short +#define BMM050_S16 signed short +#define BMM050_S32 signed int + + +#define BMM050_BUS_WR_RETURN_TYPE char +#define BMM050_BUS_WR_PARAM_TYPES\ + unsigned char, unsigned char, unsigned char *, unsigned char +#define BMM050_BUS_WR_PARAM_ORDER\ + (device_addr, register_addr, register_data, wr_len) +#define BMM050_BUS_WRITE_FUNC(\ + device_addr, register_addr, register_data, wr_len)\ + bus_write(device_addr, register_addr, register_data, wr_len) + +#define BMM050_BUS_RD_RETURN_TYPE char + +#define BMM050_BUS_RD_PARAM_TYPES\ + unsigned char, unsigned char, unsigned char *, unsigned char + +#define BMM050_BUS_RD_PARAM_ORDER (device_addr, register_addr, register_data) + +#define BMM050_BUS_READ_FUNC(device_addr, register_addr, register_data, rd_len)\ + bus_read(device_addr, register_addr, register_data, rd_len) + + +#define BMM050_DELAY_RETURN_TYPE void + +#define BMM050_DELAY_PARAM_TYPES unsigned int + +#define BMM050_DELAY_FUNC(delay_in_msec)\ + delay_func(delay_in_msec) + +#define BMM050_DELAY_POWEROFF_SUSPEND 1 +#define BMM050_DELAY_SUSPEND_SLEEP 2 +#define BMM050_DELAY_SLEEP_ACTIVE 1 +#define BMM050_DELAY_ACTIVE_SLEEP 1 +#define BMM050_DELAY_SLEEP_SUSPEND 1 +#define BMM050_DELAY_ACTIVE_SUSPEND 1 +#define BMM050_DELAY_SLEEP_POWEROFF 1 +#define BMM050_DELAY_ACTIVE_POWEROFF 1 +#define BMM050_DELAY_SETTLING_TIME 2 + + +#define BMM050_RETURN_FUNCTION_TYPE int +#define BMM050_I2C_ADDRESS 0x10 + +/*General Info datas*/ +#define BMM050_SOFT_RESET7_ON 1 +#define BMM050_SOFT_RESET1_ON 1 +#define BMM050_SOFT_RESET7_OFF 0 +#define BMM050_SOFT_RESET1_OFF 0 +#define BMM050_DELAY_SOFTRESET 1 + +/* Fixed Data Registers */ +#define BMM050_CHIP_ID 0x40 + +/* Data Registers*/ +#define BMM050_DATAX_LSB 0x42 +#define BMM050_DATAX_MSB 0x43 +#define BMM050_DATAY_LSB 0x44 +#define BMM050_DATAY_MSB 0x45 +#define BMM050_DATAZ_LSB 0x46 +#define BMM050_DATAZ_MSB 0x47 +#define BMM050_R_LSB 0x48 +#define BMM050_R_MSB 0x49 + +/* Data Registers for remapped axis(XandY) + * this only applicable for BMX055 */ +#define BMM050_BMX055_REMAPPED_DATAY_LSB 0x42 +#define BMM050_BMX055_REMAPPED_DATAY_MSB 0x43 +#define BMM050_BMX055_REMAPPED_DATAX_LSB 0x44 +#define BMM050_BMX055_REMAPPED_DATAX_MSB 0x45 + +/* Status Registers */ +#define BMM050_INT_STAT 0x4A + +/* Control Registers */ +#define BMM050_POWER_CNTL 0x4B +#define BMM050_CONTROL 0x4C +#define BMM050_INT_CNTL 0x4D +#define BMM050_SENS_CNTL 0x4E +#define BMM050_LOW_THRES 0x4F +#define BMM050_HIGH_THRES 0x50 +#define BMM050_NO_REPETITIONS_XY 0x51 +#define BMM050_NO_REPETITIONS_Z 0x52 + +/* Trim Extended Registers */ +#define BMM050_DIG_X1 0x5D +#define BMM050_DIG_Y1 0x5E +#define BMM050_DIG_Z4_LSB 0x62 +#define BMM050_DIG_Z4_MSB 0x63 +#define BMM050_DIG_X2 0x64 +#define BMM050_DIG_Y2 0x65 +#define BMM050_DIG_Z2_LSB 0x68 +#define BMM050_DIG_Z2_MSB 0x69 +#define BMM050_DIG_Z1_LSB 0x6A +#define BMM050_DIG_Z1_MSB 0x6B +#define BMM050_DIG_XYZ1_LSB 0x6C +#define BMM050_DIG_XYZ1_MSB 0x6D +#define BMM050_DIG_Z3_LSB 0x6E +#define BMM050_DIG_Z3_MSB 0x6F +#define BMM050_DIG_XY2 0x70 +#define BMM050_DIG_XY1 0x71 + + +/* Data X LSB Register */ +#define BMM050_DATAX_LSB_VALUEX__POS 3 +#define BMM050_DATAX_LSB_VALUEX__LEN 5 +#define BMM050_DATAX_LSB_VALUEX__MSK 0xF8 +#define BMM050_DATAX_LSB_VALUEX__REG BMM050_DATAX_LSB + +/* Data X SelfTest Register */ +#define BMM050_DATAX_LSB_TESTX__POS 0 +#define BMM050_DATAX_LSB_TESTX__LEN 1 +#define BMM050_DATAX_LSB_TESTX__MSK 0x01 +#define BMM050_DATAX_LSB_TESTX__REG BMM050_DATAX_LSB + +/* Data Y LSB Register */ +#define BMM050_DATAY_LSB_VALUEY__POS 3 +#define BMM050_DATAY_LSB_VALUEY__LEN 5 +#define BMM050_DATAY_LSB_VALUEY__MSK 0xF8 +#define BMM050_DATAY_LSB_VALUEY__REG BMM050_DATAY_LSB + +/* Data Y SelfTest Register */ +#define BMM050_DATAY_LSB_TESTY__POS 0 +#define BMM050_DATAY_LSB_TESTY__LEN 1 +#define BMM050_DATAY_LSB_TESTY__MSK 0x01 +#define BMM050_DATAY_LSB_TESTY__REG BMM050_DATAY_LSB + +/* Data Z LSB Register */ +#define BMM050_DATAZ_LSB_VALUEZ__POS 1 +#define BMM050_DATAZ_LSB_VALUEZ__LEN 7 +#define BMM050_DATAZ_LSB_VALUEZ__MSK 0xFE +#define BMM050_DATAZ_LSB_VALUEZ__REG BMM050_DATAZ_LSB + +/* Data Z SelfTest Register */ +#define BMM050_DATAZ_LSB_TESTZ__POS 0 +#define BMM050_DATAZ_LSB_TESTZ__LEN 1 +#define BMM050_DATAZ_LSB_TESTZ__MSK 0x01 +#define BMM050_DATAZ_LSB_TESTZ__REG BMM050_DATAZ_LSB + +/* Hall Resistance LSB Register */ +#define BMM050_R_LSB_VALUE__POS 2 +#define BMM050_R_LSB_VALUE__LEN 6 +#define BMM050_R_LSB_VALUE__MSK 0xFC +#define BMM050_R_LSB_VALUE__REG BMM050_R_LSB + +#define BMM050_DATA_RDYSTAT__POS 0 +#define BMM050_DATA_RDYSTAT__LEN 1 +#define BMM050_DATA_RDYSTAT__MSK 0x01 +#define BMM050_DATA_RDYSTAT__REG BMM050_R_LSB + +/* Data X LSB Remapped Register only applicable for BMX055 */ +#define BMM050_BMX055_REMAPPED_DATAX_LSB_VALUEX__POS 3 +#define BMM050_BMX055_REMAPPED_DATAX_LSB_VALUEX__LEN 5 +#define BMM050_BMX055_REMAPPED_DATAX_LSB_VALUEX__MSK 0xF8 +#define BMM050_BMX055_REMAPPED_DATAX_LSB_VALUEX__REG\ + BMM050_BMX055_REMAPPED_DATAX_LSB + +/* Data Y LSB Remapped Register only applicable for BMX055 */ +#define BMM050_BMX055_REMAPPED_DATAY_LSB_VALUEY__POS 3 +#define BMM050_BMX055_REMAPPED_DATAY_LSB_VALUEY__LEN 5 +#define BMM050_BMX055_REMAPPED_DATAY_LSB_VALUEY__MSK 0xF8 +#define BMM050_BMX055_REMAPPED_DATAY_LSB_VALUEY__REG\ + BMM050_BMX055_REMAPPED_DATAY_LSB + +/* Interrupt Status Register */ +#define BMM050_INT_STAT_DOR__POS 7 +#define BMM050_INT_STAT_DOR__LEN 1 +#define BMM050_INT_STAT_DOR__MSK 0x80 +#define BMM050_INT_STAT_DOR__REG BMM050_INT_STAT + +#define BMM050_INT_STAT_OVRFLOW__POS 6 +#define BMM050_INT_STAT_OVRFLOW__LEN 1 +#define BMM050_INT_STAT_OVRFLOW__MSK 0x40 +#define BMM050_INT_STAT_OVRFLOW__REG BMM050_INT_STAT + +#define BMM050_INT_STAT_HIGH_THZ__POS 5 +#define BMM050_INT_STAT_HIGH_THZ__LEN 1 +#define BMM050_INT_STAT_HIGH_THZ__MSK 0x20 +#define BMM050_INT_STAT_HIGH_THZ__REG BMM050_INT_STAT + +#define BMM050_INT_STAT_HIGH_THY__POS 4 +#define BMM050_INT_STAT_HIGH_THY__LEN 1 +#define BMM050_INT_STAT_HIGH_THY__MSK 0x10 +#define BMM050_INT_STAT_HIGH_THY__REG BMM050_INT_STAT + +#define BMM050_INT_STAT_HIGH_THX__POS 3 +#define BMM050_INT_STAT_HIGH_THX__LEN 1 +#define BMM050_INT_STAT_HIGH_THX__MSK 0x08 +#define BMM050_INT_STAT_HIGH_THX__REG BMM050_INT_STAT + +#define BMM050_INT_STAT_LOW_THZ__POS 2 +#define BMM050_INT_STAT_LOW_THZ__LEN 1 +#define BMM050_INT_STAT_LOW_THZ__MSK 0x04 +#define BMM050_INT_STAT_LOW_THZ__REG BMM050_INT_STAT + +#define BMM050_INT_STAT_LOW_THY__POS 1 +#define BMM050_INT_STAT_LOW_THY__LEN 1 +#define BMM050_INT_STAT_LOW_THY__MSK 0x02 +#define BMM050_INT_STAT_LOW_THY__REG BMM050_INT_STAT + +#define BMM050_INT_STAT_LOW_THX__POS 0 +#define BMM050_INT_STAT_LOW_THX__LEN 1 +#define BMM050_INT_STAT_LOW_THX__MSK 0x01 +#define BMM050_INT_STAT_LOW_THX__REG BMM050_INT_STAT + +/* Power Control Register */ +#define BMM050_POWER_CNTL_SRST7__POS 7 +#define BMM050_POWER_CNTL_SRST7__LEN 1 +#define BMM050_POWER_CNTL_SRST7__MSK 0x80 +#define BMM050_POWER_CNTL_SRST7__REG BMM050_POWER_CNTL + +#define BMM050_POWER_CNTL_SPI3_EN__POS 2 +#define BMM050_POWER_CNTL_SPI3_EN__LEN 1 +#define BMM050_POWER_CNTL_SPI3_EN__MSK 0x04 +#define BMM050_POWER_CNTL_SPI3_EN__REG BMM050_POWER_CNTL + +#define BMM050_POWER_CNTL_SRST1__POS 1 +#define BMM050_POWER_CNTL_SRST1__LEN 1 +#define BMM050_POWER_CNTL_SRST1__MSK 0x02 +#define BMM050_POWER_CNTL_SRST1__REG BMM050_POWER_CNTL + +#define BMM050_POWER_CNTL_PCB__POS 0 +#define BMM050_POWER_CNTL_PCB__LEN 1 +#define BMM050_POWER_CNTL_PCB__MSK 0x01 +#define BMM050_POWER_CNTL_PCB__REG BMM050_POWER_CNTL + +/* Control Register */ +#define BMM050_CNTL_ADV_ST__POS 6 +#define BMM050_CNTL_ADV_ST__LEN 2 +#define BMM050_CNTL_ADV_ST__MSK 0xC0 +#define BMM050_CNTL_ADV_ST__REG BMM050_CONTROL + +#define BMM050_CNTL_DR__POS 3 +#define BMM050_CNTL_DR__LEN 3 +#define BMM050_CNTL_DR__MSK 0x38 +#define BMM050_CNTL_DR__REG BMM050_CONTROL + +#define BMM050_CNTL_OPMODE__POS 1 +#define BMM050_CNTL_OPMODE__LEN 2 +#define BMM050_CNTL_OPMODE__MSK 0x06 +#define BMM050_CNTL_OPMODE__REG BMM050_CONTROL + +#define BMM050_CNTL_S_TEST__POS 0 +#define BMM050_CNTL_S_TEST__LEN 1 +#define BMM050_CNTL_S_TEST__MSK 0x01 +#define BMM050_CNTL_S_TEST__REG BMM050_CONTROL + +/* Interrupt Control Register */ +#define BMM050_INT_CNTL_DOR_EN__POS 7 +#define BMM050_INT_CNTL_DOR_EN__LEN 1 +#define BMM050_INT_CNTL_DOR_EN__MSK 0x80 +#define BMM050_INT_CNTL_DOR_EN__REG BMM050_INT_CNTL + +#define BMM050_INT_CNTL_OVRFLOW_EN__POS 6 +#define BMM050_INT_CNTL_OVRFLOW_EN__LEN 1 +#define BMM050_INT_CNTL_OVRFLOW_EN__MSK 0x40 +#define BMM050_INT_CNTL_OVRFLOW_EN__REG BMM050_INT_CNTL + +#define BMM050_INT_CNTL_HIGH_THZ_EN__POS 5 +#define BMM050_INT_CNTL_HIGH_THZ_EN__LEN 1 +#define BMM050_INT_CNTL_HIGH_THZ_EN__MSK 0x20 +#define BMM050_INT_CNTL_HIGH_THZ_EN__REG BMM050_INT_CNTL + +#define BMM050_INT_CNTL_HIGH_THY_EN__POS 4 +#define BMM050_INT_CNTL_HIGH_THY_EN__LEN 1 +#define BMM050_INT_CNTL_HIGH_THY_EN__MSK 0x10 +#define BMM050_INT_CNTL_HIGH_THY_EN__REG BMM050_INT_CNTL + +#define BMM050_INT_CNTL_HIGH_THX_EN__POS 3 +#define BMM050_INT_CNTL_HIGH_THX_EN__LEN 1 +#define BMM050_INT_CNTL_HIGH_THX_EN__MSK 0x08 +#define BMM050_INT_CNTL_HIGH_THX_EN__REG BMM050_INT_CNTL + +#define BMM050_INT_CNTL_LOW_THZ_EN__POS 2 +#define BMM050_INT_CNTL_LOW_THZ_EN__LEN 1 +#define BMM050_INT_CNTL_LOW_THZ_EN__MSK 0x04 +#define BMM050_INT_CNTL_LOW_THZ_EN__REG BMM050_INT_CNTL + +#define BMM050_INT_CNTL_LOW_THY_EN__POS 1 +#define BMM050_INT_CNTL_LOW_THY_EN__LEN 1 +#define BMM050_INT_CNTL_LOW_THY_EN__MSK 0x02 +#define BMM050_INT_CNTL_LOW_THY_EN__REG BMM050_INT_CNTL + +#define BMM050_INT_CNTL_LOW_THX_EN__POS 0 +#define BMM050_INT_CNTL_LOW_THX_EN__LEN 1 +#define BMM050_INT_CNTL_LOW_THX_EN__MSK 0x01 +#define BMM050_INT_CNTL_LOW_THX_EN__REG BMM050_INT_CNTL + +/* Sensor Control Register */ +#define BMM050_SENS_CNTL_DRDY_EN__POS 7 +#define BMM050_SENS_CNTL_DRDY_EN__LEN 1 +#define BMM050_SENS_CNTL_DRDY_EN__MSK 0x80 +#define BMM050_SENS_CNTL_DRDY_EN__REG BMM050_SENS_CNTL + +#define BMM050_SENS_CNTL_IE__POS 6 +#define BMM050_SENS_CNTL_IE__LEN 1 +#define BMM050_SENS_CNTL_IE__MSK 0x40 +#define BMM050_SENS_CNTL_IE__REG BMM050_SENS_CNTL + +#define BMM050_SENS_CNTL_CHANNELZ__POS 5 +#define BMM050_SENS_CNTL_CHANNELZ__LEN 1 +#define BMM050_SENS_CNTL_CHANNELZ__MSK 0x20 +#define BMM050_SENS_CNTL_CHANNELZ__REG BMM050_SENS_CNTL + +#define BMM050_SENS_CNTL_CHANNELY__POS 4 +#define BMM050_SENS_CNTL_CHANNELY__LEN 1 +#define BMM050_SENS_CNTL_CHANNELY__MSK 0x10 +#define BMM050_SENS_CNTL_CHANNELY__REG BMM050_SENS_CNTL + +#define BMM050_SENS_CNTL_CHANNELX__POS 3 +#define BMM050_SENS_CNTL_CHANNELX__LEN 1 +#define BMM050_SENS_CNTL_CHANNELX__MSK 0x08 +#define BMM050_SENS_CNTL_CHANNELX__REG BMM050_SENS_CNTL + +#define BMM050_SENS_CNTL_DR_POLARITY__POS 2 +#define BMM050_SENS_CNTL_DR_POLARITY__LEN 1 +#define BMM050_SENS_CNTL_DR_POLARITY__MSK 0x04 +#define BMM050_SENS_CNTL_DR_POLARITY__REG BMM050_SENS_CNTL + +#define BMM050_SENS_CNTL_INTERRUPT_LATCH__POS 1 +#define BMM050_SENS_CNTL_INTERRUPT_LATCH__LEN 1 +#define BMM050_SENS_CNTL_INTERRUPT_LATCH__MSK 0x02 +#define BMM050_SENS_CNTL_INTERRUPT_LATCH__REG BMM050_SENS_CNTL + +#define BMM050_SENS_CNTL_INTERRUPT_POLARITY__POS 0 +#define BMM050_SENS_CNTL_INTERRUPT_POLARITY__LEN 1 +#define BMM050_SENS_CNTL_INTERRUPT_POLARITY__MSK 0x01 +#define BMM050_SENS_CNTL_INTERRUPT_POLARITY__REG BMM050_SENS_CNTL + +/* Register 6D */ +#define BMM050_DIG_XYZ1_MSB__POS 0 +#define BMM050_DIG_XYZ1_MSB__LEN 7 +#define BMM050_DIG_XYZ1_MSB__MSK 0x7F +#define BMM050_DIG_XYZ1_MSB__REG BMM050_DIG_XYZ1_MSB + + +#define BMM050_X_AXIS 0 +#define BMM050_Y_AXIS 1 +#define BMM050_Z_AXIS 2 +#define BMM050_RESISTANCE 3 +#define BMM050_X 1 +#define BMM050_Y 2 +#define BMM050_Z 4 +#define BMM050_XYZ 7 + +/* Constants */ +#define BMM050_Zero_U8X 0 +#define BMM050_NULL 0 +#define BMM050_DISABLE 0 +#define BMM050_ENABLE 1 +#define BMM050_CHANNEL_DISABLE 1 +#define BMM050_CHANNEL_ENABLE 0 +#define BMM050_INTPIN_LATCH_ENABLE 1 +#define BMM050_INTPIN_LATCH_DISABLE 0 +#define BMM050_OFF 0 +#define BMM050_ON 1 + +#define BMM050_NORMAL_MODE 0x00 +#define BMM050_FORCED_MODE 0x01 +#define BMM050_SUSPEND_MODE 0x02 +#define BMM050_SLEEP_MODE 0x03 + +#define BMM050_ADVANCED_SELFTEST_OFF 0 +#define BMM050_ADVANCED_SELFTEST_NEGATIVE 2 +#define BMM050_ADVANCED_SELFTEST_POSITIVE 3 + +#define BMM050_NEGATIVE_SATURATION_Z -32767 +#define BMM050_POSITIVE_SATURATION_Z 32767 + +#define BMM050_SPI_RD_MASK 0x80 +#define BMM050_READ_SET 0x01 + +#define E_BMM050_NULL_PTR ((signed char)-127) +#define E_BMM050_COMM_RES ((signed char)-1) +#define E_BMM050_OUT_OF_RANGE ((signed char)-2) +#define E_BMM050_UNDEFINED_MODE 0 + +#define BMM050_WR_FUNC_PTR\ + int (*bus_write)(unsigned char, unsigned char,\ + unsigned char *, unsigned char) + +#define BMM050_RD_FUNC_PTR\ + int (*bus_read)(unsigned char, unsigned char,\ + unsigned char *, unsigned char) +#define BMM050_MDELAY_DATA_TYPE unsigned int + +/*Shifting Constants*/ +#define SHIFT_RIGHT_1_POSITION 1 +#define SHIFT_RIGHT_2_POSITION 2 +#define SHIFT_RIGHT_3_POSITION 3 +#define SHIFT_RIGHT_4_POSITION 4 +#define SHIFT_RIGHT_5_POSITION 5 +#define SHIFT_RIGHT_6_POSITION 6 +#define SHIFT_RIGHT_7_POSITION 7 +#define SHIFT_RIGHT_8_POSITION 8 + +#define SHIFT_LEFT_1_POSITION 1 +#define SHIFT_LEFT_2_POSITION 2 +#define SHIFT_LEFT_3_POSITION 3 +#define SHIFT_LEFT_4_POSITION 4 +#define SHIFT_LEFT_5_POSITION 5 +#define SHIFT_LEFT_6_POSITION 6 +#define SHIFT_LEFT_7_POSITION 7 +#define SHIFT_LEFT_8_POSITION 8 + +/* Conversion factors*/ +#define BMM050_CONVFACTOR_LSB_UT 6 + +/* get bit slice */ +#define BMM050_GET_BITSLICE(regvar, bitname)\ + ((regvar & bitname##__MSK) >> bitname##__POS) + +/* Set bit slice */ +#define BMM050_SET_BITSLICE(regvar, bitname, val)\ + ((regvar & ~bitname##__MSK) | ((val< +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_HAS_EARLYSUSPEND +#include +#endif + +#ifdef __KERNEL__ +#include +#include +#include +#include +#else +#include +#include +#include +#endif + +#include + +#include "bmm050.h" +#include "bs_log.h" + +/* sensor specific */ +#define SENSOR_NAME "bmm050" + +#define SENSOR_CHIP_ID_BMM (0x32) +#define CHECK_CHIP_ID_TIME_MAX 5 + +#define BMM_REG_NAME(name) BMM050_##name +#define BMM_VAL_NAME(name) BMM050_##name +#define BMM_CALL_API(name) bmm050_##name + +#define BMM_I2C_WRITE_DELAY_TIME 5 + +#define BMM_DEFAULT_REPETITION_XY BMM_VAL_NAME(REGULAR_REPXY) +#define BMM_DEFAULT_REPETITION_Z BMM_VAL_NAME(REGULAR_REPZ) +#define BMM_DEFAULT_ODR BMM_VAL_NAME(REGULAR_DR) +/* generic */ +#define BMM_MAX_RETRY_I2C_XFER (3) +#define BMM_MAX_RETRY_WAKEUP (5) +#define BMM_MAX_RETRY_WAIT_DRDY (100) + +#define BMM_DELAY_MIN (1) +#define BMM_DELAY_DEFAULT (200) + +#define MAG_VALUE_MAX (32767) +#define MAG_VALUE_MIN (-32768) + +#define BYTES_PER_LINE (16) + +#define BMM_SELF_TEST 1 +#define BMM_ADV_TEST 2 + +#define BMM_OP_MODE_UNKNOWN (-1) + +/*! Bosch sensor unknown place*/ +#define BOSCH_SENSOR_PLACE_UNKNOWN (-1) +/*! Bosch sensor remapping table size P0~P7*/ +#define MAX_AXIS_REMAP_TAB_SZ 8 + +#ifdef CONFIG_BMM_USE_PLATFORM_DATA +struct bosch_sensor_specific { + char *name; + /* 0 to 7 */ + int place; + int irq; + int (*irq_gpio_cfg)(void); +}; +#endif + +/*! + * we use a typedef to hide the detail, + * because this type might be changed + */ +struct bosch_sensor_axis_remap { + /* src means which source will be mapped to target x, y, z axis */ + /* if an target OS axis is remapped from (-)x, + * src is 0, sign_* is (-)1 */ + /* if an target OS axis is remapped from (-)y, + * src is 1, sign_* is (-)1 */ + /* if an target OS axis is remapped from (-)z, + * src is 2, sign_* is (-)1 */ + int src_x:3; + int src_y:3; + int src_z:3; + + int sign_x:2; + int sign_y:2; + int sign_z:2; +}; + +struct bosch_sensor_data { + union { + int16_t v[3]; + struct { + int16_t x; + int16_t y; + int16_t z; + }; + }; +}; + +static const u8 odr_map[] = {10, 2, 6, 8, 15, 20, 25, 30}; +static const long op_mode_maps[] = { + BMM_VAL_NAME(NORMAL_MODE), + BMM_VAL_NAME(FORCED_MODE), + BMM_VAL_NAME(SUSPEND_MODE), + BMM_VAL_NAME(SLEEP_MODE) +}; + + +struct bmm_client_data { + struct bmm050 device; + struct i2c_client *client; + struct input_dev *input; + struct delayed_work work; + +#ifdef CONFIG_HAS_EARLYSUSPEND + struct early_suspend early_suspend_handler; +#endif + + atomic_t delay; + /* whether the system in suspend state */ + atomic_t in_suspend; + + struct bmm050_mdata_s32 value; + u8 enable:1; + s8 op_mode:4; + u8 odr; + u8 rept_xy; + u8 rept_z; + + s16 result_test; + + struct mutex mutex_power_mode; + + /* controls not only reg, but also workqueue */ + struct mutex mutex_op_mode; + struct mutex mutex_enable; + struct mutex mutex_odr; + struct mutex mutex_rept_xy; + struct mutex mutex_rept_z; + + struct mutex mutex_value; +#ifdef CONFIG_BMM_USE_PLATFORM_DATA + struct bosch_sensor_specific *bst_pd; +#endif +}; + +static struct i2c_client *bmm_client; +/* i2c operation for API */ +static void bmm_delay(u32 msec); +static int bmm_i2c_read(struct i2c_client *client, u8 reg_addr, + u8 *data, u8 len); +static int bmm_i2c_write(struct i2c_client *client, u8 reg_addr, + u8 *data, u8 len); + +static void bmm_dump_reg(struct i2c_client *client); +static int bmm_wakeup(struct i2c_client *client); +static int bmm_check_chip_id(struct i2c_client *client); + +static int bmm_pre_suspend(struct i2c_client *client); +static int bmm_post_resume(struct i2c_client *client); + +#ifdef CONFIG_HAS_EARLYSUSPEND +static void bmm_early_suspend(struct early_suspend *handler); +static void bmm_late_resume(struct early_suspend *handler); +#endif + +static int bmm_restore_hw_cfg(struct i2c_client *client); + +static const struct bosch_sensor_axis_remap +bst_axis_remap_tab_dft[MAX_AXIS_REMAP_TAB_SZ] = { + /* src_x src_y src_z sign_x sign_y sign_z */ + { 0, 1, 2, 1, 1, 1 }, /* P0 */ + { 1, 0, 2, 1, -1, 1 }, /* P1 */ + { 0, 1, 2, -1, -1, 1 }, /* P2 */ + { 1, 0, 2, -1, 1, 1 }, /* P3 */ + + { 0, 1, 2, -1, 1, -1 }, /* P4 */ + { 1, 0, 2, -1, -1, -1 }, /* P5 */ + { 0, 1, 2, 1, -1, -1 }, /* P6 */ + { 1, 0, 2, 1, 1, -1 }, /* P7 */ +}; + +static void bst_remap_sensor_data(struct bosch_sensor_data *data, + const struct bosch_sensor_axis_remap *remap) +{ + struct bosch_sensor_data tmp; + + tmp.x = data->v[remap->src_x] * remap->sign_x; + tmp.y = data->v[remap->src_y] * remap->sign_y; + tmp.z = data->v[remap->src_z] * remap->sign_z; + + memcpy(data, &tmp, sizeof(*data)); +} + +static void bst_remap_sensor_data_dft_tab(struct bosch_sensor_data *data, + int place) +{ + /* sensor with place 0 needs not to be remapped */ + if ((place <= 0) || (place >= MAX_AXIS_REMAP_TAB_SZ)) + return; + + bst_remap_sensor_data(data, &bst_axis_remap_tab_dft[place]); +} + +static void bmm_remap_sensor_data(struct bmm050_mdata_s32 *val, + struct bmm_client_data *client_data) +{ +#if defined(CONFIG_BMM_USE_PLATFORM_DATA) + struct bosch_sensor_data bsd; + + if (NULL == client_data->bst_pd) + return; + + bsd.x = val->datax; + bsd.y = val->datay; + bsd.z = val->dataz; + + bst_remap_sensor_data_dft_tab(&bsd, + client_data->bst_pd->place); + + val->datax = bsd.x; + val->datay = bsd.y; + val->dataz = bsd.z; +#else + (void)val; + (void)client_data; +#endif +} + +static int bmm_check_chip_id(struct i2c_client *client) +{ + int err = -1; + u8 chip_id = 0; + u8 read_count = 0; + + while (read_count++ < CHECK_CHIP_ID_TIME_MAX) { + err = bmm_i2c_read(client, BMM_REG_NAME(CHIP_ID), &chip_id, 1); + if (err) + return err; + + if ((chip_id & 0xff) != SENSOR_CHIP_ID_BMM) { + mdelay(1); + } else { + err = 0; + break; + } + } + + return err; +} + +static void bmm_delay(u32 msec) +{ + mdelay(msec); +} + +static inline int bmm_get_forced_drdy_time(int rept_xy, int rept_z) +{ + return (145 * rept_xy + 500 * rept_z + 980 + (1000 - 1)) / 1000; +} + + +static void bmm_dump_reg(struct i2c_client *client) +{ +#ifdef DEBUG + int i; + u8 dbg_buf[64]; + u8 dbg_buf_str[64 * 3 + 1] = ""; + + for (i = 0; i < BYTES_PER_LINE; i++) { + dbg_buf[i] = i; + snprintf(dbg_buf_str + i * 3,(sizeof(dbg_buf_str) - i * 3), "%02x%c", + dbg_buf[i], + (((i + 1) % BYTES_PER_LINE == 0) ? '\n' : ' ')); + } + printk(KERN_DEBUG "%s\n", dbg_buf_str); + + bmm_i2c_read(client, BMM_REG_NAME(CHIP_ID), dbg_buf, 64); + for (i = 0; i < 64; i++) { + snprintf(dbg_buf_str + i * 3,(sizeof(dbg_buf_str) - i * 3), "%02x%c", + dbg_buf[i], + (((i + 1) % BYTES_PER_LINE == 0) ? '\n' : ' ')); + } + printk(KERN_DEBUG "%s\n", dbg_buf_str); +#endif +} + +static int bmm_wakeup(struct i2c_client *client) +{ + int err = 0; + int try_times = BMM_MAX_RETRY_WAKEUP; + const u8 value = 0x01; + u8 dummy; + + mdelay(BMM_I2C_WRITE_DELAY_TIME); + while (try_times) { + err = bmm_i2c_write(client, + BMM_REG_NAME(POWER_CNTL), (u8 *)&value, 1); + mdelay(BMM_I2C_WRITE_DELAY_TIME); + dummy = 0; + err = bmm_i2c_read(client, BMM_REG_NAME(POWER_CNTL), &dummy, 1); + if (value == dummy) + break; + + try_times--; + } + + err = (try_times > 0) ? 0 : -1; + + return err; +} + +/*i2c read routine for API*/ +static int bmm_i2c_read(struct i2c_client *client, u8 reg_addr, + u8 *data, u8 len) +{ + int retry; + + struct i2c_msg msg[] = { + { + .addr = client->addr, + .flags = 0, + .len = 1, + .buf = ®_addr, + }, + + { + .addr = client->addr, + .flags = I2C_M_RD, + .len = len, + .buf = data, + }, + }; + + for (retry = 0; retry < BMM_MAX_RETRY_I2C_XFER; retry++) { + if (i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg)) > 0) + break; + else + mdelay(BMM_I2C_WRITE_DELAY_TIME); + } + + if (BMM_MAX_RETRY_I2C_XFER <= retry) { + PERR("I2C xfer error"); + return -EIO; + } + + return 0; +} + +/*i2c write routine for */ +static int bmm_i2c_write(struct i2c_client *client, u8 reg_addr, + u8 *data, u8 len) +{ + u8 buffer[2]; + int retry; + struct i2c_msg msg[] = { + { + .addr = client->addr, + .flags = 0, + .len = 2, + .buf = buffer, + }, + }; + + while (0 != len--) { + buffer[0] = reg_addr; + buffer[1] = *data; + for (retry = 0; retry < BMM_MAX_RETRY_I2C_XFER; retry++) { + if (i2c_transfer(client->adapter, msg, + ARRAY_SIZE(msg)) > 0) { + break; + } else { + mdelay(BMM_I2C_WRITE_DELAY_TIME); + } + } + if (BMM_MAX_RETRY_I2C_XFER <= retry) { + PERR("I2C xfer error"); + return -EIO; + } + reg_addr++; + data++; + } + + return 0; +} + +static int bmm_i2c_read_wrapper(u8 dev_addr, u8 reg_addr, u8 *data, u8 len) +{ + int err = 0; + err = bmm_i2c_read(bmm_client, reg_addr, data, len); + return err; +} + +static int bmm_i2c_write_wrapper(u8 dev_addr, u8 reg_addr, u8 *data, u8 len) +{ + int err = 0; + err = bmm_i2c_write(bmm_client, reg_addr, data, len); + return err; +} + +/* this function exists for optimization of speed, + * because it is frequently called */ +static inline int bmm_set_forced_mode(struct i2c_client *client) +{ + int err = 0; + + /* FORCED_MODE */ + const u8 value = 0x02; + err = bmm_i2c_write(client, BMM_REG_NAME(CONTROL), (u8 *)&value, 1); + + return err; +} + +static void bmm_work_func(struct work_struct *work) +{ + struct bmm_client_data *client_data = + container_of((struct delayed_work *)work, + struct bmm_client_data, work); + struct i2c_client *client = client_data->client; + unsigned long delay = + msecs_to_jiffies(atomic_read(&client_data->delay)); + + if(client_data->op_mode == BMM_VAL_NAME(SUSPEND_MODE)) return; + mutex_lock(&client_data->mutex_value); + + mutex_lock(&client_data->mutex_op_mode); + if (BMM_VAL_NAME(NORMAL_MODE) != client_data->op_mode) + bmm_set_forced_mode(client); + + mutex_unlock(&client_data->mutex_op_mode); + + BMM_CALL_API(read_mdataXYZ_s32)(&client_data->value); + bmm_remap_sensor_data(&client_data->value, client_data); + + input_report_abs(client_data->input, ABS_X, client_data->value.datax); + input_report_abs(client_data->input, ABS_Y, client_data->value.datay); + input_report_abs(client_data->input, ABS_Z, client_data->value.dataz); + mutex_unlock(&client_data->mutex_value); + + input_sync(client_data->input); + + schedule_delayed_work(&client_data->work, delay); +} + + +static int bmm_set_odr(struct i2c_client *client, u8 odr) +{ + int err = 0; + + err = BMM_CALL_API(set_datarate)(odr); + mdelay(BMM_I2C_WRITE_DELAY_TIME); + + return err; +} + +static int bmm_get_odr(struct i2c_client *client, u8 *podr) +{ + int err = 0; + u8 value; + + err = BMM_CALL_API(get_datarate)(&value); + if (!err) + *podr = value; + + return err; +} + +static ssize_t bmm_show_chip_id(struct device *dev, + struct device_attribute *attr, char *buf) +{ + return sprintf(buf, "%d\n", SENSOR_CHIP_ID_BMM); +} + +static ssize_t bmm_show_op_mode(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int ret; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + u8 op_mode = 0xff; + u8 power_mode; + + mutex_lock(&client_data->mutex_power_mode); + BMM_CALL_API(get_powermode)(&power_mode); + if (power_mode) { + mutex_lock(&client_data->mutex_op_mode); + BMM_CALL_API(get_functional_state)(&op_mode); + mutex_unlock(&client_data->mutex_op_mode); + } else { + op_mode = BMM_VAL_NAME(SUSPEND_MODE); + } + + mutex_unlock(&client_data->mutex_power_mode); + + PDEBUG("op_mode: %d", op_mode); + + ret = sprintf(buf, "%d\n", op_mode); + + return ret; +} + + +static inline int bmm_get_op_mode_idx(u8 op_mode) +{ + int i = 0; + + for (i = 0; i < ARRAY_SIZE(op_mode_maps); i++) { + if (op_mode_maps[i] == op_mode) + break; + } + + if (i < ARRAY_SIZE(op_mode_maps)) + return i; + else + return -1; +} + + +static int bmm_set_op_mode(struct bmm_client_data *client_data, int op_mode) +{ + int err = 0; + + err = BMM_CALL_API(set_functional_state)( + op_mode); + + if (BMM_VAL_NAME(SUSPEND_MODE) == op_mode) + atomic_set(&client_data->in_suspend, 1); + else + atomic_set(&client_data->in_suspend, 0); + + return err; +} + +static ssize_t bmm_store_op_mode(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int err = 0; + int i; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + struct i2c_client *client = client_data->client; + long op_mode; + + err = kstrtoul(buf, 10, &op_mode); + if (err) + return err; + + mutex_lock(&client_data->mutex_power_mode); + + i = bmm_get_op_mode_idx(op_mode); + + if (i != -1) { + mutex_lock(&client_data->mutex_op_mode); + if (op_mode != client_data->op_mode) { + if (BMM_VAL_NAME(FORCED_MODE) == op_mode) { + /* special treat of forced mode + * for optimization */ + err = bmm_set_forced_mode(client); + } else { + err = bmm_set_op_mode(client_data, op_mode); + } + + if (!err) { + if (BMM_VAL_NAME(FORCED_MODE) == op_mode) + client_data->op_mode = + BMM_OP_MODE_UNKNOWN; + else + client_data->op_mode = op_mode; + } + } + mutex_unlock(&client_data->mutex_op_mode); + } else { + err = -EINVAL; + } + + mutex_unlock(&client_data->mutex_power_mode); + + if (err) + return err; + else + return count; +} + +static ssize_t bmm_show_odr(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data = 0; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + struct i2c_client *client = client_data->client; + int err; + u8 power_mode; + + mutex_lock(&client_data->mutex_power_mode); + BMM_CALL_API(get_powermode)(&power_mode); + if (power_mode) { + mutex_lock(&client_data->mutex_odr); + err = bmm_get_odr(client, &data); + mutex_unlock(&client_data->mutex_odr); + } else { + err = -EIO; + } + mutex_unlock(&client_data->mutex_power_mode); + + if (!err) { + if (data < ARRAY_SIZE(odr_map)) + err = sprintf(buf, "%d\n", odr_map[data]); + else + err = -EINVAL; + } + + return err; +} + +static ssize_t bmm_store_odr(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long tmp; + unsigned char data; + int err; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + struct i2c_client *client = client_data->client; + u8 power_mode; + int i; + + err = kstrtoul(buf, 10, &tmp); + if (err) + return err; + + if (tmp > 255) + return -EINVAL; + + data = (unsigned char)tmp; + + mutex_lock(&client_data->mutex_power_mode); + BMM_CALL_API(get_powermode)(&power_mode); + if (power_mode) { + for (i = 0; i < ARRAY_SIZE(odr_map); i++) { + if (odr_map[i] == data) + break; + } + + if (i < ARRAY_SIZE(odr_map)) { + mutex_lock(&client_data->mutex_odr); + err = bmm_set_odr(client, i); + if (!err) + client_data->odr = i; + + mutex_unlock(&client_data->mutex_odr); + } else { + err = -EINVAL; + } + } else { + err = -EIO; + } + + mutex_unlock(&client_data->mutex_power_mode); + if (err) + return err; + + return count; +} + +static ssize_t bmm_show_rept_xy(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data = 0; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + int err; + u8 power_mode; + + mutex_lock(&client_data->mutex_power_mode); + BMM_CALL_API(get_powermode)(&power_mode); + if (power_mode) { + mutex_lock(&client_data->mutex_rept_xy); + err = BMM_CALL_API(get_repetitions_XY)(&data); + mutex_unlock(&client_data->mutex_rept_xy); + } else { + err = -EIO; + } + + mutex_unlock(&client_data->mutex_power_mode); + + if (err) + return err; + + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmm_store_rept_xy(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long tmp = 0; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + int err; + u8 data; + u8 power_mode; + + err = kstrtoul(buf, 10, &tmp); + if (err) + return err; + + if (tmp > 255) + return -EINVAL; + + data = (unsigned char)tmp; + + mutex_lock(&client_data->mutex_power_mode); + BMM_CALL_API(get_powermode)(&power_mode); + if (power_mode) { + mutex_lock(&client_data->mutex_rept_xy); + err = BMM_CALL_API(set_repetitions_XY)(data); + if (!err) { + mdelay(BMM_I2C_WRITE_DELAY_TIME); + client_data->rept_xy = data; + } + mutex_unlock(&client_data->mutex_rept_xy); + } else { + err = -EIO; + } + mutex_unlock(&client_data->mutex_power_mode); + + if (err) + return err; + + return count; +} + +static ssize_t bmm_show_rept_z(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned char data = 0; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + int err; + u8 power_mode; + + mutex_lock(&client_data->mutex_power_mode); + BMM_CALL_API(get_powermode)(&power_mode); + if (power_mode) { + mutex_lock(&client_data->mutex_rept_z); + err = BMM_CALL_API(get_repetitions_Z)(&data); + mutex_unlock(&client_data->mutex_rept_z); + } else { + err = -EIO; + } + + mutex_unlock(&client_data->mutex_power_mode); + + if (err) + return err; + + return sprintf(buf, "%d\n", data); +} + +static ssize_t bmm_store_rept_z(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long tmp = 0; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + int err; + u8 data; + u8 power_mode; + + err = kstrtoul(buf, 10, &tmp); + if (err) + return err; + + if (tmp > 255) + return -EINVAL; + + data = (unsigned char)tmp; + + mutex_lock(&client_data->mutex_power_mode); + BMM_CALL_API(get_powermode)(&power_mode); + if (power_mode) { + mutex_lock(&client_data->mutex_rept_z); + err = BMM_CALL_API(set_repetitions_Z)(data); + if (!err) { + mdelay(BMM_I2C_WRITE_DELAY_TIME); + client_data->rept_z = data; + } + mutex_unlock(&client_data->mutex_rept_z); + } else { + err = -EIO; + } + mutex_unlock(&client_data->mutex_power_mode); + + if (err) + return err; + + return count; +} + + +static ssize_t bmm_show_value(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + int count; + struct bmm050_mdata_s32 value = {0, 0, 0, 0, 0}; + + if(client_data->op_mode == BMM_VAL_NAME(SUSPEND_MODE)) return 0; + BMM_CALL_API(read_mdataXYZ_s32)(&value); + if (value.drdy) { + bmm_remap_sensor_data(&value, client_data); + client_data->value = value; + } else + PERR("data not ready"); + + count = sprintf(buf, "%d %d %d\n", + client_data->value.datax, + client_data->value.datay, + client_data->value.dataz); + PDEBUG("%d %d %d", + client_data->value.datax, + client_data->value.datay, + client_data->value.dataz); + + return count; +} + + +static ssize_t bmm_show_value_raw(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct bmm050_mdata value; + int count; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + + if(client_data->op_mode == BMM_VAL_NAME(SUSPEND_MODE)) return 0; + BMM_CALL_API(get_raw_xyz)(&value); + + count = sprintf(buf, "%hd %hd %hd\n", + value.datax, + value.datay, + value.dataz); + + return count; +} + + +static ssize_t bmm_show_enable(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + int err; + + mutex_lock(&client_data->mutex_enable); + err = sprintf(buf, "%d\n", client_data->enable); + mutex_unlock(&client_data->mutex_enable); + return err; +} + +static ssize_t bmm_store_enable(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + data = data ? 1 : 0; + mutex_lock(&client_data->mutex_enable); + if (data != client_data->enable) { + if (data) { + schedule_delayed_work( + &client_data->work, + msecs_to_jiffies(atomic_read( + &client_data->delay))); + } else { + cancel_delayed_work_sync(&client_data->work); + } + + client_data->enable = data; + } + mutex_unlock(&client_data->mutex_enable); + + return count; +} + +static ssize_t bmm_show_delay(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + + return sprintf(buf, "%d\n", atomic_read(&client_data->delay)); + +} + +static ssize_t bmm_store_delay(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + if (data == 0) { + err = -EINVAL; + return err; + } + + if (data < BMM_DELAY_MIN) + data = BMM_DELAY_MIN; + + atomic_set(&client_data->delay, data); + + return count; +} + +static ssize_t bmm_show_test(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + int err; + + err = sprintf(buf, "%d\n", client_data->result_test); + return err; +} + +static ssize_t bmm_store_test(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int err; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + struct i2c_client *client = client_data->client; + u8 dummy; + + err = kstrtoul(buf, 10, &data); + if (err) + return err; + + /* the following code assumes the work thread is not running */ + if (BMM_SELF_TEST == data) { + /* self test */ + err = bmm_set_op_mode(client_data, BMM_VAL_NAME(SLEEP_MODE)); + mdelay(3); + err = BMM_CALL_API(set_selftest)(1); + mdelay(3); + err = BMM_CALL_API(get_self_test_XYZ)(&dummy); + client_data->result_test = dummy; + } else if (BMM_ADV_TEST == data) { + /* advanced self test */ + err = BMM_CALL_API(perform_advanced_selftest)( + &client_data->result_test); + } else { + err = -EINVAL; + } + + if (!err) { + BMM_CALL_API(soft_reset)(); + mdelay(BMM_I2C_WRITE_DELAY_TIME); + bmm_restore_hw_cfg(client); + } + + if (err) + count = -1; + + return count; +} + + +static ssize_t bmm_show_reg(struct device *dev, + struct device_attribute *attr, char *buf) +{ + int err = 0; + int i; + u8 dbg_buf[64]; + u8 dbg_buf_str[64 * 3 + 1] = ""; + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); + struct i2c_client *client = client_data->client; + + for (i = 0; i < BYTES_PER_LINE; i++) { + dbg_buf[i] = i; + sprintf(dbg_buf_str + i * 3, "%02x%c", + dbg_buf[i], + (((i + 1) % BYTES_PER_LINE == 0) ? '\n' : ' ')); + } + memcpy(buf, dbg_buf_str, BYTES_PER_LINE * 3); + + for (i = 0; i < BYTES_PER_LINE * 3 - 1; i++) + dbg_buf_str[i] = '-'; + + dbg_buf_str[i] = '\n'; + memcpy(buf + BYTES_PER_LINE * 3, dbg_buf_str, BYTES_PER_LINE * 3); + + + bmm_i2c_read(client, BMM_REG_NAME(CHIP_ID), dbg_buf, 64); + for (i = 0; i < 64; i++) { + sprintf(dbg_buf_str + i * 3, "%02x%c", + dbg_buf[i], + (((i + 1) % BYTES_PER_LINE == 0) ? '\n' : ' ')); + } + memcpy(buf + BYTES_PER_LINE * 3 + BYTES_PER_LINE * 3, + dbg_buf_str, 64 * 3); + + err = BYTES_PER_LINE * 3 + BYTES_PER_LINE * 3 + 64 * 3; + return err; +} + + +static ssize_t bmm_show_place(struct device *dev, + struct device_attribute *attr, char *buf) +{ +#ifdef CONFIG_BMM_USE_PLATFORM_DATA + struct input_dev *input = to_input_dev(dev); + struct bmm_client_data *client_data = input_get_drvdata(input); +#endif + int place = BOSCH_SENSOR_PLACE_UNKNOWN; + +#ifdef CONFIG_BMM_USE_PLATFORM_DATA + if (NULL != client_data->bst_pd) + place = client_data->bst_pd->place; +#endif + return sprintf(buf, "%d\n", place); +} + +static ssize_t bmm_store_place(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + unsigned long data; + int error; + struct i2c_client *client = to_i2c_client(dev); + struct bmm_client_data *client_data = i2c_get_clientdata(client); + + error = kstrtoul(buf, 10, &data); + if (error) + return error; + + if ((data >= 0) && (data <= 7)) + client_data->bst_pd->place = data; + + return count; +} + +static DEVICE_ATTR(chip_id, S_IRUGO, + bmm_show_chip_id, NULL); +static DEVICE_ATTR(op_mode, S_IRUGO|S_IWUSR, + bmm_show_op_mode, bmm_store_op_mode); +static DEVICE_ATTR(odr, S_IRUGO|S_IWUSR, + bmm_show_odr, bmm_store_odr); +static DEVICE_ATTR(rept_xy, S_IRUGO|S_IWUSR, + bmm_show_rept_xy, bmm_store_rept_xy); +static DEVICE_ATTR(rept_z, S_IRUGO|S_IWUSR, + bmm_show_rept_z, bmm_store_rept_z); +static DEVICE_ATTR(value, S_IRUGO, + bmm_show_value, NULL); +static DEVICE_ATTR(value_raw, S_IRUGO, + bmm_show_value_raw, NULL); +static DEVICE_ATTR(enable, S_IRUGO|S_IWUSR, + bmm_show_enable, bmm_store_enable); +static DEVICE_ATTR(delay, S_IRUGO|S_IWUSR, + bmm_show_delay, bmm_store_delay); +static DEVICE_ATTR(test, S_IRUGO|S_IWUSR, + bmm_show_test, bmm_store_test); +static DEVICE_ATTR(reg, S_IRUGO, + bmm_show_reg, NULL); +static DEVICE_ATTR(place, S_IRUGO|S_IWUSR|S_IWGRP|S_IWOTH, + bmm_show_place, bmm_store_place); + +static struct attribute *bmm_attributes[] = { + &dev_attr_chip_id.attr, + &dev_attr_op_mode.attr, + &dev_attr_odr.attr, + &dev_attr_rept_xy.attr, + &dev_attr_rept_z.attr, + &dev_attr_value.attr, + &dev_attr_value_raw.attr, + &dev_attr_enable.attr, + &dev_attr_delay.attr, + &dev_attr_test.attr, + &dev_attr_reg.attr, + &dev_attr_place.attr, + NULL +}; + + +static struct attribute_group bmm_attribute_group = { + .attrs = bmm_attributes +}; + + +static int bmm_input_init(struct bmm_client_data *client_data) +{ + struct input_dev *dev; + int err = 0; + + dev = input_allocate_device(); + if (NULL == dev) + return -ENOMEM; + + dev->name = SENSOR_NAME; + dev->id.bustype = BUS_I2C; + + input_set_capability(dev, EV_ABS, ABS_MISC); + input_set_abs_params(dev, ABS_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); + input_set_abs_params(dev, ABS_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); + input_set_abs_params(dev, ABS_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); + input_set_drvdata(dev, client_data); + + err = input_register_device(dev); + if (err < 0) { + input_free_device(dev); + return err; + } + client_data->input = dev; + + return 0; +} + +static void bmm_input_destroy(struct bmm_client_data *client_data) +{ + struct input_dev *dev = client_data->input; + + input_unregister_device(dev); + input_free_device(dev); +} + +static int bmm_restore_hw_cfg(struct i2c_client *client) +{ + int err = 0; + u8 value; + struct bmm_client_data *client_data = + (struct bmm_client_data *)i2c_get_clientdata(client); + int op_mode; + + mutex_lock(&client_data->mutex_op_mode); + err = bmm_set_op_mode(client_data, BMM_VAL_NAME(SLEEP_MODE)); + + if (bmm_get_op_mode_idx(client_data->op_mode) != -1) + err = bmm_set_op_mode(client_data, client_data->op_mode); + + op_mode = client_data->op_mode; + mutex_unlock(&client_data->mutex_op_mode); + + if (BMM_VAL_NAME(SUSPEND_MODE) == op_mode) + return err; + + PINFO("app did not close this sensor before suspend"); + + mutex_lock(&client_data->mutex_odr); + BMM_CALL_API(set_datarate)(client_data->odr); + mdelay(BMM_I2C_WRITE_DELAY_TIME); + mutex_unlock(&client_data->mutex_odr); + + mutex_lock(&client_data->mutex_rept_xy); + err = bmm_i2c_write(client, BMM_REG_NAME(NO_REPETITIONS_XY), + &client_data->rept_xy, 1); + mdelay(BMM_I2C_WRITE_DELAY_TIME); + err = bmm_i2c_read(client, BMM_REG_NAME(NO_REPETITIONS_XY), &value, 1); + PINFO("BMM_NO_REPETITIONS_XY: %02x", value); + mutex_unlock(&client_data->mutex_rept_xy); + + mutex_lock(&client_data->mutex_rept_z); + err = bmm_i2c_write(client, BMM_REG_NAME(NO_REPETITIONS_Z), + &client_data->rept_z, 1); + mdelay(BMM_I2C_WRITE_DELAY_TIME); + err = bmm_i2c_read(client, BMM_REG_NAME(NO_REPETITIONS_Z), &value, 1); + PINFO("BMM_NO_REPETITIONS_Z: %02x", value); + mutex_unlock(&client_data->mutex_rept_z); + + mutex_lock(&client_data->mutex_op_mode); + if (BMM_OP_MODE_UNKNOWN == client_data->op_mode) { + bmm_set_forced_mode(client); + PINFO("set forced mode after hw_restore"); + mdelay(bmm_get_forced_drdy_time(client_data->rept_xy, + client_data->rept_z)); + } + mutex_unlock(&client_data->mutex_op_mode); + + + PINFO("register dump after init"); + bmm_dump_reg(client); + + return err; +} + +#ifdef CONFIG_OF +static int bmm_parse_dt(struct device *dev, + struct bosch_sensor_specific *bst_pd) +{ + struct device_node *np = dev->of_node; + u32 temp_val; + int rc; + + rc = of_property_read_u32(np, "bosch,place", &temp_val); + if (rc && (rc != -EINVAL)) { + dev_err(dev, "Unable to read sensor place paramater\n"); + return rc; + } + if (temp_val > 7 || temp_val < 0) { + dev_err(dev, "Invalid place parameter, use default value 0\n"); + bst_pd->place = 0; + } else { + bst_pd->place = temp_val; + } + + return 0; +} +#else +static int bmm_parse_dt(struct device *dev, + struct bosch_sensor_specific *bst_pd) +{ + return -EINVAL; +} +#endif + +static int sensor_set_power(struct i2c_client *client, int enable) +{ + int err = 0; + struct regulator *vdd_reg = NULL; + struct regulator *vio_reg = NULL; + + + vdd_reg = devm_regulator_get(&client->dev, "vdd"); + if (IS_ERR_OR_NULL(vdd_reg)) { + dev_err(&client->dev, "Error of setting voltage\n"); + return PTR_ERR(vdd_reg); + } + regulator_set_voltage(vdd_reg, 2850000, 2850000); + + vio_reg = devm_regulator_get(&client->dev, "vio"); + if (IS_ERR_OR_NULL(vio_reg)) { + dev_err(&client->dev, "Error of setting voltage\n"); + return PTR_ERR(vio_reg); + } + regulator_set_voltage(vio_reg, 1800000, 1800000); + + if (enable) { + err = regulator_enable(vdd_reg); + err = regulator_enable(vio_reg); + } else { + regulator_disable(vdd_reg); + regulator_disable(vio_reg); + } + return 0; +} + +static int bmm_probe(struct i2c_client *client, const struct i2c_device_id *id) +{ + int err = 0; + struct bmm_client_data *client_data = NULL; + int dummy; + + /* power on */ + sensor_set_power(client,1); + + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { + PERR("i2c_check_functionality error!"); + err = -EIO; + goto exit_err_clean; + } + + if (NULL == bmm_client) { + bmm_client = client; + } else { + PERR("this driver does not support multiple clients"); + err = -EBUSY; + return err; + } + + /* wake up the chip */ + dummy = bmm_wakeup(client); + if (dummy < 0) { + PERR("Cannot wake up %s, I2C xfer error", SENSOR_NAME); + err = -EIO; + goto exit_err_clean; + } + + bmm_dump_reg(client); + /* check chip id */ + err = bmm_check_chip_id(client); + if (err) { + PERR("Bosch Sensortec Device not found, chip id mismatch"); + goto exit_err_clean; + } + + client_data = kzalloc(sizeof(struct bmm_client_data), GFP_KERNEL); + if (NULL == client_data) { + PERR("no memory available"); + err = -ENOMEM; + goto exit_err_clean; + } + + i2c_set_clientdata(client, client_data); + client_data->client = client; + + mutex_init(&client_data->mutex_power_mode); + mutex_init(&client_data->mutex_op_mode); + mutex_init(&client_data->mutex_enable); + mutex_init(&client_data->mutex_odr); + mutex_init(&client_data->mutex_rept_xy); + mutex_init(&client_data->mutex_rept_z); + mutex_init(&client_data->mutex_value); + + /* input device init */ + err = bmm_input_init(client_data); + if (err < 0) + goto exit_err_clean; + + /* sysfs node creation */ + err = sysfs_create_group(&client_data->input->dev.kobj, + &bmm_attribute_group); + + if (err < 0) + goto exit_err_sysfs; + +#ifdef CONFIG_BMM_USE_PLATFORM_DATA + if (client->dev.of_node) { + client_data->bst_pd = kzalloc(sizeof(*client_data->bst_pd), + GFP_KERNEL); + if (!client_data->bst_pd) { + dev_err(&client->dev, "Failed to allcated memory\n"); + err = -ENOMEM; + goto exit_err_sysfs; + } + err = bmm_parse_dt(&client->dev, client_data->bst_pd); + if (err) { + dev_err(&client->dev, "Failed to parse device tree\n"); + err = -EINVAL; + goto bst_pd_free_exit; + } + } else { + if (NULL != client->dev.platform_data) { + client_data->bst_pd = kzalloc(sizeof(*client_data->bst_pd), + GFP_KERNEL); + + if (NULL != client_data->bst_pd) { + memcpy(client_data->bst_pd, client->dev.platform_data, + sizeof(*client_data->bst_pd)); + + PINFO("platform data of bmm %s: place: %d, irq: %d", + client_data->bst_pd->name, + client_data->bst_pd->place, + client_data->bst_pd->irq); + } + } + } +#endif + + /* workqueue init */ + INIT_DELAYED_WORK(&client_data->work, bmm_work_func); + atomic_set(&client_data->delay, BMM_DELAY_DEFAULT); + + /* h/w init */ + client_data->device.bus_read = bmm_i2c_read_wrapper; + client_data->device.bus_write = bmm_i2c_write_wrapper; + client_data->device.delay_msec = bmm_delay; + BMM_CALL_API(init)(&client_data->device); + + bmm_dump_reg(client); + + PDEBUG("trimming_reg x1: %d y1: %d x2: %d y2: %d xy1: %d xy2: %d", + client_data->device.dig_x1, + client_data->device.dig_y1, + client_data->device.dig_x2, + client_data->device.dig_y2, + client_data->device.dig_xy1, + client_data->device.dig_xy2); + + PDEBUG("trimming_reg z1: %d z2: %d z3: %d z4: %d xyz1: %d", + client_data->device.dig_z1, + client_data->device.dig_z2, + client_data->device.dig_z3, + client_data->device.dig_z4, + client_data->device.dig_xyz1); + + client_data->enable = 0; + /* now it's power on which is considered as resuming from suspend */ + client_data->op_mode = BMM_VAL_NAME(SUSPEND_MODE); + client_data->odr = BMM_DEFAULT_ODR; + client_data->rept_xy = BMM_DEFAULT_REPETITION_XY; + client_data->rept_z = BMM_DEFAULT_REPETITION_Z; + + err = bmm_set_op_mode(client_data, BMM_VAL_NAME(SUSPEND_MODE)); + if (err) { + PERR("fail to init h/w of %s", SENSOR_NAME); + err = -EIO; + goto bst_pd_free_exit; + } + +#ifdef CONFIG_HAS_EARLYSUSPEND + client_data->early_suspend_handler.level = + EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1; + client_data->early_suspend_handler.suspend = bmm_early_suspend; + client_data->early_suspend_handler.resume = bmm_late_resume; + register_early_suspend(&client_data->early_suspend_handler); +#endif + + PNOTICE("sensor %s probed successfully", SENSOR_NAME); + + PDEBUG("i2c_client: %p client_data: %p i2c_device: %p input: %p", + client, client_data, &client->dev, client_data->input); + + return 0; +bst_pd_free_exit: + if ((NULL != client_data) && (NULL != client_data->bst_pd)) { + kfree(client_data->bst_pd); + client_data->bst_pd = NULL; + } + +exit_err_sysfs: + if (err) + bmm_input_destroy(client_data); + +exit_err_clean: + if (err) { + if (client_data != NULL) { +#ifdef CONFIG_BMM_USE_PLATFORM_DATA + if (NULL != client_data->bst_pd) { + kfree(client_data->bst_pd); + client_data->bst_pd = NULL; + } +#endif + kfree(client_data); + client_data = NULL; + } + + bmm_client = NULL; + } + + return err; +} + +static int bmm_pre_suspend(struct i2c_client *client) +{ + int err = 0; + struct bmm_client_data *client_data = + (struct bmm_client_data *)i2c_get_clientdata(client); + PDEBUG("function entrance"); + + mutex_lock(&client_data->mutex_enable); + if (client_data->enable) { + cancel_delayed_work_sync(&client_data->work); + PDEBUG("cancel work"); + } + mutex_unlock(&client_data->mutex_enable); + + return err; +} + +static int bmm_post_resume(struct i2c_client *client) +{ + int err = 0; + struct bmm_client_data *client_data = + (struct bmm_client_data *)i2c_get_clientdata(client); + + mutex_lock(&client_data->mutex_enable); + if (client_data->enable) { + schedule_delayed_work(&client_data->work, + msecs_to_jiffies( + atomic_read(&client_data->delay))); + } + mutex_unlock(&client_data->mutex_enable); + + return err; +} + +#ifdef CONFIG_HAS_EARLYSUSPEND +static void bmm_early_suspend(struct early_suspend *handler) +{ + struct bmm_client_data *client_data = + (struct bmm_client_data *)container_of(handler, + struct bmm_client_data, early_suspend_handler); + struct i2c_client *client = client_data->client; + u8 power_mode; + PDEBUG("function entrance"); + + mutex_lock(&client_data->mutex_power_mode); + BMM_CALL_API(get_powermode)(&power_mode); + if (power_mode) { + bmm_pre_suspend(client); + bmm_set_op_mode(client_data, BMM_VAL_NAME(SUSPEND_MODE)); + } + mutex_unlock(&client_data->mutex_power_mode); + +} + +static void bmm_late_resume(struct early_suspend *handler) +{ + struct bmm_client_data *client_data = + (struct bmm_client_data *)container_of(handler, + struct bmm_client_data, early_suspend_handler); + struct i2c_client *client = client_data->client; + PDEBUG("function entrance"); + + mutex_lock(&client_data->mutex_power_mode); + + bmm_restore_hw_cfg(client); + /* post resume operation */ + bmm_post_resume(client); + + mutex_unlock(&client_data->mutex_power_mode); +} +#else +static int bmm_suspend(struct i2c_client *client, pm_message_t mesg) +{ + int err = 0; + struct bmm_client_data *client_data = + (struct bmm_client_data *)i2c_get_clientdata(client); + u8 power_mode; + + mutex_lock(&client_data->mutex_power_mode); + BMM_CALL_API(get_powermode)(&power_mode); + if (power_mode) { + err = bmm_pre_suspend(client); + err = bmm_set_op_mode(client_data, BMM_VAL_NAME(SUSPEND_MODE)); + } + mutex_unlock(&client_data->mutex_power_mode); + + return err; +} + +static int bmm_resume(struct i2c_client *client) +{ + int err = 0; + struct bmm_client_data *client_data = + (struct bmm_client_data *)i2c_get_clientdata(client); + + mutex_lock(&client_data->mutex_power_mode); + err = bmm_restore_hw_cfg(client); + /* post resume operation */ + bmm_post_resume(client); + + mutex_unlock(&client_data->mutex_power_mode); + + return err; +} +#endif + +void bmm_shutdown(struct i2c_client *client) +{ + struct bmm_client_data *client_data = + (struct bmm_client_data *)i2c_get_clientdata(client); + + mutex_lock(&client_data->mutex_power_mode); + bmm_set_op_mode(client_data, BMM_VAL_NAME(SUSPEND_MODE)); + mutex_unlock(&client_data->mutex_power_mode); +} + +static int bmm_remove(struct i2c_client *client) +{ + int err = 0; + struct bmm_client_data *client_data = + (struct bmm_client_data *)i2c_get_clientdata(client); + + if (NULL != client_data) { +#ifdef CONFIG_HAS_EARLYSUSPEND + unregister_early_suspend(&client_data->early_suspend_handler); +#endif + + mutex_lock(&client_data->mutex_op_mode); + if (BMM_VAL_NAME(NORMAL_MODE) == client_data->op_mode) { + cancel_delayed_work_sync(&client_data->work); + PDEBUG("cancel work"); + } + mutex_unlock(&client_data->mutex_op_mode); + + err = bmm_set_op_mode(client_data, BMM_VAL_NAME(SUSPEND_MODE)); + mdelay(BMM_I2C_WRITE_DELAY_TIME); + + sysfs_remove_group(&client_data->input->dev.kobj, + &bmm_attribute_group); + bmm_input_destroy(client_data); + +#ifdef CONFIG_BMM_USE_PLATFORM_DATA + if (NULL != client_data->bst_pd) { + kfree(client_data->bst_pd); + client_data->bst_pd = NULL; + } +#endif + kfree(client_data); + + bmm_client = NULL; + } + + return err; +} + +static const struct i2c_device_id bmm_id[] = { + {SENSOR_NAME, 0}, + {} +}; + +static struct of_device_id bmm050_match_table[] = { + { .compatible = "bosch,bmm050",}, + { }, +}; + + +MODULE_DEVICE_TABLE(i2c, bmm_id); + +static struct i2c_driver bmm_driver = { + .driver = { + .owner = THIS_MODULE, + .name = SENSOR_NAME, + .of_match_table = bmm050_match_table, + }, + .class = I2C_CLASS_HWMON, + .id_table = bmm_id, + .probe = bmm_probe, + .remove = bmm_remove, + .shutdown = bmm_shutdown, +#ifndef CONFIG_HAS_EARLYSUSPEND + .suspend = bmm_suspend, + .resume = bmm_resume, +#endif +}; + +static int __init BMM_init(void) +{ + return i2c_add_driver(&bmm_driver); +} + +static void __exit BMM_exit(void) +{ + i2c_del_driver(&bmm_driver); +} + +MODULE_AUTHOR("contact@bosch.sensortec.com"); +MODULE_DESCRIPTION("BMM MAGNETIC SENSOR DRIVER"); +MODULE_LICENSE("GPL v2"); + +module_init(BMM_init); +module_exit(BMM_exit); diff --git a/drivers/input/misc/bs_log.h b/drivers/input/misc/bs_log.h new file mode 100644 index 00000000000..fb455348a82 --- /dev/null +++ b/drivers/input/misc/bs_log.h @@ -0,0 +1,83 @@ +/*! + * @section LICENSE + * (C) Copyright 2011~2014 Bosch Sensortec GmbH All Rights Reserved + * + * This software program is licensed subject to the GNU General + * Public License (GPL).Version 2,June 1991, + * available at http://www.fsf.org/copyleft/gpl.html + * + * @filename bs_log.h + * @date "Fri Aug 2 17:41:45 2013 +0800" + * @id "644147c" + * + * @brief + * The head file of BOSCH SENSOR LOG +*/ + +#ifndef __BS_LOG_H +#define __BS_LOG_H + +#include + +/*! @defgroup bmp280_core_src + * @brief The core code of BMP280 device driver + @{*/ +/*! ERROR LOG LEVEL */ +#define LOG_LEVEL_E 3 +/*! NOTICE LOG LEVEL */ +#define LOG_LEVEL_N 5 +/*! INFORMATION LOG LEVEL */ +#define LOG_LEVEL_I 6 +/*! DEBUG LOG LEVEL */ +#define LOG_LEVEL_D 7 + +#ifndef LOG_LEVEL +/*! LOG LEVEL DEFINATION */ +#define LOG_LEVEL LOG_LEVEL_I +#endif + +#ifndef MODULE_TAG +/*! MODULE TAG DEFINATION */ +#define MODULE_TAG "" +#endif + +#if (LOG_LEVEL >= LOG_LEVEL_E) +/*! print error message */ +#define PERR(fmt, args...) \ + printk(KERN_INFO "\n" "[E]" KERN_ERR MODULE_TAG \ + "<%s><%d>" fmt "\n", __func__, __LINE__, ##args) +#else +/*! invalid message */ +#define PERR(fmt, args...) +#endif + +#if (LOG_LEVEL >= LOG_LEVEL_N) +/*! print notice message */ +#define PNOTICE(fmt, args...) \ + printk(KERN_INFO "\n" "[N]" KERN_NOTICE MODULE_TAG \ + "<%s><%d>" fmt "\n", __func__, __LINE__, ##args) +#else +/*! invalid message */ +#define PNOTICE(fmt, args...) +#endif + +#if (LOG_LEVEL >= LOG_LEVEL_I) +/*! print information message */ +#define PINFO(fmt, args...) printk(KERN_INFO "\n" "[I]" KERN_INFO MODULE_TAG \ + "<%s><%d>" fmt "\n", __func__, __LINE__, ##args) +#else +/*! invalid message */ +#define PINFO(fmt, args...) +#endif + +#if (LOG_LEVEL >= LOG_LEVEL_D) +/*! print debug message */ +#define PDEBUG(fmt, args...) printk(KERN_INFO "\n" "[D]" KERN_DEBUG MODULE_TAG \ + "<%s><%d>" fmt "\n", __func__, __LINE__, ##args) +#else +/*! invalid message */ +#define PDEBUG(fmt, args...) +#endif + +#endif/*__BS_LOG_H*/ +/*@}*/ diff --git a/drivers/input/misc/coolpad_hall.c b/drivers/input/misc/coolpad_hall.c new file mode 100644 index 00000000000..96e98ff0a0e --- /dev/null +++ b/drivers/input/misc/coolpad_hall.c @@ -0,0 +1,488 @@ +/********************************************************************************/ +/* */ +/* Copyright (c) 2000-2010 YULONG Company �������������� */ +/* ���������ͨ�ſƼ������ڣ����޹�˾ ��Ȩ���� 2000-2010 */ +/* */ +/* PROPRIETARY RIGHTS of YULONG Company are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, use, */ +/* and sales rights pertaining to this subject matter are governed by the */ +/* license agreement. The recipient of this sofPARAMSare implicitly accepts */ +/* the terms of the license. */ +/* �������ĵ�������������˾���ʲ�,�κ���ʿ�Ķ���ʹ�ñ����ϱ����� */ +/* ��Ӧ��������Ȩ,�е��������κͽ�����Ӧ�ķ���Լ��. */ +/* */ +/********************************************************************************/ + +/************************************************************************** +** Copyright (C), 2000-2010, Yulong Tech. Co., Ltd. +** FileName: Coolpad_hall.c +** Author: shuaixinzhong +** Version : 1.00 +** Date: 2010-12-20 +** Description: hall driver +** +** History: +**