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

kernel update

File:
1 edited

Legend:

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

    r31574 r31859  
    2828#include <linux/iio/triggered_buffer.h>
    2929#include <linux/regmap.h>
     30#include <linux/delay.h>
    3031#include "bmg160.h"
    3132
     
    5253#define BMG160_DEF_BW                   100
    5354#define BMG160_REG_PMU_BW_RES           BIT(7)
     55
     56#define BMG160_GYRO_REG_RESET           0x14
     57#define BMG160_GYRO_RESET_VAL           0xb6
    5458
    5559#define BMG160_REG_INT_MAP_0            0x17
     
    236240        int ret;
    237241        unsigned int val;
     242
     243        /*
     244         * Reset chip to get it in a known good state. A delay of 30ms after
     245         * reset is required according to the datasheet.
     246         */
     247        regmap_write(data->regmap, BMG160_GYRO_REG_RESET,
     248                     BMG160_GYRO_RESET_VAL);
     249        usleep_range(30000, 30700);
    238250
    239251        ret = regmap_read(data->regmap, BMG160_REG_CHIP_ID, &val);
Note: See TracChangeset for help on using the changeset viewer.