Linux Audio

Check our new training course

Loading...
v6.8
  1// SPDX-License-Identifier: GPL-2.0+
  2//
  3// max77693.c - mfd core driver for the MAX 77693
  4//
  5// Copyright (C) 2012 Samsung Electronics
  6// SangYoung Son <hello.son@samsung.com>
  7//
  8// This program is not provided / owned by Maxim Integrated Products.
  9//
 10// This driver is based on max8997.c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 11
 12#include <linux/module.h>
 13#include <linux/slab.h>
 14#include <linux/i2c.h>
 15#include <linux/err.h>
 16#include <linux/interrupt.h>
 17#include <linux/of.h>
 18#include <linux/pm_runtime.h>
 19#include <linux/mutex.h>
 20#include <linux/mfd/core.h>
 21#include <linux/mfd/max77693.h>
 22#include <linux/mfd/max77693-common.h>
 23#include <linux/mfd/max77693-private.h>
 24#include <linux/regulator/machine.h>
 25#include <linux/regmap.h>
 26
 27#define I2C_ADDR_PMIC	(0xCC >> 1)	/* Charger, Flash LED */
 28#define I2C_ADDR_MUIC	(0x4A >> 1)
 29#define I2C_ADDR_HAPTIC	(0x90 >> 1)
 30
 31static const struct mfd_cell max77693_devs[] = {
 32	{ .name = "max77693-pmic", },
 33	{
 34		.name = "max77693-charger",
 35		.of_compatible = "maxim,max77693-charger",
 36	},
 37	{
 38		.name = "max77693-muic",
 39		.of_compatible = "maxim,max77693-muic",
 40	},
 41	{
 42		.name = "max77693-haptic",
 43		.of_compatible = "maxim,max77693-haptic",
 44	},
 45	{
 46		.name = "max77693-led",
 47		.of_compatible = "maxim,max77693-led",
 48	},
 49};
 50
 51static const struct regmap_config max77693_regmap_config = {
 52	.reg_bits = 8,
 53	.val_bits = 8,
 54	.max_register = MAX77693_PMIC_REG_END,
 55};
 56
 57static const struct regmap_irq max77693_led_irqs[] = {
 58	{ .mask = LED_IRQ_FLED2_OPEN,  },
 59	{ .mask = LED_IRQ_FLED2_SHORT, },
 60	{ .mask = LED_IRQ_FLED1_OPEN,  },
 61	{ .mask = LED_IRQ_FLED1_SHORT, },
 62	{ .mask = LED_IRQ_MAX_FLASH,   },
 63};
 64
 65static const struct regmap_irq_chip max77693_led_irq_chip = {
 66	.name			= "max77693-led",
 67	.status_base		= MAX77693_LED_REG_FLASH_INT,
 68	.mask_base		= MAX77693_LED_REG_FLASH_INT_MASK,
 69	.num_regs		= 1,
 70	.irqs			= max77693_led_irqs,
 71	.num_irqs		= ARRAY_SIZE(max77693_led_irqs),
 72};
 73
 74static const struct regmap_irq max77693_topsys_irqs[] = {
 75	{ .mask = TOPSYS_IRQ_T120C_INT,  },
 76	{ .mask = TOPSYS_IRQ_T140C_INT,  },
 77	{ .mask = TOPSYS_IRQ_LOWSYS_INT, },
 78};
 79
 80static const struct regmap_irq_chip max77693_topsys_irq_chip = {
 81	.name			= "max77693-topsys",
 82	.status_base		= MAX77693_PMIC_REG_TOPSYS_INT,
 83	.mask_base		= MAX77693_PMIC_REG_TOPSYS_INT_MASK,
 84	.num_regs		= 1,
 85	.irqs			= max77693_topsys_irqs,
 86	.num_irqs		= ARRAY_SIZE(max77693_topsys_irqs),
 87};
 88
 89static const struct regmap_irq max77693_charger_irqs[] = {
 90	{ .mask = CHG_IRQ_BYP_I,   },
 91	{ .mask = CHG_IRQ_THM_I,   },
 92	{ .mask = CHG_IRQ_BAT_I,   },
 93	{ .mask = CHG_IRQ_CHG_I,   },
 94	{ .mask = CHG_IRQ_CHGIN_I, },
 95};
 96
 97static const struct regmap_irq_chip max77693_charger_irq_chip = {
 98	.name			= "max77693-charger",
 99	.status_base		= MAX77693_CHG_REG_CHG_INT,
100	.mask_base		= MAX77693_CHG_REG_CHG_INT_MASK,
101	.num_regs		= 1,
102	.irqs			= max77693_charger_irqs,
103	.num_irqs		= ARRAY_SIZE(max77693_charger_irqs),
104};
105
106static const struct regmap_config max77693_regmap_muic_config = {
107	.reg_bits = 8,
108	.val_bits = 8,
109	.max_register = MAX77693_MUIC_REG_END,
110};
111
112static const struct regmap_irq max77693_muic_irqs[] = {
113	{ .reg_offset = 0, .mask = MUIC_IRQ_INT1_ADC,		},
114	{ .reg_offset = 0, .mask = MUIC_IRQ_INT1_ADC_LOW,	},
115	{ .reg_offset = 0, .mask = MUIC_IRQ_INT1_ADC_ERR,	},
116	{ .reg_offset = 0, .mask = MUIC_IRQ_INT1_ADC1K,		},
117
118	{ .reg_offset = 1, .mask = MUIC_IRQ_INT2_CHGTYP,	},
119	{ .reg_offset = 1, .mask = MUIC_IRQ_INT2_CHGDETREUN,	},
120	{ .reg_offset = 1, .mask = MUIC_IRQ_INT2_DCDTMR,	},
121	{ .reg_offset = 1, .mask = MUIC_IRQ_INT2_DXOVP,		},
122	{ .reg_offset = 1, .mask = MUIC_IRQ_INT2_VBVOLT,	},
123	{ .reg_offset = 1, .mask = MUIC_IRQ_INT2_VIDRM,		},
124
125	{ .reg_offset = 2, .mask = MUIC_IRQ_INT3_EOC,		},
126	{ .reg_offset = 2, .mask = MUIC_IRQ_INT3_CGMBC,		},
127	{ .reg_offset = 2, .mask = MUIC_IRQ_INT3_OVP,		},
128	{ .reg_offset = 2, .mask = MUIC_IRQ_INT3_MBCCHG_ERR,	},
129	{ .reg_offset = 2, .mask = MUIC_IRQ_INT3_CHG_ENABLED,	},
130	{ .reg_offset = 2, .mask = MUIC_IRQ_INT3_BAT_DET,	},
131};
132
133static const struct regmap_irq_chip max77693_muic_irq_chip = {
134	.name			= "max77693-muic",
135	.status_base		= MAX77693_MUIC_REG_INT1,
136	.unmask_base		= MAX77693_MUIC_REG_INTMASK1,
137	.num_regs		= 3,
138	.irqs			= max77693_muic_irqs,
139	.num_irqs		= ARRAY_SIZE(max77693_muic_irqs),
140};
 
 
 
 
 
