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-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * Core driver for TPS61050/61052 boost converters, used for while LED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  * driving, audio power amplification, white LED flash, and generic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * boost conversion. Additionally it provides a 1-bit GPIO pin (out or in)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  * and a flash synchronization pin to synchronize flash events when used as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  * flashgun.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  * Copyright (C) 2011 ST-Ericsson SA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  * Written on behalf of Linaro for ST-Ericsson
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  * Author: Linus Walleij <linus.walleij@linaro.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #include <linux/i2c.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #include <linux/regmap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #include <linux/gpio.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #include <linux/spinlock.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #include <linux/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #include <linux/err.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) #include <linux/mfd/core.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #include <linux/mfd/tps6105x.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) static struct regmap_config tps6105x_regmap_config = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	.reg_bits = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	.val_bits = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	.max_register = TPS6105X_REG_3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) static int tps6105x_startup(struct tps6105x *tps6105x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	unsigned int regval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	ret = regmap_read(tps6105x->regmap, TPS6105X_REG_0, &regval);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 		return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	switch (regval >> TPS6105X_REG0_MODE_SHIFT) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	case TPS6105X_REG0_MODE_SHUTDOWN:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 		dev_info(&tps6105x->client->dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 			 "TPS6105x found in SHUTDOWN mode\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	case TPS6105X_REG0_MODE_TORCH:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 		dev_info(&tps6105x->client->dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 			 "TPS6105x found in TORCH mode\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	case TPS6105X_REG0_MODE_TORCH_FLASH:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		dev_info(&tps6105x->client->dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 			 "TPS6105x found in FLASH mode\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	case TPS6105X_REG0_MODE_VOLTAGE:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 		dev_info(&tps6105x->client->dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 			 "TPS6105x found in VOLTAGE mode\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	default:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65)  * MFD cells - we always have a GPIO cell and we have one cell
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66)  * which is selected operation mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) static struct mfd_cell tps6105x_gpio_cell = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	.name = "tps6105x-gpio",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) static struct mfd_cell tps6105x_leds_cell = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	.name = "tps6105x-leds",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) static struct mfd_cell tps6105x_flash_cell = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	.name = "tps6105x-flash",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) static struct mfd_cell tps6105x_regulator_cell = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	.name = "tps6105x-regulator",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) static int tps6105x_add_device(struct tps6105x *tps6105x,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 			       struct mfd_cell *cell)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	cell->platform_data = tps6105x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	cell->pdata_size = sizeof(*tps6105x);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	return mfd_add_devices(&tps6105x->client->dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 			       PLATFORM_DEVID_AUTO, cell, 1, NULL, 0, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) static struct tps6105x_platform_data *tps6105x_parse_dt(struct device *dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	struct device_node *np = dev->of_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	struct tps6105x_platform_data *pdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	struct device_node *child;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	if (!np)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 		return ERR_PTR(-EINVAL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	if (of_get_available_child_count(np) > 1) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 		dev_err(dev, "cannot support multiple operational modes");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		return ERR_PTR(-EINVAL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	if (!pdata)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 		return ERR_PTR(-ENOMEM);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	pdata->mode = TPS6105X_MODE_SHUTDOWN;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	for_each_available_child_of_node(np, child) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 		if (child->name && !of_node_cmp(child->name, "regulator"))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 			pdata->mode = TPS6105X_MODE_VOLTAGE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 		else if (child->name && !of_node_cmp(child->name, "led"))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 			pdata->mode = TPS6105X_MODE_TORCH;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	return pdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) static int tps6105x_probe(struct i2c_client *client,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 			const struct i2c_device_id *id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	struct tps6105x			*tps6105x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	struct tps6105x_platform_data	*pdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	pdata = dev_get_platdata(&client->dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	if (!pdata)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 		pdata = tps6105x_parse_dt(&client->dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	if (IS_ERR(pdata)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 		dev_err(&client->dev, "No platform data or DT found");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		return PTR_ERR(pdata);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	tps6105x = devm_kmalloc(&client->dev, sizeof(*tps6105x), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	if (!tps6105x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	tps6105x->regmap = devm_regmap_init_i2c(client, &tps6105x_regmap_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	if (IS_ERR(tps6105x->regmap))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 		return PTR_ERR(tps6105x->regmap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	i2c_set_clientdata(client, tps6105x);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	tps6105x->client = client;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	tps6105x->pdata = pdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	ret = tps6105x_startup(tps6105x);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	if (ret) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 		dev_err(&client->dev, "chip initialization failed\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 		return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	ret = tps6105x_add_device(tps6105x, &tps6105x_gpio_cell);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 		return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	switch (pdata->mode) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	case TPS6105X_MODE_SHUTDOWN:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 		dev_info(&client->dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 			 "present, not used for anything, only GPIO\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	case TPS6105X_MODE_TORCH:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		ret = tps6105x_add_device(tps6105x, &tps6105x_leds_cell);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	case TPS6105X_MODE_TORCH_FLASH:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		ret = tps6105x_add_device(tps6105x, &tps6105x_flash_cell);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	case TPS6105X_MODE_VOLTAGE:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 		ret = tps6105x_add_device(tps6105x, &tps6105x_regulator_cell);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	default:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 		dev_warn(&client->dev, "invalid mode: %d\n", pdata->mode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 		mfd_remove_devices(&client->dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) static int tps6105x_remove(struct i2c_client *client)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	struct tps6105x *tps6105x = i2c_get_clientdata(client);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	mfd_remove_devices(&client->dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	/* Put chip in shutdown mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	regmap_update_bits(tps6105x->regmap, TPS6105X_REG_0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 		TPS6105X_REG0_MODE_MASK,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 		TPS6105X_MODE_SHUTDOWN << TPS6105X_REG0_MODE_SHIFT);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) static const struct i2c_device_id tps6105x_id[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	{ "tps61050", 0 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	{ "tps61052", 0 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	{ }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) MODULE_DEVICE_TABLE(i2c, tps6105x_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) static const struct of_device_id tps6105x_of_match[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	{ .compatible = "ti,tps61050" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	{ .compatible = "ti,tps61052" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	{ },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) MODULE_DEVICE_TABLE(of, tps6105x_of_match);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) static struct i2c_driver tps6105x_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	.driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 		.name	= "tps6105x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		.of_match_table = tps6105x_of_match,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 	.probe		= tps6105x_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	.remove		= tps6105x_remove,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	.id_table	= tps6105x_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) static int __init tps6105x_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	return i2c_add_driver(&tps6105x_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) subsys_initcall(tps6105x_init);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) static void __exit tps6105x_exit(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	i2c_del_driver(&tps6105x_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) module_exit(tps6105x_exit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) MODULE_AUTHOR("Linus Walleij");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) MODULE_DESCRIPTION("TPS6105x White LED Boost Converter Driver");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) MODULE_LICENSE("GPL v2");