Ignore:
Timestamp:
Apr 14, 2017, 9:41:36 PM (11 days ago)
Author:
brainslayer
Message:

kernel update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.4/drivers/iio/gyro/bmg160_core.c

    r29492 r31859  
    2929#include <linux/iio/triggered_buffer.h>
    3030#include <linux/regmap.h>
     31#include <linux/delay.h>
    3132#include "bmg160.h"
    3233
     
    5354#define BMG160_NO_FILTER                0
    5455#define BMG160_DEF_BW                   100
     56
     57#define BMG160_GYRO_REG_RESET           0x14
     58#define BMG160_GYRO_RESET_VAL           0xb6
    5559
    5660#define BMG160_REG_INT_MAP_0            0x17
     
    186190        int ret;
    187191        unsigned int val;
     192
     193        /*
     194         * Reset chip to get it in a known good state. A delay of 30ms after
     195         * reset is required according to the datasheet.
     196         */
     197        regmap_write(data->regmap, BMG160_GYRO_REG_RESET,
     198                     BMG160_GYRO_RESET_VAL);
     199        usleep_range(30000, 30700);
    188200
    189201        ret = regmap_read(data->regmap, BMG160_REG_CHIP_ID, &val);
Note: See TracChangeset for help on using the changeset viewer.