[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80b5d56d-b16f-4a93-8868-0a23b10f6ab8@wanadoo.fr>
Date: Sat, 14 Dec 2024 12:33:27 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Lothar Rubusch <l.rubusch@...il.com>
Cc: devicetree@...r.kernel.org, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, eraretuya@...il.com, l.rubusch@...il.com,
lars@...afoo.de, Michael.Hennerich@...log.com, jic23@...nel.org,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org
Subject: Re: [PATCH v7 1/7] iio: accel: adxl345: add function to switch
measuring mode
Le 13/12/2024 à 22:19, Lothar Rubusch a écrit :
> 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;
Nitpick: useless init
> +
> + val = (en) ? ADXL345_POWER_CTL_MEASURE : ADXL345_POWER_CTL_STANDBY;
Nitpick: useless () around en.
> + return regmap_write(st->regmap, ADXL345_REG_POWER_CTL, val);
> +}
...
Powered by blists - more mailing lists