]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rtc: max77686: convert to i2c_new_ancillary_device
authorSvyatoslav Ryhel <clamor95@gmail.com>
Thu, 12 Mar 2026 08:52:58 +0000 (10:52 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 12 Mar 2026 16:54:22 +0000 (17:54 +0100)
commit0d65a9d93d870ef3d13642f88d0e6d562790c96d
treea203b3095510b200f129b518b3d0ca49dd884f45
parentcbf39bfd4bf938494dcc5f699e6bfa04e1916873
rtc: max77686: convert to i2c_new_ancillary_device

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.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Link: https://patch.msgid.link/20260312085258.11431-6-clamor95@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-max77686.c