Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: da9063: Add device tree support

Add device tree support for DA9063 regulators; Real-Time Clock
and Watchdog.

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Steve Twiss and committed by
Lee Jones
71e03de4 80392682

+12
+2
drivers/mfd/da9063-core.c
··· 86 86 }, 87 87 { 88 88 .name = DA9063_DRVNAME_WATCHDOG, 89 + .of_compatible = "dlg,da9063-watchdog", 89 90 }, 90 91 { 91 92 .name = DA9063_DRVNAME_HWMON, ··· 102 101 .name = DA9063_DRVNAME_RTC, 103 102 .num_resources = ARRAY_SIZE(da9063_rtc_resources), 104 103 .resources = da9063_rtc_resources, 104 + .of_compatible = "dlg,da9063-rtc", 105 105 }, 106 106 { 107 107 .name = DA9063_DRVNAME_VIBRATION,
+9
drivers/mfd/da9063-i2c.c
··· 25 25 #include <linux/mfd/da9063/pdata.h> 26 26 #include <linux/mfd/da9063/registers.h> 27 27 28 + #include <linux/of.h> 29 + #include <linux/regulator/of_regulator.h> 30 + 28 31 static const struct regmap_range da9063_ad_readable_ranges[] = { 29 32 { 30 33 .range_min = DA9063_REG_PAGE_CON, ··· 206 203 .cache_type = REGCACHE_RBTREE, 207 204 }; 208 205 206 + static const struct of_device_id da9063_dt_ids[] = { 207 + { .compatible = "dlg,da9063", }, 208 + { } 209 + }; 210 + MODULE_DEVICE_TABLE(of, da9063_dt_ids); 209 211 static int da9063_i2c_probe(struct i2c_client *i2c, 210 212 const struct i2c_device_id *id) 211 213 { ··· 265 257 .driver = { 266 258 .name = "da9063", 267 259 .owner = THIS_MODULE, 260 + .of_match_table = of_match_ptr(da9063_dt_ids), 268 261 }, 269 262 .probe = da9063_i2c_probe, 270 263 .remove = da9063_i2c_remove,
+1
include/linux/mfd/da9063/core.h
··· 36 36 enum da9063_variant_codes { 37 37 PMIC_DA9063_AD = 0x3, 38 38 PMIC_DA9063_BB = 0x5, 39 + PMIC_DA9063_CA = 0x6, 39 40 }; 40 41 41 42 /* Interrupts */