Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) //
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) // SY8824C/SY8824E regulator driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) //
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) // Copyright (C) 2019 Synaptics Incorporated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) //
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) // Author: Jisheng Zhang <jszhang@kernel.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/i2c.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <linux/of_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/regmap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <linux/regulator/driver.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include <linux/regulator/of_regulator.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #define SY8824C_BUCK_EN		(1 << 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #define SY8824C_MODE		(1 << 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) struct sy8824_config {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	/* registers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	unsigned int vol_reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	unsigned int mode_reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	unsigned int enable_reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	/* Voltage range and step(linear) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	unsigned int vsel_min;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	unsigned int vsel_step;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	unsigned int vsel_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) struct sy8824_device_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	struct device *dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	struct regulator_desc desc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	struct regulator_init_data *regulator;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	const struct sy8824_config *cfg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) static int sy8824_set_mode(struct regulator_dev *rdev, unsigned int mode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	struct sy8824_device_info *di = rdev_get_drvdata(rdev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	const struct sy8824_config *cfg = di->cfg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	switch (mode) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	case REGULATOR_MODE_FAST:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		regmap_update_bits(rdev->regmap, cfg->mode_reg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 				   SY8824C_MODE, SY8824C_MODE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	case REGULATOR_MODE_NORMAL:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 		regmap_update_bits(rdev->regmap, cfg->mode_reg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 				   SY8824C_MODE, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	default:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) static unsigned int sy8824_get_mode(struct regulator_dev *rdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	struct sy8824_device_info *di = rdev_get_drvdata(rdev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	const struct sy8824_config *cfg = di->cfg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	u32 val;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	int ret = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	ret = regmap_read(rdev->regmap, cfg->mode_reg, &val);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	if (ret < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 		return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	if (val & SY8824C_MODE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 		return REGULATOR_MODE_FAST;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		return REGULATOR_MODE_NORMAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) static const struct regulator_ops sy8824_regulator_ops = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	.set_voltage_sel = regulator_set_voltage_sel_regmap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	.get_voltage_sel = regulator_get_voltage_sel_regmap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	.set_voltage_time_sel = regulator_set_voltage_time_sel,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	.map_voltage = regulator_map_voltage_linear,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	.list_voltage = regulator_list_voltage_linear,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	.enable = regulator_enable_regmap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	.disable = regulator_disable_regmap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	.is_enabled = regulator_is_enabled_regmap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	.set_mode = sy8824_set_mode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	.get_mode = sy8824_get_mode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) static int sy8824_regulator_register(struct sy8824_device_info *di,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 			struct regulator_config *config)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	struct regulator_desc *rdesc = &di->desc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	const struct sy8824_config *cfg = di->cfg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	struct regulator_dev *rdev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	rdesc->name = "sy8824-reg";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	rdesc->supply_name = "vin";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	rdesc->ops = &sy8824_regulator_ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	rdesc->type = REGULATOR_VOLTAGE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	rdesc->n_voltages = cfg->vsel_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	rdesc->enable_reg = cfg->enable_reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	rdesc->enable_mask = SY8824C_BUCK_EN;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	rdesc->min_uV = cfg->vsel_min;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	rdesc->uV_step = cfg->vsel_step;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	rdesc->vsel_reg = cfg->vol_reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	rdesc->vsel_mask = cfg->vsel_count - 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	rdesc->owner = THIS_MODULE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	rdev = devm_regulator_register(di->dev, &di->desc, config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	return PTR_ERR_OR_ZERO(rdev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) static const struct regmap_config sy8824_regmap_config = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	.reg_bits = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	.val_bits = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) static int sy8824_i2c_probe(struct i2c_client *client)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	struct device *dev = &client->dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	struct device_node *np = dev->of_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	struct sy8824_device_info *di;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	struct regulator_config config = { };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	struct regmap *regmap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	di = devm_kzalloc(dev, sizeof(struct sy8824_device_info), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	if (!di)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	di->regulator = of_get_regulator_init_data(dev, np, &di->desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	if (!di->regulator) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 		dev_err(dev, "Platform data not found!\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 		return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	di->dev = dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	di->cfg = of_device_get_match_data(dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	regmap = devm_regmap_init_i2c(client, &sy8824_regmap_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	if (IS_ERR(regmap)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		dev_err(dev, "Failed to allocate regmap!\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		return PTR_ERR(regmap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	i2c_set_clientdata(client, di);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	config.dev = di->dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	config.init_data = di->regulator;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	config.regmap = regmap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	config.driver_data = di;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	config.of_node = np;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	ret = sy8824_regulator_register(di, &config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	if (ret < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 		dev_err(dev, "Failed to register regulator!\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) static const struct sy8824_config sy8824c_cfg = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	.vol_reg = 0x00,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	.mode_reg = 0x00,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	.enable_reg = 0x00,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	.vsel_min = 762500,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	.vsel_step = 12500,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	.vsel_count = 64,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) static const struct sy8824_config sy8824e_cfg = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	.vol_reg = 0x00,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	.mode_reg = 0x00,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	.enable_reg = 0x00,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	.vsel_min = 700000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	.vsel_step = 12500,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	.vsel_count = 64,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) static const struct sy8824_config sy20276_cfg = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	.vol_reg = 0x00,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	.mode_reg = 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	.enable_reg = 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	.vsel_min = 600000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	.vsel_step = 10000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	.vsel_count = 128,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) static const struct sy8824_config sy20278_cfg = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	.vol_reg = 0x00,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	.mode_reg = 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	.enable_reg = 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	.vsel_min = 762500,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	.vsel_step = 12500,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	.vsel_count = 64,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) static const struct of_device_id sy8824_dt_ids[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 		.compatible = "silergy,sy8824c",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 		.data = &sy8824c_cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 		.compatible = "silergy,sy8824e",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 		.data = &sy8824e_cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 		.compatible = "silergy,sy20276",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 		.data = &sy20276_cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 		.compatible = "silergy,sy20278",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 		.data = &sy20278_cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	{ }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) MODULE_DEVICE_TABLE(of, sy8824_dt_ids);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) static const struct i2c_device_id sy8824_id[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	{ "sy8824", },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 	{ },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) MODULE_DEVICE_TABLE(i2c, sy8824_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) static struct i2c_driver sy8824_regulator_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	.driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 		.name = "sy8824-regulator",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 		.of_match_table = of_match_ptr(sy8824_dt_ids),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	.probe_new = sy8824_i2c_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	.id_table = sy8824_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) module_i2c_driver(sy8824_regulator_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) MODULE_AUTHOR("Jisheng Zhang <jszhang@kernel.org>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) MODULE_DESCRIPTION("SY8824C/SY8824E regulator driver");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) MODULE_LICENSE("GPL v2");