Replace the powerup / powerdown functions by a generic function to put
the sensor in STANDBY, or MEASURE mode. When configuring the FIFO for
several features of the accelerometer, it is recommended to put
measuring in STANDBY mode.
+static int adxl345_set_measure_en(struct adxl345_state *st, bool en)
+{
+ unsigned int val = 0;
+
+ val = (en) ? ADXL345_POWER_CTL_MEASURE : ADXL345_POWER_CTL_STANDBY;
+ return regmap_write(st->regmap, ADXL345_REG_POWER_CTL, val);
+}