18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Hardware monitoring driver for Renesas Digital Multiphase Voltage Regulators 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 2017 Google Inc 68c2ecf20Sopenharmony_ci * Copyright (c) 2020 Renesas Electronics America 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include <linux/err.h> 118c2ecf20Sopenharmony_ci#include <linux/hwmon-sysfs.h> 128c2ecf20Sopenharmony_ci#include <linux/i2c.h> 138c2ecf20Sopenharmony_ci#include <linux/init.h> 148c2ecf20Sopenharmony_ci#include <linux/kernel.h> 158c2ecf20Sopenharmony_ci#include <linux/module.h> 168c2ecf20Sopenharmony_ci#include <linux/string.h> 178c2ecf20Sopenharmony_ci#include <linux/sysfs.h> 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#include "pmbus.h" 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define ISL68137_VOUT_AVS 0x30 228c2ecf20Sopenharmony_ci#define RAA_DMPVR2_READ_VMON 0xc8 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_cienum chips { 258c2ecf20Sopenharmony_ci isl68137, 268c2ecf20Sopenharmony_ci isl68220, 278c2ecf20Sopenharmony_ci isl68221, 288c2ecf20Sopenharmony_ci isl68222, 298c2ecf20Sopenharmony_ci isl68223, 308c2ecf20Sopenharmony_ci isl68224, 318c2ecf20Sopenharmony_ci isl68225, 328c2ecf20Sopenharmony_ci isl68226, 338c2ecf20Sopenharmony_ci isl68227, 348c2ecf20Sopenharmony_ci isl68229, 358c2ecf20Sopenharmony_ci isl68233, 368c2ecf20Sopenharmony_ci isl68239, 378c2ecf20Sopenharmony_ci isl69222, 388c2ecf20Sopenharmony_ci isl69223, 398c2ecf20Sopenharmony_ci isl69224, 408c2ecf20Sopenharmony_ci isl69225, 418c2ecf20Sopenharmony_ci isl69227, 428c2ecf20Sopenharmony_ci isl69228, 438c2ecf20Sopenharmony_ci isl69234, 448c2ecf20Sopenharmony_ci isl69236, 458c2ecf20Sopenharmony_ci isl69239, 468c2ecf20Sopenharmony_ci isl69242, 478c2ecf20Sopenharmony_ci isl69243, 488c2ecf20Sopenharmony_ci isl69247, 498c2ecf20Sopenharmony_ci isl69248, 508c2ecf20Sopenharmony_ci isl69254, 518c2ecf20Sopenharmony_ci isl69255, 528c2ecf20Sopenharmony_ci isl69256, 538c2ecf20Sopenharmony_ci isl69259, 548c2ecf20Sopenharmony_ci isl69260, 558c2ecf20Sopenharmony_ci isl69268, 568c2ecf20Sopenharmony_ci isl69269, 578c2ecf20Sopenharmony_ci isl69298, 588c2ecf20Sopenharmony_ci raa228000, 598c2ecf20Sopenharmony_ci raa228004, 608c2ecf20Sopenharmony_ci raa228006, 618c2ecf20Sopenharmony_ci raa228228, 628c2ecf20Sopenharmony_ci raa229001, 638c2ecf20Sopenharmony_ci raa229004, 648c2ecf20Sopenharmony_ci}; 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_cienum variants { 678c2ecf20Sopenharmony_ci raa_dmpvr1_2rail, 688c2ecf20Sopenharmony_ci raa_dmpvr2_1rail, 698c2ecf20Sopenharmony_ci raa_dmpvr2_2rail, 708c2ecf20Sopenharmony_ci raa_dmpvr2_2rail_nontc, 718c2ecf20Sopenharmony_ci raa_dmpvr2_3rail, 728c2ecf20Sopenharmony_ci raa_dmpvr2_hv, 738c2ecf20Sopenharmony_ci}; 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_cistatic const struct i2c_device_id raa_dmpvr_id[]; 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_cistatic ssize_t isl68137_avs_enable_show_page(struct i2c_client *client, 788c2ecf20Sopenharmony_ci int page, 798c2ecf20Sopenharmony_ci char *buf) 808c2ecf20Sopenharmony_ci{ 818c2ecf20Sopenharmony_ci int val = pmbus_read_byte_data(client, page, PMBUS_OPERATION); 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci return sprintf(buf, "%d\n", 848c2ecf20Sopenharmony_ci (val & ISL68137_VOUT_AVS) == ISL68137_VOUT_AVS ? 1 : 0); 858c2ecf20Sopenharmony_ci} 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_cistatic ssize_t isl68137_avs_enable_store_page(struct i2c_client *client, 888c2ecf20Sopenharmony_ci int page, 898c2ecf20Sopenharmony_ci const char *buf, size_t count) 908c2ecf20Sopenharmony_ci{ 918c2ecf20Sopenharmony_ci int rc, op_val; 928c2ecf20Sopenharmony_ci bool result; 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci rc = kstrtobool(buf, &result); 958c2ecf20Sopenharmony_ci if (rc) 968c2ecf20Sopenharmony_ci return rc; 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci op_val = result ? ISL68137_VOUT_AVS : 0; 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci /* 1018c2ecf20Sopenharmony_ci * Writes to VOUT setpoint over AVSBus will persist after the VRM is 1028c2ecf20Sopenharmony_ci * switched to PMBus control. Switching back to AVSBus control 1038c2ecf20Sopenharmony_ci * restores this persisted setpoint rather than re-initializing to 1048c2ecf20Sopenharmony_ci * PMBus VOUT_COMMAND. Writing VOUT_COMMAND first over PMBus before 1058c2ecf20Sopenharmony_ci * enabling AVS control is the workaround. 1068c2ecf20Sopenharmony_ci */ 1078c2ecf20Sopenharmony_ci if (op_val == ISL68137_VOUT_AVS) { 1088c2ecf20Sopenharmony_ci rc = pmbus_read_word_data(client, page, 0xff, 1098c2ecf20Sopenharmony_ci PMBUS_VOUT_COMMAND); 1108c2ecf20Sopenharmony_ci if (rc < 0) 1118c2ecf20Sopenharmony_ci return rc; 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci rc = pmbus_write_word_data(client, page, PMBUS_VOUT_COMMAND, 1148c2ecf20Sopenharmony_ci rc); 1158c2ecf20Sopenharmony_ci if (rc < 0) 1168c2ecf20Sopenharmony_ci return rc; 1178c2ecf20Sopenharmony_ci } 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci rc = pmbus_update_byte_data(client, page, PMBUS_OPERATION, 1208c2ecf20Sopenharmony_ci ISL68137_VOUT_AVS, op_val); 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci return (rc < 0) ? rc : count; 1238c2ecf20Sopenharmony_ci} 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_cistatic ssize_t isl68137_avs_enable_show(struct device *dev, 1268c2ecf20Sopenharmony_ci struct device_attribute *devattr, 1278c2ecf20Sopenharmony_ci char *buf) 1288c2ecf20Sopenharmony_ci{ 1298c2ecf20Sopenharmony_ci struct i2c_client *client = to_i2c_client(dev->parent); 1308c2ecf20Sopenharmony_ci struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci return isl68137_avs_enable_show_page(client, attr->index, buf); 1338c2ecf20Sopenharmony_ci} 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_cistatic ssize_t isl68137_avs_enable_store(struct device *dev, 1368c2ecf20Sopenharmony_ci struct device_attribute *devattr, 1378c2ecf20Sopenharmony_ci const char *buf, size_t count) 1388c2ecf20Sopenharmony_ci{ 1398c2ecf20Sopenharmony_ci struct i2c_client *client = to_i2c_client(dev->parent); 1408c2ecf20Sopenharmony_ci struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci return isl68137_avs_enable_store_page(client, attr->index, buf, count); 1438c2ecf20Sopenharmony_ci} 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_cistatic SENSOR_DEVICE_ATTR_RW(avs0_enable, isl68137_avs_enable, 0); 1468c2ecf20Sopenharmony_cistatic SENSOR_DEVICE_ATTR_RW(avs1_enable, isl68137_avs_enable, 1); 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_cistatic struct attribute *enable_attrs[] = { 1498c2ecf20Sopenharmony_ci &sensor_dev_attr_avs0_enable.dev_attr.attr, 1508c2ecf20Sopenharmony_ci &sensor_dev_attr_avs1_enable.dev_attr.attr, 1518c2ecf20Sopenharmony_ci NULL, 1528c2ecf20Sopenharmony_ci}; 1538c2ecf20Sopenharmony_ci 1548c2ecf20Sopenharmony_cistatic const struct attribute_group enable_group = { 1558c2ecf20Sopenharmony_ci .attrs = enable_attrs, 1568c2ecf20Sopenharmony_ci}; 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_cistatic const struct attribute_group *isl68137_attribute_groups[] = { 1598c2ecf20Sopenharmony_ci &enable_group, 1608c2ecf20Sopenharmony_ci NULL, 1618c2ecf20Sopenharmony_ci}; 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_cistatic int raa_dmpvr2_read_word_data(struct i2c_client *client, int page, 1648c2ecf20Sopenharmony_ci int phase, int reg) 1658c2ecf20Sopenharmony_ci{ 1668c2ecf20Sopenharmony_ci int ret; 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ci switch (reg) { 1698c2ecf20Sopenharmony_ci case PMBUS_VIRT_READ_VMON: 1708c2ecf20Sopenharmony_ci ret = pmbus_read_word_data(client, page, phase, 1718c2ecf20Sopenharmony_ci RAA_DMPVR2_READ_VMON); 1728c2ecf20Sopenharmony_ci break; 1738c2ecf20Sopenharmony_ci default: 1748c2ecf20Sopenharmony_ci ret = -ENODATA; 1758c2ecf20Sopenharmony_ci break; 1768c2ecf20Sopenharmony_ci } 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ci return ret; 1798c2ecf20Sopenharmony_ci} 1808c2ecf20Sopenharmony_ci 1818c2ecf20Sopenharmony_cistatic struct pmbus_driver_info raa_dmpvr_info = { 1828c2ecf20Sopenharmony_ci .pages = 3, 1838c2ecf20Sopenharmony_ci .format[PSC_VOLTAGE_IN] = direct, 1848c2ecf20Sopenharmony_ci .format[PSC_VOLTAGE_OUT] = direct, 1858c2ecf20Sopenharmony_ci .format[PSC_CURRENT_IN] = direct, 1868c2ecf20Sopenharmony_ci .format[PSC_CURRENT_OUT] = direct, 1878c2ecf20Sopenharmony_ci .format[PSC_POWER] = direct, 1888c2ecf20Sopenharmony_ci .format[PSC_TEMPERATURE] = direct, 1898c2ecf20Sopenharmony_ci .m[PSC_VOLTAGE_IN] = 1, 1908c2ecf20Sopenharmony_ci .b[PSC_VOLTAGE_IN] = 0, 1918c2ecf20Sopenharmony_ci .R[PSC_VOLTAGE_IN] = 2, 1928c2ecf20Sopenharmony_ci .m[PSC_VOLTAGE_OUT] = 1, 1938c2ecf20Sopenharmony_ci .b[PSC_VOLTAGE_OUT] = 0, 1948c2ecf20Sopenharmony_ci .R[PSC_VOLTAGE_OUT] = 3, 1958c2ecf20Sopenharmony_ci .m[PSC_CURRENT_IN] = 1, 1968c2ecf20Sopenharmony_ci .b[PSC_CURRENT_IN] = 0, 1978c2ecf20Sopenharmony_ci .R[PSC_CURRENT_IN] = 2, 1988c2ecf20Sopenharmony_ci .m[PSC_CURRENT_OUT] = 1, 1998c2ecf20Sopenharmony_ci .b[PSC_CURRENT_OUT] = 0, 2008c2ecf20Sopenharmony_ci .R[PSC_CURRENT_OUT] = 1, 2018c2ecf20Sopenharmony_ci .m[PSC_POWER] = 1, 2028c2ecf20Sopenharmony_ci .b[PSC_POWER] = 0, 2038c2ecf20Sopenharmony_ci .R[PSC_POWER] = 0, 2048c2ecf20Sopenharmony_ci .m[PSC_TEMPERATURE] = 1, 2058c2ecf20Sopenharmony_ci .b[PSC_TEMPERATURE] = 0, 2068c2ecf20Sopenharmony_ci .R[PSC_TEMPERATURE] = 0, 2078c2ecf20Sopenharmony_ci .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN | PMBUS_HAVE_PIN 2088c2ecf20Sopenharmony_ci | PMBUS_HAVE_STATUS_INPUT | PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2 2098c2ecf20Sopenharmony_ci | PMBUS_HAVE_TEMP3 | PMBUS_HAVE_STATUS_TEMP 2108c2ecf20Sopenharmony_ci | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT 2118c2ecf20Sopenharmony_ci | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT | PMBUS_HAVE_POUT 2128c2ecf20Sopenharmony_ci | PMBUS_HAVE_VMON, 2138c2ecf20Sopenharmony_ci .func[1] = PMBUS_HAVE_IIN | PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT 2148c2ecf20Sopenharmony_ci | PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP3 | PMBUS_HAVE_STATUS_TEMP 2158c2ecf20Sopenharmony_ci | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_IOUT 2168c2ecf20Sopenharmony_ci | PMBUS_HAVE_STATUS_IOUT | PMBUS_HAVE_POUT, 2178c2ecf20Sopenharmony_ci .func[2] = PMBUS_HAVE_IIN | PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT 2188c2ecf20Sopenharmony_ci | PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP3 | PMBUS_HAVE_STATUS_TEMP 2198c2ecf20Sopenharmony_ci | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_IOUT 2208c2ecf20Sopenharmony_ci | PMBUS_HAVE_STATUS_IOUT | PMBUS_HAVE_POUT, 2218c2ecf20Sopenharmony_ci}; 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_cistatic int isl68137_probe(struct i2c_client *client) 2248c2ecf20Sopenharmony_ci{ 2258c2ecf20Sopenharmony_ci struct pmbus_driver_info *info; 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_ci info = devm_kzalloc(&client->dev, sizeof(*info), GFP_KERNEL); 2288c2ecf20Sopenharmony_ci if (!info) 2298c2ecf20Sopenharmony_ci return -ENOMEM; 2308c2ecf20Sopenharmony_ci memcpy(info, &raa_dmpvr_info, sizeof(*info)); 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci switch (i2c_match_id(raa_dmpvr_id, client)->driver_data) { 2338c2ecf20Sopenharmony_ci case raa_dmpvr1_2rail: 2348c2ecf20Sopenharmony_ci info->pages = 2; 2358c2ecf20Sopenharmony_ci info->R[PSC_VOLTAGE_IN] = 3; 2368c2ecf20Sopenharmony_ci info->func[0] &= ~PMBUS_HAVE_VMON; 2378c2ecf20Sopenharmony_ci info->func[1] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT 2388c2ecf20Sopenharmony_ci | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT 2398c2ecf20Sopenharmony_ci | PMBUS_HAVE_POUT; 2408c2ecf20Sopenharmony_ci info->groups = isl68137_attribute_groups; 2418c2ecf20Sopenharmony_ci break; 2428c2ecf20Sopenharmony_ci case raa_dmpvr2_1rail: 2438c2ecf20Sopenharmony_ci info->pages = 1; 2448c2ecf20Sopenharmony_ci info->read_word_data = raa_dmpvr2_read_word_data; 2458c2ecf20Sopenharmony_ci break; 2468c2ecf20Sopenharmony_ci case raa_dmpvr2_2rail_nontc: 2478c2ecf20Sopenharmony_ci info->func[0] &= ~PMBUS_HAVE_TEMP3; 2488c2ecf20Sopenharmony_ci info->func[1] &= ~PMBUS_HAVE_TEMP3; 2498c2ecf20Sopenharmony_ci fallthrough; 2508c2ecf20Sopenharmony_ci case raa_dmpvr2_2rail: 2518c2ecf20Sopenharmony_ci info->pages = 2; 2528c2ecf20Sopenharmony_ci info->read_word_data = raa_dmpvr2_read_word_data; 2538c2ecf20Sopenharmony_ci break; 2548c2ecf20Sopenharmony_ci case raa_dmpvr2_3rail: 2558c2ecf20Sopenharmony_ci info->read_word_data = raa_dmpvr2_read_word_data; 2568c2ecf20Sopenharmony_ci break; 2578c2ecf20Sopenharmony_ci case raa_dmpvr2_hv: 2588c2ecf20Sopenharmony_ci info->pages = 1; 2598c2ecf20Sopenharmony_ci info->R[PSC_VOLTAGE_IN] = 1; 2608c2ecf20Sopenharmony_ci info->m[PSC_VOLTAGE_OUT] = 2; 2618c2ecf20Sopenharmony_ci info->R[PSC_VOLTAGE_OUT] = 2; 2628c2ecf20Sopenharmony_ci info->m[PSC_CURRENT_IN] = 2; 2638c2ecf20Sopenharmony_ci info->m[PSC_POWER] = 2; 2648c2ecf20Sopenharmony_ci info->R[PSC_POWER] = -1; 2658c2ecf20Sopenharmony_ci info->read_word_data = raa_dmpvr2_read_word_data; 2668c2ecf20Sopenharmony_ci break; 2678c2ecf20Sopenharmony_ci default: 2688c2ecf20Sopenharmony_ci return -ENODEV; 2698c2ecf20Sopenharmony_ci } 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_ci return pmbus_do_probe(client, info); 2728c2ecf20Sopenharmony_ci} 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_cistatic const struct i2c_device_id raa_dmpvr_id[] = { 2758c2ecf20Sopenharmony_ci {"isl68137", raa_dmpvr1_2rail}, 2768c2ecf20Sopenharmony_ci {"isl68220", raa_dmpvr2_2rail}, 2778c2ecf20Sopenharmony_ci {"isl68221", raa_dmpvr2_3rail}, 2788c2ecf20Sopenharmony_ci {"isl68222", raa_dmpvr2_2rail}, 2798c2ecf20Sopenharmony_ci {"isl68223", raa_dmpvr2_2rail}, 2808c2ecf20Sopenharmony_ci {"isl68224", raa_dmpvr2_3rail}, 2818c2ecf20Sopenharmony_ci {"isl68225", raa_dmpvr2_2rail}, 2828c2ecf20Sopenharmony_ci {"isl68226", raa_dmpvr2_3rail}, 2838c2ecf20Sopenharmony_ci {"isl68227", raa_dmpvr2_1rail}, 2848c2ecf20Sopenharmony_ci {"isl68229", raa_dmpvr2_3rail}, 2858c2ecf20Sopenharmony_ci {"isl68233", raa_dmpvr2_2rail}, 2868c2ecf20Sopenharmony_ci {"isl68239", raa_dmpvr2_3rail}, 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_ci {"isl69222", raa_dmpvr2_2rail}, 2898c2ecf20Sopenharmony_ci {"isl69223", raa_dmpvr2_3rail}, 2908c2ecf20Sopenharmony_ci {"isl69224", raa_dmpvr2_2rail}, 2918c2ecf20Sopenharmony_ci {"isl69225", raa_dmpvr2_2rail}, 2928c2ecf20Sopenharmony_ci {"isl69227", raa_dmpvr2_3rail}, 2938c2ecf20Sopenharmony_ci {"isl69228", raa_dmpvr2_3rail}, 2948c2ecf20Sopenharmony_ci {"isl69234", raa_dmpvr2_2rail}, 2958c2ecf20Sopenharmony_ci {"isl69236", raa_dmpvr2_2rail}, 2968c2ecf20Sopenharmony_ci {"isl69239", raa_dmpvr2_3rail}, 2978c2ecf20Sopenharmony_ci {"isl69242", raa_dmpvr2_2rail}, 2988c2ecf20Sopenharmony_ci {"isl69243", raa_dmpvr2_1rail}, 2998c2ecf20Sopenharmony_ci {"isl69247", raa_dmpvr2_2rail}, 3008c2ecf20Sopenharmony_ci {"isl69248", raa_dmpvr2_2rail}, 3018c2ecf20Sopenharmony_ci {"isl69254", raa_dmpvr2_2rail}, 3028c2ecf20Sopenharmony_ci {"isl69255", raa_dmpvr2_2rail}, 3038c2ecf20Sopenharmony_ci {"isl69256", raa_dmpvr2_2rail}, 3048c2ecf20Sopenharmony_ci {"isl69259", raa_dmpvr2_2rail}, 3058c2ecf20Sopenharmony_ci {"isl69260", raa_dmpvr2_2rail}, 3068c2ecf20Sopenharmony_ci {"isl69268", raa_dmpvr2_2rail}, 3078c2ecf20Sopenharmony_ci {"isl69269", raa_dmpvr2_3rail}, 3088c2ecf20Sopenharmony_ci {"isl69298", raa_dmpvr2_2rail}, 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_ci {"raa228000", raa_dmpvr2_hv}, 3118c2ecf20Sopenharmony_ci {"raa228004", raa_dmpvr2_hv}, 3128c2ecf20Sopenharmony_ci {"raa228006", raa_dmpvr2_hv}, 3138c2ecf20Sopenharmony_ci {"raa228228", raa_dmpvr2_2rail_nontc}, 3148c2ecf20Sopenharmony_ci {"raa229001", raa_dmpvr2_2rail}, 3158c2ecf20Sopenharmony_ci {"raa229004", raa_dmpvr2_2rail}, 3168c2ecf20Sopenharmony_ci {} 3178c2ecf20Sopenharmony_ci}; 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(i2c, raa_dmpvr_id); 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_ci/* This is the driver that will be inserted */ 3228c2ecf20Sopenharmony_cistatic struct i2c_driver isl68137_driver = { 3238c2ecf20Sopenharmony_ci .driver = { 3248c2ecf20Sopenharmony_ci .name = "isl68137", 3258c2ecf20Sopenharmony_ci }, 3268c2ecf20Sopenharmony_ci .probe_new = isl68137_probe, 3278c2ecf20Sopenharmony_ci .remove = pmbus_do_remove, 3288c2ecf20Sopenharmony_ci .id_table = raa_dmpvr_id, 3298c2ecf20Sopenharmony_ci}; 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_cimodule_i2c_driver(isl68137_driver); 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ciMODULE_AUTHOR("Maxim Sloyko <maxims@google.com>"); 3348c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("PMBus driver for Renesas digital multiphase voltage regulators"); 3358c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL"); 336