141
142static const struct regmap_config max77693_regmap_haptic_config = {
 
 
 
 
 
 
143	.reg_bits = 8,
144	.val_bits = 8,
145	.max_register = MAX77693_HAPTIC_REG_END,
146};
147
148static int max77693_i2c_probe(struct i2c_client *i2c)
 
149{
150	const struct i2c_device_id *id = i2c_client_get_device_id(i2c);
151	struct max77693_dev *max77693;
152	unsigned int reg_data;
 
153	int ret = 0;
154
155	max77693 = devm_kzalloc(&i2c->dev,
156			sizeof(struct max77693_dev), GFP_KERNEL);
157	if (max77693 == NULL)
158		return -ENOMEM;
159
160	i2c_set_clientdata(i2c, max77693);
161	max77693->dev = &i2c->dev;
162	max77693->i2c = i2c;
163	max77693->irq = i2c->irq;
164	max77693->type = id->driver_data;
165
166	max77693->regmap = devm_regmap_init_i2c(i2c, &max77693_regmap_config);
167	if (IS_ERR(max77693->regmap)) {
168		ret = PTR_ERR(max77693->regmap);
169		dev_err(max77693->dev, "failed to allocate register map: %d\n",
170				ret);
171		return ret;
172	}
173
174	ret = regmap_read(max77693->regmap, MAX77693_PMIC_REG_PMIC_ID2,
175				&reg_data);
176	if (ret < 0) {
177		dev_err(max77693->dev, "device not found on this channel\n");
178		return ret;
179	} else
180		dev_info(max77693->dev, "device ID: 0x%x\n", reg_data);
181
182	max77693->i2c_muic = i2c_new_dummy_device(i2c->adapter, I2C_ADDR_MUIC);
183	if (IS_ERR(max77693->i2c_muic)) {
184		dev_err(max77693->dev, "Failed to allocate I2C device for MUIC\n");
185		return PTR_ERR(max77693->i2c_muic);
186	}
187	i2c_set_clientdata(max77693->i2c_muic, max77693);
188
189	max77693->i2c_haptic = i2c_new_dummy_device(i2c->adapter, I2C_ADDR_HAPTIC);
190	if (IS_ERR(max77693->i2c_haptic)) {
191		dev_err(max77693->dev, "Failed to allocate I2C device for Haptic\n");
192		ret = PTR_ERR(max77693->i2c_haptic);
193		goto err_i2c_haptic;
194	}
195	i2c_set_clientdata(max77693->i2c_haptic, max77693);
196
197	max77693->regmap_haptic = devm_regmap_init_i2c(max77693->i2c_haptic,
198					&max77693_regmap_haptic_config);
199	if (IS_ERR(max77693->regmap_haptic)) {
200		ret = PTR_ERR(max77693->regmap_haptic);
201		dev_err(max77693->dev,
202			"failed to initialize haptic register map: %d\n", ret);
203		goto err_regmap;
204	}
205
206	/*
207	 * Initialize register map for MUIC device because use regmap-muic
208	 * instance of MUIC device when irq of max77693 is initialized
209	 * before call max77693-muic probe() function.
210	 */
211	max77693->regmap_muic = devm_regmap_init_i2c(max77693->i2c_muic,
212					 &max77693_regmap_muic_config);
213	if (IS_ERR(max77693->regmap_muic)) {
214		ret = PTR_ERR(max77693->regmap_muic);
215		dev_err(max77693->dev,
216			"failed to allocate register map: %d\n", ret);
217		goto err_regmap;
218	}
219
220	ret = regmap_add_irq_chip(max77693->regmap, max77693->irq,
221				IRQF_ONESHOT | IRQF_SHARED, 0,
222				&max77693_led_irq_chip,
223				&max77693->irq_data_led);
224	if (ret) {
225		dev_err(max77693->dev, "failed to add irq chip: %d\n", ret);
226		goto err_regmap;
227	}
228
229	ret = regmap_add_irq_chip(max77693->regmap, max77693->irq,
230				IRQF_ONESHOT | IRQF_SHARED, 0,
231				&max77693_topsys_irq_chip,
232				&max77693->irq_data_topsys);
233	if (ret) {
234		dev_err(max77693->dev, "failed to add irq chip: %d\n", ret);
235		goto err_irq_topsys;
236	}
237
238	ret = regmap_add_irq_chip(max77693->regmap, max77693->irq,
239				IRQF_ONESHOT | IRQF_SHARED, 0,
240				&max77693_charger_irq_chip,
241				&max77693->irq_data_chg);
242	if (ret) {
243		dev_err(max77693->dev, "failed to add irq chip: %d\n", ret);
244		goto err_irq_charger;
245	}
246
247	ret = regmap_add_irq_chip(max77693->regmap_muic, max77693->irq,
248				IRQF_ONESHOT | IRQF_SHARED, 0,
249				&max77693_muic_irq_chip,
250				&max77693->irq_data_muic);
251	if (ret) {
252		dev_err(max77693->dev, "failed to add irq chip: %d\n", ret);
253		goto err_irq_muic;
254	}
255
256	/* Unmask interrupts from all blocks in interrupt source register */
257	ret = regmap_update_bits(max77693->regmap,
258				MAX77693_PMIC_REG_INTSRC_MASK,
259				SRC_IRQ_ALL, (unsigned int)~SRC_IRQ_ALL);
260	if (ret < 0) {
261		dev_err(max77693->dev,
262			"Could not unmask interrupts in INTSRC: %d\n",
263			ret);
264		goto err_intsrc;
265	}
266
267	pm_runtime_set_active(max77693->dev);
268
269	ret = mfd_add_devices(max77693->dev, -1, max77693_devs,
270			      ARRAY_SIZE(max77693_devs), NULL, 0, NULL);
271	if (ret < 0)
272		goto err_mfd;
273
 
 
274	return ret;
275
276err_mfd:
277	mfd_remove_devices(max77693->dev);
278err_intsrc:
279	regmap_del_irq_chip(max77693->irq, max77693->irq_data_muic);
280err_irq_muic:
281	regmap_del_irq_chip(max77693->irq, max77693->irq_data_chg);
282err_irq_charger:
283	regmap_del_irq_chip(max77693->irq, max77693->irq_data_topsys);
284err_irq_topsys:
285	regmap_del_irq_chip(max77693->irq, max77693->irq_data_led);
286err_regmap:
287	i2c_unregister_device(max77693->i2c_haptic);
288err_i2c_haptic:
289	i2c_unregister_device(max77693->i2c_muic);
290	return ret;
291}
292
293static void max77693_i2c_remove(struct i2c_client *i2c)
294{
295	struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
296
297	mfd_remove_devices(max77693->dev);
 
 
298
299	regmap_del_irq_chip(max77693->irq, max77693->irq_data_muic);
300	regmap_del_irq_chip(max77693->irq, max77693->irq_data_chg);
301	regmap_del_irq_chip(max77693->irq, max77693->irq_data_topsys);
302	regmap_del_irq_chip(max77693->irq, max77693->irq_data_led);
303
304	i2c_unregister_device(max77693->i2c_muic);
305	i2c_unregister_device(max77693->i2c_haptic);
306}
307
308static const struct i2c_device_id max77693_i2c_id[] = {
309	{ "max77693", TYPE_MAX77693 },
310	{ }
311};
312MODULE_DEVICE_TABLE(i2c, max77693_i2c_id);
313
314static int max77693_suspend(struct device *dev)
315{
316	struct i2c_client *i2c = to_i2c_client(dev);
317	struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
318
319	if (device_may_wakeup(dev)) {
320		enable_irq_wake(max77693->irq);
321		disable_irq(max77693->irq);
322	}
323
324	return 0;
325}
326
327static int max77693_resume(struct device *dev)
328{
329	struct i2c_client *i2c = to_i2c_client(dev);
330	struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
331
332	if (device_may_wakeup(dev)) {
333		disable_irq_wake(max77693->irq);
334		enable_irq(max77693->irq);
335	}
336
337	return 0;
338}
339
340static const struct dev_pm_ops max77693_pm = {
341	.suspend = max77693_suspend,
342	.resume = max77693_resume,
343};
344
345#ifdef CONFIG_OF
346static const struct of_device_id max77693_dt_match[] = {
347	{ .compatible = "maxim,max77693" },
348	{},
349};
350MODULE_DEVICE_TABLE(of, max77693_dt_match);
351#endif
352
353static struct i2c_driver max77693_i2c_driver = {
354	.driver = {
355		   .name = "max77693",
 
356		   .pm = &max77693_pm,
357		   .of_match_table = of_match_ptr(max77693_dt_match),
358	},
359	.probe = max77693_i2c_probe,
360	.remove = max77693_i2c_remove,
361	.id_table = max77693_i2c_id,
362};
363
364module_i2c_driver(max77693_i2c_driver);
 
 
 
 
 
 
 
 
 
 
 
