[PATCH v2 0/2] rtc: max77686: convert to i2c_new_ancillary_device

Svyatoslav Ryhel posted 2 patches 1 month, 3 weeks ago
There is a newer version of this series
Documentation/devicetree/bindings/mfd/max77620.txt |  4 +++-
drivers/rtc/rtc-max77686.c                         | 14 ++++++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
[PATCH v2 0/2] rtc: max77686: convert to i2c_new_ancillary_device
Posted by Svyatoslav Ryhel 1 month, 3 weeks ago
Convert RTC I2C device creation from devm_i2c_new_dummy_device() to
i2c_new_ancillary_device() to enable the use of a device tree-specified
RTC address instead of a hardcoded value. If the device tree does not
provide an address, use hardcoded values as a fallback.

This addresses an issue with the MAX77663 PMIC, which can have the RTC at
different I2C positions (either 0x48, like the MAX77714, or 0x68, like
the MAX77620). The MAX77620 value is used as the default. The I2C position
of the MAX77663 is factory-set and cannot be detected from the chip
itself.

I have tested this patch on LG Optimus Vu P895 with max77663 PMIC and
non-default RTC position. RTC is registered correctly.

---
Changes in v2
- dropped patch that changes max77686 and adjusted max77620 where max77663
  is described.
---

Svyatoslav Ryhel (2):
  dt-bindings: mfd: max77620: document optional RTC address for max77663
  rtc: max77686: convert to i2c_new_ancillary_device

 Documentation/devicetree/bindings/mfd/max77620.txt |  4 +++-
 drivers/rtc/rtc-max77686.c                         | 14 ++++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

-- 
2.51.0