Thread (21 messages) 21 messages, 3 authors, 2018-07-25

Re: [PATCH v2 1/7] iio: imu: mpu6050: add support for regulator framework

From: Rob Herring <robh@kernel.org>
Date: 2018-07-20 17:02:46
Also in: linux-arm-msm, linux-iio, lkml

On Tue, Jul 17, 2018 at 04:41:52AM -0400, Brian Masney wrote:
This patch adds support for the regulator framework to the mpu6050
driver.

Signed-off-by: Brian Masney <redacted>
Signed-off-by: Jonathan Marek <redacted>
---
Changes since v1:
- Use devm_regulator_get() instead of devm_regulator_get_optional()
- Use devm_add_action() for cleaning up the regulator.
- Correct ordering of resume code.
- Add regulator_enabled flag to ensure regulator is not disabled twice,
  specifically the case where the device is suspended and then the
  driver is removed.

Original extra changelog from v1:

This is a variation of Jonathan Marek's patch from postmarketOS
https://gitlab.com/postmarketOS/linux-postmarketos/commit/b8ad1ec1859c8bbcbce94944b3f4dd68f8f9fc37
with the following changes:

- Stripped out 6515 variant code.
- Add the regulator to the mpu core instead of only the i2c variant.
- Add error handling.
- Release the regulator on suspend, device remove, etc.
- Device tree documentation.

 .../bindings/iio/imu/inv_mpu6050.txt          |  1 +
Acked-by: Rob Herring <robh@kernel.org>
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    | 73 +++++++++++++++++++
 drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h     |  3 +
 3 files changed, 77 insertions(+)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help