365
366MODULE_DESCRIPTION("MAXIM 77693 multi-function core driver");
367MODULE_AUTHOR("SangYoung, Son <hello.son@samsung.com>");
368MODULE_LICENSE("GPL");
v3.5.6
  1/*
  2 * max77693.c - mfd core driver for the MAX 77693
  3 *
  4 * Copyright (C) 2012 Samsung Electronics
  5 * SangYoung Son <hello.son@smasung.com>
  6 *
  7 * This program is not provided / owned by Maxim Integrated Products.
  8 *
  9 * This program is free software; you can redistribute it and/or modify
 10 * it under the terms of the GNU General Public License as published by
 11 * the Free Software Foundation; either version 2 of the License, or
 12 * (at your option) any later version.
 13 *
 14 * This program is distributed in the hope that it will be useful,
 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 17 * GNU General Public License for more details.
 18 *
 19 * You should have received a copy of the GNU General Public License
 20 * along with this program; if not, write to the Free Software
 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 22 *
 23 * This driver is based on max8997.c
 24 */
 25
 26#include <linux/module.h>
 27#include <linux/slab.h>
 28#include <linux/i2c.h>
 29#include <linux/err.h>
 30#include <linux/interrupt.h>
 
 31#include <linux/pm_runtime.h>
 32#include <linux/mutex.h>
 33#include <linux/mfd/core.h>
 34#include <linux/mfd/max77693.h>
 
 35#include <linux/mfd/max77693-private.h>
 36#include <linux/regulator/machine.h>
 37#include <linux/regmap.h>
 38
 39#define I2C_ADDR_PMIC	(0xCC >> 1)	/* Charger, Flash LED */
 40#define I2C_ADDR_MUIC	(0x4A >> 1)
 41#define I2C_ADDR_HAPTIC	(0x90 >> 1)
 42
 43static struct mfd_cell max77693_devs[] = {
 44	{ .name = "max77693-pmic", },
 45	{ .name = "max77693-charger", },
 46	{ .name = "max77693-flash", },
 47	{ .name = "max77693-muic", },
 48	{ .name = "max77693-haptic", },
 
 
 
 
 
 
 
 
 
 
 
 
 49};
 50
 51int max77693_read_reg(struct regmap *map, u8 reg, u8 *dest)
 52{
 53	unsigned int val;
 54	int ret;
 
 55
 56	ret = regmap_read(map, reg, &val);
 57	*dest = val;
 
 
 
 
 
 58
 59	return ret;
 60}
 61EXPORT_SYMBOL_GPL(max77693_read_reg);
 
 
 
 
 
 62
 63int max77693_bulk_read(struct regmap *map, u8 reg, int count, u8 *buf)
 64{
 65	int ret;
 
 
 66
 67	ret = regmap_bulk_read(map, reg, buf, count);
 
 
 
 
 
 
 
 68
 69	return ret;
 70}
 71EXPORT_SYMBOL_GPL(max77693_bulk_read);
 
 
 
 
 72
 73int max77693_write_reg(struct regmap *map, u8 reg, u8 value)
 74{
 75	int ret;
 
 
 
 
 
 76
 77	ret = regmap_write(map, reg, value);
 
 
 
 
 78
 79	return ret;
 80}
 81EXPORT_SYMBOL_GPL(max77693_write_reg);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 82
 83int max77693_bulk_write(struct regmap *map, u8 reg, int count, u8 *buf)
 84{
 85	int ret;
 86
 87	ret = regmap_bulk_write(map, reg, buf, count);
 88
 89	return ret;
 90}
 91EXPORT_SYMBOL_GPL(max77693_bulk_write);
 92
 93int max77693_update_reg(struct regmap *map, u8 reg, u8 val, u8 mask)
 94{
 95	int ret;
 96
 97	ret = regmap_update_bits(map, reg, mask, val);
 98
 99	return ret;
100}
101EXPORT_SYMBOL_GPL(max77693_update_reg);
102
103static const struct regmap_config max77693_regmap_config = {
104	.reg_bits = 8,
105	.val_bits = 8,
106	.max_register = MAX77693_PMIC_REG_END,
107};
108
109static int max77693_i2c_probe(struct i2c_client *i2c,
110			      const struct i2c_device_id *id)
111{
 
112	struct max77693_dev *max77693;
113	struct max77693_platform_data *pdata = i2c->dev.platform_data;
114	u8 reg_data;
115	int ret = 0;
116
117	max77693 = devm_kzalloc(&i2c->dev,
118			sizeof(struct max77693_dev), GFP_KERNEL);
119	if (max77693 == NULL)
120		return -ENOMEM;
121
 
 
 
 
 
 
122	max77693->regmap = devm_regmap_init_i2c(i2c, &max77693_regmap_config);
123	if (IS_ERR(max77693->regmap)) {
124		ret = PTR_ERR(max77693->regmap);
125		dev_err(max77693->dev,"failed to allocate register map: %d\n",
126				ret);
127		goto err_regmap;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128	}
 
129
130	i2c_set_clientdata(i2c, max77693);
131	max77693->dev = &i2c->dev;
132	max77693->i2c = i2c;
133	max77693->irq = i2c->irq;
134	max77693->type = id->driver_data;
 
 
135
136	if (!pdata)
 
 
 
 
 
137		goto err_regmap;
 
138
139	max77693->wakeup = pdata->wakeup;
 
 
 
 
 
 
 
 
 
 
 
 
140
141	mutex_init(&max77693->iolock);
 
 
 
 
 
 
 
142
143	if (max77693_read_reg(max77693->regmap,
144				MAX77693_PMIC_REG_PMIC_ID2, &reg_data) < 0) {
145		dev_err(max77693->dev, "device not found on this channel\n");
146		ret = -ENODEV;
147		goto err_regmap;
148	} else
149		dev_info(max77693->dev, "device ID: 0x%x\n", reg_data);
 
150
151	max77693->muic = i2c_new_dummy(i2c->adapter, I2C_ADDR_MUIC);
152	i2c_set_clientdata(max77693->muic, max77693);
 
 
 
 
 
 
153
154	max77693->haptic = i2c_new_dummy(i2c->adapter, I2C_ADDR_HAPTIC);
155	i2c_set_clientdata(max77693->haptic, max77693);
 
 
 
 
 
 
156
157	ret = max77693_irq_init(max77693);
158	if (ret < 0)
159		goto err_mfd;
 
 
 
 
 
 
 
160
161	pm_runtime_set_active(max77693->dev);
162
163	ret = mfd_add_devices(max77693->dev, -1, max77693_devs,
164			ARRAY_SIZE(max77693_devs), NULL, 0);
165	if (ret < 0)
166		goto err_mfd;
167
168	device_init_wakeup(max77693->dev, pdata->wakeup);
169
170	return ret;
171
172err_mfd:
173	i2c_unregister_device(max77693->muic);
174	i2c_unregister_device(max77693->haptic);
 
 
 
 
 
 
 
175err_regmap:
176	kfree(max77693);
177
 
178	return ret;
179}
180
181static int max77693_i2c_remove(struct i2c_client *i2c)
182{
183	struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
184
185	mfd_remove_devices(max77693->dev);
186	i2c_unregister_device(max77693->muic);
187	i2c_unregister_device(max77693->haptic);
188
189	return 0;
 
 
 
 
 
 
190}
191
192static const struct i2c_device_id max77693_i2c_id[] = {
193	{ "max77693", TYPE_MAX77693 },
194	{ }
195};
196MODULE_DEVICE_TABLE(i2c, max77693_i2c_id);
197
198static int max77693_suspend(struct device *dev)
199{
200	struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
201	struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
202
203	if (device_may_wakeup(dev))
204		irq_set_irq_wake(max77693->irq, 1);
 
 
 
205	return 0;
206}
207
208static int max77693_resume(struct device *dev)
209{
210	struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
211	struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
212
213	if (device_may_wakeup(dev))
214		irq_set_irq_wake(max77693->irq, 0);
215	return max77693_irq_resume(max77693);
 
 
 
216}
217
218const struct dev_pm_ops max77693_pm = {
219	.suspend = max77693_suspend,
220	.resume = max77693_resume,
221};
222
 
 
 
 
 
 
 
 
223static struct i2c_driver max77693_i2c_driver = {
224	.driver = {
225		   .name = "max77693",
226		   .owner = THIS_MODULE,
227		   .pm = &max77693_pm,
 
228	},
229	.probe = max77693_i2c_probe,
230	.remove = max77693_i2c_remove,
231	.id_table = max77693_i2c_id,
232};
233
234static int __init max77693_i2c_init(void)
235{
236	return i2c_add_driver(&max77693_i2c_driver);
237}
238/* init early so consumer devices can complete system boot */
239subsys_initcall(max77693_i2c_init);
240
241static void __exit max77693_i2c_exit(void)
242{
243	i2c_del_driver(&max77693_i2c_driver);
244}
245module_exit(max77693_i2c_exit);
246
247MODULE_DESCRIPTION("MAXIM 77693 multi-function core driver");
248MODULE_AUTHOR("SangYoung, Son <hello.son@samsung.com>");
249MODULE_LICENSE("GPL");